diff --git a/.acrolinx-config.edn b/.acrolinx-config.edn
index 06bbb9c9c2..78cdd0e4df 100644
--- a/.acrolinx-config.edn
+++ b/.acrolinx-config.edn
@@ -1,4 +1,4 @@
-{:allowed-branchname-matches ["^master$" "^release..*"]
+{:allowed-branchname-matches ["main" "release-.*"]
:allowed-filename-matches ["docs" "styleguide"]
:template-header
@@ -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/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 bc0cf04f4b..10b0192bf5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,9 +7,10 @@ _themes.MSDN.Modern/
_themes.VS.Modern/
# Ignore local configuration changes
-.github/
+#.github/
.openpublishing.buildcore.ps1
.vscode/
# Documentation build
/docs/vcppdocs
+debug.log
diff --git a/.markdownlint.json b/.markdownlint.json
index ce59de63f1..721f62cf28 100644
--- a/.markdownlint.json
+++ b/.markdownlint.json
@@ -2,6 +2,7 @@
"default": true,
"DOCSMD006": false,
"MD001": false,
+ "MD004": false,
"MD013": false,
"MD024": {
"siblings_only": true
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 87f6e7c300..296bfe4f38 100644
--- a/.openpublishing.publish.config.json
+++ b/.openpublishing.publish.config.json
@@ -8,9 +8,12 @@
"locale": "en-us",
"monikers": [],
"moniker_ranges": [
- ">= vs-2015"
+ ">= msvc-140"
+ ],
+ "xref_query_tags": [
+ "/dotnet",
+ "/uwp/api"
],
- "xref_query_tags": ["/dotnet", "/uwp/api"],
"open_to_public_contributors": true,
"type_mapping": {
"Conceptual": "Content",
@@ -22,23 +25,22 @@
}
],
"notification_subscribers": [],
+ "sync_notification_subscribers": [],
"branches_to_filter": [],
- "git_repository_url_open_to_public_contributors": "https://github.com/Microsoft/cpp-docs",
- "git_repository_branch_open_to_public_contributors": "master",
- "skip_source_output_uploading": false,
+ "git_repository_url_open_to_public_contributors": "https://github.com/MicrosoftDocs/cpp-docs",
+ "git_repository_branch_open_to_public_contributors": "main",
"need_preview_pull_request": true,
- "enable_incremental_build": true,
"dependent_repositories": [
{
"path_to_root": "_themes",
"url": "https://github.com/Microsoft/templates.docs.msft",
- "branch": "master",
+ "branch": "main",
"branch_mapping": {}
},
{
"path_to_root": "_themes.pdf",
"url": "https://github.com/Microsoft/templates.docs.msft.pdf",
- "branch": "master",
+ "branch": "main",
"branch_mapping": {}
}
],
@@ -47,20 +49,21 @@
"Publish",
"Pdf"
],
- "master": [
+ "main": [
"Publish",
"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 a9a617b267..dc66331425 100644
--- a/.openpublishing.redirection.json
+++ b/.openpublishing.redirection.json
@@ -1,5 +1,10 @@
{
"redirections": [
+ {
+ "source_path": "docs/windows/desktop-applications-visual-cpp.md",
+ "redirect_url": "/cpp/windows/overview-of-windows-programming-in-cpp",
+ "redirect_document_id": true
+ },
{
"source_path": "docs/cpp-conformance-improvements-2017.md",
"redirect_url": "/cpp/overview/cpp-conformance-improvements",
@@ -16,7 +21,7 @@
"redirect_document_id": true
},
{
- "source_path": "docs/supported-platforms-visual-cpp.md.md",
+ "source_path": "docs/supported-platforms-visual-cpp.md",
"redirect_url": "/cpp/overview/supported-platforms-visual-cpp",
"redirect_document_id": true
},
@@ -62,8 +67,8 @@
},
{
"source_path": "docs/vcpkg.md",
- "redirect_url": "/cpp/build/vcpkg",
- "redirect_document_id": true
+ "redirect_url": "https://vcpkg.io/",
+ "redirect_document_id": false
},
{
"source_path": "docs/windows/universal-windows-apps-cpp.md",
@@ -317,17 +322,32 @@
},
{
"source_path": "docs/build/batch-mode-rules.md",
- "redirect_url": "/cpp/build/reference/batch-mode-rules",
+ "redirect_url": "/cpp/build/reference/inference-rules#batch-mode-rules",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/batch-mode-rules.md",
+ "redirect_url": "/cpp/build/reference/inference-rules#batch-mode-rules",
"redirect_document_id": false
},
{
"source_path": "docs/build/command-macros-and-options-macros.md",
- "redirect_url": "/cpp/build/reference/command-macros-and-options-macros",
+ "redirect_url": "/cpp/build/reference/special-nmake-macros#command-macros-and-options-macros",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/command-macros-and-options-macros.md",
+ "redirect_url": "/cpp/build/reference/special-nmake-macros#command-macros-and-options-macros",
"redirect_document_id": false
},
{
"source_path": "docs/build/command-modifiers.md",
- "redirect_url": "/cpp/build/reference/command-modifiers",
+ "redirect_url": "/cpp/build/reference/commands-in-a-makefile#command-modifiers",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/command-modifiers.md",
+ "redirect_url": "/cpp/build/reference/commands-in-a-makefile#command-modifiers",
"redirect_document_id": false
},
{
@@ -337,7 +357,12 @@
},
{
"source_path": "docs/build/comments-in-a-makefile.md",
- "redirect_url": "/cpp/build/reference/comments-in-a-makefile",
+ "redirect_url": "/cpp/build/reference/contents-of-a-makefile#comments-in-a-makefile",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/comments-in-a-makefile.md",
+ "redirect_url": "/cpp/build/reference/contents-of-a-makefile#comments-in-a-makefile",
"redirect_document_id": false
},
{
@@ -347,7 +372,12 @@
},
{
"source_path": "docs/build/creating-inline-file-text.md",
- "redirect_url": "/cpp/build/reference/creating-inline-file-text",
+ "redirect_url": "/cpp/build/reference/inline-files-in-a-makefile#creating-inline-file-text",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/creating-inline-file-text.md",
+ "redirect_url": "/cpp/build/reference/inline-files-in-a-makefile#creating-inline-file-text",
"redirect_document_id": false
},
{
@@ -362,7 +392,12 @@
},
{
"source_path": "docs/build/defining-a-rule.md",
- "redirect_url": "/cpp/build/reference/defining-a-rule",
+ "redirect_url": "/cpp/build/reference/inference-rules#defining-a-rule",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/defining-a-rule.md",
+ "redirect_url": "/cpp/build/reference/inference-rules#defining-a-rule",
"redirect_document_id": false
},
{
@@ -397,12 +432,12 @@
},
{
"source_path": "docs/build/environment-variable-macros.md",
- "redirect_url": "/cpp/build/reference/environment-variable-macros",
+ "redirect_url": "/cpp/build/reference/special-nmake-macros#environment-variable-macros",
"redirect_document_id": false
},
{
- "source_path": "docs/build/executing-a-program-in-preprocessing.md",
- "redirect_url": "/cpp/build/reference/executing-a-program-in-preprocessing",
+ "source_path": "docs/build/reference/environment-variable-macros.md",
+ "redirect_url": "/cpp/build/reference/special-nmake-macros#environment-variable-macros",
"redirect_document_id": false
},
{
@@ -416,18 +451,23 @@
"redirect_document_id": false
},
{
- "source_path": "docs/build/expressions-in-makefile-preprocessing.md",
- "redirect_url": "/cpp/build/reference/expressions-in-makefile-preprocessing",
+ "source_path": "docs/build/filename-macros.md",
+ "redirect_url": "/cpp/build/reference/special-nmake-macros#filename-macros",
"redirect_document_id": false
},
{
- "source_path": "docs/build/filename-macros.md",
- "redirect_url": "/cpp/build/reference/filename-macros",
+ "source_path": "docs/build/reference/filename-macros.md",
+ "redirect_url": "/cpp/build/reference/special-nmake-macros#filename-macros",
"redirect_document_id": false
},
{
"source_path": "docs/build/filename-parts-syntax.md",
- "redirect_url": "/cpp/build/reference/filename-parts-syntax",
+ "redirect_url": "/cpp/build/reference/commands-in-a-makefile#filename-parts-syntax",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/filename-parts-syntax.md",
+ "redirect_url": "/cpp/build/reference/commands-in-a-makefile#filename-parts-syntax",
"redirect_document_id": false
},
{
@@ -437,7 +477,12 @@
},
{
"source_path": "docs/build/inferred-dependents-and-rules.md",
- "redirect_url": "/cpp/build/reference/inferred-dependents-and-rules",
+ "redirect_url": "/cpp/build/reference/inference-rules#inferred-dependents-and-rules",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/inferred-dependents-and-rules.md",
+ "redirect_url": "/cpp/build/reference/inference-rules#inferred-dependents-and-rules",
"redirect_document_id": false
},
{
@@ -457,12 +502,102 @@
},
{
"source_path": "docs/build/long-filenames-in-a-makefile.md",
- "redirect_url": "/cpp/build/reference/long-filenames-in-a-makefile",
+ "redirect_url": "/cpp/build/reference/contents-of-a-makefile#long-filenames-in-a-makefile",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/long-filenames-in-a-makefile.md",
+ "redirect_url": "/cpp/build/reference/contents-of-a-makefile#long-filenames-in-a-makefile",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/wildcards-and-nmake.md",
+ "redirect_url": "/cpp/build/reference/contents-of-a-makefile#wildcards-and-nmake",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/specifying-dlls-to-delay-load.md",
+ "redirect_url": "/cpp/build/reference/linker-support-for-delay-loaded-dlls#specify-dlls-to-delay-load",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/explicitly-unloading-a-delay-loaded-dll.md",
+ "redirect_url": "/cpp/build/reference/linker-support-for-delay-loaded-dlls#explicitly-unload-a-delay-loaded-dll",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/binding-imports.md",
+ "redirect_url": "/cpp/build/reference/linker-support-for-delay-loaded-dlls#binding-imports",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/loading-all-imports-for-a-delay-loaded-dll.md",
+ "redirect_url": "/cpp/build/reference/linker-support-for-delay-loaded-dlls#load-all-imports-for-a-delay-loaded-dll",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/dumping-delay-loaded-imports.md",
+ "redirect_url": "/cpp/build/reference/linker-support-for-delay-loaded-dlls#dump-delay-loaded-imports",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/constraints-of-delay-loading-dlls.md",
+ "redirect_url": "/cpp/build/reference/linker-support-for-delay-loaded-dlls#constraints-on-delay-load-dlls",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/notification-hooks.md",
+ "redirect_url": "/cpp/build/reference/error-handling-and-notification#notification-hooks",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/failure-hooks.md",
+ "redirect_url": "/cpp/build/reference/error-handling-and-notification#failure-hooks",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/exceptions-c-cpp.md",
+ "redirect_url": "/cpp/build/reference/error-handling-and-notification#delay-load-exception-codes",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/changes-in-the-dll-delayed-loading-helper-function-since-visual-cpp-6-0.md",
+ "redirect_url": "/cpp/build/reference/understanding-the-helper-function",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/calling-conventions-parameters-and-return-type.md",
+ "redirect_url": "/cpp/build/reference/understanding-the-helper-function#calling-conventions-parameters-and-return-type",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/structure-and-constant-definitions.md",
+ "redirect_url": "/cpp/build/reference/understanding-the-helper-function#structure-and-constant-definitions",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/calculating-necessary-values.md",
+ "redirect_url": "/cpp/build/reference/understanding-the-helper-function#calculate-necessary-values",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/unloading-a-delay-loaded-dll.md",
+ "redirect_url": "/cpp/build/reference/understanding-the-helper-function#unload-a-delay-loaded-dll",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/developing-your-own-helper-function.md",
+ "redirect_url": "/cpp/build/reference/understanding-the-helper-function#develop-your-own-helper-function",
"redirect_document_id": false
},
{
"source_path": "docs/build/macro-substitution.md",
- "redirect_url": "/cpp/build/reference/macro-substitution",
+ "redirect_url": "/cpp/build/reference/using-an-nmake-macro#macro-substitution",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/macro-substitution.md",
+ "redirect_url": "/cpp/build/reference/using-an-nmake-macro#macro-substitution",
"redirect_document_id": false
},
{
@@ -472,17 +607,47 @@
},
{
"source_path": "docs/build/makefile-preprocessing-directives.md",
- "redirect_url": "/cpp/build/reference/makefile-preprocessing-directives",
+ "redirect_url": "/cpp/build/reference/makefile-preprocessing#makefile-preprocessing-directives",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/makefile-preprocessing-directives.md",
+ "redirect_url": "/cpp/build/reference/makefile-preprocessing#makefile-preprocessing-directives",
"redirect_document_id": false
},
{
"source_path": "docs/build/makefile-preprocessing-operators.md",
- "redirect_url": "/cpp/build/reference/makefile-preprocessing-operators",
+ "redirect_url": "/cpp/build/reference/makefile-preprocessing#makefile-preprocessing-operators",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/makefile-preprocessing-operators.md",
+ "redirect_url": "/cpp/build/reference/makefile-preprocessing#makefile-preprocessing-operators",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/expressions-in-makefile-preprocessing.md",
+ "redirect_url": "/cpp/build/reference/makefile-preprocessing#expressions-in-makefile-preprocessing",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/expressions-in-makefile-preprocessing.md",
+ "redirect_url": "/cpp/build/reference/makefile-preprocessing#expressions-in-makefile-preprocessing",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/executing-a-program-in-preprocessing.md",
+ "redirect_url": "/cpp/build/reference/makefile-preprocessing#executing-a-program-in-preprocessing",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/executing-a-program-in-preprocessing.md",
+ "redirect_url": "/cpp/build/reference/makefile-preprocessing#executing-a-program-in-preprocessing",
"redirect_document_id": false
},
{
"source_path": "docs/build/makefile-preprocessing.md",
- "redirect_url": "/cpp/build/reference/expressions-in-makefile-preprocessing",
+ "redirect_url": "/cpp/build/reference/makefile-preprocessing",
"redirect_document_id": false
},
{
@@ -492,7 +657,12 @@
},
{
"source_path": "docs/build/multiple-inline-files.md",
- "redirect_url": "/cpp/build/reference/multiple-inline-files",
+ "redirect_url": "/cpp/build/reference/inline-files-in-a-makefile#multiple-inline-files",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/multiple-inline-files.md",
+ "redirect_url": "/cpp/build/reference/inline-files-in-a-makefile#multiple-inline-files",
"redirect_document_id": false
},
{
@@ -522,22 +692,42 @@
},
{
"source_path": "docs/build/null-and-undefined-macros.md",
- "redirect_url": "/cpp/build/reference/null-and-undefined-macros",
+ "redirect_url": "/cpp/build/reference/defining-an-nmake-macro#null-and-undefined-macros",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/null-and-undefined-macros.md",
+ "redirect_url": "/cpp/build/reference/defining-an-nmake-macro#null-and-undefined-macros",
"redirect_document_id": false
},
{
"source_path": "docs/build/precedence-in-inference-rules.md",
- "redirect_url": "/cpp/build/reference/precedence-in-inference-rules",
+ "redirect_url": "/cpp/build/reference/inference-rules#precedence-in-inference-rules",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/precedence-in-inference-rules.md",
+ "redirect_url": "/cpp/build/reference/inference-rules#precedence-in-inference-rules",
"redirect_document_id": false
},
{
"source_path": "docs/build/precedence-in-macro-definitions.md",
- "redirect_url": "/cpp/build/reference/precedence-in-macro-definitions",
+ "redirect_url": "/cpp/build/reference/defining-an-nmake-macro#precedence-in-macro-definitions",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/precedence-in-macro-definitions.md",
+ "redirect_url": "/cpp/build/reference/defining-an-nmake-macro#precedence-in-macro-definitions",
"redirect_document_id": false
},
{
"source_path": "docs/build/predefined-rules.md",
- "redirect_url": "/cpp/build/reference/predefined-rules",
+ "redirect_url": "/cpp/build/reference/inference-rules#predefined-rules",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/predefined-rules.md",
+ "redirect_url": "/cpp/build/reference/inference-rules#predefined-rules",
"redirect_document_id": false
},
{
@@ -557,12 +747,22 @@
},
{
"source_path": "docs/build/recursion-macros.md",
- "redirect_url": "/cpp/build/reference/recursion-macros",
+ "redirect_url": "/cpp/build/reference/special-nmake-macros#recursion-macros",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/recursion-macros.md",
+ "redirect_url": "/cpp/build/reference/special-nmake-macros#recursion-macros",
"redirect_document_id": false
},
{
"source_path": "docs/build/reusing-inline-files.md",
- "redirect_url": "/cpp/build/reference/reusing-inline-files",
+ "redirect_url": "/cpp/build/reference/inline-files-in-a-makefile#reusing-inline-files",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/reusing-inline-files.md",
+ "redirect_url": "/cpp/build/reference/inline-files-in-a-makefile#reusing-inline-files",
"redirect_document_id": false
},
{
@@ -587,17 +787,37 @@
},
{
"source_path": "docs/build/search-paths-in-rules.md",
- "redirect_url": "/cpp/build/reference/search-paths-in-rules",
+ "redirect_url": "/cpp/build/reference/inference-rules#search-paths-in-rules",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/search-paths-in-rules.md",
+ "redirect_url": "/cpp/build/reference/inference-rules#search-paths-in-rules",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/setting-the-path-and-environment-variables-for-command-line-builds.md",
+ "redirect_url": "/cpp/build/building-on-the-command-line",
"redirect_document_id": false
},
{
"source_path": "docs/build/special-characters-in-a-makefile.md",
- "redirect_url": "/cpp/build/reference/special-characters-in-a-makefile",
+ "redirect_url": "/cpp/build/reference/contents-of-a-makefile#special-characters-in-a-makefile",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/special-characters-in-a-makefile.md",
+ "redirect_url": "/cpp/build/reference/contents-of-a-makefile#special-characters-in-a-makefile",
"redirect_document_id": false
},
{
"source_path": "docs/build/special-characters-in-macros.md",
- "redirect_url": "/cpp/build/reference/special-characters-in-macros",
+ "redirect_url": "/cpp/build/reference/defining-an-nmake-macro#special-characters-in-macros",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/special-characters-in-macros.md",
+ "redirect_url": "/cpp/build/reference/defining-an-nmake-macro#special-characters-in-macros",
"redirect_document_id": false
},
{
@@ -607,7 +827,12 @@
},
{
"source_path": "docs/build/specifying-an-inline-file.md",
- "redirect_url": "/cpp/build/reference/specifying-an-inline-file",
+ "redirect_url": "/cpp/build/reference/inline-files-in-a-makefile#specifying-an-inline-file",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/specifying-an-inline-file.md",
+ "redirect_url": "/cpp/build/reference/inline-files-in-a-makefile#specifying-an-inline-file",
"redirect_document_id": false
},
{
@@ -640,6 +865,21 @@
"redirect_url": "/cpp/build/reference/running-nmake",
"redirect_document_id": false
},
+ {
+ "source_path": "docs/build/manifest-generation-in-visual-studio.md",
+ "redirect_url": "/cpp/build/understanding-manifest-generation-for-c-cpp-programs#manifest-generation-in-visual-studio",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/manifest-generation-at-the-command-line.md",
+ "redirect_url": "/cpp/build/understanding-manifest-generation-for-c-cpp-programs#manifest-generation-at-the-command-line",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/how-to-embed-a-manifest-inside-a-c-cpp-application.md",
+ "redirect_url": "/cpp/build/understanding-manifest-generation-for-c-cpp-programs#how-to-embed-a-manifest-inside-a-c-cpp-application",
+ "redirect_document_id": false
+ },
{
"source_path": "docs/build/unwind-data-for-exception-handling-debugger-support.md",
"redirect_url": "/cpp/build/exception-handling-x64",
@@ -650,9 +890,39 @@
"redirect_url": "/cpp/build/reference/using-an-nmake-macro",
"redirect_document_id": false
},
+ {
+ "source_path": "docs/build/vcpkg.md",
+ "redirect_url": "https://vcpkg.io/",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/install-vcpkg.md",
+ "redirect_url": "https://vcpkg.io/",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/integrate-vcpkg.md",
+ "redirect_url": "https://vcpkg.io/",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/manage-libraries-with-vcpkg.md",
+ "redirect_url": "https://vcpkg.io/",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/vcpkg-command-line-reference.md",
+ "redirect_url": "https://vcpkg.io/",
+ "redirect_document_id": false
+ },
{
"source_path": "docs/build/where-to-define-macros.md",
- "redirect_url": "/cpp/build/reference/where-to-define-macros",
+ "redirect_url": "/cpp/build/reference/defining-an-nmake-macro#where-to-define-macros",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/build/reference/where-to-define-macros.md",
+ "redirect_url": "/cpp/build/reference/defining-an-nmake-macro#where-to-define-macros",
"redirect_document_id": false
},
{
@@ -700,6 +970,46 @@
"redirect_url": "/cpp/build-insights/reference/wpa-views",
"redirect_document_id": false
},
+ {
+ "source_path": "docs/c-language/generic_selection.md",
+ "redirect_url": "/cpp/c-language/generic-selection",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/c-language/operators-c.md",
+ "redirect_url": "/cpp/c-language/lexical-grammar",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/c-language/punctuators.md",
+ "redirect_url": "/cpp/c-language/lexical-grammar",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/c-language/summary-of-constants.md",
+ "redirect_url": "/cpp/c-language/lexical-grammar",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/c-language/summary-of-identifiers.md",
+ "redirect_url": "/cpp/c-language/lexical-grammar",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/c-language/summary-of-keywords.md",
+ "redirect_url": "/cpp/c-language/lexical-grammar",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/c-language/summary-of-string-literals.md",
+ "redirect_url": "/cpp/c-language/lexical-grammar",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/c-language/summary-of-tokens.md",
+ "redirect_url": "/cpp/c-language/lexical-grammar",
+ "redirect_document_id": false
+ },
{
"source_path": "docs/cloud/index.md",
"redirect_url": "/cpp/cloud/cloud-and-web-programming-in-visual-cpp",
@@ -755,6 +1065,16 @@
"redirect_url": "/cpp/cpp/attributes",
"redirect_document_id": false
},
+ {
+ "source_path": "docs/cpp/bstr-t-member-functions.md",
+ "redirect_url": "/cpp/cpp/bstr-t-class",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/cpp/bstr-t-operators.md",
+ "redirect_url": "/cpp/cpp/bstr-t-class",
+ "redirect_document_id": false
+ },
{
"source_path": "docs/cpp/character-sets2.md",
"redirect_url": "/cpp/cpp/character-sets",
@@ -1060,11 +1380,6 @@
"redirect_url": "/cpp/get-started/tutorial-console-cpp",
"redirect_document_id": false
},
- {
- "source_path": "docs/get-started/index.yml",
- "redirect_url": "/cpp/get-started/tutorial-console-cpp",
- "redirect_document_id": false
- },
{
"source_path": "docs/ide/adding-references-in-visual-cpp-projects.md",
"redirect_url": "/cpp/build/adding-references-in-visual-cpp-projects",
@@ -7121,7 +7436,7 @@
"redirect_document_id": false
},
{
- "source_path": "docs/dotnet/how-to-enumerate-data-types-in-assemblies-using-reflection-cpp-cli.md.md",
+ "source_path": "docs/dotnet/how-to-enumerate-data-types-in-assemblies-using-reflection-cpp-cli.md",
"redirect_url": "/cpp/dotnet/reflection-cpp-cli#enumerate",
"redirect_document_id": false
},
@@ -7435,6 +7750,21 @@
"redirect_url": "/cpp/error-messages/compiler-errors-2/compiler-errors-c2500-through-c2599",
"redirect_document_id": false
},
+ {
+ "source_path": "docs/error-messages/compiler-errors-1/fatal-error-c999.md",
+ "redirect_url": "/cpp/error-messages/compiler-errors-1/c-cpp-build-errors",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/error-messages/compiler-errors-1/fatal-error-c1000-c1999.md",
+ "redirect_url": "/cpp/error-messages/compiler-errors-1/c-cpp-build-errors",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/error-messages/compiler-warnings/compiler-warning-level-1-c4999.md",
+ "redirect_url": "/cpp/error-messages/compiler-errors-1/c-cpp-build-errors",
+ "redirect_document_id": false
+ },
{
"source_path": "docs/error-messages/compiler-warnings/index.md",
"redirect_url": "/cpp/error-messages/compiler-warnings/compiler-warnings-c4000-through-c4199",
@@ -8377,12 +8707,12 @@
},
{
"source_path": "docs/windows/editing-properties-for-an-activex-control.md",
- "redirect_url": "/cpp/windows/viewing-and-adding-activex-controls-to-a-dialog-box",
+ "redirect_url": "/cpp/windows/adding-editing-or-deleting-controls",
"redirect_document_id": false
},
{
"source_path": "docs/windows/insert-activex-control-dialog-box.md",
- "redirect_url": "/cpp/windows/viewing-and-adding-activex-controls-to-a-dialog-box",
+ "redirect_url": "/cpp/windows/adding-editing-or-deleting-controls",
"redirect_document_id": false
},
{
@@ -8607,42 +8937,42 @@
},
{
"source_path": "docs/windows/creating-a-new-toolbar-button.md",
- "redirect_url": "/cpp/windows/creating-moving-and-editing-toolbar-buttons",
+ "redirect_url": "/cpp/windows/toolbar-editor",
"redirect_document_id": false
},
{
"source_path": "docs/windows/moving-a-toolbar-button.md",
- "redirect_url": "/cpp/windows/creating-moving-and-editing-toolbar-buttons",
+ "redirect_url": "/cpp/windows/toolbar-editor",
"redirect_document_id": false
},
{
"source_path": "docs/windows/copying-buttons-from-a-toolbar.md",
- "redirect_url": "/cpp/windows/creating-moving-and-editing-toolbar-buttons",
+ "redirect_url": "/cpp/windows/toolbar-editor",
"redirect_document_id": false
},
{
"source_path": "docs/windows/deleting-a-toolbar-button.md",
- "redirect_url": "/cpp/windows/creating-moving-and-editing-toolbar-buttons",
+ "redirect_url": "/cpp/windows/toolbar-editor",
"redirect_document_id": false
},
{
"source_path": "docs/windows/inserting-a-space-between-buttons-on-a-toolbar.md",
- "redirect_url": "/cpp/windows/creating-moving-and-editing-toolbar-buttons",
+ "redirect_url": "/cpp/windows/toolbar-editor",
"redirect_document_id": false
},
{
"source_path": "docs/windows/removing-space-between-buttons-on-a-toolbar.md",
- "redirect_url": "/cpp/windows/creating-moving-and-editing-toolbar-buttons",
+ "redirect_url": "/cpp/windows/toolbar-editor",
"redirect_document_id": false
},
{
"source_path": "docs/windows/changing-the-properties-of-a-toolbar-button.md",
- "redirect_url": "/cpp/windows/creating-moving-and-editing-toolbar-buttons",
+ "redirect_url": "/cpp/windows/toolbar-editor",
"redirect_document_id": false
},
{
"source_path": "docs/windows/toolbar-button-properties.md",
- "redirect_url": "/cpp/windows/creating-moving-and-editing-toolbar-buttons",
+ "redirect_url": "/cpp/windows/toolbar-editor",
"redirect_document_id": false
},
{
@@ -13419,6 +13749,21 @@
"source_path": "docs/parallel/openmp/a-31-thread-safe-lock-functions.md",
"redirect_url": "/cpp/parallel/openmp/a-examples#a31-thread-safe-lock-functions",
"redirect_document_id": false
+ },
+ {
+ "source_path": "docs/c-runtime-library/operator-delete-crt.md",
+ "redirect_url": "/cpp/c-runtime-library/delete-operator-crt",
+ "redirect_document_id": false
+ },
+ {
+ "source_path": "docs/c-runtime-library/operator-new-crt.md",
+ "redirect_url": "/cpp/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
new file mode 100644
index 0000000000..a5807f933e
--- /dev/null
+++ b/.whatsnew.json
@@ -0,0 +1,53 @@
+{
+ "$schema": "https://github.com/dotnet/docs-tools/blob/main/WhatsNew.Infrastructure/Configuration/reposettings.schema.json",
+ "docSetProductName": "C++, C, and Assembler",
+ "rootDirectory": "docs/",
+ "docLinkSettings": {
+ "linkFormat": "relative",
+ "relativeLinkPrefix": "../"
+ },
+ "inclusionCriteria": {
+ "minAdditionsToFile": 2,
+ "pullRequestTitlesToIgnore": [
+ "^Confirm merge from FromPublicMasterBranch",
+ "^Repo sync for protected CLA branch",
+ "^Repo sync for protected branch"
+ ],
+ "omitPullRequestTitles": false
+ },
+ "navigationOptions": {
+ "maximumNumberOfArticles": 2,
+ "tocParentNode": " ",
+ "repoTocFolder": " ",
+ "indexParentNode": " ",
+ "repoIndexFolder": " "
+ },
+ "areas": [
+ {"names": ["assembler", "intrinsics"], "heading": "C/C++ compiler intrinsics and assembly language"},
+ {"names": ["atl", "atl-mfc-shared", "mfc"], "heading": "Active Template Library (ATL), Microsoft Foundation Classes (MFC)"},
+ {"names": ["build"], "heading": "C/C++ projects and build systems"},
+ {"names": ["build-insights"], "heading": "Build insights"},
+ {"names": ["c-language"], "heading": "C language"},
+ {"names": ["cloud"], "heading": "Cloud programming with Microsoft C++"},
+ {"names": ["code-quality"], "heading": "Code quality"},
+ {"names": ["cpp"], "heading": "C++ in Visual Studio"},
+ {"names": ["cppcx"], "heading": "C++ /CX"},
+ {"names": ["cross-platform"], "heading": "Cross platform development"},
+ {"names": ["c-runtime-library"], "heading": "C runtime library"},
+ {"names": ["data"], "heading": "Data access in C/C++ in Visual Studio"},
+ {"names": ["dotnet"], "heading":"STL/CLR library reference"},
+ {"names": ["error-messages"], "heading":"C/C++ compiler and tools errors and warnings"},
+ {"names": ["extensions"], "heading":"Component extensions for .NET and UWP"},
+ {"names": ["get-started"], "heading":"C++ in Visual Studio tutorials"},
+ {"names": ["ide"], "heading":"Read and write code using C++ in Visual Studio"},
+ {"names": ["linux"], "heading":"Linux with C++ in Visual Studio"},
+ {"names": ["overview"], "heading":"C/C++ in Visual Studio overview"},
+ {"names": ["parallel"], "heading":"Parallel programming in C++ in Visual Studio"},
+ {"names": ["porting"], "heading":"C++ porting and upgrade guide"},
+ {"names": ["preprocessor"], "heading":"C/C++ preprocessor reference"},
+ {"names": ["safeint", "security"], "heading":"Security best practices for C++"},
+ {"names": ["standard-library"], "heading":"C++ Standard Template Library (STL) reference"},
+ {"names": ["text"], "heading":"Text and strings in Visual Studio C++"},
+ {"names": ["windows"], "heading":"Overview of Windows programming in C++"}
+ ]
+}
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a52d3bc599..bbfa443111 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,13 +2,13 @@
Thank you for your interest in contributing to the Visual C++ documentation!
-In this topic, you'll see the basic process for adding or updating content in the [Visual C++ documentation site](https://docs.microsoft.com/cpp).
+In this topic, you'll see the basic process for adding or updating content in the [Visual C++ documentation site](https://learn.microsoft.com/cpp/).
In this topic, we'll cover:
- [Process for contributing](#process-for-contributing)
- [DOs and DON'Ts](#dos-and-donts)
-- [Building the docs](#building-the-docs)
+- [Building the documentation](#building-the-documentation)
- [Contributing to samples](#contributing-to-samples)
- [Contributor license agreement](#contributor-license-agreement)
@@ -44,7 +44,7 @@ docs
wstring-conversion.png
```
-**Step 5:** Submit a Pull Request (PR) from your branch to `MicrosoftDocs/cpp-docs/master`.
+**Step 5:** Submit a Pull Request (PR) from your branch to `MicrosoftDocs/cpp-docs/main`.
If your PR is addressing an existing issue, add the `Fixes #Issue_Number` keyword to the commit message or PR description, so the issue can be automatically closed when the PR is merged. For more information, see [Closing issues via commit messages](https://help.github.com/articles/closing-issues-via-commit-messages/).
@@ -52,9 +52,9 @@ The Visual Studio team will review your PR and let you know if the change looks
**Step 6:** Make any necessary updates to your branch as discussed with the team.
-The maintainers will merge your PR into the master branch once feedback has been applied and your change looks good.
+The maintainers will merge your PR into the main branch once feedback has been applied and your change looks good.
-On a certain cadence, we push all commits from master branch into the live branch and then you'll be able to see your contribution live on [docs.microsoft.com](https://docs.microsoft.com/cpp/).
+On a certain cadence, we push all commits from main branch into the live branch and then you'll be able to see your contribution on [Microsoft Learn](https://learn.microsoft.com/cpp/).
## DOs and DON'Ts
@@ -70,11 +70,11 @@ Below is a short list of guiding rules that you should keep in mind when you are
> [!NOTE]
> You might notice that some of the topics are not currently following all the guidelines specified here and on the [style guide](./styleguide/template.md) as well. We're working towards achieving consistency throughout the site. Check the list of [open issues](https://github.com/MicrosoftDocs/cpp-docs/issues?q=is%3Aissue+is%3Aopen+label%3Aguidelines-adherence) we're currently tracking for that specific goal.
-## Building the docs
+## Building the documentation
-The documentation is written in [GitHub Flavored Markdown](https://help.github.com/categories/writing-on-github/) and built using [DocFX](https://dotnet.github.io/docfx/) and other internal publishing/building tools. It is hosted at [docs.microsoft.com](https://docs.microsoft.com/).
+The documentation is written in [GitHub-Flavored Markdown](https://help.github.com/categories/writing-on-github/) and built using [DocFX](https://dotnet.github.io/docfx/) and other internal publishing and build tools. It's published to [Microsoft Learn](https://learn.microsoft.com/).
-If you want to build the docs locally, you need to install [DocFX](https://dotnet.github.io/docfx/); latest versions are the best.
+If you want to build the documentation locally, you need to install the latest version of [DocFX](https://dotnet.github.io/docfx/).
There are several ways to use DocFX, and most of them are covered in the [DocFX getting started guide](https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html). The following instructions use the [command-line based](https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html#2-use-docfx-as-a-command-line-tool) version of the tool. If you are comfortable with other ways listed on the link above, feel free to use those.
@@ -94,6 +94,6 @@ For now, include required sample code as inline code blocks in your article. The
## Contributor license agreement
-You must sign the [Contribution License Agreement (CLA)](LICENSE) before your PR is merged. This is a one-time requirement for projects in docs.microsoft.com. You can read more about [Contribution License Agreements (CLA)](https://en.wikipedia.org/wiki/Contributor_License_Agreement) on Wikipedia.
+You must sign the [Contribution License Agreement (CLA)](LICENSE) before your PR is merged. This is a one-time requirement for projects on Microsoft Learn. You can read more about [Contribution License Agreements (CLA)](https://en.wikipedia.org/wiki/Contributor_License_Agreement) on Wikipedia.
You don't have to sign the agreement up-front. You can clone, fork, and submit your PR as usual. When your PR is created, it is classified by a CLA bot. If the change is trivial (for example, you fixed a typo), then the PR is labeled with CLA-not-required. Otherwise, it's classified as CLA-required. Once you signed the CLA, the current and all future pull requests are labeled as CLA-signed.
diff --git a/README.md b/README.md
index a02389709b..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://docs.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 to docs.microsoft.com, see the [Microsoft Docs contributor guide overview](https://docs.microsoft.com/contribute). For details on how to make a contribution to the MSVC documentation, see the [Contributing guide](CONTRIBUTING.md).
+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/SECURITY.md b/SECURITY.md
new file mode 100644
index 0000000000..675ad2a215
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,41 @@
+
+
+## Security
+
+Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, such as [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), and [our GitHub organizations](https://opensource.microsoft.com/).
+
+If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
+
+## Reporting Security Issues
+
+**Please do not report security vulnerabilities through public GitHub issues.**
+
+Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
+
+If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
+
+You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
+
+Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
+
+ * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
+ * Full paths of source file(s) related to the manifestation of the issue
+ * The location of the affected source code (tag/branch/commit or direct URL)
+ * Any special configuration required to reproduce the issue
+ * Step-by-step instructions to reproduce the issue
+ * Proof-of-concept or exploit code (if possible)
+ * Impact of the issue, including how an attacker might exploit the issue
+
+This information will help us triage your report more quickly.
+
+If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
+
+## Preferred Languages
+
+We prefer all communications to be in English.
+
+## Policy
+
+Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
+
+
diff --git a/ThirdPartyNotices b/ThirdPartyNotices
index a0bd09d68f..faceb5a528 100644
--- a/ThirdPartyNotices
+++ b/ThirdPartyNotices
@@ -7,7 +7,7 @@ see the [LICENSE](LICENSE) file, and grant you a license to any code in the repo
Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation
may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries.
The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks.
-Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.
+Microsoft's general trademark guidelines can be found at https://go.microsoft.com/fwlink/?LinkID=254653.
Privacy information can be found at https://privacy.microsoft.com/en-us/
diff --git a/docs/_breadcrumb/toc.yml b/docs/_breadcrumb/toc.yml
index ff29580110..363d1dad6b 100644
--- a/docs/_breadcrumb/toc.yml
+++ b/docs/_breadcrumb/toc.yml
@@ -1,125 +1,3 @@
-- name: Docs
- tocHref: /
- topicHref: /
- items:
- - name: Microsoft C++, C, and Assembler
- tocHref: /cpp/
- topicHref: /cpp/index
- items:
- - name: Compiler intrinsics and assembly language
- tocHref: /cpp/intrinsics/
- topicHref: /cpp/intrinsics/index
- items:
- - name: Compiler intrinsics
- tocHref: /cpp/intrinsics/
- topicHref: /cpp/intrinsics/compiler-intrinsics
- - name: ARM and ARM64 assembler
- tocHref: /cpp/assembler/arm/
- topicHref: /cpp/assembler/arm/arm-assembler-reference
- - name: C/C++ x86 inline assembler
- tocHref: /cpp/assembler/inline/
- topicHref: /cpp/assembler/inline/inline-assembler
- - name: x86 and x64 assembler
- tocHref: /cpp/assembler/masm/
- topicHref: /cpp/assembler/masm/microsoft-macro-assembler-reference
- - name: ATL
- tocHref: /cpp/atl/
- topicHref: /cpp/atl/atl-com-desktop-components
- - name: ATL/MFC shared classes
- tocHref: /cpp/atl-mfc-shared/
- topicHref: /cpp/atl-mfc-shared/atl-mfc-shared-classes
- items:
- - name: ATL/MFC reference
- tocHref: /cpp/atl-mfc-shared/reference/
- topicHref: /cpp/atl-mfc-shared/reference/classes-shared-by-mfc-and-atl
- - name: Build C/C++ projects
- tocHref: /cpp/build/
- topicHref: /cpp/build/building-c-cpp-programs
- items:
- - name: Build reference
- tocHref: /cpp/build/reference/
- topicHref: /cpp/build/reference/c-cpp-building-reference
- - name: Build insights
- tocHref: /cpp/build-insights/
- topicHref: /cpp/build-insights/index
- - name: C language
- tocHref: /cpp/c-language/
- topicHref: /cpp/c-language/index
- - name: C runtime library
- tocHref: /cpp/c-runtime-library/
- topicHref: /cpp/c-runtime-library/c-run-time-library-reference
- items:
- - name: UCRT reference
- tocHref: /cpp/c-runtime-library/reference/
- topicHref: /cpp/c-runtime-library/reference/crt-alphabetical-function-reference
- - name: Cloud and web
- tocHref: /cpp/cloud/
- topicHref: /cpp/cloud/cloud-and-web-programming-in-visual-cpp
- - name: Code analysis
- tocHref: /cpp/code-quality/
- topicHref: /cpp/code-quality/index
- - name: C++ language
- tocHref: /cpp/cpp/
- topicHref: /cpp/cpp/index
- - name: C++/CX
- tocHref: /cpp/cppcx/
- topicHref: /cpp/cppcx/visual-c-language-reference-c-cx
- - name: Cross-platform mobile development
- tocHref: /cpp/cross-platform/
- topicHref: /cpp/cross-platform/index
- - name: Data access
- tocHref: /cpp/data/
- topicHref: /cpp/data/data-access-in-cpp
- items:
- - name: OLEDB
- tocHref: /cpp/data/oledb/
- topicHref: /cpp/data/oledb/ole-db-programming
- - name: ODBC
- tocHref: /cpp/data/odbc/
- topicHref: /cpp/data/odbc/open-database-connectivity-odbc
- - name: C++/CLI for .NET
- tocHref: /cpp/dotnet/
- topicHref: /cpp/dotnet/dotnet-programming-with-cpp-cli-visual-cpp
- - name: Errors and warnings
- tocHref: /cpp/error-messages/
- topicHref: /cpp/error-messages/compiler-errors-1/c-cpp-build-errors
- - name: Edit, navigate, and refactor code
- tocHref: /cpp/ide/
- topicHref: /cpp/ide/read-and-understand-code-cpp
- - name: Linux
- tocHref: /cpp/linux/
- topicHref: /cpp/linux/index
- - name: Linux
- tocHref: /cpp/build/configure-cmake-debugging-sessions
- topicHref: /cpp/linux/index
- - name: MFC
- tocHref: /cpp/mfc/
- topicHref: /cpp/mfc/mfc-desktop-applications
- items:
- - name: MFC reference
- tocHref: /cpp/mfc/reference/
- topicHref: /cpp/mfc/reference/mfc-classes
- - name: Microsoft C/C++
- tocHref: /cpp/overview/
- topicHref: /cpp/overview/visual-cpp-in-visual-studio
- - name: Parallel programming
- tocHref: /cpp/parallel/
- topicHref: /cpp/parallel/parallel-programming-in-visual-cpp
- - name: Porting and upgrading
- tocHref: /cpp/porting/
- topicHref: /cpp/porting/visual-cpp-porting-and-upgrading-guide
- - name: C/C++ preprocessor
- tocHref: /cpp/preprocessor/
- topicHref: /cpp/preprocessor/c-cpp-preprocessor-reference
- - name: Security
- tocHref: /cpp/security/
- topicHref: /cpp/security/security-best-practices-for-cpp
- - name: C++ standard library
- tocHref: /cpp/standard-library/
- topicHref: /cpp/standard-library/cpp-standard-library-reference
- - name: Text and strings
- tocHref: /cpp/text/
- topicHref: /cpp/text/text-and-strings-in-visual-cpp
- - name: Windows
- tocHref: /cpp/windows/
- topicHref: /cpp/windows/overview-of-windows-programming-in-cpp
+- name: C++, C, and Assembler
+ tocHref: /cpp/
+ topicHref: /cpp/index
diff --git a/docs/assembler/arm/arm-assembler-command-line-reference.md b/docs/assembler/arm/arm-assembler-command-line-reference.md
index 527a475f65..6c79ceaf15 100644
--- a/docs/assembler/arm/arm-assembler-command-line-reference.md
+++ b/docs/assembler/arm/arm-assembler-command-line-reference.md
@@ -1,78 +1,119 @@
---
title: "ARM Assembler command-line reference"
description: "Reference guide to the Microsoft ARM assembler command-line options."
-ms.date: "02/09/2020"
-ms.assetid: f7b89478-1ab5-4995-8cde-a805f0462c45
+ms.date: 05/09/2022
---
# ARM Assembler command-line reference
-This article provides command-line information about the Microsoft ARM assembler, **armasm**. **armasm** assembles ARMv7 Thumb assembly language into the Microsoft implementation of the Common Object File Format (COFF). The linker can link COFF code objects produced by both the ARM assembler and the C compiler. It can link either together with object libraries created by the librarian.
+The Microsoft ARM assemblers, **armasm** and **armasm64**, support several command-line options. By default, **armasm** assembles ARMv7 Thumb assembly language into the Microsoft implementation of the Common Object File Format (COFF). The **armasm64** assembler creates COFF object code for ARM64 and ARM64EC targets. The linker can link COFF code objects produced by both the ARM assembler and the C/C++ compiler. It can link either together with object libraries created by the librarian.
## Syntax
> **`armasm`** [*options*] *source_file* *object_file*\
-> **`armasm`** [*options*] **`-o`** *object_file* *source_file*
+> **`armasm`** [*options*] *source_file*
+
+> **`armasm64`** [*options*] *source_file* *object_file*\
+> **`armasm64`** [*options*] *source_file*
### Parameters
*options*\
A combination of zero or more of the following options:
+- **`-16`**\
+ Available only in **armasm**. Assemble source as 16-bit Thumb instructions. This option is the default.
+
+- **`-32`**\
+ Available only in **armasm**. Assemble source as 32-bit ARM instructions.
+
+- **`-coff_thumb2_only`**\
+ Available only in **armasm**. Allow only Thumb-2 code.
+
+- **`-errorReport:`** *option*\
+ This option is deprecated. In Windows Vista and later, error reporting is controlled by [Windows Error Reporting (WER)](/windows/win32/wer/windows-error-reporting) settings.
+
- **`-errors`** *filename*\
- Redirect error and warning messages to *filename*.
+ **`-e`** *filename*\
+ Redirect error and warning messages to *filename*. By default, these messages are sent to `stdout`.
-- **`-i`** *dir*[**`;`**dir]\
- Add the specified directories to the include search path.
+- **`-funcOverride:`** *function_name*\
+ Available only in **armasm64**. Emit function overriding support for *function_name*.
-- **`-predefine`** *directive*\
- Specify a SETA, SETL, or SETS directive to predefine a symbol.\
- Example: `armasm.exe -predefine "COUNT SETA 150" source.asm`\
- For more information, see the [ARM Compiler armasm Reference Guide](http://infocenter.arm.com/help/topic/com.arm.doc.dui0802b/index.html).
+- **`-g`**\
+ Generate debugging information.
-- **`-nowarn`**\
- Disable all warning messages.
+- **`-gh:SHA1`**\
+ Use the SHA-1 cryptographic hash algorithm to generate a checksum of each source file in debug info. Overrides **`-gh:SHA256`**.
-- **`-ignore`** *warning*\
- Disable the specified warning. For possible values, see the section about warnings.
+- **`-gh:SHA256`**\
+ Use the SHA-256 cryptographic hash algorithm to generate a checksum of each source file in debug info. This option is on by default in Visual Studio 2022 version 17.0 and later.
+
+- **`-guard:ehcont`**[**`-`**]\
+ Generate a sorted list of the relative virtual addresses (RVA) of all the valid exception handling continuation targets for a binary. It's used at runtime for `NtContinue` and `SetThreadContext` instruction pointer validation. By default, **`-guard:ehcont`** is off and must be explicitly enabled. To explicitly disable this option, use **`-guard:ehcont-`**. This option is available in Visual Studio 2019 version 16.7 and later. The feature is supported for 64-bit processes on a 64-bit OS.
- **`-help`**\
- Print the command-line help message.
+ **`-h`**\
+ Print the command-line help message.
+
+- **`-i`** *dir*[**`;`** *dir*]\
+ Add one or more specified directories to the include search path. Separate directories by using a semi-colon (`;`).
+
+- **`-ignore`** *warning_number*\
+ Disable the specified warning number. For possible values, see [ARM Assembler diagnostic messages](arm-assembler-diagnostic-messages.md).
+
+- **`-list`** *list_file*\
+ Create a detailed listing of the generated assembly language to *list_file*. The *list_file* parameter is optional. If it's omitted, the assembler appends *`.lst`* to the base name of *source_file* to create the listing file.
- **`-machine`** *machine*\
- Specify the machine type to set in the PE header. Possible values for *machine* are:\
- **ARM**—Sets the machine type to IMAGE_FILE_MACHINE_ARMNT. This option is the default.\
- **THUMB**—Sets the machine type to IMAGE_FILE_MACHINE_THUMB.
+ Specify the machine type to set in the PE header. In **armasm**, possible values for *machine* are:
+ - **ARM**—Sets the machine type to `IMAGE_FILE_MACHINE_ARMNT`. This option is the default.
+ - **THUMB**—Sets the machine type to `IMAGE_FILE_MACHINE_THUMB`.
-- **`-oldit`**\
- Generate ARMv7-style IT blocks. By default, ARMv8-compatible IT blocks are generated.
+ In **armasm64**, possible values are:
+ - **ARM64**—Sets the machine type to `IMAGE_FILE_MACHINE_ARM64`. This option is the default.
+ - **ARM64EC**—Sets the machine type to `IMAGE_FILE_MACHINE_ARM64EC`.
-- **`-via`** *filename*\
- Read additional command-line arguments from *filename*.
+- **`-noesc`**\
+ **`-noe`**\
+ Ignore C-style escaped special characters, such as `\n` or `\t`.
-- **`-16`**\
- Assemble source as 16-bit Thumb instructions. This option is the default.
+- **`-nologo`**\
+ Suppress the copyright banner.
-- **`-32`**\
- Assemble source as 32-bit ARM instructions.
+- **`-nowarn`**\
+ **`-now`**\
+ Disable all warning messages.
-- **`-g`**\
- Generate debugging information.
+- **`-o`** *object_file*\
+ Specify the name of the object (output) file. The **`-o`** option is optional; you can instead specify an object file name as the last element of the command line.
-- **`-errorReport:`** *option*\
- This option is deprecated. Starting in Windows Vista, error reporting is controlled by [Windows Error Reporting (WER)](/windows/win32/wer/windows-error-reporting) settings.
+- **`-oldit`**\
+ Available only in **armasm**. Generate ARMv7-style IT blocks. By default, ARMv8-compatible IT blocks are generated.
+
+- **`-predefine`** *directive*\
+ **`-pd`** *directive*\
+ Specify a SETA, SETL, or SETS directive to predefine a symbol.\
+ Example: `armasm.exe -predefine "COUNT SETA 150" source.asm`\
+ 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/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*.
*source_file*\
The name of the source file.
*object_file*\
-The name of the object (output) file.
+The last element of the command line can specify the name of the object (output) file. If it's omitted, and no **`-o`** option is specified, the assembler appends *`.obj`* to the base name of *source_file* to create the object file.
## Remarks
The following example demonstrates how to use armasm in a typical scenario. First, use armasm to build an assembly language source (.asm) file to an object (.obj) file. Then, use the CL command-line C compiler to compile a source (.c) file, and also specify the linker option to link the ARM object file.
```cmd
-armasm myasmcode.asm -o myasmcode.obj
+armasm -o myasmcode.obj myasmcode.asm
cl myccode.c /link myasmcode.obj
```
diff --git a/docs/assembler/arm/arm-assembler-diagnostic-messages.md b/docs/assembler/arm/arm-assembler-diagnostic-messages.md
index 0fbed68456..ebe3253ac4 100644
--- a/docs/assembler/arm/arm-assembler-diagnostic-messages.md
+++ b/docs/assembler/arm/arm-assembler-diagnostic-messages.md
@@ -1,23 +1,24 @@
---
+description: "Learn more about: ARM Assembler diagnostic messages"
title: "ARM Assembler diagnostic messages"
-ms.date: "08/30/2018"
+ms.date: 05/09/2022
f1_keywords: ["A2193", "A2196", "A2202", "A2513", "A2557", "A4228", "A4508", "A4509"]
helpviewer_keywords: ["A2193", "A2196", "A2202", "A2513", "A2557", "A4228", "A4508", "A4509"]
ms.assetid: 52b38267-6023-4bdc-a0ef-863362f48eec
---
# ARM Assembler diagnostic messages
-The Microsoft ARM assembler (*armasm*) emits diagnostic warnings and errors when it encounters them. This article describes the most commonly-encountered messages.
+The Microsoft ARM assemblers, **armasm** and **armasm64**, emit diagnostic warnings and errors when they encounter them. This article describes the most commonly encountered messages.
## Syntax
-> filename**(**line-number**) :** \[**error**|**warning**] **A**number**:** *message*
+> *filename* **(** *line-number* **) :** \[**error**|**warning**] **A** *number* **:** *message*
## Diagnostic messages - Errors
> A2193: this instruction generates unpredictable behavior
-The ARM architecture cannot guarantee what happens when this instruction is executed. For details about the well-defined forms of this instruction, consult the [ARM Architecture Reference Manual](https://go.microsoft.com/fwlink/p/?linkid=246464).
+The ARM architecture can't guarantee what happens when this instruction is executed. For details about the well-defined forms of this instruction, consult the [ARM Architecture Reference Manual](https://go.microsoft.com/fwlink/p/?linkid=246464).
```asm
ADD r0, r8, pc ; A2193: this instruction generates unpredictable behavior
@@ -25,22 +26,22 @@ The ARM architecture cannot guarantee what happens when this instruction is exec
> A2196: instruction cannot be encoded in 16 bits
-The specified instruction cannot be encoded as a 16-bit Thumb instruction. Specify a 32-bit instruction, or rearrange code to bring the target label into the range of a 16-bit instruction.
+The specified instruction can't be encoded as a 16-bit Thumb instruction. Specify a 32-bit instruction, or rearrange code to bring the target label into the range of a 16-bit instruction.
The assembler may attempt to encode a branch in 16 bits and fail with this error, even though a 32-bit branch is encodable. You can solve this problem by using the `.W` specifier to explicitly mark the branch as 32-bit.
```asm
- ADD.N r0, r1, r2 ; A2196: instruction cannot be encoded in 16 bits
+ ADD.N r0, r1, r2 ; A2196: instruction can't be encoded in 16 bits
B.W label ; OK
- B.N label ; A2196: instruction cannot be encoded in 16 bits
+ B.N label ; A2196: instruction can't be encoded in 16 bits
SPACE 10000
label
```
> A2202: Pre-UAL instruction syntax not allowed in THUMB region
-Thumb code must use the Unified Assembler Language (UAL) syntax. The old syntax is no longer accepted
+Thumb code must use the Unified Assembler Language (UAL) syntax. The old syntax is no longer accepted
```asm
ADDEQS r0, r1 ; A2202: Pre-UAL instruction syntax not allowed in THUMB region
@@ -49,7 +50,7 @@ Thumb code must use the Unified Assembler Language (UAL) syntax. The old syntax
> A2513: Rotation must be even
-In ARM mode, there is an alternate syntax for specifying constants. Instead of writing `#`, you can write `#,#`, which represents the constant value that is obtained by rotating the value `` right by ``. When you use this syntax, you must make the value of `` even.
+In ARM mode, there's an alternate syntax for specifying constants. Instead of writing `#`, you can write `#,#`, which represents the constant value that's obtained by rotating the value `` right by ``. When you use this syntax, you must make the value of `` even.
```asm
MOV r0, #4, #2 ; OK
@@ -58,7 +59,7 @@ In ARM mode, there is an alternate syntax for specifying constants. Instead of
> A2557: Incorrect number of bytes to write back
-On the NEON structure load and store instructions (`VLDn`, `VSTn`), there is an alternate syntax for specifying writeback to the base register. Instead of putting an exclamation point (!) after the address, you can specify an immediate value that indicates the offset to be added to the base register. If you use this syntax, you must specify the exact number of bytes that were loaded or stored by the instruction.
+On the NEON structure load and store instructions (`VLDn`, `VSTn`), there's an alternate syntax for specifying writeback to the base register. Instead of putting an exclamation point (!) after the address, you can specify an immediate value that indicates the offset to be added to the base register. If you use this syntax, you must specify the exact number of bytes that were loaded or stored by the instruction.
```asm
VLD1.8 {d0-d3}, [r0]! ; OK
@@ -70,9 +71,9 @@ On the NEON structure load and store instructions (`VLDn`, `VSTn`), there is an
> A4228: Alignment value exceeds AREA alignment; alignment not guaranteed
-The alignment that is specified in an `ALIGN` directive is greater than the alignment of the enclosing `AREA`. As a result, the assembler cannot guarantee that the `ALIGN` directive will be honored.
+The alignment that's specified in an `ALIGN` directive is greater than the alignment of the enclosing `AREA`. As a result, the assembler can't guarantee that the `ALIGN` directive will be honored.
-To fix this, you can specify on the `AREA` directive an `ALIGN` attribute that is equal to or greater than the desired alignment.
+To fix this warning, you can specify on the `AREA` directive an `ALIGN` attribute that's equal to or greater than the desired alignment.
```asm
AREA |.myarea1|
@@ -84,7 +85,7 @@ ALIGN 8 ; OK
> A4508: Use of this rotated constant is deprecated
-In ARM mode, there is an alternate syntax for specifying constants. Instead of writing `#`, you can write `#,#`, which represents the constant value that is obtained by rotating the value `` right by ``. In some contexts, ARM has deprecated the use of these rotated constants. In these cases, use the basic `#` syntax instead.
+In ARM mode, there's an alternate syntax for specifying constants. Instead of writing `#`, you can write `#,#`, which represents the constant value that's obtained by rotating the value `` right by ``. In some contexts, ARM has deprecated the use of these rotated constants. In these cases, use the basic `#` syntax instead.
```asm
ANDS r0, r0, #1 ; OK
@@ -95,7 +96,7 @@ In ARM mode, there is an alternate syntax for specifying constants. Instead of
This form of conditional instruction has been deprecated by ARM in the ARMv8 architecture. We recommend that you change the code to use conditional branches. To see which conditional instructions are still supported, consult the [ARM Architecture Reference Manual](https://go.microsoft.com/fwlink/p/?linkid=246464).
-This warning is not emitted when the **-oldit** command-line switch is used.
+This warning isn't emitted when the **`-oldit`** command-line switch is used.
```asm
ADDEQ r0, r1, r8 ; A4509: This form of conditional instruction is deprecated
diff --git a/docs/assembler/arm/arm-assembler-directives.md b/docs/assembler/arm/arm-assembler-directives.md
index df7457cd0e..0dd3001b16 100644
--- a/docs/assembler/arm/arm-assembler-directives.md
+++ b/docs/assembler/arm/arm-assembler-directives.md
@@ -1,121 +1,122 @@
---
+description: "Learn more about: ARM Assembler Directives"
title: "ARM Assembler Directives"
ms.date: "08/30/2018"
ms.assetid: 9cfa8896-ec10-4e77-855a-3135c40d7d2a
---
# ARM Assembler Directives
-For the most part, the Microsoft ARM assembler uses the ARM assembly language, which is documented in the [ARM Compiler armasm Reference Guide](http://infocenter.arm.com/help/topic/com.arm.doc.dui0802b/index.html). However, the Microsoft implementations of some assembly directives differ from the ARM assembly directives. This article explains the differences.
+Generally, the Microsoft ARM assembler uses the ARM assembly language, which is documented in the [ARM Compiler armasm Reference Guide](https://developer.arm.com/documentation/dui0802/latest/). However, the Microsoft implementations of some assembly directives differ from the ARM assembly directives. This article explains the differences.
## Microsoft Implementations of ARM Assembly Directives
-- AREA
+- `AREA`
The Microsoft ARM assembler supports these `AREA` attributes: `ALIGN`, `CODE`, `CODEALIGN`, `DATA`, `NOINIT`, `READONLY`, `READWRITE`, `THUMB`, `ARM`.
- All except `THUMB` and `ARM` work as documented in the [ARM Compiler armasm Reference Guide](http://infocenter.arm.com/help/topic/com.arm.doc.dui0802b/index.html).
+ All except `THUMB` and `ARM` work as documented in the [ARM Compiler armasm Reference Guide](https://developer.arm.com/documentation/dui0802/latest/).
In the Microsoft ARM assembler, `THUMB` indicates that a `CODE` section contains Thumb code, and is the default for `CODE` sections. `ARM` indicates that the section contains ARM code.
-- ATTR
+- `ATTR`
Not supported.
-- CODE16
+- `CODE16`
- Not supported because it implies pre-UAL Thumb syntax, which the Microsoft ARM assembler does not allow. Use the `THUMB` directive instead, along with UAL syntax.
+ Not supported because it implies pre-UAL Thumb syntax, which the Microsoft ARM assembler doesn't allow. Use the `THUMB` directive instead, along with UAL syntax.
-- COMMON
+- `COMMON`
- Specification of an alignment for the common region is not supported.
+ Specification of an alignment for the common region isn't supported.
-- DCDO
+- `DCDO`
Not supported.
- `DN`, `QN`, `SN`
- Specification of a type or a lane on the register alias is not supported.
+ Specification of a type or a lane on the register alias isn't supported.
-- ENTRY
+- `ENTRY`
Not supported.
-- EQU
+- `EQU`
- Specification of a type for the defined symbol is not supported.
+ Specification of a type for the defined symbol isn't supported.
- `EXPORT` and `GLOBAL`
Specifies exports using this syntax:
- > **EXPORT**|**GLOBAL** sym{**[**type**]**}
+ > **`EXPORT`**|**`GLOBAL`** *`symbol`*{*`[type]`*}
- *sym* is the symbol to be exported. [*type*], if specified, can be either `[DATA]` to indicate that the symbol points to data or `[FUNC]` to indicate that the symbol points to code. `GLOBAL` is a synonym for `EXPORT`.
+ *`symbol`* is the symbol to be exported. *`[type]`*, if specified, can be either `[DATA]` to indicate that the symbol points to data or `[FUNC]` to indicate that the symbol points to code. `GLOBAL` is a synonym for `EXPORT`.
-- EXPORTAS
+- `EXPORTAS`
Not supported.
-- FRAME
+- `FRAME`
Not supported.
- `FUNCTION` and `PROC`
- Although the assembly syntax supports the specification of a custom calling convention on procedures by listing the registers that are caller-save and those that are callee-save, the Microsoft ARM assembler accepts the syntax but ignores the register lists. The debug information that is produced by the assembler supports only the default calling convention.
+ The assembly syntax lets you specify a custom calling convention on procedures: you list the registers that are caller-save, and the ones that are callee-save. However, while the Microsoft ARM assembler accepts the syntax, it ignores the register lists. The debug information that's produced by the assembler supports only the default calling convention.
- `IMPORT` and `EXTERN`
Specifies imports using this syntax:
- > **IMPORT**|**EXTERN** *sym*{**, WEAK** *alias*{**, TYPE** *t*}}
+ > **`IMPORT`**|**`EXTERN`** *`symbol`*{**`, WEAK`** *`alias`*{**`, TYPE`** *`t`*}}
- *sym* is the name of the symbol to be imported.
+ *`symbol`* is the name of the symbol to be imported.
- If `WEAK` *alias* is specified, it indicates that *sym* is a weak external. If no definition for it is found at link time, then all references to it bind instead to *alias*.
+ If `WEAK` *`alias`* is specified, it indicates that *`symbol`* is a weak external. If a definition for it isn't found at link time, then all references to it bind instead to *`alias`*.
- If `TYPE` *t* is specified, then *t* indicates how the linker should attempt to resolve *sym*. These values for *t* are possible:
+ If `TYPE` *`t`* is specified, then *`t`* indicates how the linker should attempt to resolve *`symbol`*. These values for *`t`* are possible:
- |Value|Description|
- |-|-|
- |1|Do not perform a library search for *sym*|
- |2|Perform a library search for *sym*|
- |3|*sym* is an alias for *alias* (default)|
+ | Value | Description |
+ |--|--|
+ | 1 | Don't search libraries for *`symbol`*. |
+ | 2 | Search libraries for *`symbol`*. |
+ | 3 | *`symbol`* is an alias for *`alias`* (default). |
- `EXTERN` is a synonym for `IMPORT`, except that *sym* is imported only if there are references to it in the current assembly.
+ `EXTERN` is a synonym for `IMPORT`, except that *`symbol`* is imported only if there are references to it in the current assembly.
-- MACRO
+- `MACRO`
- The use of a variable to hold the condition code of a macro is not supported. Default values for macro parameters are not supported.
+ The use of a variable to hold the condition code of a macro isn't supported. Default values for macro parameters aren't supported.
-- NOFP
+- `NOFP`
Not supported.
- `OPT`, `TTL`, `SUBT`
- Not supported because the Microsoft ARM assembler does not produce listings.
+ Not supported, because the Microsoft ARM assembler doesn't produce listings.
-- PRESERVE8
+- `PRESERVE8`
Not supported.
-- RELOC
+- `RELOC`
- `RELOC n` can only follow an instruction or a data definition directive. There is no "anonymous symbol" that can be relocated.
+ `RELOC n` can only follow an instruction or a data definition directive. There's no "anonymous symbol" that can be relocated.
-- REQUIRE
+- `REQUIRE`
Not supported.
-- REQUIRE8
+- `REQUIRE8`
Not supported.
-- THUMBX
+- `THUMBX`
- Not supported because the Microsoft ARM assembler does not support the Thumb-2EE instruction set.
+ Not supported, because the Microsoft ARM assembler doesn't support the Thumb-2EE instruction set.
## See also
diff --git a/docs/assembler/arm/arm-assembler-reference.md b/docs/assembler/arm/arm-assembler-reference.md
index cfc4a8215d..905ab3a72a 100644
--- a/docs/assembler/arm/arm-assembler-reference.md
+++ b/docs/assembler/arm/arm-assembler-reference.md
@@ -1,21 +1,25 @@
---
-title: "ARM Assembler Reference"
-ms.date: "08/28/2017"
+description: "Learn more about: ARM Assembler reference"
+title: "ARM Assembler reference"
+ms.date: 05/09/2022
ms.assetid: f8a076cc-9627-4328-a34a-9c44f7a3aab1
---
-# ARM Assembler Reference
+# ARM Assembler reference
-The articles in this section of the documentation provide reference material for the Microsoft ARM assembler (armasm) and related tools.
+The articles in this section of the documentation provide reference material for the Microsoft ARM assembler (**armasm** or **armasm64**) and related tools.
-## Related Articles
+## Related articles
|Title|Description|
|-----------|-----------------|
-|[ARM Assembler Command-Line Reference](../../assembler/arm/arm-assembler-command-line-reference.md)|Describes the armasm command-line options.|
-|[ARM Assembler Diagnostic Messages](../../assembler/arm/arm-assembler-diagnostic-messages.md)|Describes commonly encountered armasm warning and error messages.|
-|[ARM Assembler Directives](../../assembler/arm/arm-assembler-directives.md)|Describes the ARM directives that are different in armasm.|
+|[ARM Assembler command-line reference](../../assembler/arm/arm-assembler-command-line-reference.md)|Describes the Microsoft armasm and armasm64 command-line options.|
+|[ARM Assembler diagnostic messages](../../assembler/arm/arm-assembler-diagnostic-messages.md)|Describes commonly seen armasm and armasm64 warning and error messages.|
+|[ARM Assembler directives](../../assembler/arm/arm-assembler-directives.md)|Describes the ARM directives that are different in Microsoft armasm and armasm64.|
|[ARM Architecture Reference Manual](https://developer.arm.com/search#q=ARM%20Architecture%20Reference%20Manual) on the ARM Developer website.|Choose the relevant manual for your ARM architecture. Each contains reference sections about ARM, Thumb, NEON, and VFP, and additional information about the ARM assembly language.|
-|[ARM Compiler armasm User Guide](https://developer.arm.com/search#q=ARM%20Compiler%20armasm%20User%20Guide) on the ARM Developer website.|Choose a recent version to find up-to-date information about the ARM assembly language. **Note:** The "armasm" assembler that is referred to on the ARM Developer website is not the Microsoft armasm assembler that is included in Visual Studio and is documented in this section.|
+|[ARM Compiler armasm User Guide](https://developer.arm.com/search#q=ARM%20Compiler%20armasm%20User%20Guide) on the ARM Developer website.|Choose a recent version to find up-to-date information about the ARM assembly language.|
+
+> [!IMPORTANT]
+> The armasm assembler that the ARM Developer website describes isn't the same as the Microsoft armasm assembler that's included in Visual Studio and is documented in this section.
## See also
diff --git a/docs/assembler/inline/accessing-c-or-cpp-data-in-asm-blocks.md b/docs/assembler/inline/accessing-c-or-cpp-data-in-asm-blocks.md
index eaa6112fae..8dab8e0883 100644
--- a/docs/assembler/inline/accessing-c-or-cpp-data-in-asm-blocks.md
+++ b/docs/assembler/inline/accessing-c-or-cpp-data-in-asm-blocks.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Accessing C or C++ Data in __asm Blocks"
title: "Accessing C or C++ Data in __asm Blocks"
ms.date: "08/30/2018"
helpviewer_keywords: ["data members [C++], in __asm blocks", "data access [C++], in __asm blocks", "__asm keyword [C++], data members", "structure types in __asm blocks"]
ms.assetid: e99f5a28-0381-4090-8ece-6af8f2436a49
+ms.topic: concept-article
---
# Accessing C or C++ Data in __asm Blocks
diff --git a/docs/assembler/inline/advantages-of-inline-assembly.md b/docs/assembler/inline/advantages-of-inline-assembly.md
index 5eae8ca90a..4e531912eb 100644
--- a/docs/assembler/inline/advantages-of-inline-assembly.md
+++ b/docs/assembler/inline/advantages-of-inline-assembly.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Advantages of Inline Assembly"
title: "Advantages of Inline Assembly"
ms.date: "08/30/2018"
helpviewer_keywords: ["assembler [C++], advantages", "inline assembly [C++], about inline assembly", "inline assembly [C++], using"]
diff --git a/docs/assembler/inline/asm.md b/docs/assembler/inline/asm.md
index fa191496a4..a14c085469 100644
--- a/docs/assembler/inline/asm.md
+++ b/docs/assembler/inline/asm.md
@@ -1,32 +1,33 @@
---
title: "__asm"
-ms.date: "10/09/2018"
+description: "Learn more about: `__asm`"
+ms.date: 10/09/2018
+ms.topic: reference
f1_keywords: ["__asm", "_asm", "__asm_cpp"]
helpviewer_keywords: ["__asm keyword [C++], vs. asm blocks", "__asm keyword [C++]"]
-ms.assetid: 77ff3bc9-a492-4b5e-85e1-fa4e414e79cd
---
# `__asm`
**Microsoft Specific**
-The **`__asm`** keyword invokes the inline assembler and can appear wherever a C or C++ statement is legal. It cannot appear by itself. It must be followed by an assembly instruction, a group of instructions enclosed in braces, or, at the very least, an empty pair of braces. The term "**`__asm`** block" here refers to any instruction or group of instructions, whether or not in braces.
+The **`__asm`** keyword invokes the inline assembler and can appear wherever a C or C++ statement is legal. It can't appear by itself. It must be followed by an assembly instruction, a group of instructions enclosed in braces, or, at minimum, an empty pair of braces. The term "**`__asm`** block" here refers to any instruction or group of instructions, whether or not in braces.
> [!NOTE]
> Visual C++ support for the Standard C++ **`asm`** keyword is limited to the fact that the compiler will not generate an error on the keyword. However, an **`asm`** block will not generate any meaningful code. Use **`__asm`** instead of **`asm`**.
## Grammar
-*asm-block*:
- **`__asm`** *assembly-instruction* **`;`**opt
- **`__asm {`** *assembly-instruction-list* **`}`** **`;`**opt
+*asm-block*:\
+ **`__asm`** *assembly-instruction* **`;`**opt\
+ **`__asm {`** *assembly-instruction-list* **`}`** **`;`**opt
-*assembly-instruction-list*:
- *assembly-instruction* **`;`**opt
- *assembly-instruction* **`;`** *assembly-instruction-list* **`;`**opt
+*assembly-instruction-list*:\
+ *assembly-instruction* **`;`**opt\
+ *assembly-instruction* **`;`** *assembly-instruction-list* **`;`**opt
## Remarks
-If used without braces, the **`__asm`** keyword means that the rest of the line is an assembly-language statement. If used with braces, it means that each line between the braces is an assembly-language statement. For compatibility with previous versions, **`_asm`** is a synonym for **`__asm`**.
+If used without braces, the **`__asm`** keyword means that the rest of the line is an assembly-language statement. If used with braces, it means that each line between the braces is an assembly-language statement. For compatibility with previous versions, **`_asm`** is a synonym for **`__asm`** unless compiler option [`/Za` (Disable language extensions)](../../build/reference/za-ze-disable-language-extensions.md) is specified.
Since the **`__asm`** keyword is a statement separator, you can put assembly instructions on the same line.
@@ -36,12 +37,10 @@ Before Visual Studio 2005, the instruction
__asm int 3
```
-did not cause native code to be generated when compiled with **/clr**; the compiler translated the instruction to a CLR break instruction.
+didn't cause native code to be generated when compiled with **/clr**; the compiler translated the instruction to a CLR break instruction.
`__asm int 3` now results in native code generation for the function. If you want a function to cause a break point in your code and if you want that function compiled to MSIL, use [__debugbreak](../../intrinsics/debugbreak.md).
-For compatibility with previous versions, **`_asm`** is a synonym for **`__asm`** unless compiler option [/Za \(Disable language extensions)](../../build/reference/za-ze-disable-language-extensions.md) is specified.
-
## Example
The following code fragment is a simple **`__asm`** block enclosed in braces:
@@ -68,9 +67,9 @@ Because the **`__asm`** keyword is a statement separator, you can also put assem
__asm mov al, 2 __asm mov dx, 0xD007 __asm out dx, al
```
-All three examples generate the same code, but the first style (enclosing the **`__asm`** block in braces) has some advantages. The braces clearly separate assembly code from C or C++ code and avoid needless repetition of the **`__asm`** keyword. Braces can also prevent ambiguities. If you want to put a C or C++ statement on the same line as an **`__asm`** block, you must enclose the block in braces. Without the braces, the compiler cannot tell where assembly code stops and C or C++ statements begin. Finally, because the text in braces has the same format as ordinary MASM text, you can easily cut and paste text from existing MASM source files.
+All three examples generate the same code, but the first style (enclosing the **`__asm`** block in braces) has some advantages. The braces clearly separate assembly code from C or C++ code and avoid needless repetition of the **`__asm`** keyword. Braces can also prevent ambiguities. If you want to put a C or C++ statement on the same line as an **`__asm`** block, you must enclose the block in braces. Without the braces, the compiler can't tell where assembly code stops and C or C++ statements begin. Finally, because the text in braces has the same format as ordinary MASM text, you can easily cut and paste text from existing MASM source files.
-Unlike braces in C and C++, the braces enclosing an **`__asm`** block don't affect variable scope. You can also nest **`__asm`** blocks; nesting does not affect variable scope.
+Unlike braces in C and C++, the braces enclosing an **`__asm`** block don't affect variable scope. You can also nest **`__asm`** blocks; nesting doesn't affect variable scope.
**END Microsoft Specific**
diff --git a/docs/assembler/inline/assembly-language-comments.md b/docs/assembler/inline/assembly-language-comments.md
index d2e0e29cd6..cf66d19647 100644
--- a/docs/assembler/inline/assembly-language-comments.md
+++ b/docs/assembler/inline/assembly-language-comments.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Assembly-Language Comments"
title: "Assembly-Language Comments"
ms.date: "08/30/2018"
helpviewer_keywords: ["assembly language [C++], comments", "comments [C++], assembly language", "macros [C++], assembly language", "__asm keyword [C++], instructions"]
diff --git a/docs/assembler/inline/calling-c-functions-in-inline-assembly.md b/docs/assembler/inline/calling-c-functions-in-inline-assembly.md
index 3bd9cb7eb7..74bf5c40de 100644
--- a/docs/assembler/inline/calling-c-functions-in-inline-assembly.md
+++ b/docs/assembler/inline/calling-c-functions-in-inline-assembly.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Calling C Functions in Inline Assembly"
title: "Calling C Functions in Inline Assembly"
ms.date: "08/30/2018"
helpviewer_keywords: ["function calls, C functions", "function calls, in inline assembly", "functions [C], calling in inline assembly", "Visual C, functions", "inline assembly, calling functions", "__asm keyword [C++], calling functions"]
ms.assetid: f8a8d568-d175-4e23-9b24-36ef60a4cab3
+ms.topic: concept-article
---
# Calling C Functions in Inline Assembly
diff --git a/docs/assembler/inline/calling-cpp-functions-in-inline-assembly.md b/docs/assembler/inline/calling-cpp-functions-in-inline-assembly.md
index 16236cbb7f..11c2763e43 100644
--- a/docs/assembler/inline/calling-cpp-functions-in-inline-assembly.md
+++ b/docs/assembler/inline/calling-cpp-functions-in-inline-assembly.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Calling C++ Functions in Inline Assembly"
title: "Calling C++ Functions in Inline Assembly"
ms.date: "08/30/2018"
helpviewer_keywords: ["functions [C++], calling in inline assembly", "function calls, C++ functions", "function calls, in inline assembly", "Visual C++, functions", "inline assembly, calling functions", "__asm keyword [C++], calling functions"]
ms.assetid: 1f0d1eb3-54cf-45d5-838d-958188616b38
+ms.topic: concept-article
---
# Calling C++ Functions in Inline Assembly
diff --git a/docs/assembler/inline/data-directives-and-operators-in-inline-assembly.md b/docs/assembler/inline/data-directives-and-operators-in-inline-assembly.md
index cdebbe28f3..364313604c 100644
--- a/docs/assembler/inline/data-directives-and-operators-in-inline-assembly.md
+++ b/docs/assembler/inline/data-directives-and-operators-in-inline-assembly.md
@@ -1,17 +1,22 @@
---
+description: "Learn more about: Data Directives and Operators in Inline Assembly"
title: "Data Directives and Operators in Inline Assembly"
-ms.date: "08/30/2018"
+ms.date: 06/03/2022
helpviewer_keywords: ["data directives [C++]", "__asm keyword [C++], referencing limitations", "MASM (Microsoft Macro Assembler), directives", "directives [C++], MASM", "MASM (Microsoft Macro Assembler), structures", "operators [MASM]", "inline assembly, operators", "inline assembly, data directives", "MASM (Microsoft Macro Assembler), operators", "structures [C++], MASM"]
ms.assetid: fb7410c7-156a-4131-bcfc-211aa70533e3
---
-# Data Directives and Operators in Inline Assembly
+# Data directives and operators in inline assembly
**Microsoft Specific**
-Although an **`__asm`** block can reference C or C++ data types and objects, it cannot define data objects with MASM directives or operators. Specifically, you cannot use the definition directives **DB**, `DW`, **DD**, `DQ`, `DT`, and `DF`, or the operators `DUP` or **THIS**. MASM structures and records are also unavailable. The inline assembler doesn't accept the directives `STRUC`, `RECORD`, **WIDTH**, or **MASK**.
+The inline assembler doesn't support all the data directives and operators available in MASM.
+
+## Remarks
+
+Although an **`__asm`** block can reference C or C++ data types and objects, it can't define data objects with MASM directives or operators. Specifically, you can't use the definition directives **`DB`**, **`DW`**, **`DD`**, **`DQ`**, **`DT`**, and **`DF`**, or the operators **`DUP`** or **`THIS`**. MASM structures and records are also unavailable. The inline assembler doesn't accept the directives **`STRUC`**, **`RECORD`**, **`WIDTH`**, or **`MASK`**.
**END Microsoft Specific**
## See also
-[Using Assembly Language in __asm Blocks](../../assembler/inline/using-assembly-language-in-asm-blocks.md)
+[Using Assembly Language in `__asm` blocks](../../assembler/inline/using-assembly-language-in-asm-blocks.md)
diff --git a/docs/assembler/inline/debugging-and-listings-for-inline-assembly.md b/docs/assembler/inline/debugging-and-listings-for-inline-assembly.md
index 04b3819369..dbe6f30b37 100644
--- a/docs/assembler/inline/debugging-and-listings-for-inline-assembly.md
+++ b/docs/assembler/inline/debugging-and-listings-for-inline-assembly.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Debugging and Listings for Inline Assembly"
title: "Debugging and Listings for Inline Assembly"
ms.date: "08/30/2018"
helpviewer_keywords: ["source level debugger", "__asm keyword [C++], debugging", "inline assembly, listings", "bugs, __asm blocks", "debugging [C++], inline assembly code", "inline assembly, debugging"]
ms.assetid: 69266930-6f9a-433d-b704-f4f44e7b2583
+ms.topic: concept-article
---
# Debugging and Listings for Inline Assembly
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 ae3ca49930..ebea4aa8da 100644
--- a/docs/assembler/inline/defining-asm-blocks-as-c-macros.md
+++ b/docs/assembler/inline/defining-asm-blocks-as-c-macros.md
@@ -1,8 +1,9 @@
---
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
+ms.topic: concept-article
---
# Defining __asm Blocks as C Macros
@@ -14,7 +15,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:
@@ -38,7 +39,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/inline/emit-pseudoinstruction.md b/docs/assembler/inline/emit-pseudoinstruction.md
index 07900a17f1..b736701ca0 100644
--- a/docs/assembler/inline/emit-pseudoinstruction.md
+++ b/docs/assembler/inline/emit-pseudoinstruction.md
@@ -1,9 +1,11 @@
---
+description: "Learn more about: _emit Pseudoinstruction"
title: "_emit Pseudoinstruction"
ms.date: "08/30/2018"
f1_keywords: ["_emit"]
helpviewer_keywords: ["byte defining (inline assembly)", "_emit pseudoinstruction"]
ms.assetid: 004c48f3-364c-4e82-9a51-e326f9cc7b2b
+ms.topic: reference
---
# _emit Pseudoinstruction
diff --git a/docs/assembler/inline/even-and-align-directives.md b/docs/assembler/inline/even-and-align-directives.md
index 6ac2e10db9..d98adc4b44 100644
--- a/docs/assembler/inline/even-and-align-directives.md
+++ b/docs/assembler/inline/even-and-align-directives.md
@@ -1,17 +1,17 @@
---
title: "EVEN and ALIGN Directives"
-ms.date: "08/30/2018"
+description: "Learn more about: EVEN and ALIGN Directives"
+ms.date: 08/30/2018
helpviewer_keywords: ["EVEN directive", "directives, MASM", "MASM (Microsoft Macro Assembler), directives", "NOP (no operation instruction)", "ALIGN directive"]
-ms.assetid: 7357ab2d-4a5c-43ca-accb-a5f21cdfcde5
---
-# EVEN and ALIGN Directives
+# `EVEN` and `ALIGN` Directives
**Microsoft Specific**
-Although the inline assembler doesn't support most MASM directives, it does support `EVEN` and **ALIGN**. These directives put **NOP** (no operation) instructions in the assembly code as needed to align labels to specific boundaries. This makes instruction-fetch operations more efficient for some processors.
+Although the inline assembler doesn't support most MASM directives, it does support [`EVEN`](../masm/even.md) and [`ALIGN`](../masm/align-masm.md). These directives put `NOP` (no operation) instructions in the assembly code as needed to align labels to specific boundaries. This makes instruction-fetch operations more efficient for some processors.
**END Microsoft Specific**
## See also
-[Using Assembly Language in __asm Blocks](../../assembler/inline/using-assembly-language-in-asm-blocks.md)
+[Using Assembly Language in `__asm` Blocks](using-assembly-language-in-asm-blocks.md)
diff --git a/docs/assembler/inline/inline-assembler-overview.md b/docs/assembler/inline/inline-assembler-overview.md
index 774345b686..3b97cd7043 100644
--- a/docs/assembler/inline/inline-assembler-overview.md
+++ b/docs/assembler/inline/inline-assembler-overview.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Inline Assembler Overview"
title: "Inline Assembler Overview"
ms.date: "08/30/2018"
helpviewer_keywords: ["inline assembler", "__asm keyword [C++], invoking inline assembler", "invoking inline assembler", "inline assembly, inline assembler"]
ms.assetid: d990331a-0e33-4760-8d7a-b720b0288335
+ms.topic: concept-article
---
# Inline Assembler Overview
diff --git a/docs/assembler/inline/inline-assembler.md b/docs/assembler/inline/inline-assembler.md
index bffd6ae51a..70f47d71c8 100644
--- a/docs/assembler/inline/inline-assembler.md
+++ b/docs/assembler/inline/inline-assembler.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Inline Assembler"
title: "Inline Assembler"
ms.date: "08/30/2018"
helpviewer_keywords: ["assembler [C++]", "assembler [C++], inline", "assembly language [C++], inline", "inline assembler [C++]", "inline assembly [C++]"]
diff --git a/docs/assembler/inline/instruction-set-for-inline-assembly.md b/docs/assembler/inline/instruction-set-for-inline-assembly.md
index eeba8b6598..13b356b526 100644
--- a/docs/assembler/inline/instruction-set-for-inline-assembly.md
+++ b/docs/assembler/inline/instruction-set-for-inline-assembly.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Instruction Set for Inline Assembly"
title: "Instruction Set for Inline Assembly"
ms.date: "08/30/2018"
ms.topic: "reference"
diff --git a/docs/assembler/inline/intel-s-mmx-instruction-set.md b/docs/assembler/inline/intel-s-mmx-instruction-set.md
index d6957f0b1d..eb492df28d 100644
--- a/docs/assembler/inline/intel-s-mmx-instruction-set.md
+++ b/docs/assembler/inline/intel-s-mmx-instruction-set.md
@@ -1,11 +1,12 @@
---
-title: "Intel's MMX Instruction Set"
+description: "Learn more about: Intel's MMX Instruction Set"
+title: "Intel's MMX Instruction Set"
ms.date: "08/30/2018"
ms.topic: "reference"
helpviewer_keywords: ["MMX instruction set"]
ms.assetid: 705deb2d-c3fd-4696-9e22-8bcf25866daf
---
-# Intel's MMX Instruction Set
+# Intel's MMX Instruction Set
**Microsoft Specific**
diff --git a/docs/assembler/inline/jumping-to-labels-in-inline-assembly.md b/docs/assembler/inline/jumping-to-labels-in-inline-assembly.md
index 87e18c994f..6952971966 100644
--- a/docs/assembler/inline/jumping-to-labels-in-inline-assembly.md
+++ b/docs/assembler/inline/jumping-to-labels-in-inline-assembly.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Jumping to Labels in Inline Assembly"
title: "Jumping to Labels in Inline Assembly"
ms.date: "08/30/2018"
helpviewer_keywords: ["inline assembly, jumping to labels", "labels, in inline assembly", "__asm keyword [C++], labels", "case sensitivity, labels in inline assembly", "labels, in __asm blocks", "jumping to labels in inline assembly"]
ms.assetid: 36c18b97-8981-4631-9dfd-af6c14a04297
+ms.topic: concept-article
---
# Jumping to Labels in Inline Assembly
diff --git a/docs/assembler/inline/masm-expressions-in-inline-assembly.md b/docs/assembler/inline/masm-expressions-in-inline-assembly.md
index 99e43a96fa..59cf17282f 100644
--- a/docs/assembler/inline/masm-expressions-in-inline-assembly.md
+++ b/docs/assembler/inline/masm-expressions-in-inline-assembly.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: MASM Expressions in Inline Assembly"
title: "MASM Expressions in Inline Assembly"
ms.date: "08/30/2018"
helpviewer_keywords: ["expressions [C++], MASM", "expressions [C++], inline assembly", "inline assembly, MASM expressions", "MASM (Microsoft Macro Assembler), expressions"]
diff --git a/docs/assembler/inline/masm-macro-directives-in-inline-assembly.md b/docs/assembler/inline/masm-macro-directives-in-inline-assembly.md
index b3b82965c9..323a67036e 100644
--- a/docs/assembler/inline/masm-macro-directives-in-inline-assembly.md
+++ b/docs/assembler/inline/masm-macro-directives-in-inline-assembly.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: MASM Macro Directives in Inline Assembly"
title: "MASM Macro Directives in Inline Assembly"
ms.date: "08/30/2018"
helpviewer_keywords: ["directives, macros", "inline assembly, macro directives", "macros, directives", "MASM (Microsoft Macro Assembler), inline assembly macro directives"]
@@ -8,10 +9,10 @@ ms.assetid: 83643a09-1699-40a8-8ef2-13502bc4ac2c
**Microsoft Specific**
-The inline assembler is not a macro assembler. You cannot use MASM macro directives (**MACRO**, `REPT`, **IRC**, `IRP`, and `ENDM`) or macro operators (**<>**, **!**, **&**, `%`, and `.TYPE`). An **`__asm`** block can use C preprocessor directives, however. See [Using C or C++ in __asm Blocks](../../assembler/inline/using-c-or-cpp-in-asm-blocks.md) for more information.
+The inline assembler isn't a macro assembler. You can't use MASM macro directives (`MACRO`, `REPT`, `IRC`, `IRP`, and `ENDM`) or macro operators (**`<>`**, **`!`**, **`&`**, **`%`**, and `.TYPE`). An **`__asm`** block can use C preprocessor directives, however. For more information, see [Using C or C++ in `__asm` blocks](../../assembler/inline/using-c-or-cpp-in-asm-blocks.md).
**END Microsoft Specific**
## See also
-[Using Assembly Language in __asm Blocks](../../assembler/inline/using-assembly-language-in-asm-blocks.md)
+[Using assembly language in `__asm` blocks](../../assembler/inline/using-assembly-language-in-asm-blocks.md)
diff --git a/docs/assembler/inline/optimizing-inline-assembly.md b/docs/assembler/inline/optimizing-inline-assembly.md
index 0dc556eab7..7330cf7156 100644
--- a/docs/assembler/inline/optimizing-inline-assembly.md
+++ b/docs/assembler/inline/optimizing-inline-assembly.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Optimizing Inline Assembly"
title: "Optimizing Inline Assembly"
ms.date: "08/30/2018"
helpviewer_keywords: ["storage, optimizing in inline assembly", "optimization, inline assembly", "inline assembly, optimizing", "optimizing performance, inline assembly", "__asm keyword [C++], optimizing"]
ms.assetid: 52a7ec83-9782-4d96-94c1-53bb2ac9e8c8
+ms.topic: concept-article
---
# Optimizing Inline Assembly
diff --git a/docs/assembler/inline/segment-references-in-inline-assembly.md b/docs/assembler/inline/segment-references-in-inline-assembly.md
index e7c16c6df4..807453a33f 100644
--- a/docs/assembler/inline/segment-references-in-inline-assembly.md
+++ b/docs/assembler/inline/segment-references-in-inline-assembly.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Segment References in Inline Assembly"
title: "Segment References in Inline Assembly"
ms.date: "08/30/2018"
helpviewer_keywords: ["references, inline assembly", "segment references in inline assembly", "inline assembly, segment references", "registers", "inline assembly, registers", "registers, inline assembly"]
diff --git a/docs/assembler/inline/type-and-variable-sizes-in-inline-assembly.md b/docs/assembler/inline/type-and-variable-sizes-in-inline-assembly.md
index 6b21fdd0fe..f6dbd6e870 100644
--- a/docs/assembler/inline/type-and-variable-sizes-in-inline-assembly.md
+++ b/docs/assembler/inline/type-and-variable-sizes-in-inline-assembly.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Type and Variable Sizes in Inline Assembly"
title: "Type and Variable Sizes in Inline Assembly"
ms.date: "08/30/2018"
ms.topic: "reference"
diff --git a/docs/assembler/inline/using-and-preserving-registers-in-inline-assembly.md b/docs/assembler/inline/using-and-preserving-registers-in-inline-assembly.md
index 770a9a517b..b488b9fc60 100644
--- a/docs/assembler/inline/using-and-preserving-registers-in-inline-assembly.md
+++ b/docs/assembler/inline/using-and-preserving-registers-in-inline-assembly.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Using and Preserving Registers in Inline Assembly"
title: "Using and Preserving Registers in Inline Assembly"
ms.date: "08/30/2018"
helpviewer_keywords: ["__asm keyword [C++], register values", "inline assembly, registers", "registers, inline assembly", "preserving registers"]
ms.assetid: dbcd7360-6f3e-4b22-9ee2-9f65ca6f2543
+ms.topic: concept-article
---
# Using and Preserving Registers in Inline Assembly
diff --git a/docs/assembler/inline/using-assembly-language-in-asm-blocks.md b/docs/assembler/inline/using-assembly-language-in-asm-blocks.md
index 7dba755d3a..c2a33f53b5 100644
--- a/docs/assembler/inline/using-assembly-language-in-asm-blocks.md
+++ b/docs/assembler/inline/using-assembly-language-in-asm-blocks.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Using Assembly Language in __asm Blocks"
title: "Using Assembly Language in __asm Blocks"
ms.date: "08/30/2018"
helpviewer_keywords: ["assembly language [C++], features", "assembly language [C++]", "__asm keyword [C++], assembly language in"]
ms.assetid: ad699356-1d16-4984-871f-c5fd7797c1fb
+ms.topic: concept-article
---
# Using Assembly Language in __asm Blocks
diff --git a/docs/assembler/inline/using-c-or-cpp-in-asm-blocks.md b/docs/assembler/inline/using-c-or-cpp-in-asm-blocks.md
index a5745d31e4..0a56b28c8f 100644
--- a/docs/assembler/inline/using-c-or-cpp-in-asm-blocks.md
+++ b/docs/assembler/inline/using-c-or-cpp-in-asm-blocks.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Using C or C++ in __asm Blocks"
title: "Using C or C++ in __asm Blocks"
ms.date: "08/30/2018"
helpviewer_keywords: ["inline assembly, mixing instructions with C/C++ statements", "symbols, in __asm blocks", "macros, __asm blocks", "preprocessor directives, used in __asm blocks", "type names, used in __asm blocks", "preprocessor directives", "preprocessor, directives", "constants, in __asm blocks", "comments, in __asm blocks", "typedef names, used in __asm blocks", "__asm keyword [C++], C/C++ elements in"]
ms.assetid: ae8b2b52-6b75-42e3-ac0c-ad02d922ed97
+ms.topic: concept-article
---
# Using C or C++ in __asm Blocks
diff --git a/docs/assembler/inline/using-c-or-cpp-symbols-in-asm-blocks.md b/docs/assembler/inline/using-c-or-cpp-symbols-in-asm-blocks.md
index 9ec91ba199..8dc38e5868 100644
--- a/docs/assembler/inline/using-c-or-cpp-symbols-in-asm-blocks.md
+++ b/docs/assembler/inline/using-c-or-cpp-symbols-in-asm-blocks.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Using C or C++ Symbols in __asm Blocks"
title: "Using C or C++ Symbols in __asm Blocks"
ms.date: "08/30/2018"
helpviewer_keywords: ["__asm keyword [C++], syntax", "symbols, in __asm blocks", "Visual C, symbols in __asm blocks", "__asm keyword [C++], C/C++ elements in", "Visual C++, in __asm blocks"]
ms.assetid: 0758ffdc-dfe9-41c8-a5e1-fd395bcac328
+ms.topic: concept-article
---
# Using C or C++ Symbols in __asm Blocks
diff --git a/docs/assembler/inline/using-operators-in-asm-blocks.md b/docs/assembler/inline/using-operators-in-asm-blocks.md
index e230a01bb0..b629032f99 100644
--- a/docs/assembler/inline/using-operators-in-asm-blocks.md
+++ b/docs/assembler/inline/using-operators-in-asm-blocks.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Using Operators in __asm Blocks"
title: "Using Operators in __asm Blocks"
ms.date: "08/30/2018"
helpviewer_keywords: ["brackets [ ]", "brackets [ ], __asm blocks", "__asm keyword [C++], operators", "square brackets [ ], __asm blocks", "operators [C++], using in __asm blocks", "square brackets [ ]"]
ms.assetid: a26ccfd4-40ae-4a61-952f-c417982aa8dd
+ms.topic: concept-article
---
# Using Operators in __asm Blocks
diff --git a/docs/assembler/inline/writing-functions-with-inline-assembly.md b/docs/assembler/inline/writing-functions-with-inline-assembly.md
index 492bfe8688..d1082cff37 100644
--- a/docs/assembler/inline/writing-functions-with-inline-assembly.md
+++ b/docs/assembler/inline/writing-functions-with-inline-assembly.md
@@ -1,38 +1,47 @@
---
-title: "Writing Functions with Inline Assembly"
-ms.date: "08/30/2018"
+description: "Learn more about: Writing functions with inline assembly"
+title: "Writing functions with inline assembly"
+ms.date: 02/11/2022
helpviewer_keywords: ["functions [C++], inline assembly", "inline assembly [C++], writing functions", "assembler [C++], writing functions", "__asm keyword [C++], in functions"]
ms.assetid: b5df8a04-fdc7-4622-8c9e-e4b618927497
+ms.topic: concept-article
---
-# Writing Functions with Inline Assembly
+# Writing functions with inline assembly
**Microsoft Specific**
-If you write a function with inline assembly code, it's easy to pass arguments to the function and return a value from it. The following examples compare a function first written for a separate assembler and then rewritten for the inline assembler. The function, called `power2`, receives two parameters, multiplying the first parameter by 2 to the power of the second parameter. Written for a separate assembler, the function might look like this:
+> [!NOTE]
+> Inline assembly is only available for x86 targets. For similar functionality in x64 or ARM64 code, use [compiler intrinsics](../../intrinsics/compiler-intrinsics.md).
+
+If you write a function with inline assembly code, it's easy to pass arguments to the function and return a value from it. The following examples compare a function first written for a separate assembler and then rewritten for the inline assembler. The function, called `power2`, receives two parameters, multiplying the first parameter by 2 to the power of the second parameter. As a separate assembler file, the function might look like this:
```asm
-; POWER.ASM
-; Compute the power of an integer
-;
- PUBLIC _power2
-_TEXT SEGMENT WORD PUBLIC 'CODE'
+; power2.asm
+; x86 code for C interop
+; Command line: ml /c /Cx /W3 /WX power2.asm
+ .686P
+ .XMM
+ .MODEL flat
+
+PUBLIC _power2
+; int power2(int num, int power);
+; computes num x 2^power
+_TEXT SEGMENT
_power2 PROC
-
- push ebp ; Save EBP
- mov ebp, esp ; Move ESP into EBP so we can refer
- ; to arguments on the stack
- mov eax, [ebp+4] ; Get first argument
- mov ecx, [ebp+6] ; Get second argument
- shl eax, cl ; EAX = EAX * ( 2 ^ CL )
- pop ebp ; Restore EBP
- ret ; Return with sum in EAX
-
+ push ebp ; save EBP
+ mov ebp, esp ; Move ESP into EBP so we can refer
+ ; to arguments on the stack
+ mov eax, [ebp+8] ; load first argument
+ mov ecx, [ebp+12] ; load second argument
+ shl eax, cl ; compute result in EAX
+ pop ebp ; restore EBP
+ ret
_power2 ENDP
_TEXT ENDS
- END
+END
```
-Since it's written for a separate assembler, the function requires a separate source file and assembly and link steps. C and C++ function arguments are usually passed on the stack, so this version of the `power2` function accesses its arguments by their positions on the stack. (Note that the **MODEL** directive, available in MASM and some other assemblers, also allows you to access stack arguments and local stack variables by name.)
+Since it's written as a separate assembler file, the function requires separate assembly and link steps. C and C++ function arguments are usually passed on the stack, so this version of the `power2` function accesses its arguments by their positions on the stack. (The **`MODEL`** directive, available in MASM and some other assemblers, also allows you to access stack arguments and local stack variables by name.)
## Example
@@ -66,10 +75,10 @@ int power2( int num, int power )
The inline version of the `power2` function refers to its arguments by name and appears in the same source file as the rest of the program. This version also requires fewer assembly instructions.
-Because the inline version of `power2` doesn't execute a C **`return`** statement, it causes a harmless warning if you compile at warning level 2 or higher. The function does return a value, but the compiler cannot tell that in the absence of a **`return`** statement. You can use [#pragma warning](../../preprocessor/warning.md) to disable the generation of this warning.
+Because the inline version of `power2` doesn't execute a C **`return`** statement, it causes a harmless warning if you compile at warning level 2 or higher. The function does return a value, but the compiler can't tell it does in the absence of a **`return`** statement. You can use [`#pragma warning`](../../preprocessor/warning.md) to disable the generation of this warning.
**END Microsoft Specific**
## See also
-[Using C or C++ in __asm Blocks](../../assembler/inline/using-c-or-cpp-in-asm-blocks.md)
+[Using C or C++ in `__asm` Blocks](../../assembler/inline/using-c-or-cpp-in-asm-blocks.md)
diff --git a/docs/assembler/masm/alias-masm.md b/docs/assembler/masm/alias-masm.md
index 5a00d05d1f..e1d6bc49b7 100644
--- a/docs/assembler/masm/alias-masm.md
+++ b/docs/assembler/masm/alias-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ALIAS"
title: "ALIAS (MASM)"
ms.date: "12/17/2019"
f1_keywords: ["Alias"]
diff --git a/docs/assembler/masm/align-masm.md b/docs/assembler/masm/align-masm.md
index c747ac0315..433270bcf3 100644
--- a/docs/assembler/masm/align-masm.md
+++ b/docs/assembler/masm/align-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ALIGN"
title: "ALIGN (MASM)"
ms.date: "12/17/2019"
f1_keywords: ["align"]
diff --git a/docs/assembler/masm/assume.md b/docs/assembler/masm/assume.md
index d737faacab..78516979a1 100644
--- a/docs/assembler/masm/assume.md
+++ b/docs/assembler/masm/assume.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ASSUME"
title: "ASSUME"
ms.date: "11/05/2019"
f1_keywords: ["ASSUME"]
diff --git a/docs/assembler/masm/at-at.md b/docs/assembler/masm/at-at.md
index 2106bdf233..0dcf9cac95 100644
--- a/docs/assembler/masm/at-at.md
+++ b/docs/assembler/masm/at-at.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @@:"
title: "@@:"
ms.date: "12/17/2019"
f1_keywords: ["@@:"]
diff --git a/docs/assembler/masm/at-b.md b/docs/assembler/masm/at-b.md
index 69d5ffd640..1bf4336248 100644
--- a/docs/assembler/masm/at-b.md
+++ b/docs/assembler/masm/at-b.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @B"
title: "@B"
ms.date: "12/17/2019"
f1_keywords: ["@B"]
diff --git a/docs/assembler/masm/at-catstr.md b/docs/assembler/masm/at-catstr.md
index 76e37e914c..12ab4de6e4 100644
--- a/docs/assembler/masm/at-catstr.md
+++ b/docs/assembler/masm/at-catstr.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @CatStr"
title: "@CatStr"
ms.date: "12/17/2019"
f1_keywords: ["@CatStr"]
diff --git a/docs/assembler/masm/at-code.md b/docs/assembler/masm/at-code.md
index bbcb648909..8d6fd81529 100644
--- a/docs/assembler/masm/at-code.md
+++ b/docs/assembler/masm/at-code.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @code"
title: "@code"
ms.date: "12/17/2019"
f1_keywords: ["@code"]
diff --git a/docs/assembler/masm/at-codesize.md b/docs/assembler/masm/at-codesize.md
index e85a49aa63..bee5c85a23 100644
--- a/docs/assembler/masm/at-codesize.md
+++ b/docs/assembler/masm/at-codesize.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @CodeSize"
title: "@CodeSize"
ms.date: "11/21/2019"
f1_keywords: ["@CodeSize"]
diff --git a/docs/assembler/masm/at-cpu.md b/docs/assembler/masm/at-cpu.md
index f281916613..46a3e4c90a 100644
--- a/docs/assembler/masm/at-cpu.md
+++ b/docs/assembler/masm/at-cpu.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @Cpu"
title: "@Cpu"
ms.date: "12/17/2019"
f1_keywords: ["@Cpu"]
diff --git a/docs/assembler/masm/at-curseg.md b/docs/assembler/masm/at-curseg.md
index a232e162f6..c571409169 100644
--- a/docs/assembler/masm/at-curseg.md
+++ b/docs/assembler/masm/at-curseg.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @CurSeg"
title: "@CurSeg"
ms.date: "12/17/2019"
f1_keywords: ["@CurSeg"]
diff --git a/docs/assembler/masm/at-data.md b/docs/assembler/masm/at-data.md
index 7ff06cfcfe..9c074d6ccc 100644
--- a/docs/assembler/masm/at-data.md
+++ b/docs/assembler/masm/at-data.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @data"
title: "@data"
ms.date: "12/17/2019"
f1_keywords: ["@data"]
diff --git a/docs/assembler/masm/at-datasize.md b/docs/assembler/masm/at-datasize.md
index 94842ee0b0..b70bca6ced 100644
--- a/docs/assembler/masm/at-datasize.md
+++ b/docs/assembler/masm/at-datasize.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @DataSize"
title: "@DataSize"
ms.date: "12/17/2019"
f1_keywords: ["@DataSize"]
diff --git a/docs/assembler/masm/at-date.md b/docs/assembler/masm/at-date.md
index 1e93f81f8f..2cccf9486e 100644
--- a/docs/assembler/masm/at-date.md
+++ b/docs/assembler/masm/at-date.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @Date"
title: "@Date"
ms.date: "12/17/2019"
f1_keywords: ["@Date"]
diff --git a/docs/assembler/masm/at-environ.md b/docs/assembler/masm/at-environ.md
index 471e846b91..16f56a3d3d 100644
--- a/docs/assembler/masm/at-environ.md
+++ b/docs/assembler/masm/at-environ.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @Environ"
title: "@Environ"
ms.date: "12/17/2019"
f1_keywords: ["@Environ"]
diff --git a/docs/assembler/masm/at-f.md b/docs/assembler/masm/at-f.md
index 6515fafe90..e6353e29a7 100644
--- a/docs/assembler/masm/at-f.md
+++ b/docs/assembler/masm/at-f.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @F"
title: "@F"
ms.date: "12/17/2019"
f1_keywords: ["@F"]
diff --git a/docs/assembler/masm/at-fardata-q.md b/docs/assembler/masm/at-fardata-q.md
index d11d44469f..4a5d8f5f5f 100644
--- a/docs/assembler/masm/at-fardata-q.md
+++ b/docs/assembler/masm/at-fardata-q.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @fardata?"
title: "@fardata?"
ms.date: "12/17/2019"
f1_keywords: ["@fardata?"]
diff --git a/docs/assembler/masm/at-fardata.md b/docs/assembler/masm/at-fardata.md
index e1cb845c67..07e4f11cd0 100644
--- a/docs/assembler/masm/at-fardata.md
+++ b/docs/assembler/masm/at-fardata.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @fardata"
title: "@fardata"
ms.date: "12/17/2019"
f1_keywords: ["@fardata"]
diff --git a/docs/assembler/masm/at-filecur.md b/docs/assembler/masm/at-filecur.md
index 828cca07a2..2f6a4cf0a6 100644
--- a/docs/assembler/masm/at-filecur.md
+++ b/docs/assembler/masm/at-filecur.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @FileCur"
title: "@FileCur"
ms.date: "12/17/2019"
f1_keywords: ["@FileCur"]
diff --git a/docs/assembler/masm/at-filename.md b/docs/assembler/masm/at-filename.md
index ea902b8024..458c2983e6 100644
--- a/docs/assembler/masm/at-filename.md
+++ b/docs/assembler/masm/at-filename.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @FileName"
title: "@FileName"
ms.date: "12/17/2019"
f1_keywords: ["@FileName"]
diff --git a/docs/assembler/masm/at-instr.md b/docs/assembler/masm/at-instr.md
index 80d9d5e436..76770a7466 100644
--- a/docs/assembler/masm/at-instr.md
+++ b/docs/assembler/masm/at-instr.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @InStr"
title: "@InStr"
ms.date: "12/17/2019"
f1_keywords: ["@InStr"]
diff --git a/docs/assembler/masm/at-interface.md b/docs/assembler/masm/at-interface.md
index af5eab2aa2..92f1fa4d66 100644
--- a/docs/assembler/masm/at-interface.md
+++ b/docs/assembler/masm/at-interface.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @Interface"
title: "@Interface"
ms.date: "12/17/2019"
f1_keywords: ["@Interface"]
diff --git a/docs/assembler/masm/at-line.md b/docs/assembler/masm/at-line.md
index e907328655..d09079a78e 100644
--- a/docs/assembler/masm/at-line.md
+++ b/docs/assembler/masm/at-line.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @Line"
title: "@Line"
ms.date: "12/17/2019"
f1_keywords: ["@Line"]
diff --git a/docs/assembler/masm/at-model.md b/docs/assembler/masm/at-model.md
index cf59240a8e..e9d65b8ac9 100644
--- a/docs/assembler/masm/at-model.md
+++ b/docs/assembler/masm/at-model.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @Model"
title: "@Model"
ms.date: "12/17/2019"
f1_keywords: ["@Model"]
diff --git a/docs/assembler/masm/at-sizestr.md b/docs/assembler/masm/at-sizestr.md
index 04b128e07d..b3aacf4b7c 100644
--- a/docs/assembler/masm/at-sizestr.md
+++ b/docs/assembler/masm/at-sizestr.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @SizeStr"
title: "@SizeStr"
ms.date: "12/17/2019"
f1_keywords: ["@SizeStr"]
diff --git a/docs/assembler/masm/at-stack.md b/docs/assembler/masm/at-stack.md
index 09aef4a532..762e72cd1e 100644
--- a/docs/assembler/masm/at-stack.md
+++ b/docs/assembler/masm/at-stack.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @stack"
title: "@stack"
ms.date: "12/17/2019"
f1_keywords: ["@stack"]
diff --git a/docs/assembler/masm/at-substr.md b/docs/assembler/masm/at-substr.md
index 00c8b76567..f54e6f4eed 100644
--- a/docs/assembler/masm/at-substr.md
+++ b/docs/assembler/masm/at-substr.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @SubStr"
title: "@SubStr"
ms.date: "12/17/2019"
f1_keywords: ["@SubStr"]
diff --git a/docs/assembler/masm/at-time.md b/docs/assembler/masm/at-time.md
index 2924f80d33..2e2995e143 100644
--- a/docs/assembler/masm/at-time.md
+++ b/docs/assembler/masm/at-time.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @Time"
title: "@Time"
ms.date: "12/17/2019"
f1_keywords: ["@Time"]
diff --git a/docs/assembler/masm/at-version.md b/docs/assembler/masm/at-version.md
index e00766ea6b..692b6c96af 100644
--- a/docs/assembler/masm/at-version.md
+++ b/docs/assembler/masm/at-version.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @Version"
title: "@Version"
ms.date: "12/17/2019"
f1_keywords: ["@Version"]
diff --git a/docs/assembler/masm/at-wordsize.md b/docs/assembler/masm/at-wordsize.md
index eb125ec847..9db1e69b6f 100644
--- a/docs/assembler/masm/at-wordsize.md
+++ b/docs/assembler/masm/at-wordsize.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: @WordSize"
title: "@WordSize"
ms.date: "12/17/2019"
f1_keywords: ["@WordSize"]
diff --git a/docs/assembler/masm/byte-masm.md b/docs/assembler/masm/byte-masm.md
index 45b9e1a0be..b02941c5cf 100644
--- a/docs/assembler/masm/byte-masm.md
+++ b/docs/assembler/masm/byte-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: BYTE"
title: "BYTE (MASM)"
ms.date: "12/17/2019"
f1_keywords: ["byte"]
diff --git a/docs/assembler/masm/catstr.md b/docs/assembler/masm/catstr.md
index 799348a4c5..2afdee21c6 100644
--- a/docs/assembler/masm/catstr.md
+++ b/docs/assembler/masm/catstr.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CATSTR"
title: "CATSTR"
ms.date: "12/17/2019"
f1_keywords: ["CATSTR"]
diff --git a/docs/assembler/masm/comm.md b/docs/assembler/masm/comm.md
index 3e68711814..51364649cc 100644
--- a/docs/assembler/masm/comm.md
+++ b/docs/assembler/masm/comm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: COMM"
title: "COMM"
ms.date: "12/06/2019"
f1_keywords: ["COMM"]
diff --git a/docs/assembler/masm/comment-masm.md b/docs/assembler/masm/comment-masm.md
index 2cc1e61c81..822bca1448 100644
--- a/docs/assembler/masm/comment-masm.md
+++ b/docs/assembler/masm/comment-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: COMMENT"
title: "COMMENT (MASM)"
ms.date: "12/17/2019"
f1_keywords: ["Comment"]
diff --git a/docs/assembler/masm/db.md b/docs/assembler/masm/db.md
index 1ae16274ad..0648326174 100644
--- a/docs/assembler/masm/db.md
+++ b/docs/assembler/masm/db.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: DB"
title: "DB"
ms.date: "12/17/2019"
f1_keywords: ["DB"]
diff --git a/docs/assembler/masm/dd.md b/docs/assembler/masm/dd.md
index b76c7b92cb..2d8c039db7 100644
--- a/docs/assembler/masm/dd.md
+++ b/docs/assembler/masm/dd.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: DD"
title: "DD"
ms.date: "12/17/2019"
f1_keywords: ["dd"]
diff --git a/docs/assembler/masm/df.md b/docs/assembler/masm/df.md
index d65b52f278..9628effe71 100644
--- a/docs/assembler/masm/df.md
+++ b/docs/assembler/masm/df.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: DF"
title: "DF"
ms.date: "12/17/2019"
f1_keywords: ["DF"]
diff --git a/docs/assembler/masm/directives-reference.md b/docs/assembler/masm/directives-reference.md
index 3a2b41e0f2..c9f7208c7d 100644
--- a/docs/assembler/masm/directives-reference.md
+++ b/docs/assembler/masm/directives-reference.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Directives Reference"
title: "Directives Reference"
ms.date: 07/15/2020
f1_keywords: ["Directives Reference"]
@@ -11,13 +12,18 @@ ms.assetid: da6efcd1-18f7-41de-81cd-a002a02f9a22
:::row:::
:::column span="":::
- [`.ALLOCSTACK`](dot-allocstack.md)
[`.ENDPROLOG`](dot-endprolog.md)
[`PROC`](proc.md)
+ [`.ALLOCSTACK`](dot-allocstack.md)\
+ [`.ENDPROLOG`](dot-endprolog.md)\
+ [`PROC`](proc.md)
:::column-end:::
:::column span="":::
- [`.PUSHFRAME`](dot-pushframe.md)
[`.PUSHREG`](dot-pushreg.md)
[`.SAVEREG`](dot-savereg.md)
+ [`.PUSHFRAME`](dot-pushframe.md)\
+ [`.PUSHREG`](dot-pushreg.md)\
+ [`.SAVEREG`](dot-savereg.md)
:::column-end:::
:::column span="":::
- [`.SAVEXMM128`](dot-savexmm128.md)
[`.SETFRAME`](dot-setframe.md)
+ [`.SAVEXMM128`](dot-savexmm128.md)\
+ [`.SETFRAME`](dot-setframe.md)
:::column-end:::
:::row-end:::
@@ -25,7 +31,8 @@ ms.assetid: da6efcd1-18f7-41de-81cd-a002a02f9a22
:::row:::
:::column span="":::
- [`ALIGN`](align-masm.md)
[`EVEN`](even.md)
+ [`ALIGN`](align-masm.md)\
+ [`EVEN`](even.md)
:::column-end:::
:::column span="":::
[`LABEL`](label-masm.md)
@@ -39,13 +46,24 @@ ms.assetid: da6efcd1-18f7-41de-81cd-a002a02f9a22
:::row:::
:::column span="":::
- [`ELSE`](else-masm.md)
[`ELSEIF`](elseif-masm.md)
[`ELSEIF2`](elseif2.md)
[`IF`](if-masm.md)
[`IF2`](if2.md)
+ [`ELSE`](else-masm.md)\
+ [`ELSEIF`](elseif-masm.md)\
+ [`ELSEIF2`](elseif2.md)\
+ [`IF`](if-masm.md)\
+ [`IF2`](if2.md)
:::column-end:::
:::column span="":::
- [`IFB`](ifb.md)
[`IFNB`](ifnb.md)
[`IFDEF`](ifdef.md)
[`IFNDEF`](ifndef.md)
[`IFDIF`](ifdif.md)
+ [`IFB`](ifb.md)\
+ [`IFNB`](ifnb.md)\
+ [`IFDEF`](ifdef.md)\
+ [`IFNDEF`](ifndef.md)\
+ [`IFDIF`](ifdif.md)
:::column-end:::
:::column span="":::
- [`IFDIFI`](ifdif.md)
[`IFE`](ife.md)
[`IFIDN`](ifidn.md)
[`IFIDNI`](ifidn.md)
+ [`IFDIFI`](ifdif.md)\
+ [`IFE`](ife.md)\
+ [`IFIDN`](ifidn.md)\
+ [`IFIDNI`](ifidn.md)
:::column-end:::
:::row-end:::
@@ -53,13 +71,21 @@ ms.assetid: da6efcd1-18f7-41de-81cd-a002a02f9a22
:::row:::
:::column span="":::
- [`.BREAK`](dot-break.md)
[`.CONTINUE`](dot-continue.md)
[`.ELSE`](dot-else.md)
[`.ELSEIF`](dot-if.md)
+ [`.BREAK`](dot-break.md)\
+ [`.CONTINUE`](dot-continue.md)\
+ [`.ELSE`](dot-else.md)\
+ [`.ELSEIF`](dot-if.md)
:::column-end:::
:::column span="":::
- [`.ENDIF`](dot-endif.md)
[`.ENDW`](dot-endw.md)
[`.IF`](dot-if.md)
[`.REPEAT`](dot-repeat.md)
+ [`.ENDIF`](dot-endif.md)\
+ [`.ENDW`](dot-endw.md)\
+ [`.IF`](dot-if.md)\
+ [`.REPEAT`](dot-repeat.md)
:::column-end:::
:::column span="":::
- [`.UNTIL`](dot-until.md)
[`.UNTILCXZ`](dot-untilcxz.md)
[`.WHILE`](dot-while.md)
+ [`.UNTIL`](dot-until.md)\
+ [`.UNTILCXZ`](dot-untilcxz.md)\
+ [`.WHILE`](dot-while.md)
:::column-end:::
:::row-end:::
@@ -67,13 +93,22 @@ ms.assetid: da6efcd1-18f7-41de-81cd-a002a02f9a22
:::row:::
:::column span="":::
- [`.ERR`](dot-err.md)
[`.ERR2`](dot-err2.md)
[`.ERRB`](dot-errb.md)
[`.ERRDEF`](dot-errdef.md)
+ [`.ERR`](dot-err.md)\
+ [`.ERR2`](dot-err2.md)\
+ [`.ERRB`](dot-errb.md)\
+ [`.ERRDEF`](dot-errdef.md)
:::column-end:::
:::column span="":::
- [`.ERRDIF`](dot-errdif.md)
[`.ERRDIFI`](dot-errdif.md)
[`.ERRE`](dot-erre.md)
[`.ERRIDN`](dot-erridn.md)
+ [`.ERRDIF`](dot-errdif.md)\
+ [`.ERRDIFI`](dot-errdif.md)\
+ [`.ERRE`](dot-erre.md)\
+ [`.ERRIDN`](dot-erridn.md)
:::column-end:::
:::column span="":::
- [`.ERRIDNI`](dot-erridn.md)
[`.ERRNB`](dot-errnb.md)
[`.ERRNDEF`](dot-errndef.md)
[`.ERRNZ`](dot-errnz.md)
+ [`.ERRIDNI`](dot-erridn.md)\
+ [`.ERRNB`](dot-errnb.md)\
+ [`.ERRNDEF`](dot-errndef.md)\
+ [`.ERRNZ`](dot-errnz.md)
:::column-end:::
:::row-end:::
@@ -81,13 +116,26 @@ ms.assetid: da6efcd1-18f7-41de-81cd-a002a02f9a22
:::row:::
:::column span="":::
- [`ALIGN`](align-masm.md)
[`BYTE`](byte-masm.md)
[`SBYTE`](sbyte-masm.md)
[`DWORD`](dword.md)
[`SDWORD`](sdword.md)
[`EVEN`](even.md)
+ [`ALIGN`](align-masm.md)\
+ [`BYTE`](byte-masm.md)\
+ [`SBYTE`](sbyte-masm.md)\
+ [`DWORD`](dword.md)\
+ [`SDWORD`](sdword.md)\
+ [`EVEN`](even.md)
:::column-end:::
:::column span="":::
- [`FWORD`](fword.md)
[`LABEL`](label-masm.md)
[`ORG`](org.md)
[`QWORD`](qword.md)
[`REAL4`](real4.md)
+ [`FWORD`](fword.md)\
+ [`LABEL`](label-masm.md)\
+ [`ORG`](org.md)\
+ [`QWORD`](qword.md)\
+ [`REAL4`](real4.md)
:::column-end:::
:::column span="":::
- [`REAL8`](real8.md)
[`REAL10`](real10.md)
[`TBYTE`](tbyte.md)
[`WORD`](word.md)
[`SWORD`](sword.md)
+ [`REAL8`](real8.md)\
+ [`REAL10`](real10.md)\
+ [`TBYTE`](tbyte.md)\
+ [`WORD`](word.md)\
+ [`SWORD`](sword.md)
:::column-end:::
:::row-end:::
@@ -109,13 +157,24 @@ ms.assetid: da6efcd1-18f7-41de-81cd-a002a02f9a22
:::row:::
:::column span="":::
- [`.CREF`](dot-cref.md)
[`.LIST`](dot-list.md)
[`.LISTALL`](dot-listall.md)
[`.LISTIF`](dot-listif.md)
[`.LISTMACRO`](dot-listmacro.md)
+ [`.CREF`](dot-cref.md)\
+ [`.LIST`](dot-list.md)\
+ [`.LISTALL`](dot-listall.md)\
+ [`.LISTIF`](dot-listif.md)\
+ [`.LISTMACRO`](dot-listmacro.md)
:::column-end:::
:::column span="":::
- [`.LISTMACROALL`](dot-listmacroall.md)
[`.NOCREF`](dot-nocref.md)
[`.NOLIST`](dot-nolist.md)
[`.NOLISTIF`](dot-nolistif.md)
[`.NOLISTMACRO`](dot-nolistmacro.md)
+ [`.LISTMACROALL`](dot-listmacroall.md)\
+ [`.NOCREF`](dot-nocref.md)\
+ [`.NOLIST`](dot-nolist.md)\
+ [`.NOLISTIF`](dot-nolistif.md)\
+ [`.NOLISTMACRO`](dot-nolistmacro.md)
:::column-end:::
:::column span="":::
- [`PAGE`](page.md)
[`SUBTITLE`](subtitle.md)
[`.TFCOND`](dot-tfcond.md)
[`TITLE`](title.md)
+ [`PAGE`](page.md)\
+ [`SUBTITLE`](subtitle.md)\
+ [`.TFCOND`](dot-tfcond.md)\
+ [`TITLE`](title.md)
:::column-end:::
:::row-end:::
@@ -123,29 +182,43 @@ ms.assetid: da6efcd1-18f7-41de-81cd-a002a02f9a22
:::row:::
:::column span="":::
- [`ENDM`](endm.md)
[`EXITM`](exitm.md)
+ [`ENDM`](endm.md)\
+ [`EXITM`](exitm.md)
:::column-end:::
:::column span="":::
- [`GOTO`](goto-masm.md)
[`LOCAL`](local-masm.md)
+ [`GOTO`](goto-masm.md)\
+ [`LOCAL`](local-masm.md)
:::column-end:::
:::column span="":::
- [`MACRO`](macro.md)
[`PURGE`](purge.md)
+ [`MACRO`](macro.md)\
+ [`PURGE`](purge.md)
:::column-end:::
:::row-end:::
-
-
## Miscellaneous
:::row:::
:::column span="":::
- [`ALIAS`](alias-masm.md)
[`ASSUME`](assume.md)
[`COMMENT`](comment-masm.md)
[`ECHO`](echo.md)
[`END`](end-masm.md)
[`.FPO`](dot-fpo.md)
+ [`ALIAS`](alias-masm.md)\
+ [`ASSUME`](assume.md)\
+ [`COMMENT`](comment-masm.md)\
+ [`ECHO`](echo.md)\
+ [`END`](end-masm.md)\
+ [`.FPO`](dot-fpo.md)
:::column-end:::
:::column span="":::
- [`INCLUDE`](include-masm.md)
[`INCLUDELIB`](includelib-masm.md)
[`MMWORD`](mmword.md)
[`OPTION`](option-masm.md)
[`POPCONTEXT`](popcontext.md)
+ [`INCLUDE`](include-masm.md)\
+ [`INCLUDELIB`](includelib-masm.md)\
+ [`MMWORD`](mmword.md)\
+ [`OPTION`](option-masm.md)\
+ [`POPCONTEXT`](popcontext.md)
:::column-end:::
:::column span="":::
- [`PUSHCONTEXT`](pushcontext.md)
[`.RADIX`](dot-radix.md)
[`.SAFESEH`](dot-safeseh.md)
[`XMMWORD`](xmmword.md)
[`YMMWORD`](ymmword.md)
+ [`PUSHCONTEXT`](pushcontext.md)\
+ [`.RADIX`](dot-radix.md)\
+ [`.SAFESEH`](dot-safeseh.md)\
+ [`XMMWORD`](xmmword.md)\
+ [`YMMWORD`](ymmword.md)
:::column-end:::
:::row-end:::
@@ -153,7 +226,8 @@ ms.assetid: da6efcd1-18f7-41de-81cd-a002a02f9a22
:::row:::
:::column span="":::
- [`ENDP`](endp.md)
[`INVOKE`](invoke.md)
+ [`ENDP`](endp.md)\
+ [`INVOKE`](invoke.md)
:::column-end:::
:::column span="":::
[`PROC`](proc.md)
@@ -167,13 +241,22 @@ ms.assetid: da6efcd1-18f7-41de-81cd-a002a02f9a22
:::row:::
:::column span="":::
- [`.386`](dot-386.md)
[`.386P`](dot-386p.md)
[`.387`](dot-387.md)
[`.486`](dot-486.md)
+ [`.386`](dot-386.md)\
+ [`.386P`](dot-386p.md)\
+ [`.387`](dot-387.md)\
+ [`.486`](dot-486.md)
:::column-end:::
:::column span="":::
- [`.486P`](dot-486p.md)
[`.586`](dot-586.md)
[`.586P`](dot-586p.md)
[`.686`](dot-686.md)
+ [`.486P`](dot-486p.md)\
+ [`.586`](dot-586.md)\
+ [`.586P`](dot-586p.md)\
+ [`.686`](dot-686.md)
:::column-end:::
:::column span="":::
- [`.686P`](dot-686p.md)
[`.K3D`](dot-k3d.md)
[`.MMX`](dot-mmx.md)
[`.XMM`](dot-xmm.md)
+ [`.686P`](dot-686p.md)\
+ [`.K3D`](dot-k3d.md)\
+ [`.MMX`](dot-mmx.md)\
+ [`.XMM`](dot-xmm.md)
:::column-end:::
:::row-end:::
@@ -181,13 +264,16 @@ ms.assetid: da6efcd1-18f7-41de-81cd-a002a02f9a22
:::row:::
:::column span="":::
- [`ENDM`](endm.md)
[`FOR`](for-masm.md)
+ [`ENDM`](endm.md)\
+ [`FOR`](for-masm.md)
:::column-end:::
:::column span="":::
- [`FORC`](forc.md)
[`GOTO`](goto-masm.md)
+ [`FORC`](forc.md)\
+ [`GOTO`](goto-masm.md)
:::column-end:::
:::column span="":::
- [`REPEAT`](repeat.md)
[`WHILE`](while-masm.md)
+ [`REPEAT`](repeat.md)\
+ [`WHILE`](while-masm.md)
:::column-end:::
:::row-end:::
@@ -195,10 +281,12 @@ ms.assetid: da6efcd1-18f7-41de-81cd-a002a02f9a22
:::row:::
:::column span="":::
- [`COMM`](comm.md)
[`EXTERN`](extern-masm.md)
+ [`COMM`](comm.md)\
+ [`EXTERN`](extern-masm.md)
:::column-end:::
:::column span="":::
- [`EXTERNDEF`](externdef.md)
[`INCLUDELIB`](includelib-masm.md)
+ [`EXTERNDEF`](externdef.md)\
+ [`INCLUDELIB`](includelib-masm.md)
:::column-end:::
:::column span="":::
[`PUBLIC`](public-masm.md)
@@ -209,13 +297,18 @@ ms.assetid: da6efcd1-18f7-41de-81cd-a002a02f9a22
:::row:::
:::column span="":::
- [`.ALPHA`](dot-alpha.md)
[`ASSUME`](assume.md)
[`.DOSSEG`](dot-dosseg.md)
+ [`.ALPHA`](dot-alpha.md)\
+ [`ASSUME`](assume.md)\
+ [`.DOSSEG`](dot-dosseg.md)
:::column-end:::
:::column span="":::
- [`END`](end-masm.md)
[`ENDS`](ends-masm.md)
[`GROUP`](group.md)
+ [`END`](end-masm.md)\
+ [`ENDS`](ends-masm.md)\
+ [`GROUP`](group.md)
:::column-end:::
:::column span="":::
- [`SEGMENT`](segment.md)
[`.SEQ`](dot-seq.md)
+ [`SEGMENT`](segment.md)\
+ [`.SEQ`](dot-seq.md)
:::column-end:::
:::row-end:::
@@ -223,13 +316,21 @@ ms.assetid: da6efcd1-18f7-41de-81cd-a002a02f9a22
:::row:::
:::column span="":::
- [`.CODE`](dot-code.md)
[`.CONST`](dot-const.md)
[`.DATA`](dot-data.md)
[`.DATA?`](dot-data-q.md)
+ [`.CODE`](dot-code.md)\
+ [`.CONST`](dot-const.md)\
+ [`.DATA`](dot-data.md)\
+ [`.DATA?`](dot-data-q.md)
:::column-end:::
:::column span="":::
- [`.DOSSEG`](dot-dosseg.md)
[`.EXIT`](dot-exit.md)
[`.FARDATA`](dot-fardata.md)
[`.FARDATA?`](dot-fardata-q.md)
+ [`.DOSSEG`](dot-dosseg.md)\
+ [`.EXIT`](dot-exit.md)\
+ [`.FARDATA`](dot-fardata.md)\
+ [`.FARDATA?`](dot-fardata-q.md)
:::column-end:::
:::column span="":::
- [`.MODEL`](dot-model.md)
[`.STACK`](dot-stack.md)
[`.STARTUP`](dot-startup.md)
+ [`.MODEL`](dot-model.md)\
+ [`.STACK`](dot-stack.md)\
+ [`.STARTUP`](dot-startup.md)
:::column-end:::
:::row-end:::
@@ -237,7 +338,8 @@ ms.assetid: da6efcd1-18f7-41de-81cd-a002a02f9a22
:::row:::
:::column span="":::
- [`CATSTR`](catstr.md)
[`INSTR`](instr.md)
+ [`CATSTR`](catstr.md)\
+ [`INSTR`](instr.md)
:::column-end:::
:::column span="":::
[`SIZESTR`](sizestr.md)
@@ -251,10 +353,12 @@ ms.assetid: da6efcd1-18f7-41de-81cd-a002a02f9a22
:::row:::
:::column span="":::
- [`ENDS`](ends-masm.md)
[`RECORD`](record-masm.md)
+ [`ENDS`](ends-masm.md)\
+ [`RECORD`](record-masm.md)
:::column-end:::
:::column span="":::
- [`STRUCT`](struct-masm.md)
[`TYPEDEF`](typedef-masm.md)
+ [`STRUCT`](struct-masm.md)\
+ [`TYPEDEF`](typedef-masm.md)
:::column-end:::
:::column span="":::
[`UNION`](union.md)
diff --git a/docs/assembler/masm/dollar.md b/docs/assembler/masm/dollar.md
index 4f9de0f6a7..b9d356c40c 100644
--- a/docs/assembler/masm/dollar.md
+++ b/docs/assembler/masm/dollar.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: $"
title: "$"
ms.date: "12/17/2019"
f1_keywords: ["$"]
diff --git a/docs/assembler/masm/dosseg.md b/docs/assembler/masm/dosseg.md
index d8cc6437d8..95f4f18a78 100644
--- a/docs/assembler/masm/dosseg.md
+++ b/docs/assembler/masm/dosseg.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: DOSSEG"
title: "DOSSEG"
ms.date: "12/17/2019"
f1_keywords: ["DOSSEG"]
diff --git a/docs/assembler/masm/dot-386.md b/docs/assembler/masm/dot-386.md
index aed5b9a4f5..b4dbcf437b 100644
--- a/docs/assembler/masm/dot-386.md
+++ b/docs/assembler/masm/dot-386.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .386 (32-bit MASM)"
title: ".386"
ms.date: "11/05/2019"
f1_keywords: [".386"]
diff --git a/docs/assembler/masm/dot-386p.md b/docs/assembler/masm/dot-386p.md
index e4cb896cf0..3029ae40f4 100644
--- a/docs/assembler/masm/dot-386p.md
+++ b/docs/assembler/masm/dot-386p.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .386P (32-bit MASM)"
title: ".386P"
ms.date: "11/05/2019"
f1_keywords: [".386P"]
diff --git a/docs/assembler/masm/dot-387.md b/docs/assembler/masm/dot-387.md
index 049950aa1c..151a50c1a1 100644
--- a/docs/assembler/masm/dot-387.md
+++ b/docs/assembler/masm/dot-387.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .387 (32-bit MASM)"
title: ".387"
ms.date: "11/05/2019"
f1_keywords: [".387"]
diff --git a/docs/assembler/masm/dot-486.md b/docs/assembler/masm/dot-486.md
index 1ef0298466..2b21fb85ea 100644
--- a/docs/assembler/masm/dot-486.md
+++ b/docs/assembler/masm/dot-486.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .486 (32-bit MASM)"
title: ".486"
ms.date: "11/05/2019"
f1_keywords: [".486"]
diff --git a/docs/assembler/masm/dot-486p.md b/docs/assembler/masm/dot-486p.md
index 58a2fca05b..d5dbb4ce79 100644
--- a/docs/assembler/masm/dot-486p.md
+++ b/docs/assembler/masm/dot-486p.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .486P (32-bit MASM)"
title: ".486P"
ms.date: "11/05/2019"
f1_keywords: [".486P"]
diff --git a/docs/assembler/masm/dot-586.md b/docs/assembler/masm/dot-586.md
index 98f5054039..6a513ad3d6 100644
--- a/docs/assembler/masm/dot-586.md
+++ b/docs/assembler/masm/dot-586.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .586 (32-bit MASM)"
title: ".586"
ms.date: "11/05/2019"
f1_keywords: [".586"]
diff --git a/docs/assembler/masm/dot-586p.md b/docs/assembler/masm/dot-586p.md
index 3ac54e4e9c..503781846a 100644
--- a/docs/assembler/masm/dot-586p.md
+++ b/docs/assembler/masm/dot-586p.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .586P (32-bit MASM)"
title: ".586P"
ms.date: "11/05/2019"
f1_keywords: [".586P"]
diff --git a/docs/assembler/masm/dot-686.md b/docs/assembler/masm/dot-686.md
index a556cc4d1e..d4786a4a06 100644
--- a/docs/assembler/masm/dot-686.md
+++ b/docs/assembler/masm/dot-686.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .686 (32-bit MASM)"
title: ".686"
ms.date: "11/05/2019"
f1_keywords: [".686"]
diff --git a/docs/assembler/masm/dot-686p.md b/docs/assembler/masm/dot-686p.md
index f70e50193a..6587e32bda 100644
--- a/docs/assembler/masm/dot-686p.md
+++ b/docs/assembler/masm/dot-686p.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .686P (32-bit MASM)"
title: ".686P"
ms.date: "11/05/2019"
f1_keywords: [".686P"]
diff --git a/docs/assembler/masm/dot-allocstack.md b/docs/assembler/masm/dot-allocstack.md
index b66e23edc0..13c5e6e114 100644
--- a/docs/assembler/masm/dot-allocstack.md
+++ b/docs/assembler/masm/dot-allocstack.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .ALLOCSTACK"
title: ".ALLOCSTACK"
ms.date: "12/17/2019"
f1_keywords: [".ALLOCSTACK"]
diff --git a/docs/assembler/masm/dot-alpha.md b/docs/assembler/masm/dot-alpha.md
index eec49aea1f..a47dff05c7 100644
--- a/docs/assembler/masm/dot-alpha.md
+++ b/docs/assembler/masm/dot-alpha.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .ALPHA (32-bit MASM)"
title: ".ALPHA"
ms.date: "11/05/2019"
f1_keywords: [".ALPHA"]
diff --git a/docs/assembler/masm/dot-break.md b/docs/assembler/masm/dot-break.md
index 09538b7cd9..d801b4ce75 100644
--- a/docs/assembler/masm/dot-break.md
+++ b/docs/assembler/masm/dot-break.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .BREAK (32-bit MASM)"
title: ".BREAK"
ms.date: "11/05/2019"
f1_keywords: [".BREAK"]
diff --git a/docs/assembler/masm/dot-code.md b/docs/assembler/masm/dot-code.md
index b724dbbca8..9bf447e91b 100644
--- a/docs/assembler/masm/dot-code.md
+++ b/docs/assembler/masm/dot-code.md
@@ -1,19 +1,21 @@
---
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-const.md b/docs/assembler/masm/dot-const.md
index f674ddb4e5..fb5f2b58d6 100644
--- a/docs/assembler/masm/dot-const.md
+++ b/docs/assembler/masm/dot-const.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .CONST (32-bit MASM)"
title: ".CONST"
ms.date: "12/17/2019"
f1_keywords: [".CONST"]
diff --git a/docs/assembler/masm/dot-continue.md b/docs/assembler/masm/dot-continue.md
index dcf49b1cf0..77e7a22a3a 100644
--- a/docs/assembler/masm/dot-continue.md
+++ b/docs/assembler/masm/dot-continue.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .CONTINUE (32-bit MASM)"
title: ".CONTINUE"
ms.date: "11/05/2019"
f1_keywords: [".CONTINUE"]
diff --git a/docs/assembler/masm/dot-cref.md b/docs/assembler/masm/dot-cref.md
index b6c10fd8e8..f289c83950 100644
--- a/docs/assembler/masm/dot-cref.md
+++ b/docs/assembler/masm/dot-cref.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .CREF"
title: ".CREF"
ms.date: "12/17/2019"
f1_keywords: [".CREF"]
diff --git a/docs/assembler/masm/dot-data-q.md b/docs/assembler/masm/dot-data-q.md
index b5479a5039..d033a01c4a 100644
--- a/docs/assembler/masm/dot-data-q.md
+++ b/docs/assembler/masm/dot-data-q.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .DATA?"
title: ".DATA?"
ms.date: "12/17/2019"
f1_keywords: [".DATA?"]
diff --git a/docs/assembler/masm/dot-data.md b/docs/assembler/masm/dot-data.md
index 1aa6881a8e..c36eb3fee1 100644
--- a/docs/assembler/masm/dot-data.md
+++ b/docs/assembler/masm/dot-data.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .DATA"
title: ".DATA"
ms.date: "12/17/2019"
f1_keywords: [".DATA"]
@@ -7,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-dosseg.md b/docs/assembler/masm/dot-dosseg.md
index 3382d6a5ee..13f0330bbc 100644
--- a/docs/assembler/masm/dot-dosseg.md
+++ b/docs/assembler/masm/dot-dosseg.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .DOSSEG (32-bit MASM)"
title: ".DOSSEG"
ms.date: "11/05/2019"
f1_keywords: [".DOSSEG"]
diff --git a/docs/assembler/masm/dot-else.md b/docs/assembler/masm/dot-else.md
index 39af77d231..1632b07c80 100644
--- a/docs/assembler/masm/dot-else.md
+++ b/docs/assembler/masm/dot-else.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .ELSE (32-bit MASM)"
title: ".ELSE"
ms.date: "11/05/2019"
f1_keywords: [".ELSE"]
diff --git a/docs/assembler/masm/dot-endif.md b/docs/assembler/masm/dot-endif.md
index 1f02167acc..8daea685cf 100644
--- a/docs/assembler/masm/dot-endif.md
+++ b/docs/assembler/masm/dot-endif.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .ENDIF (32-bit MASM)"
title: ".ENDIF"
ms.date: "11/05/2019"
f1_keywords: [".ENDIF"]
diff --git a/docs/assembler/masm/dot-endprolog.md b/docs/assembler/masm/dot-endprolog.md
index 1d9307f715..c864e0c849 100644
--- a/docs/assembler/masm/dot-endprolog.md
+++ b/docs/assembler/masm/dot-endprolog.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .ENDPROLOG"
title: ".ENDPROLOG"
ms.date: "12/17/2019"
f1_keywords: [".ENDPROLOG"]
diff --git a/docs/assembler/masm/dot-endw.md b/docs/assembler/masm/dot-endw.md
index fcf613932a..eb6769ad0f 100644
--- a/docs/assembler/masm/dot-endw.md
+++ b/docs/assembler/masm/dot-endw.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .ENDW (32-bit MASM)"
title: ".ENDW"
ms.date: "11/05/2019"
f1_keywords: [".ENDW"]
diff --git a/docs/assembler/masm/dot-err.md b/docs/assembler/masm/dot-err.md
index 7b2614813e..2bae97f8be 100644
--- a/docs/assembler/masm/dot-err.md
+++ b/docs/assembler/masm/dot-err.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: `.ERR`"
title: ".ERR"
ms.date: "12/17/2019"
f1_keywords: [".ERR"]
diff --git a/docs/assembler/masm/dot-err2.md b/docs/assembler/masm/dot-err2.md
index 673f6cf5c5..825a14ba4e 100644
--- a/docs/assembler/masm/dot-err2.md
+++ b/docs/assembler/masm/dot-err2.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .ERR2"
title: ".ERR2"
ms.date: "12/17/2019"
f1_keywords: [".ERR2"]
diff --git a/docs/assembler/masm/dot-errb.md b/docs/assembler/masm/dot-errb.md
index 61f6042e83..3d414a3d03 100644
--- a/docs/assembler/masm/dot-errb.md
+++ b/docs/assembler/masm/dot-errb.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .ERRB"
title: ".ERRB"
ms.date: "12/17/2019"
f1_keywords: [".ERRB"]
diff --git a/docs/assembler/masm/dot-errdef.md b/docs/assembler/masm/dot-errdef.md
index 36a4b41005..a7a7106c41 100644
--- a/docs/assembler/masm/dot-errdef.md
+++ b/docs/assembler/masm/dot-errdef.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .ERRDEF"
title: ".ERRDEF"
ms.date: "12/17/2019"
f1_keywords: [".ERRDEF"]
diff --git a/docs/assembler/masm/dot-errdif.md b/docs/assembler/masm/dot-errdif.md
index 648ab2182c..726624195f 100644
--- a/docs/assembler/masm/dot-errdif.md
+++ b/docs/assembler/masm/dot-errdif.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .ERRDIF, .ERRDIFI"
title: ".ERRDIF, .ERRDIFI"
ms.date: "05/23/2019"
f1_keywords: [".ERRDIF", ".ERRDIFI"]
diff --git a/docs/assembler/masm/dot-erre.md b/docs/assembler/masm/dot-erre.md
index 1a7b5afcb7..219a1a1688 100644
--- a/docs/assembler/masm/dot-erre.md
+++ b/docs/assembler/masm/dot-erre.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .ERRE"
title: ".ERRE"
ms.date: "12/17/2019"
f1_keywords: [".ERRE"]
diff --git a/docs/assembler/masm/dot-erridn.md b/docs/assembler/masm/dot-erridn.md
index c7b2c9fd60..35421fa294 100644
--- a/docs/assembler/masm/dot-erridn.md
+++ b/docs/assembler/masm/dot-erridn.md
@@ -1,22 +1,23 @@
---
-title: ".ERRIDN, .ERRIDNI"
+description: "Learn more about: `.ERRIDN`, `.ERRIDNI`"
+title: "'.ERRIDN', '.ERRIDNI'"
ms.date: "05/23/2019"
f1_keywords: [".ERRIDN", ".ERRIDNI"]
helpviewer_keywords: [".ERRIDN directive", ".ERRIDNI directive"]
ms.assetid: 89507db3-7d40-4a5e-a378-24d30feda9d1
---
-# .ERRIDN, .ERRIDNI
+# `.ERRIDN`, `.ERRIDNI`
Generates an error if the text items are identical.
## Syntax
-> **.ERRIDN** *textitem1*__,__ *textitem2* ⟦__,__ *message*⟧\
-> **.ERRIDNI** *textitem1*__,__ *textitem2* ⟦__,__ *message*⟧
+> **`.ERRIDN`** *textitem1*__,__ *textitem2* ⟦__,__ *message*⟧\
+> **`.ERRIDNI`** *textitem1*__,__ *textitem2* ⟦__,__ *message*⟧
## Remarks
-If **.ERRIDNI** is given, the comparison is case insensitive.
+If **`.ERRIDNI`** is given, the comparison is case insensitive.
## See also
diff --git a/docs/assembler/masm/dot-errnb.md b/docs/assembler/masm/dot-errnb.md
index 49d18c2eee..46a545e29e 100644
--- a/docs/assembler/masm/dot-errnb.md
+++ b/docs/assembler/masm/dot-errnb.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .ERRNB"
title: ".ERRNB"
ms.date: "12/17/2019"
f1_keywords: [".ERRNB"]
diff --git a/docs/assembler/masm/dot-errndef.md b/docs/assembler/masm/dot-errndef.md
index 8dba23541b..4f3a4129b4 100644
--- a/docs/assembler/masm/dot-errndef.md
+++ b/docs/assembler/masm/dot-errndef.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .ERRNDEF"
title: ".ERRNDEF"
ms.date: "12/17/2019"
f1_keywords: [".ERRNDEF"]
diff --git a/docs/assembler/masm/dot-errnz.md b/docs/assembler/masm/dot-errnz.md
index 239b93a404..5275bf4d61 100644
--- a/docs/assembler/masm/dot-errnz.md
+++ b/docs/assembler/masm/dot-errnz.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: `.ERRNZ`"
title: ".ERRNZ"
ms.date: "12/17/2019"
f1_keywords: [".ERRNZ"]
diff --git a/docs/assembler/masm/dot-exit.md b/docs/assembler/masm/dot-exit.md
index cdd56a8296..5f466bdc81 100644
--- a/docs/assembler/masm/dot-exit.md
+++ b/docs/assembler/masm/dot-exit.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .EXIT (32-bit MASM)"
title: ".EXIT"
ms.date: "11/05/2019"
f1_keywords: [".EXIT"]
diff --git a/docs/assembler/masm/dot-fardata-q.md b/docs/assembler/masm/dot-fardata-q.md
index ce54b47c98..b49cd14fb6 100644
--- a/docs/assembler/masm/dot-fardata-q.md
+++ b/docs/assembler/masm/dot-fardata-q.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .FARDATA? (32-bit MASM)"
title: ".FARDATA?"
ms.date: "11/05/2019"
f1_keywords: [".FARDATA?"]
diff --git a/docs/assembler/masm/dot-fardata.md b/docs/assembler/masm/dot-fardata.md
index a25ea12a7c..9e2bbcb4d5 100644
--- a/docs/assembler/masm/dot-fardata.md
+++ b/docs/assembler/masm/dot-fardata.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .FARDATA (32-bit MASM)"
title: ".FARDATA"
ms.date: "11/05/2019"
f1_keywords: [".FARDATA"]
diff --git a/docs/assembler/masm/dot-fpo.md b/docs/assembler/masm/dot-fpo.md
index 7c754515bf..7c70aab623 100644
--- a/docs/assembler/masm/dot-fpo.md
+++ b/docs/assembler/masm/dot-fpo.md
@@ -1,37 +1,37 @@
---
+description: "Learn more about: .FPO (32-bit MASM)"
title: ".FPO"
ms.date: "11/05/2019"
f1_keywords: [".FPO"]
helpviewer_keywords: [".FPO directive"]
-ms.assetid: 35f4cd61-32f9-4262-b657-73f04f775d09
---
# .FPO (32-bit MASM)
-The **.FPO** directive controls the emission of debug records to the .debug$F segment or section. (32-bit MASM only.)
+The `.FPO` directive controls the emission of debug records to the `.debug$F` segment or section. Use this directive with 32-bit MASM only.
## Syntax
-> **.FPO** (*cdwLocals*, *cdwParams*, *cbProlog*, *cbRegs*, *fUseBP*, *cbFrame*)
+> `.FPO` (*`cdwLocals`*, *`cdwParams`*, *`cbProlog`*, *`cbRegs`*, *`fUseBP`*, *`cbFrame`*)
### Parameters
-*cdwLocals*\
-Number of local variables, an unsigned 32 bit value.
+*`cdwLocals`*\
+Number of local variables, an unsigned 32-bit value.
-*cdwParams*\
-Size of the parameters in DWORDS, an unsigned 16 bit value.
+*`cdwParams`*\
+Size of the parameters in DWORDS, an unsigned 16-bit value.
-*cbProlog*\
-Number of bytes in the function prolog code, an unsigned 8 bit value.
+*`cbProlog`*\
+Number of bytes in the function prolog code, an unsigned 8-bit value.
-*cbRegs*\
+*`cbRegs`*\
Number registers saved.
-*fUseBP*\
-Indicates whether the EBP register has been allocated. either 0 or 1.
+*`fUseBP`*\
+Indicates whether the EBP register is allocated. Use either 0 or 1.
-*cbFrame*\
-Indicates the frame type. See [FPO_DATA](/windows/win32/api/winnt/ns-winnt-fpo_data) for more information.
+*`cbFrame`*\
+Indicates the frame type. For more information, see [`FPO_DATA`](/windows/win32/api/winnt/ns-winnt-fpo_data).
## See also
diff --git a/docs/assembler/masm/dot-if.md b/docs/assembler/masm/dot-if.md
index 56136b18b7..65c9610670 100644
--- a/docs/assembler/masm/dot-if.md
+++ b/docs/assembler/masm/dot-if.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .IF (32-bit MASM)"
title: ".IF"
ms.date: "11/05/2019"
f1_keywords: [".IF"]
diff --git a/docs/assembler/masm/dot-k3d.md b/docs/assembler/masm/dot-k3d.md
index d749c68339..173b6d3e95 100644
--- a/docs/assembler/masm/dot-k3d.md
+++ b/docs/assembler/masm/dot-k3d.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .K3D (32-bit MASM)"
title: ".K3D"
ms.date: "11/05/2019"
f1_keywords: [".K3D"]
diff --git a/docs/assembler/masm/dot-lall.md b/docs/assembler/masm/dot-lall.md
index 5a4908d10d..bc0af46d7b 100644
--- a/docs/assembler/masm/dot-lall.md
+++ b/docs/assembler/masm/dot-lall.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .LALL"
title: ".LALL"
ms.date: "12/17/2019"
f1_keywords: [".LALL"]
diff --git a/docs/assembler/masm/dot-lfcond.md b/docs/assembler/masm/dot-lfcond.md
index 319e02505d..d181c262ef 100644
--- a/docs/assembler/masm/dot-lfcond.md
+++ b/docs/assembler/masm/dot-lfcond.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .LFCOND"
title: ".LFCOND"
ms.date: "12/17/2019"
f1_keywords: [".LFCOND"]
diff --git a/docs/assembler/masm/dot-list.md b/docs/assembler/masm/dot-list.md
index 46ad8fe9e1..e521914a91 100644
--- a/docs/assembler/masm/dot-list.md
+++ b/docs/assembler/masm/dot-list.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .LIST"
title: ".LIST"
ms.date: "12/17/2019"
f1_keywords: [".LIST"]
diff --git a/docs/assembler/masm/dot-listall.md b/docs/assembler/masm/dot-listall.md
index 5f8d1b7119..12becc0b8b 100644
--- a/docs/assembler/masm/dot-listall.md
+++ b/docs/assembler/masm/dot-listall.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .LISTALL"
title: ".LISTALL"
ms.date: "12/17/2019"
f1_keywords: [".LISTALL"]
diff --git a/docs/assembler/masm/dot-listif.md b/docs/assembler/masm/dot-listif.md
index e61f62dfcc..96be871841 100644
--- a/docs/assembler/masm/dot-listif.md
+++ b/docs/assembler/masm/dot-listif.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .LISTIF"
title: ".LISTIF"
ms.date: "12/17/2019"
f1_keywords: [".LISTIF"]
diff --git a/docs/assembler/masm/dot-listmacro.md b/docs/assembler/masm/dot-listmacro.md
index 99337913a2..23eb476543 100644
--- a/docs/assembler/masm/dot-listmacro.md
+++ b/docs/assembler/masm/dot-listmacro.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .LISTMACRO"
title: ".LISTMACRO"
ms.date: "12/17/2019"
f1_keywords: [".LISTMACRO"]
diff --git a/docs/assembler/masm/dot-listmacroall.md b/docs/assembler/masm/dot-listmacroall.md
index 124eb64773..1fa4872b5e 100644
--- a/docs/assembler/masm/dot-listmacroall.md
+++ b/docs/assembler/masm/dot-listmacroall.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .LISTMACROALL"
title: ".LISTMACROALL"
ms.date: "12/17/2019"
f1_keywords: [".LISTMACROALL"]
diff --git a/docs/assembler/masm/dot-mmx.md b/docs/assembler/masm/dot-mmx.md
index 5661807cd3..61bcbf63de 100644
--- a/docs/assembler/masm/dot-mmx.md
+++ b/docs/assembler/masm/dot-mmx.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .MMX (32-bit MASM)"
title: ".MMX"
ms.date: "11/05/2019"
f1_keywords: [".MMX"]
diff --git a/docs/assembler/masm/dot-model.md b/docs/assembler/masm/dot-model.md
index b4dcae5815..46a96135aa 100644
--- a/docs/assembler/masm/dot-model.md
+++ b/docs/assembler/masm/dot-model.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .MODEL (32-bit MASM)"
title: ".MODEL"
ms.date: "11/05/2019"
f1_keywords: [".MODEL"]
@@ -42,7 +43,7 @@ The following table lists the possible values for each parameter when targeting
## Code
-For MASM-related samples, download the Compiler samples from [Visual C++ Samples and Related Documentation for Visual Studio 2010](https://go.microsoft.com/fwlink/p/?linkid=178749).
+For MASM-related samples, download the Compiler samples from [Visual C++ Samples and Related Documentation for Visual Studio 2010](https://github.com/Microsoft/vcsamples).
The following example demonstrates the use of the `.MODEL` directive.
diff --git a/docs/assembler/masm/dot-nocref.md b/docs/assembler/masm/dot-nocref.md
index b1348caa03..17cdaa3823 100644
--- a/docs/assembler/masm/dot-nocref.md
+++ b/docs/assembler/masm/dot-nocref.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .NOCREF"
title: ".NOCREF"
ms.date: "12/17/2019"
f1_keywords: [".NOCREF"]
diff --git a/docs/assembler/masm/dot-nolist.md b/docs/assembler/masm/dot-nolist.md
index 239ee215b8..738898fb8c 100644
--- a/docs/assembler/masm/dot-nolist.md
+++ b/docs/assembler/masm/dot-nolist.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .NOLIST"
title: ".NOLIST"
ms.date: "12/17/2019"
f1_keywords: [".NOLIST"]
diff --git a/docs/assembler/masm/dot-nolistif.md b/docs/assembler/masm/dot-nolistif.md
index c16fc60f1c..37703a53fb 100644
--- a/docs/assembler/masm/dot-nolistif.md
+++ b/docs/assembler/masm/dot-nolistif.md
@@ -1,9 +1,9 @@
---
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
@@ -19,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/dot-nolistmacro.md b/docs/assembler/masm/dot-nolistmacro.md
index 0cb43a6606..0d4184d5f3 100644
--- a/docs/assembler/masm/dot-nolistmacro.md
+++ b/docs/assembler/masm/dot-nolistmacro.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .NOLISTMACRO"
title: ".NOLISTMACRO"
ms.date: "12/17/2019"
f1_keywords: [".NOLISTMACRO"]
diff --git a/docs/assembler/masm/dot-pushreg.md b/docs/assembler/masm/dot-pushreg.md
index cb9b34d911..a433f688d6 100644
--- a/docs/assembler/masm/dot-pushreg.md
+++ b/docs/assembler/masm/dot-pushreg.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .PUSHREG"
title: ".PUSHREG"
ms.date: "12/16/2019"
f1_keywords: [".PUSHREG"]
diff --git a/docs/assembler/masm/dot-radix.md b/docs/assembler/masm/dot-radix.md
index 660d40b02f..911da7e83b 100644
--- a/docs/assembler/masm/dot-radix.md
+++ b/docs/assembler/masm/dot-radix.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .RADIX"
title: ".RADIX"
ms.date: "12/17/2019"
f1_keywords: [".RADIX"]
diff --git a/docs/assembler/masm/dot-repeat.md b/docs/assembler/masm/dot-repeat.md
index 5d83446148..7401234002 100644
--- a/docs/assembler/masm/dot-repeat.md
+++ b/docs/assembler/masm/dot-repeat.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .REPEAT (32-bit MASM)"
title: ".REPEAT"
ms.date: "11/05/2019"
f1_keywords: [".REPEAT"]
diff --git a/docs/assembler/masm/dot-safeseh.md b/docs/assembler/masm/dot-safeseh.md
index 201350f574..c8c354c906 100644
--- a/docs/assembler/masm/dot-safeseh.md
+++ b/docs/assembler/masm/dot-safeseh.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .SAFESEH (32-bit MASM)"
title: ".SAFESEH"
ms.date: "11/05/2019"
f1_keywords: [".SAFESEH"]
diff --git a/docs/assembler/masm/dot-sall.md b/docs/assembler/masm/dot-sall.md
index e9d9acc3b5..a8359e3ba4 100644
--- a/docs/assembler/masm/dot-sall.md
+++ b/docs/assembler/masm/dot-sall.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .SALL"
title: ".SALL"
ms.date: "12/17/2019"
f1_keywords: [".SALL"]
diff --git a/docs/assembler/masm/dot-savereg.md b/docs/assembler/masm/dot-savereg.md
index f0ab168d62..a786f88777 100644
--- a/docs/assembler/masm/dot-savereg.md
+++ b/docs/assembler/masm/dot-savereg.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .SAVEREG"
title: ".SAVEREG"
ms.date: "12/16/2019"
f1_keywords: [".SAVEREG"]
diff --git a/docs/assembler/masm/dot-savexmm128.md b/docs/assembler/masm/dot-savexmm128.md
index 1ef86aa9e4..6a914c5547 100644
--- a/docs/assembler/masm/dot-savexmm128.md
+++ b/docs/assembler/masm/dot-savexmm128.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .SAVEXMM128"
title: ".SAVEXMM128"
ms.date: "12/17/2019"
f1_keywords: [".SAVEXMM128"]
diff --git a/docs/assembler/masm/dot-seq.md b/docs/assembler/masm/dot-seq.md
index 079067cb21..5f24e72957 100644
--- a/docs/assembler/masm/dot-seq.md
+++ b/docs/assembler/masm/dot-seq.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .SEQ (32-bit MASM)"
title: ".SEQ"
ms.date: "11/05/2019"
f1_keywords: [".SEQ"]
diff --git a/docs/assembler/masm/dot-setframe.md b/docs/assembler/masm/dot-setframe.md
index 201ea7d1f5..d33281ed97 100644
--- a/docs/assembler/masm/dot-setframe.md
+++ b/docs/assembler/masm/dot-setframe.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .SETFRAME"
title: ".SETFRAME"
ms.date: "12/17/2019"
f1_keywords: [".SETFRAME"]
diff --git a/docs/assembler/masm/dot-sfcond.md b/docs/assembler/masm/dot-sfcond.md
index ea68e1c8d8..f5a5730e29 100644
--- a/docs/assembler/masm/dot-sfcond.md
+++ b/docs/assembler/masm/dot-sfcond.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .SFCOND"
title: ".SFCOND"
ms.date: "12/16/2019"
f1_keywords: [".SFCOND"]
diff --git a/docs/assembler/masm/dot-stack.md b/docs/assembler/masm/dot-stack.md
index a580d05368..be6b334744 100644
--- a/docs/assembler/masm/dot-stack.md
+++ b/docs/assembler/masm/dot-stack.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .STACK (32-bit MASM)"
title: ".STACK"
ms.date: "11/05/2019"
f1_keywords: [".STACK"]
diff --git a/docs/assembler/masm/dot-startup.md b/docs/assembler/masm/dot-startup.md
index 5e1e7c4f7c..dfbf90bdda 100644
--- a/docs/assembler/masm/dot-startup.md
+++ b/docs/assembler/masm/dot-startup.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .STARTUP (32-bit MASM)"
title: ".STARTUP"
ms.date: "11/05/2019"
f1_keywords: [".STARTUP"]
diff --git a/docs/assembler/masm/dot-tfcond.md b/docs/assembler/masm/dot-tfcond.md
index a292add3cc..f56635114e 100644
--- a/docs/assembler/masm/dot-tfcond.md
+++ b/docs/assembler/masm/dot-tfcond.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .TFCOND"
title: ".TFCOND"
ms.date: "12/16/2019"
f1_keywords: [".TFCOND"]
diff --git a/docs/assembler/masm/dot-until.md b/docs/assembler/masm/dot-until.md
index e49025f388..de85420362 100644
--- a/docs/assembler/masm/dot-until.md
+++ b/docs/assembler/masm/dot-until.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .UNTIL (32-bit MASM)"
title: ".UNTIL"
ms.date: "11/05/2019"
f1_keywords: [".UNTIL"]
diff --git a/docs/assembler/masm/dot-untilcxz.md b/docs/assembler/masm/dot-untilcxz.md
index 8e0f7bb185..c3c5d22acc 100644
--- a/docs/assembler/masm/dot-untilcxz.md
+++ b/docs/assembler/masm/dot-untilcxz.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .UNTILCXZ (32-bit MASM)"
title: ".UNTILCXZ"
ms.date: "11/05/2019"
f1_keywords: [".UNTILCXZ"]
diff --git a/docs/assembler/masm/dot-while.md b/docs/assembler/masm/dot-while.md
index 17518b3759..613f3bbb81 100644
--- a/docs/assembler/masm/dot-while.md
+++ b/docs/assembler/masm/dot-while.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .WHILE (32-bit MASM)"
title: ".WHILE"
ms.date: "11/05/2019"
f1_keywords: [".WHILE"]
diff --git a/docs/assembler/masm/dot-xall.md b/docs/assembler/masm/dot-xall.md
index 91bd6e813f..861406ddaa 100644
--- a/docs/assembler/masm/dot-xall.md
+++ b/docs/assembler/masm/dot-xall.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .XALL"
title: ".XALL"
ms.date: "12/17/2019"
f1_keywords: [".XALL"]
diff --git a/docs/assembler/masm/dot-xcref.md b/docs/assembler/masm/dot-xcref.md
index e866c501b0..02134c0c43 100644
--- a/docs/assembler/masm/dot-xcref.md
+++ b/docs/assembler/masm/dot-xcref.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .XCREF"
title: ".XCREF"
ms.date: "12/17/2019"
f1_keywords: [".XCREF"]
diff --git a/docs/assembler/masm/dot-xlist.md b/docs/assembler/masm/dot-xlist.md
index 537eaf605c..144a08fc4a 100644
--- a/docs/assembler/masm/dot-xlist.md
+++ b/docs/assembler/masm/dot-xlist.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .XLIST"
title: ".XLIST"
ms.date: "12/17/2019"
f1_keywords: [".XLIST"]
diff --git a/docs/assembler/masm/dot-xmm.md b/docs/assembler/masm/dot-xmm.md
index e49e2c2e99..9c0eae78b0 100644
--- a/docs/assembler/masm/dot-xmm.md
+++ b/docs/assembler/masm/dot-xmm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: .XMM (32-bit MASM)"
title: ".XMM"
ms.date: "11/05/2019"
f1_keywords: [".XMM"]
@@ -7,7 +8,7 @@ ms.assetid: db3062b6-8b2f-469b-aa02-df6571eab3ba
---
# .XMM (32-bit MASM)
-Enables assembly of Internet Streaming SIMD Extension instructions. (32-bit MASM only.)
+Enables assembly of Streaming SIMD Extension instructions. (32-bit MASM only.)
## Syntax
diff --git a/docs/assembler/masm/dq.md b/docs/assembler/masm/dq.md
index 7f89ec5c7c..b18ea0536b 100644
--- a/docs/assembler/masm/dq.md
+++ b/docs/assembler/masm/dq.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: DQ"
title: "DQ"
ms.date: "12/17/2019"
f1_keywords: ["DQ"]
diff --git a/docs/assembler/masm/dt.md b/docs/assembler/masm/dt.md
index 58d9b2a022..0e938d7df2 100644
--- a/docs/assembler/masm/dt.md
+++ b/docs/assembler/masm/dt.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: DT"
title: "DT"
ms.date: "12/17/2019"
f1_keywords: ["dt"]
diff --git a/docs/assembler/masm/dw.md b/docs/assembler/masm/dw.md
index 76fa74f4f1..c8b146c0bf 100644
--- a/docs/assembler/masm/dw.md
+++ b/docs/assembler/masm/dw.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: DW"
title: "DW"
ms.date: "12/17/2019"
f1_keywords: ["DW"]
diff --git a/docs/assembler/masm/dword.md b/docs/assembler/masm/dword.md
index 78387c8038..4bbc0b2e87 100644
--- a/docs/assembler/masm/dword.md
+++ b/docs/assembler/masm/dword.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: DWORD"
title: "DWORD"
ms.date: "12/17/2019"
helpviewer_keywords: ["DWORD directive"]
diff --git a/docs/assembler/masm/echo.md b/docs/assembler/masm/echo.md
index 29815748f9..c1be74d506 100644
--- a/docs/assembler/masm/echo.md
+++ b/docs/assembler/masm/echo.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ECHO"
title: "ECHO"
ms.date: "12/17/2019"
f1_keywords: ["ECHO"]
diff --git a/docs/assembler/masm/else-masm.md b/docs/assembler/masm/else-masm.md
index cc85b9fcbe..b9698f4856 100644
--- a/docs/assembler/masm/else-masm.md
+++ b/docs/assembler/masm/else-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ELSE (MASM)"
title: "ELSE (MASM)"
ms.date: "12/17/2019"
helpviewer_keywords: ["ELSE directive"]
diff --git a/docs/assembler/masm/elseif-masm.md b/docs/assembler/masm/elseif-masm.md
index a723feeb52..b8d95c5318 100644
--- a/docs/assembler/masm/elseif-masm.md
+++ b/docs/assembler/masm/elseif-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ELSEIF"
title: "ELSEIF (MASM)"
ms.date: "12/16/2019"
f1_keywords: ["ElseIf"]
diff --git a/docs/assembler/masm/elseif2.md b/docs/assembler/masm/elseif2.md
index 8f547c3f4b..4458f25c9a 100644
--- a/docs/assembler/masm/elseif2.md
+++ b/docs/assembler/masm/elseif2.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ELSEIF2"
title: "ELSEIF2"
ms.date: "12/17/2019"
f1_keywords: ["ELSEIF2"]
diff --git a/docs/assembler/masm/end-masm.md b/docs/assembler/masm/end-masm.md
index 93b05813ee..fb6653e719 100644
--- a/docs/assembler/masm/end-masm.md
+++ b/docs/assembler/masm/end-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: END"
title: "END (MASM)"
ms.date: "12/06/2019"
f1_keywords: ["end"]
diff --git a/docs/assembler/masm/endm.md b/docs/assembler/masm/endm.md
index a759fb5e95..20eae17af1 100644
--- a/docs/assembler/masm/endm.md
+++ b/docs/assembler/masm/endm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ENDM"
title: "ENDM"
ms.date: "12/17/2019"
f1_keywords: ["ENDM"]
diff --git a/docs/assembler/masm/endp.md b/docs/assembler/masm/endp.md
index 9b53b2eef6..2349e1aed3 100644
--- a/docs/assembler/masm/endp.md
+++ b/docs/assembler/masm/endp.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ENDP"
title: "ENDP"
ms.date: "12/17/2019"
f1_keywords: ["ENDP"]
diff --git a/docs/assembler/masm/ends-masm.md b/docs/assembler/masm/ends-masm.md
index 87859c6b48..fae9ac46b8 100644
--- a/docs/assembler/masm/ends-masm.md
+++ b/docs/assembler/masm/ends-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ENDS"
title: "ENDS (MASM)"
ms.date: "12/17/2019"
f1_keywords: ["ENDS"]
diff --git a/docs/assembler/masm/equ.md b/docs/assembler/masm/equ.md
index f6637d84b0..b26e2efc5b 100644
--- a/docs/assembler/masm/equ.md
+++ b/docs/assembler/masm/equ.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: EQU"
title: "EQU"
ms.date: "12/17/2019"
f1_keywords: ["EQU"]
diff --git a/docs/assembler/masm/equal.md b/docs/assembler/masm/equal.md
index 99358f7558..4d275924db 100644
--- a/docs/assembler/masm/equal.md
+++ b/docs/assembler/masm/equal.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ="
title: "="
ms.date: "12/17/2019"
f1_keywords: ["="]
diff --git a/docs/assembler/masm/even.md b/docs/assembler/masm/even.md
index 1cd01181dc..f7b6a209b9 100644
--- a/docs/assembler/masm/even.md
+++ b/docs/assembler/masm/even.md
@@ -1,11 +1,11 @@
---
title: "EVEN"
-ms.date: "12/17/2019"
+description: "Learn more about: EVEN"
+ms.date: 12/17/2019
f1_keywords: ["EVEN"]
helpviewer_keywords: ["EVEN directive"]
-ms.assetid: 68938ba4-8cb9-44d4-914e-9f9fee6bcbf4
---
-# EVEN
+# `EVEN`
Aligns the next variable or instruction on an even byte.
@@ -15,5 +15,6 @@ Aligns the next variable or instruction on an even byte.
## See also
+[`ALIGN`](align-masm.md)\
[Directives reference](directives-reference.md)\
[MASM BNF Grammar](masm-bnf-grammar.md)
diff --git a/docs/assembler/masm/exitm.md b/docs/assembler/masm/exitm.md
index a48bdee055..460ac7baac 100644
--- a/docs/assembler/masm/exitm.md
+++ b/docs/assembler/masm/exitm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: EXITM"
title: "EXITM"
ms.date: "12/17/2019"
f1_keywords: ["EXITM"]
diff --git a/docs/assembler/masm/extern-masm.md b/docs/assembler/masm/extern-masm.md
index 0e6c8320f2..d261390d68 100644
--- a/docs/assembler/masm/extern-masm.md
+++ b/docs/assembler/masm/extern-masm.md
@@ -1,8 +1,8 @@
---
+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
@@ -16,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/externdef.md b/docs/assembler/masm/externdef.md
index 28192b6870..161395a647 100644
--- a/docs/assembler/masm/externdef.md
+++ b/docs/assembler/masm/externdef.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: EXTERNDEF"
title: "EXTERNDEF"
ms.date: "12/06/2019"
f1_keywords: ["EXTERNDEF"]
diff --git a/docs/assembler/masm/extrn.md b/docs/assembler/masm/extrn.md
index 30cc67e29d..8d6e5bb536 100644
--- a/docs/assembler/masm/extrn.md
+++ b/docs/assembler/masm/extrn.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: EXTRN"
title: "EXTRN"
ms.date: "12/17/2019"
f1_keywords: ["EXTRN"]
diff --git a/docs/assembler/masm/for-masm.md b/docs/assembler/masm/for-masm.md
index a02a843827..ed50604521 100644
--- a/docs/assembler/masm/for-masm.md
+++ b/docs/assembler/masm/for-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: FOR"
title: "FOR (MASM)"
ms.date: "12/17/2019"
helpviewer_keywords: ["FOR directive"]
diff --git a/docs/assembler/masm/forc.md b/docs/assembler/masm/forc.md
index ae95c6ec1d..ff9785c0fa 100644
--- a/docs/assembler/masm/forc.md
+++ b/docs/assembler/masm/forc.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: FORC"
title: "FORC"
ms.date: "12/17/2019"
f1_keywords: ["FORC"]
diff --git a/docs/assembler/masm/fword.md b/docs/assembler/masm/fword.md
index db7d609cf4..298c9ec16b 100644
--- a/docs/assembler/masm/fword.md
+++ b/docs/assembler/masm/fword.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: FWORD"
title: "FWORD"
ms.date: "12/17/2019"
f1_keywords: ["FWORD"]
diff --git a/docs/assembler/masm/goto-masm.md b/docs/assembler/masm/goto-masm.md
index 55055b91f8..c0c70f8b90 100644
--- a/docs/assembler/masm/goto-masm.md
+++ b/docs/assembler/masm/goto-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: GOTO"
title: "GOTO (MASM)"
ms.date: "12/16/2019"
helpviewer_keywords: ["GOTO directive"]
diff --git a/docs/assembler/masm/group.md b/docs/assembler/masm/group.md
index e056091514..e384255db2 100644
--- a/docs/assembler/masm/group.md
+++ b/docs/assembler/masm/group.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: GROUP"
title: "GROUP"
ms.date: "11/05/2019"
f1_keywords: ["group"]
diff --git a/docs/assembler/masm/if-masm.md b/docs/assembler/masm/if-masm.md
index 6cb3c256cd..ecf95eaad2 100644
--- a/docs/assembler/masm/if-masm.md
+++ b/docs/assembler/masm/if-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IF"
title: "IF (MASM)"
ms.date: "12/17/2019"
helpviewer_keywords: ["IF directive"]
diff --git a/docs/assembler/masm/if2.md b/docs/assembler/masm/if2.md
index 8d0fc79f72..b5662e321f 100644
--- a/docs/assembler/masm/if2.md
+++ b/docs/assembler/masm/if2.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IF1 and IF2"
title: "IF1 and IF2"
ms.date: "11/21/2019"
f1_keywords: ["IF2", "IF1"]
diff --git a/docs/assembler/masm/ifb.md b/docs/assembler/masm/ifb.md
index 6edfc832ad..59e18dc543 100644
--- a/docs/assembler/masm/ifb.md
+++ b/docs/assembler/masm/ifb.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IFB"
title: "IFB"
ms.date: "12/17/2019"
f1_keywords: ["IFB"]
diff --git a/docs/assembler/masm/ifdef.md b/docs/assembler/masm/ifdef.md
index d6103e527a..c29dadf56d 100644
--- a/docs/assembler/masm/ifdef.md
+++ b/docs/assembler/masm/ifdef.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IFDEF"
title: "IFDEF"
ms.date: "12/17/2019"
f1_keywords: ["IFDEF"]
diff --git a/docs/assembler/masm/ifdif.md b/docs/assembler/masm/ifdif.md
index 14c1d5d03c..e08aa1e108 100644
--- a/docs/assembler/masm/ifdif.md
+++ b/docs/assembler/masm/ifdif.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IFDIF, IFDIFI"
title: "IFDIF, IFDIFI"
ms.date: "05/23/2019"
f1_keywords: ["IFDIF", "IFDIFI"]
diff --git a/docs/assembler/masm/ife.md b/docs/assembler/masm/ife.md
index a67d5b88ae..749be29b11 100644
--- a/docs/assembler/masm/ife.md
+++ b/docs/assembler/masm/ife.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IFE"
title: "IFE"
ms.date: "12/17/2019"
f1_keywords: ["IFE"]
diff --git a/docs/assembler/masm/ifidn.md b/docs/assembler/masm/ifidn.md
index ca717384bf..fcbb8f24cf 100644
--- a/docs/assembler/masm/ifidn.md
+++ b/docs/assembler/masm/ifidn.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IFIDN, IFIDNI"
title: "IFIDN, IFIDNI"
ms.date: "12/17/2019"
f1_keywords: ["IFIDN", "IFIDNI"]
diff --git a/docs/assembler/masm/ifnb.md b/docs/assembler/masm/ifnb.md
index 823f6d148d..999a5f233d 100644
--- a/docs/assembler/masm/ifnb.md
+++ b/docs/assembler/masm/ifnb.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IFNB"
title: "IFNB"
ms.date: "12/17/2019"
f1_keywords: ["IFNB"]
diff --git a/docs/assembler/masm/ifndef.md b/docs/assembler/masm/ifndef.md
index e4c215bcae..713c2f6f33 100644
--- a/docs/assembler/masm/ifndef.md
+++ b/docs/assembler/masm/ifndef.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IFNDEF"
title: "IFNDEF"
ms.date: "12/17/2019"
f1_keywords: ["IFNDEF"]
diff --git a/docs/assembler/masm/include-masm.md b/docs/assembler/masm/include-masm.md
index 9cefb85629..9d588fc77b 100644
--- a/docs/assembler/masm/include-masm.md
+++ b/docs/assembler/masm/include-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: INCLUDE"
title: "INCLUDE (MASM)"
ms.date: "12/17/2019"
helpviewer_keywords: ["INCLUDE directive"]
diff --git a/docs/assembler/masm/includelib-masm.md b/docs/assembler/masm/includelib-masm.md
index 0bab99df71..2bc504c53d 100644
--- a/docs/assembler/masm/includelib-masm.md
+++ b/docs/assembler/masm/includelib-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: INCLUDELIB"
title: "INCLUDELIB (MASM)"
ms.date: "12/17/2019"
f1_keywords: ["INCLUDELIB"]
diff --git a/docs/assembler/masm/instr.md b/docs/assembler/masm/instr.md
index d47b071887..8aeb0098f1 100644
--- a/docs/assembler/masm/instr.md
+++ b/docs/assembler/masm/instr.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: INSTR"
title: "INSTR"
ms.date: "12/17/2019"
f1_keywords: ["InStr"]
diff --git a/docs/assembler/masm/instruction-format.md b/docs/assembler/masm/instruction-format.md
new file mode 100644
index 0000000000..ac653870b1
--- /dev/null
+++ b/docs/assembler/masm/instruction-format.md
@@ -0,0 +1,79 @@
+---
+description: Learn how instructions are formatted for translation by MASM.
+title: "MASM instruction format"
+ms.date: 09/21/2021
+helpviewer_keywords: ["MASM (Microsoft Macro Assembler), instruction reference", "instruction format", "instructions [MASM]"]
+no-loc: ["VEX", "REP"]
+---
+# MASM instruction format
+
+## Syntax
+
+Instructions are written in source code according to this syntax:
+
+> [*prefix*](#prefix) [*mnemonic*](#mnemonic) [*operand-list*](#operand-list)
+
+For information on instruction definitions, options, and encoding, see the [Processor Manufacturer Programming Manuals](../../assembler/masm/processor-manufacturer-programming-manuals.md). Some instructions and instruction options may not be supported by the Microsoft Macro Assembler.
+
+## Prefix
+
+You can prefix some instructions with keywords that set options for how the instruction is encoded. The **`REP`**, **`REPE`**, **`REPZ`**, **`REPNE`**, and **`REPNZ`** keywords are used with string instructions to do `memcpy` or `strlen` kinds of operations in a single instruction. The **`LOCK`** keyword makes certain operations on memory operands atomic. You can combine it with the **`XACQUIRE`** and **`XRELEASE`** keywords to do Hardware Lock Elision (HLE) on supported processors, which allows greater transactional parallelism in certain cases.
+
+The remaining prefixes control how AVX instructions are encoded. AVX instructions are encoded using a **`VEX`** prefix, which appears before the opcode. It takes the place of certain byte instruction prefixes and opcode lead-in bytes. Many AVX instructions are also AVX-512 instructions, which are encoded using an **`EVEX`** prefix that supports [more options](#avx-512-options). MASM tries to encode instructions as compactly as possible, but these keywords allow more control over which encoding to use with a particular instruction. They're also used to force generation of AVX instruction forms that were introduced after the corresponding AVX-512 instruction. For example, `vex vpdpbusd` specifies the AVX-VNNI form of the `VPDPBUSD` instructions rather than the AVX512-VNNI form. When an AVX instruction appears without an explicit prefix keyword, the encoding chosen depends on the current AVX encoding setting. The [`OPTION AVXENCODING`](option-avxencoding-masm.md) directive lets you change this setting.
+
+The **`VEX2`**, **`VEX3`**, **`VEX`**, and **`EVEX`** options are available in Visual Studio 2019 version 16.7 and later.
+
+| Keyword | Usage |
+|--|--|
+| **`REP`** | Repeat the string operation by the count in (E)CX. |
+| **`REPE`**
**`REPZ`** | Repeat the string operation while the comparison is equal, limited by the count in (E)CX. |
+| **`REPNE`**
**`REPNZ`** | Repeat the string operation while the comparison is not-equal, limited by the count in (E)CX. |
+| **`LOCK`** | Perform the operation atomically on a memory operand. |
+| **`XACQUIRE`** | Begin an HLE transaction, most often used with **`LOCK`** prefix. |
+| **`XRELEASE`** | Complete an HLE transaction, most often used with **`LOCK`** prefix. |
+| **`VEX`** | Encode an AVX instruction using a **`VEX`** prefix. |
+| **`VEX2`** | Encode an AVX instruction using a 2-byte **`VEX`** prefix. |
+| **`VEX3`** | Encode an AVX instruction using a 3-byte **`VEX`** prefix. |
+| **`EVEX`** | Encode an AVX instruction using an **`EVEX`** prefix. |
+
+## Mnemonic
+
+The mnemonic identifies a particular instruction, which determines the prefixes and operand patterns that are allowed.
+
+## Operand list
+
+Most instructions use an operand list to specify the explicit source and destination operands to the instruction. The operand list may contain memory references, registers, and constant values. Each instruction allows only certain types of operands to appear at each position in the operand list. Except for the `MOVS` and `CMPS` instructions, only one of the operands may be a memory reference; all other operands must be register references or constants.
+
+## AVX-512 options
+
+Some AVX-512 instructions allow more options to be specified. These options are: masking, zero-masking, embedded broadcast, embedded rounding, and exception suppression.
+
+*Masking* allows an operation to be applied only to selected elements of a vector. This option is controlled by placing a mask register from `{k1}` to `{k7}` after the destination operand. If the mask register is followed by `{z}`, all non-selected elements of the destination are set to zero. This alternative is known as *zero-masking*.
+
+*Embedded Broadcast* allows a scalar value in memory to be applied to all elements of a vector. This option is enabled by adding the element size and the keyword `BCST` to the memory operand, which is similar to the use of `PTR` for normal memory references.
+
+*Embedded Rounding* controls the rounding mode for an individual floating-point instruction, without having to set and reset the global rounding mode. It's enabled by following the instruction with the rounding mode enclosed in braces. When enabled, it also suppresses all exceptions for only that instruction. Floating-point instructions that don't round can also suppress all exceptions using a similar option.
+
+```asm
+ ; Examples of AVX-512 options
+ vaddps xmm1 {k1}, xmm2, xmm3 ; merge-masking
+ vsubps ymm0 {k4}{z}, ymm1, ymm2 ; zero-masking
+ vmulps zmm0, zmm1, dword bcst scalar ; embedded broadcast
+ vdivps zmm0, zmm1, zmm2 {rz-sae} ; embedded rounding
+ vmaxss xmm1, xmm2, xmm3 {sae} ; suppress all exceptions
+```
+
+### Rounding modes
+
+| Mode | Effect |
+|--|--|
+| **`rn-sae`** | Round to nearest, ties to even, suppress all exceptions. |
+| **`rz-sae`** | Round toward zero, suppress all exceptions. |
+| **`rd-sae`** | Round down (toward negative infinity), suppress all exceptions. |
+| **`ru-sae`** | Round up (toward positive infinity), suppress all exceptions. |
+| **`sae`** | Suppress all exceptions (no rounding needed). |
+
+## See also
+
+[Microsoft Macro Assembler Reference](microsoft-macro-assembler-reference.md)
+[Processor Manufacturer Programming Manuals](../../assembler/masm/processor-manufacturer-programming-manuals.md)
diff --git a/docs/assembler/masm/invoke.md b/docs/assembler/masm/invoke.md
index 9fc07b774c..c6e06f6aa5 100644
--- a/docs/assembler/masm/invoke.md
+++ b/docs/assembler/masm/invoke.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: INVOKE"
title: "INVOKE"
ms.date: "11/05/2019"
f1_keywords: ["Invoke"]
diff --git a/docs/assembler/masm/irp.md b/docs/assembler/masm/irp.md
index 50d71dd808..eae39c6b2d 100644
--- a/docs/assembler/masm/irp.md
+++ b/docs/assembler/masm/irp.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IRP"
title: "IRP"
ms.date: "12/17/2019"
f1_keywords: ["IRP"]
diff --git a/docs/assembler/masm/irpc.md b/docs/assembler/masm/irpc.md
index b88b03d7c6..85ad48b295 100644
--- a/docs/assembler/masm/irpc.md
+++ b/docs/assembler/masm/irpc.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IRPC"
title: "IRPC"
ms.date: "12/17/2019"
f1_keywords: ["IRPC"]
diff --git a/docs/assembler/masm/label-masm.md b/docs/assembler/masm/label-masm.md
index 075e99f073..7b89c60c7d 100644
--- a/docs/assembler/masm/label-masm.md
+++ b/docs/assembler/masm/label-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: LABEL"
title: "LABEL (MASM)"
ms.date: "12/17/2019"
f1_keywords: ["Label"]
diff --git a/docs/assembler/masm/local-masm.md b/docs/assembler/masm/local-masm.md
index 0aa48121d0..5edfad2ea5 100644
--- a/docs/assembler/masm/local-masm.md
+++ b/docs/assembler/masm/local-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: LOCAL"
title: "LOCAL (MASM)"
ms.date: "12/16/2019"
f1_keywords: ["Local"]
diff --git a/docs/assembler/masm/macro.md b/docs/assembler/masm/macro.md
index 28f57db033..c1bbf798c8 100644
--- a/docs/assembler/masm/macro.md
+++ b/docs/assembler/masm/macro.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: MACRO"
title: "MACRO"
ms.date: "12/16/2019"
f1_keywords: ["MACRO"]
diff --git a/docs/assembler/masm/masm-bnf-grammar.md b/docs/assembler/masm/masm-bnf-grammar.md
index 771ea71a16..65eea98ce0 100644
--- a/docs/assembler/masm/masm-bnf-grammar.md
+++ b/docs/assembler/masm/masm-bnf-grammar.md
@@ -1,1070 +1,1085 @@
---
title: "Microsoft Macro Assembler BNF Grammar"
description: "BNF description of MASM for x64."
-ms.date: "12/17/2019"
+ms.date: 04/15/2021
helpviewer_keywords: ["MASM (Microsoft Macro Assembler), BNF reference"]
---
# Microsoft Macro Assembler BNF Grammar
This page contains a BNF description of the MASM grammar. It's provided as a supplement to the reference and isn't guaranteed to be complete. Consult the reference for full information on keywords, parameters, operations, and so on.
-To illustrate the use of the BNF, the following diagram shows the definition of the TYPEDEF directive, starting with the nonterminal *`typedefDir`*.
+To illustrate the use of the BNF, the following diagram shows the definition of the **`TYPEDEF`** directive, starting with the nonterminal *`typedefDir`*.
-
+
The entries under each horizontal brace are terminals, such as **`NEAR16`**, **`NEAR32`**, **`FAR16`**, and **`FAR32`**. Or, they're nonterminals such as *`qualifier`*, *`qualifiedType`*, *`distance`*, and *`protoSpec`* that can be further defined. Each italicized nonterminal in the *`typedefDir`* definition is also an entry in the BNF. Three vertical dots indicate a branching definition for a nonterminal that, for the sake of simplicity, this figure doesn't illustrate.
-The BNF grammar allows recursive definitions. For example, the grammar uses qualifiedType as a possible definition for qualifiedType, which is also a component of the definition for qualifier. The "|" symbol specifies a choice between alternate expressions, for example *`endOfLine`* | *`comment`*. Double braces specify an optional parameter, for example ⟦ *`macroParmList`* ⟧. The brackets don't actually appear in the source code.
+The BNF grammar allows recursive definitions. For example, the grammar uses *`qualifiedType`* as a possible definition for *`qualifiedType`*, which is also a component of the definition for *`qualifier`*. The "|" symbol specifies a choice between alternate expressions, for example *`endOfLine`* | *`comment`*. Double braces specify an optional parameter, for example ⟦ *`macroParmList`* ⟧. The brackets don't actually appear in the source code.
## MASM Nonterminals
*`;;`*\
- *`endOfLine`* | *`comment`*
+ *`endOfLine`* | *`comment`*
*`=Dir`*\
- *`id`* = *`immExpr`* *`;;`*
+ *`id`* **`=`** *`immExpr`* *`;;`*
*`addOp`*\
- **`+`** | **`-`**
+ **`+`** | **`-`**
*`aExpr`*\
- *`term`* | *`aExpr`* **`&&`** *`term`*
+ *`term`* | *`aExpr`* **`&&`** *`term`*
*`altId`*\
- *`id`*
+ *`id`*
+
+*`alpha`*\
+ Any upper or lowercase letter (A-Z) or one of these four characters: `@ _ $ ?`
*`arbitraryText`*\
- *`charList`*
+ *`charList`*
*`asmInstruction`*\
- *`mnemonic`* ⟦ *`exprList`* ⟧
+ *`mnemonic`* ⟦ *`exprList`* ⟧
*`assumeDir`*\
- **`ASSUME`** *`assumeList`* *`;;`*\
- | **`ASSUME NOTHING`** *`;;`*
+ **`ASSUME`** *`assumeList`* *`;;`*\
+ | **`ASSUME NOTHING`** *`;;`*
*`assumeList`*\
- *`assumeRegister`* | *`assumeList`* **`,`** *`assumeRegister`*\
+ *`assumeRegister`* | *`assumeList`* **`,`** *`assumeRegister`*
*`assumeReg`*\
- *`register`* **`:`** *`assumeVal`*
+ *`register`* **`:`** *`assumeVal`*
*`assumeRegister`*\
- *`assumeSegReg`* | *`assumeReg`*
+ *`assumeSegReg`* | *`assumeReg`*
*`assumeSegReg`*\
- *`segmentRegister`* **`:`** *`assumeSegVal`*
+ *`segmentRegister`* **`:`** *`assumeSegVal`*
*`assumeSegVal`*\
- *`frameExpr`* | **`NOTHING`** | **`ERROR`**
+ *`frameExpr`* | **`NOTHING`** | **`ERROR`**
*`assumeVal`*\
- *`qualifiedType`* | **`NOTHING`** | **`ERROR`**
+ *`qualifiedType`* | **`NOTHING`** | **`ERROR`**
*`bcdConst`*\
- ⟦ *`sign`* ⟧ *`decNumber`*
+ ⟦ *`sign`* ⟧ *`decNumber`*
*`binaryOp`*\
- **`==`** | **`!=`** | **`>=`** | **`<=`** | **`>`** | **`<`** | **`&`**
+ **`==`** | **`!=`** | **`>=`** | **`<=`** | **`>`** | **`<`** | **`&`**
*`bitDef`*\
- *`bitFieldId`* **`:`** *`bitFieldSize`* ⟦ **`=`** *`constExpr`* ⟧
+ *`bitFieldId`* **`:`** *`bitFieldSize`* ⟦ **`=`** *`constExpr`* ⟧
*`bitDefList`*\
- *`bitDef`* | *`bitDefList`* **`,`** ⟦ *`;;`* ⟧ *`bitDef`*
+ *`bitDef`* | *`bitDefList`* **`,`** ⟦ *`;;`* ⟧ *`bitDef`*
*`bitFieldId`*\
- *`id`*
+ *`id`*
*`bitFieldSize`*\
- *`constExpr`*
+ *`constExpr`*
*`blockStatements`*\
- *`directiveList`*\
- | **`.CONTINUE`** **`.IF`** *`cExpr`* ⟧\
- | **`.BREAK`** ⟦ **`.IF`** *`cExpr`* ⟧
+ *`directiveList`*\
+ | **`.CONTINUE`** ⟦ **`.IF`** *`cExpr`* ⟧\
+ | **`.BREAK`** ⟦ **`.IF`** *`cExpr`* ⟧
*`bool`*\
- **`TRUE`** | **`FALSE`**
+ **`TRUE`** | **`FALSE`**
*`byteRegister`*\
- **`AL`** | **`AH`** | **`CL`** | **`CH`** | **`DL`** | **`DH`** | **`BL`** | **`BH`** | **`R8B`** | **`R9B`** | **`R10B`** | **`R11B`** | **`R12B`** | **`R13B`** | **`R14B`** | **`R15B`**
+ **`AL`** | **`AH`** | **`CL`** | **`CH`** | **`DL`** | **`DH`** | **`BL`** | **`BH`** | **`R8B`** | **`R9B`** | **`R10B`** | **`R11B`** | **`R12B`** | **`R13B`** | **`R14B`** | **`R15B`**
*`cExpr`*\
- *`aExpr`* | *`cExpr`* **`||`** *`aExpr`*
+ *`aExpr`* | *`cExpr`* **`||`** *`aExpr`*
*`character`*\
- Any character with ordinal in the range 0–255 except linefeed (10).
+ Any character with ordinal in the range 0–255 except linefeed (10).
*`charList`*\
- *`character`* | *`charList`* *`character`*
+ *`character`* | *`charList`* *`character`*
*`className`*\
- *`string`*
+ *`string`*
*`commDecl`*\
- ⟦ *`nearfar`* ⟧ ⟦ *`langType`* ⟧ *`id`* **`:`** *`commType`*\
- ⟦ **`:`** *`constExpr`* ⟧
+ ⟦ *`nearfar`* ⟧ ⟦ *`langType`* ⟧ *`id`* **`:`** *`commType`*\
+ ⟦ **`:`** *`constExpr`* ⟧
*`commDir`*\
- **`COMM`**\
- *`commList`* *`;;`*
+ **`COMM`**\
+ *`commList`* *`;;`*
*`comment`*\
- ; *`text`* *`;;`*
+ **`;`** *`text`* *`;;`*
*`commentDir`*\
- **`COMMENT`** *`delimiter`*\
- *`text`*\
- *`text`* *`delimiter`* *`text`* *`;;`*
+ **`COMMENT`** *`delimiter`*\
+ *`text`*\
+ *`text`* *`delimiter`* *`text`* *`;;`*
*`commList`*\
- *`commDecl`* | *`commList`* **`,`** *`commDecl`*
+ *`commDecl`* | *`commList`* **`,`** *`commDecl`*
*`commType`*\
- *`type`* | *`constExpr`*
+ *`type`* | *`constExpr`*
*`constant`*\
- *`digits`* ⟦ *`radixOverride`* ⟧
+ *`digits`* ⟦ *`radixOverride`* ⟧
*`constExpr`*\
- *`expr`*
+ *`expr`*
*`contextDir`*\
- **`PUSHCONTEXT`** *`contextItemList`* *`;;`*\
- **`POPCONTEXT`** *`contextItemList`* *`;;`*
+ **`PUSHCONTEXT`** *`contextItemList`* *`;;`*\
+ | **`POPCONTEXT`** *`contextItemList`* *`;;`*
*`contextItem`*\
- **`ASSUMES`** | **`RADIX`** | **`LISTING`** | **`CPU`** | **`ALL`**
+ **`ASSUMES`** | **`RADIX`** | **`LISTING`** | **`CPU`** | **`ALL`**
*`contextItemList`*\
- *`contextItem`* | *`contextItemList`* **`,`** *`contextItem`*
+ *`contextItem`* | *`contextItemList`* **`,`** *`contextItem`*
*`controlBlock`*\
- *`whileBlock`* | *`repeatBlock`*
+ *`whileBlock`* | *`repeatBlock`*
*`controlDir`*\
- *`controlIf`* | *`controlBlock`*
+ *`controlIf`* | *`controlBlock`*
*`controlElseif`*\
- **`.ELSEIF`**
- *`cExpr`* *`;;`*\
- *`directiveList`* \
- ⟦ *`controlElseif`* ⟧
+ **`.ELSEIF`** *`cExpr`* *`;;`*\
+ *`directiveList`* \
+ ⟦ *`controlElseif`* ⟧
*`controlIf`*\
- **`.IF`**
- *`cExpr`* *`;;`*\
- *`directiveList`*\
- ⟦ *`controlElseif`* ⟧\
- ⟦ **`.ELSE`** *`;;`*\
- [*`directiveList`*⟧\
- **`.ENDIF`** *`;;`*
+ **`.IF`** *`cExpr`* *`;;`*\
+ *`directiveList`*\
+ ⟦ *`controlElseif`* ⟧\
+ ⟦ **`.ELSE`** *`;;`*\
+ *`directiveList`*⟧\
+ **`.ENDIF`** *`;;`*
*`coprocessor`*\
- **`.8087`** | **`.287`** | **`.387`** | **`.NO87`**
+ **`.8087`** | **`.287`** | **`.387`** | **`.NO87`**
*`crefDir`*\
- *`crefOption`* *`;;`*
+ *`crefOption`* *`;;`*
*`crefOption`*\
- **`.CREF`**\
- | **`.XCREF`** ⟦ *`idList`* ⟧\
- | **`.NOCREF`** ⟦ *`idList`* ⟧
+ **`.CREF`**\
+ | **`.XCREF`** ⟦ *`idList`* ⟧\
+ | **`.NOCREF`** ⟦ *`idList`* ⟧
*`cxzExpr`*\
- *`expr`*\
- | **`!`** *`expr`*\
- | *`expr`* **`==`** *`expr`*\
- | *`expr`* **`!=`** *`expr`*
+ *`expr`*\
+ | **`!`** *`expr`*\
+ | *`expr`* **`==`** *`expr`*\
+ | *`expr`* **`!=`** *`expr`*
*`dataDecl`*\
- **`DB`** | **`DW`** | **`DD`** | **`DF`** | **`DQ`** | **`DT`** | *`dataType`* | *`typeId`*
+ **`DB`** | **`DW`** | **`DD`** | **`DF`** | **`DQ`** | **`DT`** | *`dataType`* | *`typeId`*
*`dataDir`*\
- ⟦ *`id`* ⟧ *`dataItem`* *`;;`*
+ ⟦ *`id`* ⟧ *`dataItem`* *`;;`*
*`dataItem`*\
- *`dataDecl`* *`scalarInstList`*\
- | *`structTag`* *`structInstList`*\
- | *`typeId`* *`structInstList`*\
- | *`unionTag`* *`structInstList`*\
- | *`recordTag`* *`recordInstList`*
+ *`dataDecl`* *`scalarInstList`*\
+ | *`structTag`* *`structInstList`*\
+ | *`typeId`* *`structInstList`*\
+ | *`unionTag`* *`structInstList`*\
+ | *`recordTag`* *`recordInstList`*
*`dataType`*\
- **`BYTE`** | **`SBYTE`** | **`WORD`** | **`SWORD`** | **`DWORD`** | **`SDWORD`** | **`FWORD`** | **`QWORD`** | **`SQWORD`** | **`TBYTE`** | **`OWORD`** | **`REAL4`** | **`REAL8`** | **`REAL10`** | **`MMWORD`** | **`XMMWORD`** | **`YMMWORD`**
+ **`BYTE`** | **`SBYTE`** | **`WORD`** | **`SWORD`** | **`DWORD`** | **`SDWORD`** | **`FWORD`** | **`QWORD`** | **`SQWORD`** | **`TBYTE`** | **`OWORD`** | **`REAL4`** | **`REAL8`** | **`REAL10`** | **`MMWORD`** | **`XMMWORD`** | **`YMMWORD`**
*`decdigit`*\
- **`0`** | **`1`** | **`2`** | **`3`** | **`4`** | **`5`** | **`6`** | **`7`** | **`8`** | **`9`**
+ **`0`** | **`1`** | **`2`** | **`3`** | **`4`** | **`5`** | **`6`** | **`7`** | **`8`** | **`9`**
*`decNumber`*\
- *`decdigit`*\
- | *`decNumber`* *`decdigit`*
+ *`decdigit`*\
+ | *`decNumber`* *`decdigit`*
*`delimiter`*\
- Any character except *`whiteSpaceCharacter`*
+ Any character except *`whiteSpaceCharacter`*
*`digits`*\
- *`decdigit`*\
- | *`digits`* *`decdigit`*\
- | *`digits`* *`hexdigit`*
+ *`decdigit`*\
+ | *`digits`* *`decdigit`*\
+ | *`digits`* *`hexdigit`*
*`directive`*\
- *`generalDir`* | *`segmentDef`*
+ *`generalDir`* | *`segmentDef`*
*`directiveList`*\
- *`directive`* | *`directiveList`* *`directive`*
+ *`directive`* | *`directiveList`* *`directive`*
*`distance`*\
- *`nearfar`* | **`NEAR16`** | **`NEAR32`** | **`FAR16`** | **`FAR32`**
+ *`nearfar`* | **`NEAR16`** | **`NEAR32`** | **`FAR16`** | **`FAR32`**
*`e01`*\
- *`e01`* *`orOp`* *`e02`* | *`e02`*
+ *`e01`* *`orOp`* *`e02`* | *`e02`*
*`e02`*\
- *`e02`* **`AND`** *`e03`* | *`e03`*
+ *`e02`* **`AND`** *`e03`* | *`e03`*
*`e03`*\
- **`NOT`** *`e04`* | *`e04`*
+ **`NOT`** *`e04`* | *`e04`*
*`e04`*\
- *`e04`* *`relOp`* *`e05`* | *`e05`*
+ *`e04`* *`relOp`* *`e05`* | *`e05`*
*`e05`*\
- *`e05`* *`addOp`* *`e06`* | *`e06`*
+ *`e05`* *`addOp`* *`e06`* | *`e06`*
*`e06`*\
- *`e06`* *`mulOp`* *`e07`* | *`e06`* *`shiftOp`* *`e07`* | *`e07`*
+ *`e06`* *`mulOp`* *`e07`* | *`e06`* *`shiftOp`* *`e07`* | *`e07`*
*`e07`*\
- *`e07`* *`addOp`* *`e08`* | *`e08`*
+ *`e07`* *`addOp`* *`e08`* | *`e08`*
*`e08`*\
- **`HIGH`** *`e09`*\
- | **`LOW`** *`e09`*\
- | **`HIGHWORD`** *`e09`*\
- | **`LOWWORD`** *`e09`*\
- | *`e09`*
+ **`HIGH`** *`e09`*\
+ | **`LOW`** *`e09`*\
+ | **`HIGHWORD`** *`e09`*\
+ | **`LOWWORD`** *`e09`*\
+ | *`e09`*
*`e09`*\
- **`OFFSET`** *`e10`*\
- | **`SEG`** *`e10`*\
- | **`LROFFSET`** *`e10`*\
- | **`TYPE`** *`e10`*\
- | **`THIS`** *`e10`*\
- | *`e09`* **`PTR`** *`e10`*\
- | *`e09`* **`:`** *`e10`*\
- | *`e10`*
+ **`OFFSET`** *`e10`*\
+ | **`SEG`** *`e10`*\
+ | **`LROFFSET`** *`e10`*\
+ | **`TYPE`** *`e10`*\
+ | **`THIS`** *`e10`*\
+ | *`e09`* **`PTR`** *`e10`*\
+ | *`e09`* **`:`** *`e10`*\
+ | *`e10`*
*`e10`*\
- *`e10`* **`.`** *`e11`*\
- | *`e10`* ⟦ *`expr`* ⟧\
- | *`e11`*
+ *`e10`* **`.`** *`e11`*\
+ | *`e10`* ⟦ *`expr`* ⟧\
+ | *`e11`*
*`e11`*\
- **`(`** *`expr`* **`)`**\
- | ⟦ *`expr`* ⟧\
- | **`WIDTH`** *`id`*\
- | **`MASK`** *`id`*\
- | **`SIZE`** *`sizeArg`*\
- | **`SIZEOF`** *`sizeArg`*\
- | **`LENGTH`** *`id`*\
- | **`LENGTHOF`** *`id`*\
- | *`recordConst`*\
- | *`string`*\
- | *`constant`*\
- | *`type`*\
- | *`id`*\
- | **`$`**\
- | *`segmentRegister`*\
- | *`register`*\
- | **`ST`**\
- | **`ST`** **`(`** *`expr`* **`)`**
+ **`(`** *`expr`* **`)`**\
+ | ⟦ *`expr`* ⟧\
+ | **`WIDTH`** *`id`*\
+ | **`MASK`** *`id`*\
+ | **`SIZE`** *`sizeArg`*\
+ | **`SIZEOF`** *`sizeArg`*\
+ | **`LENGTH`** *`id`*\
+ | **`LENGTHOF`** *`id`*\
+ | *`recordConst`*\
+ | *`string`*\
+ | *`constant`*\
+ | *`type`*\
+ | *`id`*\
+ | **`$`**\
+ | *`segmentRegister`*\
+ | *`register`*\
+ | **`ST`**\
+ | **`ST`** **`(`** *`expr`* **`)`**
*`echoDir`*\
- **`ECHO`**\
- *`arbitraryText`* *`;;`*\
- **`%OUT`** *`arbitraryText`* *`;;`*
+ **`ECHO`** *`arbitraryText`* *`;;`*\
+ **`%OUT`** *`arbitraryText`* *`;;`*
*`elseifBlock`*\
- *`elseifStatement`* *`;;`*\
- *`directiveList`*\
- ⟦ *`elseifBlock`* ⟧
+ *`elseifStatement`* *`;;`*\
+ *`directiveList`*\
+ ⟦ *`elseifBlock`* ⟧
*`elseifStatement`*\
- **`ELSEIF`** *`constExpr`*\
- | **`ELSEIFE`** *`constExpr`*\
- | **`ELSEIFB`** *`textItem`*\
- | **`ELSEIFNB`** *`textItem`*\
- | **`ELSEIFDEF`** *`id`*\
- | **`ELSEIFNDEF`** *`id`*\
- | **`ELSEIFDIF`** *`textItem`* **`,`** *`textItem`*\
- | **`ELSEIFDIFI`** *`textItem`* **`,`** *`textItem`*\
- | **`ELSEIFIDN`** *`textItem`* **`,`** *`textItem`*\
- | **`ELSEIFIDNI`** *`textItem`* **`,`** *`textItem`*\
- | **`ELSEIF1`**\
- | **`ELSEIF2`**
+ **`ELSEIF`** *`constExpr`*\
+ | **`ELSEIFE`** *`constExpr`*\
+ | **`ELSEIFB`** *`textItem`*\
+ | **`ELSEIFNB`** *`textItem`*\
+ | **`ELSEIFDEF`** *`id`*\
+ | **`ELSEIFNDEF`** *`id`*\
+ | **`ELSEIFDIF`** *`textItem`* **`,`** *`textItem`*\
+ | **`ELSEIFDIFI`** *`textItem`* **`,`** *`textItem`*\
+ | **`ELSEIFIDN`** *`textItem`* **`,`** *`textItem`*\
+ | **`ELSEIFIDNI`** *`textItem`* **`,`** *`textItem`*\
+ | **`ELSEIF1`**\
+ | **`ELSEIF2`**
*`endDir`*\
- **`END`** ⟦ *`immExpr`* ⟧ *`;;`*
+ **`END`** ⟦ *`immExpr`* ⟧ *`;;`*
*`endpDir`*\
- *`procId`* **`ENDP`** *`;;`*
+ *`procId`* **`ENDP`** *`;;`*
*`endsDir`*\
- *`id`* **`ENDS`** *`;;`*
+ *`id`* **`ENDS`** *`;;`*
*`equDir`*\
- *`textMacroId`* **`EQU`** *`equType`* *`;;`*
+ *`textMacroId`* **`EQU`** *`equType`* *`;;`*
*`equType`*\
- *`immExpr`* | *`textLiteral`*
+ *`immExpr`* | *`textLiteral`*
*`errorDir`*\
- *`errorOpt`* *`;;`*
+ *`errorOpt`* *`;;`*
*`errorOpt`*\
- **`.ERR`** ⟦ *`textItem`* ⟧\
- | **`.ERRE`** *`constExpr`* ⟦ *`optText`* ⟧\
- | **`.ERRNZ`** *`constExpr`* ⟦ *`optText`* ⟧\
- | **`.ERRB`** *`textItem`* ⟦ *`optText`* ⟧\
- | **`.ERRNB`** *`textItem`* ⟦ *`optText`* ⟧\
- | **`.ERRDEF`** *`id`* ⟦ *`optText`* ⟧\
- | **`.ERRNDEF`** *`id`* ⟦ *`optText`* ⟧\
- | **`.ERRDIF`** *`textItem`* **`,`** *`textItem`* ⟦ *`optText`* ⟧\
- | **`.ERRDIFI`** *`textItem`* **`,`** *`textItem`* ⟦ *`optText`* ⟧\
- | **`.ERRIDN`** *`textItem`* **`,`** *`textItem`* ⟦ *`optText`* ⟧\
- | **`.ERRIDNI`** *`textItem`* **`,`** *`textItem`* ⟦ *`optText`* ⟧\
- | **`.ERR1`** ⟦ *`textItem`* ⟧\
- | **`.ERR2`** ⟦ *`textItem`* ⟧
+ **`.ERR`** ⟦ *`textItem`* ⟧\
+ | **`.ERRE`** *`constExpr`* ⟦ *`optText`* ⟧\
+ | **`.ERRNZ`** *`constExpr`* ⟦ *`optText`* ⟧\
+ | **`.ERRB`** *`textItem`* ⟦ *`optText`* ⟧\
+ | **`.ERRNB`** *`textItem`* ⟦ *`optText`* ⟧\
+ | **`.ERRDEF`** *`id`* ⟦ *`optText`* ⟧\
+ | **`.ERRNDEF`** *`id`* ⟦ *`optText`* ⟧\
+ | **`.ERRDIF`** *`textItem`* **`,`** *`textItem`* ⟦ *`optText`* ⟧\
+ | **`.ERRDIFI`** *`textItem`* **`,`** *`textItem`* ⟦ *`optText`* ⟧\
+ | **`.ERRIDN`** *`textItem`* **`,`** *`textItem`* ⟦ *`optText`* ⟧\
+ | **`.ERRIDNI`** *`textItem`* **`,`** *`textItem`* ⟦ *`optText`* ⟧\
+ | **`.ERR1`** ⟦ *`textItem`* ⟧\
+ | **`.ERR2`** ⟦ *`textItem`* ⟧
*`exitDir`*\
- **`.EXIT`**
- ⟦ *`expr`* ⟧ *`;;`*
+ **`.EXIT`** ⟦ *`expr`* ⟧ *`;;`*
*`exitmDir`*\
- : **`EXITM`** | **`EXITM`** *`textItem`*
+ **`:`** **`EXITM`** | **`EXITM`** *`textItem`*
*`exponent`*\
- **`E`** ⟦ *`sign`* ⟧ *`decNumber`*
+ **`E`** ⟦ *`sign`* ⟧ *`decNumber`*
*`expr`*\
- **`SHORT`** *`e05`*\
- | **`.TYPE`** *`e01`*\
- | **`OPATTR`** *`e01`*\
- | *`e01`*
+ **`SHORT`** *`e05`*\
+ | **`.TYPE`** *`e01`*\
+ | **`OPATTR`** *`e01`*\
+ | *`e01`*
*`exprList`*\
- *`expr`* | *`exprList`* **`,`** *`expr`*
+ *`expr`* | *`exprList`* **`,`** *`expr`*
*`externDef`*\
- ⟦ *`langType`* ⟧ *`id`* ⟦ **`(`** *`altId`* **`)`** ⟧ **`:`** *`externType`*
+ ⟦ *`langType`* ⟧ *`id`* ⟦ **`(`** *`altId`* **`)`** ⟧ **`:`** *`externType`*
*`externDir`*\
- *`externKey`* *`externList`* *`;;`*
+ *`externKey`* *`externList`* *`;;`*
*`externKey`*\
- **`EXTRN`** | **`EXTERN`** | **`EXTERNDEF`**
+ **`EXTRN`** | **`EXTERN`** | **`EXTERNDEF`**
*`externList`*\
- *`externDef`* | *`externList`* **`,`** ⟦ *`;;`* ⟧ *`externDef`*
+ *`externDef`* | *`externList`* **`,`** ⟦ *`;;`* ⟧ *`externDef`*
*`externType`*\
- **`ABS`** | *`qualifiedType`*
+ **`ABS`** | *`qualifiedType`*
*`fieldAlign`*\
- *`constExpr`*
+ *`constExpr`*
*`fieldInit`*\
- ⟦ *`initValue`* ⟧ | *`structInstance`*
+ ⟦ *`initValue`* ⟧ | *`structInstance`*
*`fieldInitList`*\
- *`fieldInit`* | *`fieldInitList`* **`,`** ⟦ *`;;`* ⟧ *`fieldInit`*
+ *`fieldInit`* | *`fieldInitList`* **`,`** ⟦ *`;;`* ⟧ *`fieldInit`*
*`fileChar`*\
- *`delimiter`*
+ *`delimiter`*
*`fileCharList`*\
- *`fileChar`* | *`fileCharList`* *`fileChar`*
+ *`fileChar`* | *`fileCharList`* *`fileChar`*
*`fileSpec`*\
- *`fileCharList`* | *`textLiteral`*
+ *`fileCharList`* | *`textLiteral`*
*`flagName`*\
- **`ZERO?`** | **`CARRY?`** | **`OVERFLOW?`** | **`SIGN?`** | **`PARITY?`**
+ **`ZERO?`** | **`CARRY?`** | **`OVERFLOW?`** | **`SIGN?`** | **`PARITY?`**
*`floatNumber`*\
- ⟦ *`sign`* ⟧ *`decNumber`* **`.`** ⟦ *`decNumber`* ⟧ ⟦ *`exponent`* ⟧\
- | *`digits`* **`R`** | *`digits`* **`r`**
+ ⟦ *`sign`* ⟧ *`decNumber`* **`.`** ⟦ *`decNumber`* ⟧ ⟦ *`exponent`* ⟧\
+ | *`digits`* **`R`**\
+ | *`digits`* **`r`**
*`forcDir`*\
- **`FORC`** | **`IRPC`**
+ **`FORC`** | **`IRPC`**
*`forDir`*\
- **`FOR`** | **`IRP`**
+ **`FOR`** | **`IRP`**
*`forParm`*\
- *`id`* ⟦ **`:`** *`forParmType`* ⟧
+ *`id`* ⟦ **`:`** *`forParmType`* ⟧
*`forParmType`*\
- **`REQ`** | **`=`** *`textLiteral`*
+ **`REQ`** | **`=`** *`textLiteral`*
*`fpuRegister`*\
- **`ST`** *`expr`*
+ **`ST`** *`expr`*
*`frameExpr`*\
- **`SEG`** *`id`*\
- | **`DGROUP`** **`:`** *`id`*\
- | *`segmentRegister`* **`:`** *`id`*\
- | *`id`*
+ **`SEG`** *`id`*\
+ | **`DGROUP`** **`:`** *`id`*\
+ | *`segmentRegister`* **`:`** *`id`*\
+ | *`id`*
*`generalDir`*\
- *`modelDir`* | *`segOrderDir`* | *`nameDir`*\
- | *`includeLibDir`* | *`commentDir`*\
- | *`groupDir`* | *`assumeDir`*\
- | *`structDir`* | *`recordDir`* | *`typedefDir`*\
- | *`externDir`* | *`publicDir`* | *`commDir`* | *`protoTypeDir`*\
- | *`equDir`* | *`=Dir`* | *`textDir`*\
- | *`contextDir`* | *`optionDir`* | *`processorDir`*\
- | *`radixDir`*\
- | *`titleDir`* | *`pageDir`* | *`listDir`*\
- | *`crefDir`* | *`echoDir`*\
- | *`ifDir`* | *`errorDir`* | *`includeDir`*\
- | *`macroDir`* | *`macroCall`* | *`macroRepeat`* | *`purgeDir`*\
- | *`macroWhile`* | *`macroFor`* | *`macroForc`*\
- | *`aliasDir`*
+ *`modelDir`* | *`segOrderDir`* | *`nameDir`*\
+ | *`includeLibDir`* | *`commentDir`*\
+ | *`groupDir`* | *`assumeDir`*\
+ | *`structDir`* | *`recordDir`* | *`typedefDir`*\
+ | *`externDir`* | *`publicDir`* | *`commDir`* | *`protoTypeDir`*\
+ | *`equDir`* | *`=Dir`* | *`textDir`*\
+ | *`contextDir`* | *`optionDir`* | *`processorDir`*\
+ | *`radixDir`*\
+ | *`titleDir`* | *`pageDir`* | *`listDir`*\
+ | *`crefDir`* | *`echoDir`*\
+ | *`ifDir`* | *`errorDir`* | *`includeDir`*\
+ | *`macroDir`* | *`macroCall`* | *`macroRepeat`* | *`purgeDir`*\
+ | *`macroWhile`* | *`macroFor`* | *`macroForc`*\
+ | *`aliasDir`*
*`gpRegister`*\
- **`AX`** | **`EAX`** | **`CX`** | **`ECX`** | **`DX`** | **`EDX`** | **`BX`** | **`EBX`** | **`DI`** | **`EDI`** | **`SI`** | **`ESI`** | **`BP`** | **`EBP`** | **`SP`** | **`ESP`** | **`RSP`** | **`R8W`** | **`R8D`** | **`R9W`** | **`R9D`** | **`R12D`** | **`R13W`** | **`R13D`** | **`R14W`** | **`R14D`**
+ **`AX`** | **`EAX`** | **`CX`** | **`ECX`** | **`DX`** | **`EDX`** | **`BX`** | **`EBX`**\
+ | **`DI`** | **`EDI`** | **`SI`** | **`ESI`** | **`BP`** | **`EBP`** | **`SP`** | **`ESP`**\
+ | **`R8W`** | **`R8D`** | **`R9W`** | **`R9D`** | **`R12D`** | **`R13W`** | **`R13D`** | **`R14W`** | **`R14D`**
*`groupDir`*\
- *`groupId`* **`GROUP`** *`segIdList`*
+ *`groupId`* **`GROUP`** *`segIdList`*
*`groupId`*\
- *`id`*
+ *`id`*
*`hexdigit`*\
- **`a`** | **`b`** | **`c`** | **`d`** | **`e`** | **`f`** | **`A`** | **`B`** | **`C`** | **`D`** | **`E`** | **`F`**
+ **`a`** | **`b`** | **`c`** | **`d`** | **`e`** | **`f`**\
+ | **`A`** | **`B`** | **`C`** | **`D`** | **`E`** | **`F`**
*`id`*\
- The first character of the identifier can be an upper or lower-case alphabetic character (`[A–Za-z]`) or any of these four characters: `@ _ $ ?` The remaining characters can be any of those same characters or a decimal digit (`[0–9]`). Maximum length is 247 characters.
+ *`alpha`*\
+ | *`id`* *`alpha`*\
+ | *`id`* *`decdigit`*\
+ Maximum length is 247 characters.
*`idList`*\
- *`id`* | *`idList`* **`,`** *`id`*
+ *`id`* | *`idList`* **`,`** *`id`*
*`ifDir`*\
- *`ifStatement`* *`;;`*\
- *`directiveList`*\
- ⟦ *`elseifBlock`* ⟧\
- ⟦ **`ELSE`** *`;;`* \
- *`directiveList`* ⟧ *`;;`*
+ *`ifStatement`* *`;;`*\
+ *`directiveList`*\
+ ⟦ *`elseifBlock`* ⟧\
+ ⟦ **`ELSE`** *`;;`* \
+ *`directiveList`* ⟧ *`;;`*
*`ifStatement`*\
- **`IF`** *`constExpr`*\
- | **`IFE`** *`constExpr`*\
- | **`IFB`** *`textItem`*\
- | **`IFNB`** *`textItem`*\
- | **`IFDEF`** *`id`*\
- | **`IFNDEF`** *`id`*\
- | **`IFDIF`** *`textItem`* **`,`** *`textItem`*\
- | **`IFDIFI`** *`textItem`* **`,`** *`textItem`*\
- | **`IFIDN`** *`textItem`* **`,`** *`textItem`*\
- | **`IFIDNI`** *`textItem`* **`,`** *`textItem`*\
- | **`IF1`**\
- | **`IF2`**
+ **`IF`** *`constExpr`*\
+ | **`IFE`** *`constExpr`*\
+ | **`IFB`** *`textItem`*\
+ | **`IFNB`** *`textItem`*\
+ | **`IFDEF`** *`id`*\
+ | **`IFNDEF`** *`id`*\
+ | **`IFDIF`** *`textItem`* **`,`** *`textItem`*\
+ | **`IFDIFI`** *`textItem`* **`,`** *`textItem`*\
+ | **`IFIDN`** *`textItem`* **`,`** *`textItem`*\
+ | **`IFIDNI`** *`textItem`* **`,`** *`textItem`*\
+ | **`IF1`**\
+ | **`IF2`**
*`immExpr`*\
- *`expr`*
+ *`expr`*
*`includeDir`*\
- **`INCLUDE`** *`fileSpec`* *`;;`*
+ **`INCLUDE`** *`fileSpec`* *`;;`*
*`includeLibDir`*\
- **`INCLUDELIB`** *`fileSpec`* *`;;`*
+ **`INCLUDELIB`** *`fileSpec`* *`;;`*
*`initValue`*\
- *`immExpr`*\
- | *`string`*\
- | **`?`**\
- | *`constExpr`* **`DUP`** ( *`scalarInstList`* )\
- | *`floatNumber`*\
- | *`bcdConst`*
+ *`immExpr`*\
+ | *`string`*\
+ | **`?`**\
+ | *`constExpr`* **`DUP`** **`(`** *`scalarInstList`* **`)`**\
+ | *`floatNumber`*\
+ | *`bcdConst`*
*`inSegDir`*\
- ⟦ *`labelDef`* ⟧ *`inSegmentDir`*
+ ⟦ *`labelDef`* ⟧ *`inSegmentDir`*
*`inSegDirList`*\
- *`inSegDir`* | *`inSegDirList`* *`inSegDir`*
+ *`inSegDir`* | *`inSegDirList`* *`inSegDir`*
*`inSegmentDir`*\
- *`instruction`*\
- | *`dataDir`*\
- | *`controlDir`*\
- | *`startupDir`*\
- | *`exitDir`*\
- | *`offsetDir`*\
- | *`labelDir`*\
- | *`procDir`* ⟦ *`localDirList`* ⟧ ⟦ *`inSegDirList`* ⟧ *`endpDir`*\
- | *`invokeDir`*\
- | *`generalDir`*
+ *`instruction`*\
+ | *`dataDir`*\
+ | *`controlDir`*\
+ | *`startupDir`*\
+ | *`exitDir`*\
+ | *`offsetDir`*\
+ | *`labelDir`*\
+ | *`procDir`* ⟦ *`localDirList`* ⟧ ⟦ *`inSegDirList`* ⟧ *`endpDir`*\
+ | *`invokeDir`*\
+ | *`generalDir`*
*`instrPrefix`*\
- **`REP`** | **`REPE`** | **`REPZ`** | **`REPNE`** | **`REPNZ`** | **`LOCK`**
+ **`REP`** | **`REPE`** | **`REPZ`** | **`REPNE`** | **`REPNZ`** | **`LOCK`**
*`instruction`*\
- ⟦ *`instrPrefix`* ⟧ *`asmInstruction`*
+ ⟦ *`instrPrefix`* ⟧ *`asmInstruction`*
*`invokeArg`*\
- *`register`* **`::`** *`register`* | *`expr`* | **`ADDR`** *`expr`*
+ *`register`* **`::`** *`register`*\
+ | *`expr`*\
+ | **`ADDR`** *`expr`*
*`invokeDir`*\
- **`INVOKE`** *`expr`* ⟦ **`,`** ⟦ *`;;`* ⟧ *`invokeList`* ⟧ *`;;`*
+ **`INVOKE`** *`expr`* ⟦ **`,`** ⟦ *`;;`* ⟧ *`invokeList`* ⟧ *`;;`*
*`invokeList`*\
- *`invokeArg`* | *`invokeList`* **`,`** ⟦ *`;;`* ⟧ *`invokeArg`*
+ *`invokeArg`* | *`invokeList`* **`,`** ⟦ *`;;`* ⟧ *`invokeArg`*
*`keyword`*\
- Any reserved word.
+ Any reserved word.
*`keywordList`*\
- *`keyword`* | *`keyword`* *`keywordList`*
+ *`keyword`* | *`keyword`* *`keywordList`*
*`labelDef`*\
- *`id`* **`:`** | *`id`* **`::`** | **`@@:`**
+ *`id`* **`:`** | *`id`* **`::`** | **`@@:`**
*`labelDir`*\
- *`id`* **`LABEL`** *`qualifiedType`* *`;;`*
+ *`id`* **`LABEL`** *`qualifiedType`* *`;;`*
*`langType`*\
- **`C`** | **`PASCAL`** | **`FORTRAN`** | **`BASIC`** | **`SYSCALL`** | **`STDCALL`**
+ **`C`** | **`PASCAL`** | **`FORTRAN`** | **`BASIC`** | **`SYSCALL`** | **`STDCALL`**
*`listDir`*\
- *`listOption`* *`;;`*
+ *`listOption`* *`;;`*
*`listOption`*\
- **`.LIST`**\
- | **`.NOLIST`**\
- | **`.XLIST`**\
- | **`.LISTALL`**\
- | **`.LISTIF`**\
- | **`.LFCOND`**\
- | **`.NOLISTIF`**\
- | **`.SFCOND`**\
- | **`.TFCOND`**\
- | **`.LISTMACROALL`** | **`.LALL`**\
- | **`.NOLISTMACRO`** | **`.SALL`**\
- | **`.LISTMACRO`** | **`.XALL`**
+ **`.LIST`**\
+ | **`.NOLIST`**\
+ | **`.XLIST`**\
+ | **`.LISTALL`**\
+ | **`.LISTIF`**\
+ | **`.LFCOND`**\
+ | **`.NOLISTIF`**\
+ | **`.SFCOND`**\
+ | **`.TFCOND`**\
+ | **`.LISTMACROALL`** | **`.LALL`**\
+ | **`.NOLISTMACRO`** | **`.SALL`**\
+ | **`.LISTMACRO`** | **`.XALL`**
*`localDef`*\
- **`LOCAL`** *`idList`* *`;;`*
+ **`LOCAL`** *`idList`* *`;;`*
*`localDir`*\
- **`LOCAL`** *`parmList`* *`;;`*
+ **`LOCAL`** *`parmList`* *`;;`*
*`localDirList`*\
- *`localDir`* | *`localDirList`* *`localDir`*
+ *`localDir`* | *`localDirList`* *`localDir`*
*`localList`*\
- *`localDef`* | *`localList`* *`localDef`*
+ *`localDef`* | *`localList`* *`localDef`*
*`macroArg`*\
- **`%`** *`constExpr`*\
- | **`%`** *`textMacroId`*\
- | **`%`** *`macroFuncId`* **`(`** *`macroArgList`* **`)`**\
- | *`string`*\
- | *`arbitraryText`*\
- | **`<`** *`arbitraryText`* **`>`**
+ **`%`** *`constExpr`*\
+ | **`%`** *`textMacroId`*\
+ | **`%`** *`macroFuncId`* **`(`** *`macroArgList`* **`)`**\
+ | *`string`*\
+ | *`arbitraryText`*\
+ | **`<`** *`arbitraryText`* **`>`**
*`macroArgList`*\
- *`macroArg`* | *`macroArgList`* **`,`** *`macroArg`*
+ *`macroArg`* | *`macroArgList`* **`,`** *`macroArg`*
*`macroBody`*\
- ⟦ *`localList`* ⟧ *`macroStmtList`*
+ ⟦ *`localList`* ⟧ *`macroStmtList`*
*`macroCall`*\
- *`id`* *`macroArgList`* *`;;`*\
- | *`id`* ( *`macroArgList`* )
+ *`id`* *`macroArgList`* *`;;`*\
+ | *`id`* **`(`** *`macroArgList`* **`)`**
*`macroDir`*\
- *`id`* **`MACRO`** ⟦ *`macroParmList`* ⟧ *`;;`*\
- *`macroBody`*\
- **`ENDM`** *`;;`*
+ *`id`* **`MACRO`** ⟦ *`macroParmList`* ⟧ *`;;`*\
+ *`macroBody`*\
+ **`ENDM`** *`;;`*
*`macroFor`*\
- *`forDir`* *`forParm`* **`,`** **`<`** *`macroArgList`* **`>`** *`;;`*\
- *`macroBody`*\
- **`ENDM`** *`;;`*
+ *`forDir`* *`forParm`* **`,`** **`<`** *`macroArgList`* **`>`** *`;;`*\
+ *`macroBody`*\
+ **`ENDM`** *`;;`*
*`macroForc`*\
- *`forcDir`* *`id`* **`,`** *`textLiteral`* *`;;`*\
- *`macroBody`*\
- **`ENDM`** *`;;`*
+ *`forcDir`* *`id`* **`,`** *`textLiteral`* *`;;`*\
+ *`macroBody`*\
+ **`ENDM`** *`;;`*
*`macroFuncId`*\
- *`id`*
+ *`id`*
*`macroId`*\
- *`macroProcId`* | *`macroFuncId`*
+ *`macroProcId`* | *`macroFuncId`*
*`macroIdList`*\
- *`macroId`* | *`macroIdList`* **`,`** *`macroId`*
+ *`macroId`* | *`macroIdList`* **`,`** *`macroId`*
*`macroLabel`*\
- *`id`*
+ *`id`*
*`macroParm`*\
- *`id`* ⟦ **`:`** *`parmType`* ⟧
+ *`id`* ⟦ **`:`** *`parmType`* ⟧
*`macroParmList`*\
- *`macroParm`* | *`macroParmList`* **`,`** ⟦ *`;;`* ⟧ *`macroParm`*
+ *`macroParm`* | *`macroParmList`* **`,`** ⟦ *`;;`* ⟧ *`macroParm`*
*`macroProcId`*\
- *`id`*
+ *`id`*
*`macroRepeat`*\
- *`repeatDir`* *`constExpr`* *`;;`*\
- *`macroBody`*\
- **`ENDM`** *`;;`*
+ *`repeatDir`* *`constExpr`* *`;;`*\
+ *`macroBody`*\
+ **`ENDM`** *`;;`*
*`macroStmt`*\
- *`directive`* \
- | *`exitmDir`*\
- | **`:`** *`macroLabel`*\
- | **`GOTO`** *`macroLabel`*
+ *`directive`* \
+ | *`exitmDir`*\
+ | **`:`** *`macroLabel`*\
+ | **`GOTO`** *`macroLabel`*
*`macroStmtList`*\
- *`macroStmt`* *`;;`*\
- | *`macroStmtList`* *`macroStmt`* *`;;`*\
+ *`macroStmt`* *`;;`*\
+ | *`macroStmtList`* *`macroStmt`* *`;;`*
*`macroWhile`*\
- **`WHILE`** *`constExpr`* *`;;`*\
- *`macroBody`*\
- **`ENDM`** *`;;`*
+ **`WHILE`** *`constExpr`* *`;;`*\
+ *`macroBody`*\
+ **`ENDM`** *`;;`*
*`mapType`*\
- **`ALL`** | **`NONE`** | **`NOTPUBLIC`**
+ **`ALL`** | **`NONE`** | **`NOTPUBLIC`**
*`memOption`*\
- **`TINY`** | **`SMALL`** | **`MEDIUM`** | **`COMPACT`** | **`LARGE`** | **`HUGE`** | **`FLAT`**
+ **`TINY`** | **`SMALL`** | **`MEDIUM`** | **`COMPACT`** | **`LARGE`** | **`HUGE`** | **`FLAT`**
*`mnemonic`*\
- Instruction name.
+ Instruction name.
*`modelDir`*\
- **`.MODEL`**\
- *`memOption`* ⟦ **`,`** *`modelOptlist`* ⟧ *`;;`*
+ **`.MODEL`** *`memOption`* ⟦ **`,`** *`modelOptlist`* ⟧ *`;;`*
*`modelOpt`*\
- *`langType`* | *`stackOption`*
+ *`langType`* | *`stackOption`*
*`modelOptlist`*\
- *`modelOpt`* | *`modelOptlist`* **`,`** *`modelOpt`*
+ *`modelOpt`* | *`modelOptlist`* **`,`** *`modelOpt`*
*`module`*\
- ⟦ *`directiveList`* ⟧ *`endDir`*
+ ⟦ *`directiveList`* ⟧ *`endDir`*
*`mulOp`*\
- **`*`** | **`/`** | **`MOD`**
+ **`*`** | **`/`** | **`MOD`**
*`nameDir`*\
- **`NAME`**\
- *`id`* *`;;`*
+ **`NAME`** *`id`* *`;;`*
*`nearfar`*\
- **`NEAR`** | **`FAR`**
+ **`NEAR`** | **`FAR`**
*`nestedStruct`*\
- *`structHdr`* ⟦ *`id`* ⟧ *`;;`*\
- *`structBody`*\
- **`ENDS`** *`;;`*
+ *`structHdr`* ⟦ *`id`* ⟧ *`;;`*\
+ *`structBody`*\
+ **`ENDS`** *`;;`*
*`offsetDir`*\
- *`offsetDirType`* *`;;`*
+ *`offsetDirType`* *`;;`*
*`offsetDirType`*\
- **`EVEN`** | **`ORG`** *`immExpr`* | **`ALIGN`** ⟦ *`constExpr`* ⟧
+ **`EVEN`**\
+ | **`ORG`** *`immExpr`*\
+ | **`ALIGN`** ⟦ *`constExpr`* ⟧
*`offsetType`*\
- **`GROUP`** | **`SEGMENT`** | **`FLAT`**
+ **`GROUP`** | **`SEGMENT`** | **`FLAT`**
*`oldRecordFieldList`*\
- ⟦ *`constExpr`* ⟧ | *`oldRecordFieldList`* **`,`** ⟦ *`constExpr`* ⟧
+ ⟦ *`constExpr`* ⟧ | *`oldRecordFieldList`* **`,`** ⟦ *`constExpr`* ⟧
*`optionDir`*\
- **`OPTION`** *`optionList`* *`;;`*
+ **`OPTION`** *`optionList`* *`;;`*
*`optionItem`*\
- **`CASEMAP`** : *`mapType`*\
- | **`DOTNAME`** | **`NODOTNAME`**\
- | **`EMULATOR`** | **`NOEMULATOR`**\
- | **`EPILOGUE`** **`:`** *`macroId`*\
- | **`EXPR16`** | **`EXPR32`**\
- | **`LANGUAGE`** **`:`** *`langType`*\
- | **`LJMP`** | **`NOLJMP`**\
- | **`M510`** | **`NOM510`**\
- | **`NOKEYWORD`** **`:`** **`<`** *`keywordList`* **`>`**\
- | **`NOSIGNEXTEND`**\
- | **`OFFSET`** **`:`** *`offsetType`*\
- | **`OLDMACROS`** | **`NOOLDMACROS`**\
- | **`OLDSTRUCTS`** | **`NOOLDSTRUCTS`**\
- | **`PROC`** **`:`** *`oVisibility`*\
- | **`PROLOGUE`** : *`macroId`*\
- | **`READONLY`** | **`NOREADONLY`**\
- | **`SCOPED`** | **`NOSCOPED`**\
- | **`SEGMENT`** **`:`** *`segSize`*\
- | **`SETIF2`** **`:`** *`bool`*
+ **`CASEMAP`** **`:`** *`mapType`*\
+ | **`DOTNAME`** | **`NODOTNAME`**\
+ | **`EMULATOR`** | **`NOEMULATOR`**\
+ | **`EPILOGUE`** **`:`** *`macroId`*\
+ | **`EXPR16`** | **`EXPR32`**\
+ | **`LANGUAGE`** **`:`** *`langType`*\
+ | **`LJMP`** | **`NOLJMP`**\
+ | **`M510`** | **`NOM510`**\
+ | **`NOKEYWORD`** **`:`** **`<`** *`keywordList`* **`>`**\
+ | **`NOSIGNEXTEND`**\
+ | **`OFFSET`** **`:`** *`offsetType`*\
+ | **`OLDMACROS`** | **`NOOLDMACROS`**\
+ | **`OLDSTRUCTS`** | **`NOOLDSTRUCTS`**\
+ | **`PROC`** **`:`** *`oVisibility`*\
+ | **`PROLOGUE`** **`:`** *`macroId`*\
+ | **`READONLY`** | **`NOREADONLY`**\
+ | **`SCOPED`** | **`NOSCOPED`**\
+ | **`SEGMENT`** **`:`** *`segSize`*\
+ | **`SETIF2`** **`:`** *`bool`*
*`optionList`*\
- *`optionItem`* | *`optionList`* **`,`** ⟦ *`;;`* ⟧ *`optionItem`*
+ *`optionItem`* | *`optionList`* **`,`** ⟦ *`;;`* ⟧ *`optionItem`*
*`optText`*\
- **`,`** *`textItem`*
+ **`,`** *`textItem`*
*`orOp`*\
- **`OR`** | **`XOR`**
+ **`OR`** | **`XOR`**
*`oVisibility`*\
- **`PUBLIC`** | **`PRIVATE`** | **`EXPORT`**
+ **`PUBLIC`** | **`PRIVATE`** | **`EXPORT`**
*`pageDir`*\
- **`PAGE`** ⟦ *`pageExpr`* ⟧ *`;;`*
+ **`PAGE`** ⟦ *`pageExpr`* ⟧ *`;;`*
*`pageExpr`*\
- **`+`** | ⟦ *`pageLength`* ⟧ ⟦ **`,`** *`pageWidth`* ⟧
+ **`+`** | ⟦ *`pageLength`* ⟧ ⟦ **`,`** *`pageWidth`* ⟧
*`pageLength`*\
- *`constExpr`*
+ *`constExpr`*
*`pageWidth`*\
- *`constExpr`*
+ *`constExpr`*
*`parm`*\
- *`parmId`* ⟦ **`:`** *`qualifiedType`* ⟧ | *`parmId`* ⟦ *`constExpr`* ⟧ ⟦ **`:`** *`qualifiedType`* ⟧
+ *`parmId`* ⟦ **`:`** *`qualifiedType`* ⟧\
+ | *`parmId`* ⟦ *`constExpr`* ⟧ ⟦ **`:`** *`qualifiedType`* ⟧
*`parmId`*\
- *`id`*
+ *`id`*
*`parmList`*\
- *`parm`* | *`parmList`* **`,`** ⟦ *`;;`* ⟧ *`parm`*
+ *`parm`* | *`parmList`* **`,`** ⟦ *`;;`* ⟧ *`parm`*
*`parmType`*\
- **`REQ`** | **`=`** *`textLiteral`* | **`VARARG`**
+ **`REQ`** | **`=`** *`textLiteral`* | **`VARARG`**
*`pOptions`*\
- ⟦ *`distance`* ⟧ ⟦ *`langType`* ⟧ ⟦ *`oVisibility`* ⟧
+ ⟦ *`distance`* ⟧ ⟦ *`langType`* ⟧ ⟦ *`oVisibility`* ⟧
*`primary`*\
- *`expr`* *`binaryOp`* *`expr`* | *`flagName`* | *`expr`*
+ *`expr`* *`binaryOp`* *`expr`* | *`flagName`* | *`expr`*
*`procDir`*\
- *`procId`* **`PROC`**\
- ⟦ *`pOptions`* ⟧ ⟦ **`<`** *`macroArgList`* **`>`** ⟧\
- ⟦ *`usesRegs`* ⟧ ⟦ *`procParmList`* ⟧
+ *`procId`* **`PROC`** ⟦ *`pOptions`* ⟧ ⟦ **`<`** *`macroArgList`* **`>`** ⟧\
+ ⟦ *`usesRegs`* ⟧ ⟦ *`procParmList`* ⟧
*`processor`*\
- | **`.386`** | **`.386p`** | **`.486`** | **`.486P`**\
- | **`.586`** | **`.586P`** | **`.686`** | **`.686P`** | **`.387`**
+ | **`.386`** | **`.386p`** | **`.486`** | **`.486P`**\
+ | **`.586`** | **`.586P`** | **`.686`** | **`.686P`** | **`.387`**
*`processorDir`*\
- *`processor`* *`;;`*\
- | *`coprocessor`* *`;;`*
+ *`processor`* *`;;`*\
+ | *`coprocessor`* *`;;`*
*`procId`*\
- *`id`*
+ *`id`*
*`procItem`*\
- *`instrPrefix`* | *`dataDir`* | *`labelDir`* | *`offsetDir`* | *`generalDir`*
+ *`instrPrefix`* | *`dataDir`* | *`labelDir`* | *`offsetDir`* | *`generalDir`*
*`procParmList`*\
- ⟦ **`,`** ⟦ *`;;`* ⟧ *`parmList`* ⟧\
- ⟦ **`,`** ⟦ *`;;`* ⟧ *`parmId`* **`:VARARG`** ⟧
+ ⟦ **`,`** ⟦ *`;;`* ⟧ *`parmList`* ⟧\
+ ⟦ **`,`** ⟦ *`;;`* ⟧ *`parmId`* **`:VARARG`** ⟧
*`protoArg`*\
- ⟦ *`id`* ⟧ **`:`** *`qualifiedType`*
+ ⟦ *`id`* ⟧ **`:`** *`qualifiedType`*
*`protoArgList`*\
- ⟦ **`,`** ⟦ *`;;`* ⟧ *`protoList`* ⟧\
- ⟦ **`,`** ⟦ *`;;`* ⟧ ⟦ *`id`* ⟧ **`:VARARG`** ⟧
+ ⟦ **`,`** ⟦ *`;;`* ⟧ *`protoList`* ⟧\
+ ⟦ **`,`** ⟦ *`;;`* ⟧ ⟦ *`id`* ⟧ **`:VARARG`** ⟧
*`protoList`*\
- *`protoArg`*\
- | *`protoList`* **`,`** ⟦ *`;;`* ⟧ *`protoArg`*
+ *`protoArg`*\
+ | *`protoList`* **`,`** ⟦ *`;;`* ⟧ *`protoArg`*
*`protoSpec`*\
- ⟦ *`distance`* ⟧ ⟦ *`langType`* ⟧ ⟦ *`protoArgList`* ⟧ | *`typeId`*
+ ⟦ *`distance`* ⟧ ⟦ *`langType`* ⟧ ⟦ *`protoArgList`* ⟧\
+ | *`typeId`*
*`protoTypeDir`*\
- *`id`* **`PROTO`** *`protoSpec`*
+ *`id`* **`PROTO`** *`protoSpec`*
*`pubDef`*\
- ⟦ *`langType`* ⟧ *`id`*
+ ⟦ *`langType`* ⟧ *`id`*
*`publicDir`*\
- **`PUBLIC`** *`pubList`* *`;;`*
+ **`PUBLIC`** *`pubList`* *`;;`*
*`pubList`*\
- *`pubDef`* | *`pubList`* **`,`** ⟦ *`;;`* ⟧ *`pubDef`*
+ *`pubDef`* | *`pubList`* **`,`** ⟦ *`;;`* ⟧ *`pubDef`*
*`purgeDir`*\
- **`PURGE`** *`macroIdList`*
+ **`PURGE`** *`macroIdList`*
*`qualifiedType`*\
- *`type`* | ⟦ *`distance`* ⟧ **`PTR`** ⟦ *`qualifiedType`* ⟧
+ *`type`*\
+ | ⟦ *`distance`* ⟧ **`PTR`** ⟦ *`qualifiedType`* ⟧
*`qualifier`*\
- *`qualifiedType`* | **`PROTO`** *`protoSpec`*
+ *`qualifiedType`* | **`PROTO`** *`protoSpec`*
*`quote`*\
- **`"`** | **`'`**
+ **`"`** | **`'`**
*`qwordRegister`*\
- **`RAX`** | **`RCX`** | **`RDX`** | **`RBX`** | **`RDI`** | **`RSI`** | **`RBP`** | **`R8`** | **`R9`** | **`R10`** | **`R11`** | **`R12`** | **`R13`** | **`R14`** | **`R15`**
+ **`RAX`** | **`RCX`** | **`RDX`** | **`RBX`** | **`RSP`** | **`RBP`** | **`RSI`** | **`RDI`**\
+ | **`R8`** | **`R9`** | **`R10`** | **`R11`** | **`R12`** | **`R13`** | **`R14`** | **`R15`**
*`radixDir`*\
- **`.RADIX`** *`constExpr`* *`;;`*
+ **`.RADIX`** *`constExpr`* *`;;`*
*`radixOverride`*\
- **`h`** | **`o`** | **`q`** | **`t`** | **`y`** | **`H`** | **`O`** | **`Q`** | **`T`** | **`Y`**
+ **`h`** | **`o`** | **`q`** | **`t`** | **`y`**\
+ | **`H`** | **`O`** | **`Q`** | **`T`** | **`Y`**
*`recordConst`*\
- *`recordTag`* **`{`** *`oldRecordFieldList`* **`}`** | *`recordTag`* **`<`** *`oldRecordFieldList`* **`>`**
+ *`recordTag`* **`{`** *`oldRecordFieldList`* **`}`**\
+ | *`recordTag`* **`<`** *`oldRecordFieldList`* **`>`**
*`recordDir`*\
- *`recordTag`* **`RECORD`** *`bitDefList`* *`;;`*
+ *`recordTag`* **`RECORD`** *`bitDefList`* *`;;`*
*`recordFieldList`*\
- ⟦ *`constExpr`* ⟧ | *`recordFieldList`* **`,`** ⟦ *`;;`* ⟧ ⟦ *`constExpr`* ⟧
+ ⟦ *`constExpr`* ⟧ | *`recordFieldList`* **`,`** ⟦ *`;;`* ⟧ ⟦ *`constExpr`* ⟧
*`recordInstance`*\
- **`{`** ⟦ *`;;`* ⟧ *`recordFieldList`* ⟦ *`;;`* ⟧ **`}`**\
- | **`<`** *`oldRecordFieldList`* **`>`**\
- | *`constExpr`* **`DUP`** **`(`** *`recordInstance`* **`)`**
+ **`{`** ⟦ *`;;`* ⟧ *`recordFieldList`* ⟦ *`;;`* ⟧ **`}`**\
+ | **`<`** *`oldRecordFieldList`* **`>`**\
+ | *`constExpr`* **`DUP`** **`(`** *`recordInstance`* **`)`**
*`recordInstList`*\
- *`recordInstance`* | *`recordInstList`* **`,`** ⟦ *`;;`* ⟧ *`recordInstance`*
+ *`recordInstance`* | *`recordInstList`* **`,`** ⟦ *`;;`* ⟧ *`recordInstance`*
*`recordTag`*\
- *`id`*
+ *`id`*
*`register`*\
- *`specialRegister`* | *`gpRegister`* | *`byteRegister`* | *`qwordRegister`* | *`fpuRegister`* | *`SIMDRegister`* | *`segmentRegister`*
+ *`specialRegister`* | *`gpRegister`* | *`byteRegister`* | *`qwordRegister`* | *`fpuRegister`* | *`SIMDRegister`* | *`segmentRegister`*
*`regList`*\
- *`register`* | *`regList`* *`register`*
+ *`register`* | *`regList`* *`register`*
*`relOp`*\
- **`EQ`** | **`NE`** | **`LT`** | **`LE`** | **`GT`** | **`GE`**
+ **`EQ`** | **`NE`** | **`LT`** | **`LE`** | **`GT`** | **`GE`**
*`repeatBlock`*\
- **`.REPEAT`** *`;;`*\
- *`blockStatements`* *`;;`*
+ **`.REPEAT`** *`;;`*\
+ *`blockStatements`* *`;;`*
*`untilDir`* *`;;`*
*`repeatDir`*\
- **`REPEAT`** | **`REPT`**
+ **`REPEAT`** | **`REPT`**
*`scalarInstList`*\
- *`initValue`* | *`scalarInstList`* **`,`** ⟦ *`;;`* ⟧ *`initValue`*
+ *`initValue`*\
+ | *`scalarInstList`* **`,`** ⟦ *`;;`* ⟧ *`initValue`*
*`segAlign`*\
- **`BYTE`** | **`WORD`** | **`DWORD`** | **`PARA`** | **`PAGE`**
+ **`BYTE`** | **`WORD`** | **`DWORD`** | **`PARA`** | **`PAGE`**
*`segAttrib`*\
- **`PUBLIC`** | **`STACK`** | **`COMMON`** | **`MEMORY`** | **`AT`** *`constExpr`* | **`PRIVATE`**
+ **`PUBLIC`** | **`STACK`** | **`COMMON`** | **`MEMORY`** | **`AT`** *`constExpr`* | **`PRIVATE`**
*`segDir`*\
- **`.CODE`**\
- ⟦ *`segId`* ⟧\
- | **`.DATA`**\
- | **`.DATA?`**\
- | **`.CONST`**\
- | **`.FARDATA`**⟦ *`segId`* ⟧\
- | **`.FARDATA?`** ⟦ *`segId`* ⟧\
- | **`.STACK`** ⟦ *`constExpr`* ⟧
+ **`.CODE`** ⟦ *`segId`* ⟧\
+ | **`.DATA`**\
+ | **`.DATA?`**\
+ | **`.CONST`**\
+ | **`.FARDATA`** ⟦ *`segId`* ⟧\
+ | **`.FARDATA?`** ⟦ *`segId`* ⟧\
+ | **`.STACK`** ⟦ *`constExpr`* ⟧
*`segId`*\
- *`id`*
+ *`id`*
*`segIdList`*\
- *`segId`*\
- | *`segIdList`* **`,`** *`segId`*
+ *`segId`*\
+ | *`segIdList`* **`,`** *`segId`*
*`segmentDef`*\
- *`segmentDir`* ⟦ *`inSegDirList`* ⟧ *`endsDir`* | *`simpleSegDir`* ⟦ *`inSegDirList`* ⟧ ⟦ *`endsDir`* ⟧
+ *`segmentDir`* ⟦ *`inSegDirList`* ⟧ *`endsDir`* | *`simpleSegDir`* ⟦ *`inSegDirList`* ⟧ ⟦ *`endsDir`* ⟧
*`segmentDir`*\
- *`segId`* **`SEGMENT`** ⟦ *`segOptionList`* ⟧ *`;;`*
+ *`segId`* **`SEGMENT`** ⟦ *`segOptionList`* ⟧ *`;;`*
*`segmentRegister`*\
- **`CS`** | **`DS`** | **`ES`** | **`FS`** | **`GS`** | **`SS`**
+ **`CS`** | **`DS`** | **`ES`** | **`FS`** | **`GS`** | **`SS`**
*`segOption`*\
- *`segAlign`*\
- | *`segRO`*\
- | *`segAttrib`*\
- | *`segSize`*\
- | *`className`*
+ *`segAlign`*\
+ | *`segRO`*\
+ | *`segAttrib`*\
+ | *`segSize`*\
+ | *`className`*
*`segOptionList`*\
- *`segOption`* | *`segOptionList`* *`segOption`*
+ *`segOption`* | *`segOptionList`* *`segOption`*
*`segOrderDir`*\
- **`.ALPHA`** | **`.SEQ`** | **`.DOSSEG`** | **`DOSSEG`**
+ **`.ALPHA`** | **`.SEQ`** | **`.DOSSEG`** | **`DOSSEG`**
*`segRO`*\
- **`READONLY`**
+ **`READONLY`**
*`segSize`*\
- **`USE16`** | **`USE32`** | **`FLAT`**
+ **`USE16`** | **`USE32`** | **`FLAT`**
*`shiftOp`*\
- **`SHR`** | **`SHL`**
+ **`SHR`** | **`SHL`**
*`sign`*\
- **`+`** | **`-`**
+ **`+`** | **`-`**
*`simdRegister`*\
- **`MM0`** | **`MM1`** | **`MM2`** | **`MM3`** | **`MM4`** | **`MM5`** | **`MM6`** | **`MM7`**\
- | *`xmmRegister`*\
- | **`YMM0`** | **`YMM1`** | **`YMM2`** | **`YMM3`** | **`YMM4`** | **`YMM5`** | **`YMM6`** | **`YMM7`** | **`YMM8`** | **`YMM9`** | **`YMM10`** | **`YMM11`** | **`YMM12`** | **`YMM13`** | **`YMM14`** | **`YMM15`**
+ **`MM0`** | **`MM1`** | **`MM2`** | **`MM3`** | **`MM4`** | **`MM5`** | **`MM6`** | **`MM7`**\
+ | *`xmmRegister`*\
+ | **`YMM0`** | **`YMM1`** | **`YMM2`** | **`YMM3`** | **`YMM4`** | **`YMM5`** | **`YMM6`** | **`YMM7`**\
+ | **`YMM8`** | **`YMM9`** | **`YMM10`** | **`YMM11`** | **`YMM12`** | **`YMM13`** | **`YMM14`** | **`YMM15`**
*`simpleExpr`*\
- **`(`** *`cExpr`* **`)`** | *`primary`*
+ **`(`** *`cExpr`* **`)`** | *`primary`*
*`simpleSegDir`*\
- *`segDir`* *`;;`*
+ *`segDir`* *`;;`*
*`sizeArg`*\
- *`id`* | *`type`* | *`e10`*
+ *`id`* | *`type`* | *`e10`*
*`specialChars`*\
- **`:`** | **`.`** | **`[`** | **`]`** | **`(`** | **`)`** | **`<`** | **`>`** | **`{`** | **`}`**\
- | **`+`** | **`-`** | **`/`** | **`*`** | **`&`** | **`%`** | **`!`**\
- | **`'`** | **`\`** | **`=`** | **`;`** | **`,`** | **`"`**\
- | *`whiteSpaceCharacter`*\
- | *`endOfLine`*
+ **`:`** | **`.`** | **`[`** | **`]`** | **`(`** | **`)`** | **`<`** | **`>`** | **`{`** | **`}`**\
+ | **`+`** | **`-`** | **`/`** | **`*`** | **`&`** | **`%`** | **`!`**\
+ | **`'`** | **`\`** | **`=`** | **`;`** | **`,`** | **`"`**\
+ | *`whiteSpaceCharacter`*\
+ | *`endOfLine`*
*`specialRegister`*\
- **`CR0`** | **`CR2`** | **`CR3`** | **`DR0`** | **`DR1`** | **`DR2`** | **`DR3`** | **`DR6`** | **`DR7`** | **`TR3`** | **`TR4`** | **`TR5`** | **`TR6`** | **`TR7`**
+ **`CR0`** | **`CR2`** | **`CR3`**\
+ | **`DR0`** | **`DR1`** | **`DR2`** | **`DR3`** | **`DR6`** | **`DR7`**\
+ | **`TR3`** | **`TR4`** | **`TR5`** | **`TR6`** | **`TR7`**
*`stackOption`*\
- **`NEARSTACK`** | **`FARSTACK`**
+ **`NEARSTACK`** | **`FARSTACK`**
*`startupDir`*\
- **`.STARTUP`** *`;;`*
+ **`.STARTUP`** *`;;`*
*`stext`*\
- *`stringChar`* | *`stext`* *`stringChar`*
+ *`stringChar`* | *`stext`* *`stringChar`*
*`string`*\
- *`quote`* ⟦ *`stext`* ⟧ *`quote`*
+ *`quote`* ⟦ *`stext`* ⟧ *`quote`*
*`stringChar`*\
- *`quote`* *`quote`* | Any character except quote.
+ *`quote`* *`quote`* | Any character except quote.
*`structBody`*\
- *`structItem`* *`;;`*\
- | *`structBody`* *`structItem`* *`;;`*
+ *`structItem`* *`;;`*\
+ | *`structBody`* *`structItem`* *`;;`*
*`structDir`*\
- *`structTag`* *`structHdr`* ⟦ *`fieldAlign`* ⟧\
- ⟦ **`,`** **`NONUNIQUE`** ⟧ *`;;`*\
- *`structBody`*\
- *`structTag`*\
- **`ENDS`** *`;;`*
+ *`structTag`* *`structHdr`* ⟦ *`fieldAlign`* ⟧\
+ ⟦ **`,`** **`NONUNIQUE`** ⟧ *`;;`*\
+ *`structBody`*\
+ *`structTag`* **`ENDS`** *`;;`*
*`structHdr`*\
- **`STRUC`** | **`STRUCT`** | **`UNION`**
+ **`STRUC`** | **`STRUCT`** | **`UNION`**
*`structInstance`*\
- **`<`** ⟦ *`fieldInitList`* ⟧ **`>`**\
- | **`{`** ⟦ *`;;`* ⟧ ⟦ *`fieldInitList`* ⟧ ⟦ *`;;`* ⟧ **`}`**\
- | *`constExpr`* **`DUP`** ( *`structInstList`* )
+ **`<`** ⟦ *`fieldInitList`* ⟧ **`>`**\
+ | **`{`** ⟦ *`;;`* ⟧ ⟦ *`fieldInitList`* ⟧ ⟦ *`;;`* ⟧ **`}`**\
+ | *`constExpr`* **`DUP`** ( *`structInstList`* )
*`structInstList`*\
- *`structInstance`* | *`structInstList`* **`,`** ⟦ *`;;`* ⟧ *`structInstance`*
+ *`structInstance`* | *`structInstList`* **`,`** ⟦ *`;;`* ⟧ *`structInstance`*
*`structItem`*\
- *`dataDir`*\
- | *`generalDir`*\
- | *`offsetDir`*\
- | *`nestedStruct`*
+ *`dataDir`*\
+ | *`generalDir`*\
+ | *`offsetDir`*\
+ | *`nestedStruct`*
*`structTag`*\
- *`id`*
+ *`id`*
*`term`*\
- *`simpleExpr`* | **`!`** *`simpleExpr`*
+ *`simpleExpr`* | **`!`** *`simpleExpr`*
*`text`*\
- *`textLiteral`* | *`text`* character | **`!`** *`character`* *`text`* | *`character`* | **`!`** *`character`*
+ *`textLiteral`* | *`text`* *`character`* | **`!`** *`character`* *`text`* | *`character`* | **`!`** *`character`*
*`textDir`*\
- *`id`* *`textMacroDir`* *`;;`*
+ *`id`* *`textMacroDir`* *`;;`*
*`textItem`*\
- *`textLiteral`* | *`textMacroId`* | **`%`** *`constExpr`*
+ *`textLiteral`* | *`textMacroId`* | **`%`** *`constExpr`*
*`textLen`*\
- *`constExpr`*
+ *`constExpr`*
*`textList`*\
- *`textItem`* | *`textList`* **`,`** ⟦ *`;;`* ⟧ *`textItem`*
+ *`textItem`* | *`textList`* **`,`** ⟦ *`;;`* ⟧ *`textItem`*
*`textLiteral`*\
- **`<`** *`text`* **`>`** **`;;`**
+ **`<`** *`text`* **`>`** **`;;`**
*`textMacroDir`*\
- **`CATSTR`** ⟦ *`textList`* ⟧\
- | **`TEXTEQU`** ⟦ *`textList`* ⟧\
- | **`SIZESTR`** *`textItem`*\
- | **`SUBSTR`** *`textItem`* **`,`** *`textStart`* ⟦ **`,`** *`textLen`* ⟧\
- | **`INSTR`** ⟦ *`textStart`* **`,`** ⟧ *`textItem`* **`,`** *`textItem`*
+ **`CATSTR`** ⟦ *`textList`* ⟧\
+ | **`TEXTEQU`** ⟦ *`textList`* ⟧\
+ | **`SIZESTR`** *`textItem`*\
+ | **`SUBSTR`** *`textItem`* **`,`** *`textStart`* ⟦ **`,`** *`textLen`* ⟧\
+ | **`INSTR`** ⟦ *`textStart`* **`,`** ⟧ *`textItem`* **`,`** *`textItem`*
*`textMacroId`*\
- *`id`*
+ *`id`*
*`textStart`*\
- *`constExpr`*
+ *`constExpr`*
*`titleDir`*\
- *`titleType`* *`arbitraryText`* *`;;`*
+ *`titleType`* *`arbitraryText`* *`;;`*
*`titleType`*\
- **`TITLE`** | **`SUBTITLE`** | **`SUBTTL`**
+ **`TITLE`** | **`SUBTITLE`** | **`SUBTTL`**
*`type`*\
- *`structTag`*\
- | *`unionTag`*\
- | *`recordTag`*\
- | *`distance`*\
- | *`dataType`*\
- | *`typeId`*
+ *`structTag`*\
+ | *`unionTag`*\
+ | *`recordTag`*\
+ | *`distance`*\
+ | *`dataType`*\
+ | *`typeId`*
*`typedefDir`*\
- *`typeId`* **`TYPEDEF`** qualifier
+ *`typeId`* **`TYPEDEF`** *`qualifier`*
*`typeId`*\
- *`id`*
+ *`id`*
*`unionTag`*\
- *`id`*
+ *`id`*
*`untilDir`*\
- **`.UNTIL`** *`cExpr`* *`;;`*\
- **`.UNTILCXZ`** ⟦ *`cxzExpr`* ⟧ *`;;`*
+ **`.UNTIL`** *`cExpr`* *`;;`*\
+ **`.UNTILCXZ`** ⟦ *`cxzExpr`* ⟧ *`;;`*
*`usesRegs`*\
- **`USES`** *`regList`*
+ **`USES`** *`regList`*
*`whileBlock`*\
- **`.WHILE`**\
- *`cExpr`* *`;;`*\
- *`blockStatements`* *`;;`*\
- **`.ENDW`**
+ **`.WHILE`** *`cExpr`* *`;;`*\
+ *`blockStatements`* *`;;`*\
+ **`.ENDW`**
*`whiteSpaceCharacter`*\
- ASCII 8, 9, 11–13, 26, 32
+ ASCII 8, 9, 11–13, 26, 32
*`xmmRegister`*\
- **`XMM0`** | **`XMM1`** | **`XMM2`** | **`XMM3`** | **`XMM4`** | **`XMM5`** | **`XMM6`** | **`XMM7`** | **`XMM8`** | **`XMM9`** | **`XMM10`** | **`XMM11`** | **`XMM12`** | **`XMM13`** | **`XMM14`** | **`XMM15`**
+ **`XMM0`** | **`XMM1`** | **`XMM2`** | **`XMM3`** | **`XMM4`** | **`XMM5`** | **`XMM6`** | **`XMM7`**\
+ | **`XMM8`** | **`XMM9`** | **`XMM10`** | **`XMM11`** | **`XMM12`** | **`XMM13`** | **`XMM14`** | **`XMM15`**
diff --git a/docs/assembler/masm/masm-for-x64-ml64-exe.md b/docs/assembler/masm/masm-for-x64-ml64-exe.md
index 983bb96ce5..840b002083 100644
--- a/docs/assembler/masm/masm-for-x64-ml64-exe.md
+++ b/docs/assembler/masm/masm-for-x64-ml64-exe.md
@@ -1,22 +1,22 @@
---
+description: "Learn more about: Microsoft Macro Assembler (MASM) for x64 (ml64.exe)"
title: "MASM for x64 (ml64.exe)"
-ms.date: "12/17/2019"
+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 Microsoft Assembler (MASM) to target x64 code. Named ml64.exe, this is 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 are not 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 do not want to install the complete Visual Studio IDE, but only want the command-line tools, download the [Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019).
+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 MASM to build code for x64 targets on the command line, you must use a developer command prompt for x64 targets, which 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).
+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).
-For information on ml64.exe command line options, see [ML and ML64 Command-Line Reference](ml-and-ml64-command-line-reference.md).
+For information on ml64.exe command-line options, see [ML and ML64 Command-Line Reference](ml-and-ml64-command-line-reference.md).
-Inline assembler or use of the ASM keyword is not supported for x64 or ARM targets. To port your x86 code that uses inline assembler to x64 or ARM, you can convert your code to C++, use compiler intrinsics, or create assembler-language source files. The Microsoft C++ compiler supports intrinsics to allow you to use special-function instructions, for example, privileged, bit scan/test, interlocked, and so on, in as close to a cross-platform manner as possible. For information on available intrinsics, see [Compiler Intrinsics](../../intrinsics/compiler-intrinsics.md).
+Inline assembler or use of the **`ASM`** keyword isn't supported for x64 or ARM64 targets. To port your x86 code that uses inline assembler to x64 or ARM64, you can convert your code to C++, use compiler intrinsics, or create assembler-language source files. The Microsoft C++ compiler supports intrinsics to allow you to use special-function instructions, for example, privileged, bit scan or test, interlocked, and so on, in as close to a cross-platform manner as possible. For information on available intrinsics, see [Compiler Intrinsics](../../intrinsics/compiler-intrinsics.md).
## Add an assembler-language file to a Visual Studio C++ project
-The Visual Studio project system supports assembler-language files built by using MASM in your C++ projects. You can create x64 assembler-language source files and build them into object files by using MASM, which supports x64 fully. You can then link these object files to your C++ code built for x64 targets. This is one way to overcome the lack of an x64 inline assembler.
+The Visual Studio project system supports assembler-language files built by using MASM in your C++ projects. MASM fully supports x64 assembler-language source files, and builds them into object files. You can then link these object files to your C++ code built for x64 targets. It's one way to overcome the lack of an x64 inline assembler.
### To add an assembler-language file to an existing Visual Studio C++ project
@@ -26,29 +26,29 @@ The Visual Studio project system supports assembler-language files built by usin
1. On the menu bar, choose **Project**, **Add New Item**.
-1. In the **Add New Item** dialog box, select **C++ file (.cpp)** in the center pane. In the **Name** edit control, enter a new file name that has a **.asm** extension instead of .cpp. Choose **Add** to add the file to your project and close the dialog box.
+1. In the **Add New Item** dialog box, select **C++ file (.cpp)** in the center pane. In the **Name** edit control, enter a new file name that has a *`.asm`* extension instead of *`.cpp`*. Choose **Add** to add the file to your project and close the dialog box.
-Create your assembler-language code in the .asm file you added. When you build your solution, the MASM assembler is invoked to assemble the .asm file into an object file that is then linked into your project. To make symbol access easier, declare your assembler functions as `extern "C"` in your C++ source code, rather than using the C++ name decoration conventions in your assembler-language source files.
+Create your assembler-language code in the *`.asm`* file you added. When you build your solution, the MASM assembler is invoked to assemble the *`.asm`* file into an object file that is then linked into your project. To make symbol access easier, declare your assembler functions as `extern "C"` in your C++ source code, rather than using the C++ name decoration conventions in your assembler-language source files.
## ml64-Specific Directives
You can use the following ml64-specific directives in your assembler-language source code that targets x64:
-- [.ALLOCSTACK](dot-allocstack.md)
+- [`.ALLOCSTACK`](dot-allocstack.md)
-- [.ENDPROLOG](dot-endprolog.md)
+- [`.ENDPROLOG`](dot-endprolog.md)
-- [.PUSHFRAME](dot-pushframe.md)
+- [`.PUSHFRAME`](dot-pushframe.md)
-- [.PUSHREG](dot-pushreg.md)
+- [`.PUSHREG`](dot-pushreg.md)
-- [.SAVEREG](dot-savereg.md)
+- [`.SAVEREG`](dot-savereg.md)
-- [.SAVEXMM128](dot-savexmm128.md)
+- [`.SAVEXMM128`](dot-savexmm128.md)
-- [.SETFRAME](dot-setframe.md)
+- [`.SETFRAME`](dot-setframe.md)
-In addition, the [PROC](proc.md) directive has been updated for use with ml64.exe.
+The [`PROC`](proc.md) directive has also been updated for use with ml64.exe.
## 32-Bit Address Mode (Address Size Override)
@@ -62,7 +62,7 @@ prefetch [eax]
movnti rax, QWORD PTR [r8d]
```
-MASM assumes that if a 32-bit displacement appears alone as a memory operand, 64-bit addressing is intended. There is currently no support for 32-bit addressing with such operands.
+MASM assumes 64-bit addressing if a 32-bit displacement appears alone as a memory operand. There's currently no support for 32-bit addressing with such operands.
Finally, mixing register sizes within a memory operand, as demonstrated in the following code, generates an error.
diff --git a/docs/assembler/masm/microsoft-macro-assembler-reference.md b/docs/assembler/masm/microsoft-macro-assembler-reference.md
index 0c9394b9c7..1cf7f09461 100644
--- a/docs/assembler/masm/microsoft-macro-assembler-reference.md
+++ b/docs/assembler/masm/microsoft-macro-assembler-reference.md
@@ -1,20 +1,23 @@
---
+description: "Learn more about: Microsoft Macro Assembler reference"
title: "Microsoft Macro Assembler reference"
-ms.date: "12/17/2019"
+ms.date: 09/21/2021
helpviewer_keywords: ["MASM (Microsoft Macro Assembler), reference", "MASM (Microsoft Macro Assembler), overview", "MASM (Microsoft Macro Assembler)", "MASM (Microsoft Macro Assembler), documentation overview"]
-ms.assetid: 1446d55f-e2e7-4fd1-a9b8-b15cf7d4e47c
---
# 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 also gives you greater control over the hardware because it supports the instruction sets of the 386, 486, and Pentium processors. By using MASM, you also can reduce time and memory overhead.
+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)\
-Describes the ML.exe and ML64.exe command-line options.
+[ML and ML64 command-line options](ml-and-ml64-command-line-reference.md)\
+Describes the ML and ML64 command-line options.
-[ML error messages](ml-error-messages.md)\
-Describes ML.exe fatal and nonfatal error messages and warnings.
+[MASM for x64 (ml64.exe)](masm-for-x64-ml64-exe.md)\
+Information about how to create output files for x64.
+
+[Instruction Format](instruction-format.md)\
+Describes basic instruction format and instruction prefixes for MASM.
[Directives reference](directives-reference.md)\
Provides links to articles that discuss the use of directives in MASM.
@@ -25,14 +28,13 @@ Provides links to articles that discuss the use of symbols in MASM.
[Operators Reference](operators-reference.md)\
Provides links to articles that discuss the use of operators in MASM.
-[Processor Manufacturer Programming Manuals](processor-manufacturer-programming-manuals.md)\
-Provides links to websites that may contain programming information about processors that are not manufactured, sold, or supported by Microsoft.
-
-[MASM for x64 (ml64.exe)](masm-for-x64-ml64-exe.md)\
-Information about how to create output files for x64.
+[ML error messages](ml-error-messages.md)\
+Describes fatal and nonfatal error messages and warnings.
-[MASM BNF Grammar](masm-bnf-grammar.md)
+[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)\
Formal BNF description of MASM for x64.
## Related Sections
@@ -43,5 +45,5 @@ Provides links to different areas of the Visual Studio and Visual C++ documentat
## See also
[Compiler Intrinsics](../../intrinsics/compiler-intrinsics.md)\
-[x86Intrinsics](../../intrinsics/x86-intrinsics-list.md)\
+[x86 Intrinsics](../../intrinsics/x86-intrinsics-list.md)\
[x64 (amd64) Intrinsics](../../intrinsics/x64-amd64-intrinsics-list.md)
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 a14b954932..e4ea469e36 100644
--- a/docs/assembler/masm/ml-and-ml64-command-line-reference.md
+++ b/docs/assembler/masm/ml-and-ml64-command-line-reference.md
@@ -1,10 +1,9 @@
---
title: "ML and ML64 command-line reference"
description: "Reference guide to the Microsoft MASM ML and ML64 assembler command-line options."
-ms.date: "02/09/2020"
+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"]
-ms.assetid: 712623c6-f77e-47ea-a945-089e57c50b40
+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
@@ -14,74 +13,77 @@ For more information on ml64.exe, see [MASM for x64 (ml64.exe)](masm-for-x64-ml6
## Syntax
-> ML \[*options*] *filename* \[ \[*options*] *filename*]
+> **`ML`** \[*`options`*] *`filename`* \[ \[*`options`*] *`filename`*]
>
-> ML64 \[*options*] *filename* \[ \[*options*] *filename*] ... \[/link *link_options*]
+> **`ML64`** \[*`options`*] *`filename`* \[ \[*`options`*] *`filename`*] ... \[**`/link`** *`link_options`*]
### Parameters
-*options*\
-The options listed in the following table.
-
-|Option|Action|
-|------------|------------|
-|**/AT**|Enables tiny-memory-model support. Enables error messages for code constructs that violate the requirements for .com format files. This option isn't equivalent to the [.MODEL](dot-model.md) **TINY** directive.
Not available in ml64.exe.|
-|**/Bl** *filename*|Selects an alternate linker.|
-|**/c**|Assembles only. Does no linking.|
-|**/coff**|Generates common object file format (COFF) type of object module. Required for Win32 assembly language development.
Not available in ml64.exe.|
-|**/Cp**|Preserves case of all user identifiers.|
-|**/Cu**|Maps all identifiers to upper case (default).
Not available in ml64.exe.|
-|**/Cx**|Preserves case in public and extern symbols.|
-|**/D** *symbol*⟦=*value*⟧|Defines a text macro with the given name. If *value* is missing, it's blank. Multiple tokens separated by spaces must be enclosed in quotation marks.|
-|**/EP**|Generates a preprocessed source listing (sent to STDOUT). See **/Sf**.|
-|**/ERRORREPORT** [ **NONE** | **PROMPT** | **QUEUE** | **SEND** ]| Deprecated. Error reporting is controlled by [Windows Error Reporting (WER)](/windows/win32/wer/windows-error-reporting) settings. |
-|**/F** *hexnum*|Sets stack size to *hexnum* bytes (the same as **/link /STACK**:*number*). The value must be expressed in hexadecimal notation. There must be a space between **/F** and *hexnum*.|
-|**/Fe** *filename*|Names the executable file.|
-|**/Fl**⟦*filename*⟧|Generates an assembled code listing. See **/Sf**.|
-|**/Fm**⟦*filename*⟧|Creates a linker map file.|
-|**/Fo** *filename*|Names an object file. For more information, see [Remarks](#remarks).|
-|**/FPi**|Generates emulator fix-ups for floating-point arithmetic (mixed language only).
Not available in ml64.exe.|
-|**/Fr**⟦*filename*⟧|Generates a source browser .sbr file.|
-|**/FR**⟦*filename*⟧|Generates an extended form of a source browser .sbr file.|
-|**/Gc**|Specifies use of FORTRAN- or Pascal-style function calling and naming conventions. Same as **OPTION LANGUAGE:PASCAL**.
Not available in ml64.exe.|
-|**/Gd**|Specifies use of C-style function calling and naming conventions. Same as **OPTION LANGUAGE:C**.
Not available in ml64.exe.|
-|**/GZ**|Specifies use of __stdcall function calling and naming conventions. Same as **OPTION LANGUAGE:STCALL**.
Not available in ml64.exe.|
-|**/H** *number*|Restricts external names to number significant characters. The default is 31 characters.
Not available in ml64.exe.|
-|**/help**|Calls QuickHelp for help on ML.|
-|**/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.|
-|**/Sa**|Turns on listing of all available information.|
-|**/safeseh**|Marks the object as either containing no exception handlers or containing exception handlers that are all declared with [.SAFESEH](dot-safeseh.md).
Not available in ml64.exe.|
-|**/Sf**|Adds first-pass listing to listing file.|
-|**/Sl** *width*|Sets the line width of source listing in characters per line. Range is 60 to 255 or 0. Default is 0. Same as [PAGE](page.md) width.|
-|**/Sn**|Turns off symbol table when producing a listing.|
-|**/Sp** *length*|Sets the page length of source listing in lines per page. Range is 10 to 255 or 0. Default is 0. Same as [PAGE](page.md) length.|
-|**/Ss** *text*|Specifies text for source listing. Same as [SUBTITLE](subtitle.md) text.|
-|**/St** *text*|Specifies title for source listing. Same as [TITLE](title.md) text.|
-|**/Sx**|Turns on false conditionals in listing.|
-|**/Ta** *filename*|Assembles source file whose name doesn't end with the .asm extension.|
-|**/w**|Same as **/W0/WX**.|
-|**/W** *level*|Sets the warning level, where *level* = 0, 1, 2, or 3.|
-|**/WX**|Returns an error code if warnings are generated.|
-|**/X**|Ignore INCLUDE environment path.|
-|**/Zd**|Generates line-number information in object file.|
-|**/Zf**|Makes all symbols public.|
-|**/Zi**|Generates CodeView information in object file.|
-|**/Zm**|Enables**M510** option for maximum compatibility with MASM 5.1.
Not available in ml64.exe.|
-|**/Zp**⟦*alignment*⟧|Packs structures on the specified byte boundary. The *alignment* can be 1, 2, or 4.|
-|**/Zs**|Performs a syntax check only.|
-|**/?**|Displays a summary of ML command-line syntax.|
-
-*filename*\
+*`options`*\
+The options listed in the following table:
+
+| Option | Action |
+|--|--|
+| **`/AT`** | Enables tiny-memory-model support. Enables error messages for code constructs that violate the requirements for *`.com`* format files. This option isn't equivalent to the [`.MODEL`](dot-model.md) **`TINY`** directive.
Not available in ml64.exe. |
+| **`/Bl`** *`filename`* | Selects an alternate linker in *`filename`*. |
+| **`/c`** | Assembles only. Does no linking. |
+| **`/coff`** | Generates common object file format (COFF) type of object module. Required for Win32 assembly language development.
Not available in ml64.exe. |
+| **`/Cp`** | Preserves case of all user identifiers. |
+| **`/Cu`** | Maps all identifiers to upper case (default).
Not available in ml64.exe. |
+| **`/Cx`** | Preserves case in public and extern symbols. |
+| **`/D`** *`symbol`*⟦=*`value`*⟧ | Defines a text macro with the given name *`symbol`*. If *`value`* is missing, it's blank. Multiple tokens separated by spaces must be enclosed in quotation marks. |
+| **`/EP`** | Generates a preprocessed source listing (sent to `STDOUT`). See **`/Sf`**. |
+| **`/ERRORREPORT`** [ **`NONE`** \| **`PROMPT`** \| **`QUEUE`** \| **`SEND`** ] | Deprecated. Error reporting is controlled by [Windows Error Reporting (WER)](/windows/win32/wer/windows-error-reporting) settings. |
+| **`/F`** *`hexnum`* | Sets stack size to *`hexnum`* bytes (the same as **`/link /STACK:`**). The value must be expressed in hexadecimal notation. There must be a space between **`/F`** and *`hexnum`*. |
+| **`/Fe`** *`filename`* | Names the executable file. |
+| **`/Fl`**⟦*`filename`*⟧ | Generates an assembled code listing. See **/Sf**. |
+| **`/Fm`**⟦*`filename`*⟧ | Creates a linker map file. |
+| **`/Fo`** *`filename`* | Names an object file. For more information, see [Remarks](#remarks). |
+| **`/FPi`** | Generates emulator fix-ups for floating-point arithmetic (mixed language only).
Not available in ml64.exe. |
+| **`/Fr`**⟦*`filename`*⟧ | Generates a source browser *`.sbr`* file. |
+| **`/FR`**⟦*`filename`*⟧ | Generates an extended form of a source browser *`.sbr`* file. |
+| **`/Gc`** | Specifies use of FORTRAN- or Pascal-style conventions for function calls and names. Same as **`OPTION LANGUAGE:PASCAL`**.
Not available in ml64.exe. |
+| **`/Gd`** | Specifies use of C-style conventions for function calls and names. Same as **`OPTION LANGUAGE:C`**.
Not available in ml64.exe. |
+| **`/Gz`** | Specifies use of `__stdcall` conventions for function calls and names. Same as **`OPTION LANGUAGE:STDCALL`**.
Not available in ml64.exe. |
+| **`/H`** *`number`* | Restricts external names to *`number`* significant characters. The default is 31 characters.
Not available in ml64.exe. |
+| **`/help`** | Displays a summary of ML command-line syntax and options. |
+| **`/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. |
+| **`/Sl`** *`width`* | Sets the line width of source listing in characters per line to *`width`*. Range is 60-255 or 0. Default is 0. Same as [`PAGE`](page.md) *`width`*. |
+| **`/Sn`** | Turns off symbol table when a listing is produced. |
+| **`/Sp`** *`length`* | Sets the page length of source listing in lines per page to *`length`*. Range is 10-255 or 0. Default is 0. Same as [`PAGE`](page.md) *`length`*. |
+| **`/Ss`** *`text`* | Specifies text for source listing. Same as [`SUBTITLE`](subtitle.md) text. |
+| **`/St`** *`text`* | Specifies title for source listing. Same as [`TITLE`](title.md) text. |
+| **`/Sx`** | Turns on false conditionals in listing. |
+| **`/Ta`** *`filename`* | Assembles source file whose name doesn't end with the *`.asm`* extension. |
+| **`/w`** | Same as **`/W0 /WX`**. |
+| **`/W`** *`level`* | Sets the warning level, where *`level`* = 0, 1, 2, or 3. |
+| **`/WX`** | If warnings are generated, returns an error code. |
+| **`/X`** | Ignore `INCLUDE` environment path. |
+| **`/Zd`** | Generates line-number information in object file. |
+| **`/Zf`** | Makes all symbols public. |
+| **`/ZH:MD5`** | Use MD5 for checksum in debug info. |
+| **`/ZH:SHA_256`** | Use SHA256 for checksum in debug info (default in Visual Studio 2022 version 17.0 and later). |
+| **`/Zi`** | Generates CodeView information in object file. |
+| **`/Zm`** | Enables **`M510`** option for maximum compatibility with MASM 5.1.
Not available in ml64.exe. |
+| **`/Zp`**⟦*`alignment`*⟧ | Packs structures on the specified byte boundary. The *`alignment`* can be 1, 2, 4, 8, or 16. |
+| **`/Zs`** | Performs a syntax check only. |
+| **`/?`** | Displays a summary of ML command-line syntax and options. |
+
+*`filename`*\
The name of the file.
-*link_options*\
+*`link_options`*\
The link options. For more information, see [Linker options](../../build/reference/linker-options.md).
## Remarks
-Some command-line options to ML and ML64 are placement-sensitive. For example, because ML and ML64 can accept several **/c** options, any corresponding **/Fo** options must be specified before **/c**. The following command-line example illustrates an object file specification for each assembly file specification:
+Some command-line options to ML and ML64 are placement-sensitive. For example, because ML and ML64 can accept several **`/c`** options, any corresponding **`/Fo`** options must be specified before **`/c`**. The following command-line example illustrates an object file specification for each assembly file specification:
```cmd
ml.exe /Fo a1.obj /c a.asm /Fo b1.obj /c b.asm
@@ -89,13 +91,13 @@ ml.exe /Fo a1.obj /c a.asm /Fo b1.obj /c b.asm
## Environment Variables
-|Variable|Description|
-|--------------|-----------------|
-|INCLUDE|Specifies search path for include files.|
-|ML|Specifies default command-line options.|
-|TMP|Specifies path for temporary files.|
+| Variable | Description |
+|--|--|
+| `INCLUDE` | Specifies search path for include files. |
+| `ML` | Specifies default command-line options. |
+| `TMP` | Specifies path for temporary files. |
## See also
-[ML Error Messages](ml-error-messages.md)\
-[Microsoft Macro Assembler Reference](microsoft-macro-assembler-reference.md)
+[ML error messages](ml-error-messages.md)\
+[Microsoft Macro Assembler reference](microsoft-macro-assembler-reference.md)
diff --git a/docs/assembler/masm/ml-error-messages.md b/docs/assembler/masm/ml-error-messages.md
index d76ec8d21c..60ef663335 100644
--- a/docs/assembler/masm/ml-error-messages.md
+++ b/docs/assembler/masm/ml-error-messages.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Error Messages"
title: "ML Error Messages"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["vc.errors.ml"]
helpviewer_keywords: ["MASM (Microsoft Macro Assembler), ML error messages"]
ms.assetid: e7e164b3-6d65-4b5b-8925-bfbebc043523
diff --git a/docs/assembler/masm/ml-fatal-error-a1000.md b/docs/assembler/masm/ml-fatal-error-a1000.md
index 0885bc7cbe..64c18b9e37 100644
--- a/docs/assembler/masm/ml-fatal-error-a1000.md
+++ b/docs/assembler/masm/ml-fatal-error-a1000.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Fatal Error A1000"
title: "ML Fatal Error A1000"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A1000"]
helpviewer_keywords: ["A1000"]
ms.assetid: 4fc77a83-8796-4dcf-9c37-6395d635b817
diff --git a/docs/assembler/masm/ml-fatal-error-a1005.md b/docs/assembler/masm/ml-fatal-error-a1005.md
index bf1eb8e527..26a5522b82 100644
--- a/docs/assembler/masm/ml-fatal-error-a1005.md
+++ b/docs/assembler/masm/ml-fatal-error-a1005.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Fatal Error A1005"
title: "ML Fatal Error A1005"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A1005"]
helpviewer_keywords: ["A1005"]
ms.assetid: 42c7a6c5-277d-417c-acc1-d84c370e8d24
diff --git a/docs/assembler/masm/ml-fatal-error-a1007.md b/docs/assembler/masm/ml-fatal-error-a1007.md
index 8b15feba10..8f6c7940ef 100644
--- a/docs/assembler/masm/ml-fatal-error-a1007.md
+++ b/docs/assembler/masm/ml-fatal-error-a1007.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Fatal Error A1007"
title: "ML Fatal Error A1007"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A1007"]
helpviewer_keywords: ["A1007"]
ms.assetid: bcf9c826-beb3-4e93-91fe-1ffd34995fbf
diff --git a/docs/assembler/masm/ml-fatal-error-a1008.md b/docs/assembler/masm/ml-fatal-error-a1008.md
index 505eda9744..c18d2492c9 100644
--- a/docs/assembler/masm/ml-fatal-error-a1008.md
+++ b/docs/assembler/masm/ml-fatal-error-a1008.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Fatal Error A1008"
title: "ML Fatal Error A1008"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A1008"]
helpviewer_keywords: ["A1008"]
ms.assetid: fe592f9d-c37b-4cd8-a51d-e3c15ddcab83
diff --git a/docs/assembler/masm/ml-fatal-error-a1009.md b/docs/assembler/masm/ml-fatal-error-a1009.md
index 12f74a4eff..23fe9aee2c 100644
--- a/docs/assembler/masm/ml-fatal-error-a1009.md
+++ b/docs/assembler/masm/ml-fatal-error-a1009.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Fatal Error A1009"
title: "ML Fatal Error A1009"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A1009"]
helpviewer_keywords: ["A1009"]
ms.assetid: f7a962a6-4280-485e-95cb-2ab8922c66c2
diff --git a/docs/assembler/masm/ml-fatal-error-a1010.md b/docs/assembler/masm/ml-fatal-error-a1010.md
index 9ac0f39f86..0229ad3136 100644
--- a/docs/assembler/masm/ml-fatal-error-a1010.md
+++ b/docs/assembler/masm/ml-fatal-error-a1010.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Fatal Error A1010"
title: "ML Fatal Error A1010"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A1010"]
helpviewer_keywords: ["A1010"]
ms.assetid: 9e0b5241-67f4-4740-8701-3b2d2d1ad9e4
diff --git a/docs/assembler/masm/ml-fatal-error-a1011.md b/docs/assembler/masm/ml-fatal-error-a1011.md
index b28861f913..6a5e3ea920 100644
--- a/docs/assembler/masm/ml-fatal-error-a1011.md
+++ b/docs/assembler/masm/ml-fatal-error-a1011.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Fatal Error A1011"
title: "ML Fatal Error A1011"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A1011"]
helpviewer_keywords: ["A1011"]
ms.assetid: 7fbf092d-4189-4330-a884-dfa2268fc3dd
diff --git a/docs/assembler/masm/ml-fatal-error-a1016.md b/docs/assembler/masm/ml-fatal-error-a1016.md
index 7841721ddb..193e1af425 100644
--- a/docs/assembler/masm/ml-fatal-error-a1016.md
+++ b/docs/assembler/masm/ml-fatal-error-a1016.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Fatal Error A1016"
title: "ML Fatal Error A1016"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A1016"]
helpviewer_keywords: ["A1016"]
ms.assetid: 440b3750-ba0b-44d8-b82d-d581f62c08b2
diff --git a/docs/assembler/masm/ml-fatal-error-a1017.md b/docs/assembler/masm/ml-fatal-error-a1017.md
index ca5415129e..186314b280 100644
--- a/docs/assembler/masm/ml-fatal-error-a1017.md
+++ b/docs/assembler/masm/ml-fatal-error-a1017.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Fatal Error A1017"
title: "ML Fatal Error A1017"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A1017"]
helpviewer_keywords: ["A1017"]
ms.assetid: bef0b312-5431-4e5a-b637-c19919acf01b
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2004.md b/docs/assembler/masm/ml-nonfatal-error-a2004.md
index 2eee7ef097..cb40f2e8d3 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2004.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2004.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2004"
title: "ML Nonfatal Error A2004"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2004"]
helpviewer_keywords: ["A2004"]
ms.assetid: 74e219ba-4dec-467a-b121-18a76aa57230
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2006.md b/docs/assembler/masm/ml-nonfatal-error-a2006.md
index 69ac5ca546..5eb17a38e6 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2006.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2006.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2006"
title: "ML Nonfatal Error A2006"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2006"]
helpviewer_keywords: ["A2006"]
ms.assetid: b8a8f096-95df-42b5-85ed-d2530560a84c
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2008.md b/docs/assembler/masm/ml-nonfatal-error-a2008.md
index 760a172725..b648e40ee5 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2008.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2008.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2008"
title: "ML Nonfatal Error A2008"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2008"]
helpviewer_keywords: ["A2008"]
ms.assetid: ca24157f-c88a-4678-ae06-3bc3cd956001
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2010.md b/docs/assembler/masm/ml-nonfatal-error-a2010.md
index 10c8c345f0..0037f31377 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2010.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2010.md
@@ -1,16 +1,19 @@
---
+description: "Learn more about: ML Nonfatal Error A2010"
title: "ML Nonfatal Error A2010"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2010"]
helpviewer_keywords: ["A2010"]
ms.assetid: 8bcd57f4-1e3f-421f-9ef8-e702daf57fcb
---
# ML Nonfatal Error A2010
-**invalid type expression**
+> **invalid type expression**
-The operand to [THIS](operator-this.md) or [PTR](operator-ptr.md) was not a valid type expression.
+## Remarks
+
+The operand to [`THIS`](operator-this.md) or [`PTR`](operator-ptr.md) wasn't a valid type expression.
## See also
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2019.md b/docs/assembler/masm/ml-nonfatal-error-a2019.md
index 9e4c1fb7aa..90bd405bec 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2019.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2019.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2019"
title: "ML Nonfatal Error A2019"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2019"]
helpviewer_keywords: ["A2019"]
ms.assetid: 7dff209b-6d91-4e39-88a3-5d6329bac537
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2022.md b/docs/assembler/masm/ml-nonfatal-error-a2022.md
index 04f41707a2..8751e3f61e 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2022.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2022.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2022"
title: "ML Nonfatal Error A2022"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2022"]
helpviewer_keywords: ["A2022"]
ms.assetid: 3f4b1017-543e-4236-820f-61070ab58920
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2031.md b/docs/assembler/masm/ml-nonfatal-error-a2031.md
index 06f8d98c1f..ca2b604bdc 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2031.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2031.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2031"
title: "ML Nonfatal Error A2031"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2031"]
helpviewer_keywords: ["A2031"]
ms.assetid: d5b11f58-4a00-42be-9062-8fa8728e6306
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2034.md b/docs/assembler/masm/ml-nonfatal-error-a2034.md
index 75bfc9bf48..3f39de593f 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2034.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2034.md
@@ -1,30 +1,33 @@
---
+description: "Learn more about: ML Nonfatal Error A2034"
title: "ML Nonfatal Error A2034"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2034"]
helpviewer_keywords: ["A2034"]
ms.assetid: 6438970c-0aee-4f14-a058-5fe47d0ee216
---
# ML Nonfatal Error A2034
-**must be in segment block**
+> **must be in segment block**
-One of the following was found outside of a segment block:
+## Remarks
+
+The assembler found one of the following items outside of a segment block:
- An instruction
- A label definition
-- A [THIS](operator-this.md) operator
+- A [`THIS`](operator-this.md) operator
-- A [$](dollar.md) operator
+- A [`$`](dollar.md) operator
- A procedure definition
-- An [ALIGN](align-masm.md) directive
+- An [`ALIGN`](align-masm.md) directive
-- An [ORG](org.md) directive
+- An [`ORG`](org.md) directive
## See also
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2037.md b/docs/assembler/masm/ml-nonfatal-error-a2037.md
index 8a8932857e..8f3aa5c882 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2037.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2037.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2037"
title: "ML Nonfatal Error A2037"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2037"]
helpviewer_keywords: ["A2037"]
ms.assetid: e7fdb98b-3ce9-4e1f-99fc-1b1ea10b6961
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2038.md b/docs/assembler/masm/ml-nonfatal-error-a2038.md
index 9978c22bcf..cc8d4dc964 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2038.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2038.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2038"
title: "ML Nonfatal Error A2038"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2038"]
helpviewer_keywords: ["A2038"]
ms.assetid: 001bf60a-58ac-4654-97eb-b734f2999f8e
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2039.md b/docs/assembler/masm/ml-nonfatal-error-a2039.md
index 336e5ee7cf..055cb0540a 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2039.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2039.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2039"
title: "ML Nonfatal Error A2039"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2039"]
helpviewer_keywords: ["A2039"]
ms.assetid: ad8cdaae-b20d-45f0-acb1-79880979c6b7
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2044.md b/docs/assembler/masm/ml-nonfatal-error-a2044.md
index bdfe38b746..0997887d02 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2044.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2044.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2044"
title: "ML Nonfatal Error A2044"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2044"]
helpviewer_keywords: ["A2044"]
ms.assetid: 7cf144ac-408c-4e35-9a15-38656a4e87cd
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2047.md b/docs/assembler/masm/ml-nonfatal-error-a2047.md
index db2d1b1fe0..6896fe8592 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2047.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2047.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2047"
title: "ML Nonfatal Error A2047"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2047"]
helpviewer_keywords: ["A2047"]
ms.assetid: 7799f988-6c2e-4022-a447-c56b48473f0c
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2050.md b/docs/assembler/masm/ml-nonfatal-error-a2050.md
index 251548f27c..924f38d3f9 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2050.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2050.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2050"
title: "ML Nonfatal Error A2050"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2050"]
helpviewer_keywords: ["A2050"]
ms.assetid: 16f3a58f-4bde-48f1-b0e3-2ed9612780a5
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2054.md b/docs/assembler/masm/ml-nonfatal-error-a2054.md
index 7e6996c395..febf4f6c4e 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2054.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2054.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2054"
title: "ML Nonfatal Error A2054"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2054"]
helpviewer_keywords: ["A2054"]
ms.assetid: 878a2ced-0b88-49e5-bea5-0a014efb08b6
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2055.md b/docs/assembler/masm/ml-nonfatal-error-a2055.md
index 70567c050f..54e57104a9 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2055.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2055.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2055"
title: "ML Nonfatal Error A2055"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2055"]
helpviewer_keywords: ["A2055"]
ms.assetid: b4c3585f-6e55-4127-ba84-e68a41f1ada8
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2057.md b/docs/assembler/masm/ml-nonfatal-error-a2057.md
index 1c7d925a6f..98ba11536a 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2057.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2057.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2057"
title: "ML Nonfatal Error A2057"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2057"]
helpviewer_keywords: ["A2057"]
ms.assetid: 13c47848-3f4d-4145-a00c-5418ff176ba3
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2059.md b/docs/assembler/masm/ml-nonfatal-error-a2059.md
index 730ddb36e4..4f563d54ac 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2059.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2059.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2059"
title: "ML Nonfatal Error A2059"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2059"]
helpviewer_keywords: ["A2059"]
ms.assetid: fadabbce-3054-4758-aeae-34d8540ce410
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2060.md b/docs/assembler/masm/ml-nonfatal-error-a2060.md
index a4a5407850..3e74b86485 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2060.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2060.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2060"
title: "ML Nonfatal Error A2060"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2060"]
helpviewer_keywords: ["A2060"]
ms.assetid: 435d5b32-9b4f-4f4e-8142-af0ce7676e89
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2063.md b/docs/assembler/masm/ml-nonfatal-error-a2063.md
index 46110709d5..2da91f339b 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2063.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2063.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2063"
title: "ML Nonfatal Error A2063"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2063"]
helpviewer_keywords: ["A2063"]
ms.assetid: 12976b25-2159-4e0c-9df3-dcfac61091ee
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2064.md b/docs/assembler/masm/ml-nonfatal-error-a2064.md
index 7f763527e0..ed06a37737 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2064.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2064.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2064"
title: "ML Nonfatal Error A2064"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2064"]
helpviewer_keywords: ["A2064"]
ms.assetid: 553a5ec5-b404-4321-ab2c-b9ccec6471fc
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2065.md b/docs/assembler/masm/ml-nonfatal-error-a2065.md
index 59e6bc3e41..316f95333e 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2065.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2065.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2065"
title: "ML Nonfatal Error A2065"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2065"]
helpviewer_keywords: ["A2065"]
ms.assetid: 836e46c7-461a-4abc-8d48-03952c5b25f4
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2066.md b/docs/assembler/masm/ml-nonfatal-error-a2066.md
index ca7f95c00d..f1583f30b5 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2066.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2066.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2066"
title: "ML Nonfatal Error A2066"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2066"]
helpviewer_keywords: ["A2066"]
ms.assetid: 58220fdf-fb8f-47fc-a36d-737867361185
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2069.md b/docs/assembler/masm/ml-nonfatal-error-a2069.md
index 88f4d0c959..5ebda337f1 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2069.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2069.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2069"
title: "ML Nonfatal Error A2069"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2069"]
helpviewer_keywords: ["A2069"]
ms.assetid: 57dbf072-da61-4306-8d41-a4d9c97fec1a
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2070.md b/docs/assembler/masm/ml-nonfatal-error-a2070.md
index 3791bd9c8d..2267b0ccdd 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2070.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2070.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2070"
title: "ML Nonfatal Error A2070"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2070"]
helpviewer_keywords: ["A2070"]
ms.assetid: f6025e2c-b142-426f-88c8-7160df4c1631
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2074.md b/docs/assembler/masm/ml-nonfatal-error-a2074.md
index 1377c20ad2..50f575f954 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2074.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2074.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2074"
title: "ML Nonfatal Error A2074"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2074"]
helpviewer_keywords: ["A2074"]
ms.assetid: d19600d8-785b-4afb-af77-9dbbeb6a1275
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2078.md b/docs/assembler/masm/ml-nonfatal-error-a2078.md
index cd8a17011d..0b287e79bd 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2078.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2078.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2078"
title: "ML Nonfatal Error A2078"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2078"]
helpviewer_keywords: ["A2078"]
ms.assetid: 42ac48fd-ac7f-4e74-a11e-20181d443faf
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2079.md b/docs/assembler/masm/ml-nonfatal-error-a2079.md
index cbd0e704f2..f04053fcc4 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2079.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2079.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2079"
title: "ML Nonfatal Error A2079"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2079"]
helpviewer_keywords: ["A2079"]
ms.assetid: 87003fa1-ce71-4572-9efc-06a4404860ab
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2083.md b/docs/assembler/masm/ml-nonfatal-error-a2083.md
index f72bc0e051..0e852033cd 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2083.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2083.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2083"
title: "ML Nonfatal Error A2083"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2083"]
helpviewer_keywords: ["A2083"]
ms.assetid: d2715877-1702-44e5-ab8f-6ef1fb6069f1
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2085.md b/docs/assembler/masm/ml-nonfatal-error-a2085.md
index 07ed1484ad..70def6928d 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2085.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2085.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2085"
title: "ML Nonfatal Error A2085"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2085"]
helpviewer_keywords: ["A2085"]
ms.assetid: c2fef415-a32b-4249-896c-6d981fc6e327
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2096.md b/docs/assembler/masm/ml-nonfatal-error-a2096.md
index 5ecf341f99..f670b73aca 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2096.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2096.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2096"
title: "ML Nonfatal Error A2096"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2096"]
helpviewer_keywords: ["A2096"]
ms.assetid: bab0b5ee-b39f-4e44-a41a-3f949fab4297
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2097.md b/docs/assembler/masm/ml-nonfatal-error-a2097.md
index 44b4dca8d9..abeea9f8f9 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2097.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2097.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2097"
title: "ML Nonfatal Error A2097"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2097"]
helpviewer_keywords: ["A2097"]
ms.assetid: 52f6f1f8-4eb4-4264-8619-7b9ccb20c0c7
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2107.md b/docs/assembler/masm/ml-nonfatal-error-a2107.md
index 69b4f7e0b6..0c7b3ad230 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2107.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2107.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2107"
title: "ML Nonfatal Error A2107"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2107"]
helpviewer_keywords: ["A2107"]
ms.assetid: 0385b9f2-36df-4e30-a905-ab49bdc504d1
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2119.md b/docs/assembler/masm/ml-nonfatal-error-a2119.md
index 920b340c9e..e19e92eb19 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2119.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2119.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2119"
title: "ML Nonfatal Error A2119"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2119"]
helpviewer_keywords: ["A2119"]
ms.assetid: 4d4ee6da-3a58-495c-a1da-c3a405c4c18d
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2133.md b/docs/assembler/masm/ml-nonfatal-error-a2133.md
index e4f5be9e0c..fa9872a213 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2133.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2133.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2133"
title: "ML Nonfatal Error A2133"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2133"]
helpviewer_keywords: ["A2133"]
ms.assetid: 5ba50911-22c8-43b7-90e2-946fc612e05f
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2137.md b/docs/assembler/masm/ml-nonfatal-error-a2137.md
index 98f7b28bb5..d9c908f94f 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2137.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2137.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2137"
title: "ML Nonfatal Error A2137"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2137"]
helpviewer_keywords: ["A2137"]
ms.assetid: 913172e3-866e-49c3-9502-e49d1f0df4b0
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2189.md b/docs/assembler/masm/ml-nonfatal-error-a2189.md
index 9cad2a3e36..2fca4c0dc4 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2189.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2189.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2189"
title: "ML Nonfatal Error A2189"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2189"]
helpviewer_keywords: ["A2189"]
ms.assetid: 39649f39-57bc-4ceb-ab16-53f9b2a8d2d5
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2206.md b/docs/assembler/masm/ml-nonfatal-error-a2206.md
index 858c629d20..8a1264fe6c 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2206.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2206.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2206"
title: "ML Nonfatal Error A2206"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2206"]
helpviewer_keywords: ["A2206"]
ms.assetid: 711846d0-5a09-4353-8857-60588c25526a
diff --git a/docs/assembler/masm/ml-nonfatal-error-a2219.md b/docs/assembler/masm/ml-nonfatal-error-a2219.md
index b155ecf9c7..7d6dc6b457 100644
--- a/docs/assembler/masm/ml-nonfatal-error-a2219.md
+++ b/docs/assembler/masm/ml-nonfatal-error-a2219.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Nonfatal Error A2219"
title: "ML Nonfatal Error A2219"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A2219"]
helpviewer_keywords: ["A2219"]
ms.assetid: 5ebc2f40-e47e-4f8e-b7b9-960b9cfc9f6d
@@ -12,7 +13,7 @@ ms.assetid: 5ebc2f40-e47e-4f8e-b7b9-960b9cfc9f6d
## Remarks
-The operand for [.ALLOCSTACK](dot-allocstack.md) and [.SAVEREG](dot-savereg.md) must be a multiple of 8. The operand for [.SAVEXMM128](dot-savexmm128.md) and [.SETFRAME](dot-setframe.md) must be a multiple of 16.
+The operand for [`.ALLOCSTACK`](dot-allocstack.md) and [`.SAVEREG`](dot-savereg.md) must be a multiple of 8. The operand for [`.SAVEXMM128`](dot-savexmm128.md) and [`.SETFRAME`](dot-setframe.md) must be a multiple of 16.
## See also
diff --git a/docs/assembler/masm/ml-warning-a4004.md b/docs/assembler/masm/ml-warning-a4004.md
index 6679a85904..ee4e7df825 100644
--- a/docs/assembler/masm/ml-warning-a4004.md
+++ b/docs/assembler/masm/ml-warning-a4004.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Warning A4004"
title: "ML Warning A4004"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A4004"]
helpviewer_keywords: ["A4004"]
ms.assetid: f11b13c9-fa8d-49f2-b816-a6b7871c7261
diff --git a/docs/assembler/masm/ml-warning-a4012.md b/docs/assembler/masm/ml-warning-a4012.md
index a873a3c856..52fe3645e8 100644
--- a/docs/assembler/masm/ml-warning-a4012.md
+++ b/docs/assembler/masm/ml-warning-a4012.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Warning A4012"
title: "ML Warning A4012"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A4012"]
helpviewer_keywords: ["A4012"]
ms.assetid: 842b1259-9679-4eeb-a02d-672a583a94e5
diff --git a/docs/assembler/masm/ml-warning-a4014.md b/docs/assembler/masm/ml-warning-a4014.md
index bdeea67e31..dbecdeb23c 100644
--- a/docs/assembler/masm/ml-warning-a4014.md
+++ b/docs/assembler/masm/ml-warning-a4014.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: ML Warning A4014"
title: "ML Warning A4014"
ms.date: "12/17/2019"
-ms.custom: "error-reference"
+ms.topic: error-reference
f1_keywords: ["A4014"]
helpviewer_keywords: ["A4014"]
ms.assetid: 11bc8920-3255-4ac8-999a-b9ea9c15bc81
diff --git a/docs/assembler/masm/mmword.md b/docs/assembler/masm/mmword.md
index 77556ca1a4..98ca862949 100644
--- a/docs/assembler/masm/mmword.md
+++ b/docs/assembler/masm/mmword.md
@@ -1,9 +1,9 @@
---
title: "MMWORD"
-ms.date: "12/17/2019"
+description: "Learn more about: MMWORD"
+ms.date: 12/17/2019
f1_keywords: ["MMWORD"]
helpviewer_keywords: ["MMWORD directive"]
-ms.assetid: b4c5a104-9078-4fb4-afc3-d1e63abe562a
---
# MMWORD
@@ -31,6 +31,6 @@ While both instructions work on 64-bit operands, **QWORD** is the type for 64-bi
movq mm0, mmword ptr [ebx]
```
-## See Also
+## See also
[MASM BNF Grammar](masm-bnf-grammar.md)
diff --git a/docs/assembler/masm/name-masm.md b/docs/assembler/masm/name-masm.md
index 2042473f9c..539c8342d5 100644
--- a/docs/assembler/masm/name-masm.md
+++ b/docs/assembler/masm/name-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: NAME"
title: "NAME (MASM)"
ms.date: "12/17/2019"
helpviewer_keywords: ["NAME directive"]
diff --git a/docs/assembler/masm/operator-abs.md b/docs/assembler/masm/operator-abs.md
index 87149bd0c5..29eae96cf3 100644
--- a/docs/assembler/masm/operator-abs.md
+++ b/docs/assembler/masm/operator-abs.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator ABS"
title: "operator ABS"
ms.date: "12/17/2019"
f1_keywords: ["operator ABS"]
diff --git a/docs/assembler/masm/operator-add.md b/docs/assembler/masm/operator-add.md
index 64b02fb321..dd0e3d93a1 100644
--- a/docs/assembler/masm/operator-add.md
+++ b/docs/assembler/masm/operator-add.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator +"
title: "operator +"
ms.date: "12/17/2019"
f1_keywords: ["+", "operator +"]
diff --git a/docs/assembler/masm/operator-addr.md b/docs/assembler/masm/operator-addr.md
index 4408aaa3b5..9687a8cd64 100644
--- a/docs/assembler/masm/operator-addr.md
+++ b/docs/assembler/masm/operator-addr.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator ADDR"
title: "operator ADDR"
ms.date: "12/17/2019"
f1_keywords: ["ADDR", "operator ADDR"]
diff --git a/docs/assembler/masm/operator-and.md b/docs/assembler/masm/operator-and.md
index f838c32427..341867453b 100644
--- a/docs/assembler/masm/operator-and.md
+++ b/docs/assembler/masm/operator-and.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator AND"
title: "operator AND"
ms.date: "12/17/2019"
f1_keywords: ["operator AND"]
diff --git a/docs/assembler/masm/operator-bitwise-and.md b/docs/assembler/masm/operator-bitwise-and.md
index ad59b563d9..1f90291924 100644
--- a/docs/assembler/masm/operator-bitwise-and.md
+++ b/docs/assembler/masm/operator-bitwise-and.md
@@ -1,19 +1,20 @@
---
-title: "operator &"
+description: "Learn more about: Microsoft Assembler (MASM) operator &"
+title: "operator &"
ms.date: "12/17/2019"
f1_keywords: ["&", "operator &"]
helpviewer_keywords: ["& operator, syntax", "AND operator", "& operator"]
ms.assetid: f3c51a54-48ba-4b99-afed-5c45177bf694
---
-# operator &
+# operator `&` (MASM)
-Bitwise **AND**. Used only within [.IF](dot-if.md), [.WHILE](dot-while.md), or [.REPEAT](dot-repeat.md) blocks and evaluated at run time, not at assembly time.
+Bitwise **AND**. Used only within [`.IF`](dot-if.md), [`.WHILE`](dot-while.md), or [`.REPEAT`](dot-repeat.md) blocks and evaluated at run time, not at assembly time.
## Syntax
-> *expression1* **&** *expression2*
+> *expression1* **`&`** *expression2*
## See also
-[Operators Reference](operators-reference.md)\
-[MASM BNF Grammar](masm-bnf-grammar.md)
+[Operators reference](operators-reference.md)\
+[MASM BNF grammar](masm-bnf-grammar.md)
diff --git a/docs/assembler/masm/operator-brackets.md b/docs/assembler/masm/operator-brackets.md
index d48e375a96..bcc76eb4f0 100644
--- a/docs/assembler/masm/operator-brackets.md
+++ b/docs/assembler/masm/operator-brackets.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator []"
title: "operator brackets"
ms.date: "12/17/2019"
f1_keywords: ["operator []", "[]"]
diff --git a/docs/assembler/masm/operator-carry-q.md b/docs/assembler/masm/operator-carry-q.md
index f5ca6d09af..a8ec412a8e 100644
--- a/docs/assembler/masm/operator-carry-q.md
+++ b/docs/assembler/masm/operator-carry-q.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator CARRY?"
title: "operator CARRY?"
ms.date: "12/17/2019"
f1_keywords: ["CARRY?", "operator CARRY?"]
diff --git a/docs/assembler/masm/operator-colon.md b/docs/assembler/masm/operator-colon.md
index a41b1a59f1..c622821a44 100644
--- a/docs/assembler/masm/operator-colon.md
+++ b/docs/assembler/masm/operator-colon.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator :"
title: "operator :"
ms.date: "12/17/2019"
f1_keywords: ["operator :"]
diff --git a/docs/assembler/masm/operator-dot-type.md b/docs/assembler/masm/operator-dot-type.md
index d7177c255b..4248965791 100644
--- a/docs/assembler/masm/operator-dot-type.md
+++ b/docs/assembler/masm/operator-dot-type.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator .TYPE"
title: "operator .TYPE"
ms.date: "12/17/2019"
f1_keywords: [".TYPE", "operator .TYPE"]
diff --git a/docs/assembler/masm/operator-dot.md b/docs/assembler/masm/operator-dot.md
index 54583d1bc7..427eee21e9 100644
--- a/docs/assembler/masm/operator-dot.md
+++ b/docs/assembler/masm/operator-dot.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator ."
title: "operator dot"
ms.date: "12/17/2019"
f1_keywords: ["operator ."]
diff --git a/docs/assembler/masm/operator-double-quote.md b/docs/assembler/masm/operator-double-quote.md
index c9ac3f98ea..48a8d3702a 100644
--- a/docs/assembler/masm/operator-double-quote.md
+++ b/docs/assembler/masm/operator-double-quote.md
@@ -1,11 +1,12 @@
---
-title: "operator " ""
+description: 'Learn more about: operator " "'
+title: 'operator " "'
ms.date: "12/17/2019"
-f1_keywords: ["" "", "operator " ""]
-helpviewer_keywords: ["" " operator", "operator " ""]
+f1_keywords: ['operator " "']
+helpviewer_keywords: ['" " operator', 'operator " "']
ms.assetid: e96fd419-06d4-4989-b65b-7d3754f00f81
---
-# operator " "
+# operator " "
Treats "*text*" as a string.
diff --git a/docs/assembler/masm/operator-dup.md b/docs/assembler/masm/operator-dup.md
index bb924bbf79..1928d790e8 100644
--- a/docs/assembler/masm/operator-dup.md
+++ b/docs/assembler/masm/operator-dup.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator DUP"
title: "operator DUP"
ms.date: "12/17/2019"
f1_keywords: ["operator DUP"]
diff --git a/docs/assembler/masm/operator-eq.md b/docs/assembler/masm/operator-eq.md
index 1d596ac7f2..153676f93c 100644
--- a/docs/assembler/masm/operator-eq.md
+++ b/docs/assembler/masm/operator-eq.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator EQ"
title: "operator EQ"
ms.date: "12/17/2019"
f1_keywords: ["operator EQ", "EQ"]
diff --git a/docs/assembler/masm/operator-equal-masm-run-time.md b/docs/assembler/masm/operator-equal-masm-run-time.md
index 87eddc116f..d279d0bed2 100644
--- a/docs/assembler/masm/operator-equal-masm-run-time.md
+++ b/docs/assembler/masm/operator-equal-masm-run-time.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator == (MASM Run Time)"
title: "operator == (MASM Run Time)"
ms.date: "12/17/2019"
f1_keywords: ["operator =="]
diff --git a/docs/assembler/masm/operator-ge.md b/docs/assembler/masm/operator-ge.md
index 9c431b4a16..a4c7026c30 100644
--- a/docs/assembler/masm/operator-ge.md
+++ b/docs/assembler/masm/operator-ge.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator GE"
title: "operator GE"
ms.date: "12/17/2019"
f1_keywords: ["GE", "operator GE"]
diff --git a/docs/assembler/masm/operator-greater-or-equal-masm-run-time.md b/docs/assembler/masm/operator-greater-or-equal-masm-run-time.md
index 7cf920d951..15190e74d6 100644
--- a/docs/assembler/masm/operator-greater-or-equal-masm-run-time.md
+++ b/docs/assembler/masm/operator-greater-or-equal-masm-run-time.md
@@ -1,19 +1,20 @@
---
-title: "operator >= (MASM Run Time)"
+description: "Learn more about: Microsoft Assembler operator >= (MASM runtime)"
+title: "MASM perator >= (runtime)"
ms.date: "12/17/2019"
f1_keywords: ["operator >="]
helpviewer_keywords: [">= operator, comparing specific objects", "operator >="]
ms.assetid: c7366d99-f7b8-4eb8-b5df-6dc74491b114
---
-# operator >= (MASM Run Time)
+# operator `>=` (MASM runtime)
-Is greater than or equal to. Used only within [.IF](dot-if.md), [.WHILE](dot-while.md), or [.REPEAT](dot-repeat.md) blocks and evaluated at run time, not at assembly time.
+Greater than or equal to operator. Used only within [`.IF`](dot-if.md), [`.WHILE`](dot-while.md), or [`.REPEAT`](dot-repeat.md) blocks and evaluated at runtime, not at assembly time.
## Syntax
-> *expression1* **>=** *expression2*
+> *expression1* **`>=`** *expression2*
## See also
[Operators reference](operators-reference.md)\
-[MASM BNF Grammar](masm-bnf-grammar.md)
+[MASM BNF grammar](masm-bnf-grammar.md)
diff --git a/docs/assembler/masm/operator-greater-than-masm-run-time.md b/docs/assembler/masm/operator-greater-than-masm-run-time.md
index f82a568cb7..01d8c629e5 100644
--- a/docs/assembler/masm/operator-greater-than-masm-run-time.md
+++ b/docs/assembler/masm/operator-greater-than-masm-run-time.md
@@ -1,19 +1,20 @@
---
-title: "operator > (MASM Run Time)"
+description: "Learn more about: Microsoft Assembler (MASM) operator > (MASM runtime)"
+title: "MASM operator > (runtime)"
ms.date: "12/17/2019"
f1_keywords: ["operator >"]
helpviewer_keywords: ["> operator, comparing specific objects", "operator >"]
ms.assetid: f2244900-8ddf-4e8c-9ab0-68b9118a6f75
---
-# operator > (MASM Run Time)
+# operator `>` (MASM runtime)
-Is greater than. Used only within [.IF](dot-if.md), [.WHILE](dot-while.md), or [.REPEAT](dot-repeat.md) blocks and evaluated at run time, not at assembly time.
+Greater than operator. Used only within [`.IF`](dot-if.md), [`.WHILE`](dot-while.md), or [`.REPEAT`](dot-repeat.md) blocks and evaluated at run time, not at assembly time.
## Syntax
-> *expression1* **>** *expression2*
+> *expression1* **`>`** *expression2*
## See also
[Operators reference](operators-reference.md)\
-[MASM BNF Grammar](masm-bnf-grammar.md)
+[MASM BNF grammar](masm-bnf-grammar.md)
diff --git a/docs/assembler/masm/operator-gt.md b/docs/assembler/masm/operator-gt.md
index 594795cca0..b610c95c98 100644
--- a/docs/assembler/masm/operator-gt.md
+++ b/docs/assembler/masm/operator-gt.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator GT"
title: "operator GT"
ms.date: "12/17/2019"
f1_keywords: ["operator GT", "GT"]
diff --git a/docs/assembler/masm/operator-high.md b/docs/assembler/masm/operator-high.md
index c80b171daa..5b700b78b5 100644
--- a/docs/assembler/masm/operator-high.md
+++ b/docs/assembler/masm/operator-high.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator HIGH"
title: "operator HIGH"
ms.date: "12/17/2019"
f1_keywords: ["HIGH", "operator HIGH"]
diff --git a/docs/assembler/masm/operator-high32.md b/docs/assembler/masm/operator-high32.md
index 619cc18342..be18a1de41 100644
--- a/docs/assembler/masm/operator-high32.md
+++ b/docs/assembler/masm/operator-high32.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator HIGH32"
title: "operator HIGH32"
ms.date: "12/17/2019"
f1_keywords: ["HIGH32", "operator HIGH32"]
diff --git a/docs/assembler/masm/operator-highword.md b/docs/assembler/masm/operator-highword.md
index a6099ead8f..0402ac3e2c 100644
--- a/docs/assembler/masm/operator-highword.md
+++ b/docs/assembler/masm/operator-highword.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator HIGHWORD"
title: "operator HIGHWORD"
ms.date: "12/17/2019"
f1_keywords: ["HIGHWORD", "operator HIGHWORD"]
diff --git a/docs/assembler/masm/operator-imagerel.md b/docs/assembler/masm/operator-imagerel.md
index 8e5ab2e04d..0ce745b01d 100644
--- a/docs/assembler/masm/operator-imagerel.md
+++ b/docs/assembler/masm/operator-imagerel.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator IMAGEREL"
title: "operator IMAGEREL"
ms.date: "12/17/2019"
f1_keywords: ["operator IMAGEREL", "IMAGEREL"]
diff --git a/docs/assembler/masm/operator-le.md b/docs/assembler/masm/operator-le.md
index ecc9cad6a0..da98a3a8c5 100644
--- a/docs/assembler/masm/operator-le.md
+++ b/docs/assembler/masm/operator-le.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator LE"
title: "operator LE"
ms.date: "12/17/2019"
f1_keywords: ["LE", "operator LE"]
diff --git a/docs/assembler/masm/operator-length.md b/docs/assembler/masm/operator-length.md
index a4fd3be746..c186b48636 100644
--- a/docs/assembler/masm/operator-length.md
+++ b/docs/assembler/masm/operator-length.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator LENGTH"
title: "operator LENGTH"
ms.date: "12/17/2019"
f1_keywords: ["operator LENGTH"]
diff --git a/docs/assembler/masm/operator-lengthof.md b/docs/assembler/masm/operator-lengthof.md
index 7f8bb4600f..027059248f 100644
--- a/docs/assembler/masm/operator-lengthof.md
+++ b/docs/assembler/masm/operator-lengthof.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator LENGTHOF"
title: "operator LENGTHOF"
ms.date: "12/17/2019"
f1_keywords: ["operator LENGTHOF", "LENGTHOF"]
diff --git a/docs/assembler/masm/operator-less-or-equal-masm-run-time.md b/docs/assembler/masm/operator-less-or-equal-masm-run-time.md
index f75abe51d1..e98485dacf 100644
--- a/docs/assembler/masm/operator-less-or-equal-masm-run-time.md
+++ b/docs/assembler/masm/operator-less-or-equal-masm-run-time.md
@@ -1,11 +1,12 @@
---
-title: "operator <= (MASM Run Time)"
+description: "Learn more about: operator <= (MASM Run Time)"
+title: "operator <= (MASM Run Time)"
ms.date: "12/17/2019"
f1_keywords: ["operator <="]
helpviewer_keywords: ["operator <=", "<= operator, comparing specific objects"]
ms.assetid: a5676804-07ef-40ab-8251-cde5b11ebdf9
---
-# operator <= (MASM Run Time)
+# operator `<=` (MASM Run Time)
Is less than or equal to. Used only within [.IF](dot-if.md), [.WHILE](dot-while.md), or [.REPEAT](dot-repeat.md) blocks and evaluated at run time, not at assembly time.
diff --git a/docs/assembler/masm/operator-less-than-masm-run-time.md b/docs/assembler/masm/operator-less-than-masm-run-time.md
index bdf8e54cfd..6db6b40771 100644
--- a/docs/assembler/masm/operator-less-than-masm-run-time.md
+++ b/docs/assembler/masm/operator-less-than-masm-run-time.md
@@ -1,11 +1,12 @@
---
-title: "operator < (MASM Run Time)"
+description: "Learn more about: operator < (MASM Run Time)"
+title: "operator < (MASM Run Time)"
ms.date: "12/17/2019"
f1_keywords: ["operator <"]
helpviewer_keywords: ["operator <", "< operator, comparing specific objects"]
ms.assetid: 1d5fc8f1-a62f-4a3d-824d-619c6f421a04
---
-# operator < (MASM Run Time)
+# operator `<` (MASM Run Time)
Is less than. Used only within [.IF](dot-if.md), [.WHILE](dot-while.md), or [.REPEAT](dot-repeat.md) blocks and evaluated at run time, not at assembly time.
diff --git a/docs/assembler/masm/operator-literal.md b/docs/assembler/masm/operator-literal.md
index 5a2faad22d..2eec929673 100644
--- a/docs/assembler/masm/operator-literal.md
+++ b/docs/assembler/masm/operator-literal.md
@@ -1,19 +1,20 @@
---
-title: "operator <>"
+description: "Learn more about: Microsoft Assembler (MASM) operator <>"
+title: "MASM operator <>"
ms.date: "12/17/2019"
f1_keywords: ["<>", "operator <>"]
helpviewer_keywords: ["operator <>", "<> operator"]
ms.assetid: bc5acf43-df3e-499b-a3ed-1672cfa0d1ed
---
-# operator <>
+# MASM operator `<>`
Treats *text* as a single literal element.
## Syntax
-> __\<__*text*__>__
+> __`<`__*text*__`>`__
## See also
[Operators reference](operators-reference.md)\
-[MASM BNF Grammar](masm-bnf-grammar.md)
+[MASM BNF grammar](masm-bnf-grammar.md)
diff --git a/docs/assembler/masm/operator-logical-and-masm-run-time.md b/docs/assembler/masm/operator-logical-and-masm-run-time.md
index 4be1f43f01..856cde6ca7 100644
--- a/docs/assembler/masm/operator-logical-and-masm-run-time.md
+++ b/docs/assembler/masm/operator-logical-and-masm-run-time.md
@@ -1,19 +1,20 @@
---
-title: "operator && (MASM Run Time)"
+description: "Learn more about: Microsoft Assembler (MASM) operator && (MASM runtime)"
+title: "operator && (MASM Run Time)"
ms.date: "12/17/2019"
f1_keywords: ["operator &&"]
helpviewer_keywords: ["operator &&", "&& operator"]
ms.assetid: 0a633a40-114c-48f5-88ff-09bc8d9b281a
---
-# operator && (MASM Run Time)
+# operator `&&` (MASM runtime)
-Logical **AND**. Used only within [.IF](dot-if.md), [.WHILE](dot-while.md), or [.REPEAT](dot-repeat.md) blocks and evaluated at run time, not at assembly time.
+Logical **AND**. Used only within [`.IF`](dot-if.md), [`.WHILE`](dot-while.md), or [`.REPEAT`](dot-repeat.md) blocks and evaluated at runtime, not at assembly time.
## Syntax
-> *expression1* **&&** *expression2*
+> *expression1* **`&&`** *expression2*
## See also
[Operators reference](operators-reference.md)\
-[MASM BNF Grammar](masm-bnf-grammar.md)
+[MASM BNF grammar](masm-bnf-grammar.md)
diff --git a/docs/assembler/masm/operator-logical-and-masm.md b/docs/assembler/masm/operator-logical-and-masm.md
index 0639d370ff..84b6b8981c 100644
--- a/docs/assembler/masm/operator-logical-and-masm.md
+++ b/docs/assembler/masm/operator-logical-and-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Substitution operator (MASM)"
title: "Substitution operator (MASM)"
ms.date: "12/17/2019"
f1_keywords: ["operator &&"]
diff --git a/docs/assembler/masm/operator-logical-not-masm-run-time.md b/docs/assembler/masm/operator-logical-not-masm-run-time.md
index 2a44333e2f..dd254db150 100644
--- a/docs/assembler/masm/operator-logical-not-masm-run-time.md
+++ b/docs/assembler/masm/operator-logical-not-masm-run-time.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator ! (MASM Run Time)"
title: "operator ! (MASM Run Time)"
ms.date: "12/17/2019"
f1_keywords: ["operator !"]
diff --git a/docs/assembler/masm/operator-logical-not-masm.md b/docs/assembler/masm/operator-logical-not-masm.md
index c95e3af298..c5b1909164 100644
--- a/docs/assembler/masm/operator-logical-not-masm.md
+++ b/docs/assembler/masm/operator-logical-not-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator ! (MASM)"
title: "operator ! (MASM)"
ms.date: "12/17/2019"
f1_keywords: ["operator !"]
diff --git a/docs/assembler/masm/operator-logical-or.md b/docs/assembler/masm/operator-logical-or.md
index f079783a1a..c8fde425c9 100644
--- a/docs/assembler/masm/operator-logical-or.md
+++ b/docs/assembler/masm/operator-logical-or.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator ||"
title: "operator ||"
ms.date: "12/17/2019"
f1_keywords: ["operator ||"]
diff --git a/docs/assembler/masm/operator-low.md b/docs/assembler/masm/operator-low.md
index abb0fd3aa1..b40a5f13bc 100644
--- a/docs/assembler/masm/operator-low.md
+++ b/docs/assembler/masm/operator-low.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator LOW"
title: "operator LOW"
ms.date: "12/17/2019"
f1_keywords: ["operator LOW", "LOW"]
diff --git a/docs/assembler/masm/operator-low32.md b/docs/assembler/masm/operator-low32.md
index ab28b7e2bd..e6a8db7138 100644
--- a/docs/assembler/masm/operator-low32.md
+++ b/docs/assembler/masm/operator-low32.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator LOW32"
title: "operator LOW32"
ms.date: "12/17/2019"
f1_keywords: ["LOW32", "operator LOW32"]
diff --git a/docs/assembler/masm/operator-lowword.md b/docs/assembler/masm/operator-lowword.md
index ac7774aed5..0c32373242 100644
--- a/docs/assembler/masm/operator-lowword.md
+++ b/docs/assembler/masm/operator-lowword.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator LOWWORD"
title: "operator LOWWORD"
ms.date: "12/17/2019"
f1_keywords: ["operator LOWWORD", "LOWWORD"]
diff --git a/docs/assembler/masm/operator-lroffset.md b/docs/assembler/masm/operator-lroffset.md
index 4c4ac2f419..366ec34e1c 100644
--- a/docs/assembler/masm/operator-lroffset.md
+++ b/docs/assembler/masm/operator-lroffset.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator LROFFSET"
title: "operator LROFFSET"
ms.date: "12/17/2019"
f1_keywords: ["LROFFSET", "operator LROFFSET"]
diff --git a/docs/assembler/masm/operator-lt.md b/docs/assembler/masm/operator-lt.md
index 2967263946..5a994b2ad8 100644
--- a/docs/assembler/masm/operator-lt.md
+++ b/docs/assembler/masm/operator-lt.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator LT"
title: "operator LT"
ms.date: "12/17/2019"
f1_keywords: ["LT", "operator LT"]
diff --git a/docs/assembler/masm/operator-mask.md b/docs/assembler/masm/operator-mask.md
index 04fdb4163c..fbe08e5ef7 100644
--- a/docs/assembler/masm/operator-mask.md
+++ b/docs/assembler/masm/operator-mask.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator MASK"
title: "operator MASK"
ms.date: "12/17/2019"
f1_keywords: ["operator MASK", "MASK"]
diff --git a/docs/assembler/masm/operator-mod.md b/docs/assembler/masm/operator-mod.md
index 3181e0f9a2..1857f5d6c1 100644
--- a/docs/assembler/masm/operator-mod.md
+++ b/docs/assembler/masm/operator-mod.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator MOD"
title: "operator MOD"
ms.date: "12/17/2019"
f1_keywords: ["Mod", "operator MOD"]
diff --git a/docs/assembler/masm/operator-multiply.md b/docs/assembler/masm/operator-multiply.md
index 9b1ac1e656..ebf65c017f 100644
--- a/docs/assembler/masm/operator-multiply.md
+++ b/docs/assembler/masm/operator-multiply.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator *"
title: "operator *"
ms.date: "12/17/2019"
f1_keywords: ["operator *"]
diff --git a/docs/assembler/masm/operator-ne.md b/docs/assembler/masm/operator-ne.md
index eda618c9f2..1b48faf214 100644
--- a/docs/assembler/masm/operator-ne.md
+++ b/docs/assembler/masm/operator-ne.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator NE"
title: "operator NE"
ms.date: "12/17/2019"
f1_keywords: ["NE", "operator NE"]
diff --git a/docs/assembler/masm/operator-not-equal-masm.md b/docs/assembler/masm/operator-not-equal-masm.md
index 178226fdf8..d3ff2ab438 100644
--- a/docs/assembler/masm/operator-not-equal-masm.md
+++ b/docs/assembler/masm/operator-not-equal-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator != (MASM)"
title: "operator != (MASM)"
ms.date: "12/17/2019"
f1_keywords: ["operator !="]
diff --git a/docs/assembler/masm/operator-not.md b/docs/assembler/masm/operator-not.md
index bc16f1c5f8..d321f01a6e 100644
--- a/docs/assembler/masm/operator-not.md
+++ b/docs/assembler/masm/operator-not.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator NOT"
title: "operator NOT"
ms.date: "12/17/2019"
f1_keywords: ["operator NOT"]
diff --git a/docs/assembler/masm/operator-offset.md b/docs/assembler/masm/operator-offset.md
index 7dca685a8c..b384879e7e 100644
--- a/docs/assembler/masm/operator-offset.md
+++ b/docs/assembler/masm/operator-offset.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator OFFSET"
title: "operator OFFSET"
ms.date: "12/17/2019"
f1_keywords: ["Offset", "operator OFFSET"]
diff --git a/docs/assembler/masm/operator-opattr.md b/docs/assembler/masm/operator-opattr.md
index eef9c82ce6..fae2e7e95c 100644
--- a/docs/assembler/masm/operator-opattr.md
+++ b/docs/assembler/masm/operator-opattr.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator OPATTR"
title: "operator OPATTR"
ms.date: "12/17/2019"
f1_keywords: ["operator OPATTR", "OPATTR"]
diff --git a/docs/assembler/masm/operator-or.md b/docs/assembler/masm/operator-or.md
index 278d89db01..a0acf45803 100644
--- a/docs/assembler/masm/operator-or.md
+++ b/docs/assembler/masm/operator-or.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator OR"
title: "operator OR"
ms.date: "12/17/2019"
helpviewer_keywords: ["operator OR", "OR operator, bitwise"]
diff --git a/docs/assembler/masm/operator-overflow-q.md b/docs/assembler/masm/operator-overflow-q.md
index 39288f784f..8985bdb723 100644
--- a/docs/assembler/masm/operator-overflow-q.md
+++ b/docs/assembler/masm/operator-overflow-q.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator OVERFLOW?"
title: "operator OVERFLOW?"
ms.date: "12/17/2019"
f1_keywords: ["operator OVERFLOW?", "OVERFLOW?"]
diff --git a/docs/assembler/masm/operator-parity-q.md b/docs/assembler/masm/operator-parity-q.md
index 36505ba945..0922616359 100644
--- a/docs/assembler/masm/operator-parity-q.md
+++ b/docs/assembler/masm/operator-parity-q.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator PARITY?"
title: "operator PARITY?"
ms.date: "12/17/2019"
f1_keywords: ["PARITY?", "operator PARITY?"]
diff --git a/docs/assembler/masm/operator-percent.md b/docs/assembler/masm/operator-percent.md
index c10e30d481..a3f68d0ea8 100644
--- a/docs/assembler/masm/operator-percent.md
+++ b/docs/assembler/masm/operator-percent.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator %"
title: "operator %"
ms.date: "12/17/2019"
f1_keywords: ["%", "operator %"]
diff --git a/docs/assembler/masm/operator-ptr.md b/docs/assembler/masm/operator-ptr.md
index 2ec1e1231f..fa0e57c126 100644
--- a/docs/assembler/masm/operator-ptr.md
+++ b/docs/assembler/masm/operator-ptr.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator PTR"
title: "operator PTR"
ms.date: "12/17/2019"
f1_keywords: ["PTR", "operator PTR"]
diff --git a/docs/assembler/masm/operator-sectionrel.md b/docs/assembler/masm/operator-sectionrel.md
index 3cd8f316ae..df9ce907db 100644
--- a/docs/assembler/masm/operator-sectionrel.md
+++ b/docs/assembler/masm/operator-sectionrel.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator SECTIONREL"
title: "operator SECTIONREL"
ms.date: "12/17/2019"
f1_keywords: ["operator SECTIONREL", "SECTIONREL"]
diff --git a/docs/assembler/masm/operator-seg.md b/docs/assembler/masm/operator-seg.md
index 10316da742..194e31c5d4 100644
--- a/docs/assembler/masm/operator-seg.md
+++ b/docs/assembler/masm/operator-seg.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator SEG"
title: "operator SEG"
ms.date: "12/17/2019"
f1_keywords: ["operator SEG", "SEG"]
diff --git a/docs/assembler/masm/operator-semicolon.md b/docs/assembler/masm/operator-semicolon.md
index 618dde28f1..f59b680fd1 100644
--- a/docs/assembler/masm/operator-semicolon.md
+++ b/docs/assembler/masm/operator-semicolon.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator ;"
title: "operator ;"
ms.date: "12/17/2019"
f1_keywords: ["operator %3B", "%3B"]
diff --git a/docs/assembler/masm/operator-semicolons.md b/docs/assembler/masm/operator-semicolons.md
index ac8c0bf9f4..a2b9e2c4f3 100644
--- a/docs/assembler/masm/operator-semicolons.md
+++ b/docs/assembler/masm/operator-semicolons.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator ;;"
title: "operator ;;"
ms.date: "12/17/2019"
f1_keywords: ["%3B%3B", "operator %3B%3B"]
diff --git a/docs/assembler/masm/operator-shl.md b/docs/assembler/masm/operator-shl.md
index f6ef4ddec4..db4bfa104c 100644
--- a/docs/assembler/masm/operator-shl.md
+++ b/docs/assembler/masm/operator-shl.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator SHL"
title: "operator SHL"
ms.date: "12/17/2019"
f1_keywords: ["operator SHL", "SHL"]
diff --git a/docs/assembler/masm/operator-short.md b/docs/assembler/masm/operator-short.md
index 735cccde6d..93de1f8dec 100644
--- a/docs/assembler/masm/operator-short.md
+++ b/docs/assembler/masm/operator-short.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator SHORT"
title: "operator SHORT"
ms.date: "12/17/2019"
f1_keywords: ["operator SHORT"]
diff --git a/docs/assembler/masm/operator-shr.md b/docs/assembler/masm/operator-shr.md
index fede4b04ba..45bac081cf 100644
--- a/docs/assembler/masm/operator-shr.md
+++ b/docs/assembler/masm/operator-shr.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator SHR"
title: "operator SHR"
ms.date: "12/17/2019"
f1_keywords: ["SHR", "operator SHR"]
diff --git a/docs/assembler/masm/operator-sign-q.md b/docs/assembler/masm/operator-sign-q.md
index 2719b5c9c9..779a77baf5 100644
--- a/docs/assembler/masm/operator-sign-q.md
+++ b/docs/assembler/masm/operator-sign-q.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator SIGN?"
title: "operator SIGN?"
ms.date: "12/17/2019"
f1_keywords: ["SIGN?", "operator SIGN?"]
diff --git a/docs/assembler/masm/operator-single-quote.md b/docs/assembler/masm/operator-single-quote.md
index cda0b2ab29..a97eb12976 100644
--- a/docs/assembler/masm/operator-single-quote.md
+++ b/docs/assembler/masm/operator-single-quote.md
@@ -1,11 +1,12 @@
---
-title: "operator ' '"
+description: "Learn more about: operator ' '"
+title: "operator ' '"
ms.date: "12/17/2019"
f1_keywords: ["operator ' '", "' '"]
helpviewer_keywords: ["operator ' '", "' ' operator"]
ms.assetid: 62a5d993-3d9b-470d-ba8a-53d76afd29b1
---
-# operator ' '
+# operator ' '
Treats '*text*' as a string.
diff --git a/docs/assembler/masm/operator-size.md b/docs/assembler/masm/operator-size.md
index 2a994c8987..ef640c2e95 100644
--- a/docs/assembler/masm/operator-size.md
+++ b/docs/assembler/masm/operator-size.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator SIZE"
title: "operator SIZE"
ms.date: "12/17/2019"
f1_keywords: ["size", "operator SIZE"]
diff --git a/docs/assembler/masm/operator-sizeof.md b/docs/assembler/masm/operator-sizeof.md
index 71d08d056c..7d2e824af0 100644
--- a/docs/assembler/masm/operator-sizeof.md
+++ b/docs/assembler/masm/operator-sizeof.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator SIZEOF"
title: "operator SIZEOF"
ms.date: "12/17/2019"
f1_keywords: ["operator SIZEOF"]
diff --git a/docs/assembler/masm/operator-subtract-1.md b/docs/assembler/masm/operator-subtract-1.md
index 93ac29d06a..4c97f88f48 100644
--- a/docs/assembler/masm/operator-subtract-1.md
+++ b/docs/assembler/masm/operator-subtract-1.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator /"
title: "operator /"
ms.date: "12/17/2019"
f1_keywords: ["/", "operator /"]
diff --git a/docs/assembler/masm/operator-subtract-2.md b/docs/assembler/masm/operator-subtract-2.md
index a3156bbd42..5d49dbeb55 100644
--- a/docs/assembler/masm/operator-subtract-2.md
+++ b/docs/assembler/masm/operator-subtract-2.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator -"
title: "operator -"
ms.date: "12/17/2019"
f1_keywords: ["operator -"]
diff --git a/docs/assembler/masm/operator-this.md b/docs/assembler/masm/operator-this.md
index 8a2df29a56..bf1695d145 100644
--- a/docs/assembler/masm/operator-this.md
+++ b/docs/assembler/masm/operator-this.md
@@ -1,17 +1,18 @@
---
+description: "Learn more about: operator THIS"
title: "operator THIS"
ms.date: "12/17/2019"
f1_keywords: ["this", "operator THIS"]
helpviewer_keywords: ["operator THIS", "THIS operator"]
ms.assetid: d795aa0e-6c01-49b7-8c64-8ab111fd82d3
---
-# operator THIS
+# operator `THIS`
Returns an operand of specified *type* whose offset and segment values are equal to the current location counter value.
## Syntax
-> **THIS** *type*
+> **`THIS`** *type*
## See also
diff --git a/docs/assembler/masm/operator-type.md b/docs/assembler/masm/operator-type.md
index 65382ed503..2fa7a06133 100644
--- a/docs/assembler/masm/operator-type.md
+++ b/docs/assembler/masm/operator-type.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator TYPE"
title: "operator TYPE"
ms.date: "12/17/2019"
f1_keywords: ["operator TYPE"]
diff --git a/docs/assembler/masm/operator-width.md b/docs/assembler/masm/operator-width.md
index dde2ecb1a2..14919305e6 100644
--- a/docs/assembler/masm/operator-width.md
+++ b/docs/assembler/masm/operator-width.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator WIDTH"
title: "operator WIDTH"
ms.date: "12/17/2019"
f1_keywords: ["Width", "operator WIDTH"]
diff --git a/docs/assembler/masm/operator-xor.md b/docs/assembler/masm/operator-xor.md
index f3c009bfbd..0ecfb236d5 100644
--- a/docs/assembler/masm/operator-xor.md
+++ b/docs/assembler/masm/operator-xor.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator XOR"
title: "operator XOR"
ms.date: "12/17/2019"
f1_keywords: ["operator XOR", "Xor"]
diff --git a/docs/assembler/masm/operator-zero-q.md b/docs/assembler/masm/operator-zero-q.md
index 9fae180c91..bf3dbb21a5 100644
--- a/docs/assembler/masm/operator-zero-q.md
+++ b/docs/assembler/masm/operator-zero-q.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: operator ZERO?"
title: "operator ZERO?"
ms.date: "12/17/2019"
f1_keywords: ["operator ZERO?", "ZERO?"]
diff --git a/docs/assembler/masm/operators-reference.md b/docs/assembler/masm/operators-reference.md
index 0fcee06c94..d81f8f6c16 100644
--- a/docs/assembler/masm/operators-reference.md
+++ b/docs/assembler/masm/operators-reference.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: MASM Operators reference"
title: "MASM Operators reference"
ms.date: 07/15/2020
helpviewer_keywords: ["MASM (Microsoft Macro Assembler), operators reference", "operators [MASM]"]
@@ -10,13 +11,17 @@ ms.assetid: c069cab7-d6b0-4f82-a6ce-0ca3fc7e6428
:::row:::
:::column span="":::
- [`*` (multiply)](operator-multiply.md)
[`+` (add)](operator-add.md)
[`-` (subtract or negate)](operator-subtract-2.md)
+ [`*` (multiply)](operator-multiply.md)\
+ [`+` (add)](operator-add.md)\
+ [`-` (subtract or negate)](operator-subtract-2.md)
:::column-end:::
:::column span="":::
- [`.` (field)](operator-dot.md)
[`/` (divide)](operator-subtract-1.md)
+ [`.` (field)](operator-dot.md)\
+ [`/` (divide)](operator-subtract-1.md)
:::column-end:::
:::column span="":::
- [`[]` (index)](operator-brackets.md)
[`MOD` (remainder)](operator-mod.md)
+ [`[]` (index)](operator-brackets.md)\
+ [`MOD` (remainder)](operator-mod.md)
:::column-end:::
:::row-end:::
@@ -24,13 +29,25 @@ ms.assetid: c069cab7-d6b0-4f82-a6ce-0ca3fc7e6428
:::row:::
:::column span="":::
- [`!` (runtime logical not)](operator-logical-not-masm-run-time.md)
[`!=` (runtime not equal)](operator-not-equal-masm.md)
[`||` (runtime logical or)](operator-logical-or.md)
[`&&` (runtime logical and)](operator-logical-and-masm-run-time.md)
[`<` (runtime less than)](operator-less-than-masm-run-time.md)
+ [`!` (runtime logical not)](operator-logical-not-masm-run-time.md)\
+ [`!=` (runtime not equal)](operator-not-equal-masm.md)\
+ [`||` (runtime logical or)](operator-logical-or.md)\
+ [`&&` (runtime logical and)](operator-logical-and-masm-run-time.md)\
+ [`<` (runtime less than)](operator-less-than-masm-run-time.md)
:::column-end:::
:::column span="":::
- [`<=` (runtime less or equal)](operator-less-or-equal-masm-run-time.md)
[`==` (runtime equal)](operator-equal-masm-run-time.md)
[`>` (runtime greater than)](operator-greater-than-masm-run-time.md)
[`>=` (runtime greater or equal)](operator-greater-or-equal-masm-run-time.md)
[`&` (runtime bitwise and)](operator-bitwise-and.md)
+ [`<=` (runtime less or equal)](operator-less-or-equal-masm-run-time.md)\
+ [`==` (runtime equal)](operator-equal-masm-run-time.md)\
+ [`>` (runtime greater than)](operator-greater-than-masm-run-time.md)\
+ [`>=` (runtime greater or equal)](operator-greater-or-equal-masm-run-time.md)\
+ [`&` (runtime bitwise and)](operator-bitwise-and.md)
:::column-end:::
:::column span="":::
- [`CARRY?` (runtime carry test)](operator-carry-q.md)
[`OVERFLOW?` (runtime overflow test)](operator-overflow-q.md)
[`PARITY?` (runtime parity test)](operator-parity-q.md)
[`SIGN?` (runtime sign test)](operator-sign-q.md)
[`ZERO?` (runtime zero test)](operator-zero-q.md)
+ [`CARRY?` (runtime carry test)](operator-carry-q.md)\
+ [`OVERFLOW?` (runtime overflow test)](operator-overflow-q.md)\
+ [`PARITY?` (runtime parity test)](operator-parity-q.md)\
+ [`SIGN?` (runtime sign test)](operator-sign-q.md)\
+ [`ZERO?` (runtime zero test)](operator-zero-q.md)
:::column-end:::
:::row-end:::
@@ -38,13 +55,16 @@ ms.assetid: c069cab7-d6b0-4f82-a6ce-0ca3fc7e6428
:::row:::
:::column span="":::
- [`AND` (bitwise and)](operator-and.md)
[`NOT` (bitwise not)](operator-not.md)
+ [`AND` (bitwise and)](operator-and.md)\
+ [`NOT` (bitwise not)](operator-not.md)
:::column-end:::
:::column span="":::
- [`OR` (bitwise or)](operator-or.md)
[`SHL` (shift bits left)](operator-shl.md)
+ [`OR` (bitwise or)](operator-or.md)\
+ [`SHL` (shift bits left)](operator-shl.md)
:::column-end:::
:::column span="":::
- [`SHR` (shift bits right)](operator-shr.md)
[`XOR` (bitwise exclusive or)](operator-xor.md)
+ [`SHR` (shift bits right)](operator-shr.md)\
+ [`XOR` (bitwise exclusive or)](operator-xor.md)
:::column-end:::
:::row-end:::
@@ -52,10 +72,12 @@ ms.assetid: c069cab7-d6b0-4f82-a6ce-0ca3fc7e6428
:::row:::
:::column span="":::
- [`!` (character literal)](operator-logical-not-masm.md)
[`%` (treat as text)](operator-percent.md)
+ [`!` (character literal)](operator-logical-not-masm.md)\
+ [`%` (treat as text)](operator-percent.md)
:::column-end:::
:::column span="":::
- [`;;` (treat as comment)](operator-semicolons.md)
[`< >` (treat as one literal)](operator-literal.md)
+ [`;;` (treat as comment)](operator-semicolons.md)\
+ [`< >` (treat as one literal)](operator-literal.md)
:::column-end:::
:::column span="":::
[`& &` (substitute parameter value)](operator-logical-and-masm.md)
@@ -66,13 +88,17 @@ ms.assetid: c069cab7-d6b0-4f82-a6ce-0ca3fc7e6428
:::row:::
:::column span="":::
- [`' '` (treat as string)](operator-single-quote.md)
[`" "` (treat as string)](operator-double-quote.md)
`:` (local label definition)
+ [`' '` (treat as string)](operator-single-quote.md)\
+ [`" "` (treat as string)](operator-double-quote.md)\
+ `:` (local label definition)
:::column-end:::
:::column span="":::
- `::` (register segment and offset)
`::` (global label definition)
+ `::` (register segment and offset)\
+ `::` (global label definition)
:::column-end:::
:::column span="":::
- [`;` (treat as comment)](operator-semicolon.md)
[`DUP` (repeat declaration)](operator-dup.md)
+ [`;` (treat as comment)](operator-semicolon.md)\
+ [`DUP` (repeat declaration)](operator-dup.md)
:::column-end:::
:::row-end:::
@@ -91,13 +117,16 @@ ms.assetid: c069cab7-d6b0-4f82-a6ce-0ca3fc7e6428
:::row:::
:::column span="":::
- [`EQ` (equal)](operator-eq.md)
[`GE` (greater or equal)](operator-ge.md)
+ [`EQ` (equal)](operator-eq.md)\
+ [`GE` (greater or equal)](operator-ge.md)
:::column-end:::
:::column span="":::
- [`GT` (greater than)](operator-gt.md)
[`LE` (less or equal)](operator-le.md)
+ [`GT` (greater than)](operator-gt.md)\
+ [`LE` (less or equal)](operator-le.md)
:::column-end:::
:::column span="":::
- [`LT` (less than)](operator-lt.md)
[`NE` (not equal)](operator-ne.md)
+ [`LT` (less than)](operator-lt.md)\
+ [`NE` (not equal)](operator-ne.md)
:::column-end:::
:::row-end:::
@@ -105,13 +134,17 @@ ms.assetid: c069cab7-d6b0-4f82-a6ce-0ca3fc7e6428
:::row:::
:::column span="":::
- [`:` (segment override)](operator-colon.md)
`::` (register segment and offset)
[`IMAGEREL` (image relative offset)](operator-imagerel.md)
+ [`:` (segment override)](operator-colon.md)\
+ `::` (register segment and offset)\
+ [`IMAGEREL` (image relative offset)](operator-imagerel.md)
:::column-end:::
:::column span="":::
- [`LROFFSET` (loader resolved offset)](operator-lroffset.md)
[`OFFSET` (segment relative offset)](operator-offset.md)
+ [`LROFFSET` (loader resolved offset)](operator-lroffset.md)\
+ [`OFFSET` (segment relative offset)](operator-offset.md)
:::column-end:::
:::column span="":::
- [`SECTIONREL` (section relative offset)](operator-sectionrel.md)
[`SEG` (get segment)](operator-seg.md)
+ [`SECTIONREL` (section relative offset)](operator-sectionrel.md)\
+ [`SEG` (get segment)](operator-seg.md)
:::column-end:::
:::row-end:::
@@ -119,13 +152,26 @@ ms.assetid: c069cab7-d6b0-4f82-a6ce-0ca3fc7e6428
:::row:::
:::column span="":::
- [`HIGH` (high 8 bits of lowest 16 bits)](operator-high.md)
[`HIGH32` (high 32 bits of 64 bits)](operator-high32.md)
[`HIGHWORD` (high 16 bits of lowest 32 bits)](operator-highword.md)
[`LENGTH` (number of elements in array)](operator-length.md)
[`LENGTHOF` (number of elements in array)](operator-lengthof.md)
[`LOW` (low 8 bits)](operator-low.md)
+ [`HIGH` (high 8 bits of lowest 16 bits)](operator-high.md)\
+ [`HIGH32` (high 32 bits of 64 bits)](operator-high32.md)\
+ [`HIGHWORD` (high 16 bits of lowest 32 bits)](operator-highword.md)\
+ [`LENGTH` (number of elements in array)](operator-length.md)\
+ [`LENGTHOF` (number of elements in array)](operator-lengthof.md)\
+ [`LOW` (low 8 bits)](operator-low.md)
:::column-end:::
:::column span="":::
- [`LOW32` (low 32 bits)](operator-low32.md)
[`LOWWORD` (low 16 bits)](operator-lowword.md)
[`OPATTR` (get argument type info)](operator-opattr.md)
[`PTR` (pointer to or as type)](operator-ptr.md)
[`SHORT` (mark short label type)](operator-short.md)
+ [`LOW32` (low 32 bits)](operator-low32.md)\
+ [`LOWWORD` (low 16 bits)](operator-lowword.md)\
+ [`OPATTR` (get argument type info)](operator-opattr.md)\
+ [`PTR` (pointer to or as type)](operator-ptr.md)\
+ [`SHORT` (mark short label type)](operator-short.md)
:::column-end:::
:::column span="":::
- [`SIZE` (size of type or variable)](operator-size.md)
[`SIZEOF` (size of type or variable)](operator-sizeof.md)
[`THIS` (current location)](operator-this.md)
[`TYPE` (get expression type)](operator-type.md)
[`.TYPE` (get argument type info)](operator-dot-type.md)
+ [`SIZE` (size of type or variable)](operator-size.md)\
+ [`SIZEOF` (size of type or variable)](operator-sizeof.md)\
+ [`THIS` (current location)](operator-this.md)\
+ [`TYPE` (get expression type)](operator-type.md)\
+ [`.TYPE` (get argument type info)](operator-dot-type.md)
:::column-end:::
:::row-end:::
diff --git a/docs/assembler/masm/option-avxencoding-masm.md b/docs/assembler/masm/option-avxencoding-masm.md
new file mode 100644
index 0000000000..806b205a3b
--- /dev/null
+++ b/docs/assembler/masm/option-avxencoding-masm.md
@@ -0,0 +1,84 @@
+---
+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"]
+---
+# OPTION AVXENCODING
+
+Selects the preferred encoding of AVX instructions.
+
+## Syntax
+
+> **`OPTION AVXENCODING:`** *preference*
+
+## Background
+
+Intel AVX and AVX-512 instructions are encoded differently from other Intel Architecture instructions. Rather than relying on instruction prefix bytes and opcode lead-in bytes to select an instruction, they use a single multi-byte prefix. This prefix can encode an additional register operand. In 64-bit mode, it also has bits to select registers 8 through 15 for the other operands, and a REX prefix isn't needed.
+
+Three different multi-byte prefixes are used. AVX instructions can be encoded with a 3-byte VEX prefix, where the second and third bytes help to select the specific operation executed. If some of the fields in the 3-byte VEX prefix have specific values, a 2-byte form of the VEX prefix can be used instead. Finally, some AVX instructions also have an AVX-512 form, which is encoded with a 4-byte EVEX prefix. The EVEX prefix has an additional fields to select 512-bit vector length and other options specific to AVX-512 instructions.
+
+Because some AVX instructions might be encoded in up to three different ways, there are rules to select which form to use. The **`OPTION AVXENCODING`** directive is used to select which set of rules to use.
+
+## Preferences
+
+| Preference | Encoding preference priority |
+|--|--|
+| **`PREFER_FIRST`** | Use first defined form if possible. |
+| **`PREFER_VEX`** | Use `VEX` encoding in preference to `EVEX` encoding. |
+| **`PREFER_VEX3`** | Use 3-byte `VEX` encoding in preference to `EVEX` encoding. |
+| **`PREFER_EVEX`** | Use `EVEX` encoding in preference to `VEX` encoding. |
+| **`NO_EVEX`** | Don't encode using `EVEX`. |
+
+The AVXENCODING order applies only if the instruction prefix form isn't specified for the instruction. If the instruction prefix is explicitly coded, it takes precedence over the **`AVXENCODING`** option. For example, `evex vpmaddwd` will use **`EVEX`**-prefixed `VPMADDWD` even if `OPTION AVXENCODING:no_EVEX` is specified.
+
+If an assembly source doesn't use `OPTION AVXENCODING` to select encoding preferences, the **`PREFER_FIRST`** rules are used by default. By these rules, the earliest instruction encodings added to Microsoft Macro Assembler (MASM) have precedence, and among those possibilities the encoding with the shortest prefix form is preferred. These rules ensure that code assembled by MASM still generates the same object code if new instruction forms are added later.
+
+The **`PREFER_VEX`** rules always tries to encode with a **`VEX`** prefix before trying to encode with **`EVEX`**. If possible, the 2-byte form of **`VEX`** is used instead of the 3-byte form.
+
+The **`PREFER_VEX3`** preference always tries to encode with a 3-byte **`VEX`** prefix before trying to encode with **`EVEX`**. The 2-byte form of **`VEX`** won't be used.
+
+The **`PREFER_EVEX`** option always tries to encode with an **`EVEX`** prefix, and only tries to use **`VEX`** if the instruction has no AVX-512 form.
+
+The **`NO_EVEX`** preference only tries to encode by using a **`VEX`** prefix. No AVX-512 instruction forms are allowed. This option lets you assemble code for use on platforms that have no AVX-512 support at all.
+
+The **`OPTION AVXENCODING`** directive is available in Visual Studio 2019 version 16.7 and later.
+
+### 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 "/".
+
+```asm
+ 00000000 62 F2 6D 08/ 50 vpdpbusd xmm1, xmm2, xmm3
+ CB
+ 00000006 C5 E9/ F5 CB vpmaddwd xmm1, xmm2, xmm3
+
+ option avxencoding:no_EVEX
+ 0000000A C4 E2 69/ 50 CB vpdpbusd xmm1, xmm2, xmm3
+ 0000000F C5 E9/ F5 CB vpmaddwd xmm1, xmm2, xmm3
+
+ option avxencoding:prefer_VEX
+ 00000013 C4 E2 69/ 50 CB vpdpbusd xmm1, xmm2, xmm3
+ 00000018 C5 E9/ F5 CB vpmaddwd xmm1, xmm2, xmm3
+
+ option avxencoding:prefer_VEX3
+ 0000001C C4 E2 69/ 50 CB vpdpbusd xmm1, xmm2, xmm3
+ 00000021 C4 E1 69/ F5 CB vpmaddwd xmm1, xmm2, xmm3
+
+ option avxencoding:prefer_EVEX
+ 00000026 62 F2 6D 08/ 50 vpdpbusd xmm1, xmm2, xmm3
+ CB
+ 0000002C 62 F1 6D 08/ F5 vpmaddwd xmm1, xmm2, xmm3
+ CB
+
+ option avxencoding:prefer_first
+ 00000032 62 F2 6D 08/ 50 vpdpbusd xmm1, xmm2, xmm3
+ CB
+ 00000038 C5 E9/ F5 CB vpmaddwd xmm1, xmm2, xmm3
+```
+
+## See also
+
+[Option (MASM)](option-masm.md)\
+[Directives Reference](directives-reference.md)
diff --git a/docs/assembler/masm/option-language-masm.md b/docs/assembler/masm/option-language-masm.md
new file mode 100644
index 0000000000..bc258e08f1
--- /dev/null
+++ b/docs/assembler/masm/option-language-masm.md
@@ -0,0 +1,40 @@
+---
+description: Learn more about the alternatives for the OPTION LANGUAGE directive
+title: "OPTION LANGUAGE"
+ms.date: 09/21/2021
+f1_keywords: ["language"]
+helpviewer_keywords: ["OPTION LANGUAGE directive"]
+---
+# `OPTION LANGUAGE`
+
+Sets default language features such as calling convention.
+
+## Syntax
+
+> **`OPTION LANGUAGE:`** *language*
+
+## Remarks
+
+Available languages include:
+
+:::row:::
+ :::column span="":::
+ **`C`**\
+ **`SYSCALL`**\
+ :::column-end:::
+ :::column span="":::
+ **`STDCALL`**\
+ **`PASCAL`**\
+ :::column-end:::
+ :::column span="":::
+ **`FORTRAN`**\
+ **`BASIC`**
+ :::column-end:::
+:::row-end:::
+
+**`SYSCALL`**, **`PASCAL`**, **`FORTRAN`**, and **`BASIC`** aren't supported when used with [`.MODEL FLAT`](../../assembler/masm/dot-model.md).
+
+## See also
+
+[`OPTION` directive](../../assembler/masm/option-masm.md)\
+[Directives reference](../../assembler/masm/directives-reference.md)
diff --git a/docs/assembler/masm/option-masm.md b/docs/assembler/masm/option-masm.md
index 7ed4aa9a07..fd6b674619 100644
--- a/docs/assembler/masm/option-masm.md
+++ b/docs/assembler/masm/option-masm.md
@@ -1,11 +1,11 @@
---
+description: "Learn more about: the OPTION directive"
title: "OPTION (MASM)"
-ms.date: 07/15/2020
+ms.date: 09/21/2021
f1_keywords: ["option"]
helpviewer_keywords: ["OPTION directive"]
-ms.assetid: 8e10dabd-e36f-4586-ab01-ada96736b0bd
---
-# OPTION
+# `OPTION`
Enables and disables features of the assembler.
@@ -19,20 +19,45 @@ Available options include:
:::row:::
:::column span="":::
- **`CASEMAP`**
**`DOTNAME`**
**`NODOTNAME`**
**`EMULATOR`**
**`NOEMULATOR`**
**`EPILOGUE`**
**`EXPR16`**
+ [`AVXENCODING`](option-avxencoding-masm.md)\
+ **`CASEMAP`**\
+ **`DOTNAME`**\
+ **`NODOTNAME`**\
+ **`EMULATOR`**\
+ **`NOEMULATOR`**\
+ **`EPILOGUE`**\
+ **`EXPR16`**
:::column-end:::
:::column span="":::
- **`EXPR32`**
**`LANGUAGE`**
**`LJMP`**
**`NOLJMP`**
**`M510`**
**`NOM510`**
**`NOKEYWORD`**
+ **`EXPR32`**\
+ [`LANGUAGE`](option-language-masm.md)\
+ **`LJMP`**\
+ **`NOLJMP`**\
+ **`M510`**\
+ **`NOM510`**\
+ **`NOKEYWORD`**
:::column-end:::
:::column span="":::
- **`NOSIGNEXTEND`**
**`OFFSET`**
**`OLDMACROS`**
**`NOOLDMACROS`**
**`OLDSTRUCTS`**
**`NOOLDSTRUCTS`**
**`PROC`**
+ **`NOSIGNEXTEND`**\
+ **`OFFSET`**\
+ **`OLDMACROS`**\
+ **`NOOLDMACROS`**\
+ **`OLDSTRUCTS`**\
+ **`NOOLDSTRUCTS`**\
+ **`PROC`**
:::column-end:::
:::column span="":::
- **`PROLOGUE`**
**`READONLY`**
**`NOREADONLY`**
**`SCOPED`**
**`NOSCOPED`**
**`SEGMENT`**
**`SETIF2`**
+ **`PROLOGUE`**\
+ **`READONLY`**\
+ **`NOREADONLY`**\
+ **`SCOPED`**\
+ **`NOSCOPED`**\
+ **`SEGMENT`**\
+ **`SETIF2`**
:::column-end:::
:::row-end:::
-The syntax for LANGUAGE is **`OPTION LANGUAGE:`** _`x`_, where *`x`* is one of **`C`**, **`SYSCALL`**, **`STDCALL`**, **`PASCAL`**, **`FORTRAN`**, or **`BASIC`**. **`SYSCALL`**, **`PASCAL`**, **`FORTRAN`**, and **`BASIC`** are not supported with [`.MODEL`](dot-model.md) **`FLAT`**.
+The **`OPTION AVXENCODING`** directive is available in Visual Studio 2019 version 16.7 and later.
## See also
diff --git a/docs/assembler/masm/org.md b/docs/assembler/masm/org.md
index 7cc41c65ad..3822a97f3e 100644
--- a/docs/assembler/masm/org.md
+++ b/docs/assembler/masm/org.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ORG"
title: "ORG"
ms.date: "12/17/2019"
f1_keywords: ["ORG"]
diff --git a/docs/assembler/masm/oword.md b/docs/assembler/masm/oword.md
index 9579a52e56..9405c50d65 100644
--- a/docs/assembler/masm/oword.md
+++ b/docs/assembler/masm/oword.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: OWORD"
title: "OWORD"
ms.date: "12/17/2019"
f1_keywords: ["OWORD"]
diff --git a/docs/assembler/masm/page.md b/docs/assembler/masm/page.md
index 08855c25c9..44120a97fc 100644
--- a/docs/assembler/masm/page.md
+++ b/docs/assembler/masm/page.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: PAGE"
title: "PAGE"
ms.date: "12/16/2019"
f1_keywords: ["PAGE"]
diff --git a/docs/assembler/masm/percent-out.md b/docs/assembler/masm/percent-out.md
index db03e28197..8d49a2f884 100644
--- a/docs/assembler/masm/percent-out.md
+++ b/docs/assembler/masm/percent-out.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: %OUT"
title: "%OUT"
ms.date: "12/17/2019"
f1_keywords: ["%OUT"]
diff --git a/docs/assembler/masm/popcontext.md b/docs/assembler/masm/popcontext.md
index a7a6130105..011e299f8d 100644
--- a/docs/assembler/masm/popcontext.md
+++ b/docs/assembler/masm/popcontext.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: POPCONTEXT"
title: "POPCONTEXT"
ms.date: "12/06/2019"
f1_keywords: ["POPCONTEXT"]
diff --git a/docs/assembler/masm/proc.md b/docs/assembler/masm/proc.md
index fecefcb069..9eb65fc377 100644
--- a/docs/assembler/masm/proc.md
+++ b/docs/assembler/masm/proc.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: PROC"
title: "PROC"
ms.date: "12/06/2019"
f1_keywords: ["PROC"]
diff --git a/docs/assembler/masm/processor-manufacturer-programming-manuals.md b/docs/assembler/masm/processor-manufacturer-programming-manuals.md
index cc473d64e1..4774fdeeb7 100644
--- a/docs/assembler/masm/processor-manufacturer-programming-manuals.md
+++ b/docs/assembler/masm/processor-manufacturer-programming-manuals.md
@@ -1,21 +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/)
-
-- [ARM Architecture Reference Manual](https://developer.arm.com/docs/ddi0487/fb)
-
-- [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)
+- [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://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/proto.md b/docs/assembler/masm/proto.md
index 9aa7f70eb0..343bd9108c 100644
--- a/docs/assembler/masm/proto.md
+++ b/docs/assembler/masm/proto.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: PROTO"
title: "PROTO"
ms.date: "12/06/2019"
f1_keywords: ["PROTO"]
diff --git a/docs/assembler/masm/public-masm.md b/docs/assembler/masm/public-masm.md
index e1ed4d2c7c..e372aac24a 100644
--- a/docs/assembler/masm/public-masm.md
+++ b/docs/assembler/masm/public-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: PUBLIC"
title: "PUBLIC (MASM)"
ms.date: "12/16/2019"
f1_keywords: ["public"]
diff --git a/docs/assembler/masm/purge.md b/docs/assembler/masm/purge.md
index 55662a457c..9051b7fae9 100644
--- a/docs/assembler/masm/purge.md
+++ b/docs/assembler/masm/purge.md
@@ -1,9 +1,9 @@
---
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
@@ -15,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/pushcontext.md b/docs/assembler/masm/pushcontext.md
index 2917f3aa1c..fb32914f92 100644
--- a/docs/assembler/masm/pushcontext.md
+++ b/docs/assembler/masm/pushcontext.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: PUSHCONTEXT"
title: "PUSHCONTEXT"
ms.date: "12/06/2019"
f1_keywords: ["PUSHCONTEXT"]
diff --git a/docs/assembler/masm/q.md b/docs/assembler/masm/q.md
index 829964dc0e..3819214c6d 100644
--- a/docs/assembler/masm/q.md
+++ b/docs/assembler/masm/q.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ?"
title: "? (MASM)"
ms.date: "12/17/2019"
f1_keywords: ["?"]
diff --git a/docs/assembler/masm/qword.md b/docs/assembler/masm/qword.md
index 19c970f61a..ecfd6fa626 100644
--- a/docs/assembler/masm/qword.md
+++ b/docs/assembler/masm/qword.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: QWORD"
title: "QWORD"
ms.date: "12/17/2019"
f1_keywords: ["QWORD"]
diff --git a/docs/assembler/masm/real10.md b/docs/assembler/masm/real10.md
index c8a6871ae5..c29c22c2db 100644
--- a/docs/assembler/masm/real10.md
+++ b/docs/assembler/masm/real10.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: REAL10"
title: "REAL10"
ms.date: "12/17/2019"
f1_keywords: ["REAL10"]
diff --git a/docs/assembler/masm/real4.md b/docs/assembler/masm/real4.md
index 7b44afe665..066317ab5b 100644
--- a/docs/assembler/masm/real4.md
+++ b/docs/assembler/masm/real4.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: REAL4"
title: "REAL4"
ms.date: "12/17/2019"
f1_keywords: ["REAL4"]
diff --git a/docs/assembler/masm/real8.md b/docs/assembler/masm/real8.md
index 1832b933a4..2d963ab3fb 100644
--- a/docs/assembler/masm/real8.md
+++ b/docs/assembler/masm/real8.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: REAL8"
title: "REAL8"
ms.date: "12/17/2019"
f1_keywords: ["REAL8"]
diff --git a/docs/assembler/masm/record-masm.md b/docs/assembler/masm/record-masm.md
index baa9e4bb88..96b3f0f3af 100644
--- a/docs/assembler/masm/record-masm.md
+++ b/docs/assembler/masm/record-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: RECORD"
title: "RECORD (MASM)"
ms.date: "12/16/2019"
f1_keywords: ["RECORD"]
diff --git a/docs/assembler/masm/repeat.md b/docs/assembler/masm/repeat.md
index 9805df108f..4e95f1eae5 100644
--- a/docs/assembler/masm/repeat.md
+++ b/docs/assembler/masm/repeat.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: REPEAT"
title: "REPEAT"
ms.date: "12/17/2019"
f1_keywords: ["REPEAT"]
diff --git a/docs/assembler/masm/rept.md b/docs/assembler/masm/rept.md
index 3c152bbe4c..8adb58794f 100644
--- a/docs/assembler/masm/rept.md
+++ b/docs/assembler/masm/rept.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: REPT"
title: "REPT"
ms.date: "12/17/2019"
f1_keywords: ["REPT"]
diff --git a/docs/assembler/masm/sbyte-masm.md b/docs/assembler/masm/sbyte-masm.md
index 7f5193cf26..62c126f17e 100644
--- a/docs/assembler/masm/sbyte-masm.md
+++ b/docs/assembler/masm/sbyte-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: SBYTE"
title: "SBYTE (MASM)"
ms.date: "12/17/2019"
f1_keywords: ["sbyte"]
diff --git a/docs/assembler/masm/sdword.md b/docs/assembler/masm/sdword.md
index bade6a5047..e3ddcc9bde 100644
--- a/docs/assembler/masm/sdword.md
+++ b/docs/assembler/masm/sdword.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: SDWORD"
title: "SDWORD"
ms.date: "12/17/2019"
f1_keywords: ["SDWORD"]
diff --git a/docs/assembler/masm/segment.md b/docs/assembler/masm/segment.md
index f72a883c0a..4e8debb2c6 100644
--- a/docs/assembler/masm/segment.md
+++ b/docs/assembler/masm/segment.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: SEGMENT"
title: "SEGMENT"
ms.date: "12/16/2019"
f1_keywords: ["SEGMENT"]
diff --git a/docs/assembler/masm/sizestr.md b/docs/assembler/masm/sizestr.md
index 096f1f3a44..f0ea923225 100644
--- a/docs/assembler/masm/sizestr.md
+++ b/docs/assembler/masm/sizestr.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: SIZESTR"
title: "SIZESTR"
ms.date: "12/17/2019"
f1_keywords: ["SIZESTR"]
diff --git a/docs/assembler/masm/sqword.md b/docs/assembler/masm/sqword.md
index d7f2c56d60..fe78b8f5a4 100644
--- a/docs/assembler/masm/sqword.md
+++ b/docs/assembler/masm/sqword.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: SQWORD"
title: "SQWORD"
ms.date: "12/17/2019"
f1_keywords: ["SQWORD"]
diff --git a/docs/assembler/masm/struc.md b/docs/assembler/masm/struc.md
index 55802b0232..8621795794 100644
--- a/docs/assembler/masm/struc.md
+++ b/docs/assembler/masm/struc.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: STRUC"
title: "STRUC"
ms.date: "12/17/2019"
f1_keywords: ["STRUC"]
diff --git a/docs/assembler/masm/struct-masm.md b/docs/assembler/masm/struct-masm.md
index 6abc46367c..c6200e58d2 100644
--- a/docs/assembler/masm/struct-masm.md
+++ b/docs/assembler/masm/struct-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: STRUCT"
title: "STRUCT (MASM)"
ms.date: "12/17/2019"
f1_keywords: ["struct"]
diff --git a/docs/assembler/masm/substr.md b/docs/assembler/masm/substr.md
index cfa46eba58..b7e7a67d08 100644
--- a/docs/assembler/masm/substr.md
+++ b/docs/assembler/masm/substr.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: SUBSTR"
title: "SUBSTR"
ms.date: "12/16/2019"
f1_keywords: ["substr"]
diff --git a/docs/assembler/masm/subtitle.md b/docs/assembler/masm/subtitle.md
index dd98209b17..ce64380b7f 100644
--- a/docs/assembler/masm/subtitle.md
+++ b/docs/assembler/masm/subtitle.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: SUBTITLE"
title: "SUBTITLE"
ms.date: "12/16/2019"
f1_keywords: ["SUBTITLE"]
diff --git a/docs/assembler/masm/subttl.md b/docs/assembler/masm/subttl.md
index d464c2fc1d..a119b8eb14 100644
--- a/docs/assembler/masm/subttl.md
+++ b/docs/assembler/masm/subttl.md
@@ -1,9 +1,9 @@
---
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
@@ -15,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/assembler/masm/sword.md b/docs/assembler/masm/sword.md
index 4608b250a9..a68a65c883 100644
--- a/docs/assembler/masm/sword.md
+++ b/docs/assembler/masm/sword.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: SWORD"
title: "SWORD"
ms.date: "12/17/2019"
f1_keywords: ["SWORD"]
diff --git a/docs/assembler/masm/symbols-reference.md b/docs/assembler/masm/symbols-reference.md
index 5e2049581b..c7fd4af9f8 100644
--- a/docs/assembler/masm/symbols-reference.md
+++ b/docs/assembler/masm/symbols-reference.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Symbols reference"
title: "Symbols reference"
ms.date: 07/15/2020
helpviewer_keywords: ["MASM (Microsoft Macro Assembler), symbols reference"]
@@ -69,7 +70,8 @@ ms.assetid: 96ed59cc-dafa-4299-bb2e-9c7c3f496491
:::row:::
:::column span="":::
- [`$`](dollar.md)
[`?`](q.md)
+ [`$`](dollar.md)\
+ [`?`](q.md)
:::column-end:::
:::column span="":::
[`@@:`](at-at.md)
@@ -86,16 +88,22 @@ ms.assetid: 96ed59cc-dafa-4299-bb2e-9c7c3f496491
:::row:::
:::column span="":::
- [`@code`](at-code.md)
[`@CodeSize`](at-codesize.md)
[`@CurSeg`](at-curseg.md)
+ [`@code`](at-code.md)\
+ [`@CodeSize`](at-codesize.md)\
+ [`@CurSeg`](at-curseg.md)
:::column-end:::
:::column span="":::
- [`@data`](at-data.md)
[`@DataSize`](at-datasize.md)
[`@fardata`](at-fardata.md)
+ [`@data`](at-data.md)\
+ [`@DataSize`](at-datasize.md)\
+ [`@fardata`](at-fardata.md)
:::column-end:::
:::column span="":::
- [`@fardata?`](at-fardata-q.md)
[`@Model`](at-model.md)
+ [`@fardata?`](at-fardata-q.md)\
+ [`@Model`](at-model.md)
:::column-end:::
:::column span="":::
- [`@stack`](at-stack.md)
[`@WordSize`](at-wordsize.md)
+ [`@stack`](at-stack.md)\
+ [`@WordSize`](at-wordsize.md)
:::column-end:::
:::row-end:::
diff --git a/docs/assembler/masm/tbyte.md b/docs/assembler/masm/tbyte.md
index 6659ba520e..8553fd5cd3 100644
--- a/docs/assembler/masm/tbyte.md
+++ b/docs/assembler/masm/tbyte.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: TBYTE"
title: "TBYTE"
ms.date: "12/17/2019"
f1_keywords: ["TBYTE"]
diff --git a/docs/assembler/masm/textequ.md b/docs/assembler/masm/textequ.md
index 5d7e77c330..e56588acef 100644
--- a/docs/assembler/masm/textequ.md
+++ b/docs/assembler/masm/textequ.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: TEXTEQU"
title: "TEXTEQU"
ms.date: "12/17/2019"
f1_keywords: ["TEXTEQU"]
diff --git a/docs/assembler/masm/title.md b/docs/assembler/masm/title.md
index e022fcd101..8bda31d7f8 100644
--- a/docs/assembler/masm/title.md
+++ b/docs/assembler/masm/title.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: TITLE"
title: "TITLE"
ms.date: "12/16/2019"
f1_keywords: ["title"]
diff --git a/docs/assembler/masm/typedef-masm.md b/docs/assembler/masm/typedef-masm.md
index 2735de98a5..93e5a43db6 100644
--- a/docs/assembler/masm/typedef-masm.md
+++ b/docs/assembler/masm/typedef-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: TYPEDEF"
title: "TYPEDEF (MASM)"
ms.date: "12/16/2019"
f1_keywords: ["typedef"]
diff --git a/docs/assembler/masm/union.md b/docs/assembler/masm/union.md
index 236107c1f2..507db9afdf 100644
--- a/docs/assembler/masm/union.md
+++ b/docs/assembler/masm/union.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: UNION"
title: "UNION"
ms.date: "12/17/2019"
f1_keywords: ["union"]
diff --git a/docs/assembler/masm/while-masm.md b/docs/assembler/masm/while-masm.md
index 94c0556ba9..fc693f6061 100644
--- a/docs/assembler/masm/while-masm.md
+++ b/docs/assembler/masm/while-masm.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: WHILE"
title: "WHILE (MASM)"
ms.date: "12/16/2019"
helpviewer_keywords: ["WHILE directive"]
diff --git a/docs/assembler/masm/word.md b/docs/assembler/masm/word.md
index 8304c1dc8f..3345165dfd 100644
--- a/docs/assembler/masm/word.md
+++ b/docs/assembler/masm/word.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: WORD"
title: "WORD"
ms.date: "12/17/2019"
f1_keywords: ["WORD"]
diff --git a/docs/assembler/masm/xmmword.md b/docs/assembler/masm/xmmword.md
index 1324fde5a5..9e4ef7c064 100644
--- a/docs/assembler/masm/xmmword.md
+++ b/docs/assembler/masm/xmmword.md
@@ -1,9 +1,9 @@
---
title: "XMMWORD"
-ms.date: "12/17/2019"
+description: "Learn more about: XMMWORD"
+ms.date: 12/17/2019
f1_keywords: ["XMMWORD"]
helpviewer_keywords: ["XMMWORD directive"]
-ms.assetid: 18026d32-5cab-403e-ad7e-382fb41aa9b8
---
# XMMWORD
@@ -23,6 +23,6 @@ Used for 128-bit multimedia operands with MMX and SSE (XMM) instructions.
movdqa xmm0, xmmword ptr [ebx]
```
-## See Also
+## See also
[MASM BNF Grammar](masm-bnf-grammar.md)
diff --git a/docs/assembler/masm/ymmword.md b/docs/assembler/masm/ymmword.md
index 7e2f2030dc..993f51251e 100644
--- a/docs/assembler/masm/ymmword.md
+++ b/docs/assembler/masm/ymmword.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: YMMWORD"
title: "YMMWORD"
ms.date: "12/17/2019"
f1_keywords: ["YMMWORD"]
diff --git a/docs/assembler/toc.yml b/docs/assembler/toc.yml
index 8e36b420cb..8f8b923a9c 100644
--- a/docs/assembler/toc.yml
+++ b/docs/assembler/toc.yml
@@ -1,3 +1,4 @@
+items:
- name: Compiler intrinsics and assembly language
href: ../intrinsics/index.yml
- name: Compiler intrinsics
@@ -78,6 +79,8 @@
href: ../assembler/masm/microsoft-macro-assembler-reference.md
- name: MASM for x64 (ml64.exe)
href: ../assembler/masm/masm-for-x64-ml64-exe.md
+ - name: MASM instruction format
+ href: ../assembler/masm/instruction-format.md
- name: ML and ML64 command-line reference
href: ../assembler/masm/ml-and-ml64-command-line-reference.md
- name: Directives reference (MASM)
@@ -300,6 +303,10 @@
href: ../assembler/masm/dot-nolistmacro.md
- name: OPTION
href: ../assembler/masm/option-masm.md
+ - name: OPTION AVXENCODING
+ href: ../assembler/masm/option-avxencoding-masm.md
+ - name: OPTION LANGUAGE
+ href: ../assembler/masm/option-language-masm.md
- name: ORG
href: ../assembler/masm/org.md
- name: "%OUT"
@@ -476,8 +483,6 @@
href: ../assembler/masm/at-version.md
- name: "@WordSize"
href: ../assembler/masm/at-wordsize.md
- - name: Processor manufacturer programming manuals
- href: ../assembler/masm/processor-manufacturer-programming-manuals.md
- name: Operators reference
items:
- name: Operators reference
@@ -746,5 +751,7 @@
href: ../assembler/masm/ml-warning-a4012.md
- name: ML warning A4014
href: ../assembler/masm/ml-warning-a4014.md
+ - name: Processor manufacturer programming manuals
+ href: ../assembler/masm/processor-manufacturer-programming-manuals.md
- name: MASM BNF grammar
href: ../assembler/masm/masm-bnf-grammar.md
diff --git a/docs/atl-mfc-shared/allocating-and-releasing-memory-for-a-bstr.md b/docs/atl-mfc-shared/allocating-and-releasing-memory-for-a-bstr.md
index 00a548c77c..b257f105f9 100644
--- a/docs/atl-mfc-shared/allocating-and-releasing-memory-for-a-bstr.md
+++ b/docs/atl-mfc-shared/allocating-and-releasing-memory-for-a-bstr.md
@@ -1,11 +1,12 @@
---
+description: "Learn more about: Allocating and Releasing Memory for a BSTR"
title: "Allocating and Releasing Memory for a BSTR"
ms.date: "11/04/2016"
f1_keywords: ["bstr"]
helpviewer_keywords: ["BSTRs, memory allocation", "memory deallocation, string memory", "memory [C++], releasing", "memory allocation, BSTRs", "memory deallocation, BSTR memory", "strings [C++], releasing"]
ms.assetid: 98041e29-3442-4a02-b425-7a4a13e9cc84
---
-# Allocating and Releasing Memory for a BSTR
+# Allocating and Releasing Memory for a `BSTR`
When you create `BSTR`s and pass them between COM objects, you must take care in treating the memory they use in order to avoid memory leaks. When a `BSTR` stays within an interface, you must free its memory when you are done with it. However, when a `BSTR` passes out of an interface, the receiving object takes responsibility for its memory management.
@@ -14,22 +15,22 @@ In general, the rules for allocating and releasing memory allocated for `BSTR`s
- When you call into a function that expects a `BSTR` argument, you must allocate the memory for the `BSTR` before the call and release it afterwards. For example:
[!code-cpp[NVC_ATLMFC_Utilities#192](../atl-mfc-shared/codesnippet/cpp/allocating-and-releasing-memory-for-a-bstr_1.cpp)]
-
+
[!code-cpp[NVC_ATLMFC_Utilities#193](../atl-mfc-shared/codesnippet/cpp/allocating-and-releasing-memory-for-a-bstr_2.cpp)]
- When you call into a function that returns a `BSTR`, you must free the string yourself. For example:
[!code-cpp[NVC_ATLMFC_Utilities#194](../atl-mfc-shared/codesnippet/cpp/allocating-and-releasing-memory-for-a-bstr_3.cpp)]
-
+
[!code-cpp[NVC_ATLMFC_Utilities#195](../atl-mfc-shared/codesnippet/cpp/allocating-and-releasing-memory-for-a-bstr_4.cpp)]
-- When you implement a function that returns a `BSTR`, allocate the string but do not free it. The receiving the function releases the memory. For example:
+- When you implement a function that returns a `BSTR`, allocate the string but do not free it. The receiving function releases the memory. For example:
[!code-cpp[NVC_ATLMFC_Utilities#196](../atl-mfc-shared/codesnippet/cpp/allocating-and-releasing-memory-for-a-bstr_5.cpp)]
## See also
[Strings (ATL/MFC)](../atl-mfc-shared/strings-atl-mfc.md)
-[CStringT::AllocSysString](../atl-mfc-shared/reference/cstringt-class.md#allocsysstring)
-[SysAllocString](/windows/win32/api/oleauto/nf-oleauto-sysallocstring)
-[SysFreeString](/windows/win32/api/oleauto/nf-oleauto-sysfreestring)
+[`CStringT::AllocSysString`](../atl-mfc-shared/reference/cstringt-class.md#allocsysstring)
+[`SysAllocString`](/windows/win32/api/oleauto/nf-oleauto-sysallocstring)
+[`SysFreeString`](/windows/win32/api/oleauto/nf-oleauto-sysfreestring)
diff --git a/docs/atl-mfc-shared/atl-mfc-concepts.md b/docs/atl-mfc-shared/atl-mfc-concepts.md
index 754186ee0c..6227696c2b 100644
--- a/docs/atl-mfc-shared/atl-mfc-concepts.md
+++ b/docs/atl-mfc-shared/atl-mfc-concepts.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL/MFC Concepts"
title: "ATL-MFC Concepts"
ms.date: "11/04/2016"
helpviewer_keywords: ["MFC", "ATL"]
diff --git a/docs/atl-mfc-shared/atl-mfc-shared-classes.md b/docs/atl-mfc-shared/atl-mfc-shared-classes.md
index 81047ae47b..564d03df38 100644
--- a/docs/atl-mfc-shared/atl-mfc-shared-classes.md
+++ b/docs/atl-mfc-shared/atl-mfc-shared-classes.md
@@ -1,8 +1,9 @@
---
+description: "Learn more about: ATL/MFC Shared Classes"
title: "ATL-MFC Shared Classes"
ms.custom: "index-page"
ms.date: "11/04/2016"
-ms.topic: "conceptual"
+ms.topic: "concept-article"
f1_keywords: ["vc.classes.shared"]
helpviewer_keywords: ["CPoint class, shared class", "CFileTimeSpan class, shared class", "COleDateTime class, shared class", "CFixedStringT class, shared class", "CStrBufT class, shared class", "CFileTime class, shared class", "CRect class, shared class", "CSimpleStringT class, shared class", "CStringT class, shared class", "CSize class, shared class", "CStringData class, shared class", "IAtlStringMgr class, shared class", "shared classes, MFC and ATL", "COleDateTimeSpan class, shared class", "CString objects, shared class", "shared classes"]
ms.assetid: e13aaac3-21ec-4f4d-8834-432b40fde544
diff --git a/docs/atl-mfc-shared/avoidance-of-heap-contention.md b/docs/atl-mfc-shared/avoidance-of-heap-contention.md
index eb5ed0f104..6639bbbe49 100644
--- a/docs/atl-mfc-shared/avoidance-of-heap-contention.md
+++ b/docs/atl-mfc-shared/avoidance-of-heap-contention.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Avoidance of Heap Contention"
title: "Avoidance of Heap Contention"
ms.date: "11/04/2016"
helpviewer_keywords: ["heap contention"]
diff --git a/docs/atl-mfc-shared/basic-cstring-operations.md b/docs/atl-mfc-shared/basic-cstring-operations.md
index d6c4f3625b..047bd978b2 100644
--- a/docs/atl-mfc-shared/basic-cstring-operations.md
+++ b/docs/atl-mfc-shared/basic-cstring-operations.md
@@ -1,8 +1,8 @@
---
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
@@ -18,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/cfixedstringt-example-of-a-custom-string-manager.md b/docs/atl-mfc-shared/cfixedstringt-example-of-a-custom-string-manager.md
index 5e1ac5b6b2..11094716d1 100644
--- a/docs/atl-mfc-shared/cfixedstringt-example-of-a-custom-string-manager.md
+++ b/docs/atl-mfc-shared/cfixedstringt-example-of-a-custom-string-manager.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CFixedStringT: Example of a Custom String Manager"
title: "CFixedStringT: Example of a Custom String Manager"
ms.date: "11/04/2016"
helpviewer_keywords: ["CFixedStringT class, using a custom string manager"]
diff --git a/docs/atl-mfc-shared/codesnippet/CPP/afx-extension-module-structure_1.cpp b/docs/atl-mfc-shared/codesnippet/CPP/afx-extension-module-structure_1.cpp
index 597a279a89..ddc30f08be 100644
--- a/docs/atl-mfc-shared/codesnippet/CPP/afx-extension-module-structure_1.cpp
+++ b/docs/atl-mfc-shared/codesnippet/CPP/afx-extension-module-structure_1.cpp
@@ -1,4 +1,4 @@
-static AFX_EXTENSION_MODULE NVC_MFC_DLLDLL = { NULL, NULL };
+static AFX_EXTENSION_MODULE NVC_MFC_DLLDLL;
extern "C" int APIENTRY
DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
@@ -11,4 +11,4 @@ DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
// MFC extension DLL one-time initialization
if (!AfxInitExtensionModule(NVC_MFC_DLLDLL, hInstance))
- return 0;
\ No newline at end of file
+ return 0;
diff --git a/docs/atl-mfc-shared/codesnippet/CPP/cstringt-class_2.cpp b/docs/atl-mfc-shared/codesnippet/CPP/cstringt-class_2.cpp
index 78a3ad3444..2b6ff825fd 100644
--- a/docs/atl-mfc-shared/codesnippet/CPP/cstringt-class_2.cpp
+++ b/docs/atl-mfc-shared/codesnippet/CPP/cstringt-class_2.cpp
@@ -1,5 +1,5 @@
// OEM character 252 on most IBM-compatible computers in
- // Western countries/regions is superscript n, as in 2^n.
+ // many countries/regions is superscript n, as in 2^n.
// Converting it to the ANSI English charset results in a
// normal character 'n', which is the closest possible
// representation.
@@ -14,4 +14,4 @@
// the character's value truly was.
str.AnsiToOem();
ASSERT(str[0] != 252);
- ASSERT(str[0] == 'n');
\ No newline at end of file
+ ASSERT(str[0] == 'n');
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/codesnippet/CPP/cstringt-class_39.cpp b/docs/atl-mfc-shared/codesnippet/CPP/cstringt-class_39.cpp
index d2b2eb6cf3..8886e69d9f 100644
--- a/docs/atl-mfc-shared/codesnippet/CPP/cstringt-class_39.cpp
+++ b/docs/atl-mfc-shared/codesnippet/CPP/cstringt-class_39.cpp
@@ -8,4 +8,4 @@
{
_tprintf_s(_T("Resulting token: %s\n"), resToken);
resToken = str.Tokenize(_T("% #"), curPos);
- };
\ No newline at end of file
+ }
\ No newline at end of file
diff --git a/docs/atl-mfc-shared/cstring-argument-passing.md b/docs/atl-mfc-shared/cstring-argument-passing.md
index 7bedbe266e..68ff5addc6 100644
--- a/docs/atl-mfc-shared/cstring-argument-passing.md
+++ b/docs/atl-mfc-shared/cstring-argument-passing.md
@@ -1,22 +1,22 @@
---
+description: "Learn more about: CString Argument Passing"
title: "CString Argument Passing"
ms.date: "11/04/2016"
helpviewer_keywords: ["strings [C++], as function input/output", "argument passing [C++]", "arguments [C++], passing", "functions [C++], strings as input/output", "argument passing [C++], C strings", "passing arguments, C strings", "CString objects, passing arguments", "string arguments"]
-ms.assetid: a67bebff-edf1-4cf4-bbff-d1cc6a901099
---
-# CString Argument Passing
+# `CString` Argument Passing
-This article explains how to pass [CString](../atl-mfc-shared/reference/cstringt-class.md) objects to functions and how to return `CString` objects from functions.
+This article explains how to pass [`CString`](../atl-mfc-shared/reference/cstringt-class.md) objects to functions and how to return `CString` objects from functions.
-## CString Argument-Passing Conventions
+## `CString` Argument-Passing Conventions
-When you define a class interface, you must determine the argument-passing convention for your member functions. There are some standard rules for passing and returning `CString` objects. If you follow the rules described in [Strings as Function Inputs](#_core_strings_as_function_inputs) and [Strings as Function Outputs](#_core_strings_as_function_outputs), you will have efficient, correct code.
+When you define a class interface, you must determine the argument-passing convention for your member functions. There are some standard rules for passing and returning `CString` objects. If you follow the rules described in [Strings as Function Inputs](#_core_strings_as_function_inputs) and [Strings as Function Outputs](#_core_strings_as_function_outputs), you'll have efficient, correct code.
## Strings as Function Inputs
-The most efficient and secure way to use a `CString` object in called functions is to pass a `CString` object to the function. Despite the name, a `CString` object does not store a string internally as a C-style string that has a null terminator. Instead, a `CString` object keeps careful track of the number of characters it has. Having `CString` provide a LPCTSTR pointer to a null-terminated string is a small amount of work that can become significant if your code has to do it constantly. The result is temporary because any change to the `CString` contents invalidates old copies of the LPCTSTR pointer.
+The most efficient and secure way to use a `CString` object in called functions is to pass a `CString` object to the function. Despite the name, a `CString` object doesn't store a string internally as a C-style string that has a `NULL` terminator. Instead, a `CString` object keeps careful track of the number of characters it has. Having `CString` provide an `LPCTSTR` pointer to a `NULL`-terminated string is a small amount of work that can become significant if your code has to do it constantly. The result is temporary because any change to the `CString` contents invalidates old copies of the `LPCTSTR` pointer.
-It does make sense in some cases to provide a C-style string. For example, there can be a situation where a called function is written in C and does not support objects. In this case, coerce the `CString` parameter to LPCTSTR, and the function will get a C-style null-terminated string. You can also go the other direction and create a `CString` object by using the `CString` constructor that accepts a C-style string parameter.
+It does make sense in some cases to provide a C-style string. For example, there can be a situation where a called function is written in C and doesn't support objects. In this case, coerce the `CString` parameter to `LPCTSTR`, and the function will get a C-style `NULL`-terminated string. You can also go the other direction and create a `CString` object by using the `CString` constructor that accepts a C-style string parameter.
If the string contents are to be changed by a function, declare the parameter as a nonconstant `CString` reference (`CString&`).
@@ -25,7 +25,7 @@ If the string contents are to be changed by a function, declare the parameter as
Typically you can return `CString` objects from functions because `CString` objects follow value semantics like primitive types. To return a read-only string, use a constant `CString` reference (`const CString&`). The following example illustrates the use of `CString` parameters and return types:
[!code-cpp[NVC_ATLMFC_Utilities#197](../atl-mfc-shared/codesnippet/cpp/cstring-argument-passing_1.cpp)]
-
+
[!code-cpp[NVC_ATLMFC_Utilities#198](../atl-mfc-shared/codesnippet/cpp/cstring-argument-passing_2.cpp)]
## See also
diff --git a/docs/atl-mfc-shared/cstring-exception-cleanup.md b/docs/atl-mfc-shared/cstring-exception-cleanup.md
index e0c6833d51..f9571eb699 100644
--- a/docs/atl-mfc-shared/cstring-exception-cleanup.md
+++ b/docs/atl-mfc-shared/cstring-exception-cleanup.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CString Exception Cleanup"
title: "CString Exception Cleanup"
ms.date: "11/04/2016"
helpviewer_keywords: ["CString objects, exceptions", "exception handling, cleanup code"]
diff --git a/docs/atl-mfc-shared/cstring-operations-relating-to-c-style-strings.md b/docs/atl-mfc-shared/cstring-operations-relating-to-c-style-strings.md
index 552f8a996d..c90c04bf1b 100644
--- a/docs/atl-mfc-shared/cstring-operations-relating-to-c-style-strings.md
+++ b/docs/atl-mfc-shared/cstring-operations-relating-to-c-style-strings.md
@@ -1,12 +1,13 @@
---
+description: "Learn more about: CString Operations Relating to C-Style Strings"
title: "CString Operations Relating to C-Style Strings"
ms.date: "11/04/2016"
helpviewer_keywords: ["CString objects, basic operations", "MFC [C++], string handling class", "string conversion [C++], C-style strings", "strings [C++], string operations", "standard run-time library string functions", "null values, Null-terminated string conversion", "string functions", "strings [C++], in C", "string arguments", "C-style strings", "strings [C++], class CString", "casting CString objects"]
ms.assetid: 5048de8a-5298-4891-b8a0-c554b5a3ac1b
---
-# CString Operations Relating to C-Style Strings
+# `CString` Operations Relating to C-Style Strings
-A [CString](../atl-mfc-shared/using-cstring.md) object contains character string data. `CString` inherits the set of the [methods and operators](../atl-mfc-shared/reference/cstringt-class.md) that are defined in the class template [CStringT](../atl-mfc-shared/reference/cstringt-class.md) to work with string data. (`CString` is a **`typedef`** that specializes `CStringT` to work with the kind of character data that `CString` supports.)
+A [`CString`](../atl-mfc-shared/using-cstring.md) object contains character string data. `CString` inherits the set of the [methods and operators](../atl-mfc-shared/reference/cstringt-class.md) that are defined in the class template [`CStringT`](../atl-mfc-shared/reference/cstringt-class.md) to work with string data. (`CString` is a **`typedef`** that specializes `CStringT` to work with the kind of character data that `CString` supports.)
`CString` does not store character data internally as a C-style null-terminated string. Instead, `CString` tracks the length of character data so that it can more securely watch the data and the space it requires.
@@ -16,15 +17,15 @@ A [CString](../atl-mfc-shared/using-cstring.md) object contains character string
- [Working with standard run-time library string functions](#_core_working_with_standard_run.2d.time_library_string_functions)
-- [Modifying CString contents directly](#_core_modifying_cstring_contents_directly)
+- [Modifying `CString` contents directly](#_core_modifying_cstring_contents_directly)
-- [Using CString objects with variable argument functions](#_core_using_cstring_objects_with_variable_argument_functions)
+- [Using `CString` objects with variable argument functions](#_core_using_cstring_objects_with_variable_argument_functions)
-- [Specifying CString formal parameters](#_core_specifying_cstring_formal_parameters)
+- [Specifying `CString` formal parameters](#_core_specifying_cstring_formal_parameters)
-## Using CString as a C-Style Null-Terminated String
+## Using `CString` as a C-Style Null-Terminated String
-To use a `CString` object as a C-style string, cast the object to LPCTSTR. In the following example, the `CString` returns a pointer to a read-only C-style null-terminated string. The `strcpy` function puts a copy of the C-style string in the variable `myString`.
+To use a `CString` object as a C-style string, cast the object to `LPCTSTR`. In the following example, the `CString` returns a pointer to a read-only C-style null-terminated string. The `strcpy` function puts a copy of the C-style string in the variable `myString`.
```cpp
CString aCString = "A string";
@@ -32,7 +33,7 @@ char myString[256];
strcpy(myString, (LPCTSTR)aCString);
```
-You can use `CString` methods, for example, `SetAt`, to modify individual characters in the string object. However, the LPCTSTR pointer is temporary and becomes invalid when any change is made to `CString`. The `CString` can also go out of scope and be automatically deleted. We recommend that you get a fresh LPCTSTR pointer of a `CString` object every time that you use one.
+You can use `CString` methods, for example, `SetAt`, to modify individual characters in the string object. However, the `LPCTSTR` pointer is temporary and becomes invalid when any change is made to `CString`. The `CString` can also go out of scope and be automatically deleted. We recommend that you get a fresh `LPCTSTR` pointer of a `CString` object every time that you use one.
Sometimes you may require a copy of `CString` data to modify directly. Use the more secured function `strcpy_s` (or the Unicode/MBCS-portable `_tcscpy_s`) to copy the `CString` object into a separate buffer. This is where characters can be safely modified, as shown by the following example.
@@ -45,9 +46,9 @@ Sometimes you may require a copy of `CString` data to modify directly. Use the m
You should be able to find a `CString` method to perform any string operation for which you might consider using the standard C run-time library string functions such as `strcmp` (or the Unicode/MBCS-portable `_tcscmp`).
-If you must use the C run-time string functions, you can use the techniques described in _core_using_cstring_as_a_c.2d.style_null.2d.terminated_string. You can copy the `CString` object to an equivalent C-style string buffer, perform your operations on the buffer, and then assign the resulting C-style string back to a `CString` object.
+If you must use the C run-time string functions, you can use the techniques described in [Using `CString` as a C-style null-terminated string](#_core_using_cstring_as_a_c.2d.style_null.2d.terminated_string). You can copy the `CString` object to an equivalent C-style string buffer, perform your operations on the buffer, and then assign the resulting C-style string back to a `CString` object.
-## Modifying CString Contents Directly
+## Modifying `CString` Contents Directly
In most situations, you should use `CString` member functions to modify the contents of a `CString` object or to convert the `CString` to a C-style character string.
@@ -55,7 +56,7 @@ There are some situations where it makes sense to directly modify the `CString`
The `GetBuffer` and `ReleaseBuffer` methods offer access to the internal character buffer of a `CString` object and let you modify it directly. The following steps show how to use these functions for this purpose.
-### To use GetBuffer and ReleaseBuffer to access the internal character buffer of a CString object
+### To use `GetBuffer` and `ReleaseBuffer` to access the internal character buffer of a `CString` object
1. Call `GetBuffer` for a `CString` object and specify the length of the buffer you require.
@@ -63,17 +64,17 @@ The `GetBuffer` and `ReleaseBuffer` methods offer access to the internal charact
1. Call `ReleaseBuffer` for the `CString` object to update all the internal `CString` state information, for example, the length of the string. After you modify the contents of a `CString` object directly, you must call `ReleaseBuffer` before you call any other `CString` member functions.
-## Using CString Objects with Variable Argument Functions
+## Using `CString` Objects with Variable Argument Functions
Some C functions take a variable number of arguments. A notable example is `printf_s`. Because of the way this kind of function is declared, the compiler cannot be sure of the type of the arguments and cannot determine which conversion operation to perform on each argument. Therefore, it is essential that you use an explicit type cast when passing a `CString` object to a function that takes a variable number of arguments.
-To use a `CString` object in a variable argument function, explicitly cast the `CString` to an LPCTSTR string, as shown in the following example.
+To use a `CString` object in a variable argument function, explicitly cast the `CString` to an `LPCTSTR` string, as shown in the following example.
[!code-cpp[NVC_ATLMFC_Utilities#190](../atl-mfc-shared/codesnippet/cpp/cstring-operations-relating-to-c-style-strings_2.cpp)]
-## Specifying CString Formal Parameters
+## Specifying `CString` Formal Parameters
-For most functions that need a string argument, it is best to specify the formal parameter in the function prototype as a **`const`** pointer to a character (`LPCTSTR`) instead of a `CString`. When a formal parameter is specified as a **`const`** pointer to a character, you can pass either a pointer to a TCHAR array, a literal string [`"hi there"`], or a `CString` object. The `CString` object will be automatically converted to an LPCTSTR. Any place you can use an LPCTSTR, you can also use a `CString` object.
+For most functions that need a string argument, it is best to specify the formal parameter in the function prototype as a **`const`** pointer to a character (`LPCTSTR`) instead of a `CString`. When a formal parameter is specified as a **`const`** pointer to a character, you can pass either a pointer to a `TCHAR` array, a literal string [`"hi there"`], or a `CString` object. The `CString` object will be automatically converted to an `LPCTSTR`. Any place you can use an `LPCTSTR`, you can also use a `CString` object.
You can also specify a formal parameter as a constant string reference (that is, `const CString&`) if the argument will not be modified. Drop the **`const`** modifier if the string will be modified by the function. If a default null value is desired, initialize it to the null string [`""`], as shown below:
@@ -84,4 +85,4 @@ For most function results, you can simply return a `CString` object by value.
## See also
[Strings (ATL/MFC)](../atl-mfc-shared/strings-atl-mfc.md)
-[CString Argument Passing](../atl-mfc-shared/cstring-argument-passing.md)
+[`CString` Argument Passing](../atl-mfc-shared/cstring-argument-passing.md)
diff --git a/docs/atl-mfc-shared/cstring-semantics.md b/docs/atl-mfc-shared/cstring-semantics.md
index a61de26071..a8b283511b 100644
--- a/docs/atl-mfc-shared/cstring-semantics.md
+++ b/docs/atl-mfc-shared/cstring-semantics.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CString Semantics"
title: "CString Semantics"
ms.date: "11/04/2016"
helpviewer_keywords: ["semantics in Cstring", "CString objects, assignment semantics", "assignment statements, assigning CString objects"]
diff --git a/docs/atl-mfc-shared/date-and-time.md b/docs/atl-mfc-shared/date-and-time.md
index 88e82534c9..6285d86cb2 100644
--- a/docs/atl-mfc-shared/date-and-time.md
+++ b/docs/atl-mfc-shared/date-and-time.md
@@ -1,34 +1,34 @@
---
+description: "Learn more about: Date and Time"
title: "Date and Time"
ms.date: "08/13/2019"
helpviewer_keywords: ["time, MFC programming", "time", "MFC, date and time", "dates, MFC"]
-ms.assetid: ecf56dc5-d418-4603-ad3e-af7e205a6403
---
# Date and Time
MFC supports several different ways of working with dates and times:
-- Support for the Automation [DATE data type](../atl-mfc-shared/date-type.md). DATE supports date, time, and date/time values. The [COleDateTime](../atl-mfc-shared/reference/coledatetime-class.md) and [COleDateTimeSpan](../atl-mfc-shared/reference/coledatetimespan-class.md) classes encapsulate this functionality. They work with the [COleVariant](../mfc/reference/colevariant-class.md) class using Automation support.
+- Support for the Automation [`DATE` data type](../atl-mfc-shared/date-type.md). `DATE` supports date, time, and date/time values. The [`COleDateTime`](../atl-mfc-shared/reference/coledatetime-class.md) and [`COleDateTimeSpan`](../atl-mfc-shared/reference/coledatetimespan-class.md) classes encapsulate this functionality. They work with the [`COleVariant`](../mfc/reference/colevariant-class.md) class using Automation support.
-- General-purpose time classes. The [CTime](../atl-mfc-shared/reference/ctime-class.md) and [CTimeSpan](../atl-mfc-shared/reference/ctimespan-class.md) classes encapsulate most of the functionality associated with the ANSI-standard time library, which is declared in TIME.H.
+- General-purpose time classes. The [`CTime`](../atl-mfc-shared/reference/ctime-class.md) and [`CTimeSpan`](../atl-mfc-shared/reference/ctimespan-class.md) classes encapsulate most of the functionality associated with the ANSI-standard time library, which is declared in `time.h`.
- Support for system clock. With MFC version 3.0, support was added to `CTime` for the Win32 `SYSTEMTIME` and `FILETIME` data types.
## Date and Time: Automation Support
-The [COleDateTime](../atl-mfc-shared/reference/coledatetime-class.md) class provides a way to represent date and time information. It provides finer granularity and a greater range than the [CTime](../atl-mfc-shared/reference/ctime-class.md) class. The [COleDateTimeSpan](../atl-mfc-shared/reference/coledatetimespan-class.md) class represents elapsed time, such as the difference between two `COleDateTime` objects.
+The [`COleDateTime`](../atl-mfc-shared/reference/coledatetime-class.md) class provides a way to represent date and time information. It provides finer granularity and a greater range than the [`CTime`](../atl-mfc-shared/reference/ctime-class.md) class. The [`COleDateTimeSpan`](../atl-mfc-shared/reference/coledatetimespan-class.md) class represents elapsed time, such as the difference between two `COleDateTime` objects.
-The `COleDateTime` and `COleDateTimeSpan` classes are designed for use with the `COleVariant` class. `COleDateTime` and `COleDateTimeSpan` are also useful in MFC database programming, but they can be used whenever you want to manipulate date and time values. Although the `COleDateTime` class has a greater range of values and finer granularity than the `CTime` class, it requires more storage per object than `CTime`. There are also some special considerations when working with the underlying DATE type. For more information on the implementation of DATE, see [The DATE Type](../atl-mfc-shared/date-type.md).
+The `COleDateTime` and `COleDateTimeSpan` classes are designed for use with the `COleVariant` class. `COleDateTime` and `COleDateTimeSpan` are also useful in MFC database programming, but they can be used whenever you want to manipulate date and time values. Although the `COleDateTime` class has a greater range of values and finer granularity than the `CTime` class, it requires more storage per object than `CTime`. There are also some special considerations when working with the underlying DATE type. For more information on the implementation of `DATE`, see [The `DATE` Type](../atl-mfc-shared/date-type.md).
-`COleDateTime` objects can be used to represent dates between January 1, 100, and December 31, 9999. `COleDateTime` objects are floating point values, with an approximate resolution of 1 millisecond. `COleDateTime` is based on the DATE data type, defined in the MFC documentation under [COleDateTime::operator DATE](../atl-mfc-shared/reference/coledatetime-class.md#operator_date). The actual implementation of DATE extends beyond these bounds. The `COleDateTime` implementation imposes these bounds to make it easier to work with the class.
+`COleDateTime` objects can be used to represent dates between January 1, 100, and December 31, 9999. `COleDateTime` objects are floating point values, with an approximate resolution of 1 millisecond. `COleDateTime` is based on the `DATE` data type, defined in the MFC documentation under [`COleDateTime::operator DATE`](../atl-mfc-shared/reference/coledatetime-class.md#operator_date). The actual implementation of `DATE` extends beyond these bounds. The `COleDateTime` implementation imposes these bounds to make it easier to work with the class.
`COleDateTime` doesn't support Julian dates. The Gregorian calendar is assumed to extend back in time to January 1, 100.
`COleDateTime` ignores Daylight Saving Time (DST). The following code example compares two methods of calculating a time span that crosses the DST switchover date: one using the CRT, and the other using `COleDateTime`.
-The first method sets two `CTime` objects, *time1* and *time2*, to April 5 and April 6 respectively, using the standard C type structures `tm` and `time_t`. The code displays *time1* and *time2* and the time span between them.
+The first method sets two `CTime` objects, *`time1`* and *`time2`*, to April 5 and April 6 respectively, using the standard C type structures `tm` and `time_t`. The code displays *`time1`* and *`time2`* and the time span between them.
-The second method creates two `COleDateTime` objects, `oletime1` and `oletime2`, and sets them to the same dates as *time1* and *time2*. It displays `oletime1` and `oletime2` and the time span between them.
+The second method creates two `COleDateTime` objects, `oletime1` and `oletime2`, and sets them to the same dates as *`time1`* and *`time2`*. It displays `oletime1` and `oletime2` and the time span between them.
The CRT correctly calculates a difference of 23 hours. `COleDateTimeSpan` calculates a difference of 24 hours.
@@ -68,21 +68,21 @@ This procedure shows how to calculate the difference between two `COleDateTime`
#### To format a time
-Use the `Format` member function of either [COleDateTime](../atl-mfc-shared/reference/coledatetime-class.md) or [COleDateTimeSpan](../atl-mfc-shared/reference/coledatetimespan-class.md) to create a character string representing the time or elapsed time.
+Use the `Format` member function of either [`COleDateTime`](../atl-mfc-shared/reference/coledatetime-class.md) or [`COleDateTimeSpan`](../atl-mfc-shared/reference/coledatetimespan-class.md) to create a character string representing the time or elapsed time.
[!code-cpp[NVC_ATLMFC_Utilities#179](../atl-mfc-shared/codesnippet/cpp/formatting-time-automation-classes_1.cpp)]
-For more information, see class [COleVariant](../mfc/reference/colevariant-class.md).
+For more information, see class [`COleVariant`](../mfc/reference/colevariant-class.md).
## Date and Time: Database Support
-Starting in version 4.0, MFC database programming uses the [COleDateTime](../atl-mfc-shared/reference/coledatetime-class.md) and [COleDateTimeSpan](../atl-mfc-shared/reference/coledatetimespan-class.md) classes to represent date and time data. These classes, also used in Automation, are derived from class [COleVariant](../mfc/reference/colevariant-class.md). They supply better support for managing date and time data than do [CTime](../atl-mfc-shared/reference/ctime-class.md) and [CTimeSpan](../atl-mfc-shared/reference/ctimespan-class.md).
+Starting in version 4.0, MFC database programming uses the [`COleDateTime`](../atl-mfc-shared/reference/coledatetime-class.md) and [`COleDateTimeSpan`](../atl-mfc-shared/reference/coledatetimespan-class.md) classes to represent date and time data. These classes, also used in Automation, are derived from class [`COleVariant`](../mfc/reference/colevariant-class.md). They supply better support for managing date and time data than do [`CTime`](../atl-mfc-shared/reference/ctime-class.md) and [`CTimeSpan`](../atl-mfc-shared/reference/ctimespan-class.md).
-## Date and Time: SYSTEMTIME Support
+## Date and Time: `SYSTEMTIME` Support
-The [COleDateTime](../atl-mfc-shared/reference/coledatetime-class.md) class has constructors that accept system and file times from Win32.
+The [`COleDateTime`](../atl-mfc-shared/reference/coledatetime-class.md) class has constructors that accept system and file times from Win32.
-The Win32 `FILETIME` structure represents time as a 64-bit value. It's a more convenient format for internal storage than a `SYSTEMTIME` structure, and the format used by Win32 to represent the time of file creation. For information about the SYSTEMTIME structure, see [SYSTEMTIME](/windows/desktop/api/minwinbase/ns-minwinbase-systemtime). For information about the FILETIME structure, see [FILETIME](/windows/desktop/api/minwinbase/ns-minwinbase-filetime).
+The Win32 `FILETIME` structure represents time as a 64-bit value. It's a more convenient format for internal storage than a `SYSTEMTIME` structure, and the format used by Win32 to represent the time of file creation. For information about the `SYSTEMTIME` structure, see [`SYSTEMTIME`](/windows/desktop/api/minwinbase/ns-minwinbase-systemtime). For information about the `FILETIME` structure, see [`FILETIME`](/windows/desktop/api/minwinbase/ns-minwinbase-filetime).
## See also
diff --git a/docs/atl-mfc-shared/date-type.md b/docs/atl-mfc-shared/date-type.md
index 3bd88a5be5..51909869c5 100644
--- a/docs/atl-mfc-shared/date-type.md
+++ b/docs/atl-mfc-shared/date-type.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: DATE Type"
title: "DATE Type"
ms.date: "11/04/2016"
f1_keywords: ["DATE"]
@@ -49,7 +50,7 @@ The following points should be noted when working with these date and time forma
> [!CAUTION]
> Note that because 6:00 AM is always represented by a fractional value 0.25 regardless of whether the integer representing the day is positive (after December 30, 1899) or negative (before December 30, 1899), a simple floating point comparison would erroneously sort any DATE representing 6:00 AM on a day earlier than 12/30/1899 as *later* than a DATE representing 7:00 AM on that same day.
-More information on issues related to the DATE and `COleDateTime` types can be found under [COleDateTime Class](../atl-mfc-shared/reference/coledatetime-class.md) and [Date and Time: Automation Support](../atl-mfc-shared/date-and-time-automation-support.md).
+More information on issues related to the DATE and `COleDateTime` types can be found under [COleDateTime Class](../atl-mfc-shared/reference/coledatetime-class.md) and [Date and Time: Automation Support](./date-and-time.md).
## See also
diff --git a/docs/atl-mfc-shared/exporting-string-classes-using-cstringt.md b/docs/atl-mfc-shared/exporting-string-classes-using-cstringt.md
index 8c4959aa0e..3e5b794a88 100644
--- a/docs/atl-mfc-shared/exporting-string-classes-using-cstringt.md
+++ b/docs/atl-mfc-shared/exporting-string-classes-using-cstringt.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Exporting String Classes Using CStringT"
title: "Exporting String Classes Using CStringT"
ms.date: "11/04/2016"
helpviewer_keywords: ["CStringT class, exporting strings"]
@@ -26,7 +27,7 @@ To resolve this problem, do the following:
Export `CStringA` and `CStringW` (and the necessary base classes) from MFC90.DLL. Projects that include MFC will always use the MFC DLL exported `CStringA` and `CStringW`, as in previous MFC implementations.
-Then create a exportable derived class using the `CStringT` template, as `CStringT_Exported` is below, for example:
+Then create an exportable derived class using the `CStringT` template, as `CStringT_Exported` is below, for example:
[!code-cpp[NVC_MFC_DLL#7](../atl-mfc-shared/codesnippet/cpp/exporting-string-classes-using-cstringt_2.cpp)]
diff --git a/docs/atl-mfc-shared/implementation-of-a-custom-string-manager-advanced-method.md b/docs/atl-mfc-shared/implementation-of-a-custom-string-manager-advanced-method.md
index cd9845f74a..55fe40e157 100644
--- a/docs/atl-mfc-shared/implementation-of-a-custom-string-manager-advanced-method.md
+++ b/docs/atl-mfc-shared/implementation-of-a-custom-string-manager-advanced-method.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Implementation of a Custom String Manager (Advanced Method)"
title: "Implementation of a Custom String Manager (Advanced Method)"
ms.date: "11/04/2016"
helpviewer_keywords: ["IAtlStringMgr class, using"]
diff --git a/docs/atl-mfc-shared/implementation-of-a-custom-string-manager-basic-method.md b/docs/atl-mfc-shared/implementation-of-a-custom-string-manager-basic-method.md
index 898169ad67..2e91251aaa 100644
--- a/docs/atl-mfc-shared/implementation-of-a-custom-string-manager-basic-method.md
+++ b/docs/atl-mfc-shared/implementation-of-a-custom-string-manager-basic-method.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Implementation of a Custom String Manager (Basic Method)"
title: "Implementation of a Custom String Manager (Basic Method)"
ms.date: "11/04/2016"
helpviewer_keywords: ["IAtlStringMgr class, using"]
diff --git a/docs/atl-mfc-shared/memory-management-with-cstringt.md b/docs/atl-mfc-shared/memory-management-with-cstringt.md
index 4ae642651b..c0df6f2ceb 100644
--- a/docs/atl-mfc-shared/memory-management-with-cstringt.md
+++ b/docs/atl-mfc-shared/memory-management-with-cstringt.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Memory Management with CStringT"
title: "Memory Management with CStringT"
ms.date: "11/04/2016"
helpviewer_keywords: ["CString objects, memory management", "memory [C++], usage", "IAtlStringMgr class, using", "strings [C++], custom memory management", "CFixedStringT class, description of", "strings [C++], memory management", "CStringT class, memory management"]
diff --git a/docs/atl-mfc-shared/reference/cfiletime-class.md b/docs/atl-mfc-shared/reference/cfiletime-class.md
index e3b94df1ff..35d7d8dc48 100644
--- a/docs/atl-mfc-shared/reference/cfiletime-class.md
+++ b/docs/atl-mfc-shared/reference/cfiletime-class.md
@@ -1,99 +1,100 @@
---
-title: "CFileTime Class"
+description: "Learn more about: CFileTime class"
+title: "CFileTime class"
ms.date: "10/18/2018"
f1_keywords: ["CFileTime", "ATLTIME/ATL::CFileTime", "ATLTIME/ATL::CFileTime::CFileTime", "ATLTIME/ATL::CFileTime::GetCurrentTime", "ATLTIME/ATL::CFileTime::GetTime", "ATLTIME/ATL::CFileTime::LocalToUTC", "ATLTIME/ATL::CFileTime::SetTime", "ATLTIME/ATL::CFileTime::UTCToLocal", "ATLTIME/ATL::CFileTime::Day", "ATLTIME/ATL::CFileTime::Hour", "ATLTIME/ATL::CFileTime::Millisecond", "ATLTIME/ATL::CFileTime::Minute", "ATLTIME/ATL::CFileTime::Second", "ATLTIME/ATL::CFileTime::Week"]
helpviewer_keywords: ["CFileTime class", "shared classes, CFileTime"]
ms.assetid: 1a358a65-1383-4124-b0d4-59b026e6860f
---
-# CFileTime Class
+# `CFileTime` class
This class provides methods for managing the date and time values associated with a file.
## Syntax
-```
+```cpp
class CFileTime : public FILETIME
```
## Members
-### Public Constructors
-
-|Name|Description|
-|----------|-----------------|
-|[CFileTime::CFileTime](#cfiletime)|The constructor.|
-
-### Public Methods
-
-|Name|Description|
-|----------|-----------------|
-|[CFileTime::GetCurrentTime](#getcurrenttime)|Call this static function to retrieve a `CFileTime` object that represents the current system date and time.|
-|[CFileTime::GetTime](#gettime)|Call this method to retrieve the time from the `CFileTime` object.|
-|[CFileTime::LocalToUTC](#localtoutc)|Call this method to convert a local file time to a file time based on the Coordinated Universal Time (UTC).|
-|[CFileTime::SetTime](#settime)|Call this method to set the date and time stored by the `CFileTime` object.|
-|[CFileTime::UTCToLocal](#utctolocal)|Call this method to convert time based on the Coordinated Universal Time (UTC) to local file time.|
-
-### Public Operators
-
-|Name|Description|
-|----------|-----------------|
-|[CFileTime::operator -](#operator_-)|This operator is used to perform subtraction on a `CFileTime` or `CFileTimeSpan` object.|
-|[CFileTime::operator !=](#operator_neq)|This operator compares two `CFileTime` objects for inequality.|
-|[CFileTime::operator +](#operator_add)|This operator is used to perform addition on a `CFileTimeSpan` object.|
-|[CFileTime::operator +=](#operator_add_eq)|This operator is used to perform addition on a `CFileTimeSpan` object and assign the result to the current object.|
-|[CFileTime::operator <](#operator_lt)|This operator compares two `CFileTime` objects to determine the lesser.|
-|[CFileTime::operator <=](#operator_lt_eq)|This operator compares two `CFileTime` objects to determine equality or the lesser.|
-|[CFileTime::operator =](#operator_eq)|The assignment operator.|
-|[CFileTime::operator -=](#operator_-_eq)|This operator is used to perform subtraction on a `CFileTimeSpan` object and assign the result to the current object.|
-|[CFileTime::operator ==](#operator_eq_eq)|This operator compares two `CFileTime` objects for equality.|
-|[CFileTime::operator >](#operator_gt)|This operator compares two `CFileTime` objects to determine the larger.|
-|[CFileTime::operator >=](#operator_gt_eq)|This operator compares two `CFileTime` objects to determine equality or the larger.|
-
-### Public Constants
-
-|Name|Description|
-|----------|-----------------|
-|[CFileTime::Day](#day)|A static data member storing the number of 100-nanosecond intervals that make up one day.|
-|[CFileTime::Hour](#hour)|A static data member storing the number of 100-nanosecond intervals that make up one hour.|
-|[CFileTime::Millisecond](#millisecond)|A static data member storing the number of 100-nanosecond intervals that make up one millisecond.|
-|[CFileTime::Minute](#minute)|A static data member storing the number of 100-nanosecond intervals that make up one minute.|
-|[CFileTime::Second](#second)|A static data member storing the number of 100-nanosecond intervals that make up one second.|
-|[CFileTime::Week](#week)|A static data member storing the number of 100-nanosecond intervals that make up one week.|
+### Public constructors
+
+| Name | Description |
+|--|--|
+| [`CFileTime::CFileTime`](#cfiletime) | The constructor. |
+
+### Public methods
+
+| Name | Description |
+|--|--|
+| [`CFileTime::GetCurrentTime`](#getcurrenttime) | Call this static function to retrieve a `CFileTime` object that represents the current system date and time. |
+| [`CFileTime::GetTime`](#gettime) | Call this method to retrieve the time from the `CFileTime` object. |
+| [`CFileTime::LocalToUTC`](#localtoutc) | Call this method to convert a local file time to a file time based on the Coordinated Universal Time (UTC). |
+| [`CFileTime::SetTime`](#settime) | Call this method to set the date and time stored by the `CFileTime` object. |
+| [`CFileTime::UTCToLocal`](#utctolocal) | Call this method to convert time based on the Coordinated Universal Time (UTC) to local file time. |
+
+### Public operators
+
+| Name | Description |
+|--|--|
+| [`CFileTime::operator -`](#operator_-) | This operator is used to perform subtraction on a `CFileTime` or `CFileTimeSpan` object. |
+| [`CFileTime::operator !=`](#operator_neq) | This operator compares two `CFileTime` objects for inequality. |
+| [`CFileTime::operator +`](#operator_add) | This operator is used to perform addition on a `CFileTimeSpan` object. |
+| [`CFileTime::operator +=`](#operator_add_eq) | This operator is used to perform addition on a `CFileTimeSpan` object and assign the result to the current object. |
+| [`CFileTime::operator <`](#operator_lt) | This operator compares two `CFileTime` objects to determine the lesser. |
+| [`CFileTime::operator <=`](#operator_lt_eq) | This operator compares two `CFileTime` objects to determine equality or the lesser. |
+| [`CFileTime::operator =`](#operator_eq) | The assignment operator. |
+| [`CFileTime::operator -=`](#operator_-_eq) | This operator is used to perform subtraction on a `CFileTimeSpan` object and assign the result to the current object. |
+| [`CFileTime::operator ==`](#operator_eq_eq) | This operator compares two `CFileTime` objects for equality. |
+| [`CFileTime::operator >`](#operator_gt) | This operator compares two `CFileTime` objects to determine the larger. |
+| [`CFileTime::operator >=`](#operator_gt_eq) | This operator compares two `CFileTime` objects to determine equality or the larger. |
+
+### Public constants
+
+| Name | Description |
+|--|--|
+| [`CFileTime::Day`](#day) | A static data member storing the number of 100-nanosecond intervals that make up one day. |
+| [`CFileTime::Hour`](#hour) | A static data member storing the number of 100-nanosecond intervals that make up one hour. |
+| [`CFileTime::Millisecond`](#millisecond) | A static data member storing the number of 100-nanosecond intervals that make up one millisecond. |
+| [`CFileTime::Minute`](#minute) | A static data member storing the number of 100-nanosecond intervals that make up one minute. |
+| [`CFileTime::Second`](#second) | A static data member storing the number of 100-nanosecond intervals that make up one second. |
+| [`CFileTime::Week`](#week) | A static data member storing the number of 100-nanosecond intervals that make up one week. |
## Remarks
-This class provides methods for managing the date and time values associated with the creation, access and modification of files. The methods and data of this class are frequently used in conjunction with `CFileTimeSpan` objects, which deal with relative time values.
+This class provides methods for managing the date and time values associated with the creation, access, and modification of files. The methods and data of this class are frequently used together with `CFileTimeSpan` objects, which deal with relative time values.
-The date and time value is stored as a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601. This is the Coordinated Universal Time (UTC) format.
+The date and time value is stored as a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601. This format is the Coordinated Universal Time (UTC) format.
The following static const member variables are provided to simplify calculations:
-|Member variable|Number of 100-nanosecond intervals|
-|---------------------|-----------------------------------------|
-|Millisecond|10,000|
-|Second|Millisecond \* 1,000|
-|Minute|Second \* 60|
-|Hour|Minute \* 60|
-|Day|Hour \* 24|
-|Week|Day \* 7|
-
-**Note** Not all file systems can record creation and last access time and not all file systems record them in the same manner. For example, on the Windows NT FAT file system, create time has a resolution of 10 milliseconds, write time has a resolution of 2 seconds, and access time has a resolution of 1 day (the access date). On NTFS, access time has a resolution of 1 hour. Furthermore, FAT records times on disk in local time, but NTFS records times on disk in UTC. For more information, see [File Times](/windows/win32/SysInfo/file-times).
+| Member variable | Number of 100-nanosecond intervals |
+|--|--|
+| Millisecond | 10,000 |
+| Second | Millisecond \* 1,000 |
+| Minute | Second \* 60 |
+| Hour | Minute \* 60 |
+| Day | Hour \* 24 |
+| Week | Day \* 7 |
-## Inheritance Hierarchy
+> [!Note]
+> Not all file systems can record creation and last access time and not all file systems record them in the same manner. For example, on the Windows NT FAT file system, create time has a resolution of 10 milliseconds, write time has a resolution of 2 seconds, and access time has a resolution of 1 day (the access date). On NTFS, access time has a resolution of 1 hour. Furthermore, FAT records times on disk in local time, but NTFS records times on disk in UTC. For more information, see [File times](/windows/win32/SysInfo/file-times).
-`FILETIME`
+## Inheritance hierarchy
-`CFileTime`
+[`FILETIME`](/windows/win32/api/minwinbase/ns-minwinbase-filetime)\
+ └ [`CFileTime`](cfiletime-class.md)
## Requirements
**Header:** atltime.h
-## CFileTime::CFileTime
+## `CFileTime::CFileTime`
The constructor.
-```
+```cpp
CFileTime() throw();
CFileTime(const FILETIME& ft) throw();
CFileTime(ULONGLONG nTime) throw();
@@ -101,37 +102,37 @@ CFileTime(ULONGLONG nTime) throw();
### Parameters
-*ft*
-A [FILETIME](/windows/win32/api/minwinbase/ns-minwinbase-filetime) structure.
+*`ft`*\
+A [`FILETIME`](/windows/win32/api/minwinbase/ns-minwinbase-filetime) structure.
-*nTime*
+*`nTime`*\
The date and time expressed as a 64-bit value.
### Remarks
The `CFileTime` object can be created using an existing date and time from a `FILETIME` structure, or expressed as a 64-bit value (in local or Coordinated Universal Time (UTC) time formats). The default constructor sets the time to 0.
-## CFileTime::Day
+## `CFileTime::Day`
A static data member storing the number of 100-nanosecond intervals that make up one day.
-```
+```cpp
static const ULONGLONG Day = Hour* 24;
```
### Example
-See the example for [CFileTime::Millisecond](#millisecond).
+See the example for [`CFileTime::Millisecond`](#millisecond).
-## CFileTime::GetCurrentTime
+## `CFileTime::GetCurrentTime`
Call this static function to retrieve a `CFileTime` object that represents the current system date and time.
-```
+```cpp
static CFileTime GetCurrentTime() throw();
```
-### Return Value
+### Return value
Returns the current system date and time in Coordinated Universal Time (UTC) format.
@@ -139,51 +140,51 @@ Returns the current system date and time in Coordinated Universal Time (UTC) for
[!code-cpp[NVC_MFCFiles#41](../../atl-mfc-shared/reference/codesnippet/cpp/cfiletime-class_1.cpp)]
-## CFileTime::GetTime
+## `CFileTime::GetTime`
Call this method to retrieve the time from the `CFileTime` object.
-```
+```cpp
ULONGLONG GetTime() const throw();
```
-### Return Value
+### Return value
Returns the date and time as a 64-bit number, which may be in either local or Coordinated Universal Time (UTC) format.
-## CFileTime::Hour
+## `CFileTime::Hour`
A static data member storing the number of 100-nanosecond intervals that make up one hour.
-```
+```cpp
static const ULONGLONG Hour = Minute* 60;
```
### Example
-See the example for [CFileTime::Millisecond](#millisecond).
+See the example for [`CFileTime::Millisecond`](#millisecond).
-## CFileTime::LocalToUTC
+## `CFileTime::LocalToUTC`
Call this method to convert a local file time to a file time based on the Coordinated Universal Time (UTC).
-```
+```cpp
CFileTime LocalToUTC() const throw();
```
-### Return Value
+### Return value
Returns a `CFileTime` object containing the time in UTC format.
### Example
-See the example for [CFileTime::UTCToLocal](#utctolocal).
+See the example for [`CFileTime::UTCToLocal`](#utctolocal).
-## CFileTime::Millisecond
+## `CFileTime::Millisecond`
A static data member storing the number of 100-nanosecond intervals that make up one millisecond.
-```
+```cpp
static const ULONGLONG Millisecond = 10000;
```
@@ -191,226 +192,226 @@ static const ULONGLONG Millisecond = 10000;
[!code-cpp[NVC_MFCFiles#44](../../atl-mfc-shared/reference/codesnippet/cpp/cfiletime-class_2.cpp)]
-## CFileTime::Minute
+## `CFileTime::Minute`
A static data member storing the number of 100-nanosecond intervals that make up one minute.
-```
+```cpp
static const ULONGLONG Minute = Second* 60;
```
### Example
-See the example for [CFileTime::Millisecond](#millisecond).
+See the example for [`CFileTime::Millisecond`](#millisecond).
-## CFileTime::operator -
+## `CFileTime::operator -`
This operator is used to perform subtraction on a `CFileTime` or `CFileTimeSpan` object.
-```
+```cpp
CFileTime operator-(CFileTimeSpan span) const throw();
CFileTimeSpan operator-(CFileTime ft) const throw();
```
### Parameters
-*span*
+*`span`*\
A `CFileTimeSpan` object.
-*ft*
+*`ft`*\
A `CFileTime` object.
-### Return Value
+### Return value
Returns a `CFileTime` object or a `CFileTimeSpan` object representing the result of the time difference between the two objects.
-## CFileTime::operator !=
+## `CFileTime::operator !=`
This operator compares two `CFileTime` objects for inequality.
-```
+```cpp
bool operator!=(CFileTime ft) const throw();
```
### Parameters
-*ft*
+*`ft`*\
The `CFileTime` object to be compared.
-### Return Value
+### Return value
-Returns TRUE if the item being compared is not equal to the `CFileTime` object, otherwise FALSE.
+Returns `TRUE` if the item being compared isn't equal to the `CFileTime` object, otherwise `FALSE`.
-## CFileTime::operator +
+## `CFileTime::operator +`
This operator is used to perform addition on a `CFileTimeSpan` object.
-```
+```cpp
CFileTime operator+(CFileTimeSpan span) const throw();
```
### Parameters
-*span*
+*`span`*\
A `CFileTimeSpan` object.
-### Return Value
+### Return value
Returns a `CFileTime` object representing the result of the original time plus a relative time.
-## CFileTime::operator +=
+## `CFileTime::operator +=`
This operator is used to perform addition on a `CFileTimeSpan` object and assign the result to the current object.
-```
+```cpp
CFileTime& operator+=(CFileTimeSpan span) throw();
```
### Parameters
-*span*
+*`span`*\
A `CFileTimeSpan` object.
-### Return Value
+### Return value
Returns the updated `CFileTime` object, representing the result of the original time plus a relative time.
-## CFileTime::operator <
+## `CFileTime::operator <`
This operator compares two `CFileTime` objects to determine the lesser.
-```
+```cpp
bool operator<(CFileTime ft) const throw();
```
### Parameters
-*ft*
+*`ft`*\
The `CFileTime` object to be compared.
-### Return Value
+### Return value
-Returns TRUE if the first object is less (earlier in time) than the second, FALSE otherwise.
+Returns `TRUE` if the first object is less (earlier in time) than the second, `FALSE` otherwise.
### Example
[!code-cpp[NVC_MFCFiles#43](../../atl-mfc-shared/reference/codesnippet/cpp/cfiletime-class_3.cpp)]
-## CFileTime::operator <=
+## `CFileTime::operator <>=`
This operator compares two `CFileTime` objects to determine equality or the lesser.
-```
+```cpp
bool operator<=(CFileTime ft) const throw();
```
### Parameters
-*ft*
+*`ft`*\
The `CFileTime` object to be compared.
-### Return Value
+### Return value
-Returns TRUE if the first object is less than (earlier in time) or equal to the second, otherwise FALSE.
+Returns `TRUE` if the first object is less than (earlier in time) or equal to the second, otherwise `FALSE`.
-## CFileTime::operator =
+## `CFileTime::operator =`
The assignment operator.
-```
+```cpp
CFileTime& operator=(const FILETIME& ft) throw();
```
### Parameters
-*ft*
+*`ft`*\
A `CFileTime` object containing the new time and date.
-### Return Value
+### Return value
Returns the updated `CFileTime` object.
-## CFileTime::operator -=
+## `CFileTime::operator -=`
This operator is used to perform subtraction on a `CFileTimeSpan` object and assign the result to the current object.
-```
+```cpp
CFileTime& operator-=(CFileTimeSpan span) throw();
```
### Parameters
-*span*
+*`span`*\
A `CFileTimeSpan` object containing the relative time to subtract.
-### Return Value
+### Return value
Returns the updated `CFileTime` object.
-## CFileTime::operator ==
+## `CFileTime::operator ==`
This operator compares two `CFileTime` objects for equality.
-```
+```cpp
bool operator==(CFileTime ft) const throw();
```
### Parameters
-*ft*
+*`ft`*\
The `CFileTime` object to compare.
-### Return Value
+### Return value
-Returns TRUE if the objects are equal, otherwise FALSE.
+Returns `TRUE` if the objects are equal, otherwise `FALSE`.
-## CFileTime::operator >
+## `CFileTime::operator >`
This operator compares two `CFileTime` objects to determine the larger.
-```
+```cpp
bool operator>(CFileTime ft) const throw();
```
### Parameters
-*ft*
+*`ft`*\
The `CFileTime` object to be compared.
-### Return Value
+### Return value
-Returns TRUE if the first object is greater than (later in time) than the second, otherwise FALSE.
+Returns `TRUE` if the first object is greater than (later in time) than the second, otherwise `FALSE`.
-## CFileTime::operator >=
+## `CFileTime::operator >=`
This operator compares two `CFileTime` objects to determine equality or the larger.
-```
+```cpp
bool operator>=(CFileTime ft) const throw();
```
### Parameters
-*ft*
+*`ft`*\
The `CFileTime` object to be compared.
-### Return Value
+### Return value
-Returns TRUE if the first object is greater than (later in time) or equal to the second, otherwise FALSE.
+Returns `TRUE` if the first object is greater than (later in time) or equal to the second, otherwise `FALSE`.
-## CFileTime::Second
+## `CFileTime::Second`
A static data member storing the number of 100-nanosecond intervals that make up one day.
-```
+```cpp
static const ULONGLONG Second = Millisecond* 1000;
```
### Example
-See the example for [CFileTime::Millisecond](#millisecond).
+See the example for [`CFileTime::Millisecond`](#millisecond).
-## CFileTime::SetTime
+## `CFileTime::SetTime`
Call this method to set the date and time stored by the `CFileTime` object.
@@ -420,18 +421,18 @@ void SetTime(ULONGLONG nTime) throw();
### Parameters
-*nTime*
+*`nTime`*\
The 64-bit value representing the date and time, in either local or Coordinated Universal Time (UTC) format.
-## CFileTime::UTCToLocal
+## `CFileTime::UTCToLocal`
Call this method to convert time based on the Coordinated Universal Time (UTC) to local file time.
-```
+```cpp
CFileTime UTCToLocal() const throw();
```
-### Return Value
+### Return value
Returns a `CFileTime` object containing the time in local file time format.
@@ -439,21 +440,21 @@ Returns a `CFileTime` object containing the time in local file time format.
[!code-cpp[NVC_MFCFiles#42](../../atl-mfc-shared/reference/codesnippet/cpp/cfiletime-class_4.cpp)]
-## CFileTime::Week
+## `CFileTime::Week`
A static data member storing the number of 100-nanosecond intervals that make up one week.
-```
+```cpp
static const ULONGLONG Week = Day* 7;
```
### Example
-See the example for [CFileTime::Millisecond](#millisecond).
+See the example for [`CFileTime::Millisecond`](#millisecond).
## See also
-[FILETIME](/windows/win32/api/minwinbase/ns-minwinbase-filetime)
-[CFileTimeSpan Class](../../atl-mfc-shared/reference/cfiletimespan-class.md)
-[Hierarchy Chart](../../mfc/hierarchy-chart.md)
-[ATL/MFC Shared Classes](../../atl-mfc-shared/atl-mfc-shared-classes.md)
+[`FILETIME`](/windows/win32/api/minwinbase/ns-minwinbase-filetime)\
+[`CFileTimeSpan` class](../../atl-mfc-shared/reference/cfiletimespan-class.md)\
+[Hierarchy chart](../../mfc/hierarchy-chart.md)\
+[ATL/MFC shared classes](../../atl-mfc-shared/atl-mfc-shared-classes.md)
diff --git a/docs/atl-mfc-shared/reference/cfiletimespan-class.md b/docs/atl-mfc-shared/reference/cfiletimespan-class.md
index 144bb6a723..62a26f382e 100644
--- a/docs/atl-mfc-shared/reference/cfiletimespan-class.md
+++ b/docs/atl-mfc-shared/reference/cfiletimespan-class.md
@@ -6,7 +6,7 @@ f1_keywords: ["CFileTimeSpan", "ATLTIME/ATL::CFileTimeSpan", "ATLTIME/ATL::CFile
helpviewer_keywords: ["shared classes, CFileTimeSpan", "CFileTimeSpan class"]
ms.assetid: 5856fb39-9c82-4027-8ccf-8760890491ec
---
-# CFileTimeSpan class
+# `CFileTimeSpan` class
This class provides methods for managing relative date and time values associated with a file.
@@ -22,44 +22,44 @@ class CFileTimeSpan
|Name|Description|
|----------|-----------------|
-|[CFileTimeSpan::CFileTimeSpan](#cfiletimespan)|The constructor.|
+|[`CFileTimeSpan::CFileTimeSpan`](#cfiletimespan)|The constructor.|
### Public methods
|Name|Description|
|----------|-----------------|
-|[CFileTimeSpan::GetTimeSpan](#gettimespan)|Call this method to retrieve the time span from the `CFileTimeSpan` object.|
-|[CFileTimeSpan::SetTimeSpan](#settimespan)|Call this method to set the time span of the `CFileTimeSpan` object.|
+|[`CFileTimeSpan::GetTimeSpan`](#gettimespan)|Call this method to retrieve the time span from the `CFileTimeSpan` object.|
+|[`CFileTimeSpan::SetTimeSpan`](#settimespan)|Call this method to set the time span of the `CFileTimeSpan` object.|
### Public operators
|Name|Description|
|----------|-----------------|
-|[CFileTimeSpan::operator -](#operator_-)|Performs subtraction on a `CFileTimeSpan` object.|
-|[CFileTimeSpan::operator !=](#operator_neq)|Compares two `CFileTimeSpan` objects for inequality.|
-|[CFileTimeSpan::operator +](#operator_add)|Performs addition on a `CFileTimeSpan` object.|
-|[CFileTimeSpan::operator +=](#operator_add_eq)|Performs addition on a `CFileTimeSpan` object and assign the result to the current object.|
-|[CFileTimeSpan::operator <](#operator_lt)|Compares two `CFileTimeSpan` objects to determine the lesser.|
-|[CFileTimeSpan::operator <=](#operator_lt_eq)|Compares two `CFileTimeSpan` objects to determine equality or the lesser.|
-|[CFileTimeSpan::operator =](#operator_eq)|The assignment operator.|
-|[CFileTimeSpan::operator -=](#operator_-_eq)|Performs subtraction on a `CFileTimeSpan` object and assign the result to the current object.|
-|[CFileTimeSpan::operator ==](#operator_eq_eq)|Compares two `CFileTimeSpan` objects for equality.|
-|[CFileTimeSpan::operator >](#operator_gt)|Compares two `CFileTimeSpan` objects to determine the larger.|
-|[CFileTimeSpan::operator >=](#operator_gt_eq)|Compares two `CFileTimeSpan` objects to determine equality or the larger.|
+|[`CFileTimeSpan::operator -`](#operator_-)|Performs subtraction on a `CFileTimeSpan` object.|
+|[`CFileTimeSpan::operator !=`](#operator_neq)|Compares two `CFileTimeSpan` objects for inequality.|
+|[`CFileTimeSpan::operator +`](#operator_add)|Performs addition on a `CFileTimeSpan` object.|
+|[`CFileTimeSpan::operator +=`](#operator_add_eq)|Performs addition on a `CFileTimeSpan` object and assign the result to the current object.|
+|[`CFileTimeSpan::operator <`](#operator_lt)|Compares two `CFileTimeSpan` objects to determine the lesser.|
+|[`CFileTimeSpan::operator <=`](#operator_lt_eq)|Compares two `CFileTimeSpan` objects to determine equality or the lesser.|
+|[`CFileTimeSpan::operator =`](#operator_eq)|The assignment operator.|
+|[`CFileTimeSpan::operator -=`](#operator_-_eq)|Performs subtraction on a `CFileTimeSpan` object and assign the result to the current object.|
+|[`CFileTimeSpan::operator ==`](#operator_eq_eq)|Compares two `CFileTimeSpan` objects for equality.|
+|[`CFileTimeSpan::operator >`](#operator_gt)|Compares two `CFileTimeSpan` objects to determine the larger.|
+|[`CFileTimeSpan::operator >=`](#operator_gt_eq)|Compares two `CFileTimeSpan` objects to determine equality or the larger.|
## Remarks
-The `CFileTimeSpan` class provides methods to handle relative periods of time in the units the file system uses. These units are often used in file operations, such as when a file was created, last accessed, or last modified. The methods of this class are frequently used in conjunction with [CFileTime class](../../atl-mfc-shared/reference/cfiletime-class.md) objects.
+The `CFileTimeSpan` class provides methods to handle relative periods of time in the units the file system uses. These units are often used in file operations, such as when a file was created, last accessed, or last modified. The methods of this class are frequently used together with [`CFileTime` class](../../atl-mfc-shared/reference/cfiletime-class.md) objects.
## Example
-See the example for [CFileTime::Millisecond](../../atl-mfc-shared/reference/cfiletime-class.md#millisecond).
+See the example for [`CFileTime::Millisecond`](../../atl-mfc-shared/reference/cfiletime-class.md#millisecond).
## Requirements
**Header:** atltime.h
-## CFileTimeSpan::CFileTimeSpan
+## `CFileTimeSpan::CFileTimeSpan`
The constructor.
@@ -71,17 +71,17 @@ CFileTimeSpan(LONGLONG nSpan) throw();
### Parameters
-*span*\
+*`span`*\
An existing `CFileTimeSpan` object.
-*nSpan*\
-A period of time in FILETIME units.
+*`nSpan`*\
+A period of time in `FILETIME` units.
### Remarks
-The `CFileTimeSpan` object can be created using an existing `CFileTimeSpan` object, or expressed as a 64-bit value in 100-nanosecond FILETIME units. For more information, see [CFileTime](cfiletime-class.md). The default constructor sets the time span to 0.
+The `CFileTimeSpan` object can be created using an existing `CFileTimeSpan` object, or expressed as a 64-bit value in 100-nanosecond `FILETIME` units. For more information, see [`CFileTime`](cfiletime-class.md). The default constructor sets the time span to 0.
-## CFileTimeSpan::GetTimeSpan
+## `CFileTimeSpan::GetTimeSpan`
Call this method to retrieve the time span from the `CFileTimeSpan` object.
@@ -91,9 +91,9 @@ LONGLONG GetTimeSpan() const throw();
### Return value
-Returns the time span in 100-nanosecond FILETIME units. For more information, see [CFileTime](cfiletime-class.md).
+Returns the time span in 100-nanosecond `FILETIME` units. For more information, see [`CFileTime`](cfiletime-class.md).
-## CFileTimeSpan::operator -
+## `CFileTimeSpan::operator -`
Performs subtraction on a `CFileTimeSpan` object.
@@ -103,14 +103,14 @@ CFileTimeSpan operator-(CFileTimeSpan span) const throw();
### Parameters
-*span*\
+*`span`*\
A `CFileTimeSpan` object.
### Return value
Returns a `CFileTimeSpan` object representing the result of the difference between two time spans.
-## CFileTimeSpan::operator !=
+## `CFileTimeSpan::operator !=`
Compares two `CFileTimeSpan` objects for inequality.
@@ -120,14 +120,14 @@ bool operator!=(CFileTimeSpan span) const throw();
### Parameters
-*span*\
+*`span`*\
The `CFileTimeSpan` object to be compared.
### Return value
-Returns TRUE if the item being compared isn't equal to the `CFileTimeSpan` object; otherwise FALSE.
+Returns `TRUE` if the item being compared isn't equal to the `CFileTimeSpan` object; otherwise `FALSE`.
-## CFileTimeSpan::operator +
+## `CFileTimeSpan::operator +`
Performs addition on a `CFileTimeSpan` object.
@@ -137,14 +137,14 @@ CFileTimeSpan operator+(CFileTimeSpan span) const throw();
### Parameters
-*span*\
+*`span`*\
A `CFileTimeSpan` object.
### Return value
Returns a `CFileTimeSpan` object containing the sum of the two time spans.
-## CFileTimeSpan::operator +=
+## `CFileTimeSpan::operator +=`
Performs addition on a `CFileTimeSpan` object and assigns the result to the current object.
@@ -154,14 +154,14 @@ CFileTimeSpan& operator+=(CFileTimeSpan span) throw();
### Parameters
-*span*\
+*`span`*\
A `CFileTimeSpan` object.
### Return value
Returns the updated `CFileTimeSpan` object containing the sum of the two time spans.
-## CFileTimeSpan::operator <
+## `CFileTimeSpan::operator <`
Compares two `CFileTimeSpan` objects to determine the lesser.
@@ -171,14 +171,14 @@ bool operator<(CFileTimeSpan span) const throw();
### Parameters
-*span*\
+*`span`*\
The `CFileTimeSpan` object to be compared.
### Return value
-Returns TRUE if the first object is less (that is, represents a shorter time period) than the second, otherwise FALSE.
+Returns `TRUE` if the first object is less (that is, represents a shorter time period) than the second, otherwise `FALSE`.
-## CFileTimeSpan::operator <=
+## `CFileTimeSpan::operator <=`
Compares two `CFileTimeSpan` objects to determine equality or the lesser.
@@ -188,14 +188,14 @@ bool operator<=(CFileTimeSpan span) const throw();
### Parameters
-*span*\
+*`span`*\
The `CFileTimeSpan` object to be compared.
### Return value
-Returns TRUE if the first object is less than (that is, represents a shorter time period) or equal to the second, otherwise FALSE.
+Returns `TRUE` if the first object is less than (that is, represents a shorter time period) or equal to the second, otherwise `FALSE`.
-## CFileTimeSpan::operator =
+## `CFileTimeSpan::operator =`
The assignment operator.
@@ -205,14 +205,14 @@ CFileTimeSpan& operator=(const CFileTimeSpan& span) throw();
### Parameters
-*span*\
+*`span`*\
A `CFileTimeSpan` object.
### Return value
Returns the updated `CFileTimeSpan` object.
-## CFileTimeSpan::operator -=
+## `CFileTimeSpan::operator -=`
Performs subtraction on a `CFileTimeSpan` object and assigns the result to the current object.
@@ -222,14 +222,14 @@ CFileTimeSpan& operator-=(CFileTimeSpan span) throw();
### Parameters
-*span*\
+*`span`*\
A `CFileTimeSpan` object.
### Return value
Returns the updated `CFileTimeSpan` object.
-## CFileTimeSpan::operator ==
+## `CFileTimeSpan::operator ==`
Compares two `CFileTimeSpan` objects for equality.
@@ -239,14 +239,14 @@ bool operator==(CFileTimeSpan span) const throw();
### Parameters
-*span*\
+*`span`*\
The `CFileTimeSpan` object to be compared.
### Return value
-Returns TRUE if the objects are equal, otherwise FALSE.
+Returns `TRUE` if the objects are equal, otherwise `FALSE`.
-## CFileTimeSpan::operator >
+## `CFileTimeSpan::operator >`
Compares two `CFileTimeSpan` objects to determine the larger.
@@ -256,14 +256,14 @@ bool operator>(CFileTimeSpan span) const throw();
### Parameters
-*span*\
+*`span`*\
The `CFileTimeSpan` object to be compared.
### Return value
-Returns TRUE if the first object is greater than (that is, represents a longer time period) than the second, otherwise FALSE.
+Returns `TRUE` if the first object is greater than (that is, represents a longer time period) than the second, otherwise `FALSE`.
-## CFileTimeSpan::operator >=
+## `CFileTimeSpan::operator >=`
Compares two `CFileTimeSpan` objects to determine equality or the larger.
@@ -273,14 +273,14 @@ bool operator>=(CFileTimeSpan span) const throw();
### Parameters
-*span*\
+*`span`*\
The `CFileTimeSpan` object to be compared.
### Return value
-Returns TRUE if the first object is greater than (that is, represents a longer time period) or equal to the second, otherwise FALSE.
+Returns `TRUE` if the first object is greater than (that is, represents a longer time period) or equal to the second, otherwise `FALSE`.
-## CFileTimeSpan::SetTimeSpan
+## `CFileTimeSpan::SetTimeSpan`
Call this method to set the time span of the `CFileTimeSpan` object.
@@ -290,12 +290,12 @@ void SetTimeSpan(LONGLONG nSpan) throw();
### Parameters
-*nSpan*\
-The new value for the time span in 100-nanosecond FILETIME units. For more information, see [CFileTime](cfiletime-class.md).
+*`nSpan`*\
+The new value for the time span in 100-nanosecond `FILETIME` units. For more information, see [`CFileTime`](cfiletime-class.md).
## See also
-[FILETIME](/windows/win32/api/minwinbase/ns-minwinbase-filetime)\
-[CFileTime class](cfiletime-class.md)\
+[`FILETIME`](/windows/win32/api/minwinbase/ns-minwinbase-filetime)\
+[`CFileTime` class](cfiletime-class.md)\
[Hierarchy chart](../../mfc/hierarchy-chart.md)\
[ATL/MFC shared classes](../../atl-mfc-shared/atl-mfc-shared-classes.md)
diff --git a/docs/atl-mfc-shared/reference/cfixedstringt-class.md b/docs/atl-mfc-shared/reference/cfixedstringt-class.md
index 5ddf71a9c3..c236dcb8d4 100644
--- a/docs/atl-mfc-shared/reference/cfixedstringt-class.md
+++ b/docs/atl-mfc-shared/reference/cfixedstringt-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CFixedStringT Class"
title: "CFixedStringT Class"
ms.date: "03/27/2019"
f1_keywords: ["CFixedStringT", "CSTRINGT/ATL::CFixedStringT", "CSTRINGT/ATL::CFixedStringT::CFixedStringT"]
@@ -11,7 +12,7 @@ This class represents a string object with a fixed character buffer.
## Syntax
-```
+```cpp
template
class CFixedStringT : private CFixedStringMgr, public StringType
```
@@ -68,7 +69,7 @@ For more information on the customization of `CFixedStringT` and memory manageme
Constructs a `CFixedStringT` object.
-```
+```cpp
CFixedStringT() throw();
explicit CFixedStringT(IAtlStringMgr* pStringMgr) throw();
CFixedStringT(const CFixedStringT& strSrc);
@@ -97,7 +98,7 @@ Because the constructors copy the input data into new allocated storage, you sho
Reinitializes an existing `CFixedStringT` object with new data.
-```
+```cpp
CFixedStringT& operator=(
const CFixedStringT& strSrc);
CFixedStringT& operator=(const char* pszSrc);
diff --git a/docs/atl-mfc-shared/reference/cimage-class.md b/docs/atl-mfc-shared/reference/cimage-class.md
index a641f06038..d355d0f27a 100644
--- a/docs/atl-mfc-shared/reference/cimage-class.md
+++ b/docs/atl-mfc-shared/reference/cimage-class.md
@@ -1,11 +1,11 @@
---
title: "CImage Class"
-ms.date: "08/19/2019"
+description: "Learn more about: CImage Class"
+ms.date: 08/19/2019
f1_keywords: ["CImage", "ATLIMAGE/ATL::CImage", "ATLIMAGE/ATL::CImage::CImage", "ATLIMAGE/ATL::CImage::AlphaBlend", "ATLIMAGE/ATL::CImage::Attach", "ATLIMAGE/ATL::CImage::BitBlt", "ATLIMAGE/ATL::CImage::Create", "ATLIMAGE/ATL::CImage::CreateEx", "ATLIMAGE/ATL::CImage::Destroy", "ATLIMAGE/ATL::CImage::Detach", "ATLIMAGE/ATL::CImage::Draw", "ATLIMAGE/ATL::CImage::GetBits", "ATLIMAGE/ATL::CImage::GetBPP", "ATLIMAGE/ATL::CImage::GetColorTable", "ATLIMAGE/ATL::CImage::GetDC", "ATLIMAGE/ATL::CImage::GetExporterFilterString", "ATLIMAGE/ATL::CImage::GetHeight", "ATLIMAGE/ATL::CImage::GetImporterFilterString", "ATLIMAGE/ATL::CImage::GetMaxColorTableEntries", "ATLIMAGE/ATL::CImage::GetPitch", "ATLIMAGE/ATL::CImage::GetPixel", "ATLIMAGE/ATL::CImage::GetPixelAddress", "ATLIMAGE/ATL::CImage::GetTransparentColor", "ATLIMAGE/ATL::CImage::GetWidth", "ATLIMAGE/ATL::CImage::IsDIBSection", "ATLIMAGE/ATL::CImage::IsIndexed", "ATLIMAGE/ATL::CImage::IsNull", "ATLIMAGE/ATL::CImage::IsTransparencySupported", "ATLIMAGE/ATL::CImage::Load", "ATLIMAGE/ATL::CImage::LoadFromResource", "ATLIMAGE/ATL::CImage::MaskBlt", "ATLIMAGE/ATL::CImage::PlgBlt", "ATLIMAGE/ATL::CImage::ReleaseDC", "ATLIMAGE/ATL::CImage::ReleaseGDIPlus", "ATLIMAGE/ATL::CImage::Save", "ATLIMAGE/ATL::CImage::SetColorTable", "ATLIMAGE/ATL::CImage::SetPixel", "ATLIMAGE/ATL::CImage::SetPixelIndexed", "ATLIMAGE/ATL::CImage::SetPixelRGB", "ATLIMAGE/ATL::CImage::SetTransparentColor", "ATLIMAGE/ATL::CImage::StretchBlt", "ATLIMAGE/ATL::CImage::TransparentBlt"]
helpviewer_keywords: ["jpeg files", "bitmaps [C++], ATL and MFC support for", "images [C++], ATL and MFC support for", "gif files, ATL and MFC support", ".gif files, ATL and MFC support", "PNG files, ATL and MFC support", "CImage class", "transparent color"]
-ms.assetid: 52861e3d-bf7e-481f-a240-90e88f76c490
---
-# CImage Class
+# `CImage` Class
`CImage` provides enhanced bitmap support, including the ability to load and save images in JPEG, GIF, BMP, and Portable Network Graphics (PNG) formats.
@@ -14,7 +14,7 @@ ms.assetid: 52861e3d-bf7e-481f-a240-90e88f76c490
## Syntax
-```
+```cpp
class CImage
```
@@ -24,87 +24,87 @@ class CImage
|Name|Description|
|----------|-----------------|
-|[CImage::CImage](#cimage)|The constructor.|
+|[`CImage::CImage`](#cimage)|The constructor.|
### Public Methods
|Name|Description|
|----------|-----------------|
-|[CImage::AlphaBlend](#alphablend)|Displays bitmaps that have transparent or semitransparent pixels.|
-|[CImage::Attach](#attach)|Attaches an HBITMAP to a `CImage` object. Can be used with either non-DIB section bitmaps or DIB section bitmaps.|
-|[CImage::BitBlt](#bitblt)|Copies a bitmap from the source device context to this current device context.|
-|[CImage::Create](#create)|Creates a DIB section bitmap and attaches it to the previously constructed `CImage` object.|
-|[CImage::CreateEx](#createex)|Creates a DIB section bitmap (with additional parameters) and attaches it to the previously constructed `CImage` object.|
-|[CImage::Destroy](#destroy)|Detaches the bitmap from the `CImage` object and destroys the bitmap.|
-|[CImage::Detach](#detach)|Detaches the bitmap from a `CImage` object.|
-|[CImage::Draw](#draw)|Copies a bitmap from a source rectangle into a destination rectangle. `Draw` stretches or compresses the bitmap to fit the dimensions of the destination rectangle, if necessary, and handles alpha blending and transparent colors.|
-|[CImage::GetBits](#getbits)|Retrieves a pointer to the actual pixel values of the bitmap.|
-|[CImage::GetBPP](#getbpp)|Retrieves the bits per pixel.|
-|[CImage::GetColorTable](#getcolortable)|Retrieves red, green, blue (RGB) color values from a range of entries in the color table.|
-|[CImage::GetDC](#getdc)|Retrieves the device context into which the current bitmap is selected.|
-|[CImage::GetExporterFilterString](#getexporterfilterstring)|Finds the available image formats and their descriptions.|
-|[CImage::GetHeight](#getheight)|Retrieves the height of the current image in pixels.|
-|[CImage::GetImporterFilterString](#getimporterfilterstring)|Finds the available image formats and their descriptions.|
-|[CImage::GetMaxColorTableEntries](#getmaxcolortableentries)|Retrieves the maximum number of entries in the color table.|
-|[CImage::GetPitch](#getpitch)|Retrieves the pitch of the current image, in bytes.|
-|[CImage::GetPixel](#getpixel)|Retrieves the color of the pixel specified by *x* and *y*.|
-|[CImage::GetPixelAddress](#getpixeladdress)|Retrieves the address of a given pixel.|
-|[CImage::GetTransparentColor](#gettransparentcolor)|Retrieves the position of the transparent color in the color table.|
-|[CImage::GetWidth](#getwidth)|Retrieves the width of the current image in pixels.|
-|[CImage::IsDIBSection](#isdibsection)|Determines if the attached bitmap is a DIB section.|
-|[CImage::IsIndexed](#isindexed)|Indicates that a bitmap's colors are mapped to an indexed palette.|
-|[CImage::IsNull](#isnull)|Indicates if a source bitmap is currently loaded.|
-|[CImage::IsTransparencySupported](#istransparencysupported)|Indicates whether the application supports transparent bitmaps.|
-|[CImage::Load](#load)|Loads an image from the specified file.|
-|[CImage::LoadFromResource](#loadfromresource)|Loads an image from the specified resource.|
-|[CImage::MaskBlt](#maskblt)|Combines the color data for the source and destination bitmaps using the specified mask and raster operation.|
-|[CImage::PlgBlt](#plgblt)|Performs a bit-block transfer from a rectangle in a source device context into a parallelogram in a destination device context.|
-|[CImage::ReleaseDC](#releasedc)|Releases the device context that was retrieved with [CImage::GetDC](#getdc).|
-|[CImage::ReleaseGDIPlus](#releasegdiplus)|Releases resources used by GDI+. Must be called to free resources created by a global `CImage` object.|
-|[CImage::Save](#save)|Saves an image as the specified type. `Save` cannot specify image options.|
-|[CImage::SetColorTable](#setcolortable)|Sets red, green, blue RGB) color values in a range of entries in the color table of the DIB section.|
-|[CImage::SetPixel](#setpixel)|Sets the pixel at the specified coordinates to the specified color.|
-|[CImage::SetPixelIndexed](#setpixelindexed)|Sets the pixel at the specified coordinates to the color at the specified index of the palette.|
-|[CImage::SetPixelRGB](#setpixelrgb)|Sets the pixel at the specified coordinates to the specified red, green, blue (RGB) value.|
-|[CImage::SetTransparentColor](#settransparentcolor)|Sets the index of the color to be treated as transparent. Only one color in a palette can be transparent.|
-|[CImage::StretchBlt](#stretchblt)|Copies a bitmap from a source rectangle into a destination rectangle, stretching or compressing the bitmap to fit the dimensions of the destination rectangle, if necessary.|
-|[CImage::TransparentBlt](#transparentblt)|Copies a bitmap with transparent color from the source device context to this current device context.|
+|[`CImage::AlphaBlend`](#alphablend)|Displays bitmaps that have transparent or semitransparent pixels.|
+|[`CImage::Attach`](#attach)|Attaches an `HBITMAP` to a `CImage` object. Can be used with either non-DIB section bitmaps or DIB section bitmaps.|
+|[`CImage::BitBlt`](#bitblt)|Copies a bitmap from the source device context to this current device context.|
+|[`CImage::Create`](#create)|Creates a DIB section bitmap and attaches it to the previously constructed `CImage` object.|
+|[`CImage::CreateEx`](#createex)|Creates a DIB section bitmap (with additional parameters) and attaches it to the previously constructed `CImage` object.|
+|[`CImage::Destroy`](#destroy)|Detaches the bitmap from the `CImage` object and destroys the bitmap.|
+|[`CImage::Detach`](#detach)|Detaches the bitmap from a `CImage` object.|
+|[`CImage::Draw`](#draw)|Copies a bitmap from a source rectangle into a destination rectangle. `Draw` stretches or compresses the bitmap to fit the dimensions of the destination rectangle, if necessary, and handles alpha blending and transparent colors.|
+|[`CImage::GetBits`](#getbits)|Retrieves a pointer to the actual pixel values of the bitmap.|
+|[`CImage::GetBPP`](#getbpp)|Retrieves the bits per pixel.|
+|[`CImage::GetColorTable`](#getcolortable)|Retrieves red, green, blue (RGB) color values from a range of entries in the color table.|
+|[`CImage::GetDC`](#getdc)|Retrieves the device context into which the current bitmap is selected.|
+|[`CImage::GetExporterFilterString`](#getexporterfilterstring)|Finds the available image formats and their descriptions.|
+|[`CImage::GetHeight`](#getheight)|Retrieves the height of the current image in pixels.|
+|[`CImage::GetImporterFilterString`](#getimporterfilterstring)|Finds the available image formats and their descriptions.|
+|[`CImage::GetMaxColorTableEntries`](#getmaxcolortableentries)|Retrieves the maximum number of entries in the color table.|
+|[`CImage::GetPitch`](#getpitch)|Retrieves the pitch of the current image, in bytes.|
+|[`CImage::GetPixel`](#getpixel)|Retrieves the color of the pixel specified by *`x`* and *`y`*.|
+|[`CImage::GetPixelAddress`](#getpixeladdress)|Retrieves the address of a given pixel.|
+|[`CImage::GetTransparentColor`](#gettransparentcolor)|Retrieves the position of the transparent color in the color table.|
+|[`CImage::GetWidth`](#getwidth)|Retrieves the width of the current image in pixels.|
+|[`CImage::IsDIBSection`](#isdibsection)|Determines if the attached bitmap is a DIB section.|
+|[`CImage::IsIndexed`](#isindexed)|Indicates that a bitmap's colors are mapped to an indexed palette.|
+|[`CImage::IsNull`](#isnull)|Indicates if a source bitmap is currently loaded.|
+|[`CImage::IsTransparencySupported`](#istransparencysupported)|Indicates whether the application supports transparent bitmaps.|
+|[`CImage::Load`](#load)|Loads an image from the specified file.|
+|[`CImage::LoadFromResource`](#loadfromresource)|Loads an image from the specified resource.|
+|[`CImage::MaskBlt`](#maskblt)|Combines the color data for the source and destination bitmaps using the specified mask and raster operation.|
+|[`CImage::PlgBlt`](#plgblt)|Performs a bit-block transfer from a rectangle in a source device context into a parallelogram in a destination device context.|
+|[`CImage::ReleaseDC`](#releasedc)|Releases the device context that was retrieved with [`CImage::GetDC`](#getdc).|
+|[`CImage::ReleaseGDIPlus`](#releasegdiplus)|Releases resources used by GDI+. Must be called to free resources created by a global `CImage` object.|
+|[`CImage::Save`](#save)|Saves an image as the specified type. `Save` cannot specify image options.|
+|[`CImage::SetColorTable`](#setcolortable)|Sets red, green, blue RGB) color values in a range of entries in the color table of the DIB section.|
+|[`CImage::SetPixel`](#setpixel)|Sets the pixel at the specified coordinates to the specified color.|
+|[`CImage::SetPixelIndexed`](#setpixelindexed)|Sets the pixel at the specified coordinates to the color at the specified index of the palette.|
+|[`CImage::SetPixelRGB`](#setpixelrgb)|Sets the pixel at the specified coordinates to the specified red, green, blue (RGB) value.|
+|[`CImage::SetTransparentColor`](#settransparentcolor)|Sets the index of the color to be treated as transparent. Only one color in a palette can be transparent.|
+|[`CImage::StretchBlt`](#stretchblt)|Copies a bitmap from a source rectangle into a destination rectangle, stretching or compressing the bitmap to fit the dimensions of the destination rectangle, if necessary.|
+|[`CImage::TransparentBlt`](#transparentblt)|Copies a bitmap with transparent color from the source device context to this current device context.|
### Public Operators
|Name|Description|
|----------|-----------------|
-|[CImage::operator HBITMAP](#operator_hbitmap)|Returns the Windows handle attached to the `CImage` object.|
+|[`CImage::operator HBITMAP`](#operator_hbitmap)|Returns the Windows handle attached to the `CImage` object.|
## Remarks
-`CImage` takes bitmaps that are either device-independent bitmap (DIB) sections or not; however, you can use [Create](#create) or [CImage::Load](#load) with only DIB sections. You can attach a non-DIB section bitmap to a `CImage` object using [Attach](#attach), but then you cannot use the following `CImage` methods, which support only DIB section bitmaps:
+`CImage` takes bitmaps that are either device-independent bitmap (DIB) sections or not; however, you can use [`Create`](#create) or [`CImage::Load`](#load) with only DIB sections. You can attach a non-DIB section bitmap to a `CImage` object using [`Attach`](#attach), but then you cannot use the following `CImage` methods, which support only DIB section bitmaps:
-- [GetBits](#getbits)
+- [`GetBits`](#getbits)
-- [GetColorTable](#getcolortable)
+- [`GetColorTable`](#getcolortable)
-- [GetMaxColorTableEntries](#getmaxcolortableentries)
+- [`GetMaxColorTableEntries`](#getmaxcolortableentries)
-- [GetPitch](#getpitch)
+- [`GetPitch`](#getpitch)
-- [GetPixelAddress](#getpixeladdress)
+- [`GetPixelAddress`](#getpixeladdress)
-- [IsIndexed](#isindexed)
+- [`IsIndexed`](#isindexed)
-- [SetColorTable](#setcolortable)
+- [`SetColorTable`](#setcolortable)
-To determine if an attached bitmap is a DIB section, call [IsDibSection](#isdibsection).
+To determine if an attached bitmap is a DIB section, call [`IsDibSection`](#isdibsection).
> [!NOTE]
> In Visual Studio .NET 2003, this class keeps a count of the number of `CImage` objects created. Whenever the count goes to 0, the function `GdiplusShutdown` is automatically called to release resources used by GDI+. This ensures that any `CImage` objects created directly or indirectly by DLLs are always destroyed properly and that `GdiplusShutdown` is not called from `DllMain`.
> [!NOTE]
-> Using global `CImage` objects in a DLL is not recommended. If you need to use a global `CImage` object in a DLL, call [CImage::ReleaseGDIPlus](#releasegdiplus) to explicitly release resources used by GDI+.
+> Using global `CImage` objects in a DLL is not recommended. If you need to use a global `CImage` object in a DLL, call [`CImage::ReleaseGDIPlus`](#releasegdiplus) to explicitly release resources used by GDI+.
-`CImage` cannot be selected into a new [CDC](../../mfc/reference/cdc-class.md). `CImage` creates its own HDC for the image. Because an HBITMAP can only be selected into one HDC at a time, the HBITMAP associated with the `CImage` cannot be selected into another HDC. If you need a CDC, retrieve the HDC from the `CImage` and give it to [CDC::FromHandle](../../mfc/reference/cdc-class.md#fromhandle).
+`CImage` cannot be selected into a new [`CDC`](../../mfc/reference/cdc-class.md). `CImage` creates its own `HDC` for the image. Because an `HBITMAP` can only be selected into one `HDC` at a time, the `HBITMAP` associated with the `CImage` cannot be selected into another `HDC`. If you need a `CDC`, retrieve the `HDC` from the `CImage` and give it to [`CDC::FromHandle`](../../mfc/reference/cdc-class.md#fromhandle).
-## Example
+## Examples
```cpp
// Get a CDC for the image
@@ -115,9 +115,7 @@ pDC->Rectangle(0, 40, 100, 50);
m_myImage.ReleaseDC();
```
-When you use `CImage` in an MFC project, note which member functions in your project expect a pointer to a [CBitmap](../../mfc/reference/cbitmap-class.md) object. If you want to use `CImage` with such a function, like [CMenu::AppendMenu](../../mfc/reference/cmenu-class.md#appendmenu), use [CBitmap::FromHandle](../../mfc/reference/cbitmap-class.md#fromhandle), pass it your `CImage` HBITMAP, and use the returned `CBitmap*`.
-
-## Example
+When you use `CImage` in an MFC project, note which member functions in your project expect a pointer to a [`CBitmap`](../../mfc/reference/cbitmap-class.md) object. If you want to use `CImage` with such a function, like [`CMenu::AppendMenu`](../../mfc/reference/cmenu-class.md#appendmenu), use [`CBitmap::FromHandle`](../../mfc/reference/cbitmap-class.md#fromhandle), pass it your `CImage` `HBITMAP`, and use the returned `CBitmap*`.
```cpp
void CMyDlg::OnRButtonDown(UINT nFlags, CPoint point)
@@ -132,24 +130,24 @@ void CMyDlg::OnRButtonDown(UINT nFlags, CPoint point)
}
```
-Through `CImage`, you have access to the actual bits of a DIB section. You can use a `CImage` object anywhere you previously used a Win32 HBITMAP or DIB section.
+Through `CImage`, you have access to the actual bits of a DIB section. You can use a `CImage` object anywhere you previously used a Win32 `HBITMAP` or DIB section.
You can use `CImage` from either MFC or ATL.
> [!NOTE]
-> When you create a project using `CImage`, you must define `CString` before you include *atlimage.h*. If your project uses ATL without MFC, include *atlstr.h* before you include *atlimage.h*. If your project uses MFC (or if it is an ATL project with MFC support), include *afxstr.h* before you include *atlimage.h*.
+> When you create a project using `CImage`, you must define `CString` before you include *`atlimage.h`*. If your project uses ATL without MFC, include *`atlstr.h`* before you include *`atlimage.h`*. If your project uses MFC (or if it is an ATL project with MFC support), include *`afxstr.h`* before you include *`atlimage.h`*.
>
-> Likewise, you must include *atlimage.h* before you include *atlimpl.cpp*. To accomplish this easily, include *atlimage.h* in your *pch.h* (*stdafx.h* in Visual Studio 2017 and earlier).
+> Likewise, you must include *`atlimage.h`* before you include *`atlimpl.cpp`*. To accomplish this easily, include *`atlimage.h`* in your *`pch.h`* (*`stdafx.h`* in Visual Studio 2017 and earlier).
## Requirements
-**Header:** atlimage.h
+**Header:** `atlimage.h`
-## CImage::AlphaBlend
+## `CImage::AlphaBlend`
Displays bitmaps that have transparent or semitransparent pixels.
-```
+```cpp
BOOL AlphaBlend(
HDC hDestDC,
int xDest,
@@ -186,46 +184,46 @@ BOOL AlphaBlend(
### Parameters
-*hDestDC*
+*`hDestDC`*
Handle to the destination device context.
-*xDest*
+*`xDest`*
The x-coordinate, in logical units, of the upper left corner of the destination rectangle.
-*yDest*
+*`yDest`*
The y-coordinate, in logical units, of the upper left corner of the destination rectangle.
-*bSrcAlpha*
+*`bSrcAlpha`*
An alpha transparency value to be used on the entire source bitmap. The default 0xff (255) assumes that your image is opaque, and that you want to use per-pixel alpha values only.
-*bBlendOp*
-The alpha-blending function for source and destination bitmaps, a global alpha value to be applied to the entire source bitmap, and format information for the source bitmap. The source and destination blend functions are currently limited to AC_SRC_OVER.
+*`bBlendOp`*
+The alpha-blending function for source and destination bitmaps, a global alpha value to be applied to the entire source bitmap, and format information for the source bitmap. The source and destination blend functions are currently limited to `AC_SRC_OVER`.
-*pointDest*
-A reference to a [POINT](/windows/win32/api/windef/ns-windef-point) structure that identifies the upper left corner of the destination rectangle, in logical units.
+*`pointDest`*
+A reference to a [`POINT`](/windows/win32/api/windef/ns-windef-point) structure that identifies the upper left corner of the destination rectangle, in logical units.
-*nDestWidth*
+*`nDestWidth`*
The width, in logical units, of the destination rectangle.
-*nDestHeight*
+*`nDestHeight`*
The height, in logical units, of the destination rectangle.
-*xSrc*
+*`xSrc`*
The logical x-coordinate of the upper left corner of the source rectangle.
-*ySrc*
+*`ySrc`*
The logical y-coordinate of the upper left corner of the source rectangle.
-*nSrcWidth*
+*`nSrcWidth`*
The width, in logical units, of the source rectangle.
-*nSrcHeight*
+*`nSrcHeight`*
The height, in logical units, of the source rectangle.
-*rectDest*
-A reference to a [RECT](/windows/win32/api/windef/ns-windef-rect) structure, identifying the destination.
+*`rectDest`*
+A reference to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure, identifying the destination.
-*rectSrc*
+*`rectSrc`*
A reference to a `RECT` structure, identifying the source.
### Return Value
@@ -236,11 +234,11 @@ Nonzero if successful; otherwise 0.
Alpha-blend bitmaps support color blending on a per-pixel basis.
-When *bBlendOp* is set to the default of AC_SRC_OVER, the source bitmap is placed over the destination bitmap based on the alpha values of the source pixels.
+When *`bBlendOp`* is set to the default of `AC_SRC_OVER`, the source bitmap is placed over the destination bitmap based on the alpha values of the source pixels.
-## CImage::Attach
+## `CImage::Attach`
-Attaches *hBitmap* to a `CImage` object.
+Attaches *`hBitmap`* to a `CImage` object.
```cpp
void Attach(HBITMAP hBitmap, DIBOrientation eOrientation = DIBOR_DEFAULT) throw();
@@ -248,27 +246,27 @@ void Attach(HBITMAP hBitmap, DIBOrientation eOrientation = DIBOR_DEFAULT) throw(
### Parameters
-*hBitmap*
-A handle to an HBITMAP.
+*`hBitmap`*
+A handle to an `HBITMAP`.
-*eOrientation*
+*`eOrientation`*
Specifies the orientation of the bitmap. Can be one of the following:
-- DIBOR_DEFAULT The orientation of the bitmap is determined by the operating system.
+- `DIBOR_DEFAULT` The orientation of the bitmap is determined by the operating system.
-- DIBOR_BOTTOMUP The lines of the bitmap are in reverse order. This causes [CImage::GetBits](#getbits) to return a pointer near the end of the bitmap buffer and [CImage::GetPitch](#getpitch) to return a negative number.
+- `DIBOR_BOTTOMUP` The lines of the bitmap are in reverse order. This causes [`CImage::GetBits`](#getbits) to return a pointer near the end of the bitmap buffer and [`CImage::GetPitch`](#getpitch) to return a negative number.
-- DIBOR_TOPDOWN The lines of the bitmap are in top to bottom order. This causes [CImage::GetBits](#getbits) to return a pointer to the first byte of the bitmap buffer and [CImage::GetPitch](#getpitch) to return a positive number.
+- `DIBOR_TOPDOWN` The lines of the bitmap are in top to bottom order. This causes [`CImage::GetBits`](#getbits) to return a pointer to the first byte of the bitmap buffer and [`CImage::GetPitch`](#getpitch) to return a positive number.
### Remarks
-The bitmap can be either a non-DIB section bitmap or a DIB section bitmap. See [IsDIBSection](#isdibsection) for a list of methods that you can use only with DIB section bitmaps.
+The bitmap can be either a non-DIB section bitmap or a DIB section bitmap. See [`IsDIBSection`](#isdibsection) for a list of methods that you can use only with DIB section bitmaps.
-## CImage::BitBlt
+## `CImage::BitBlt`
Copies a bitmap from the source device context to this current device context.
-```
+```cpp
BOOL BitBlt(
HDC hDestDC,
int xDest,
@@ -299,37 +297,37 @@ BOOL BitBlt(
### Parameters
-*hDestDC*
-The destination HDC.
+*`hDestDC`*
+The destination `HDC`.
-*xDest*
+*`xDest`*
The logical x-coordinate of the upper left corner of the destination rectangle.
-*yDest*
+*`yDest`*
The logical y-coordinate of the upper left corner of the destination rectangle.
-*dwROP*
-The raster operation to be performed. Raster-operation codes define exactly how to combine the bits of the source, the destination, and the pattern (as defined by the currently selected brush) to form the destination. See [BitBlt](/windows/win32/api/wingdi/nf-wingdi-bitblt) in the Windows SDK for a list of other raster-operation codes and their descriptions.
+*`dwROP`*
+The raster operation to be performed. Raster-operation codes define exactly how to combine the bits of the source, the destination, and the pattern (as defined by the currently selected brush) to form the destination. See [`BitBlt`](/windows/win32/api/wingdi/nf-wingdi-bitblt) in the Windows SDK for a list of other raster-operation codes and their descriptions.
-*pointDest*
-A [POINT](/windows/win32/api/windef/ns-windef-point) structure indicating the upper left corner of the destination rectangle.
+*`pointDest`*
+A [`POINT`](/windows/win32/api/windef/ns-windef-point) structure indicating the upper left corner of the destination rectangle.
-*nDestWidth*
+*`nDestWidth`*
The width, in logical units, of the destination rectangle.
-*nDestHeight*
+*`nDestHeight`*
The height, in logical units, of the destination rectangle.
-*xSrc*
+*`xSrc`*
The logical x-coordinate of the upper left corner of the source rectangle.
-*ySrc*
+*`ySrc`*
The logical y-coordinate of the upper left corner of the source rectangle.
-*rectDest*
-A [RECT](/windows/win32/api/windef/ns-windef-rect) structure indicating the destination rectangle.
+*`rectDest`*
+A [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure indicating the destination rectangle.
-*pointSrc*
+*`pointSrc`*
A `POINT` structure indicating the upper left corner of the source rectangle.
### Return Value
@@ -338,29 +336,29 @@ Nonzero if successful; otherwise zero.
### Remarks
-For more information, see [BitBlt](/windows/win32/api/wingdi/nf-wingdi-bitblt) in the Windows SDK.
+For more information, see [`BitBlt`](/windows/win32/api/wingdi/nf-wingdi-bitblt) in the Windows SDK.
-## CImage::CImage
+## `CImage::CImage`
Constructs a `CImage` object.
-```
+```cpp
CImage() throw();
```
### Remarks
-Once you have constructed the object, call [Create](#create), [Load](#load), [LoadFromResource](#loadfromresource), or [Attach](#attach) to attach a bitmap to the object.
+Once you have constructed the object, call [`Create`](#create), [`Load`](#load), [`LoadFromResource`](#loadfromresource), or [`Attach`](#attach) to attach a bitmap to the object.
**Note** In Visual Studio, this class keeps a count of the number of `CImage` objects created. Whenever the count goes to 0, the function `GdiplusShutdown` is automatically called to release resources used by GDI+. This ensures that any `CImage` objects created directly or indirectly by DLLs are always destroyed properly and that `GdiplusShutdown` is not called from DllMain.
-Using global `CImage` objects in a DLL is not recommended. If you need to use a global `CImage` object in a DLL, call [CImage::ReleaseGDIPlus](#releasegdiplus) to explicitly release resources used by GDI+.
+Using global `CImage` objects in a DLL is not recommended. If you need to use a global `CImage` object in a DLL, call [`CImage::ReleaseGDIPlus`](#releasegdiplus) to explicitly release resources used by GDI+.
-## CImage::Create
+## `CImage::Create`
Creates a `CImage` bitmap and attach it to the previously constructed `CImage` object.
-```
+```cpp
BOOL Create(
int nWidth,
int nHeight,
@@ -370,32 +368,32 @@ BOOL Create(
### Parameters
-*nWidth*
+*`nWidth`*
The width of the `CImage` bitmap, in pixels.
-*nHeight*
-The height of the `CImage` bitmap, in pixels. If *nHeight* is positive, the bitmap is a bottom-up DIB and its origin is the lower left corner. If *nHeight* is negative, the bitmap is a top-down DIB and its origin is the upper left corner.
+*`nHeight`*
+The height of the `CImage` bitmap, in pixels. If *`nHeight`* is positive, the bitmap is a bottom-up DIB and its origin is the lower left corner. If *`nHeight`* is negative, the bitmap is a top-down DIB and its origin is the upper left corner.
-*nBPP*
+*`nBPP`*
The numbers of bits per pixel in the bitmap. Usually 4, 8, 16, 24, or 32. Can be 1 for monochrome bitmaps or masks.
-*dwFlags*
+*`dwFlags`*
Specifies if the bitmap object has an alpha channel. Can be a combination of zero or more of the following values:
-- *createAlphaChannel* Can only be used if *nBPP* is 32, and *eCompression* is BI_RGB. If specified, the created image has an alpha (transparency) value for each pixel, stored in the 4th byte of each pixel (unused in a non-alpha 32-bit image). This alpha channel is automatically used when calling [CImage::AlphaBlend](#alphablend).
+- *`createAlphaChannel`* Can only be used if *`nBPP`* is 32, and *`eCompression`* is `BI_RGB`. If specified, the created image has an alpha (transparency) value for each pixel, stored in the 4th byte of each pixel (unused in a non-alpha 32-bit image). This alpha channel is automatically used when calling [`CImage::AlphaBlend`](#alphablend).
> [!NOTE]
-> In calls to [CImage::Draw](#draw), images with an alpha channel are automatically alpha blended to the destination.
+> In calls to [`CImage::Draw`](#draw), images with an alpha channel are automatically alpha blended to the destination.
### Return Value
Nonzero if successful; otherwise 0.
-## CImage::CreateEx
+## `CImage::CreateEx`
Creates a `CImage` bitmap and attach it to the previously constructed `CImage` object.
-```
+```cpp
BOOL CreateEx(
int nWidth,
int nHeight,
@@ -407,36 +405,36 @@ BOOL CreateEx(
### Parameters
-*nWidth*
+*`nWidth`*
The width of the `CImage` bitmap, in pixels.
-*nHeight*
-The height of the `CImage` bitmap, in pixels. If *nHeight* is positive, the bitmap is a bottom-up DIB and its origin is the lower left corner. If *nHeight* is negative, the bitmap is a top-down DIB and its origin is the upper left corner.
+*`nHeight`*
+The height of the `CImage` bitmap, in pixels. If *`nHeight`* is positive, the bitmap is a bottom-up DIB and its origin is the lower left corner. If *`nHeight`* is negative, the bitmap is a top-down DIB and its origin is the upper left corner.
-*nBPP*
+*`nBPP`*
The numbers of bits per pixel in the bitmap. Usually 4, 8, 16, 24, or 32. Can be 1 for monochrome bitmaps or masks.
-*eCompression*
+*`eCompression`*
Specifies the type of compression for a compressed bottom-up bitmap (top-down DIBs cannot be compressed). Can be one of the following values:
-- BI_RGB The format is uncompressed. Specifying this value when calling `CImage::CreateEx` is equivalent to calling `CImage::Create`.
+- `BI_RGB` The format is uncompressed. Specifying this value when calling `CImage::CreateEx` is equivalent to calling `CImage::Create`.
-- BI_BITFIELDS The format is uncompressed and the color table consists of three DWORD color masks that specify the red, green, and blue components, respectively, of each pixel. This is valid when used with 16- and 32-bpp bitmaps.
+- `BI_BITFIELDS` The format is uncompressed and the color table consists of three `DWORD` color masks that specify the red, green, and blue components, respectively, of each pixel. This is valid when used with 16- and 32-bpp bitmaps.
-*pdwBitfields*
-Only used if *eCompression* is set to BI_BITFIELDS, otherwise it must be NULL. A pointer to an array of three DWORD bitmasks, specifying which bits of each pixel are used for the red, green, and blue components of the color, respectively. For information on restrictions for the bitfields, see [BITMAPINFOHEADER](/windows/win32/api/wingdi/ns-wingdi-bitmapinfoheader) in the Windows SDK.
+*`pdwBitfields`*
+Only used if *`eCompression`* is set to `BI_BITFIELDS`, otherwise it must be `NULL`. A pointer to an array of three `DWORD` bitmasks, specifying which bits of each pixel are used for the red, green, and blue components of the color, respectively. For information on restrictions for the bitfields, see [`BITMAPINFOHEADER`](/windows/win32/api/wingdi/ns-wingdi-bitmapinfoheader) in the Windows SDK.
-*dwFlags*
+*`dwFlags`*
Specifies if the bitmap object has an alpha channel. Can be a combination of zero or more of the following values:
-- *createAlphaChannel* Can only be used if *nBPP* is 32, and *eCompression* is BI_RGB. If specified, the created image has an alpha (transparency) value for each pixel, stored in the 4th byte of each pixel (unused in a non-alpha 32-bit image). This alpha channel is automatically used when calling [CImage::AlphaBlend](#alphablend).
+- *`createAlphaChannel`* Can only be used if *`nBPP`* is 32, and *`eCompression`* is `BI_RGB`. If specified, the created image has an alpha (transparency) value for each pixel, stored in the 4th byte of each pixel (unused in a non-alpha 32-bit image). This alpha channel is automatically used when calling [`CImage::AlphaBlend`](#alphablend).
> [!NOTE]
- > In calls to [CImage::Draw](#draw), images with an alpha channel are automatically alpha blended to the destination.
+ > In calls to [`CImage::Draw`](#draw), images with an alpha channel are automatically alpha blended to the destination.
### Return Value
-TRUE if successful. Otherwise FALSE.
+`TRUE` if successful. Otherwise `FALSE`.
### Example
@@ -447,7 +445,7 @@ DWORD adwBitmasks[3] = { 0x0000000f, 0x000000f0, 0x00000f00 };
m_myImage.CreateEx(100, 100, 16, BI_BITFIELDS, adwBitmasks, 0);
```
-## CImage::Destroy
+## `CImage::Destroy`
Detaches the bitmap from the `CImage` object and destroys the bitmap.
@@ -455,23 +453,23 @@ Detaches the bitmap from the `CImage` object and destroys the bitmap.
void Destroy() throw();
```
-## CImage::Detach
+## `CImage::Detach`
Detaches a bitmap from a `CImage` object.
-```
+```cpp
HBITMAP Detach() throw();
```
### Return Value
-A handle to the bitmap detached, or NULL if no bitmap is attached.
+A handle to the bitmap detached, or `NULL` if no bitmap is attached.
-## CImage::Draw
+## `CImage::Draw`
Copies a bitmap from the source device context to the current device context.
-```
+```cpp
BOOL Draw(
HDC hDestDC,
int xDest,
@@ -511,41 +509,41 @@ BOOL Draw(
### Parameters
-*hDestDC*
+*`hDestDC`*
A handle to the destination device context.
-*xDest*
+*`xDest`*
The x-coordinate, in logical units, of the upper left corner of the destination rectangle.
-*yDest*
+*`yDest`*
The y-coordinate, in logical units, of the upper left corner of the destination rectangle.
-*nDestWidth*
+*`nDestWidth`*
The width, in logical units, of the destination rectangle.
-*nDestHeight*
+*`nDestHeight`*
The height, in logical units, of the destination rectangle.
-*xSrc*
+*`xSrc`*
The x-coordinate, in logical units, of the upper left corner of the source rectangle.
-*ySrc*
+*`ySrc`*
The y-coordinate, in logical units, of the upper left corner of the source rectangle.
-*nSrcWidth*
+*`nSrcWidth`*
The width, in logical units, of the source rectangle.
-*nSrcHeight*
+*`nSrcHeight`*
The height, in logical units, of the source rectangle.
-*rectDest*
-A reference to a [RECT](/windows/win32/api/windef/ns-windef-rect) structure, identifying the destination.
+*`rectDest`*
+A reference to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure, identifying the destination.
-*rectSrc*
+*`rectSrc`*
A reference to a `RECT` structure, identifying the source.
-*pointDest*
-A reference to a [POINT](/windows/win32/api/windef/ns-windef-point) structure that identifies the upper left corner of the destination rectangle, in logical units.
+*`pointDest`*
+A reference to a [`POINT`](/windows/win32/api/windef/ns-windef-point) structure that identifies the upper left corner of the destination rectangle, in logical units.
### Return Value
@@ -553,11 +551,11 @@ Nonzero if successful; otherwise 0.
### Remarks
-`Draw` performs the same operation as [StretchBlt](#stretchblt), unless the image contains a transparent color or alpha channel. In that case, `Draw` performs the same operation as either [TransparentBlt](#transparentblt) or [AlphaBlend](#alphablend) as required.
+`Draw` performs the same operation as [`StretchBlt`](#stretchblt), unless the image contains a transparent color or alpha channel. In that case, `Draw` performs the same operation as either [`TransparentBlt`](#transparentblt) or [`AlphaBlend`](#alphablend) as required.
For versions of `Draw` that do not specify a source rectangle, the entire source image is the default. For the version of `Draw` that does not specify a size for the destination rectangle, the size of the source image is the default and no stretching or shrinking occurs.
-## CImage::GetBits
+## `CImage::GetBits`
Retrieves a pointer to the actual bit values of a given pixel in a bitmap.
@@ -571,16 +569,16 @@ A pointer to the bitmap buffer. If the bitmap is a bottom-up DIB, the pointer po
### Remarks
-Using this pointer, along with the value returned by [GetPitch](#getpitch), you can locate and change individual pixels in an image.
+Using this pointer, along with the value returned by [`GetPitch`](#getpitch), you can locate and change individual pixels in an image.
> [!NOTE]
> This method supports only DIB section bitmaps; consequently, you access the pixels of a `CImage` object the same way you would the pixels of a DIB section. The returned pointer points to the pixel at the location (0, 0).
-## CImage::GetBPP
+## `CImage::GetBPP`
Retrieves the bits-per-pixel value.
-```
+```cpp
int GetBPP() const throw();
```
@@ -592,9 +590,9 @@ The number of bits per pixel.
This value determines the number of bits that define each pixel and the maximum number of colors in the bitmap.
-The bits per pixel is usually 1, 4, 8, 16, 24, or 32. See the `biBitCount` member of [BITMAPINFOHEADER](/windows/win32/api/wingdi/ns-wingdi-bitmapinfoheader) in the Windows SDK for more information about this value.
+The bits per pixel is usually 1, 4, 8, 16, 24, or 32. See the `biBitCount` member of [`BITMAPINFOHEADER`](/windows/win32/api/wingdi/ns-wingdi-bitmapinfoheader) in the Windows SDK for more information about this value.
-## CImage::GetColorTable
+## `CImage::GetColorTable`
Retrieves red, green, blue (RGB) color values from a range of entries in the palette of the DIB section.
@@ -607,20 +605,20 @@ void GetColorTable(
### Parameters
-*iFirstColor*
+*`iFirstColor`*
The color table index of the first entry to retrieve.
-*nColors*
+*`nColors`*
The number of color table entries to retrieve.
-*prgbColors*
-A pointer to the array of [RGBQUAD](/windows/win32/api/wingdi/ns-wingdi-rgbquad) structures to retrieve the color table entries.
+*`prgbColors`*
+A pointer to the array of [`RGBQUAD`](/windows/win32/api/wingdi/ns-wingdi-rgbquad) structures to retrieve the color table entries.
-## CImage::GetDC
+## `CImage::GetDC`
Retrieves the device context that currently has the image selected into it.
-```
+```cpp
HDC GetDC() const throw();
```
@@ -630,13 +628,13 @@ A handle to a device context.
### Remarks
-For each call to `GetDC`, you must have a subsequent call to [ReleaseDC](#releasedc).
+For each call to `GetDC`, you must have a subsequent call to [`ReleaseDC`](#releasedc).
-## CImage::GetExporterFilterString
+## `CImage::GetExporterFilterString`
Finds image formats available for saving images.
-```
+```cpp
static HRESULT GetExporterFilterString(
CSimpleString& strExporters,
CSimpleArray& aguidFileTypes,
@@ -647,17 +645,17 @@ static HRESULT GetExporterFilterString(
### Parameters
-*strExporters*
+*`strExporters`*
A reference to a `CSimpleString` object. See **Remarks** for more information.
-*aguidFileTypes*
-An array of GUIDs, with each element corresponding to one of the file types in the string. In the example in *pszAllFilesDescription* below, *aguidFileTypes*[0] is GUID_NULL and the remaining array values are the image file formats supported by the current operating system.
+*`aguidFileTypes`*
+An array of GUIDs, with each element corresponding to one of the file types in the string. In the example in *`pszAllFilesDescription`* below, *`aguidFileTypes[0]`* is `GUID_NULL` and the remaining array values are the image file formats supported by the current operating system.
> [!NOTE]
> For a complete list of constants, see **Image File Format Constants** in the Windows SDK.
-*pszAllFilesDescription*
-If this parameter is not NULL, the filter string will have one additional filter at the beginning of the list. This filter will have the current value of *pszAllFilesDescription* for its description, and accepts files of any extension supported by any other exporter in the list.
+*`pszAllFilesDescription`*
+If this parameter is not `NULL`, the filter string will have one additional filter at the beginning of the list. This filter will have the current value of *`pszAllFilesDescription`* for its description, and accepts files of any extension supported by any other exporter in the list.
For example:
@@ -669,7 +667,7 @@ CImage::GetExporterFilterString(
_T("All Image Files"));
```
-*dwExclude*
+*`dwExclude`*
Set of bit flags specifying which file types to exclude from the list. Allowable flags are:
- `excludeGIF` = 0x01 Excludes GIF files.
@@ -692,34 +690,34 @@ Set of bit flags specifying which file types to exclude from the list. Allowable
- `excludeDefaultLoad` = 0 For load, all file types are included by default
-- `excludeDefaultSave` = `excludeIcon | excludeEMF | excludeWMF` For saving, these files are excluded by default because they usually have special requirements.
+- `excludeDefaultSave` = `excludeIcon | excludeEMF | excludeWMF` For saving, these files are excluded by default because they usually have special requirements.
-*chSeparator*
+*`chSeparator`*
The separator used between the image formats. See **Remarks** for more information.
### Return Value
-A standard HRESULT.
+A standard `HRESULT`.
### Remarks
-You can pass the resulting format string to your MFC [CFileDialog](../../mfc/reference/cfiledialog-class.md) object to expose the file extensions of the available image formats in the File Save As dialog box.
+You can pass the resulting format string to your MFC [`CFileDialog`](../../mfc/reference/cfiledialog-class.md) object to expose the file extensions of the available image formats in the File Save As dialog box.
-The parameter *strExporter* has the format:
+The parameter *`strExporter`* has the format:
-file description0|\*.ext0|filedescription1|\*.ext1|...file description *n*|\*.ext *n*||
+`file description 0|*.ext0|file description 1|*.ext1|...file description N|*.extN||`
-where '|' is the separator character specified by `chSeparator`. For example:
+where `|` is the separator character specified by `chSeparator`. For example:
`"Bitmap format|*.bmp|JPEG format|*.jpg|GIF format|*.gif|PNG format|*.png||"`
-Use the default separator '|' if you pass this string to an MFC `CFileDialog` object. Use the null separator '\0' if you pass this string to a common File Save dialog box.
+Use the default separator `|` if you pass this string to an MFC `CFileDialog` object. Use the null separator `'\0'` if you pass this string to a common File Save dialog box.
-## CImage::GetHeight
+## `CImage::GetHeight`
Retrieves the height, in pixels, of an image.
-```
+```cpp
int GetHeight() const throw();
```
@@ -727,11 +725,11 @@ int GetHeight() const throw();
The height, in pixels, of an image.
-## CImage::GetImporterFilterString
+## `CImage::GetImporterFilterString`
Finds image formats available for loading images.
-```
+```cpp
static HRESULT GetImporterFilterString(
CSimpleString& strImporters,
CSimpleArray& aguidFileTypes,
@@ -742,17 +740,17 @@ static HRESULT GetImporterFilterString(
### Parameters
-*strImporters*
+*`strImporters`*
A reference to a `CSimpleString` object. See **Remarks** for more information.
-*aguidFileTypes*
-An array of GUIDs, with each element corresponding to one of the file types in the string. In the example in *pszAllFilesDescription* below, *aguidFileTypes*[0] is GUID_NULL with the remaining array values are the image file formats supported by the current operating system.
+*`aguidFileTypes`*
+An array of GUIDs, with each element corresponding to one of the file types in the string. In the example in *`pszAllFilesDescription`* below, *`aguidFileTypes[0]`* is `GUID_NULL` with the remaining array values are the image file formats supported by the current operating system.
> [!NOTE]
> For a complete list of constants, see **Image File Format Constants** in the Windows SDK.
-*pszAllFilesDescription*
-If this parameter is not NULL, the filter string will have one additional filter at the beginning of the list. This filter will have the current value of *pszAllFilesDescription* for its description, and accepts files of any extension supported by any other exporter in the list.
+*`pszAllFilesDescription`*
+If this parameter is not `NULL`, the filter string will have one additional filter at the beginning of the list. This filter will have the current value of *`pszAllFilesDescription`* for its description, and accepts files of any extension supported by any other exporter in the list.
For example:
@@ -764,7 +762,7 @@ CImage::GetImporterFilterString(
_T("All Image Files"));
```
-*dwExclude*
+*`dwExclude`*
Set of bit flags specifying which file types to exclude from the list. Allowable flags are:
- `excludeGIF` = 0x01 Excludes GIF files.
@@ -787,30 +785,30 @@ Set of bit flags specifying which file types to exclude from the list. Allowable
- `excludeDefaultLoad` = 0 For load, all file types are included by default
-- `excludeDefaultSave` = `excludeIcon | excludeEMF | excludeWMF` For saving, these files are excluded by default because they usually have special requirements.
+- `excludeDefaultSave` = `excludeIcon | excludeEMF | excludeWMF` For saving, these files are excluded by default because they usually have special requirements.
-*chSeparator*
+*`chSeparator`*
The separator used between the image formats. See **Remarks** for more information.
### Remarks
-You can pass the resulting format string to your MFC [CFileDialog](../../mfc/reference/cfiledialog-class.md) object to expose the file extensions of the available image formats in the **File Open** dialog box.
+You can pass the resulting format string to your MFC [`CFileDialog`](../../mfc/reference/cfiledialog-class.md) object to expose the file extensions of the available image formats in the **File Open** dialog box.
-The parameter *strImporter* has the format:
+The parameter *`strImporter`* has the format:
-file description0|\*.ext0|filedescription1|\*.ext1|...file description *n*|\*.ext *n*||
+`file description 0|*.ext0|file description 1|*.ext1|...file description N|*.extN||
-where '|' is the separator character specified by *chSeparator*. For example:
+where `|` is the separator character specified by *`chSeparator`*. For example:
`"Bitmap format|*.bmp|JPEG format|*.jpg|GIF format|*.gif|PNG format|*.png||"`
-Use the default separator '|' if you pass this string to an MFC `CFileDialog` object. Use the null separator '\0' if you pass this string to a common **File Open** dialog box.
+Use the default separator `|` if you pass this string to an MFC `CFileDialog` object. Use the null separator `'\0'` if you pass this string to a common **File Open** dialog box.
-## CImage::GetMaxColorTableEntries
+## `CImage::GetMaxColorTableEntries`
Retrieves the maximum number of entries in the color table.
-```
+```cpp
int GetMaxColorTableEntries() const throw();
```
@@ -822,11 +820,11 @@ The number of entries in the color table.
This method supports only DIB section bitmaps.
-## CImage::GetPitch
+## `CImage::GetPitch`
Retrieves the pitch of an image.
-```
+```cpp
int GetPitch() const throw();
```
@@ -838,32 +836,32 @@ The pitch of the image. If the return value is negative, the bitmap is a bottom-
The pitch is the distance, in bytes, between two memory addresses that represent the beginning of one bitmap line and the beginning of the next bitmap line. Because pitch is measured in bytes, the pitch of an image helps you to determine the pixel format. The pitch can also include additional memory, reserved for the bitmap.
-Use `GetPitch` with [GetBits](#getbits) to find individual pixels of an image.
+Use `GetPitch` with [`GetBits`](#getbits) to find individual pixels of an image.
> [!NOTE]
> This method supports only DIB section bitmaps.
-## CImage::GetPixel
+## `CImage::GetPixel`
Retrieves the color of the pixel at the location specified by *x* and *y*.
-```
+```cpp
COLORREF GetPixel(int x, int y) const throw();
```
### Parameters
-*x*
+*`x`*
The x-coordinate of the pixel.
-*y*
+*`y`*
The y-coordinate of the pixel.
### Return Value
-The red, green, blue (RGB) value of the pixel. If the pixel is outside of the current clipping region, the return value is CLR_INVALID.
+The red, green, blue (RGB) value of the pixel. If the pixel is outside of the current clipping region, the return value is `CLR_INVALID`.
-## CImage::GetPixelAddress
+## `CImage::GetPixelAddress`
Retrieves the exact address of a pixel.
@@ -873,10 +871,10 @@ void* GetPixelAddress(int x, int y) throw();
### Parameters
-*x*
+*`x`*
The x-coordinate of the pixel.
-*y*
+*`y`*
The y-coordinate of the pixel.
### Remarks
@@ -888,11 +886,11 @@ For formats that have less than 8 bits per pixel, this method returns the addres
> [!NOTE]
> This method supports only DIB section bitmaps.
-## CImage::GetTransparentColor
+## `CImage::GetTransparentColor`
Retrieves the indexed location of the transparent color in the color palette.
-```
+```cpp
LONG GetTransparentColor() const throw();
```
@@ -900,11 +898,11 @@ LONG GetTransparentColor() const throw();
The index of the transparent color.
-## CImage::GetWidth
+## `CImage::GetWidth`
Retrieves the width, in pixels, of an image.
-```
+```cpp
int GetWidth() const throw();
```
@@ -912,72 +910,72 @@ int GetWidth() const throw();
The width of the bitmap, in pixels.
-## CImage::IsDIBSection
+## `CImage::IsDIBSection`
Determines if the attached bitmap is a DIB section.
-```
+```cpp
bool IsDIBSection() const throw();
```
### Return Value
-TRUE if the attached bitmap is a DIB section. Otherwise FALSE.
+`TRUE` if the attached bitmap is a DIB section. Otherwise `FALSE`.
### Remarks
If the bitmap is not a DIB section, you cannot use the following `CImage` methods, which support only DIB section bitmaps:
-- [GetBits](#getbits)
+- [`GetBits`](#getbits)
-- [GetColorTable](#getcolortable)
+- [`GetColorTable`](#getcolortable)
-- [GetMaxColorTableEntries](#getmaxcolortableentries)
+- [`GetMaxColorTableEntries`](#getmaxcolortableentries)
-- [GetPitch](#getpitch)
+- [`GetPitch`](#getpitch)
-- [GetPixelAddress](#getpixeladdress)
+- [`GetPixelAddress`](#getpixeladdress)
-- [IsIndexed](#isindexed)
+- [`IsIndexed`](#isindexed)
-- [SetColorTable](#setcolortable)
+- [`SetColorTable`](#setcolortable)
-## CImage::IsIndexed
+## `CImage::IsIndexed`
Determines whether a bitmap's pixels are mapped to a color palette.
-```
+```cpp
bool IsIndexed() const throw();
```
### Return Value
-TRUE if indexed; otherwise FALSE.
+`TRUE` if indexed; otherwise `FALSE`.
### Remarks
-This method returns TRUE only if the bitmap is 8-bit (256 colors) or less.
+This method returns `TRUE` only if the bitmap is 8-bit (256 colors) or less.
> [!NOTE]
> This method supports only DIB section bitmaps.
-## CImage::IsNull
+## `CImage::IsNull`
Determines if a bitmap is currently loaded.
-```
+```cpp
bool IsNull() const throw();
```
### Remarks
-This method returns TRUE if a bitmap is not currently loaded; otherwise FALSE.
+This method returns `TRUE` if a bitmap is not currently loaded; otherwise `FALSE`.
-## CImage::IsTransparencySupported
+## `CImage::IsTransparencySupported`
Indicates whether the application supports transparent bitmaps.
-```
+```cpp
static BOOL IsTransparencySupported() throw();
```
@@ -987,38 +985,38 @@ Nonzero if the current platform supports transparency. Otherwise 0.
### Remarks
-If the return value is nonzero, and transparency is supported, a call to [AlphaBlend](#alphablend), [TransparentBlt](#transparentblt), or [Draw](#draw) will handle transparent colors.
+If the return value is nonzero, and transparency is supported, a call to [`AlphaBlend`](#alphablend), [`TransparentBlt`](#transparentblt), or [`Draw`](#draw) will handle transparent colors.
-## CImage::Load
+## `CImage::Load`
Loads an image.
-```
+```cpp
HRESULT Load(LPCTSTR pszFileName) throw();
HRESULT Load(IStream* pStream) throw();
```
### Parameters
-*pszFileName*
+*`pszFileName`*
A pointer to a string containing the name of the image file to load.
-*pStream*
+*`pStream`*
A pointer to a stream containing the name of the image file to load.
### Return Value
-A standard HRESULT.
+A standard `HRESULT`.
### Remarks
-Loads the image specified by *pszFileName* or *pStream*.
+Loads the image specified by *`pszFileName`* or *`pStream`*.
Valid image types are BMP, GIF, JPEG, PNG, and TIFF.
-## CImage::LoadFromResource
+## `CImage::LoadFromResource`
-Loads an image from a BITMAP resource.
+Loads an image from a `BITMAP` resource.
```cpp
void LoadFromResource(
@@ -1032,24 +1030,24 @@ void LoadFromResource(
### Parameters
-*hInstance*
+*`hInstance`*
Handle to an instance of the module that contains the image to be loaded.
-*pszResourceName*
+*`pszResourceName`*
A pointer to the string containing the name of the resource containing the image to load.
-*nIDResource*
+*`nIDResource`*
The ID of the resource to load.
### Remarks
-The resource must be of type BITMAP.
+The resource must be of type `BITMAP`.
-## CImage::MaskBlt
+## `CImage::MaskBlt`
Combines the color data for the source and destination bitmaps using the specified mask and raster operation.
-```
+```cpp
BOOL MaskBlt(
HDC hDestDC,
int xDest,
@@ -1087,49 +1085,49 @@ BOOL MaskBlt(
### Parameters
-*hDestDC*
+*`hDestDC`*
The handle to the module whose executable contains the resource.
-*xDest*
+*`xDest`*
The x-coordinate, in logical units, of the upper left corner of the destination rectangle.
-*yDest*
+*`yDest`*
The y-coordinate, in logical units, of the upper left corner of the destination rectangle.
-*nDestWidth*
+*`nDestWidth`*
The width, in logical units, of the destination rectangle and source bitmap.
-*nDestHeight*
+*`nDestHeight`*
The height, in logical units, of the destination rectangle and source bitmap.
-*xSrc*
+*`xSrc`*
The logical x-coordinate of the upper left corner of the source bitmap.
-*ySrc*
+*`ySrc`*
The logical y-coordinate of the upper left corner of the source bitmap.
-*hbmMask*
+*`hbmMask`*
Handle to the monochrome mask bitmap combined with the color bitmap in the source device context.
-*xMask*
-The horizontal pixel offset for the mask bitmap specified by the *hbmMask* parameter.
+*`xMask`*
+The horizontal pixel offset for the mask bitmap specified by the *`hbmMask`* parameter.
-*yMask*
-The vertical pixel offset for the mask bitmap specified by the *hbmMask* parameter.
+*`yMask`*
+The vertical pixel offset for the mask bitmap specified by the *`hbmMask`* parameter.
-*dwROP*
+*`dwROP`*
Specifies both foreground and background ternary raster operation codes that the method uses to control the combination of source and destination data. The background raster operation code is stored in the high-order byte of the high-order word of this value; the foreground raster operation code is stored in the low-order byte of the high-order word of this value; the low-order word of this value is ignored, and should be zero. For a discussion of foreground and background in the context of this method, see `MaskBlt` in the Windows SDK. For a list of common raster operation codes, see `BitBlt` in the Windows SDK.
-*rectDest*
+*`rectDest`*
A reference to a `RECT` structure, identifying the destination.
-*pointSrc*
+*`pointSrc`*
A `POINT` structure indicating the upper left corner of the source rectangle.
-*pointMask*
+*`pointMask`*
A `POINT` structure indicating the upper left corner of the mask bitmap.
-*pointDest*
+*`pointDest`*
A reference to a `POINT` structure that identifies the upper left corner of the destination rectangle, in logical units.
### Return Value
@@ -1140,15 +1138,15 @@ Nonzero if successful, otherwise 0.
This method applies to Windows NT, versions 4.0 and later only.
-## CImage::operator HBITMAP
+## `CImage::operator HBITMAP`
-Use this operator to get the attached Windows GDI handle of the `CImage` object. This operator is a casting operator, which supports direct use of an HBITMAP object.
+Use this operator to get the attached Windows GDI handle of the `CImage` object. This operator is a casting operator, which supports direct use of an `HBITMAP` object.
-## CImage::PlgBlt
+## `CImage::PlgBlt`
Performs a bit-block transfer from a rectangle in a source device context into a parallelogram in a destination device context.
-```
+```cpp
BOOL PlgBlt(
HDC hDestDC,
const POINT* pPoints,
@@ -1175,38 +1173,38 @@ BOOL PlgBlt(
### Parameters
-*hDestDC*
+*`hDestDC`*
A handle to the destination device context.
-*pPoints*
+*`pPoints`*
A pointer to an array of three points in logical space that identify three corners of the destination parallelogram. The upper left corner of the source rectangle is mapped to the first point in this array, the upper-right corner to the second point in this array, and the lower left corner to the third point. The lower-right corner of the source rectangle is mapped to the implicit fourth point in the parallelogram.
-*hbmMask*
+*`hbmMask`*
A handle to an optional monochrome bitmap that is used to mask the colors of the source rectangle.
-*xSrc*
+*`xSrc`*
The x-coordinate, in logical units, of the upper left corner of the source rectangle.
-*ySrc*
+*`ySrc`*
The y-coordinate, in logical units, of the upper left corner of the source rectangle.
-*nSrcWidth*
+*`nSrcWidth`*
The width, in logical units, of the source rectangle.
-*nSrcHeight*
+*`nSrcHeight`*
The height, in logical units, of the source rectangle.
-*xMask*
+*`xMask`*
The x-coordinate of the upper left corner of the monochrome bitmap.
-*yMask*
+*`yMask`*
The y-coordinate of the upper left corner of the monochrome bitmap.
-*rectSrc*
-A reference to a [RECT](/windows/win32/api/windef/ns-windef-rect) structure specifying the coordinates of the source rectangle.
+*`rectSrc`*
+A reference to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure specifying the coordinates of the source rectangle.
-*pointMask*
-A [POINT](/windows/win32/api/windef/ns-windef-point) structure indicating the upper left corner of the mask bitmap.
+*`pointMask`*
+A [`POINT`](/windows/win32/api/windef/ns-windef-point) structure indicating the upper left corner of the mask bitmap.
### Return Value
@@ -1214,11 +1212,11 @@ Nonzero if successful, otherwise 0.
### Remarks
-If *hbmMask* identifies a valid monochrome bitmap, `PlgBit` uses this bitmap to mask the bits of color data from the source rectangle.
+If *`hbmMask`* identifies a valid monochrome bitmap, `PlgBit` uses this bitmap to mask the bits of color data from the source rectangle.
-This method applies to Windows NT, versions 4.0 and later only. See [PlgBlt](/windows/win32/api/wingdi/nf-wingdi-plgblt) in the Windows SDK for more detailed information.
+This method applies to Windows NT, versions 4.0 and later only. See [`PlgBlt`](/windows/win32/api/wingdi/nf-wingdi-plgblt) in the Windows SDK for more detailed information.
-## CImage::ReleaseDC
+## `CImage::ReleaseDC`
Releases the device context.
@@ -1228,9 +1226,9 @@ void ReleaseDC() const throw();
### Remarks
-Because only one bitmap can be selected into a device context at a time, you must call `ReleaseDC` for each call to [GetDC](#getdc).
+Because only one bitmap can be selected into a device context at a time, you must call `ReleaseDC` for each call to [`GetDC`](#getdc).
-## CImage::ReleaseGDIPlus
+## `CImage::ReleaseGDIPlus`
Releases resources used by GDI+.
@@ -1240,13 +1238,13 @@ void ReleaseGDIPlus() throw();
### Remarks
-This method must be called to free resources allocated by a global `CImage` object. See [CImage::CImage](#cimage).
+This method must be called to free resources allocated by a global `CImage` object. See [`CImage::CImage`](#cimage).
-## CImage::Save
+## `CImage::Save`
Saves an image to the specified stream or file on disk.
-```
+```cpp
HRESULT Save(
IStream* pStream,
REFGUID guidFileType) const throw();
@@ -1258,13 +1256,13 @@ HRESULT Save(
### Parameters
-*pStream*
+*`pStream`*
A pointer to a COM IStream object containing the file image data.
-*pszFileName*
+*`pszFileName`*
A pointer to the file name for the image.
-*guidFileType*
+*`guidFileType`*
The file type to save the image as. Can be one of the following:
- `ImageFormatBMP` An uncompressed bitmap image.
@@ -1280,13 +1278,13 @@ The file type to save the image as. Can be one of the following:
### Return Value
-A standard HRESULT.
+A standard `HRESULT`.
### Remarks
-Call this function to save the image using a specified name and type. If the *guidFileType* parameter is not included, the file name's file extension will be used to determine the image format. If no extension is provided, the image will be saved in BMP format.
+Call this function to save the image using a specified name and type. If the *`guidFileType`* parameter is not included, the file name's file extension will be used to determine the image format. If no extension is provided, the image will be saved in BMP format.
-## CImage::SetColorTable
+## `CImage::SetColorTable`
Sets the red, green, blue (RGB) color values for a range of entries in the palette of the DIB section.
@@ -1299,20 +1297,20 @@ void SetColorTable(
### Parameters
-*iFirstColor*
+*`iFirstColor`*
The color table index of the first entry to set.
-*nColors*
+*`nColors`*
The number of color table entries to set.
-*prgbColors*
-A pointer to the array of [RGBQUAD](/windows/win32/api/wingdi/ns-wingdi-rgbquad) structures to set the color table entries.
+*`prgbColors`*
+A pointer to the array of [`RGBQUAD`](/windows/win32/api/wingdi/ns-wingdi-rgbquad) structures to set the color table entries.
### Remarks
This method supports only DIB section bitmaps.
-## CImage::SetPixel
+## `CImage::SetPixel`
Sets the color of a pixel at a given location in the bitmap.
@@ -1322,22 +1320,22 @@ void SetPixel(int x, int y, COLORREF color) throw();
### Parameters
-*x*
+*`x`*
The horizontal location of the pixel to set.
-*y*
+*`y`*
The vertical location of the pixel to set.
-*color*
+*`color`*
The color to which you set the pixel.
### Remarks
This method fails if the pixel coordinates lie outside of the selected clipping region.
-## CImage::SetPixelIndexed
+## `CImage::SetPixelIndexed`
-Sets the pixel color to the color located at *iIndex* in the color palette.
+Sets the pixel color to the color located at *`iIndex`* in the color palette.
```cpp
void SetPixelIndexed(int x, int y, int iIndex) throw();
@@ -1345,18 +1343,18 @@ void SetPixelIndexed(int x, int y, int iIndex) throw();
### Parameters
-*x*
+*`x`*
The horizontal location of the pixel to set.
-*y*
+*`y`*
The vertical location of the pixel to set.
-*iIndex*
+*`iIndex`*
The index of a color in the color palette.
-## CImage::SetPixelRGB
+## `CImage::SetPixelRGB`
-Sets the pixel at the locations specified by *x* and *y* to the colors indicated by *r*, *g*, and *b*, in a red, green, blue (RGB) image.
+Sets the pixel at the locations specified by *`x`* and *`y`* to the colors indicated by *`r`*, *`g`*, and *`b`*, in a red, green, blue (RGB) image.
```cpp
void SetPixelRGB(
@@ -1369,47 +1367,47 @@ void SetPixelRGB(
### Parameters
-*x*
+*`x`*
The horizontal location of the pixel to set.
-*y*
+*`y`*
The vertical location of the pixel to set.
-*r*
+*`r`*
The intensity of the red color.
-*g*
+*`g`*
The intensity of the green color.
-*b*
+*`b`*
The intensity of the blue color.
### Remarks
The red, green, and blue parameters are each represented by a number between 0 and 255. If you set all three parameters to zero, the combined resulting color is black. If you set all three parameters to 255, the combined resulting color is white.
-## CImage::SetTransparentColor
+## `CImage::SetTransparentColor`
Sets a color at a given indexed location as transparent.
-```
+```cpp
LONG SetTransparentColor(LONG iTransparentColor) throw();
```
### Parameters
-*iTransparentColor*
+*`iTransparentColor`*
The index, in a color palette, of the color to set to transparent. If -1, no color is set to transparent.
### Return Value
The index of the color previously set as transparent.
-## CImage::StretchBlt
+## `CImage::StretchBlt`
Copies a bitmap from the source device context to this current device context.
-```
+```cpp
BOOL StretchBlt(
HDC hDestDC,
int xDest,
@@ -1444,40 +1442,40 @@ BOOL StretchBlt(
### Parameters
-*hDestDC*
+*`hDestDC`*
A handle to the destination device context.
-*xDest*
+*`xDest`*
The x-coordinate, in logical units, of the upper left corner of the destination rectangle.
-*yDest*
+*`yDest`*
The y-coordinate, in logical units, of the upper left corner of the destination rectangle.
-*nDestWidth*
+*`nDestWidth`*
The width, in logical units, of the destination rectangle.
-*nDestHeight*
+*`nDestHeight`*
The height, in logical units, of the destination rectangle.
-*dwROP*
-The raster operation to be performed. Raster-operation codes define exactly how to combine the bits of the source, the destination, and the pattern (as defined by the currently selected brush) to form the destination. See [BitBlt](/windows/win32/api/wingdi/nf-wingdi-bitblt) in the Windows SDK for a list of other raster-operation codes and their descriptions.
+*`dwROP`*
+The raster operation to be performed. Raster-operation codes define exactly how to combine the bits of the source, the destination, and the pattern (as defined by the currently selected brush) to form the destination. See [`BitBlt`](/windows/win32/api/wingdi/nf-wingdi-bitblt) in the Windows SDK for a list of other raster-operation codes and their descriptions.
-*rectDest*
-A reference to a [RECT](/windows/win32/api/windef/ns-windef-rect) structure, identifying the destination.
+*`rectDest`*
+A reference to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure, identifying the destination.
-*xSrc*
+*`xSrc`*
The x-coordinate, in logical units, of the upper left corner of the source rectangle.
-*ySrc*
+*`ySrc`*
The y-coordinate, in logical units, of the upper left corner of the source rectangle.
-*nSrcWidth*
+*`nSrcWidth`*
The width, in logical units, of the source rectangle.
-*nSrcHeight*
+*`nSrcHeight`*
The height, in logical units, of the source rectangle.
-*rectSrc*
+*`rectSrc`*
A reference to a `RECT` structure, identifying the source.
### Return Value
@@ -1486,13 +1484,13 @@ Nonzero if successful, otherwise 0.
### Remarks
-For more information, see [StretchBlt](/windows/win32/api/wingdi/nf-wingdi-stretchblt) in the Windows SDK.
+For more information, see [`StretchBlt`](/windows/win32/api/wingdi/nf-wingdi-stretchblt) in the Windows SDK.
-## CImage::TransparentBlt
+## `CImage::TransparentBlt`
Copies a bitmap from the source device context to this current device context.
-```
+```cpp
BOOL TransparentBlt(
HDC hDestDC,
int xDest,
@@ -1527,49 +1525,49 @@ BOOL TransparentBlt(
### Parameters
-*hDestDC*
+*`hDestDC`*
A handle to the destination device context.
-*xDest*
+*`xDest`*
The x-coordinate, in logical units, of the upper left corner of the destination rectangle.
-*yDest*
+*`yDest`*
The y-coordinate, in logical units, of the upper left corner of the destination rectangle.
-*nDestWidth*
+*`nDestWidth`*
The width, in logical units, of the destination rectangle.
-*nDestHeight*
+*`nDestHeight`*
The height, in logical units, of the destination rectangle.
-*crTransparent*
-The color in the source bitmap to treat as transparent. By default, CLR_INVALID, indicating that the color currently set as the transparent color of the image should be used.
+*`crTransparent`*
+The color in the source bitmap to treat as transparent. By default, `CLR_INVALID`, indicating that the color currently set as the transparent color of the image should be used.
-*rectDest*
-A reference to a [RECT](/windows/win32/api/windef/ns-windef-rect) structure, identifying the destination.
+*`rectDest`*
+A reference to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure, identifying the destination.
-*xSrc*
+*`xSrc`*
The x-coordinate, in logical units, of the upper left corner of the source rectangle.
-*ySrc*
+*`ySrc`*
The y-coordinate, in logical units, of the upper left corner of the source rectangle.
-*nSrcWidth*
+*`nSrcWidth`*
The width, in logical units, of the source rectangle.
-*nSrcHeight*
+*`nSrcHeight`*
The height, in logical units, of the source rectangle.
-*rectSrc*
+*`rectSrc`*
A reference to a `RECT` structure, identifying the source.
### Return Value
-TRUE if successful, otherwise FALSE.
+`TRUE` if successful, otherwise `FALSE`.
### Remarks
-`TransparentBlt` is supported for source bitmaps of 4 bits per pixel and 8 bits per pixel. Use [CImage::AlphaBlend](#alphablend) to specify 32 bits-per-pixel bitmaps with transparency.
+`TransparentBlt` is supported for source bitmaps of 4 bits per pixel and 8 bits per pixel. Use [`CImage::AlphaBlend`](#alphablend) to specify 32 bits-per-pixel bitmaps with transparency.
### Example
@@ -1602,10 +1600,9 @@ BOOL TransparentBlt(CImage* pSrcImage, CImage* pDstImage,
## See also
-[MMXSwarm Sample](../../overview/visual-cpp-samples.md)
-[SimpleImage Sample](../../overview/visual-cpp-samples.md)
+[`MMXSwarm` Sample](../../overview/visual-cpp-samples.md)
+[`SimpleImage` Sample](../../overview/visual-cpp-samples.md)
[Device-Independent Bitmaps](/windows/win32/gdi/device-independent-bitmaps)
-[CreateDIBSection](/windows/win32/api/wingdi/nf-wingdi-createdibsection)
+[`CreateDIBSection`](/windows/win32/api/wingdi/nf-wingdi-createdibsection)
[ATL COM Desktop Components](../../atl/atl-com-desktop-components.md)
-[Device-Independent Bitmaps](/windows/win32/gdi/device-independent-bitmaps)
-[CreateDIBSection](/windows/win32/api/wingdi/nf-wingdi-createdibsection)
+[Device-Independent Bitmaps](/windows/win32/gdi/device-independent-bitmaps)
diff --git a/docs/atl-mfc-shared/reference/classes-shared-by-mfc-and-atl.md b/docs/atl-mfc-shared/reference/classes-shared-by-mfc-and-atl.md
index 7f341a1595..bbcb2af079 100644
--- a/docs/atl-mfc-shared/reference/classes-shared-by-mfc-and-atl.md
+++ b/docs/atl-mfc-shared/reference/classes-shared-by-mfc-and-atl.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Classes Shared by MFC and ATL"
title: "Classes Shared by MFC and ATL"
ms.date: "11/04/2016"
helpviewer_keywords: ["shared classes, classes"]
@@ -20,7 +21,7 @@ The following table lists the classes shared between MFC and ATL.
|[CRect](../../atl-mfc-shared/reference/crect-class.md)|A class similar to a Windows [RECT](/windows/win32/api/windef/ns-windef-rect) structure that also includes member functions to manipulate `CRect` objects and Windows `RECT` structures.|atltypes.h|
|[CSimpleStringT](../../atl-mfc-shared/reference/csimplestringt-class.md)|Represents a `CSimpleStringT` object.|atlsimpstr.h|
|[CSize](../../atl-mfc-shared/reference/csize-class.md)|A class similar to the Windows [SIZE](/windows/win32/api/windef/ns-windef-size) structure, which implements a relative coordinate or position.|atltypes.h|
-|[CStrBufT](../../atl-mfc-shared/reference/cstrbuft-class.md)|Provides automatic resource cleanup for `GetBuffer` and `ReleaseBuffer` calls on a existing `CStringT` object.|atlsimpstr.h|
+|[CStrBufT](../../atl-mfc-shared/reference/cstrbuft-class.md)|Provides automatic resource cleanup for `GetBuffer` and `ReleaseBuffer` calls on an existing `CStringT` object.|atlsimpstr.h|
|[CStringData](../../atl-mfc-shared/reference/cstringdata-class.md)|Represents the data of a string object.|atlsimpstr.h|
|[CStringT](../../atl-mfc-shared/reference/cstringt-class.md)|Represents a `CStringT` object.|cstringt.h (MFC dependent) atlstr.h (MFC independent)|
|[CTime](../../atl-mfc-shared/reference/ctime-class.md)|Represents an absolute time and date.|atltime.h|
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 d2718a2ac1..5da193d9b9 100644
--- a/docs/atl-mfc-shared/reference/coledatetime-class.md
+++ b/docs/atl-mfc-shared/reference/coledatetime-class.md
@@ -1,9 +1,9 @@
---
title: "COleDateTime Class"
-ms.date: "03/27/2019"
+description: "API reference for the MFC COleDateTime class which Encapsulates the `DATE` data type used in OLE automation."
+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
@@ -11,7 +11,7 @@ Encapsulates the `DATE` data type that is used in OLE automation.
## Syntax
-```
+```cpp
class COleDateTime
```
@@ -83,7 +83,7 @@ The `DATE` type is implemented as a floating-point value. Days are measured from
> [!CAUTION]
> In the table above, although day values become negative before midnight on December 30, 1899, time-of-day values do not. For example, 6:00 AM is always represented by a fractional value 0.25 regardless of whether the integer representing the day is positive (after December 30, 1899) or negative (before December 30, 1899). This means that a simple floating point comparison would erroneously sort a `COleDateTime` representing 6:00 AM on 12/29/1899 as **later** than one representing 7:00 AM on the same day.
-The `COleDateTime` class handles dates from January 1, 100, through December 31, 9999. The `COleDateTime` class uses the Gregorian calendar; it does not support Julian dates. `COleDateTime` ignores Daylight Saving Time. (See [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).)
+The `COleDateTime` class handles dates from January 1, 100, through December 31, 9999. The `COleDateTime` class uses the Gregorian calendar; it does not support Julian dates. `COleDateTime` ignores Daylight Saving Time. (See [Date and Time: Automation Support](../date-and-time.md).)
> [!NOTE]
> You can use the `%y` format to retrieve a two-digit year only for dates starting at 1900. If you use the `%y` format on a date before 1900, the code generates an ASSERT failure.
@@ -98,7 +98,7 @@ To avoid problems, specify a four-digit date. For example:
Basic arithmetic operations for the `COleDateTime` values use the companion class [COleDateTimeSpan](../../atl-mfc-shared/reference/coledatetimespan-class.md). `COleDateTimeSpan` values define a time interval. The relationship between these classes is similar to the one between [CTime](../../atl-mfc-shared/reference/ctime-class.md) and [CTimeSpan](../../atl-mfc-shared/reference/ctimespan-class.md).
-For more information about the `COleDateTime` and `COleDateTimeSpan` classes, see the article [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).
+For more information about the `COleDateTime` and `COleDateTimeSpan` classes, see the article [Date and Time: Automation Support](../date-and-time.md).
## Requirements
@@ -108,7 +108,7 @@ For more information about the `COleDateTime` and `COleDateTimeSpan` classes, se
Comparison operators.
-```
+```cpp
bool operator==(const COleDateTime& date) const throw();
bool operator!=(const COleDateTime& date) const throw();
bool operator<(const COleDateTime& date) const throw();
@@ -127,12 +127,10 @@ The `COleDateTime` object to be compared.
> [!NOTE]
> An ATLASSERT will occur if either of the two operands is invalid.
-### Example
+### Examples
[!code-cpp[NVC_ATLMFC_Utilities#13](../../atl-mfc-shared/codesnippet/cpp/coledatetime-class_2.cpp)]
-### Example
-
The operators **>=**, **\<=**, **>**, and **<**, will assert if the `COleDateTime` object is set to null.
[!code-cpp[NVC_ATLMFC_Utilities#170](../../atl-mfc-shared/codesnippet/cpp/coledatetime-class_3.cpp)]
@@ -141,7 +139,7 @@ The operators **>=**, **\<=**, **>**, and **<**, will assert if the `COleDateTim
Constructs a `COleDateTime` object.
-```
+```cpp
COleDateTime() throw();
COleDateTime(const VARIANT& varSrc) throw();
COleDateTime(DATE dtSrc) throw();
@@ -212,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.
@@ -230,7 +228,7 @@ For more information on the `time_t` data type, see the [time](../../c-runtime-l
For more information, see the [SYSTEMTIME](/windows/win32/api/minwinbase/ns-minwinbase-systemtime) and [FILETIME](/windows/win32/api/minwinbase/ns-minwinbase-filetime) structures in the Windows SDK.
-For more information about the bounds for `COleDateTime` values, see the article [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).
+For more information about the bounds for `COleDateTime` values, see the article [Date and Time: Automation Support](../date-and-time.md).
> [!NOTE]
> The constructor using `DBTIMESTAMP` parameter is only available when OLEDB.h is included.
@@ -243,7 +241,7 @@ For more information about the bounds for `COleDateTime` values, see the article
Creates a formatted representation of the date/time value.
-```
+```cpp
CString Format(DWORD dwFlags = 0, LCID lcid = LANG_USER_DEFAULT) const;
CString Format(LPCTSTR lpszFormat) const;
CString Format(UINT nFormatID) const;
@@ -264,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
@@ -304,7 +302,7 @@ This form formats the value by using the format string which contains special fo
Call this method to obtain the time in the `COleDateTime` object as a `DBTIMESTAMP` data structure.
-```
+```cpp
bool GetAsDBTIMESTAMP(DBTIMESTAMP& timeStamp) const throw();
```
@@ -329,7 +327,7 @@ Stores the resulting time in the referenced *timeStamp* structure. The `DBTIMEST
Call this method to obtain the time in the `COleDateTime` object as a `SYSTEMTIME` data structure.
-```
+```cpp
bool GetAsSystemTime(SYSTEMTIME& sysTime) const throw();
```
@@ -352,7 +350,7 @@ For more information on the status information held in a `COleDateTime` object,
Call this method to obtain the time in the `COleDateTime` object as a `UDATE` data structure.
-```
+```cpp
bool GetAsUDATE(UDATE& uDate) const throw();
```
@@ -373,7 +371,7 @@ A `UDATE` structure represents an "unpacked" date.
Call this static member function to return the current date/time value.
-```
+```cpp
static COleDateTime WINAPI GetCurrentTime() throw();
```
@@ -385,7 +383,7 @@ static COleDateTime WINAPI GetCurrentTime() throw();
Gets the day of the month represented by this date/time value.
-```
+```cpp
int GetDay() const throw();
```
@@ -419,9 +417,9 @@ For information on other member functions that query the value of this `COleDate
## COleDateTime::GetDayOfWeek
-Gets the day of the month represented by this date/time value.
+Gets the day of the week represented by this date/time value.
-```
+```cpp
int GetDayOfWeek() const throw();
```
@@ -457,7 +455,7 @@ For information on other member functions that query the value of this `COleDate
Gets the day of the year represented by this date/time value.
-```
+```cpp
int GetDayOfYear() const throw();
```
@@ -493,7 +491,7 @@ For information on other member functions that query the value of this `COleDate
Gets the hour represented by this date/time value.
-```
+```cpp
int GetHour() const throw();
```
@@ -529,7 +527,7 @@ For information on other member functions that query the value of this `COleDate
Gets the minute represented by this date/time value.
-```
+```cpp
int GetMinute() const throw();
```
@@ -565,7 +563,7 @@ See the example for [GetHour](#gethour).
Gets the month represented by this date/time value.
-```
+```cpp
int GetMonth() const throw();
```
@@ -601,7 +599,7 @@ See the example for [GetDay](#getday).
Gets the second represented by this date/time value.
-```
+```cpp
int GetSecond() const throw();
```
@@ -616,7 +614,7 @@ Valid return values range between 0 and 59.
> [!NOTE]
> The `COleDateTime` class does not support leap seconds.
-For more information about the implementation for `COleDateTime`, see the article [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).
+For more information about the implementation for `COleDateTime`, see the article [Date and Time: Automation Support](../date-and-time.md).
For information on other member functions that query the value of this `COleDateTime` object, see the following member functions:
@@ -642,7 +640,7 @@ See the example for [GetHour](#gethour).
Gets the status (validity) of a given `COleDateTime` object.
-```
+```cpp
DateTimeStatus GetStatus() const throw();
```
@@ -654,7 +652,7 @@ Returns the status of this `COleDateTime` value. If you call `GetStatus` on a `C
The return value is defined by the `DateTimeStatus` enumerated type, which is defined within the `COleDateTime` class.
-```
+```cpp
enum DateTimeStatus
{
error = -1,
@@ -698,7 +696,7 @@ For more information about the operations that may set the status to invalid, se
- [operator +=, -=](#operator_add_eq_-_eq)
-For more information about the bounds for `COleDateTime` values, see the article [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).
+For more information about the bounds for `COleDateTime` values, see the article [Date and Time: Automation Support](../date-and-time.md).
### Example
@@ -708,7 +706,7 @@ For more information about the bounds for `COleDateTime` values, see the article
Gets the year represented by this date/time value.
-```
+```cpp
int GetYear() const throw();
```
@@ -736,7 +734,7 @@ For information on other member functions that query the value of this `COleDate
- [GetDayOfYear](#getdayofyear)
-For more information about the bounds for `COleDateTime` values, see the article [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).
+For more information about the bounds for `COleDateTime` values, see the article [Date and Time: Automation Support](../date-and-time.md).
### Example
@@ -746,7 +744,7 @@ See the example for [GetDay](#getday).
The underlying `DATE` structure for this `COleDateTime` object.
-```
+```cpp
DATE m_dt;
```
@@ -755,13 +753,13 @@ DATE m_dt;
> [!CAUTION]
> Changing the value in the `DATE` object accessed by the pointer returned by this function will change the value of this `COleDateTime` object. It does not change the status of this `COleDateTime` object.
-For more information about the implementation of the `DATE` object, see the article [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).
+For more information about the implementation of the `DATE` object, see the article [Date and Time: Automation Support](../date-and-time.md).
## COleDateTime::m_status
Contains the status of this `COleDateTime` object.
-```
+```cpp
DateTimeStatus m_status;
```
@@ -776,7 +774,7 @@ The type of this data member is the enumerated type `DateTimeStatus`, which is d
Copies a `COleDateTime` value.
-```
+```cpp
COleDateTime& operator=(const VARIANT& varSrc) throw();
COleDateTime& operator=(DATE dtSrc) throw();
COleDateTime& operator=(const time_t& timeSrc) throw();
@@ -810,13 +808,13 @@ For more information on the `time_t` data type, see the [time](../../c-runtime-l
For more information, see the [SYSTEMTIME](/windows/win32/api/minwinbase/ns-minwinbase-systemtime) and [FILETIME](/windows/win32/api/minwinbase/ns-minwinbase-filetime) structures in the Windows SDK.
-For more information about the bounds for `COleDateTime` values, see the article [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).
+For more information about the bounds for `COleDateTime` values, see the article [Date and Time: Automation Support](../date-and-time.md).
## COleDateTime::operator +, -
Add and subtract `ColeDateTime` values.
-```
+```cpp
COleDateTime operator+(COleDateTimeSpan dateSpan) const throw();
COleDateTime operator-(COleDateTimeSpan dateSpan) const throw();
COleDateTimeSpan operator-(const COleDateTime& date) const throw();
@@ -836,7 +834,7 @@ The **+** and **-** operators will assert if the `COleDateTime` object is set to
For more information on the valid, invalid, and null status values, see the [m_status](#m_status) member variable.
-For more information about the bounds for `COleDateTime` values, see the article [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).
+For more information about the bounds for `COleDateTime` values, see the article [Date and Time: Automation Support](../date-and-time.md).
### Example
@@ -846,7 +844,7 @@ For more information about the bounds for `COleDateTime` values, see the article
Add and subtract a `ColeDateTime` value from this `COleDateTime` object.
-```
+```cpp
COleDateTime& operator+=(COleDateTimeSpan dateSpan) throw();
COleDateTime& operator-=(COleDateTimeSpan dateSpan) throw();
```
@@ -863,19 +861,19 @@ For more information on the valid, invalid, and null status values, see the [m_s
The **+=** and **-=** operators will assert if the `COleDateTime` object is set to null. See [COleDateTime Relational Operators](#coledatetime_relational_operators) for an example.
-For more information about the bounds for `COleDateTime` values, see the article [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).
+For more information about the bounds for `COleDateTime` values, see the article [Date and Time: Automation Support](../date-and-time.md).
## COleDateTime::operator DATE
Converts a `ColeDateTime` value into a `DATE`.
-```
+```cpp
operator DATE() const throw();
```
### Remarks
-This operator returns a `DATE` object whose value is copied from this `COleDateTime` object. For more information about the implementation of the `DATE` object, see the article [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).
+This operator returns a `DATE` object whose value is copied from this `COleDateTime` object. For more information about the implementation of the `DATE` object, see the article [Date and Time: Automation Support](../date-and-time.md).
The `DATE` operator will assert if the `COleDateTime` object is set to null. See [COleDateTime Relational Operators](#coledatetime_relational_operators) for an example.
@@ -883,7 +881,7 @@ The `DATE` operator will assert if the `COleDateTime` object is set to null. See
Parses a string to read a date/time value.
-```
+```cpp
bool ParseDateTime(
LPCTSTR lpszDate,
DWORD dwFlags = 0,
@@ -938,13 +936,13 @@ In the case of VAR_DATEVALUEONLY, the time value is set to time 0, or midnight.
If the string could not be converted to a date/time value or if there was a numerical overflow, the status of this `COleDateTime` object is invalid.
-For more information about the bounds and implementation for `COleDateTime` values, see the article [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).
+For more information about the bounds and implementation for `COleDateTime` values, see the article [Date and Time: Automation Support](../date-and-time.md).
## COleDateTime::SetDate
Sets the date of this `COleDateTime` object.
-```
+```cpp
int SetDate(
int nYear,
int nMonth,
@@ -1011,7 +1009,7 @@ For information on member functions that query the value of this `COleDateTime`
- [GetDayOfYear](#getdayofyear)
-For more information about the bounds for `COleDateTime` values, see the article [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).
+For more information about the bounds for `COleDateTime` values, see the article [Date and Time: Automation Support](../date-and-time.md).
### Example
@@ -1021,7 +1019,7 @@ For more information about the bounds for `COleDateTime` values, see the article
Sets the date and time of this `COleDateTime` object.
-```
+```cpp
int SetDateTime(
int nYear,
int nMonth,
@@ -1095,7 +1093,7 @@ For information on member functions that query the value of this `COleDateTime`
- [GetDayOfYear](#getdayofyear)
-For more information about the bounds for `COleDateTime` values, see the article [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).
+For more information about the bounds for `COleDateTime` values, see the article [Date and Time: Automation Support](../date-and-time.md).
### Example
@@ -1129,7 +1127,7 @@ See the example for [GetStatus](#getstatus).
Sets the time of this `COleDateTime` object.
-```
+```cpp
int SetTime(
int nHour,
int nMin,
@@ -1188,7 +1186,7 @@ For information on member functions that query the value of this `COleDateTime`
- [GetDayOfYear](#getdayofyear)
-For more information about the bounds for `COleDateTime` values, see the article [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).
+For more information about the bounds for `COleDateTime` values, see the article [Date and Time: Automation Support](../date-and-time.md).
### Example
diff --git a/docs/atl-mfc-shared/reference/coledatetimespan-class.md b/docs/atl-mfc-shared/reference/coledatetimespan-class.md
index 1696713780..491074bbae 100644
--- a/docs/atl-mfc-shared/reference/coledatetimespan-class.md
+++ b/docs/atl-mfc-shared/reference/coledatetimespan-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: COleDateTimeSpan Class"
title: "COleDateTimeSpan Class"
ms.date: "03/27/2019"
f1_keywords: ["COleDateTimeSpan", "ATLCOMTIME/ATL::COleDateTimeSpan", "ATLCOMTIME/ATL::COleDateTimeSpan::COleDateTimeSpan", "ATLCOMTIME/ATL::COleDateTimeSpan::Format", "ATLCOMTIME/ATL::COleDateTimeSpan::GetDays", "ATLCOMTIME/ATL::COleDateTimeSpan::GetHours", "ATLCOMTIME/ATL::COleDateTimeSpan::GetMinutes", "ATLCOMTIME/ATL::COleDateTimeSpan::GetSeconds", "ATLCOMTIME/ATL::COleDateTimeSpan::GetStatus", "ATLCOMTIME/ATL::COleDateTimeSpan::GetTotalDays", "ATLCOMTIME/ATL::COleDateTimeSpan::GetTotalHours", "ATLCOMTIME/ATL::COleDateTimeSpan::GetTotalMinutes", "ATLCOMTIME/ATL::COleDateTimeSpan::GetTotalSeconds", "ATLCOMTIME/ATL::COleDateTimeSpan::SetDateTimeSpan", "ATLCOMTIME/ATL::COleDateTimeSpan::SetStatus", "ATLCOMTIME/ATL::COleDateTimeSpan::m_span", "ATLCOMTIME/ATL::COleDateTimeSpan::m_status"]
@@ -11,7 +12,7 @@ Represents a relative time, a time span.
## Syntax
-```
+```cpp
class COleDateTimeSpan
```
@@ -42,7 +43,7 @@ class COleDateTimeSpan
### Public Operators
-|||
+|Name|Description|
|-|-|
|[operator +, -](#operator_add_-)|Add, subtract, and change sign for `COleDateTimeSpan` values.|
|[operator +=, -=](#operator_add_eq_-_eq)|Add and subtract a `COleDateTimeSpan` value from this `COleDateTimeSpan` value.|
@@ -65,7 +66,7 @@ A `COleDateTimeSpan` keeps time in days.
`COleDateTimeSpan` is used with its companion class [COleDateTime](../../atl-mfc-shared/reference/coledatetime-class.md). `COleDateTime` encapsulates the `DATE` data type of OLE automation. `COleDateTime` represents absolute time values. All `COleDateTime` calculations involve `COleDateTimeSpan` values. The relation between these classes is analogous to the one between [CTime](../../atl-mfc-shared/reference/ctime-class.md) and [CTimeSpan](../../atl-mfc-shared/reference/ctimespan-class.md).
-For more information on the `COleDateTime` and `COleDateTimeSpan` classes, see the article [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).
+For more information on the `COleDateTime` and `COleDateTimeSpan` classes, see the article [Date and Time: Automation Support](../date-and-time.md).
## Requirements
@@ -75,7 +76,7 @@ For more information on the `COleDateTime` and `COleDateTimeSpan` classes, see t
Comparison operators.
-```
+```cpp
bool operator==(const COleDateTimeSpan& dateSpan) const throw();
bool operator!=(const COleDateTimeSpan& dateSpan) const throw();
bool operator<(const COleDateTimeSpan& dateSpan) const throw();
@@ -101,14 +102,14 @@ These operators compare two date/time-span values and return TRUE if the conditi
### Example
[!code-cpp[NVC_ATLMFC_Utilities#25](../../atl-mfc-shared/codesnippet/cpp/coledatetimespan-class_1.cpp)]
-
+
[!code-cpp[NVC_ATLMFC_Utilities#26](../../atl-mfc-shared/codesnippet/cpp/coledatetimespan-class_2.cpp)]
## COleDateTimeSpan::COleDateTimeSpan
Constructs a `COleDateTimeSpan` object.
-```
+```cpp
COleDateTimeSpan() throw();
COleDateTimeSpan(double dblSpanSrc) throw();
COleDateTimeSpan(LONG lDays, int nHours, int nMins, int nSecs) throw();
@@ -134,7 +135,7 @@ All of these constructors create new `COleDateTimeSpan` objects initialized to t
The status of the new `COleDateTimeSpan` object is set to valid.
-For more information about the bounds for `COleDateTimeSpan` values, see the article [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).
+For more information about the bounds for `COleDateTimeSpan` values, see the article [Date and Time: Automation Support](../date-and-time.md).
### Example
@@ -144,7 +145,7 @@ For more information about the bounds for `COleDateTimeSpan` values, see the art
Generates a formatted string representation of a `COleDateTimeSpan` object.
-```
+```cpp
CString Format(LPCTSTR pFormat) const;
CString Format(UINT nID) const;
```
@@ -193,7 +194,7 @@ This form formats the value using the format string that contains special format
Retrieves the day portion of this date/time-span value.
-```
+```cpp
LONG GetDays() const throw();
```
@@ -229,7 +230,7 @@ For other functions that query the value of a `COleDateTimeSpan` object, see the
Retrieves the hour portion of this date/time-span value.
-```
+```cpp
LONG GetHours() const throw();
```
@@ -265,7 +266,7 @@ For other functions that query the value of a `COleDateTimeSpan` object, see the
Retrieves the minute portion of this date/time-span value.
-```
+```cpp
LONG GetMinutes() const throw();
```
@@ -301,7 +302,7 @@ For other functions that query the value of a `COleDateTimeSpan` object, see the
Retrieves the second portion of this date/time-span value.
-```
+```cpp
LONG GetSeconds() const throw();
```
@@ -337,7 +338,7 @@ For other functions that query the value of a `COleDateTimeSpan` object, see the
Gets the status (validity) of this `COleDateTimeSpan` object.
-```
+```cpp
DateTimeSpanStatus GetStatus() const throw();
```
@@ -349,7 +350,7 @@ The status of this `COleDateTimeSpan` value.
The return value is defined by the `DateTimeSpanStatus` enumerated type, which is defined within the `COleDateTimeSpan` class.
-```
+```cpp
enum DateTimeSpanStatus{
valid = 0,
invalid = 1,
@@ -375,13 +376,13 @@ The status of a `COleDateTimeSpan` object is invalid in the following cases:
For more information about the operations that may set the status to invalid, see [COleDateTimeSpan::operator +, -](../../atl-mfc-shared/reference/coledatetime-class.md#operator_add_-) and [COleDateTimeSpan::operator +=, -=](../../atl-mfc-shared/reference/coledatetime-class.md#operator_add_eq_-_eq).
-For more information about the bounds for `COleDateTimeSpan` values, see the article [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).
+For more information about the bounds for `COleDateTimeSpan` values, see the article [Date and Time: Automation Support](../date-and-time.md).
## COleDateTimeSpan::GetTotalDays
Retrieves this date/time-span value expressed in days.
-```
+```cpp
double GetTotalDays() const throw();
```
@@ -417,7 +418,7 @@ For other functions that query the value of a `COleDateTimeSpan` object, see the
Retrieves this date/time-span value expressed in hours.
-```
+```cpp
double GetTotalHours() const throw();
```
@@ -453,7 +454,7 @@ See the example for [GetTotalDays](#gettotaldays).
Retrieves this date/time-span value expressed in minutes.
-```
+```cpp
double GetTotalMinutes() const throw();
```
@@ -489,7 +490,7 @@ See the example for [GetTotalDays](#gettotaldays).
Retrieves this date/time-span value expressed in seconds.
-```
+```cpp
double GetTotalSeconds() const throw();
```
@@ -525,7 +526,7 @@ See the example for [GetTotalDays](#gettotaldays).
The underlying **`double`** value for this `COleDateTime` object.
-```
+```cpp
double m_span;
```
@@ -540,13 +541,13 @@ This value expresses the date/time-span in days.
The type for this data member is the enumerated type `DateTimeSpanStatus`, which is defined within the `COleDateTimeSpan` class.
-```
+```cpp
DateTimeSpanStatus m_status;
```
### Remarks
-```
+```cpp
enum DateTimeSpanStatus{
valid = 0,
invalid = 1,
@@ -575,13 +576,13 @@ For more information about the operations that may set the status to invalid, se
> [!CAUTION]
> This data member is for advanced programming situations. You should use the inline member functions [GetStatus](#getstatus) and [SetStatus](#setstatus). See `SetStatus` for further cautions regarding explicitly setting this data member.
-For more information about the bounds for `COleDateTimeSpan` values, see the article [Date and Time: Automation Support](../../atl-mfc-shared/date-and-time-automation-support.md).
+For more information about the bounds for `COleDateTimeSpan` values, see the article [Date and Time: Automation Support](../date-and-time.md).
## COleDateTimeSpan::operator =
Copies a `COleDateTimeSpan` value.
-```
+```cpp
COleDateTimeSpan& operator=(double dblSpanSrc) throw();
```
@@ -593,7 +594,7 @@ This overloaded assignment operator copies the source date/time-span value into
Add, subtract, and change sign for `COleDateTimeSpan` values.
-```
+```cpp
COleDateTimeSpan operator+(const COleDateTimeSpan& dateSpan) const throw();
COleDateTimeSpan operator-(const COleDateTimeSpan& dateSpan) const throw();
COleDateTimeSpan operator-() const throw();
@@ -617,7 +618,7 @@ For more information on the valid, invalid, and null status values, see the [m_s
Add and subtract a `COleDateTimeSpan` value from this `COleDateTimeSpan` value.
-```
+```cpp
COleDateTimeSpan& operator+=(const COleDateTimeSpan dateSpan) throw();
COleDateTimeSpan& operator-=(const COleDateTimeSpan dateSpan) throw();
```
@@ -638,7 +639,7 @@ For more information on the valid, invalid, and null status values, see the [m_s
Converts this `COleDateTimeSpan` value to a **`double`**.
-```
+```cpp
operator double() const throw();
```
@@ -700,7 +701,7 @@ The new status value for this `COleDateTimeSpan` object.
The *Status* parameter value is defined by the `DateTimeSpanStatus` enumerated type, which is defined within the `COleDateTimeSpan` class.
-```
+```cpp
enum DateTimeSpanStatus{
valid = 0,
invalid = 1,
diff --git a/docs/atl-mfc-shared/reference/cpoint-class.md b/docs/atl-mfc-shared/reference/cpoint-class.md
index bfc0a63839..1636a18f6d 100644
--- a/docs/atl-mfc-shared/reference/cpoint-class.md
+++ b/docs/atl-mfc-shared/reference/cpoint-class.md
@@ -1,17 +1,17 @@
---
+description: "Learn more about: CPoint Class"
title: "CPoint Class"
ms.date: "11/04/2016"
f1_keywords: ["CPoint", "ATLTYPES/ATL::CPoint", "ATLTYPES/ATL::CPoint::CPoint", "ATLTYPES/ATL::CPoint::Offset"]
helpviewer_keywords: ["LPPOINT structure", "POINT structure", "CPoint class"]
-ms.assetid: a6d4db93-35cc-444d-9221-c3e160f6edaa
---
-# CPoint Class
+# `CPoint` Class
Similar to the Windows `POINT` structure.
## Syntax
-```
+```cpp
class CPoint : public tagPOINT
```
@@ -21,30 +21,30 @@ class CPoint : public tagPOINT
|Name|Description|
|----------|-----------------|
-|[CPoint::CPoint](#cpoint)|Constructs a `CPoint`.|
+|[`CPoint::CPoint`](#cpoint)|Constructs a `CPoint`.|
### Public Methods
|Name|Description|
|----------|-----------------|
-|[CPoint::Offset](#offset)|Adds values to the `x` and `y` members of the `CPoint`.|
+|[`CPoint::Offset`](#offset)|Adds values to the `x` and `y` members of the `CPoint`.|
### Public Operators
|Name|Description|
|----------|-----------------|
-|[CPoint::operator -](#operator_-)|Returns the difference of a `CPoint` and a size, or the negation of a point, or the size difference between two points, or the offset by a negative size.|
-|[CPoint::operator !=](#operator_neq)|Checks for inequality between two points.|
-|[CPoint::operator +](#operator_add)|Returns the sum of a `CPoint` and a size or point, or a `CRect` offset by a size.|
-|[CPoint::operator +=](#operator_add_eq)|Offsets `CPoint` by adding a size or point.|
-|[CPoint::operator -=](#operator_-_eq)|Offsets `CPoint` by subtracting a size or point.|
-|[CPoint::operator ==](#operator_eq_eq)|Checks for equality between two points.|
+|[`CPoint::operator -`](#operator_-)|Returns the difference of a `CPoint` and a `SIZE`, or the negation of a `POINT`, or the `CSize` difference between two `POINT`s, or the offset by a negative `SIZE`.|
+|[`CPoint::operator !=`](#operator_neq)|Checks for inequality between two `POINT`s.|
+|[`CPoint::operator +`](#operator_add)|Returns the sum of a `CPoint` and a `SIZE` or `POINT`, or a `CRect` offset by a `SIZE`.|
+|[`CPoint::operator +=`](#operator_add_eq)|Offsets `CPoint` by adding a `SIZE` or `POINT`.|
+|[`CPoint::operator -=`](#operator_-_eq)|Offsets `CPoint` by subtracting a `SIZE` or `POINT`.|
+|[`CPoint::operator ==`](#operator_eq_eq)|Checks for equality between two `POINT`s.|
## Remarks
-It also includes member functions to manipulate `CPoint` and [POINT](/windows/win32/api/windef/ns-windef-point) structures.
+It also includes member functions to manipulate `CPoint` and [`POINT`](/windows/win32/api/windef/ns-windef-point) structures.
-A `CPoint` object can be used wherever a `POINT` structure is used. The operators of this class that interact with a "size" accept either [CSize](../../atl-mfc-shared/reference/csize-class.md) objects or [SIZE](/windows/win32/api/windef/ns-windef-size) structures, since the two are interchangeable.
+A `CPoint` object can be used wherever a `POINT` structure is used. The operators of this class that interact with a `SIZE` accept either [`CSize`](../../atl-mfc-shared/reference/csize-class.md) objects or [`SIZE`](/windows/win32/api/windef/ns-windef-size) structures, since the two are interchangeable.
> [!NOTE]
> This class is derived from the `tagPOINT` structure. (The name `tagPOINT` is a less commonly used name for the `POINT` structure.) This means that the data members of the `POINT` structure, `x` and `y`, are accessible data members of `CPoint`.
@@ -60,13 +60,13 @@ A `CPoint` object can be used wherever a `POINT` structure is used. The operator
## Requirements
-**Header:** atltypes.h
+**Header:** `atltypes.h`
-## CPoint::CPoint
+## `CPoint::CPoint`
Constructs a `CPoint` object.
-```
+```cpp
CPoint() throw();
CPoint(int initX, int initY) throw();
CPoint(POINT initPt) throw();
@@ -76,20 +76,20 @@ CPoint(LPARAM dwPoint) throw();
### Parameters
-*initX*
+*`initX`*\
Specifies the value of the `x` member of `CPoint`.
-*initY*
+*`initY`*\
Specifies the value of the `y` member of `CPoint`.
-*initPt*
-[POINT](/windows/win32/api/windef/ns-windef-point) structure or `CPoint` that specifies the values used to initialize `CPoint`.
+*`initPt`*\
+[`POINT`](/windows/win32/api/windef/ns-windef-point) structure or `CPoint` that specifies the values used to initialize `CPoint`.
-*initSize*
-[SIZE](/windows/win32/api/windef/ns-windef-size) structure or [CSize](../../atl-mfc-shared/reference/csize-class.md) that specifies the values used to initialize `CPoint`.
+*`initSize`*\
+[`SIZE`](/windows/win32/api/windef/ns-windef-size) structure or [`CSize`](../../atl-mfc-shared/reference/csize-class.md) that specifies the values used to initialize `CPoint`.
-*dwPoint*
-Sets the `x` member to the low-order word of *dwPoint* and the `y` member to the high-order word of *dwPoint*.
+*`dwPoint`*\
+Sets the `x` member to the low-order word of *`dwPoint`* and the `y` member to the high-order word of *`dwPoint`*.
### Remarks
@@ -122,7 +122,7 @@ CPoint ptFromDouble(dwSize);
ASSERT(ptFromDouble == ptMFCHere);
```
-## CPoint::Offset
+## `CPoint::Offset`
Adds values to the `x` and `y` members of the `CPoint`.
@@ -134,46 +134,46 @@ void Offset(SIZE size) throw();
### Parameters
-*xOffset*
+*`xOffset`*\
Specifies the amount to offset the `x` member of the `CPoint`.
-*yOffset*
+*`yOffset`*\
Specifies the amount to offset the `y` member of the `CPoint`.
-*point*
-Specifies the amount ( [POINT](/windows/win32/api/windef/ns-windef-point) or `CPoint`) to offset the `CPoint`.
+*`point`*\
+Specifies the amount ([`POINT`](/windows/win32/api/windef/ns-windef-point) or `CPoint`) to offset the `CPoint`.
-*size*
-Specifies the amount ( [SIZE](/windows/win32/api/windef/ns-windef-size) or [CSize](../../atl-mfc-shared/reference/csize-class.md)) to offset the `CPoint`.
+*`size`*\
+Specifies the amount ([`SIZE`](/windows/win32/api/windef/ns-windef-size) or [`CSize`](../../atl-mfc-shared/reference/csize-class.md)) to offset the `CPoint`.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#28](../../atl-mfc-shared/codesnippet/cpp/cpoint-class_1.cpp)]
-## CPoint::operator ==
+## `CPoint::operator ==`
-Checks for equality between two points.
+Checks for equality between two `POINT`s.
-```
+```cpp
BOOL operator==(POINT point) const throw();
```
### Parameters
-*point*
-Contains a [POINT](/windows/win32/api/windef/ns-windef-point) structure or `CPoint` object.
+*`point`*\
+Contains a [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or `CPoint` object.
### Return Value
-Nonzero if the points are equal; otherwise 0.
+Nonzero if the `POINT`s are equal; otherwise 0.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#29](../../atl-mfc-shared/codesnippet/cpp/cpoint-class_2.cpp)]
-## CPoint::operator !=
+## `CPoint::operator !=`
-Checks for inequality between two points.
+Checks for inequality between two `POINT`s.
```
BOOL operator!=(POINT point) const throw();
@@ -181,20 +181,20 @@ BOOL operator!=(POINT point) const throw();
### Parameters
-*point*
-Contains a [POINT](/windows/win32/api/windef/ns-windef-point) structure or `CPoint` object.
+*`point`*\
+Contains a [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or `CPoint` object.
### Return Value
-Nonzero if the points are not equal; otherwise 0.
+Nonzero if the `POINT`s aren't equal; otherwise 0.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#30](../../atl-mfc-shared/codesnippet/cpp/cpoint-class_3.cpp)]
-## CPoint::operator +=
+## `CPoint::operator +=`
-The first overload adds a size to the `CPoint`.
+The first overload adds a `SIZE` to the `CPoint`.
```cpp
void operator+=(SIZE size) throw();
@@ -203,27 +203,27 @@ void operator+=(POINT point) throw();
### Parameters
-*size*
-Contains a [SIZE](/windows/win32/api/windef/ns-windef-size) structure or [CSize](../../atl-mfc-shared/reference/csize-class.md) object.
+*`size`*\
+Contains a [`SIZE`](/windows/win32/api/windef/ns-windef-size) structure or [`CSize`](../../atl-mfc-shared/reference/csize-class.md) object.
-*point*
-Contains a [POINT](/windows/win32/api/windef/ns-windef-point) structure or [CPoint](../../atl-mfc-shared/reference/cpoint-class.md) object.
+*`point`*\
+Contains a [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or [`CPoint`](../../atl-mfc-shared/reference/cpoint-class.md) object.
### Remarks
-The second overload adds a point to the `CPoint`.
+The second overload adds a `POINT` to the `CPoint`.
In both cases, addition is done by adding the `x` (or `cx`) member of the right-hand operand to the `x` member of the `CPoint` and adding the `y` (or `cy`) member of the right-hand operand to the `y` member of the `CPoint`.
-For example, adding `CPoint(5, -7)` to a variable which contains `CPoint(30, 40)` changes the variable to `CPoint(35, 33)`.
+For example, adding `CPoint(5, -7)` to a variable that contains `CPoint(30, 40)` changes the variable to `CPoint(35, 33)`.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#31](../../atl-mfc-shared/codesnippet/cpp/cpoint-class_4.cpp)]
-## CPoint::operator -=
+## `CPoint::operator -=`
-The first overload subtracts a size from the `CPoint`.
+The first overload subtracts a `SIZE` from the `CPoint`.
```cpp
void operator-=(SIZE size) throw();
@@ -232,29 +232,29 @@ void operator-=(POINT point) throw();
### Parameters
-*size*
-Contains a [SIZE](/windows/win32/api/windef/ns-windef-size) structure or [CSize](../../atl-mfc-shared/reference/csize-class.md) object.
+*`size`*\
+Contains a [`SIZE`](/windows/win32/api/windef/ns-windef-size) structure or [`CSize`](../../atl-mfc-shared/reference/csize-class.md) object.
-*point*
-Contains a [POINT](/windows/win32/api/windef/ns-windef-point) structure or [CPoint](../../atl-mfc-shared/reference/cpoint-class.md) object.
+*`point`*\
+Contains a [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or [`CPoint`](../../atl-mfc-shared/reference/cpoint-class.md) object.
### Remarks
-The second overload subtracts a point from the `CPoint`.
+The second overload subtracts a `POINT` from the `CPoint`.
In both cases, subtraction is done by subtracting the `x` (or `cx`) member of the right-hand operand from the `x` member of the `CPoint` and subtracting the `y` (or `cy`) member of the right-hand operand from the `y` member of the `CPoint`.
-For example, subtracting `CPoint(5, -7)` from a variable which contains `CPoint(30, 40)` changes the variable to `CPoint(25, 47)`.
+For example, subtracting `CPoint(5, -7)` from a variable that contains `CPoint(30, 40)` changes the variable to `CPoint(25, 47)`.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#32](../../atl-mfc-shared/codesnippet/cpp/cpoint-class_5.cpp)]
-## CPoint::operator +
+## `CPoint::operator +`
Use this operator to offset `CPoint` by a `CPoint` or `CSize` object, or to offset a `CRect` by a `CPoint`.
-```
+```cpp
CPoint operator+(SIZE size) const throw();
CPoint operator+(POINT point) const throw();
CRect operator+(const RECT* lpRect) const throw();
@@ -262,34 +262,34 @@ CRect operator+(const RECT* lpRect) const throw();
### Parameters
-*size*
-Contains a [SIZE](/windows/win32/api/windef/ns-windef-size) structure or [CSize](../../atl-mfc-shared/reference/csize-class.md) object.
+*`size`*\
+Contains a [`SIZE`](/windows/win32/api/windef/ns-windef-size) structure or [`CSize`](../../atl-mfc-shared/reference/csize-class.md) object.
-*point*
-Contains a [POINT](/windows/win32/api/windef/ns-windef-point) structure or [CPoint](../../atl-mfc-shared/reference/cpoint-class.md) object.
+*`point`*\
+Contains a [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or [`CPoint`](../../atl-mfc-shared/reference/cpoint-class.md) object.
-*lpRect*
-Contains a pointer to a [RECT](/windows/win32/api/windef/ns-windef-rect) structure or [CRect](../../atl-mfc-shared/reference/crect-class.md) object.
+*`lpRect`*\
+Contains a pointer to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure or [`CRect`](../../atl-mfc-shared/reference/crect-class.md) object.
### Return Value
-A `CPoint` that is offset by a size, a `CPoint` that is offset by a point, or a `CRect` offset by a point.
+A `CPoint` that is offset by a `SIZE`, a `CPoint` that is offset by a `POINT`, or a `CRect` offset by a `POINT`.
### Remarks
For example, using one of the first two overloads to offset the point `CPoint(25, -19)` by a point `CPoint(15, 5)` or size `CSize(15, 5)` returns the value `CPoint(40, -14)`.
-Adding a rectangle to a point returns the rectangle after being offset by the `x` and `y` values specified in the point. For example, using the last overload to offset a rectangle `CRect(125, 219, 325, 419)` by a point `CPoint(25, -19)` returns `CRect(150, 200, 350, 400)`.
+Adding a `CRect` to a `POINT` returns the `CRect` after being offset by the `x` and `y` values specified in the `POINT`. For example, using the last overload to offset a rectangle `CRect(125, 219, 325, 419)` by a point `CPoint(25, -19)` returns `CRect(150, 200, 350, 400)`.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#33](../../atl-mfc-shared/codesnippet/cpp/cpoint-class_6.cpp)]
-## CPoint::operator -
+## `CPoint::operator -`
Use one of the first two overloads to subtract a `CPoint` or `CSize` object from `CPoint`.
-```
+```cpp
CSize operator-(POINT point) const throw();
CPoint operator-(SIZE size) const throw();
CRect operator-(const RECT* lpRect) const throw();
@@ -298,18 +298,18 @@ CPoint operator-() const throw();
### Parameters
-*point*
-A [POINT](/windows/win32/api/windef/ns-windef-point) structure or [CPoint](../../atl-mfc-shared/reference/cpoint-class.md) object.
+*`point`*\
+A [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or [`CPoint`](../../atl-mfc-shared/reference/cpoint-class.md) object.
-*size*
-A [SIZE](/windows/win32/api/windef/ns-windef-size) structure or [CSize](../../atl-mfc-shared/reference/csize-class.md) object.
+*`size`*\
+A [`SIZE`](/windows/win32/api/windef/ns-windef-size) structure or [`CSize`](../../atl-mfc-shared/reference/csize-class.md) object.
-*lpRect*
-A pointer to a [RECT](/windows/win32/api/windef/ns-windef-rect) structure or a [CRect](../../atl-mfc-shared/reference/crect-class.md) object.
+*`lpRect`*\
+A pointer to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure or a [`CRect`](../../atl-mfc-shared/reference/crect-class.md) object.
### Return Value
-A `CSize` that is the difference between two points, a `CPoint` that is offset by the negation of a size, a `CRect` that is offset by the negation of a point, or a `CPoint` that is the negation of a point.
+A `CSize` that is the difference between two `POINT`s, a `CPoint` that is offset by the negation of a `SIZE`, a `CRect` that is offset by the negation of a `POINT`, or a `CPoint` that is the negation of a `POINT`.
### Remarks
@@ -319,9 +319,9 @@ For example, using the first overload to find the difference between two points
Subtracting a `CSize` from `CPoint` does the same calculation as above but returns a `CPoint` object, not a `CSize` object. For example, using the second overload to find the difference between the point `CPoint(25, -19)` and the size `CSize(15, 5)` returns `CPoint(10, -24)`.
-Subtracting a rectangle from a point returns the rectangle offset by the negatives of the `x` and `y` values specified in the point. For example, using the last overload to offset the rectangle `CRect(125, 200, 325, 400)` by the point `CPoint(25, -19)` returns `CRect(100, 219, 300, 419)`.
+Subtracting a rectangle from a `POINT` returns the rectangle offset by the negatives of the `x` and `y` values specified in the `POINT`. For example, using the last overload to offset the rectangle `CRect(125, 200, 325, 400)` by the point `CPoint(25, -19)` returns `CRect(100, 219, 300, 419)`.
-Use the unary operator to negate a point. For example, using the unary operator with the point `CPoint(25, -19)` returns `CPoint(-25, 19)`.
+Use the unary operator to negate a `POINT`. For example, using the unary operator with the point `CPoint(25, -19)` returns `CPoint(-25, 19)`.
### Example
@@ -329,8 +329,8 @@ Use the unary operator to negate a point. For example, using the unary operator
## See also
-[MFC Sample MDI](../../overview/visual-cpp-samples.md)
-[Hierarchy Chart](../../mfc/hierarchy-chart.md)
-[POINT Structure](/windows/win32/api/windef/ns-windef-point)
-[CRect Class](../../atl-mfc-shared/reference/crect-class.md)
-[CSize Class](../../atl-mfc-shared/reference/csize-class.md)
+[MFC Sample MDI](../../overview/visual-cpp-samples.md)\
+[Hierarchy Chart](../../mfc/hierarchy-chart.md)\
+[`POINT` Structure](/windows/win32/api/windef/ns-windef-point)\
+[`CRect` Class](../../atl-mfc-shared/reference/crect-class.md)\
+[`CSize` Class](../../atl-mfc-shared/reference/csize-class.md)
diff --git a/docs/atl-mfc-shared/reference/crect-class.md b/docs/atl-mfc-shared/reference/crect-class.md
index fdf150d45e..a213a9fcb6 100644
--- a/docs/atl-mfc-shared/reference/crect-class.md
+++ b/docs/atl-mfc-shared/reference/crect-class.md
@@ -1,17 +1,17 @@
---
title: "CRect Class"
-ms.date: "11/06/2018"
+description: "Learn more about: CRect Class"
+ms.date: 11/06/2018
f1_keywords: ["CRect", "ATLTYPES/ATL::CRect", "ATLTYPES/ATL::CRect::CRect", "ATLTYPES/ATL::CRect::BottomRight", "ATLTYPES/ATL::CRect::CenterPoint", "ATLTYPES/ATL::CRect::CopyRect", "ATLTYPES/ATL::CRect::DeflateRect", "ATLTYPES/ATL::CRect::EqualRect", "ATLTYPES/ATL::CRect::Height", "ATLTYPES/ATL::CRect::InflateRect", "ATLTYPES/ATL::CRect::IntersectRect", "ATLTYPES/ATL::CRect::IsRectEmpty", "ATLTYPES/ATL::CRect::IsRectNull", "ATLTYPES/ATL::CRect::MoveToX", "ATLTYPES/ATL::CRect::MoveToXY", "ATLTYPES/ATL::CRect::MoveToY", "ATLTYPES/ATL::CRect::NormalizeRect", "ATLTYPES/ATL::CRect::OffsetRect", "ATLTYPES/ATL::CRect::PtInRect", "ATLTYPES/ATL::CRect::SetRect", "ATLTYPES/ATL::CRect::SetRectEmpty", "ATLTYPES/ATL::CRect::Size", "ATLTYPES/ATL::CRect::SubtractRect", "ATLTYPES/ATL::CRect::TopLeft", "ATLTYPES/ATL::CRect::UnionRect", "ATLTYPES/ATL::CRect::Width"]
helpviewer_keywords: ["LPCRECT data type", "CRect class", "LPRECT operator", "RECT structure"]
-ms.assetid: dee4e752-15d6-4db4-b68f-1ad65b2ed6ca
---
-# CRect Class
+# `CRect` Class
-Similar to a Windows [RECT](/windows/win32/api/windef/ns-windef-rect) structure.
+Similar to a Windows [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure.
## Syntax
-```
+```cpp
class CRect : public tagRECT
```
@@ -21,53 +21,53 @@ class CRect : public tagRECT
|Name|Description|
|----------|-----------------|
-|[CRect::CRect](#crect)|Constructs a `CRect` object.|
+|[`CRect::CRect`](#crect)|Constructs a `CRect` object.|
### Public Methods
|Name|Description|
|----------|-----------------|
-|[CRect::BottomRight](#bottomright)|Returns the bottom-right point of `CRect`.|
-|[CRect::CenterPoint](#centerpoint)|Returns the centerpoint of `CRect`.|
-|[CRect::CopyRect](#copyrect)|Copies the dimensions of a source rectangle to `CRect`.|
-|[CRect::DeflateRect](#deflaterect)|Decreases the width and height of `CRect`.|
-|[CRect::EqualRect](#equalrect)|Determines whether `CRect` is equal to the given rectangle.|
-|[CRect::Height](#height)|Calculates the height of `CRect`.|
-|[CRect::InflateRect](#inflaterect)|Increases the width and height of `CRect`.|
-|[CRect::IntersectRect](#intersectrect)|Sets `CRect` equal to the intersection of two rectangles.|
-|[CRect::IsRectEmpty](#isrectempty)|Determines whether `CRect` is empty. `CRect` is empty if the width and/or height are 0.|
-|[CRect::IsRectNull](#isrectnull)|Determines whether the `top`, `bottom`, `left`, and `right` member variables are all equal to 0.|
-|[CRect::MoveToX](#movetox)|Moves `CRect` to the specified x-coordinate.|
-|[CRect::MoveToXY](#movetoxy)|Moves `CRect` to the specified x- and y-coordinates.|
-|[CRect::MoveToY](#movetoy)|Moves `CRect` to the specified y-coordinate.|
-|[CRect::NormalizeRect](#normalizerect)|Standardizes the height and width of `CRect`.|
-|[CRect::OffsetRect](#offsetrect)|Moves `CRect` by the specified offsets.|
-|[CRect::PtInRect](#ptinrect)|Determines whether the specified point lies within `CRect`.|
-|[CRect::SetRect](#setrect)|Sets the dimensions of `CRect`.|
-|[CRect::SetRectEmpty](#setrectempty)|Sets `CRect` to an empty rectangle (all coordinates equal to 0).|
-|[CRect::Size](#size)|Calculates the size of `CRect`.|
-|[CRect::SubtractRect](#subtractrect)|Subtracts one rectangle from another.|
-|[CRect::TopLeft](#topleft)|Returns the top-left point of `CRect`.|
-|[CRect::UnionRect](#unionrect)|Sets `CRect` equal to the union of two rectangles.|
-|[CRect::Width](#width)|Calculates the width of `CRect`.|
+|[`CRect::BottomRight`](#bottomright)|Returns the bottom-right point of `CRect`.|
+|[`CRect::CenterPoint`](#centerpoint)|Returns the centerpoint of `CRect`.|
+|[`CRect::CopyRect`](#copyrect)|Copies the dimensions of a source rectangle to `CRect`.|
+|[`CRect::DeflateRect`](#deflaterect)|Decreases the width and height of `CRect`.|
+|[`CRect::EqualRect`](#equalrect)|Determines whether `CRect` is equal to the given rectangle.|
+|[`CRect::Height`](#height)|Calculates the height of `CRect`.|
+|[`CRect::InflateRect`](#inflaterect)|Increases the width and height of `CRect`.|
+|[`CRect::IntersectRect`](#intersectrect)|Sets `CRect` equal to the intersection of two rectangles.|
+|[`CRect::IsRectEmpty`](#isrectempty)|Determines whether `CRect` is empty. `CRect` is empty if the width and/or height are 0.|
+|[`CRect::IsRectNull`](#isrectnull)|Determines whether the `top`, `bottom`, `left`, and `right` member variables are all equal to 0.|
+|[`CRect::MoveToX`](#movetox)|Moves `CRect` to the specified x-coordinate.|
+|[`CRect::MoveToXY`](#movetoxy)|Moves `CRect` to the specified x- and y-coordinates.|
+|[`CRect::MoveToY`](#movetoy)|Moves `CRect` to the specified y-coordinate.|
+|[`CRect::NormalizeRect`](#normalizerect)|Standardizes the height and width of `CRect`.|
+|[`CRect::OffsetRect`](#offsetrect)|Moves `CRect` by the specified offsets.|
+|[`CRect::PtInRect`](#ptinrect)|Determines whether the specified point lies within `CRect`.|
+|[`CRect::SetRect`](#setrect)|Sets the dimensions of `CRect`.|
+|[`CRect::SetRectEmpty`](#setrectempty)|Sets `CRect` to an empty rectangle (all coordinates equal to 0).|
+|[`CRect::Size`](#size)|Calculates the size of `CRect`.|
+|[`CRect::SubtractRect`](#subtractrect)|Subtracts one rectangle from another.|
+|[`CRect::TopLeft`](#topleft)|Returns the top-left point of `CRect`.|
+|[`CRect::UnionRect`](#unionrect)|Sets `CRect` equal to the union of two rectangles.|
+|[`CRect::Width`](#width)|Calculates the width of `CRect`.|
### Public Operators
|Name|Description|
|----------|-----------------|
-|[CRect::operator -](#operator_-)|Subtracts the given offsets from `CRect` or deflates `CRect` and returns the resulting `CRect`.|
-|[CRect::operator LPCRECT](#operator_lpcrect)|Converts a `CRect` to an `LPCRECT`.|
-|[CRect::operator LPRECT](#operator_lprect)|Converts a `CRect` to an `LPRECT`.|
-|[CRect::operator !=](#operator_neq)|Determines whether `CRect` is not equal to a rectangle.|
-|[CRect::operator &](#operator_amp)|Creates the intersection of `CRect` and a rectangle and returns the resulting `CRect`.|
-|[CRect::operator &=](#operator_amp_eq)|Sets `CRect` equal to the intersection of `CRect` and a rectangle.|
-|[CRect::operator |](#operator_or)|Creates the union of `CRect` and a rectangle and returns the resulting `CRect`.|
-|[CRect::operator |=](#operator_or_eq)|Sets `CRect` equal to the union of `CRect` and a rectangle.|
-|[CRect::operator +](#operator_add)|Adds the given offsets to `CRect` or inflates `CRect` and returns the resulting `CRect`.|
-|[CRect::operator +=](#operator_add_eq)|Adds the specified offsets to `CRect` or inflates `CRect`.|
-|[CRect::operator =](#operator_eq)|Copies the dimensions of a rectangle to `CRect`.|
-|[CRect::operator -=](#operator_-_eq)|Subtracts the specified offsets from `CRect` or deflates `CRect`.|
-|[CRect::operator ==](#operator_eq_eq)|Determines whether `CRect` is equal to a rectangle.|
+|[`CRect::operator -`](#operator_-)|Subtracts the given offsets from `CRect` or deflates `CRect` and returns the resulting `CRect`.|
+|[`CRect::operator LPCRECT`](#operator_lpcrect)|Converts a `CRect` to an `LPCRECT`.|
+|[`CRect::operator LPRECT`](#operator_lprect)|Converts a `CRect` to an `LPRECT`.|
+|[`CRect::operator !=`](#operator_neq)|Determines whether `CRect` is not equal to a rectangle.|
+|[`CRect::operator &`](#operator_amp)|Creates the intersection of `CRect` and a rectangle and returns the resulting `CRect`.|
+|[`CRect::operator &=`](#operator_amp_eq)|Sets `CRect` equal to the intersection of `CRect` and a rectangle.|
+|[`CRect::operator |`](#operator_or)|Creates the union of `CRect` and a rectangle and returns the resulting `CRect`.|
+|[`CRect::operator |=`](#operator_or_eq)|Sets `CRect` equal to the union of `CRect` and a rectangle.|
+|[`CRect::operator +`](#operator_add)|Adds the given offsets to `CRect` or inflates `CRect` and returns the resulting `CRect`.|
+|[`CRect::operator +=`](#operator_add_eq)|Adds the specified offsets to `CRect` or inflates `CRect`.|
+|[`CRect::operator =`](#operator_eq)|Copies the dimensions of a rectangle to `CRect`.|
+|[`CRect::operator -=`](#operator_-_eq)|Subtracts the specified offsets from `CRect` or deflates `CRect`.|
+|[`CRect::operator ==`](#operator_eq_eq)|Determines whether `CRect` is equal to a rectangle.|
## Remarks
@@ -80,11 +80,11 @@ A `CRect` object can be passed as a function parameter wherever a `RECT` structu
A `CRect` contains member variables that define the top-left and bottom-right points of a rectangle.
-When specifying a `CRect`, you must be careful to construct it so that it is normalized — in other words, such that the value of the left coordinate is less than the right and the top is less than the bottom. For example, a top left of (10,10) and bottom right of (20,20) defines a normalized rectangle but a top left of (20,20) and bottom right of (10,10) defines a non-normalized rectangle. If the rectangle is not normalized, many `CRect` member functions may return incorrect results. (See [CRect::NormalizeRect](#normalizerect) for a list of these functions.) Before you call a function that requires normalized rectangles, you can normalize non-normalized rectangles by calling the `NormalizeRect` function.
+When specifying a `CRect`, you must be careful to construct it so that it is normalized — in other words, such that the value of the left coordinate is less than the right and the top is less than the bottom. For example, a top left of (10,10) and bottom right of (20,20) defines a normalized rectangle but a top left of (20,20) and bottom right of (10,10) defines a non-normalized rectangle. If the rectangle is not normalized, many `CRect` member functions may return incorrect results. (See [`CRect::NormalizeRect`](#normalizerect) for a list of these functions.) Before you call a function that requires normalized rectangles, you can normalize non-normalized rectangles by calling the `NormalizeRect` function.
-Use caution when manipulating a `CRect` with the [CDC::DPtoLP](../../mfc/reference/cdc-class.md#dptolp) and [CDC::LPtoDP](../../mfc/reference/cdc-class.md#lptodp) member functions. If the mapping mode of a display context is such that the y-extent is negative, as in `MM_LOENGLISH`, then `CDC::DPtoLP` will transform the `CRect` so that its top is greater than the bottom. Functions such as `Height` and `Size` will then return negative values for the height of the transformed `CRect`, and the rectangle will be non-normalized.
+Use caution when manipulating a `CRect` with the [`CDC::DPtoLP`](../../mfc/reference/cdc-class.md#dptolp) and [`CDC::LPtoDP`](../../mfc/reference/cdc-class.md#lptodp) member functions. If the mapping mode of a display context is such that the y-extent is negative, as in `MM_LOENGLISH`, then `CDC::DPtoLP` will transform the `CRect` so that its top is greater than the bottom. Functions such as `Height` and `Size` will then return negative values for the height of the transformed `CRect`, and the rectangle will be non-normalized.
-When using overloaded `CRect` operators, the first operand must be a `CRect`; the second can be either a [RECT](/windows/win32/api/windef/ns-windef-rect) structure or a `CRect` object.
+When using overloaded `CRect` operators, the first operand must be a `CRect`; the second can be either a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure or a `CRect` object.
## Inheritance Hierarchy
@@ -94,11 +94,11 @@ When using overloaded `CRect` operators, the first operand must be a `CRect`; th
## Requirements
-**Header:** atltypes.h
+**Header:** `atltypes.h`
-## CRect::BottomRight
+## `CRect::BottomRight`
-The coordinates are returned as a reference to a [CPoint](cpoint-class.md) object that is contained in `CRect`.
+The coordinates are returned as a reference to a [`CPoint`](cpoint-class.md) object that is contained in `CRect`.
```
CPoint& BottomRight() throw();
@@ -139,7 +139,7 @@ rect2.BottomRight() = ptLow;
ASSERT(rect2 == CRect(10, 10, 180, 180));
```
-## CRect::CenterPoint
+## `CRect::CenterPoint`
Calculates the centerpoint of `CRect` by adding the left and right values and dividing by two, and adding the top and bottom values and dividing by two.
@@ -202,7 +202,7 @@ void CMyDlg::OnPaint()
}
```
-## CRect::CopyRect
+## `CRect::CopyRect`
Copies the `lpSrcRect` rectangle into `CRect`.
@@ -212,8 +212,8 @@ void CopyRect(LPCRECT lpSrcRect) throw();
### Parameters
-*lpSrcRect*
-Points to the [RECT](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` object that is to be copied.
+*`lpSrcRect`*
+Points to the [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` object that is to be copied.
### Example
@@ -237,7 +237,7 @@ rectDest.CopyRect(&rectSource2);
// rectDest is now set to (0, 0, 640, 480)
```
-## CRect::CRect
+## `CRect::CRect`
Constructs a `CRect` object.
@@ -252,47 +252,47 @@ CRect(POINT topLeft, POINT bottomRight) throw();
### Parameters
-*l*
+*`l`*
Specifies the left position of `CRect`.
-*t*
+*`t`*
Specifies the top of `CRect`.
-*r*
+*`r`*
Specifies the right position of `CRect`.
-*b*
+*`b`*
Specifies the bottom of `CRect`.
-*srcRect*
-Refers to the [RECT](/windows/win32/api/windef/ns-windef-rect) structure with the coordinates for `CRect`.
+*`srcRect`*
+Refers to the [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure with the coordinates for `CRect`.
-*lpSrcRect*
+*`lpSrcRect`*
Points to the `RECT` structure with the coordinates for `CRect`.
-*point*
+*`point`*
Specifies the origin point for the rectangle to be constructed. Corresponds to the top-left corner.
-*size*
+*`size`*
Specifies the displacement from the top-left corner to the bottom-right corner of the rectangle to be constructed.
-*topLeft*
+*`topLeft`*
Specifies the top-left position of `CRect`.
-*bottomRight*
+*`bottomRight`*
Specifies the bottom-right position of `CRect`.
### Remarks
-If no arguments are given, `left`, `top`, `right`, and `bottom` members are not initialized.
+If no arguments are given, `left`, `top`, `right`, and `bottom` members are set to 0.
-The `CRect`(`const RECT&`) and `CRect`(`LPCRECT`) constructors perform a [CopyRect](#copyrect). The other constructors initialize the member variables of the object directly.
+The `CRect`(`const RECT&`) and `CRect`(`LPCRECT`) constructors perform a [`CopyRect`](#copyrect). The other constructors initialize the member variables of the object directly.
### Example
```cpp
-// default constructor doesn't initialize!
-CRect rectUnknown;
+// default constructor is equivalent to CRect(0, 0, 0, 0)
+CRect emptyRect;
// four-integers are left, top, right, and bottom
CRect rect(0, 0, 100, 50);
@@ -326,7 +326,7 @@ CRect rect5(pt, ptBottomRight);
ASSERT(rect5 == rect4);
```
-## CRect::DeflateRect
+## `CRect::DeflateRect`
`DeflateRect` deflates `CRect` by moving its sides toward its center.
@@ -339,35 +339,35 @@ void DeflateRect(int l, int t, int r, int b) throw();
### Parameters
-*x*
+*`x`*
Specifies the number of units to deflate the left and right sides of `CRect`.
-*y*
+*`y`*
Specifies the number of units to deflate the top and bottom of `CRect`.
-*size*
-A [SIZE](/windows/win32/api/windef/ns-windef-size) or [CSize](csize-class.md) that specifies the number of units to deflate `CRect`. The `cx` value specifies the number of units to deflate the left and right sides and the `cy` value specifies the number of units to deflate the top and bottom.
+*`size`*
+A [`SIZE`](/windows/win32/api/windef/ns-windef-size) or [`CSize`](csize-class.md) that specifies the number of units to deflate `CRect`. The `cx` value specifies the number of units to deflate the left and right sides and the `cy` value specifies the number of units to deflate the top and bottom.
-*lpRect*
-Points to a [RECT](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` that specifies the number of units to deflate each side.
+*`lpRect`*
+Points to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` that specifies the number of units to deflate each side.
-*l*
+*`l`*
Specifies the number of units to deflate the left side of `CRect`.
-*t*
+*`t`*
Specifies the number of units to deflate the top of `CRect`.
-*r*
+*`r`*
Specifies the number of units to deflate the right side of `CRect`.
-*b*
+*`b`*
Specifies the number of units to deflate the bottom of `CRect`.
### Remarks
To do this, `DeflateRect` adds units to the left and top and subtracts units from the right and bottom. The parameters of `DeflateRect` are signed values; positive values deflate `CRect` and negative values inflate it.
-The first two overloads deflate both pairs of opposite sides of `CRect` so that its total width is decreased by two times *x* (or `cx`) and its total height is decreased by two times *y* (or `cy`). The other two overloads deflate each side of `CRect` independently of the others.
+The first two overloads deflate both pairs of opposite sides of `CRect` so that its total width is decreased by two times *`x`* (or `cx`) and its total height is decreased by two times *`y`* (or `cy`). The other two overloads deflate each side of `CRect` independently of the others.
### Example
@@ -384,7 +384,7 @@ ASSERT(rect2.left == 11 && rect2.right == 47);
ASSERT(rect2.top == 12 && rect2.bottom == 46);
```
-## CRect::EqualRect
+## `CRect::EqualRect`
Determines whether `CRect` is equal to the given rectangle.
@@ -394,15 +394,15 @@ BOOL EqualRect(LPCRECT lpRect) const throw();
### Parameters
-*lpRect*
-Points to a [RECT](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` object that contains the upper-left and lower-right corner coordinates of a rectangle.
+*`lpRect`*
+Points to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` object that contains the upper-left and lower-right corner coordinates of a rectangle.
### Return Value
Nonzero if the two rectangles have the same top, left, bottom, and right values; otherwise 0.
> [!NOTE]
-> Both of the rectangles must be normalized or this function may fail. You can call [NormalizeRect](#normalizerect) to normalize the rectangles before calling this function.
+> Both of the rectangles must be normalized or this function may fail. You can call [`NormalizeRect`](#normalizerect) to normalize the rectangles before calling this function.
### Example
@@ -423,11 +423,11 @@ test.bottom = 25;
ASSERT(rect1.EqualRect(&test));
```
-## CRect::Height
+## `CRect::Height`
Calculates the height of `CRect` by subtracting the top value from the bottom value.
-```
+```cpp
int Height() const throw();
```
@@ -440,7 +440,7 @@ The height of `CRect`.
The resulting value can be negative.
> [!NOTE]
-> The rectangle must be normalized or this function may fail. You can call [NormalizeRect](#normalizerect) to normalize the rectangle before calling this function.
+> The rectangle must be normalized or this function may fail. You can call [`NormalizeRect`](#normalizerect) to normalize the rectangle before calling this function.
### Example
@@ -452,7 +452,7 @@ int nHt = rect.Height();
ASSERT(nHt == 40);
```
-## CRect::InflateRect
+## `CRect::InflateRect`
`InflateRect` inflates `CRect` by moving its sides away from its center.
@@ -465,35 +465,35 @@ void InflateRect(int l, int t, int r, int b) throw();
### Parameters
-*x*
+*`x`*
Specifies the number of units to inflate the left and right sides of `CRect`.
-*y*
+*`y`*
Specifies the number of units to inflate the top and bottom of `CRect`.
-*size*
-A [SIZE](/windows/win32/api/windef/ns-windef-size) or [CSize](csize-class.md) that specifies the number of units to inflate `CRect`. The `cx` value specifies the number of units to inflate the left and right sides and the `cy` value specifies the number of units to inflate the top and bottom.
+*`size`*
+A [`SIZE`](/windows/win32/api/windef/ns-windef-size) or [`CSize`](csize-class.md) that specifies the number of units to inflate `CRect`. The `cx` value specifies the number of units to inflate the left and right sides and the `cy` value specifies the number of units to inflate the top and bottom.
-*lpRect*
-Points to a [RECT](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` that specifies the number of units to inflate each side.
+*`lpRect`*
+Points to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` that specifies the number of units to inflate each side.
-*l*
+*`l`*
Specifies the number of units to inflate the left side of `CRect`.
-*t*
+*`t`*
Specifies the number of units to inflate the top of `CRect`.
-*r*
+*`r`*
Specifies the number of units to inflate the right side of `CRect`.
-*b*
+*`b`*
Specifies the number of units to inflate the bottom of `CRect`.
### Remarks
To do this, `InflateRect` subtracts units from the left and top and adds units to the right and bottom. The parameters of `InflateRect` are signed values; positive values inflate `CRect` and negative values deflate it.
-The first two overloads inflate both pairs of opposite sides of `CRect` so that its total width is increased by two times *x* (or `cx`) and its total height is increased by two times *y* (or `cy`). The other two overloads inflate each side of `CRect` independently of the others.
+The first two overloads inflate both pairs of opposite sides of `CRect` so that its total width is increased by two times *`x`* (or `cx`) and its total height is increased by two times *`y`* (or `cy`). The other two overloads inflate each side of `CRect` independently of the others.
### Example
@@ -505,20 +505,20 @@ rect.InflateRect(50, 200);
ASSERT(rect == CRect(-50, -200, 350, 500));
```
-## CRect::IntersectRect
+## `CRect::IntersectRect`
Makes a `CRect` equal to the intersection of two existing rectangles.
-```
+```cpp
BOOL IntersectRect(LPCRECT lpRect1, LPCRECT lpRect2) throw();
```
### Parameters
-*lpRect1*
-Points to a [RECT](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` object that contains a source rectangle.
+*`lpRect1`*
+Points to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` object that contains a source rectangle.
-*lpRect2*
+*`lpRect2`*
Points to a `RECT` structure or `CRect` object that contains a source rectangle.
### Return Value
@@ -530,7 +530,7 @@ Nonzero if the intersection is not empty; 0 if the intersection is empty.
The intersection is the largest rectangle contained in both existing rectangles.
> [!NOTE]
-> Both of the rectangles must be normalized or this function may fail. You can call [NormalizeRect](#normalizerect) to normalize the rectangles before calling this function.
+> Both of the rectangles must be normalized or this function may fail. You can call [`NormalizeRect`](#normalizerect) to normalize the rectangles before calling this function.
### Example
@@ -548,11 +548,11 @@ rectInter2 &= rectTwo;
ASSERT(rectInter2 == CRect(125, 75, 150, 95));
```
-## CRect::IsRectEmpty
+## `CRect::IsRectEmpty`
Determines whether `CRect` is empty.
-```
+```cpp
BOOL IsRectEmpty() const throw();
```
@@ -565,7 +565,7 @@ Nonzero if `CRect` is empty; 0 if `CRect` is not empty.
A rectangle is empty if the width and/or height are 0 or negative. Differs from `IsRectNull`, which determines whether all coordinates of the rectangle are zero.
> [!NOTE]
-> The rectangle must be normalized or this function may fail. You can call [NormalizeRect](#normalizerect) to normalize the rectangle before calling this function.
+> The rectangle must be normalized or this function may fail. You can call [`NormalizeRect`](#normalizerect) to normalize the rectangle before calling this function.
### Example
@@ -578,11 +578,11 @@ CRect rectEmpty(35, 35, 35, 35);
ASSERT(rectEmpty.IsRectEmpty());
```
-## CRect::IsRectNull
+## `CRect::IsRectNull`
Determines whether the top, left, bottom, and right values of `CRect` are all equal to 0.
-```
+```cpp
BOOL IsRectNull() const throw();
```
@@ -607,9 +607,9 @@ CRect rectNotNull(0, 0, 35, 50);
ASSERT(!rectNotNull.IsRectNull());
```
-## CRect::MoveToX
+## `CRect::MoveToX`
-Call this function to move the rectangle to the absolute x-coordinate specified by *x*.
+Call this function to move the rectangle to the absolute x-coordinate specified by *`x`*.
```cpp
void MoveToX(int x) throw();
@@ -617,7 +617,7 @@ void MoveToX(int x) throw();
### Parameters
-*x*
+*`x`*
The absolute x-coordinate for the upper-left corner of the rectangle.
### Example
@@ -630,7 +630,7 @@ rect.MoveToX(10);
ASSERT(rect == CRect(10, 0, 110, 100));
```
-## CRect::MoveToXY
+## `CRect::MoveToXY`
Call this function to move the rectangle to the absolute x- and y-coordinates specified.
@@ -641,13 +641,13 @@ void MoveToXY(POINT point) throw();
### Parameters
-*x*
+*`x`*
The absolute x-coordinate for the upper-left corner of the rectangle.
-*y*
+*`y`*
The absolute y-coordinate for the upper-left corner of the rectangle.
-*point*
+*`point`*
A `POINT` structure specifying the absolute upper-left corner of the rectangle.
### Example
@@ -659,9 +659,9 @@ rect.MoveToXY(10, 10);
ASSERT(rect == CRect(10, 10, 110, 110));
```
-## CRect::MoveToY
+## `CRect::MoveToY`
-Call this function to move the rectangle to the absolute y-coordinate specified by *y*.
+Call this function to move the rectangle to the absolute y-coordinate specified by *`y`*.
```cpp
void MoveToY(int y) throw();
@@ -669,7 +669,7 @@ void MoveToY(int y) throw();
### Parameters
-*y*
+*`y`*
The absolute y-coordinate for the upper-left corner of the rectangle.
### Example
@@ -681,7 +681,7 @@ rect.MoveToY(10);
ASSERT(rect == CRect(0, 10, 100, 110));
```
-## CRect::NormalizeRect
+## `CRect::NormalizeRect`
Normalizes `CRect` so that both the height and width are positive.
@@ -694,7 +694,7 @@ void NormalizeRect() throw();
The rectangle is normalized for fourth-quadrant positioning, which Windows typically uses for coordinates. `NormalizeRect` compares the top and bottom values, and swaps them if the top is greater than the bottom. Similarly, it swaps the left and right values if the left is greater than the right. This function is useful when dealing with different mapping modes and inverted rectangles.
> [!NOTE]
-> The following `CRect` member functions require normalized rectangles in order to work properly: [Height](#height), [Width](#width), [Size](#size), [IsRectEmpty](#isrectempty), [PtInRect](#ptinrect), [EqualRect](#equalrect), [UnionRect](#unionrect), [IntersectRect](#intersectrect), [SubtractRect](#subtractrect), [operator ==](#operator_eq_eq), [operator !=](#operator_neq), [operator |](#operator_or), [operator |=](#operator_or_eq), [operator &](#operator_amp), and [operator &=](#operator_amp_eq).
+> The following `CRect` member functions require normalized rectangles in order to work properly: [`Height`](#height), [`Width`](#width), [`Size`](#size), [`IsRectEmpty`](#isrectempty), [`PtInRect`](#ptinrect), [`EqualRect`](#equalrect), [`UnionRect`](#unionrect), [`IntersectRect`](#intersectrect), [`SubtractRect`](#subtractrect), [`operator ==`](#operator_eq_eq), [`operator !=`](#operator_neq), [`operator |`](#operator_or), [`operator |=`](#operator_or_eq), [`operator &`](#operator_amp), and [`operator &=`](#operator_amp_eq).
### Example
@@ -706,7 +706,7 @@ rect2.NormalizeRect();
ASSERT(rect1 == rect2);
```
-## CRect::OffsetRect
+## `CRect::OffsetRect`
Moves `CRect` by the specified offsets.
@@ -718,21 +718,21 @@ void OffsetRect(SIZE size) throw();
### Parameters
-*x*
+*`x`*
Specifies the amount to move left or right. It must be negative to move left.
-*y*
+*`y`*
Specifies the amount to move up or down. It must be negative to move up.
-*point*
-Contains a [POINT](/windows/win32/api/windef/ns-windef-point) structure or [CPoint](cpoint-class.md) object specifying both dimensions by which to move.
+*`point`*
+Contains a [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or [`CPoint`](cpoint-class.md) object specifying both dimensions by which to move.
-*size*
-Contains a [SIZE](/windows/win32/api/windef/ns-windef-size) structure or [CSize](csize-class.md) object specifying both dimensions by which to move.
+*`size`*
+Contains a [`SIZE`](/windows/win32/api/windef/ns-windef-size) structure or [`CSize`](csize-class.md) object specifying both dimensions by which to move.
### Remarks
-Moves `CRect`*x* units along the x-axis and *y* units along the y-axis. The *x* and *y* parameters are signed values, so `CRect` can be moved left or right and up or down.
+Moves `CRect`*`x`* units along the x-axis and *`y`* units along the y-axis. The *`x`* and *`y`* parameters are signed values, so `CRect` can be moved left or right and up or down.
### Example
@@ -744,35 +744,37 @@ rect.OffsetRect(230, 230);
ASSERT(rect == CRect(230, 230, 265, 265));
```
-## CRect::operator LPCRECT Converts a `CRect` to an [LPCRECT](../../mfc/reference/data-types-mfc.md).
+## `CRect::operator LPCRECT`
-```
+Converts a `CRect` to an [`LPCRECT`](../../mfc/reference/data-types-mfc.md).
+
+```cpp
operator LPCRECT() const throw();
```
### Remarks
-When you use this function, you don't need the address-of (**&**) operator. This operator will be automatically used when you pass a `CRect` object to a function that expects an `LPCRECT`.
+When you use this function, you don't need the address-of (**`&`**) operator. This operator will be automatically used when you pass a `CRect` object to a function that expects an `LPCRECT`.
-## CRect::operator LPRECT
+## `CRect::operator LPRECT`
-Converts a `CRect` to an [LPRECT](../../mfc/reference/data-types-mfc.md).
+Converts a `CRect` to an [`LPRECT`](../../mfc/reference/data-types-mfc.md).
-```
+```cpp
operator LPRECT() throw();
```
### Remarks
-When you use this function, you don't need the address-of (**&**) operator. This operator will be automatically used when you pass a `CRect` object to a function that expects an `LPRECT`.
+When you use this function, you don't need the address-of (**`&`**) operator. This operator will be automatically used when you pass a `CRect` object to a function that expects an `LPRECT`.
### Example
-See the example for [CRect::operator LPCRECT](#operator_lpcrect).
+See the example for [`CRect::operator LPCRECT`](#operator_lpcrect).
-## CRect::operator =
+## `CRect::operator =`
-Assigns *srcRect* to `CRect`.
+Assigns *`srcRect`* to `CRect`.
```cpp
void operator=(const RECT& srcRect) throw();
@@ -780,8 +782,8 @@ void operator=(const RECT& srcRect) throw();
### Parameters
-*srcRect*
-Refers to a source rectangle. Can be a [RECT](/windows/win32/api/windef/ns-windef-rect) or `CRect`.
+*`srcRect`*
+Refers to a source rectangle. Can be a [`RECT`](/windows/win32/api/windef/ns-windef-rect) or `CRect`.
### Example
@@ -793,18 +795,18 @@ rect2 = rect;
ASSERT(rect2 == CRect(0, 0, 127, 168));
```
-## CRect::operator ==
+## `CRect::operator ==`
Determines whether `rect` is equal to `CRect` by comparing the coordinates of their upper-left and lower-right corners.
-```
+```cpp
BOOL operator==(const RECT& rect) const throw();
```
### Parameters
-*rect*
-Refers to a source rectangle. Can be a [RECT](/windows/win32/api/windef/ns-windef-rect) or `CRect`.
+*`rect`*
+Refers to a source rectangle. Can be a [`RECT`](/windows/win32/api/windef/ns-windef-rect) or `CRect`.
### Return Value
@@ -813,7 +815,7 @@ Nonzero if equal; otherwise 0.
### Remarks
> [!NOTE]
-> Both of the rectangles must be normalized or this function may fail. You can call [NormalizeRect](#normalizerect) to normalize the rectangles before calling this function.
+> Both of the rectangles must be normalized or this function may fail. You can call [`NormalizeRect`](#normalizerect) to normalize the rectangles before calling this function.
### Example
@@ -833,18 +835,18 @@ test.bottom = 25;
ASSERT(rect1 == test);
```
-## CRect::operator !=
+## `CRect::operator !=`
-Determines whether *rect* is not equal to `CRect` by comparing the coordinates of their upper-left and lower-right corners.
+Determines whether *`rect`* is not equal to `CRect` by comparing the coordinates of their upper-left and lower-right corners.
-```
+```cpp
BOOL operator!=(const RECT& rect) const throw();
```
### Parameters
-*rect*
-Refers to a source rectangle. Can be a [RECT](/windows/win32/api/windef/ns-windef-rect) or `CRect`.
+*`rect`*
+Refers to a source rectangle. Can be a [`RECT`](/windows/win32/api/windef/ns-windef-rect) or `CRect`.
### Return Value
@@ -853,7 +855,7 @@ Nonzero if not equal; otherwise 0.
### Remarks
> [!NOTE]
-> Both of the rectangles must be normalized or this function may fail. You can call [NormalizeRect](#normalizerect) to normalize the rectangles before calling this function.
+> Both of the rectangles must be normalized or this function may fail. You can call [`NormalizeRect`](#normalizerect) to normalize the rectangles before calling this function.
### Example
@@ -873,7 +875,7 @@ test.bottom = 25;
ASSERT(rect3 != test);
```
-## CRect::operator +=
+## `CRect::operator +=`
The first two overloads move `CRect` by the specified offsets.
@@ -885,18 +887,18 @@ void operator+=(LPCRECT lpRect) throw();
### Parameters
-*point*
-A [POINT](/windows/win32/api/windef/ns-windef-point) structure or [CPoint](cpoint-class.md) object that specifies the number of units to move the rectangle.
+*`point`*
+A [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or [`CPoint`](cpoint-class.md) object that specifies the number of units to move the rectangle.
-*size*
-A [SIZE](/windows/win32/api/windef/ns-windef-size) structure or [CSize](csize-class.md) object that specifies the number of units to move the rectangle.
+*`size`*
+A [`SIZE`](/windows/win32/api/windef/ns-windef-size) structure or [`CSize`](csize-class.md) object that specifies the number of units to move the rectangle.
-*lpRect*
-Points to a [RECT](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` object that contains the number of units to inflate each side of `CRect`.
+*`lpRect`*
+Points to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` object that contains the number of units to inflate each side of `CRect`.
### Remarks
-The parameter's *x* and *y* (or `cx` and `cy`) values are added to `CRect`.
+The parameter's *`x`* and *`y`* (or `cx` and `cy`) values are added to `CRect`.
The third overload inflates `CRect` by the number of units specified in each member of the parameter.
@@ -911,7 +913,7 @@ rect1 += pt;
ASSERT(rect1 == rect2);
```
-## CRect::operator -=
+## `CRect::operator -=`
The first two overloads move `CRect` by the specified offsets.
@@ -923,20 +925,20 @@ void operator-=(LPCRECT lpRect) throw();
### Parameters
-*point*
-A [POINT](/windows/win32/api/windef/ns-windef-point) structure or [CPoint](cpoint-class.md) object that specifies the number of units to move the rectangle.
+*`point`*
+A [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or [`CPoint`](cpoint-class.md) object that specifies the number of units to move the rectangle.
-*size*
-A [SIZE](/windows/win32/api/windef/ns-windef-size) structure or [CSize](csize-class.md) object that specifies the number of units to move the rectangle.
+*`size`*
+A [`SIZE`](/windows/win32/api/windef/ns-windef-size) structure or [`CSize`](csize-class.md) object that specifies the number of units to move the rectangle.
-*lpRect*
-Points to a [RECT](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` object that contains the number of units to deflate each side of `CRect`.
+*`lpRect`*
+Points to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` object that contains the number of units to deflate each side of `CRect`.
### Remarks
-The parameter's *x* and *y* (or `cx` and `cy`) values are subtracted from `CRect`.
+The parameter's *`x`* and *`y`* (or `cx` and `cy`) values are subtracted from `CRect`.
-The third overload deflates `CRect` by the number of units specified in each member of the parameter. Note that this overload functions like [DeflateRect](#deflaterect).
+The third overload deflates `CRect` by the number of units specified in each member of the parameter. Note that this overload functions like [`DeflateRect`](#deflaterect).
### Example
@@ -949,7 +951,7 @@ CRect rectResult(65, 170, 165, 270);
ASSERT(rect1 == rectResult);
```
-## CRect::operator &=
+## `CRect::operator &=`
Sets `CRect` equal to the intersection of `CRect` and `rect`.
@@ -959,21 +961,21 @@ void operator&=(const RECT& rect) throw();
### Parameters
-*rect*
-Contains a [RECT](/windows/win32/api/windef/ns-windef-rect) or `CRect`.
+*`rect`*
+Contains a [`RECT`](/windows/win32/api/windef/ns-windef-rect) or `CRect`.
### Remarks
The intersection is the largest rectangle that is contained in both rectangles.
> [!NOTE]
-> Both of the rectangles must be normalized or this function may fail. You can call [NormalizeRect](#normalizerect) to normalize the rectangles before calling this function.
+> Both of the rectangles must be normalized or this function may fail. You can call [`NormalizeRect`](#normalizerect) to normalize the rectangles before calling this function.
### Example
-See the example for [CRect::IntersectRect](#intersectrect).
+See the example for [`CRect::IntersectRect`](#intersectrect).
-## CRect::operator |=
+## `CRect::operator |=`
Sets `CRect` equal to the union of `CRect` and `rect`.
@@ -983,15 +985,15 @@ void operator|=(const RECT& rect) throw();
### Parameters
-*rect*
-Contains a `CRect` or [RECT](/windows/win32/api/windef/ns-windef-rect).
+*`rect`*
+Contains a `CRect` or [`RECT`](/windows/win32/api/windef/ns-windef-rect).
### Remarks
The union is the smallest rectangle that contains both source rectangles.
> [!NOTE]
-> Both of the rectangles must be normalized or this function may fail. You can call [NormalizeRect](#normalizerect) to normalize the rectangles before calling this function.
+> Both of the rectangles must be normalized or this function may fail. You can call [`NormalizeRect`](#normalizerect) to normalize the rectangles before calling this function.
### Example
@@ -1004,11 +1006,11 @@ CRect rectResult(0, 0, 300, 300);
ASSERT(rectResult == rect1);
```
-## CRect::operator +
+## `CRect::operator +`
The first two overloads return a `CRect` object that is equal to `CRect` displaced by the specified offsets.
-```
+```cpp
CRect operator+(POINT point) const throw();
CRect operator+(LPCRECT lpRect) const throw();
CRect operator+(SIZE size) const throw();
@@ -1016,14 +1018,14 @@ CRect operator+(SIZE size) const throw();
### Parameters
-*point*
-A [POINT](/windows/win32/api/windef/ns-windef-point) structure or [CPoint](cpoint-class.md) object that specifies the number of units to move the return value.
+*`point`*
+A [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or [`CPoint`](cpoint-class.md) object that specifies the number of units to move the return value.
-*size*
-A [SIZE](/windows/win32/api/windef/ns-windef-size) structure or [CSize](csize-class.md) object that specifies the number of units to move the return value.
+*`size`*
+A [`SIZE`](/windows/win32/api/windef/ns-windef-size) structure or [`CSize`](csize-class.md) object that specifies the number of units to move the return value.
-*lpRect*
-Points to a [RECT](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` object that contains the number of units to inflate each side of the return value.
+*`lpRect`*
+Points to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` object that contains the number of units to inflate each side of the return value.
### Return Value
@@ -1031,7 +1033,7 @@ The `CRect` resulting from moving or inflating `CRect` by the number of units sp
### Remarks
-The parameter's *x* and *y* (or `cx` and `cy`) parameters are added to `CRect`'s position.
+The parameter's *`x`* and *`y`* (or `cx` and `cy`) parameters are added to `CRect`'s position.
The third overload returns a new `CRect` that is equal to `CRect` inflated by the number of units specified in each member of the parameter.
@@ -1047,11 +1049,11 @@ CRect rectResult(135, 300, 235, 400);
ASSERT(rectResult == rect2);
```
-## CRect::operator -
+## `CRect::operator -`
The first two overloads return a `CRect` object that is equal to `CRect` displaced by the specified offsets.
-```
+```cpp
CRect operator-(POINT point) const throw();
CRect operator-(SIZE size) const throw();
CRect operator-(LPCRECT lpRect) const throw();
@@ -1059,14 +1061,14 @@ CRect operator-(LPCRECT lpRect) const throw();
### Parameters
-*point*
-A [POINT](/windows/win32/api/windef/ns-windef-point) structure or `CPoint` object that specifies the number of units to move the return value.
+*`point`*
+A [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or `CPoint` object that specifies the number of units to move the return value.
-*size*
-A [SIZE](/windows/win32/api/windef/ns-windef-size) structure or `CSize` object that specifies the number of units to move the return value.
+*`size`*
+A [`SIZE`](/windows/win32/api/windef/ns-windef-size) structure or `CSize` object that specifies the number of units to move the return value.
-*lpRect*
-Points to a [RECT](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` object that contains the number of units to deflate each side of the return value.
+*`lpRect`*
+Points to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` object that contains the number of units to deflate each side of the return value.
### Return Value
@@ -1074,9 +1076,9 @@ The `CRect` resulting from moving or deflating `CRect` by the number of units sp
### Remarks
-The parameter's *x* and *y* (or `cx` and `cy`) parameters are subtracted from `CRect`'s position.
+The parameter's *`x`* and *`y`* (or `cx` and `cy`) parameters are subtracted from `CRect`'s position.
-The third overload returns a new `CRect` that is equal to `CRect` deflated by the number of units specified in each member of the parameter. Note that this overload functions like [DeflateRect](#deflaterect), not [SubtractRect](#subtractrect).
+The third overload returns a new `CRect` that is equal to `CRect` deflated by the number of units specified in each member of the parameter. Note that this overload functions like [`DeflateRect`](#deflaterect), not [`SubtractRect`](#subtractrect).
### Example
@@ -1090,29 +1092,29 @@ CRect rectResult(65, 170, 165, 270);
ASSERT(rect2 == rectResult);
```
-## CRect::operator &
+## `CRect::operator &`
Returns a `CRect` that is the intersection of `CRect` and *rect2*.
-```
+```cpp
CRect operator&(const RECT& rect2) const throw();
```
### Parameters
-*rect2*
-Contains a [RECT](/windows/win32/api/windef/ns-windef-rect) or `CRect`.
+*`rect2`*
+Contains a [`RECT`](/windows/win32/api/windef/ns-windef-rect) or `CRect`.
### Return Value
-A `CRect` that is the intersection of `CRect` and *rect2*.
+A `CRect` that is the intersection of `CRect` and *`rect2`*.
### Remarks
The intersection is the largest rectangle that is contained in both rectangles.
> [!NOTE]
-> Both of the rectangles must be normalized or this function may fail. You can call [NormalizeRect](#normalizerect) to normalize the rectangles before calling this function.
+> Both of the rectangles must be normalized or this function may fail. You can call [`NormalizeRect`](#normalizerect) to normalize the rectangles before calling this function.
### Example
@@ -1126,30 +1128,30 @@ CRect rectResult(100, 100, 200, 200);
ASSERT(rectResult == rect3);
```
-## CRect::operator |
+## `CRect::operator |`
-Returns a `CRect` that is the union of `CRect` and *rect2*.
+Returns a `CRect` that is the union of `CRect` and *`rect2`*.
-```
+```cpp
CRect operator|(const RECT&
rect2) const throw();
```
### Parameters
-*rect2*
-Contains a [RECT](/windows/win32/api/windef/ns-windef-rect) or `CRect`.
+*`rect2`*
+Contains a [`RECT`](/windows/win32/api/windef/ns-windef-rect) or `CRect`.
### Return Value
-A `CRect` that is the union of `CRect` and *rect2*.
+A `CRect` that is the union of `CRect` and *`rect2`*.
### Remarks
The union is the smallest rectangle that contains both rectangles.
> [!NOTE]
-> Both of the rectangles must be normalized or this function may fail. You can call [NormalizeRect](#normalizerect) to normalize the rectangles before calling this function.
+> Both of the rectangles must be normalized or this function may fail. You can call [`NormalizeRect`](#normalizerect) to normalize the rectangles before calling this function.
### Example
@@ -1163,18 +1165,18 @@ CRect rectResult(0, 0, 300, 300);
ASSERT(rectResult == rect3);
```
-## CRect::PtInRect
+## `CRect::PtInRect`
Determines whether the specified point lies within `CRect`.
-```
+```cpp
BOOL PtInRect(POINT point) const throw();
```
### Parameters
-*point*
-Contains a [POINT](/windows/win32/api/windef/ns-windef-point) structure or [CPoint](cpoint-class.md) object.
+*`point`*
+Contains a [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or [`CPoint`](cpoint-class.md) object.
### Return Value
@@ -1185,7 +1187,7 @@ Nonzero if the point lies within `CRect`; otherwise 0.
A point is within `CRect` if it lies on the left or top side or is within all four sides. A point on the right or bottom side is outside `CRect`.
> [!NOTE]
-> The rectangle must be normalized or this function may fail. You can call [NormalizeRect](#normalizerect) to normalize the rectangle before calling this function.
+> The rectangle must be normalized or this function may fail. You can call [`NormalizeRect`](#normalizerect) to normalize the rectangle before calling this function.
### Example
@@ -1215,7 +1217,7 @@ pt.y = 50;
ASSERT(rect.PtInRect(pt));
```
-## CRect::SetRect
+## `CRect::SetRect`
Sets the dimensions of `CRect` to the specified coordinates.
@@ -1225,16 +1227,16 @@ void SetRect(int x1, int y1, int x2, int y2) throw();
### Parameters
-*x1*
+*`x1`*
Specifies the x-coordinate of the upper-left corner.
-*y1*
+*`y1`*
Specifies the y-coordinate of the upper-left corner.
-*x2*
+*`x2`*
Specifies the x-coordinate of the lower-right corner.
-*y2*
+*`y2`*
Specifies the y-coordinate of the lower-right corner.
### Example
@@ -1245,7 +1247,7 @@ rect.SetRect(256, 256, 512, 512);
ASSERT(rect == CRect(256, 256, 512, 512));
```
-## CRect::SetRectEmpty
+## `CRect::SetRectEmpty`
Makes `CRect` a null rectangle by setting all coordinates to zero.
@@ -1263,7 +1265,7 @@ rect.SetRectEmpty();
ASSERT(rect.IsRectEmpty());
```
-## CRect::SIZE
+## `CRect::SIZE`
The `cx` and `cy` members of the return value contain the height and width of `CRect`.
@@ -1273,14 +1275,14 @@ CSize Size() const throw();
### Return Value
-A [CSize](csize-class.md) object that contains the size of `CRect`.
+A [`CSize`](csize-class.md) object that contains the size of `CRect`.
### Remarks
Either the height or width can be negative.
> [!NOTE]
-> The rectangle must be normalized or this function may fail. You can call [NormalizeRect](#normalizerect) to normalize the rectangle before calling this function.
+> The rectangle must be normalized or this function may fail. You can call [`NormalizeRect`](#normalizerect) to normalize the rectangle before calling this function.
### Example
@@ -1290,21 +1292,21 @@ CSize sz = rect.Size();
ASSERT(sz.cx == 40 && sz.cy == 40);
```
-## CRect::SubtractRect
+## `CRect::SubtractRect`
Makes the dimensions of the `CRect` equal to the subtraction of `lpRectSrc2` from `lpRectSrc1`.
-```
+```cpp
BOOL SubtractRect(LPCRECT lpRectSrc1, LPCRECT lpRectSrc2) throw();
```
### Parameters
-*lpRectSrc1*
-Points to the [RECT](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` object from which a rectangle is to be subtracted.
+*`lpRectSrc1`*
+Points to the [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` object from which a rectangle is to be subtracted.
-*lpRectSrc2*
-Points to the `RECT` structure or `CRect` object that is to be subtracted from the rectangle pointed to by the *lpRectSrc1* parameter.
+*`lpRectSrc2`*
+Points to the `RECT` structure or `CRect` object that is to be subtracted from the rectangle pointed to by the *`lpRectSrc1`* parameter.
### Return Value
@@ -1312,16 +1314,16 @@ Nonzero if the function is successful; otherwise 0.
### Remarks
-The subtraction is the smallest rectangle that contains all of the points in *lpRectScr1* that are not in the intersection of *lpRectScr1* and *lpRectScr2*.
+The subtraction is the smallest rectangle that contains all of the points in *`lpRectScr1`* that are not in the intersection of *`lpRectScr1`* and *`lpRectScr2`*.
-The rectangle specified by *lpRectSrc1* will be unchanged if the rectangle specified by *lpRectSrc2* doesn't completely overlap the rectangle specified by *lpRectSrc1* in at least one of the x- or y-directions.
+The rectangle specified by *`lpRectSrc1`* will be unchanged if the rectangle specified by *`lpRectSrc2`* doesn't completely overlap the rectangle specified by *`lpRectSrc1`* in at least one of the x- or y-directions.
-For example, if *lpRectSrc1* were (10,10, 100,100) and *lpRectSrc2* were (50,50, 150,150), the rectangle pointed to by *lpRectSrc1* would be unchanged when the function returned. If *lpRectSrc1* were (10,10, 100,100) and *lpRectSrc2* were (50,10, 150,150), however, the rectangle pointed to by *lpRectSrc1* would contain the coordinates (10,10, 50,100) when the function returned.
+For example, if *`lpRectSrc1`* were (10,10, 100,100) and *`lpRectSrc2`* were (50,50, 150,150), the rectangle pointed to by *`lpRectSrc1`* would be unchanged when the function returned. If *`lpRectSrc1`* were (10,10, 100,100) and *`lpRectSrc2`* were (50,10, 150,150), however, the rectangle pointed to by *`lpRectSrc1`* would contain the coordinates (10,10, 50,100) when the function returned.
`SubtractRect` is not the same as [operator -](#operator_-) nor [operator -=](#operator_-_eq). Neither of these operators ever calls `SubtractRect`.
> [!NOTE]
-> Both of the rectangles must be normalized or this function may fail. You can call [NormalizeRect](#normalizerect) to normalize the rectangles before calling this function.
+> Both of the rectangles must be normalized or this function may fail. You can call [`NormalizeRect`](#normalizerect) to normalize the rectangles before calling this function.
### Example
@@ -1357,11 +1359,11 @@ rectOut.SubtractRect(rect1, rect2);
ASSERT(rectResult == rectOut);
```
-## CRect::TopLeft
+## `CRect::TopLeft`
-The coordinates are returned as a reference to a [CPoint](cpoint-class.md) object that is contained in `CRect`.
+The coordinates are returned as a reference to a [`CPoint`](cpoint-class.md) object that is contained in `CRect`.
-```
+```cpp
CPoint& TopLeft() throw();
const CPoint& TopLeft() const throw();
```
@@ -1376,22 +1378,22 @@ You can use this function to either get or set the top-left corner of the rectan
### Example
-See the example for [CRect::CenterPoint](#centerpoint).
+See the example for [`CRect::CenterPoint`](#centerpoint).
-## CRect::UnionRect
+## `CRect::UnionRect`
Makes the dimensions of `CRect` equal to the union of the two source rectangles.
-```
+```cpp
BOOL UnionRect(LPCRECT lpRect1, LPCRECT lpRect2) throw();
```
### Parameters
-*lpRect1*
-Points to a [RECT](/windows/win32/api/windef/ns-windef-rect) or `CRect` that contains a source rectangle.
+*`lpRect1`*
+Points to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) or `CRect` that contains a source rectangle.
-*lpRect2*
+*`lpRect2`*
Points to a `RECT` or `CRect` that contains a source rectangle.
### Return Value
@@ -1405,7 +1407,7 @@ The union is the smallest rectangle that contains both source rectangles.
Windows ignores the dimensions of an empty rectangle; that is, a rectangle that has no height or has no width.
> [!NOTE]
-> Both of the rectangles must be normalized or this function may fail. You can call [NormalizeRect](#normalizerect) to normalize the rectangles before calling this function.
+> Both of the rectangles must be normalized or this function may fail. You can call [`NormalizeRect`](#normalizerect) to normalize the rectangles before calling this function.
### Example
@@ -1419,11 +1421,11 @@ CRect rectResult(0, 0, 300, 300);
ASSERT(rectResult == rect3);
```
-## CRect::Width
+## `CRect::Width`
Calculates the width of `CRect` by subtracting the left value from the right value.
-```
+```cpp
int Width() const throw();
```
@@ -1436,7 +1438,7 @@ The width of `CRect`.
The width can be negative.
> [!NOTE]
-> The rectangle must be normalized or this function may fail. You can call [NormalizeRect](#normalizerect) to normalize the rectangle before calling this function.
+> The rectangle must be normalized or this function may fail. You can call [`NormalizeRect`](#normalizerect) to normalize the rectangle before calling this function.
### Example
@@ -1449,6 +1451,6 @@ ASSERT(nWid == 60);
## See also
-[CPoint Class](cpoint-class.md)
-[CSize Class](csize-class.md)
-[RECT](/windows/win32/api/windef/ns-windef-rect)
+[`CPoint` Class](cpoint-class.md)
+[`CSize` Class](csize-class.md)
+[`RECT`](/windows/win32/api/windef/ns-windef-rect)
diff --git a/docs/atl-mfc-shared/reference/csimplestringt-class.md b/docs/atl-mfc-shared/reference/csimplestringt-class.md
index 29bb94899a..b62a850efa 100644
--- a/docs/atl-mfc-shared/reference/csimplestringt-class.md
+++ b/docs/atl-mfc-shared/reference/csimplestringt-class.md
@@ -1,31 +1,31 @@
---
title: "CSimpleStringT Class"
-ms.date: "10/18/2018"
+description: "Learn more about: CSimpleStringT class"
+ms.date: 01/26/2024
f1_keywords: ["CSimpleStringT", "ATLSIMPSTR/ATL::CSimpleStringT", "ATLSIMPSTR/ATL::CSimpleStringT::PCXSTR", "ATLSIMPSTR/ATL::CSimpleStringT::PXSTR", "ATLSIMPSTR/ATL::CSimpleStringT::CSimpleStringT", "ATLSIMPSTR/ATL::CSimpleStringT::Append", "ATLSIMPSTR/ATL::CSimpleStringT::AppendChar", "ATLSIMPSTR/ATL::CSimpleStringT::CopyChars", "ATLSIMPSTR/ATL::CSimpleStringT::CopyCharsOverlapped", "ATLSIMPSTR/ATL::CSimpleStringT::Empty", "ATLSIMPSTR/ATL::CSimpleStringT::FreeExtra", "ATLSIMPSTR/ATL::CSimpleStringT::GetAllocLength", "ATLSIMPSTR/ATL::CSimpleStringT::GetAt", "ATLSIMPSTR/ATL::CSimpleStringT::GetBuffer", "ATLSIMPSTR/ATL::CSimpleStringT::GetBufferSetLength", "ATLSIMPSTR/ATL::CSimpleStringT::GetLength", "ATLSIMPSTR/ATL::CSimpleStringT::GetManager", "ATLSIMPSTR/ATL::CSimpleStringT::GetString", "ATLSIMPSTR/ATL::CSimpleStringT::IsEmpty", "ATLSIMPSTR/ATL::CSimpleStringT::LockBuffer", "ATLSIMPSTR/ATL::CSimpleStringT::Preallocate", "ATLSIMPSTR/ATL::CSimpleStringT::ReleaseBuffer", "ATLSIMPSTR/ATL::CSimpleStringT::ReleaseBufferSetLength", "ATLSIMPSTR/ATL::CSimpleStringT::SetAt", "ATLSIMPSTR/ATL::CSimpleStringT::SetManager", "ATLSIMPSTR/ATL::CSimpleStringT::SetString", "ATLSIMPSTR/ATL::CSimpleStringT::StringLength", "ATLSIMPSTR/ATL::CSimpleStringT::Truncate", "ATLSIMPSTR/ATL::CSimpleStringT::UnlockBuffer"]
helpviewer_keywords: ["shared classes, CSimpleStringT", "strings [C++], ATL class", "CSimpleStringT class"]
-ms.assetid: 15814fcb-5b8f-4425-a97e-3b61fc9b48d8
---
-# CSimpleStringT Class
+# `CSimpleStringT` Class
This class represents a `CSimpleStringT` object.
## Syntax
-```
+```cpp
template
class CSimpleStringT
```
### Parameters
-*BaseType*
+*`BaseType`*\
The character type of the string class. Can be one of the following:
- **`char`** (for ANSI character strings).
- **`wchar_t`** (for Unicode character strings).
-- TCHAR (for both ANSI and Unicode character strings).
+- `TCHAR` (for both ANSI and Unicode character strings).
## Members
@@ -33,63 +33,63 @@ The character type of the string class. Can be one of the following:
|Name|Description|
|----------|-----------------|
-|[CSimpleStringT::PCXSTR](#pcxstr)|A pointer to a constant string.|
-|[CSimpleStringT::PXSTR](#pxstr)|A pointer to a string.|
+|[`CSimpleStringT::PCXSTR`](#pcxstr)|A pointer to a constant string.|
+|[`CSimpleStringT::PXSTR`](#pxstr)|A pointer to a string.|
### Public Constructors
|Name|Description|
|----------|-----------------|
-|[CSimpleStringT::CSimpleStringT](#ctor)|Constructs `CSimpleStringT` objects in various ways.|
-|[CSimpleStringT::~CSimpleStringT](#dtor)|Destructor.|
+|[`CSimpleStringT::CSimpleStringT`](#ctor)|Constructs `CSimpleStringT` objects in various ways.|
+|[`CSimpleStringT::~CSimpleStringT`](#dtor)|Destructor.|
### Public Methods
|Name|Description|
|----------|-----------------|
-|[CSimpleStringT::Append](#append)|Appends a `CSimpleStringT` object to an existing `CSimpleStringT` object.|
-|[CSimpleStringT::AppendChar](#appendchar)|Appends a character to an existing `CSimpleStringT` object.|
-|[CSimpleStringT::CopyChars](#copychars)|Copies a character or characters to another string.|
-|[CSimpleStringT::CopyCharsOverlapped](#copycharsoverlapped)|Copies a character or characters to another string in which the buffers overlap.|
-|[CSimpleStringT::Empty](#empty)|Forces a string to have a length of zero.|
-|[CSimpleStringT::FreeExtra](#freeextra)|Frees any extra memory previously allocated by the string object.|
-|[CSimpleStringT::GetAllocLength](#getalloclength)|Retrieves the allocated length of a `CSimpleStringT` object.|
-|[CSimpleStringT::GetAt](#getat)|Returns the character at a given position.|
-|[CSimpleStringT::GetBuffer](#getbuffer)|Returns a pointer to the characters in a `CSimpleStringT`.|
-|[CSimpleStringT::GetBufferSetLength](#getbuffersetlength)|Returns a pointer to the characters in a `CSimpleStringT`, truncating to the specified length.|
-|[CSimpleStringT::GetLength](#getlength)|Returns the number of characters in a `CSimpleStringT` object.|
-|[CSimpleStringT::GetManager](#getmanager)|Retrieves the memory manager of the `CSimpleStringT` object.|
-|[CSimpleStringT::GetString](#getstring)|Retrieves the character string|
-|[CSimpleStringT::IsEmpty](#isempty)|Tests whether a `CSimpleStringT` object contains no characters.|
-|[CSimpleStringT::LockBuffer](#lockbuffer)|Disables reference counting and protects the string in the buffer.|
-|[CSimpleStringT::Preallocate](#preallocate)|Allocates a specific amount of memory for the character buffer.|
-|[CSimpleStringT::ReleaseBuffer](#releasebuffer)|Releases control of the buffer returned by `GetBuffer`.|
-|[CSimpleStringT::ReleaseBufferSetLength](#releasebuffersetlength)|Releases control of the buffer returned by `GetBuffer`.|
-|[CSimpleStringT::SetAt](#setat)|Sets a character at a given position.|
-|[CSimpleStringT::SetManager](#setmanager)|Sets the memory manager of a `CSimpleStringT` object.|
-|[CSimpleStringT::SetString](#setstring)|Sets the string of a `CSimpleStringT` object.|
-|[CSimpleStringT::StringLength](#stringlength)|Returns the number of characters in the specified string.|
-|[CSimpleStringT::Truncate](#truncate)|Truncates the string to a specified length.|
-|[CSimpleStringT::UnlockBuffer](#unlockbuffer)|Enables reference counting and releases the string in the buffer.|
+|[`CSimpleStringT::Append`](#append)|Appends a `CSimpleStringT` object to an existing `CSimpleStringT` object.|
+|[`CSimpleStringT::AppendChar`](#appendchar)|Appends a character to an existing `CSimpleStringT` object.|
+|[`CSimpleStringT::CopyChars`](#copychars)|Copies a character or characters to another string.|
+|[`CSimpleStringT::CopyCharsOverlapped`](#copycharsoverlapped)|Copies a character or characters to another string in which the buffers overlap.|
+|[`CSimpleStringT::Empty`](#empty)|Forces a string to have a length of zero.|
+|[`CSimpleStringT::FreeExtra`](#freeextra)|Frees any extra memory previously allocated by the string object.|
+|[`CSimpleStringT::GetAllocLength`](#getalloclength)|Retrieves the allocated length of a `CSimpleStringT` object.|
+|[`CSimpleStringT::GetAt`](#getat)|Returns the character at a given position.|
+|[`CSimpleStringT::GetBuffer`](#getbuffer)|Returns a pointer to the characters in a `CSimpleStringT`.|
+|[`CSimpleStringT::GetBufferSetLength`](#getbuffersetlength)|Returns a pointer to the characters in a `CSimpleStringT`, truncating to the specified length.|
+|[`CSimpleStringT::GetLength`](#getlength)|Returns the number of characters in a `CSimpleStringT` object.|
+|[`CSimpleStringT::GetManager`](#getmanager)|Retrieves the memory manager of the `CSimpleStringT` object.|
+|[`CSimpleStringT::GetString`](#getstring)|Retrieves the character string|
+|[`CSimpleStringT::IsEmpty`](#isempty)|Tests whether a `CSimpleStringT` object contains no characters.|
+|[`CSimpleStringT::LockBuffer`](#lockbuffer)|Disables reference counting and protects the string in the buffer.|
+|[`CSimpleStringT::Preallocate`](#preallocate)|Allocates a specific amount of memory for the character buffer.|
+|[`CSimpleStringT::ReleaseBuffer`](#releasebuffer)|Releases control of the buffer returned by `GetBuffer`.|
+|[`CSimpleStringT::ReleaseBufferSetLength`](#releasebuffersetlength)|Releases control of the buffer returned by `GetBuffer`.|
+|[`CSimpleStringT::SetAt`](#setat)|Sets a character at a given position.|
+|[`CSimpleStringT::SetManager`](#setmanager)|Sets the memory manager of a `CSimpleStringT` object.|
+|[`CSimpleStringT::SetString`](#setstring)|Sets the string of a `CSimpleStringT` object.|
+|[`CSimpleStringT::StringLength`](#stringlength)|Returns the number of characters in the specified string.|
+|[`CSimpleStringT::Truncate`](#truncate)|Truncates the string to a specified length.|
+|[`CSimpleStringT::UnlockBuffer`](#unlockbuffer)|Enables reference counting and releases the string in the buffer.|
### Public Operators
|Name|Description|
|----------|-----------------|
-|[CSimpleStringT::operator PCXSTR](#operator_pcxstr)|Directly accesses characters stored in a `CSimpleStringT` object as a C-style string.|
-|[CSimpleStringT::operator\[\]](#operator_at)|Returns the character at a given position — operator substitution for `GetAt`.|
-|[CSimpleStringT::operator +=](#operator_add_eq)|Concatenates a new string to the end of an existing string.|
-|[CSimpleStringT::operator =](#operator_eq)|Assigns a new value to a `CSimpleStringT` object.|
+|[`CSimpleStringT::operator PCXSTR`](#operator_pcxstr)|Directly accesses characters stored in a `CSimpleStringT` object as a C-style string.|
+|[`CSimpleStringT::operator[]`](#operator_at)|Returns the character at a given position — operator substitution for `GetAt`.|
+|[`CSimpleStringT::operator +=`](#operator_add_eq)|Concatenates a new string to the end of an existing string.|
+|[`CSimpleStringT::operator =`](#operator_eq)|Assigns a new value to a `CSimpleStringT` object.|
### Remarks
-`CSimpleStringT` is the base class for the various string classes supported by Visual C++. It provides minimal support for memory management of the string object and basic buffer manipulation. For more advanced string objects, see [CStringT Class](../../atl-mfc-shared/reference/cstringt-class.md).
+`CSimpleStringT` is the base class for the various string classes supported by Visual C++. It provides minimal support for memory management of the string object and basic buffer manipulation. For more advanced string objects, see [`CStringT Class`](../../atl-mfc-shared/reference/cstringt-class.md).
### Requirements
-**Header:** atlsimpstr.h
+**Header:** `atlsimpstr.h`
-## CSimpleStringT::Append
+## `CSimpleStringT::Append`
Appends a `CSimpleStringT` object to an existing `CSimpleStringT` object.
@@ -103,13 +103,13 @@ void Append(PCXSTR pszSrc);
#### Parameters
-*strSrc*
+*`strSrc`*
The `CSimpleStringT` object to be appended.
-*pszSrc*
+*`pszSrc`*
A pointer to a string containing the characters to be appended.
-*nLength*
+*`nLength`*
The number of characters to append.
### Remarks
@@ -121,6 +121,8 @@ Call this method to append an existing `CSimpleStringT` object to another `CSimp
The following example demonstrates the use of `CSimpleStringT::Append`.
```cpp
+CAtlString basestr;
+IAtlStringMgr* pMgr = basestr.GetManager();
CSimpleString str1(pMgr), str2(pMgr);
str1.SetString(_T("Soccer is"));
str2.SetString(_T(" an elegant game"));
@@ -128,7 +130,7 @@ str1.Append(str2);
ASSERT(_tcscmp(str1, _T("Soccer is an elegant game")) == 0);
```
-## CSimpleStringT::AppendChar
+## `CSimpleStringT::AppendChar`
Appends a character to an existing `CSimpleStringT` object.
@@ -140,60 +142,77 @@ void AppendChar(XCHAR ch);
#### Parameters
-*ch*
+*`ch`*
The character to be appended
### Remarks
Call this function to append the specified character to the end of an existing `CSimpleStringT` object.
-## CSimpleStringT::CopyChars
+## `CSimpleStringT::CopyChars`
Copies a character or characters to a `CSimpleStringT` object.
### Syntax
-```
+```cpp
static void CopyChars(
XCHAR* pchDest,
const XCHAR* pchSrc,
int nChars) throw();
+static void CopyChars(
+ XCHAR* pchDest,
+ size_t nDestLen,
+ const XCHAR* pchSrc,
+ int nChars) throw();
```
#### Parameters
-*pchDest*
+*`pchDest`*
A pointer to a character string.
-*pchSrc*
+*`nDestLen`*
+Buffer size of *`pchDest`*
+
+*`pchSrc`*
A pointer to a string containing the characters to be copied.
-*nChars*
-The number of *pchSrc* characters to be copied.
+*`nChars`*
+The number of *`pchSrc`* characters to be copied.
### Remarks
-Call this method to copy characters from *pchSrc* to the *pchDest* string.
+Call this method to copy characters from *`pchSrc`* to the *`pchDest`* string.
### Example
The following example demonstrates the use of `CSimpleStringT::CopyChars`.
```cpp
+CAtlString basestr;
+IAtlStringMgr* pMgr = basestr.GetManager();
CSimpleString str(_T("xxxxxxxxxxxxxxxxxxx"), 20, pMgr);
-TCHAR* pszSrc = _T("Hello world!");
+const TCHAR* pszSrc = _T("Hello world!");
_tprintf_s(_T("%s\n"), str);
-str.CopyChars(str.GetBuffer(), pszSrc, 12);
+str.CopyChars(str.GetBuffer(), 20, pszSrc, 12);
_tprintf_s(_T("%s\n"), str);
```
-## CSimpleStringT::CopyCharsOverlapped
+The output from this example is as follows:
+
+```output
+xxxxxxxxxxxxxxxxxxx
+Hello world!xxxxxxx
+```
+
+## `CSimpleStringT::CopyCharsOverlapped`
Copies a character or characters to a `CSimpleStringT` object.
### Syntax
-```
+```cpp
static void CopyCharsOverlapped(
XCHAR* pchDest,
const XCHAR* pchSrc,
@@ -202,30 +221,30 @@ static void CopyCharsOverlapped(
#### Parameters
-*pchDest*
+*`pchDest`*
A pointer to a character string.
-*pchSrc*
+*`pchSrc`*
A pointer to a string containing the characters to be copied.
-*nChars*
-The number of *pchSrc* characters to be copied.
+*`nChars`*
+The number of *`pchSrc`* characters to be copied.
### Remarks
-Call this method to copy characters from *pchSrc* to the *pchDest* string. Unlike `CopyChars`, `CopyCharsOverlapped` provides a safe method for copying from character buffers that might be overlapped.
+Call this method to copy characters from *`pchSrc`* to the *`pchDest`* string. Unlike `CopyChars`, `CopyCharsOverlapped` provides a safe method for copying from character buffers that might be overlapped.
### Example
-See the example for [CSimpleStringT::CopyChars](#copychars), or the source code for `CSimpleStringT::SetString` (located in atlsimpstr.h).
+See the example for [`CSimpleStringT::CopyChars`](#copychars), or the source code for `CSimpleStringT::SetString` (located in `atlsimpstr.h`).
-## CSimpleStringT::CSimpleStringT
+## `CSimpleStringT::CSimpleStringT`
Constructs a `CSimpleStringT` object.
### Syntax
-```
+```cpp
CSimpleStringT(const XCHAR* pchSrc, int nLength, IAtlStringMgr* pStringMgr);
CSimpleStringT(PCXSTR pszSrc, IAtlStringMgr* pStringMgr);
CSimpleStringT(const CSimpleStringT& strSrc);
@@ -234,20 +253,20 @@ explicit CSimpleStringT(IAtlStringMgr* pStringMgr) throw();
#### Parameters
-*strSrc*
+*`strSrc`*
An existing `CSimpleStringT` object to be copied into this `CSimpleStringT` object.
-*pchSrc*
-A pointer to an array of characters of length *nLength*, not null terminated.
+*`pchSrc`*
+A pointer to an array of characters of length *`nLength`*, not null terminated.
-*pszSrc*
+*`pszSrc`*
A null-terminated string to be copied into this `CSimpleStringT` object.
-*nLength*
+*`nLength`*
A count of the number of characters in `pch`.
-*pStringMgr*
-A pointer to the memory manager of the `CSimpleStringT` object. For more information about `IAtlStringMgr` and memory management for `CSimpleStringT`, see [Memory Management and CStringT](../memory-management-with-cstringt.md).
+*`pStringMgr`*
+A pointer to the memory manager of the `CSimpleStringT` object. For more information about `IAtlStringMgr` and memory management for `CSimpleStringT`, see [Memory Management and `CStringT`](../memory-management-with-cstringt.md).
### Remarks
@@ -258,6 +277,9 @@ Construct a new `CSimpleStringT` object. Because the constructors copy the input
The following example demonstrates the use of `CSimpleStringT::CSimpleStringT` by using the ATL **`typedef`** `CSimpleString`. `CSimpleString` is a commonly used specialization of the class template `CSimpleStringT`.
```cpp
+CAtlString basestr;
+IAtlStringMgr* pMgr = basestr.GetManager();
+
CSimpleString s1(pMgr);
// Empty string
CSimpleString s2(_T("cat"), pMgr);
@@ -272,7 +294,7 @@ CSimpleString s5(_T("xxxxxx"), 6, pMgr);
// s5 = "xxxxxx"
```
-## CSimpleStringT::Empty
+## `CSimpleStringT::Empty`
Makes this `CSimpleStringT` object an empty string and frees memory as appropriate.
@@ -284,18 +306,21 @@ void Empty() throw();
### Remarks
-For more information, see [Strings: CString Exception Cleanup](../cstring-exception-cleanup.md).
+For more information, see [Strings: `CString` Exception Cleanup](../cstring-exception-cleanup.md).
### Example
The following example demonstrates the use of `CSimpleStringT::Empty`.
```cpp
+CAtlString basestr;
+IAtlStringMgr* pMgr = basestr.GetManager();
+
CSimpleString s(pMgr);
ASSERT(s.IsEmpty());
```
-## CSimpleStringT::FreeExtra
+## `CSimpleStringT::FreeExtra`
Frees any extra memory previously allocated by the string but no longer needed.
@@ -307,7 +332,7 @@ void FreeExtra();
### Remarks
-This should reduce the memory overhead consumed by the string object. The method reallocates the buffer to the exact length returned by [GetLength](#getlength).
+This should reduce the memory overhead consumed by the string object. The method reallocates the buffer to the exact length returned by [`GetLength`](#getlength).
### Example
@@ -336,8 +361,6 @@ _tprintf_s(_T("Alloc length is %d, String length is %d\n"),
str.GetAllocLength(), str.GetLength());
```
-### Remarks
-
The output from this example is as follows:
```Output
@@ -346,13 +369,13 @@ Alloc length is 1031, String length is 15
Alloc length is 15, String length is 15
```
-## CSimpleStringT::GetAllocLength
+## `CSimpleStringT::GetAllocLength`
Retrieves the allocated length of a `CSimpleStringT` object.
### Syntax
-```
+```cpp
int GetAllocLength() const throw();
```
@@ -362,22 +385,22 @@ The number of characters allocated for this object.
### Remarks
-Call this method to determine the number of characters allocated for this `CSimpleStringT` object. See [FreeExtra](#freeextra) for an example of calling this function.
+Call this method to determine the number of characters allocated for this `CSimpleStringT` object. See [`FreeExtra`](#freeextra) for an example of calling this function.
-## CSimpleStringT::GetAt
+## `CSimpleStringT::GetAt`
Returns one character from a `CSimpleStringT` object.
### Syntax
-```
+```cpp
XCHAR GetAt(int iChar) const;
```
#### Parameters
-*iChar*
-Zero-based index of the character in the `CSimpleStringT` object. The *iChar* parameter must be greater than or equal to 0 and less than the value returned by [GetLength](#getlength). Otherwise, `GetAt` will generate an exception.
+*`iChar`*
+Zero-based index of the character in the `CSimpleStringT` object. The *`iChar`* parameter must be greater than or equal to 0 and less than the value returned by [`GetLength`](#getlength). Otherwise, `GetAt` will generate an exception.
### Return Value
@@ -385,7 +408,7 @@ An `XCHAR` that contains the character at the specified position in the string.
### Remarks
-Call this method to return the one character specified by *iChar*. The overloaded subscript (**[]**) operator is a convenient alias for `GetAt`. The null terminator is addressable without generating an exception by using `GetAt`. However, it is not counted by `GetLength`, and the value returned is 0.
+Call this method to return the one character specified by *`iChar`*. The overloaded subscript (**`[]`**) operator is a convenient alias for `GetAt`. The null terminator is addressable without generating an exception by using `GetAt`. However, it is not counted by `GetLength`, and the value returned is 0.
### Example
@@ -396,23 +419,23 @@ CSimpleString s(_T("abcdef"), pMgr);
ASSERT(s.GetAt(2) == _T('c'));
```
-## CSimpleStringT::GetBuffer
+## `CSimpleStringT::GetBuffer`
Returns a pointer to the internal character buffer for the `CSimpleStringT` object.
### Syntax
-```
+```cpp
PXSTR GetBuffer(int nMinBufferLength);
PXSTR GetBuffer();
```
#### Parameters
-*nMinBufferLength*
+*`nMinBufferLength`*
The minimum number of characters that the character buffer can hold. This value does not include space for a null terminator.
-If *nMinBufferLength* is larger than the length of the current buffer, `GetBuffer` destroys the current buffer, replaces it with a buffer of the requested size, and resets the object reference count to zero. If you have previously called [LockBuffer](#lockbuffer) on this buffer, you lose the buffer lock.
+If *`nMinBufferLength`* is larger than the length of the current buffer, `GetBuffer` destroys the current buffer, replaces it with a buffer of the requested size, and resets the object reference count to zero. If you have previously called [`LockBuffer`](#lockbuffer) on this buffer, you lose the buffer lock.
### Return Value
@@ -422,7 +445,7 @@ An `PXSTR` pointer to the object's (null-terminated) character buffer.
Call this method to return the buffer contents of the `CSimpleStringT` object. The returned `PXSTR` is not a constant and therefore allows direct modification of `CSimpleStringT` contents.
-If you use the pointer returned by `GetBuffer` to change the string contents, you must call [ReleaseBuffer](#releasebuffer) before you use any other `CSimpleStringT` member methods.
+If you use the pointer returned by `GetBuffer` to change the string contents, you must call [`ReleaseBuffer`](#releasebuffer) to update the internal state of `CSimpleStringT` before you use any other `CSimpleStringT` methods.
The address returned by `GetBuffer` may not be valid after the call to `ReleaseBuffer` because additional `CSimpleStringT` operations can cause the `CSimpleStringT` buffer to be reallocated. The buffer is not reallocated if you do not change the length of the `CSimpleStringT`.
@@ -430,7 +453,7 @@ The buffer memory is automatically freed when the `CSimpleStringT` object is des
If you keep track of the string length yourself, you should not append the terminating null character. However, you must specify the final string length when you release the buffer with `ReleaseBuffer`. If you do append a terminating null character, you should pass -1 (the default) for the length. `ReleaseBuffer` then determines the buffer length.
-If there is insufficient memory to satisfy the `GetBuffer` request, this method throws a CMemoryException*.
+If there is insufficient memory to satisfy the `GetBuffer` request, this method throws a `CMemoryException*`.
### Example
@@ -445,19 +468,19 @@ ASSERT(_tcscmp(s, _T("Hello")) == 0);
s.ReleaseBuffer();
```
-## CSimpleStringT::GetBufferSetLength
+## `CSimpleStringT::GetBufferSetLength`
-Returns a pointer to the internal character buffer for the `CSimpleStringT` object, truncating or growing its length if necessary to exactly match the length specified in *nLength*.
+Returns a pointer to the internal character buffer for the `CSimpleStringT` object, truncating or growing its length if necessary to exactly match the length specified in *`nLength`*.
### Syntax
-```
+```cpp
PXSTR GetBufferSetLength(int nLength);
```
#### Parameters
-*nLength*
+*`nLength`*
The exact size of the `CSimpleStringT` character buffer in characters.
### Return Value
@@ -468,7 +491,7 @@ A `PXSTR` pointer to the object's (null-terminated) character buffer.
Call this method to retrieve a specified length of the internal buffer of the `CSimpleStringT` object. The returned `PXSTR` pointer is not **`const`** and thus allows direct modification of `CSimpleStringT` contents.
-If you use the pointer returned by [GetBufferSetLength](#getbuffersetlength) to change the string contents, call `ReleaseBuffer` to update the internal state of `CsimpleStringT` before you use any other `CSimpleStringT` methods.
+If you use the pointer returned by [`GetBufferSetLength`](#getbuffersetlength) to change the string contents, call `ReleaseBuffer` to update the internal state of `CSimpleStringT` before you use any other `CSimpleStringT` methods.
The address returned by `GetBufferSetLength` may not be valid after the call to `ReleaseBuffer` because additional `CSimpleStringT` operations can cause the `CSimpleStringT` buffer to be reallocated. The buffer is not reassigned if you do not change the length of the `CSimpleStringT`.
@@ -479,9 +502,7 @@ If you keep track of the string length yourself, do not append the terminating n
For more information about reference counting, see the following articles:
- [Managing Object Lifetimes through Reference Counting](/windows/win32/com/managing-object-lifetimes-through-reference-counting) in the Windows SDK.
-
- [Implementing Reference Counting](/windows/win32/com/implementing-reference-counting) in the Windows SDK.
-
- [Rules for Managing Reference Counts](/windows/win32/com/rules-for-managing-reference-counts) in the Windows SDK.
### Example
@@ -494,21 +515,19 @@ LPTSTR pstr = str.GetBufferSetLength(3);
pstr[0] = _T('C');
pstr[1] = _T('u');
pstr[2] = _T('p');
-
-// No need for trailing zero or call to ReleaseBuffer()
-// because GetBufferSetLength() set it for us.
+str.ReleaseBuffer();
str += _T(" soccer is best!");
ASSERT(_tcscmp(str, _T("Cup soccer is best!")) == 0);
```
-## CSimpleStringT::GetLength
+## `CSimpleStringT::GetLength`
Returns the number of characters in the `CSimpleStringT` object.
### Syntax
-```
+```cpp
int GetLength() const throw();
```
@@ -520,15 +539,15 @@ A count of the characters in the string.
Call this method to return the number of characters in the object. The count does not include a null terminator.
-For multibyte character sets (MBCS), `GetLength` counts each 8-bit character; that is, a lead and trail byte in one multibyte character are counted as two bytes. See [FreeExtra](#freeextra) for an example of calling this function.
+For multibyte character sets (MBCS), `GetLength` counts each 8-bit character; that is, a lead and trail byte in one multibyte character are counted as two bytes. See [`FreeExtra`](#freeextra) for an example of calling this function.
-## CSimpleStringT::GetManager
+## `CSimpleStringT::GetManager`
Retrieves the memory manager of the `CSimpleStringT` object.
### Syntax
-```
+```cpp
IAtlStringMgr* GetManager() const throw();
```
@@ -538,15 +557,15 @@ A pointer to the memory manager for the `CSimpleStringT` object.
### Remarks
-Call this method to retrieve the memory manager used by the `CSimpleStringT` object. For more information on memory managers and string objects, see [Memory Management and CStringT](../memory-management-with-cstringt.md).
+Call this method to retrieve the memory manager used by the `CSimpleStringT` object. For more information on memory managers and string objects, see [Memory Management and `CStringT`](../memory-management-with-cstringt.md).
-## CSimpleStringT::GetString
+## `CSimpleStringT::GetString`
Retrieves the character string.
### Syntax
-```
+```cpp
PCXSTR GetString() const throw();
```
@@ -566,24 +585,32 @@ Call this method to retrieve the character string associated with the `CSimpleSt
The following example demonstrates the use of `CSimpleStringT::GetString`.
```cpp
+CAtlString basestr;
+IAtlStringMgr* pMgr = basestr.GetManager();
CSimpleString str(pMgr);
str += _T("Cup soccer is best!");
_tprintf_s(_T("%s"), str.GetString());
```
-## CSimpleStringT::IsEmpty
+The output from this example is as follows:
+
+```output
+Cup soccer is best!
+```
+
+## `CSimpleStringT::IsEmpty`
Tests a `CSimpleStringT` object for the empty condition.
### Syntax
-```
+```cpp
bool IsEmpty() const throw();
```
### Return Value
-Returns TRUE if the `CSimpleStringT` object has 0 length; otherwise FALSE.
+Returns `TRUE` if the `CSimpleStringT` object has 0 length; otherwise `FALSE`.
### Remarks
@@ -598,13 +625,13 @@ CSimpleString s(pMgr);
ASSERT(s.IsEmpty());
```
-## CSimpleStringT::LockBuffer
+## `CSimpleStringT::LockBuffer`
Disables reference counting and protects the string in the buffer.
### Syntax
-```
+```cpp
PXSTR LockBuffer();
```
@@ -622,10 +649,10 @@ Call this method to lock the buffer of the `CSimpleStringT` object. By calling `
By locking the string in the buffer, you ensure that the string's exclusive hold on the buffer will remain intact.
-After you have finished with `LockBuffer`, call [UnlockBuffer](#unlockbuffer) to reset the reference count to 1.
+After you have finished with `LockBuffer`, call [`UnlockBuffer`](#unlockbuffer) to reset the reference count to 1.
> [!NOTE]
-> If you call [GetBuffer](#getbuffer) on a locked buffer and you set the `GetBuffer` parameter `nMinBufferLength` to greater than the length of the current buffer, you will lose the buffer lock. Such a call to `GetBuffer` destroys the current buffer, replaces it with a buffer of the requested size, and resets the reference count to zero.
+> If you call [`GetBuffer`](#getbuffer) on a locked buffer and you set the `GetBuffer` parameter `nMinBufferLength` to greater than the length of the current buffer, you will lose the buffer lock. Such a call to `GetBuffer` destroys the current buffer, replaces it with a buffer of the requested size, and resets the reference count to zero.
For more information about reference counting, see the following articles:
@@ -640,6 +667,9 @@ For more information about reference counting, see the following articles:
The following example demonstrates the use of `CSimpleStringT::LockBuffer`.
```cpp
+CAtlString basestr;
+IAtlStringMgr* pMgr = basestr.GetManager();
+
CSimpleString str(_T("Hello"), pMgr);
TCHAR ch;
@@ -649,27 +679,33 @@ _tprintf_s(_T("%c"), ch);
str.UnlockBuffer();
```
-## CSimpleStringT::operator\[\]
+The output from this example is as follows:
+
+```output
+l
+```
+
+## `CSimpleStringT::operator[]`
Call this function to access a single character of the character array.
### Syntax
-```
+```cpp
XCHAR operator[](int iChar) const;
```
#### Parameters
-*iChar*
+*`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.
+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`.
+> 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`.
### Example
@@ -680,35 +716,13 @@ 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
-
-```
-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 +=
+## `CSimpleStringT::operator +=`
Joins a new string or character to the end of an existing string.
### Syntax
-```
+```cpp
CSimpleStringT& operator +=(PCXSTR pszSrc);
CSimpleStringT& operator +=(const CSimpleStringT& strSrc);
template
@@ -720,13 +734,13 @@ CSimpleStringT& operator +=(wchar_t ch);
#### Parameters
-*pszSrc*
+*`pszSrc`*
A pointer to a null-terminated string.
-*strSrc*
+*`strSrc`*
A pointer to an existing `CSimpleStringT` object.
-*ch*
+*`ch`*
The character to be appended.
### Remarks
@@ -742,23 +756,23 @@ CSimpleString str(_T("abc"), pMgr);
ASSERT(_tcscmp((str += _T("def")), _T("abcdef")) == 0);
```
-## CSimpleStringT::operator =
+## `CSimpleStringT::operator =`
Assigns a new value to a `CSimpleStringT` object.
### Syntax
-```
+```cpp
CSimpleStringT& operator =(PCXSTR pszSrc);
CSimpleStringT& operator =(const CSimpleStringT& strSrc);
```
#### Parameters
-*pszSrc*
+*`pszSrc`*
A pointer to a null-terminated string.
-*strSrc*
+*`strSrc`*
A pointer to an existing `CSimpleStringT` object.
### Remarks
@@ -789,13 +803,13 @@ s1 = _T("x");
ASSERT(_tcscmp(s1, _T("x")) == 0);
```
-## CSimpleStringT::operator PCXSTR
+## `CSimpleStringT::operator PCXSTR`
Directly accesses characters stored in a `CSimpleStringT` object as a C-style string.
### Syntax
-```
+```cpp
operator PCXSTR() const throw();
```
@@ -841,17 +855,17 @@ wcout << strSports;
wcout << (PCWSTR)strSports;
```
-## CSimpleStringT::PCXSTR
+## `CSimpleStringT::PCXSTR`
A pointer to a constant string.
### Syntax
-```
+```cpp
typedef ChTraitsBase< BaseType >::PCXSTR PCXSTR;
```
-## CSimpleStringT::Preallocate
+## `CSimpleStringT::Preallocate`
Allocates a specific amount of bytes for the `CSimpleStringT` object.
@@ -863,39 +877,49 @@ void Preallocate( int nLength);
#### Parameters
-*nLength*
+*`nLength`*
The exact size of the `CSimpleStringT` character buffer in characters.
### Remarks
Call this method to allocate a specific buffer size for the `CSimpleStringT` object.
-`CSimpleStringT` generates a STATUS_NO_MEMORY exception if it is unable to allocate space for the character buffer. By default, memory allocation is performed by WIN32 API functions `HeapAlloc` or `HeapReAlloc`.
+`CSimpleStringT` generates a `STATUS_NO_MEMORY` exception if it is unable to allocate space for the character buffer. By default, memory allocation is performed by WIN32 API functions `HeapAlloc` or `HeapReAlloc`.
### Example
The following example demonstrates the use of `CSimpleStringT::Preallocate`.
```cpp
+CAtlString basestr;
+IAtlStringMgr* pMgr = basestr.GetManager();
+
CSimpleString str(pMgr);
_tprintf_s(_T("Allocated length: %d\n"), str.GetAllocLength());
str.Preallocate(100);
_tprintf_s(_T("Allocated length: %d\n"), str.GetAllocLength());
```
-## CSimpleStringT::PXSTR
+The output from this example is as follows:
+
+```output
+Allocated length: 0
+Allocated length: 103
+```
+
+## `CSimpleStringT::PXSTR`
A pointer to a string.
### Syntax
-```
+```cpp
typedef ChTraitsBase< BaseType >::PXSTR PXSTR;
```
-## CSimpleStringT::ReleaseBuffer
+## `CSimpleStringT::ReleaseBuffer`
-Releases control of the buffer allocated by [GetBuffer](#getbuffer).
+Releases control of the buffer allocated by [`GetBuffer`](#getbuffer).
### Syntax
@@ -905,12 +929,12 @@ void ReleaseBuffer(int nNewLength = -1);
#### Parameters
-*nNewLength*
+*`nNewLength`*
The new length of the string in characters, not counting a null terminator. If the string is null terminated, the -1 default value sets the `CSimpleStringT` size to the current length of the string.
### Remarks
-Call this method to reallocate or free up the buffer of the string object. If you know that the string in the buffer is null terminated, you can omit the *nNewLength* argument. If your string is not null terminated, use *nNewLength* to specify its length. The address returned by [GetBuffer](#getbuffer) is invalid after the call to `ReleaseBuffer` or any other `CSimpleStringT` operation.
+Call this method to reallocate or free up the buffer of the string object. If you know that the string in the buffer is null terminated, you can omit the *`nNewLength`* argument. If your string is not null terminated, use *`nNewLength`* to specify its length. The address returned by [`GetBuffer`](#getbuffer) is invalid after the call to `ReleaseBuffer` or any other `CSimpleStringT` operation.
### Example
@@ -934,9 +958,9 @@ ASSERT(s.GetLength() == 3);
// Length still 3
```
-## CSimpleStringT::ReleaseBufferSetLength
+## `CSimpleStringT::ReleaseBufferSetLength`
-Releases control of the buffer allocated by [GetBuffer](#getbuffer).
+Releases control of the buffer allocated by [`GetBuffer`](#getbuffer).
### Syntax
@@ -946,14 +970,14 @@ void ReleaseBufferSetLength(int nNewLength);
#### Parameters
-*nNewLength*
+*`nNewLength`*
The length of the string being released
### Remarks
-This function is functionally similar to [ReleaseBuffer](#releasebuffer) except that a valid length for the string object must be passed.
+This function is functionally similar to [`ReleaseBuffer`](#releasebuffer) except that a valid length for the string object must be passed.
-## CSimpleStringT::SetAt
+## `CSimpleStringT::SetAt`
Sets a single character from a `CSimpleStringT` object.
@@ -965,15 +989,15 @@ void SetAt(int iChar, XCHAR ch);
#### Parameters
-*iChar*
-Zero-based index of the character in the `CSimpleStringT` object. The *iChar* parameter must be greater than or equal to 0 and less than the value returned by [GetLength](#getlength).
+*`iChar`*
+Zero-based index of the character in the `CSimpleStringT` object. The *`iChar`* parameter must be greater than or equal to 0 and less than the value returned by [`GetLength`](#getlength).
-*ch*
+*`ch`*
The new character.
### Remarks
-Call this method to overwrite the character located at *iChar*. This method will not enlarge the string if *iChar* exceeds the bounds of the existing string.
+Call this method to overwrite the character located at *`iChar`*. This method will not enlarge the string if *`iChar`* exceeds the bounds of the existing string.
### Example
@@ -985,7 +1009,7 @@ s.SetAt(1, _T('a'));
ASSERT(_tcscmp(s, _T("aacdef")) == 0);
```
-## CSimpleStringT::SetManager
+## `CSimpleStringT::SetManager`
Specifies the memory manager of the `CSimpleStringT` object.
@@ -997,12 +1021,12 @@ void SetManager(IAtlStringMgr* pStringMgr);
#### Parameters
-*pStringMgr*
+*`pStringMgr`*
A pointer to the new memory manager.
### Remarks
-Call this method to specify a new memory manager used by the `CSimpleStringT` object. For more information on memory managers and string objects, see [Memory Management and CStringT](../memory-management-with-cstringt.md).
+Call this method to specify a new memory manager used by the `CSimpleStringT` object. For more information on memory managers and string objects, see [Memory Management and `CStringT`](../memory-management-with-cstringt.md).
### Example
@@ -1013,7 +1037,7 @@ CSimpleString s(pMgr);
s.SetManager(pCustomMgr);
```
-## CSimpleStringT::SetString
+## `CSimpleStringT::SetString`
Sets the string of a `CSimpleStringT` object.
@@ -1026,23 +1050,23 @@ void SetString(PCXSTR pszSrc);
#### Parameters
-*pszSrc*
+*`pszSrc`*
A pointer to a null-terminated string.
-*nLength*
-A count of the number of characters in *pszSrc*.
+*`nLength`*
+A count of the number of characters in *`pszSrc`*.
### Remarks
Copy a string into the `CSimpleStringT` object. `SetString` overwrites the older string data in the buffer.
-Both versions of `SetString` check whether *pszSrc* is a null pointer, and if it is, throw an E_INVALIDARG error.
+Both versions of `SetString` check whether *`pszSrc`* is a null pointer, and if it is, throw an `E_INVALIDARG` error.
-The one-parameter version of `SetString` expects *pszSrc* to point to a null-terminated string.
+The one-parameter version of `SetString` expects *`pszSrc`* to point to a null-terminated string.
-The two-parameter version of `SetString` also expects *pszSrc* to be a null-terminated string. It uses *nLength* as the string length unless it encounters a null terminator first.
+The two-parameter version of `SetString` also expects *`pszSrc`* to be a null-terminated string. It uses *`nLength`* as the string length unless it encounters a null terminator first.
-The two-parameter version of `SetString` also checks whether *pszSrc* points to a location in the current buffer in `CSimpleStringT`. In this special case, `SetString` uses a memory copy function that does not overwrite the string data as it copies the string data back to its buffer.
+The two-parameter version of `SetString` also checks whether *`pszSrc`* points to a location in the current buffer in `CSimpleStringT`. In this special case, `SetString` uses a memory copy function that does not overwrite the string data as it copies the string data back to its buffer.
### Example
@@ -1055,28 +1079,28 @@ s.SetString(_T("Soccer"), 6);
ASSERT(_tcscmp(s, _T("Soccer")) == 0);
```
-## CSimpleStringT::StringLength
+## `CSimpleStringT::StringLength`
Returns the number of characters in the specified string.
### Syntax
-```
+```cpp
ATL_NOINLINE static int StringLength(PCXSTR psz) throw();
```
#### Parameters
-*psz*
+*`psz`*
A pointer to a null-terminated string.
### Return Value
-The number of characters in *psz*; not counting a null terminator.
+The number of characters in *`psz`*; not counting a null terminator.
### Remarks
-Call this method to retrieve the number of characters in the string pointed to by *psz*.
+Call this method to retrieve the number of characters in the string pointed to by *`psz`*.
### Example
@@ -1086,7 +1110,7 @@ The following example demonstrates the use of `CSimpleStringT::StringLength`.
ASSERT(CSimpleString::StringLength(_T("soccer")) == 6);
```
-## CSimpleStringT::Truncate
+## `CSimpleStringT::Truncate`
Truncates the string to the new length.
@@ -1098,7 +1122,7 @@ void Truncate(int nNewLength);
#### Parameters
-*nNewLength*
+*`nNewLength`*
The new length of the string.
### Remarks
@@ -1106,22 +1130,33 @@ The new length of the string.
Call this method to truncate the contents of the string to the new length.
> [!NOTE]
-> This does not affect the allocated length of the buffer. To decrease or increase the current buffer, see [FreeExtra](#freeextra) and [Preallocate](#preallocate).
+> This does not affect the allocated length of the buffer. To decrease or increase the current buffer, see [`FreeExtra`](#freeextra) and [`Preallocate`](#preallocate).
### Example
The following example demonstrates the use of `CSimpleStringT::Truncate`.
```cpp
+CAtlString basestr;
+IAtlStringMgr* pMgr = basestr.GetManager();
CSimpleString str(_T("abcdefghi"), pMgr);
-_tprintf_s(_T("Allocated length: %d\n"), str.GetLength());
-_tprintf_s(_T("Contents: %s\n"), str);
+_tprintf_s(_T("String length: %d / Allocated length: %d\n"), str.GetLength(), str.GetAllocLength());
+_tprintf_s(_T("Contents: %s\n"), (LPCTSTR)str);
str.Truncate(4);
-_tprintf_s(_T("Allocated length: %d\n"), str.GetLength());
-_tprintf_s(_T("Contents: %s\n"), str);
+_tprintf_s(_T("String length: %d / Allocated length: %d\n"), str.GetLength(), str.GetAllocLength());
+_tprintf_s(_T("Contents: %s\n"), (LPCTSTR)str);
```
-## CSimpleStringT::UnlockBuffer
+The output from this example is:
+
+```Output
+String length: 9 / Allocated length: 15
+Contents: abcdefghi
+String length: 4 / Allocated length: 15
+Contents: abcd
+```
+
+## `CSimpleStringT::UnlockBuffer`
Unlocks the buffer of the `CSimpleStringT` object.
@@ -1135,15 +1170,15 @@ void UnlockBuffer() throw();
Call this method to reset the reference count of the string to 1.
-The `CSimpleStringT` destructor automatically calls `UnlockBuffer` to ensure that the buffer is not locked when the destructor is called. For an example of this method, see [LockBuffer](#lockbuffer).
+The `CSimpleStringT` destructor automatically calls `UnlockBuffer` to ensure that the buffer is not locked when the destructor is called. For an example of this method, see [`LockBuffer`](#lockbuffer).
-## CSimpleStringT::~CSimpleStringT
+## `CSimpleStringT::~CSimpleStringT`
Destroys a `CSimpleStringT` object.
### Syntax
-```
+```cpp
~CSimpleStringT() throw();
```
@@ -1153,5 +1188,5 @@ Call this method to destroy the `CSimpleStringT` object.
## See also
-[Hierarchy Chart](../../mfc/hierarchy-chart.md)
+[Hierarchy Chart](../../mfc/hierarchy-chart.md)\
[ATL/MFC Shared Classes](../../atl-mfc-shared/atl-mfc-shared-classes.md)
diff --git a/docs/atl-mfc-shared/reference/csize-class.md b/docs/atl-mfc-shared/reference/csize-class.md
index 179cb83856..f398b5055d 100644
--- a/docs/atl-mfc-shared/reference/csize-class.md
+++ b/docs/atl-mfc-shared/reference/csize-class.md
@@ -1,9 +1,9 @@
---
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
@@ -11,7 +11,7 @@ Similar to the Windows [SIZE](/windows/win32/api/windef/ns-windef-size) structur
## Syntax
-```
+```cpp
class CSize : public tagSIZE
```
@@ -57,7 +57,7 @@ The `cx` and `cy` members of `SIZE` (and `CSize`) are public. In addition, `CSiz
Constructs a `CSize` object.
-```
+```cpp
CSize() throw();
CSize( int initCX, int initCY) throw();
CSize( SIZE initSize) throw();
@@ -94,13 +94,13 @@ If no arguments are given, `cx` and `cy` are initialized to zero.
Checks for equality between two sizes.
-```
+```cpp
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
@@ -110,7 +110,7 @@ Returns nonzero if the sizes are equal, otherwize 0.
Checks for inequality between two sizes.
-```
+```cpp
BOOL operator!=(SIZE size) const throw();
```
@@ -150,7 +150,7 @@ void operator-=(SIZE size) throw();
These operators add this `CSize` value to the value of parameter.
-```
+```cpp
CSize operator+(SIZE size) const throw();
CPoint operator+(POINT point) const throw();
CRect operator+(const RECT* lpRect) const throw();
@@ -180,7 +180,7 @@ See the following descriptions of the individual operators:
The first three of these operators subtract this `CSize` value to the value of parameter.
-```
+```cpp
CSize operator-(SIZE size) const throw();
CPoint operator-(POINT point) const throw();
CRect operator-(const RECT* lpRect) const throw();
diff --git a/docs/atl-mfc-shared/reference/cstrbuft-class.md b/docs/atl-mfc-shared/reference/cstrbuft-class.md
index 0498aaed9c..4cc53bfee5 100644
--- a/docs/atl-mfc-shared/reference/cstrbuft-class.md
+++ b/docs/atl-mfc-shared/reference/cstrbuft-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CStrBufT Class"
title: "CStrBufT Class"
ms.date: "10/18/2018"
f1_keywords: ["CStrBufT", "ATLSIMPSTR/ATL::CStrBufT", "ATLSIMPSTR/ATL::CStrBufT::CStrBufT", "ATLSIMPSTR/ATL::CStrBufT::SetLength", "ATLSIMPSTR/ATL::CStrBufT::AUTO_LENGTH", "ATLSIMPSTR/ATL::CStrBufT::SET_LENGTH"]
@@ -11,7 +12,7 @@ This class provides automatic resource cleanup for `GetBuffer` and `ReleaseBuffe
## Syntax
-```
+```cpp
template
class CStrBufT
```
@@ -25,7 +26,7 @@ The character type of the `CStrBufT` class. Can be one of the following:
- **`wchar_t`** (for Unicode character strings)
-- TCHAR (for both ANSI and Unicode character strings)
+- **`TCHAR`** (for both ANSI and Unicode character strings)
## Members
@@ -33,8 +34,8 @@ The character type of the `CStrBufT` class. Can be one of the following:
|Name|Description|
|----------|-----------------|
-|PCXSTR|A pointer to a constant string.|
-|PXSTR|A pointer to a string.|
+|`PCXSTR`|A pointer to a constant string.|
+|`PXSTR`|A pointer to a string.|
|`StringType`|The string type whose buffer is to be manipulated by specializations of this class template.|
### Public Constructors
@@ -77,7 +78,7 @@ Primarily designed as a helper class, `CStrBufT` provides a convenient way for a
Automatically determine the new length of the string at release.
-```
+```cpp
static const DWORD AUTO_LENGTH = 0x01;
```
@@ -89,7 +90,7 @@ Automatically determine the new length of the string at release. The string must
Constructs a buffer object.
-```
+```cpp
CStrBufT(StringType& str, int nMinLength, DWORD dwFlags = AUTO_LENGTH) throw(...);
explicit CStrBufT(StringType& str) throw(...);
```
@@ -119,7 +120,7 @@ Note that the copy constructor is **`private`**.
Directly accesses characters stored in the associated string object as a C-style string.
-```
+```cpp
operator PCXSTR() const throw();
```
@@ -135,7 +136,7 @@ Call this function to return a pointer to the character buffer of a string objec
Directly accesses characters stored in the associated string object as a C-style string.
-```
+```cpp
operator PXSTR() throw();
```
@@ -151,7 +152,7 @@ Call this function to return a pointer to the character buffer of a string objec
A pointer to a constant string.
-```
+```cpp
typedef CSimpleStringT::PCXSTR PCXSTR;
```
@@ -159,7 +160,7 @@ typedef CSimpleStringT::PCXSTR PCXSTR;
A pointer to a string.
-```
+```cpp
typedef CSimpleStringT::PXSTR PXSTR;
```
@@ -167,7 +168,7 @@ typedef CSimpleStringT::PXSTR PXSTR;
Set the length of the string object at `GetBuffer` time.
-```
+```cpp
static const DWORD SET_LENGTH = 0x02;
```
@@ -201,7 +202,7 @@ Call this function to set the length of the string represented by the buffer obj
The string type whose buffer is to be manipulated by specializations of this class template.
-```
+```cpp
typedef CSimpleStringT StringType;
```
diff --git a/docs/atl-mfc-shared/reference/cstringdata-class.md b/docs/atl-mfc-shared/reference/cstringdata-class.md
index 2aea7d71a2..2755f5e8ab 100644
--- a/docs/atl-mfc-shared/reference/cstringdata-class.md
+++ b/docs/atl-mfc-shared/reference/cstringdata-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CStringData Class"
title: "CStringData Class"
ms.date: "11/04/2016"
f1_keywords: ["CStringData", "ATLSIMPSTR/ATL::CStringData", "ATLSIMPSTR/ATL::AddRef", "ATLSIMPSTR/ATL::data", "ATLSIMPSTR/ATL::IsLocked", "ATLSIMPSTR/ATL::IsShared", "ATLSIMPSTR/ATL::Lock", "ATLSIMPSTR/ATL::Release", "ATLSIMPSTR/ATL::Unlock", "ATLSIMPSTR/ATL::nAllocLength", "ATLSIMPSTR/ATL::nDataLength", "ATLSIMPSTR/ATL::nRefs", "ATLSIMPSTR/ATL::pStringMgr"]
@@ -11,7 +12,7 @@ This class represents the data of a string object.
## Syntax
-```
+```cpp
struct CStringData
```
@@ -19,7 +20,7 @@ struct CStringData
### Methods
-|||
+|Name|Description|
|-|-|
|[AddRef](#addref)|Increments the reference count of the string data object.|
|[data](#data)|Retrieves the character data of a string object.|
@@ -31,7 +32,7 @@ struct CStringData
### Data Members
-|||
+|Name|Description|
|-|-|
|[nAllocLength](#nalloclength)|Length of allocated data in `XCHAR`s (not including terminating null)|
|[nDataLength](#ndatalength)|Length of currently used data in `XCHAR`s (not including terminating null)|
@@ -104,7 +105,7 @@ Call this function to return the current character buffer of the associated stri
Determines if the character buffer is locked.
-```
+```cpp
bool IsLocked() const throw();
```
@@ -120,7 +121,7 @@ Call this function to determine if the character buffer of a string object is cu
Determines if the character buffer is shared.
-```
+```cpp
bool IsShared() const throw();
```
@@ -151,7 +152,7 @@ Call this function to lock the character buffer of the string data object. Locki
Length of the allocated character buffer.
-```
+```cpp
int nAllocLength;
```
@@ -163,7 +164,7 @@ Stores the length of the allocated data buffer in `XCHAR`s (not including termin
Current length of the string object.
-```
+```cpp
int nDataLength;
```
@@ -175,7 +176,7 @@ Stores the length of currently used data in `XCHAR`s (not including terminating
Reference count of the string data object.
-```
+```cpp
long nRefs;
```
@@ -187,7 +188,7 @@ Stores the reference count of the string data object. This count indicates the n
The memory manager of the associated string object.
-```
+```cpp
IAtlStringMgr* pStringMgr;
```
diff --git a/docs/atl-mfc-shared/reference/cstringt-class.md b/docs/atl-mfc-shared/reference/cstringt-class.md
index 0965d5a993..a47c9ad9a6 100644
--- a/docs/atl-mfc-shared/reference/cstringt-class.md
+++ b/docs/atl-mfc-shared/reference/cstringt-class.md
@@ -1,17 +1,17 @@
---
-title: "CStringT Class"
-ms.date: "03/27/2019"
-f1_keywords: ["CStringT", "ATLSTR/ATL::CStringT", "ATLSTR/ATL::CStringT::CStringT", "ATLSTR/ATL::CStringT::AllocSysString", "ATLSTR/ATL::CStringT::AnsiToOem", "ATLSTR/ATL::CStringT::AppendFormat", "ATLSTR/ATL::CStringT::Collate", "ATLSTR/ATL::CStringT::CollateNoCase", "ATLSTR/ATL::CStringT::Compare", "ATLSTR/ATL::CStringT::CompareNoCase", "ATLSTR/ATL::CStringT::Delete", "ATLSTR/ATL::CStringT::Find", "ATLSTR/ATL::CStringT::FindOneOf", "ATLSTR/ATL::CStringT::Format", "ATLSTR/ATL::CStringT::FormatMessage", "ATLSTR/ATL::CStringT::FormatMessageV", "ATLSTR/ATL::CStringT::FormatV", "ATLSTR/ATL::CStringT::GetEnvironmentVariable", "ATLSTR/ATL::CStringT::Insert", "ATLSTR/ATL::CStringT::Left", "ATLSTR/ATL::CStringT::LoadString", "ATLSTR/ATL::CStringT::MakeLower", "ATLSTR/ATL::CStringT::MakeReverse", "ATLSTR/ATL::CStringT::MakeUpper", "ATLSTR/ATL::CStringT::Mid", "ATLSTR/ATL::CStringT::OemToAnsi", "ATLSTR/ATL::CStringT::Remove", "ATLSTR/ATL::CStringT::Replace", "ATLSTR/ATL::CStringT::ReverseFind", "ATLSTR/ATL::CStringT::Right", "ATLSTR/ATL::CStringT::SetSysString", "ATLSTR/ATL::CStringT::SpanExcluding", "ATLSTR/ATL::CStringT::SpanIncluding", "ATLSTR/ATL::CStringT::Tokenize", "ATLSTR/ATL::CStringT::Trim", "ATLSTR/ATL::CStringT::TrimLeft", "ATLSTR/ATL::CStringT::TrimRight", "CSTRINGT/CStringT", "CSTRINGT/CStringT::CStringT", "CSTRINGT/CStringT::AllocSysString", "CSTRINGT/CStringT::AnsiToOem", "CSTRINGT/CStringT::AppendFormat", "CSTRINGT/CStringT::Collate", "CSTRINGT/CStringT::CollateNoCase", "CSTRINGT/CStringT::Compare", "CSTRINGT/CStringT::CompareNoCase", "CSTRINGT/CStringT::Delete", "CSTRINGT/CStringT::Find", "CSTRINGT/CStringT::FindOneOf", "CSTRINGT/CStringT::Format", "CSTRINGT/CStringT::FormatMessage", "CSTRINGT/CStringT::FormatMessageV", "CSTRINGT/CStringT::FormatV", "CSTRINGT/CStringT::GetEnvironmentVariable", "CSTRINGT/CStringT::Insert", "CSTRINGT/CStringT::Left", "CSTRINGT/CStringT::LoadString", "CSTRINGT/CStringT::MakeLower", "CSTRINGT/CStringT::MakeReverse", "CSTRINGT/CStringT::MakeUpper", "CSTRINGT/CStringT::Mid", "CSTRINGT/CStringT::OemToAnsi", "CSTRINGT/CStringT::Remove", "CSTRINGT/CStringT::Replace", "CSTRINGT/CStringT::ReverseFind", "CSTRINGT/CStringT::Right", "CSTRINGT/CStringT::SetSysString", "CSTRINGT/CStringT::SpanExcluding", "CSTRINGT/CStringT::SpanIncluding", "CSTRINGT/CStringT::Tokenize", "CSTRINGT/CStringT::Trim", "CSTRINGT/CStringT::TrimLeft", "CSTRINGT/CStringT::TrimRight"]
+title: "**`CStringT`** Class"
+description: "API reference for the Microsoft ATL **`CStringT`** class"
+ms.date: 12/06/2020
+f1_keywords: ["CStringT", "CSTRINGT/ATL::CStringT", "CSTRINGT/ATL::CStringT::CStringT", "CSTRINGT/ATL::CStringT::AllocSysString", "CSTRINGT/ATL::CStringT::AnsiToOem", "CSTRINGT/ATL::CStringT::AppendFormat", "CSTRINGT/ATL::CStringT::Collate", "CSTRINGT/ATL::CStringT::CollateNoCase", "CSTRINGT/ATL::CStringT::Compare", "CSTRINGT/ATL::CStringT::CompareNoCase", "CSTRINGT/ATL::CStringT::Delete", "CSTRINGT/ATL::CStringT::Find", "CSTRINGT/ATL::CStringT::FindOneOf", "CSTRINGT/ATL::CStringT::Format", "CSTRINGT/ATL::CStringT::FormatMessage", "CSTRINGT/ATL::CStringT::FormatMessageV", "CSTRINGT/ATL::CStringT::FormatV", "CSTRINGT/ATL::CStringT::GetEnvironmentVariable", "CSTRINGT/ATL::CStringT::Insert", "CSTRINGT/ATL::CStringT::Left", "CSTRINGT/ATL::CStringT::LoadString", "CSTRINGT/ATL::CStringT::MakeLower", "CSTRINGT/ATL::CStringT::MakeReverse", "CSTRINGT/ATL::CStringT::MakeUpper", "CSTRINGT/ATL::CStringT::Mid", "CSTRINGT/ATL::CStringT::OemToAnsi", "CSTRINGT/ATL::CStringT::Remove", "CSTRINGT/ATL::CStringT::Replace", "CSTRINGT/ATL::CStringT::ReverseFind", "CSTRINGT/ATL::CStringT::Right", "CSTRINGT/ATL::CStringT::SetSysString", "CSTRINGT/ATL::CStringT::SpanExcluding", "CSTRINGT/ATL::CStringT::SpanIncluding", "CSTRINGT/ATL::CStringT::Tokenize", "CSTRINGT/ATL::CStringT::Trim", "CSTRINGT/ATL::CStringT::TrimLeft", "CSTRINGT/ATL::CStringT::TrimRight"]
helpviewer_keywords: ["strings [C++], in ATL", "shared classes, CStringT", "CStringT class"]
-ms.assetid: 7cacc59c-425f-40f1-8f5b-6db921318ec9
---
-# CStringT Class
+# `CStringT` Class
-This class represents a `CStringT` object.
+This class represents a **`CStringT`** object.
## Syntax
-```
+```cpp
template
class CStringT :
public CSimpleStringT
+*`BaseType`*\
The character type of the string class. Can be one of the following:
- **`char`** (for ANSI character strings).
- **`wchar_t`** (for Unicode character strings).
-- TCHAR (for both ANSI and Unicode character strings).
+- **`TCHAR`** (for both ANSI and Unicode character strings).
-*StringTraits*
+*`StringTraits`*\
Determines if the string class needs C Run-Time (CRT) Library support and where string resources are located. Can be one of the following:
-- **StrTraitATL< wchar_t** | **`char`** | **TCHAR, ChTraitsCRT< wchar_t** | **`char`** | **TCHAR > >**
+- **`StrTraitATL>`**
The class requires CRT support and searches for resource strings in the module specified by `m_hInstResource` (a member of the application's module class).
-- **StrTraitATL< wchar_t** | **`char`** | **TCHAR, ChTraitsOS< wchar_t** | **`char`** | **TCHAR > >**
+- **`StrTraitATL>`**
- The class does not require CRT support and searches for resource strings in the module specified by `m_hInstResource` (a member of the application's module class).
+ The class doesn't require CRT support and searches for resource strings in the module specified by `m_hInstResource` (a member of the application's module class).
-- **StrTraitMFC< wchar_t** | **`char`** | **TCHAR, ChTraitsCRT< wchar_t** | **`char`** | **TCHAR > >**
+- **`StrTraitMFC>`**
The class requires CRT support and searches for resource strings using the standard MFC search algorithm.
-- **StrTraitMFC< wchar_t** | **`char`** | **TCHAR, ChTraitsOS< wchar_t** | **`char`** | **TCHAR > >**
+- **`StrTraitMFC>`**
- The class does not require CRT support and searches for resource strings using the standard MFC search algorithm.
+ The class doesn't require CRT support and searches for resource strings using the standard MFC search algorithm.
## Members
@@ -54,79 +54,79 @@ Determines if the string class needs C Run-Time (CRT) Library support and where
|Name|Description|
|----------|-----------------|
-|[CStringT::CStringT](#cstringt)|Constructs a `CStringT` object in various ways.|
-|[CStringT::~CStringT](#_dtorcstringt)|Destroys a `CStringT` object.|
+|[`CStringT::CStringT`](#cstringt)|Constructs a **`CStringT`** object in various ways.|
+|[`CStringT::~CStringT`](#_dtorcstringt)|Destroys a **`CStringT`** object.|
### Public Methods
|Name|Description|
|----------|-----------------|
-|[CStringT::AllocSysString](#allocsysstring)|Allocates a BSTR from `CStringT` data.|
-|[CStringT::AnsiToOem](#ansitooem)|Makes an in-place conversion from the ANSI character set to the OEM character set.|
-|[CStringT::AppendFormat](#appendformat)|Appends formatted data to an existing `CStringT` object.|
-|[CStringT::Collate](#collate)|Compares two strings (case sensitive, uses locale-specific information).|
-|[CStringT::CollateNoCase](#collatenocase)|Compares two strings (case insensitive, uses locale-specific information).|
-|[CStringT::Compare](#compare)|Compares two strings (case sensitive).|
-|[CStringT::CompareNoCase](#comparenocase)|Compares two strings (case insensitive).|
-|[CStringT::Delete](#delete)|Deletes a character or characters from a string.|
-|[CStringT::Find](#find)|Finds a character or substring inside a larger string.|
-|[CStringT::FindOneOf](#findoneof)|Finds the first matching character from a set.|
-|[CStringT::Format](#format)|Formats the string as `sprintf` does.|
-|[CStringT::FormatMessage](#formatmessage)|Formats a message string.|
-|[CStringT::FormatMessageV](#formatmessagev)|Formats a message string using a variable argument list.|
-|[CStringT::FormatV](#formatv)|Formats the string using a variable list of arguments.|
-|[CStringT::GetEnvironmentVariable](#getenvironmentvariable)|Sets the string to the value of the specified environment variable.|
-|[CStringT::Insert](#insert)|Inserts a single character or a substring at the given index within the string.|
-|[CStringT::Left](#left)|Extracts the left part of a string.|
-|[CStringT::LoadString](#loadstring)|Loads an existing `CStringT` object from a Windows resource.|
-|[CStringT::MakeLower](#makelower)|Converts all the characters in this string to lowercase characters.|
-|[CStringT::MakeReverse](#makereverse)|Reverses the string.|
-|[CStringT::MakeUpper](#makeupper)|Converts all the characters in this string to uppercase characters.|
-|[CStringT::Mid](#mid)|Extracts the middle part of a string.|
-|[CStringT::OemToAnsi](#oemtoansi)|Makes an in-place conversion from the OEM character set to the ANSI character set.|
-|[CStringT::Remove](#remove)|Removes indicated characters from a string.|
-|[CStringT::Replace](#replace)|Replaces indicated characters with other characters.|
-|[CStringT::ReverseFind](#reversefind)|Finds a character inside a larger string; starts from the end.|
-|[CStringT::Right](#right)|Extracts the right part of a string.|
-|[CStringT::SetSysString](#setsysstring)|Sets an existing BSTR object with data from a `CStringT` object.|
-|[CStringT::SpanExcluding](#spanexcluding)|Extracts characters from the string, starting with the first character, that are not in the set of characters identified by `pszCharSet`.|
-|[CStringT::SpanIncluding](#spanincluding)|Extracts a substring that contains only the characters in a set.|
-|[CStringT::Tokenize](#tokenize)|Extracts specified tokens in a target string.|
-|[CStringT::Trim](#trim)|Trims all leading and trailing whitespace characters from the string.|
-|[CStringT::TrimLeft](#trimleft)|Trims leading whitespace characters from the string.|
-|[CStringT::TrimRight](#trimright)|Trims trailing whitespace characters from the string.|
+|[`CStringT::AllocSysString`](#allocsysstring)|Allocates a `BSTR` from **`CStringT`** data.|
+|[`CStringT::AnsiToOem`](#ansitooem)|Makes an in-place conversion from the ANSI character set to the OEM character set.|
+|[`CStringT::AppendFormat`](#appendformat)|Appends formatted data to an existing **`CStringT`** object.|
+|[`CStringT::Collate`](#collate)|Compares two strings (case-sensitive, uses locale-specific information).|
+|[`CStringT::CollateNoCase`](#collatenocase)|Compares two strings (case-insensitive, uses locale-specific information).|
+|[`CStringT::Compare`](#compare)|Compares two strings (case-sensitive).|
+|[`CStringT::CompareNoCase`](#comparenocase)|Compares two strings (case-insensitive).|
+|[`CStringT::Delete`](#delete)|Deletes a character or characters from a string.|
+|[`CStringT::Find`](#find)|Finds a character or substring inside a larger string.|
+|[`CStringT::FindOneOf`](#findoneof)|Finds the first matching character from a set.|
+|[`CStringT::Format`](#format)|Formats the string as `sprintf` does.|
+|[`CStringT::FormatMessage`](#formatmessage)|Formats a message string.|
+|[`CStringT::FormatMessageV`](#formatmessagev)|Formats a message string using a variable argument list.|
+|[`CStringT::FormatV`](#formatv)|Formats the string using a variable list of arguments.|
+|[`CStringT::GetEnvironmentVariable`](#getenvironmentvariable)|Sets the string to the value of the specified environment variable.|
+|[`CStringT::Insert`](#insert)|Inserts a single character or a substring at the given index within the string.|
+|[`CStringT::Left`](#left)|Extracts the left part of a string.|
+|[`CStringT::LoadString`](#loadstring)|Loads an existing **`CStringT`** object from a Windows resource.|
+|[`CStringT::MakeLower`](#makelower)|Converts all the characters in this string to lowercase characters.|
+|[`CStringT::MakeReverse`](#makereverse)|Reverses the string.|
+|[`CStringT::MakeUpper`](#makeupper)|Converts all the characters in this string to uppercase characters.|
+|[`CStringT::Mid`](#mid)|Extracts the middle part of a string.|
+|[`CStringT::OemToAnsi`](#oemtoansi)|Makes an in-place conversion from the OEM character set to the ANSI character set.|
+|[`CStringT::Remove`](#remove)|Removes indicated characters from a string.|
+|[`CStringT::Replace`](#replace)|Replaces indicated characters with other characters.|
+|[`CStringT::ReverseFind`](#reversefind)|Finds a character inside a larger string; starts from the end.|
+|[`CStringT::Right`](#right)|Extracts the right part of a string.|
+|[`CStringT::SetSysString`](#setsysstring)|Sets an existing `BSTR` object with data from a **`CStringT`** object.|
+|[`CStringT::SpanExcluding`](#spanexcluding)|Extracts characters from the string, starting with the first character, that aren't in the set of characters identified by `pszCharSet`.|
+|[`CStringT::SpanIncluding`](#spanincluding)|Extracts a substring that contains only the characters in a set.|
+|[`CStringT::Tokenize`](#tokenize)|Extracts specified tokens in a target string.|
+|[`CStringT::Trim`](#trim)|Trims all leading and trailing whitespace characters from the string.|
+|[`CStringT::TrimLeft`](#trimleft)|Trims leading whitespace characters from the string.|
+|[`CStringT::TrimRight`](#trimright)|Trims trailing whitespace characters from the string.|
### Operators
-|||
+|Name|Description|
|-|-|
-|[CStringT::operator =](#operator_eq)|Assigns a new value to a `CStringT` object.|
-|[CStringT::operator +](#operator_add)|Concatenates two strings or a character and a string.|
-|[CStringT::operator +=](#operator_add_eq)|Concatenates a new string to the end of an existing string.|
-|[CStringT::operator ==](#operator_eq_eq)|Determines if two strings are logically equal.|
-|[CStringT::operator !=](#operator_neq)|Determines if two strings are logically not equal.|
-|[CStringT::operator <](#operator_lt)|Determines if the string on the left side of the operator is less than to the string on the right side.|
-|[CStringT::operator >](#operator_gt)|Determines if the string on the left side of the operator is greater than to the string on the right side.|
-|[CStringT::operator <=](#operator_lt_eq)|Determines if the string on the left side of the operator is less than or equal to the string on the right side.|
-|[CStringT::operator >=](#operator_gt_eq)|Determines if the string on the left side of the operator is greater than or equal to the string on the right side.|
+|[`CStringT::operator =`](#operator_eq)|Assigns a new value to a **`CStringT`** object.|
+|[`CStringT::operator +`](#operator_add)|Concatenates two strings, or a character and a string.|
+|[`CStringT::operator +=`](#operator_add_eq)|Concatenates a new string to the end of an existing string.|
+|[`CStringT::operator ==`](#operator_eq_eq)|Determines if two strings are logically equal.|
+|[`CStringT::operator !=`](#operator_neq)|Determines if two strings aren't logically equal.|
+|[`CStringT::operator <`](#operator_lt)|Determines if the string on the left side of the operator is less than to the string on the right side.|
+|[`CStringT::operator >`](#operator_gt)|Determines if the string on the left side of the operator is greater than to the string on the right side.|
+|[`CStringT::operator <=`](#operator_lt_eq)|Determines if the string on the left side of the operator is less than or equal to the string on the right side.|
+|[`CStringT::operator >=`](#operator_gt_eq)|Determines if the string on the left side of the operator is greater than or equal to the string on the right side.|
## Remarks
-`CStringT` inherits from [CSimpleStringT Class](../../atl-mfc-shared/reference/csimplestringt-class.md). Advanced features, such as character manipulation, ordering, and searching, are implemented by `CStringT`.
+**`CStringT`** inherits from [`CSimpleStringT` Class](../../atl-mfc-shared/reference/csimplestringt-class.md). Advanced features, such as character manipulation, ordering, and searching, are implemented by **`CStringT`**.
> [!NOTE]
-> `CStringT` objects are capable of throwing exceptions. This occurs when a `CStringT` object runs out of memory for any reason.
+> **`CStringT`** objects are capable of throwing exceptions. This occurs when a **`CStringT`** object runs out of memory for any reason.
-A `CStringT` object consists of a variable-length sequence of characters. `CStringT` provides functions and operators using syntax similar to that of Basic. Concatenation and comparison operators, together with simplified memory management, make `CStringT` objects easier to use than ordinary character arrays.
+A **`CStringT`** object consists of a variable-length sequence of characters. **`CStringT`** provides functions and operators using syntax similar to that of Basic. Concatenation and comparison operators, together with simplified memory management, make **`CStringT`** objects easier to use than ordinary character arrays.
> [!NOTE]
-> Although it is possible to create `CStringT` instances that contain embedded null characters, we recommend against it. Calling methods and operators on `CStringT` objects that contain embedded null characters can produce unintended results.
+> Although it is possible to create **`CStringT`** instances that contain embedded null characters, we recommend against it. Calling methods and operators on **`CStringT`** objects that contain embedded null characters can produce unintended results.
-By using different combinations of the `BaseType` and `StringTraits` parameters, `CStringT` objects can come in the following types, which are have been predefined by the ATL libraries.
+By using different combinations of the `BaseType` and `StringTraits` parameters, **`CStringT`** objects can come in the following types, which have been predefined by the ATL libraries.
If using in an ATL application:
-`CString`, `CStringA`, and `CStringW` are exported from the MFC DLL (MFC90.DLL), never from user DLLs. This is done to prevent `CStringT` from being multiply defined.
+`CString`, `CStringA`, and `CStringW` are exported from the MFC DLL (MFC90.DLL), never from user DLLs. This is done to prevent **`CStringT`** from being defined multiple times.
> [!NOTE]
> If your code contains the workaround for linker errors that is described in [Exporting String Classes Using CStringT](../../atl-mfc-shared/exporting-string-classes-using-cstringt.md), you should remove that code. It is no longer needed.
@@ -139,7 +139,7 @@ The following string types are available within MFC-based applications:
|`CStringW`|A Unicode character type string with CRT support.|
|`CString`|Both ANSI and Unicode character types with CRT support.|
-The following string types are available in projects where ATL_CSTRING_NO_CRT is defined:
+The following string types are available in projects where `ATL_CSTRING_NO_CRT` is defined:
|CStringT type|Declaration|
|-------------------|-----------------|
@@ -147,7 +147,7 @@ The following string types are available in projects where ATL_CSTRING_NO_CRT is
|`CAtlStringW`|A Unicode character type string without CRT support.|
|`CAtlString`|Both ANSI and Unicode character types without CRT support.|
-The following string types are available in projects where ATL_CSTRING_NO_CRT is not defined:
+The following string types are available in projects where `ATL_CSTRING_NO_CRT` isn't defined:
|CStringT type|Declaration|
|-------------------|-----------------|
@@ -157,48 +157,48 @@ The following string types are available in projects where ATL_CSTRING_NO_CRT is
`CString` objects also have the following characteristics:
-- `CStringT` objects can grow as a result of concatenation operations.
+- **`CStringT`** objects can grow because of concatenation operations.
-- `CStringT` objects follow "value semantics." Think of a `CStringT` object as an actual string, not as a pointer to a string.
+- **`CStringT`** objects follow "value semantics". Think of a **`CStringT`** object as an actual string, not as a pointer to a string.
-- You can freely substitute `CStringT` objects for `PCXSTR` function arguments.
+- You can freely substitute **`CStringT`** objects for `PCXSTR` function arguments.
-- Custom memory management for string buffers. For more information, see [Memory Management and CStringT](../../atl-mfc-shared/memory-management-with-cstringt.md).
+- Custom memory management for string buffers. For more information, see [Memory Management and `CStringT`](../../atl-mfc-shared/memory-management-with-cstringt.md).
## CStringT Predefined Types
-Because `CStringT` uses a template argument to define the character type (either [wchar_t](../../c-runtime-library/standard-types.md) or [char](../../c-runtime-library/standard-types.md)) supported, method parameter types can be complicated at times. To simplify this issue, a set of predefined types is defined and used throughout the `CStringT` class. The following table lists the various types:
+Because **`CStringT`** uses a template argument to define the character type (either [`wchar_t`](../../c-runtime-library/standard-types.md) or [`char`](../../c-runtime-library/standard-types.md)) supported, method parameter types can be complicated at times. To simplify this issue, a set of predefined types is defined and used throughout the **`CStringT`** class. The following table lists the various types:
|Name|Description|
|----------|-----------------|
-|`XCHAR`|A single character (either **`wchar_t`** or **`char`**) with the same character type as the `CStringT` object.|
-|`YCHAR`|A single character (either **`wchar_t`** or **`char`**) with the opposite character type as the `CStringT` object.|
-|`PXSTR`|A pointer to a character string (either **`wchar_t`** or **`char`**) with the same character type as the `CStringT` object.|
-|`PYSTR`|A pointer to a character string (either **`wchar_t`** or **`char`**) with the opposite character type as the `CStringT` object.|
-|`PCXSTR`|A pointer to a **`const`** character string (either **`wchar_t`** or **`char`**) with the same character type as the `CStringT` object.|
-|`PCYSTR`|A pointer to a **`const`** character string (either **`wchar_t`** or **`char`**) with the opposite character type as the `CStringT` object.|
+|`XCHAR`|A single character (either **`wchar_t`** or **`char`**) with the same character type as the **`CStringT`** object.|
+|`YCHAR`|A single character (either **`wchar_t`** or **`char`**) with the opposite character type as the **`CStringT`** object.|
+|`PXSTR`|A pointer to a character string (either **`wchar_t`** or **`char`**) with the same character type as the ****`CStringT`**** object.|
+|`PYSTR`|A pointer to a character string (either **`wchar_t`** or **`char`**) with the opposite character type as the **`CStringT`** object.|
+|`PCXSTR`|A pointer to a **`const`** character string (either **`wchar_t`** or **`char`**) with the same character type as the **`CStringT`** object.|
+|`PCYSTR`|A pointer to a **`const`** character string (either **`wchar_t`** or **`char`**) with the opposite character type as the **`CStringT`** object.|
> [!NOTE]
-> Code that previously used undocumented methods of `CString` (such as `AssignCopy`) must be replaced with code that uses the following documented methods of `CStringT` (such as `GetBuffer` or `ReleaseBuffer`). These methods are inherited from `CSimpleStringT`.
+> Code that previously used undocumented methods of `CString` (such as `AssignCopy`) must be replaced with code that uses the following documented methods of **`CStringT`** (such as `GetBuffer` or `ReleaseBuffer`). These methods are inherited from `CSimpleStringT`.
## Inheritance Hierarchy
-[CSimpleStringT](../../atl-mfc-shared/reference/csimplestringt-class.md)
+[`CSimpleStringT`](../../atl-mfc-shared/reference/csimplestringt-class.md)
-`CStringT`
+**`CStringT`**
## Requirements
|Header|Use for|
|------------|-------------|
-|cstringt.h|MFC-only string objects|
-|atlstr.h|Non-MFC string objects|
+|`cstringt.h`|MFC-only string objects|
+|`atlstr.h`|Non-MFC string objects|
-## CStringT::AllocSysString
+## `CStringT::AllocSysString`
-Allocates an Automation-compatible string of the type BSTR and copies the contents of the `CStringT` object into it, including the terminating null character.
+Allocates an Automation-compatible string of the type `BSTR` and copies the contents of the **`CStringT`** object into it, including the terminating null character.
-```
+```cpp
BSTR AllocSysString() const;
```
@@ -208,11 +208,11 @@ The newly allocated string.
### Remarks
-In MFC programs, a [CMemoryException Class](../../mfc/reference/cmemoryexception-class.md) is thrown if insufficient memory exists. In ATL programs, a [CAtlException](../../atl/reference/catlexception-class.md) is thrown. This function is normally used to return strings for Automation.
+In MFC programs, a [`CMemoryException` Class](../../mfc/reference/cmemoryexception-class.md) is thrown if insufficient memory exists. In ATL programs, a [`CAtlException`](../../atl/reference/catlexception-class.md) is thrown. This function is normally used to return strings for Automation.
-Commonly, if this string is passed to a COM function as an [in] parameter, then this requires the caller to free the string. This can be done by using [SysFreeString](/windows/win32/api/oleauto/nf-oleauto-sysfreestring), as described in the Windows SDK. For more information, see [Allocating and Releasing Memory for a BSTR](../../atl-mfc-shared/allocating-and-releasing-memory-for-a-bstr.md).
+Commonly, if this string is passed to a COM function as an `[in]` parameter, then this requires the caller to free the string. This can be done by using [`SysFreeString`](/windows/win32/api/oleauto/nf-oleauto-sysfreestring), as described in the Windows SDK. For more information, see [Allocating and Releasing Memory for a `BSTR`](../../atl-mfc-shared/allocating-and-releasing-memory-for-a-bstr.md).
-For more information about OLE allocation functions in Windows, see [SysAllocString](/windows/win32/api/oleauto/nf-oleauto-sysallocstring) in the Windows SDK.
+For more information about OLE allocation functions in Windows, see [`SysAllocString`](/windows/win32/api/oleauto/nf-oleauto-sysallocstring) in the Windows SDK.
### Example
@@ -220,9 +220,9 @@ The following example demonstrates the use of `CStringT::AllocSysString`.
[!code-cpp[NVC_ATLMFC_Utilities#105](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_1.cpp)]
-## CStringT::AnsiToOem
+## `CStringT::AnsiToOem`
-Converts all the characters in this `CStringT` object from the ANSI character set to the OEM character set.
+Converts all the characters in this **`CStringT`** object from the ANSI character set to the OEM character set.
```cpp
void AnsiToOem();
@@ -230,15 +230,15 @@ void AnsiToOem();
### Remarks
-The function is not available if _UNICODE is defined.
+The function isn't available if `_UNICODE` is defined.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#106](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_2.cpp)]
-## CStringT::AppendFormat
+## `CStringT::AppendFormat`
-Appends formatted data to an existing `CStringT` object.
+Appends formatted data to an existing **`CStringT`** object.
```cpp
void __cdecl AppendFormat(PCXSTR pszFormat, [, argument] ...);
@@ -247,89 +247,89 @@ void __cdecl AppendFormat(UINT nFormatID, [, argument] ...);
### Parameters
-*pszFormat*
+*`pszFormat`*\
A format-control string.
-*nFormatID*
+*`nFormatID`*\
The string resource identifier that contains the format-control string.
-*argument*
+*`argument`*\
Optional arguments.
### Remarks
-This function formats and appends a series of characters and values in the `CStringT`. Each optional argument (if any) is converted and appended according to the corresponding format specification in *pszFormat* or from the string resource identified by *nFormatID*.
+This function formats and appends a series of characters and values in the **`CStringT`**. Each optional argument (if any) is converted and appended according to the corresponding format specification in *`pszFormat`* or from the string resource identified by *`nFormatID`*.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#107](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_3.cpp)]
-## CStringT::Collate
+## `CStringT::Collate`
Compares two strings using the generic-text function `_tcscoll`.
-```
+```cpp
int Collate(PCXSTR psz) const throw();
```
### Parameters
-*psz*
+*`psz`*\
The other string used for comparison.
### Return Value
-Zero if the strings are identical, < 0 if this `CStringT` object is less than *psz*, or > 0 if this `CStringT` object is greater than *psz*.
+Zero if the strings are identical, < 0 if this **`CStringT`** object is less than *`psz`*, or > 0 if this **`CStringT`** object is greater than *`psz`*.
### Remarks
-The generic-text function `_tcscoll`, which is defined in TCHAR.H, maps to either `strcoll`, `wcscoll`, or `_mbscoll`, depending on the character set that is defined at compile time. Each function performs a case-sensitive comparison of the strings according to the code page currently in use. For more information, see [strcoll, wcscoll, _mbscoll, _strcoll_l, _wcscoll_l, _mbscoll_l](../../c-runtime-library/reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md).
+The generic-text function `_tcscoll`, which is defined in `TCHAR.H`, maps to either `strcoll`, `wcscoll`, or `_mbscoll`, depending on the character set that is defined at compile time. Each function does a case-sensitive comparison of the strings according to the code page currently in use. For more information, see [`strcoll`, `wcscoll`, `_mbscoll`, `_strcoll_l`, `_wcscoll_l`, _mbscoll_l](../../c-runtime-library/reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md).
-## CStringT::CollateNoCase
+## `CStringT::CollateNoCase`
Compares two strings using the generic-text function `_tcscoll`.
-```
+```cpp
int CollateNoCase(PCXSTR psz) const throw();
```
### Parameters
-*psz*
+*`psz`*\
The other string used for comparison.
### Return Value
-Zero if the strings are identical (ignoring case), < 0 if this `CStringT` object is less than *psz* (ignoring case), or > 0 if this `CStringT` object is greater than *psz* (ignoring case).
+Zero if the strings are identical (ignoring case), < 0 if this **`CStringT`** object is less than *`psz`* (ignoring case), or > 0 if this **`CStringT`** object is greater than *`psz`* (ignoring case).
### Remarks
-The generic-text function `_tcscoll`, which is defined in TCHAR.H, maps to either `stricoll`, `wcsicoll`, or `_mbsicoll`, depending on the character set that is defined at compile time. Each function performs a case-insensitive comparison of the strings, according to the code page currently in use. For more information, see [strcoll, wcscoll, _mbscoll, _strcoll_l, _wcscoll_l, _mbscoll_l](../../c-runtime-library/reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md).
+The generic-text function `_tcscoll`, which is defined in `TCHAR.H`, maps to either `stricoll`, `wcsicoll`, or `_mbsicoll`, depending on the character set that is defined at compile time. Each function does a case-insensitive comparison of the strings, according to the code page currently in use. For more information, see [`strcoll`, `wcscoll`, `_mbscoll`, `_strcoll_l`, `_wcscoll_l`, `_mbscoll_l`](../../c-runtime-library/reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md).
### Example
[!code-cpp[NVC_ATLMFC_Utilities#109](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_4.cpp)]
-## CStringT::Compare
+## `CStringT::Compare`
-Compares two strings (case sensitive).
+Compares two strings (case-sensitive).
-```
+```cpp
int Compare(PCXSTR psz) const;
```
### Parameters
-*psz*
+*`psz`*\
The other string used for comparison.
### Return Value
-Zero if the strings are identical, < 0 if this `CStringT` object is less than *psz*, or > 0 if this `CStringT` object is greater than *psz*.
+Zero if the strings are identical, < 0 if this **`CStringT`** object is less than *`psz`*, or > 0 if this **`CStringT`** object is greater than *`psz`*.
### Remarks
-The generic-text function `_tcscmp`, which is defined in TCHAR.H, maps to either `strcmp`, `wcscmp`, or `_mbscmp`, depending on the character set that is defined at compile time. Each function performs a case-sensitive comparison of the strings and is not affected by locale. For more information, see [strcmp, wcscmp, _mbscmp](../../c-runtime-library/reference/strcmp-wcscmp-mbscmp.md).
+The generic-text function `_tcscmp`, which is defined in `TCHAR.H`, maps to either `strcmp`, `wcscmp`, or `_mbscmp`, depending on the character set that is defined at compile time. Each function does a case-sensitive comparison of the strings and isn't affected by locale. For more information, see [`strcmp`, `wcscmp`, `_mbscmp`](../../c-runtime-library/reference/strcmp-wcscmp-mbscmp.md).
If the string contains embedded nulls, for purposes of comparison the string is considered to be truncated at the first embedded null character.
@@ -339,36 +339,36 @@ The following example demonstrates the use of `CStringT::Compare`.
[!code-cpp[NVC_ATLMFC_Utilities#110](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_5.cpp)]
-## CStringT::CompareNoCase
+## `CStringT::CompareNoCase`
-Compares two strings (case insensitive).
+Compares two strings (case-insensitive).
-```
+```cpp
int CompareNoCase(PCXSTR psz) const throw();
```
### Parameters
-*psz*
+*`psz`*\
The other string used for comparison.
### Return Value
-Zero if the strings are identical (ignoring case), <0 if this `CStringT` object is less than *psz* (ignoring case), or >0 if this `CStringT` object is greater than *psz* (ignoring case).
+Zero if the strings are identical (ignoring case), <0 if this **`CStringT`** object is less than *`psz`* (ignoring case), or >0 if this **`CStringT`** object is greater than *`psz`* (ignoring case).
### Remarks
-The generic-text function `_tcsicmp`, which is defined in TCHAR.H, maps to either `_stricmp`, `_wcsicmp` or `_mbsicmp`, depending on the character set that is defined at compile time. Each function performs a case-insensitive comparison of the strings. The comparison depends on the LC_CTYPE aspect of the locale but not LC_COLLATE. For more information, see [_stricmp, _wcsicmp, _mbsicmp, _stricmp_l, _wcsicmp_l, _mbsicmp_l](../../c-runtime-library/reference/stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md).
+The generic-text function `_tcsicmp`, which is defined in `TCHAR.H`, maps to either `_stricmp`, `_wcsicmp` or `_mbsicmp`, depending on the character set that is defined at compile time. Each function does a case-insensitive comparison of the strings. The comparison depends on the `LC_CTYPE` aspect of the locale but not `LC_COLLATE`. For more information, see [`_stricmp`, `_wcsicmp`, `_mbsicmp`, `_stricmp_l`, `_wcsicmp_l`, `_mbsicmp_l`](../../c-runtime-library/reference/stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md).
### Example
[!code-cpp[NVC_ATLMFC_Utilities#111](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_6.cpp)]
-## CStringT::CStringT
+## `CStringT::CStringT`
-Constructs a `CStringT` object.
+Constructs a **`CStringT`** object.
-```
+```cpp
CStringT() throw() :
CThisSimpleString(StringTraits::GetDefaultManager());
@@ -443,95 +443,95 @@ CStringT(const YCHAR* pch, int nLength, IAtlStringMgr* pStringMgr) :
### Parameters
-*pch*
-A pointer to an array of characters of length *nLength*, not null-terminated.
+*`pch`*\
+A pointer to an array of characters of length *`nLength`*, not null-terminated.
-*nLength*
-A count of the number of characters in *pch*.
+*`nLength`*\
+A count of the number of characters in *`pch`*.
-*ch*
+*`ch`*\
A single character.
-*pszSrc*
-A null-terminated string to be copied into this `CStringT` object.
+*`pszSrc`*\
+A null-terminated string to be copied into this **`CStringT`** object.
-*pStringMgr*
-A pointer to the memory manager for the `CStringT` object. For more information on `IAtlStringMgr` and memory management for `CStringT`, see [Memory Management with CStringT](../../atl-mfc-shared/memory-management-with-cstringt.md).
+*`pStringMgr`*\
+A pointer to the memory manager for the **`CStringT`** object. For more information on `IAtlStringMgr` and memory management for **`CStringT`**, see [Memory Management with CStringT](../../atl-mfc-shared/memory-management-with-cstringt.md).
-*strSrc*
-An existing `CStringT` object to be copied into this `CStringT` object. For more information on `CThisString` and `CThisSimpleString`, see the Remarks section.
+*`strSrc`*\
+An existing **`CStringT`** object to be copied into this **`CStringT`** object. For more information on `CThisString` and `CThisSimpleString`, see the Remarks section.
-*varSrc*
-A variant object to be copied into this `CStringT` object.
+*`varSrc`*\
+A variant object to be copied into this **`CStringT`** object.
-*BaseType*
+*`BaseType`*\
The character type of the string class. Can be one of the following:
**`char`** (for ANSI character strings).
**`wchar_t`** (for Unicode character strings).
-TCHAR (for both ANSI and Unicode character strings).
+`TCHAR` (for both ANSI and Unicode character strings).
-*bMFCDLL*
-Boolean that specifies whether the project is an MFC DLL (TRUE) or not (FALSE).
+*`bMFCDLL`*\
+Boolean that specifies whether the project is an MFC DLL (`TRUE`) or not (`FALSE`).
-*SystemString*
-Must be `System::String`, and the project must be compiled with /clr.
+*`SystemString`*\
+Must be `System::String`, and the project must be compiled with `/clr`.
-*pString*
-A handle for a `CStringT` object.
+*`pString`*\
+A handle for a **`CStringT`** object.
### Remarks
-Because the constructors copy the input data into new allocated storage, you should be aware that memory exceptions may result. Note that some of these constructors act as conversion functions. This allows you to substitute, for example, an LPTSTR where a `CStringT` object is expected.
+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.
+> 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.
-Note that the *strSrc* parameter can be either a `CStringT` or `CThisSimpleString` object. For `CStringT`, use one of its default instantiations (`CString`, `CStringA`, or `CStringW`); for `CThisSimpleString`, use a **`this`** pointer. `CThisSimpleString` declares an instance of the [CSimpleStringT Class](../../atl-mfc-shared/reference/csimplestringt-class.md), which is a smaller string class with less built-in functionality than the `CStringT` class.
+The *`strSrc`* parameter can be either a **`CStringT`** or `CThisSimpleString` object. For **`CStringT`**, use one of its default instantiations (`CString`, `CStringA`, or `CStringW`); for `CThisSimpleString`, use a **`this`** pointer. `CThisSimpleString` declares an instance of the [`CSimpleStringT` Class](../../atl-mfc-shared/reference/csimplestringt-class.md), which is a smaller string class with less built-in functionality than the **`CStringT`** class.
-The overload operator `CSimpleStringT<>&()` constructs a `CStringT` object from a `CSimpleStringT` declaration.
+The overload operator `CSimpleStringT<>&()` constructs a **`CStringT`** object from a `CSimpleStringT` declaration.
> [!NOTE]
-> Although it is possible to create `CStringT` instances that contain embedded null characters, we recommend against it. Calling methods and operators on `CStringT` objects that contain embedded null characters can produce unintended results.
+> Although it is possible to create **`CStringT`** instances that contain embedded null characters, we recommend against it. Calling methods and operators on **`CStringT`** objects that contain embedded null characters can produce unintended results.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#112](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_7.cpp)]
-## CStringT::~CStringT
+## `CStringT::~CStringT`
-Destroys the `CStringT` object.
+Destroys the **`CStringT`** object.
-```
+```cpp
~CStringT() throw();
```
### Remarks
-Destroys the `CStringT` object.
+Destroys the **`CStringT`** object.
-## CStringT::Delete
+## `CStringT::Delete`
Deletes a character or characters from a string starting with the character at the given index.
-```
+```cpp
int Delete(int iIndex, int nCount = 1);
```
### Parameters
-*iIndex*
-The zero-based index of the first character in the `CStringT` object to delete.
+*`iIndex`*\
+The zero-based index of the first character in the **`CStringT`** object to delete.
-*nCount*
+*`nCount`*\
The number of characters to be removed.
### Return Value
@@ -540,7 +540,7 @@ The length of the changed string.
### Remarks
-If *nCount* is longer than the string, the rest of the string will be removed.
+If *`nCount`* is longer than the string, the rest of the string will be removed.
### Example
@@ -553,29 +553,29 @@ After: Soccer best,
but hockey is quicker!
```
-## CStringT::Find
+## `CStringT::Find`
Searches this string for the first match of a character or substring.
-```
+```cpp
int Find(PCXSTR pszSub, int iStart=0) const throw();
int Find(XCHAR ch, int iStart=0) const throw();
```
### Parameters
-*pszSub*
+*`pszSub`*\
A substring to search for.
-*iStart*
+*`iStart`*\
The index of the character in the string to begin the search with, or 0 to start from the beginning.
-*ch*
+*`ch`*\
A single character to search for.
### Return Value
-The zero-based index of the first character in this `CStringT` object that matches the requested substring or characters; -1 if the substring or character is not found.
+The zero-based index of the first character in this **`CStringT`** object that matches the requested substring or characters; -1 if the substring or character isn't found.
### Remarks
@@ -585,34 +585,34 @@ The function is overloaded to accept both single characters (similar to the run-
[!code-cpp[NVC_ATLMFC_Utilities#114](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_9.cpp)]
-## CStringT::FindOneOf
+## `CStringT::FindOneOf`
-Searches this string for the first character that matches any character contained in *pszCharSet*.
+Searches this string for the first character that matches any character contained in *`pszCharSet`*.
-```
+```cpp
int FindOneOf(PCXSTR pszCharSet) const throw();
```
### Parameters
-*pszCharSet*
+*`pszCharSet`*\
String containing characters for matching.
### Return Value
-The zero-based index of the first character in this string that is also in *pszCharSet*; -1 if there is no match.
+The zero-based index of the first character in this string that is also in *`pszCharSet`*; -1 if there is no match.
### Remarks
-Finds the first occurrence of any of the characters in *pszCharSet*.
+Finds the first occurrence of any of the characters in *`pszCharSet`*.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#115](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_10.cpp)]
-## CStringT::Format
+## `CStringT::Format`
-Writes formatted data to a `CStringT` in the same way that [sprintf_s](../../c-runtime-library/reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md) formats data into a C-style character array.
+Writes formatted data to a **`CStringT`** in the same way that [`sprintf_s`](../../c-runtime-library/reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md) formats data into a C-style character array.
```cpp
void __cdecl Format(UINT nFormatID, [, argument]...);
@@ -621,30 +621,30 @@ void __cdecl Format(PCXSTR pszFormat, [, argument] ...);
### Parameters
-*nFormatID*
+*`nFormatID`*\
The string resource identifier that contains the format-control string.
-*pszFormat*
+*`pszFormat`*\
A format-control string.
-*argument*
+*`argument`*\
Optional arguments.
### Remarks
-This function formats and stores a series of characters and values in the `CStringT`. Each optional argument (if any) is converted and output according to the corresponding format specification in *pszFormat* or from the string resource identified by *nFormatID*.
+This function formats and stores a series of characters and values in the **`CStringT`**. Each optional argument (if any) is converted and output according to the corresponding format specification in *`pszFormat`* or from the string resource identified by *`nFormatID`*.
The call will fail if the string object itself is offered as a parameter to `Format`. For example, the following code will cause unpredictable results:
[!code-cpp[NVC_ATLMFC_Utilities#116](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_11.cpp)]
-For more information, see [Format Specification Syntax: printf and wprintf Functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md).
+For more information, see [Format Specification Syntax: `printf` and `wprintf` Functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md).
### Example
[!code-cpp[NVC_ATLMFC_Utilities#117](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_12.cpp)]
-## CStringT::FormatMessage
+## `CStringT::FormatMessage`
Formats a message string.
@@ -655,29 +655,29 @@ void __cdecl FormatMessage(PCXSTR pszFormat, [, argument]...);
### Parameters
-*nFormatID*
+*`nFormatID`*\
The string resource identifier that contains the unformatted message text.
-*pszFormat*
-Points to the format-control string. It will be scanned for inserts and formatted accordingly. The format string is similar to run-time function *printf*-style format strings, except it allows for the parameters to be inserted in an arbitrary order.
+*`pszFormat`*\
+Points to the format-control string. It will be scanned for inserts and formatted accordingly. The format string is similar to run-time function *`printf`*-style format strings, except it allows for the parameters to be inserted in an arbitrary order.
-*argument*
+*`argument`*\
Optional arguments.
### Remarks
-The function requires a message definition as input. The message definition is determined by *pszFormat* or from the string resource identified by *nFormatID*. The function copies the formatted message text to the `CStringT` object, processing any embedded insert sequences if requested.
+The function requires a message definition as input. The message definition is determined by *`pszFormat`* or from the string resource identified by *`nFormatID`*. The function copies the formatted message text to the **`CStringT`** object, processing any embedded insert sequences if requested.
> [!NOTE]
> `FormatMessage` attempts to allocate system memory for the newly formatted string. If this attempt fails, a memory exception is automatically thrown.
-Each insert must have a corresponding parameter following the *pszFormat* or *nFormatID* parameter. Within the message text, several escape sequences are supported for dynamically formatting the message. For more information, see the Windows [FormatMessage](/windows/win32/api/winbase/nf-winbase-formatmessage) function in the Windows SDK.
+Each insert must have a corresponding parameter following the *`pszFormat`* or *`nFormatID`* parameter. Within the message text, several escape sequences are supported for dynamically formatting the message. For more information, see the Windows [`FormatMessage`](/windows/win32/api/winbase/nf-winbase-formatmessage) function in the Windows SDK.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#118](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_13.cpp)]
-## CStringT::FormatMessageV
+## `CStringT::FormatMessageV`
Formats a message string using a variable argument list.
@@ -687,22 +687,22 @@ void FormatMessageV(PCXSTR pszFormat, va_list* pArgList);
### Parameters
-*pszFormat*
+*`pszFormat`*\
Points to the format-control string. It will be scanned for inserts and formatted accordingly. The format string is similar to run-time function `printf`-style format strings, except it allows for the parameters to be inserted in an arbitrary order.
-*pArgList*
+*`pArgList`*\
Pointer to a list of arguments.
### Remarks
-The function requires a message definition as input, determined by *pszFormat*. The function copies the formatted message text and a variable list of arguments to the `CStringT` object, processing any embedded insert sequences if requested.
+The function requires a message definition as input, determined by *`pszFormat`*. The function copies the formatted message text and a variable list of arguments to the **`CStringT`** object, processing any embedded insert sequences if requested.
> [!NOTE]
-> `FormatMessageV` calls [CStringT::FormatMessage](#formatmessage), which attempts to allocate system memory for the newly formatted string. If this attempt fails, a memory exception is automatically thrown.
+> `FormatMessageV` calls [`CStringT::FormatMessage`](#formatmessage), which attempts to allocate system memory for the newly formatted string. If this attempt fails, a memory exception is automatically thrown.
-For more information, see the Windows [FormatMessage](/windows/win32/api/winbase/nf-winbase-formatmessage) function in the Windows SDK.
+For more information, see the Windows [`FormatMessage`](/windows/win32/api/winbase/nf-winbase-formatmessage) function in the Windows SDK.
-## CStringT::FormatV
+## `CStringT::FormatV`
Formats a message string using a variable argument list.
@@ -712,33 +712,33 @@ void FormatV(PCXSTR pszFormat, va_list args);
### Parameters
-*pszFormat*
+*`pszFormat`*\
Points to the format-control string. It will be scanned for inserts and formatted accordingly. The format string is similar to run-time function `printf`-style format strings, except it allows for the parameters to be inserted in an arbitrary order.
-*args*
+*`args`*\
Pointer to a list of arguments.
### Remarks
-Writes a formatted string and a variable list of arguments to a `CStringT` string in the same way that `vsprintf_s` formats data into a C-style character array.
+Writes a formatted string and a variable list of arguments to a **`CStringT`** string in the same way that `vsprintf_s` formats data into a C-style character array.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#119](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_14.cpp)]
-
+
[!code-cpp[NVC_ATLMFC_Utilities#120](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_15.cpp)]
-## CStringT::GetEnvironmentVariable
+## `CStringT::GetEnvironmentVariable`
Sets the string to the value of the specified environment variable.
-```
+```cpp
BOOL GetEnvironmentVariable(PCXSTR pszVar);
```
### Parameters
-*pszVar*
+*`pszVar`*\
Pointer to a null-terminated string that specifies the environment variable.
### Return Value
@@ -753,24 +753,24 @@ Retrieves the value of the specified variable from the environment block of the
[!code-cpp[NVC_ATLMFC_Utilities#121](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_16.cpp)]
-## CStringT::Insert
+## `CStringT::Insert`
Inserts a single character or a substring at the given index within the string.
-```
+```cpp
int Insert(int iIndex, PCXSTR psz);
int Insert(int iIndex, XCHAR ch);
```
### Parameters
-*iIndex*
+*`iIndex`*\
The index of the character before which the insertion will take place.
-*psz*
+*`psz`*\
A pointer to the substring to be inserted.
-*ch*
+*`ch`*\
The character to be inserted.
### Return Value
@@ -779,44 +779,44 @@ The length of the changed string.
### Remarks
-The *iIndex* parameter identifies the first character that will be moved to make room for the character or substring. If *nIndex* is zero, the insertion will occur before the entire string. If *nIndex* is higher than the length of the string, the function will concatenate the present string and the new material provided by either *ch* or *psz*.
+The *`iIndex`* parameter identifies the first character that will be moved to make room for the character or substring. If *`nIndex`* is zero, the insertion will occur before the entire string. If *nIndex* is higher than the length of the string, the function will concatenate the present string and the new material provided by either *`ch`* or *`psz`*.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#122](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_17.cpp)]
-## CStringT::Left
+## `CStringT::Left`
-Extracts the leftmost *nCount* characters from this `CStringT` object and returns a copy of the extracted substring.
+Extracts the leftmost *`nCount`* characters from this **`CStringT`** object and returns a copy of the extracted substring.
-```
+```cpp
CStringT Left(int nCount) const;
```
### Parameters
-*nCount*
-The number of characters to extract from this `CStringT` object.
+*`nCount`*\
+The number of characters to extract from this **`CStringT`** object.
### Return Value
-A `CStringT` object that contains a copy of the specified range of characters. The returned `CStringT` object may be empty.
+A **`CStringT`** object that contains a copy of the specified range of characters. The returned **`CStringT`** object may be empty.
### Remarks
-If *nCount* exceeds the string length, then the entire string is extracted. `Left` is similar to the Basic `Left` function.
+If *`nCount`* exceeds the string length, then the entire string is extracted. `Left` is similar to the Basic `Left` function.
-For multi-byte character sets (MBCS), *nCount* treats each 8-bit sequence as a character, so that *nCount* returns the number of multi-byte characters multiplied by two.
+For multi-byte character sets (MBCS), *`nCount`* treats each 8-bit sequence as a character, so that *`nCount`* returns the number of multi-byte characters multiplied by two.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#123](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_18.cpp)]
-## CStringT::LoadString
+## `CStringT::LoadString`
-Reads a Windows string resource, identified by *nID*, into an existing `CStringT` object.
+Reads a Windows string resource, identified by *nID*, into an existing **`CStringT`** object.
-```
+```cpp
BOOL LoadString(HINSTANCE hInstance, UINT nID, WORD wLanguageID);
BOOL LoadString(HINSTANCE hInstance, UINT nID);
BOOL LoadString(UINT nID);
@@ -824,13 +824,13 @@ BOOL LoadString(UINT nID);
### Parameters
-*hInstance*
+*`hInstance`*\
A handle to the instance of the module.
-*nID*
+*`nID`*\
A Windows string resource ID.
-*wLanguageID*
+*`wLanguageID`*\
The language of the string resource.
### Return Value
@@ -839,17 +839,17 @@ Nonzero if resource load was successful; otherwise 0.
### Remarks
-Loads the string resource (*nID*) from the specified module (*hInstance*) using the specified language (*wLanguage*).
+Loads the string resource (*`nID`*) from the specified module (*`hInstance`*) using the specified language (*`wLanguage`*).
### Example
[!code-cpp[NVC_ATLMFC_Utilities#124](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_19.cpp)]
-## CStringT::MakeLower
+## `CStringT::MakeLower`
-Converts the `CStringT` object to a lowercase string.
+Converts the **`CStringT`** object to a lowercase string.
-```
+```cpp
CStringT& MakeLower();
```
@@ -861,11 +861,11 @@ The resulting lowercase string.
[!code-cpp[NVC_ATLMFC_Utilities#125](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_20.cpp)]
-## CStringT::MakeReverse
+## `CStringT::MakeReverse`
-Reverses the order of the characters in the `CStringT` object.
+Reverses the order of the characters in the **`CStringT`** object.
-```
+```cpp
CStringT& MakeReverse();
```
@@ -877,11 +877,11 @@ The resulting reversed string.
[!code-cpp[NVC_ATLMFC_Utilities#126](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_21.cpp)]
-## CStringT::MakeUpper
+## `CStringT::MakeUpper`
-Converts the `CStringT` object to an uppercase string.
+Converts the **`CStringT`** object to an uppercase string.
-```
+```cpp
CStringT& MakeUpper();
```
@@ -895,63 +895,62 @@ The resulting uppercase string.
[!code-cpp[NVC_ATLMFC_Utilities#127](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_22.cpp)]
-## CStringT::Mid
+## `CStringT::Mid`
-Extracts a substring of length *nCount* characters from this `CStringT` object, starting at position *iFirst* (zero-based).
+Extracts a substring of length *`nCount`* characters from this **`CStringT`** object, starting at position *`iFirst`* (zero-based).
-```
+```cpp
CStringT Mid(int iFirst, int nCount) const;
CStringT Mid(int iFirst) const;
```
### Parameters
-*iFirst*
-The zero-based index of the first character in this `CStringT` object that is to be included in the extracted substring.
+*`iFirst`*\
+The zero-based index of the first character in this **`CStringT`** object that is to be included in the extracted substring.
-*nCount*
-The number of characters to extract from this `CStringT` object. If this parameter is not supplied, then the remainder of the string is extracted.
+*`nCount`*\
+The number of characters to extract from this **`CStringT`** object. If this parameter isn't supplied, then the rest of the string is extracted.
### Return Value
-A `CStringT` object that contains a copy of the specified range of characters. Note that the returned `CStringT` object may be empty.
+A **`CStringT`** object that contains a copy of the specified range of characters. The returned **`CStringT`** object may be empty.
### Remarks
The function returns a copy of the extracted substring. `Mid` is similar to the Basic Mid function (except that indexes in Basic are one-based).
-For multibyte character sets (MBCS), *nCount* refers to each 8-bit character; that is, a lead and trail byte in one multibyte character are counted as two characters.
+For multibyte character sets (MBCS), *`nCount`* refers to each 8-bit character; that is, a lead and trail byte in one multibyte character are counted as two characters.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#128](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_23.cpp)]
-## CStringT::OemToAnsi
+## `CStringT::OemToAnsi`
-Converts all the characters in this `CStringT` object from the OEM character set to the ANSI character set.
+Converts all the characters in this **`CStringT`** object from the OEM character set to the ANSI character set.
-```cpp
+```cppcpp
void OemToAnsi();
```
### Remarks
-This function is not available if _UNICODE is defined.
+This function isn't available if `_UNICODE` is defined.
### Example
-See the example for [CStringT::AnsiToOem](#ansitooem).
+See the example for [`CStringT::AnsiToOem`](#ansitooem).
-## CStringT::operator =
+## `CStringT::operator =`
Assigns a new value to the string.
-```
+```cpp
CStringT& operator=(const CStringT& strSrc);
template
CStringT& operator=(const CSimpleStringT& str);
-
CStringT& operator=(PCXSTR pszSrc);
CStringT& operator=(PCYSTR pszSrc);
CStringT& operator=(const unsigned char* pszSrc);
@@ -962,86 +961,86 @@ CStringT& operator=(const VARIANT& var);
### Parameters
-*strSrc*
-A `CStringT` to assign to this string.
+*`strSrc`*\
+A **`CStringT`** to assign to this string.
-*str*
+*`str`*\
A reference to a `CThisSimpleString` object.
-*bMFCDLL*
+*`bMFCDLL`*\
A boolean specifying whether the project is an MFC DLL or not.
-*BaseType*
+*`BaseType`*\
The string base type.
-*var*
+*`var`*\
A variant object to assign to this string.
-*ch*
+*`ch`*\
An ANSI or Unicode character to assign to the string.
-*pszSrc*
+*`pszSrc`*\
A pointer to the original string being assigned.
### Remarks
-The assignment operator accepts another `CStringT` object, a character pointer, or a single character. You should be aware that memory exceptions can occur whenever you use this operator because new storage can be allocated.
+The assignment operator accepts another **`CStringT`** object, a character pointer, or a single character. Memory exceptions can occur whenever you use this operator because new storage can be allocated.
-For information on `CThisSimpleString`, see the Remarks section of [CStringT::CStringT](#cstringt).
+For information on `CThisSimpleString`, see the Remarks section of [`CStringT::CStringT`](#cstringt).
> [!NOTE]
-> Although it is possible to create `CStringT` instances that contain embedded null characters, we recommend against it. Calling methods and operators on `CStringT` objects that contain embedded null characters can produce unintended results.
+> Although it is possible to create **`CStringT`** instances that contain embedded null characters, we recommend against it. Calling methods and operators on **`CStringT`** objects that contain embedded null characters can produce unintended results.
-## CStringT::operator +
+## `CStringT::operator +`
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
-*ch1*
+*`ch1`*\
An ANSI or Unicode character to concatenate with a string.
-*ch2*
+*`ch2`*\
An ANSI or Unicode character to concatenate with a string.
-*str1*
-A `CStringT` to concatenate with a string or character.
+*`str1`*\
+A **`CStringT`** to concatenate with a string or character.
-*str2*
-A `CStringT` to concatenate with a string or character.
+*`str2`*\
+A **`CStringT`** to concatenate with a string or character.
-*psz1*
+*`psz1`*\
A pointer to a null-terminated string to concatenate with a string or character.
-*psz2*
+*`psz2`*\
A pointer to a string to concatenate with a string or character.
### Remarks
-There are seven overload forms of the `CStringT::operator+` function. The first version concatenates two existing `CStringT` objects. The next two concatenate a `CStringT` object and a null-terminated string. The next two concatenate a `CStringT` object and an ANSI character. The last two concatenate a `CStringT` object and a Unicode character.
+There are seven overload forms of the `CStringT::operator+` function. The first version concatenates two existing **`CStringT`** objects. The next two concatenate a **`CStringT`** object and a null-terminated string. The next two concatenate a **`CStringT`** object and an ANSI character. The last two concatenate a **`CStringT`** object and a Unicode character.
> [!NOTE]
-> Although it is possible to create `CStringT` instances that contain embedded null characters, we recommend against it. Calling methods and operators on `CStringT` objects that contain embedded null characters can produce unintended results.
+> Although it is possible to create **`CStringT`** instances that contain embedded null characters, we recommend against it. Calling methods and operators on **`CStringT`** objects that contain embedded null characters can produce unintended results.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#140](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_24.cpp)]
-## CStringT::operator +=
+## `CStringT::operator +=`
Concatenates characters to the end of the string.
-```
+```cpp
CStringT& operator+=(const CThisSimpleString& str);
template
@@ -1059,129 +1058,129 @@ CStringT& operator+=(const VARIANT& var);
### Parameters
-*str*
+*`str`*\
A reference to a `CThisSimpleString` object.
-*bMFCDLL*
+*`bMFCDLL`*\
A boolean specifying whether the project is an MFC DLL or not.
-*BaseType*
+*`BaseType`*\
The string base type.
-*var*
+*`var`*\
A variant object to concatenate to this string.
-*ch*
+*`ch`*\
An ANSI or Unicode character to concatenate with a string.
-*pszSrc*
+*`pszSrc`*\
A pointer to the original string being concatenated.
-*strSrc*
-A `CStringT` to concatenate to this string.
+*`strSrc`*\
+A **`CStringT`** to concatenate to this string.
### Remarks
-The operator accepts another `CStringT` object, a character pointer, or a single character. You should be aware that memory exceptions can occur whenever you use this concatenation operator because new storage can be allocated for characters added to this `CStringT` object.
+The operator accepts another **`CStringT`** object, a character pointer, or a single character. Memory exceptions can occur whenever you use this concatenation operator because new storage can be allocated for characters added to this **`CStringT`** object.
-For information on `CThisSimpleString`, see the Remarks section of [CStringT::CStringT](#cstringt).
+For information on `CThisSimpleString`, see the Remarks section of [`CStringT::CStringT`](#cstringt).
> [!NOTE]
-> Although it is possible to create `CStringT` instances that contain embedded null characters, we recommend against it. Calling methods and operators on `CStringT` objects that contain embedded null characters can produce unintended results.
+> Although it is possible to create **`CStringT`** instances that contain embedded null characters, we recommend against it. Calling methods and operators on **`CStringT`** objects that contain embedded null characters can produce unintended results.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#141](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_25.cpp)]
-## CStringT::operator ==
+## `CStringT::operator ==`
Determines whether two strings are logically equal.
-```
+```cpp
friend bool operator==(const CStringT& str1, const CStringT& str2) throw();
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
-*ch1*
+*`ch1`*\
An ANSI or Unicode character for comparison.
-*ch2*
+*`ch2`*\
An ANSI or Unicode character for comparison.
-*str1*
-A `CStringT` for comparison.
+*`str1`*\
+A **`CStringT`** for comparison.
-*str2*
-A `CStringT` for comparison.
+*`str2`*\
+A **`CStringT`** for comparison.
-*psz1*
+*`psz1`*\
A pointer to a null-terminated string for comparison.
-*psz2*
+*`psz2`*\
A pointer to a null-terminated string for comparison.
### Remarks
-Tests whether a string or character on the left side is equal to a string or character on the right side, and returns TRUE or FALSE accordingly.
+Tests whether a string or character on the left side is equal to a string or character on the right side, and returns `TRUE` or `FALSE` accordingly.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#142](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_26.cpp)]
-## CStringT::operator !=
+## `CStringT::operator !=`
Determines whether two strings are logically not equal.
-```
+```cpp
friend bool operator!=(const CStringT& str1, const CStringT& str2) throw();
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
-*ch1*
+*`ch1`*\
An ANSI or Unicode character to concatenate with a string.
-*ch2*
+*`ch2`*\
An ANSI or Unicode character to concatenate with a string.
-*str1*
-A `CStringT` for comparison.
+*`str1`*\
+A **`CStringT`** for comparison.
-*str2*
-A `CStringT` for comparison.
+*`str2`*\
+A **`CStringT`** for comparison.
-*psz1*
+*`psz1`*\
A pointer to a null-terminated string for comparison.
-*psz2*
+*`psz2`*\
A pointer to a null-terminated string for comparison.
### Remarks
-Tests if a string or character on the left side is not equal to a string or character on the right side.
+Tests if a string or character on the left side isn't equal to a string or character on the right side.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#143](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_27.cpp)]
-## CStringT::operator <
+## `CStringT::operator <`
Determines whether the string on the left side of the operator is less than the string on the right side.
-```
+```cpp
friend bool operator<(const CStringT& str1, const CStringT& str2) throw();
friend bool operator<(const CStringT& str1, PCXSTR psz2) throw();
friend bool operator<(PCXSTR psz1, const CStringT& str2) throw();
@@ -1189,16 +1188,16 @@ friend bool operator<(PCXSTR psz1, const CStringT& str2) throw();
### Parameters
-*str1*
-A `CStringT` for comparison.
+*`str1`*\
+A **`CStringT`** for comparison.
-*str2*
-A `CStringT` for comparison.
+*`str2`*\
+A **`CStringT`** for comparison.
-*psz1*
+*`psz1`*\
A pointer to a null-terminated string for comparison.
-*psz2*
+*`psz2`*\
A pointer to a null-terminated string for comparison.
### Remarks
@@ -1215,11 +1214,11 @@ A lexicographical comparison between strings, character by character until:
[!code-cpp[NVC_ATLMFC_Utilities#144](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_28.cpp)]
-## CStringT::operator >
+## `CStringT::operator >`
Determines whether the string on the left side of the operator is greater than the string on the right side.
-```
+```cpp
friend bool operator>(const CStringT& str1, const CStringT& str2) throw();
friend bool operator>(const CStringT& str1, PCXSTR psz2) throw();
friend bool operator>(PCXSTR psz1, const CStringT& str2) throw();
@@ -1227,16 +1226,16 @@ friend bool operator>(PCXSTR psz1, const CStringT& str2) throw();
### Parameters
-*str1*
-A `CStringT` for comparison.
+*`str1`*\
+A **`CStringT`** for comparison.
-*str2*
-A `CStringT` for comparison.
+*`str2`*\
+A **`CStringT`** for comparison.
-*psz1*
+*`psz1`*\
A pointer to a null-terminated string for comparison.
-*psz2*
+*`psz2`*\
A pointer to a null-terminated string for comparison.
### Remarks
@@ -1253,11 +1252,11 @@ A lexicographical comparison between strings, character by character until:
[!code-cpp[NVC_ATLMFC_Utilities#145](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_29.cpp)]
-## CStringT::operator <=
+## `CStringT::operator <=`
Determines whether the string on the left side of the operator is less than or equal to the string on the right side.
-```
+```cpp
friend bool operator<=(const CStringT& str1, const CStringT& str2) throw();
friend bool operator<=(const CStringT& str1, PCXSTR psz2) throw();
friend bool operator<=(PCXSTR psz1, const CStringT& str2) throw();
@@ -1265,16 +1264,16 @@ friend bool operator<=(PCXSTR psz1, const CStringT& str2) throw();
### Parameters
-*str1*
-A `CStringT` for comparison.
+*`str1`*\
+A **`CStringT`** for comparison.
-*str2*
-A `CStringT` for comparison.
+*`str2`*\
+A **`CStringT`** for comparison.
-*psz1*
+*`psz1`*\
A pointer to a null-terminated string for comparison.
-*psz2*
+*`psz2`*\
A pointer to a null-terminated string for comparison.
### Remarks
@@ -1291,11 +1290,11 @@ A lexicographical comparison between strings, character by character until:
[!code-cpp[NVC_ATLMFC_Utilities#146](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_30.cpp)]
-## CStringT::operator >=
+## `CStringT::operator >=`
Determines whether the string on the left side of the operator is greater than or equal to the string on the right side.
-```
+```cpp
friend bool operator>=(const CStringT& str1, const CStringT& str2) throw();
friend bool operator>=(const CStringT& str1, PCXSTR psz2) throw();
friend bool operator>=(PCXSTR psz1, const CStringT& str2) throw();
@@ -1303,16 +1302,16 @@ friend bool operator>=(PCXSTR psz1, const CStringT& str2) throw();
### Parameters
-*str1*
-A `CStringT` for comparison.
+*`str1`*\
+A **`CStringT`** for comparison.
-*str2*
-A `CStringT` for comparison.
+*`str2`*\
+A **`CStringT`** for comparison.
-*psz1*
+*`psz1`*\
A pointer to a string for comparison.
-*psz2*
+*`psz2`*\
A pointer to a string for comparison.
### Remarks
@@ -1329,63 +1328,63 @@ A lexicographical comparison between strings, character by character until:
[!code-cpp[NVC_ATLMFC_Utilities#147](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_31.cpp)]
-## CStringT::Remove
+## `CStringT::Remove`
Removes all instances of the specified character from the string.
-```
+```cpp
int Remove(XCHAR chRemove);
```
### Parameters
-*chRemove*
+*`chRemove`*\
The character to be removed from a string.
### Return Value
-The count of characters removed from the string. Zero if the string is not changed.
+The count of characters removed from the string. Zero if the string isn't changed.
### Remarks
-Comparisons for the character are case sensitive.
+Comparisons for the character are case-sensitive.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#129](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_32.cpp)]
-## CStringT::Replace
+## `CStringT::Replace`
-There are two versions of `Replace`.The first version replaces one or more copies of a substring by using another substring. Both substrings are null-terminated. The second version replaces one or more copies of a character by using another character. Both versions operate on the character data stored in `CStringT`.
+There are two versions of `Replace`. The first version replaces one or more copies of a substring by using another substring. Both substrings are null-terminated. The second version replaces one or more copies of a character by using another character. Both versions operate on the character data stored in **`CStringT`**.
-```
+```cpp
int Replace(PCXSTR pszOld, PCXSTR pszNew);
int Replace(XCHAR chOld, XCHAR chNew);
```
### Parameters
-*pszOld*
-A pointer to a null-terminated string to be replaced by *pszNew*.
+*`pszOld`*\
+A pointer to a null-terminated string to be replaced by *`pszNew`*.
-*pszNew*
-A pointer to a null-terminated string that replaces *pszOld*.
+*`pszNew`*\
+A pointer to a null-terminated string that replaces *`pszOld`*.
-*chOld*
-The character to be replaced by *chNew*.
+*`chOld`*\
+The character to be replaced by *`chNew`*.
-*chNew*
-The character replacing *chOld*.
+*`chNew`*\
+The character replacing *`chOld`*.
### Return Value
-Returns the number of replaced instances of the character or substring, or zero if the string is not changed.
+Returns the number of replaced instances of the character or substring, or zero if the string isn't changed.
### Remarks
-`Replace` can change the string length because *pszNew* and *pszOld* do not have to be the same length, and several copies of the old substring can be changed to the new one. The function performs a case-sensitive match.
+`Replace` can change the string length because *`pszNew`* and *`pszOld`* don't have to be the same length, and several copies of the old substring can be changed to the new one. The function does a case-sensitive match.
-Examples of `CStringT` instances are `CString`, `CStringA`, and `CStringW`.
+Examples of **`CStringT`** instances are `CString`, `CStringA`, and `CStringW`.
For `CStringA`, `Replace` works with ANSI or multibyte (MBCS) characters. For `CStringW`, `Replace` works with wide characters.
@@ -1393,8 +1392,8 @@ For `CString`, the character data type is selected at compile time, based on whe
|Defined Constant|Character Data Type|
|----------------------|-------------------------|
-|_UNICODE|Wide characters|
-|_MBCS|Multi-byte characters|
+|`_UNICODE`|Wide characters|
+|`_MBCS`|Multi-byte characters|
|Neither|Single-byte characters|
|Both|Undefined|
@@ -1402,22 +1401,22 @@ For `CString`, the character data type is selected at compile time, based on whe
[!code-cpp[NVC_ATLMFC_Utilities#200](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_33.cpp)]
-## CStringT::ReverseFind
+## `CStringT::ReverseFind`
-Searches this `CStringT` object for the last match of a character.
+Searches this **`CStringT`** object for the last match of a character.
-```
+```cpp
int ReverseFind(XCHAR ch) const throw();
```
### Parameters
-*ch*
+*`ch`*\
The character to search for.
### Return Value
-The zero-based index of the last character in this `CStringT` object that matches the requested character, or -1 if the character is not found.
+The zero-based index of the last character in this **`CStringT`** object that matches the requested character, or -1 if the character isn't found.
### Remarks
@@ -1427,44 +1426,44 @@ The function is similar to the run-time function `strrchr`.
[!code-cpp[NVC_ATLMFC_Utilities#130](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_34.cpp)]
-## CStringT::Right
+## `CStringT::Right`
-Extracts the last (that is, rightmost) *nCount* characters from this `CStringT` object and returns a copy of the extracted substring.
+Extracts the last (that is, rightmost) *`nCount`* characters from this **`CStringT`** object and returns a copy of the extracted substring.
-```
+```cpp
CStringT Right(int nCount) const;
```
### Parameters
-*nCount*
-The number of characters to extract from this `CStringT` object.
+*`nCount`*\
+The number of characters to extract from this **`CStringT`** object.
### Return Value
-A `CStringT` object that contains a copy of the specified range of characters. Note that the returned `CStringT` object can be empty.
+A **`CStringT`** object that contains a copy of the specified range of characters. The returned **`CStringT`** object can be empty.
### Remarks
-If *nCount* exceeds the string length, then the entire string is extracted. `Right` is similar to the Basic `Right` function (except that indexes in Basic are zero-based).
+If *`nCount`* exceeds the string length, then the entire string is extracted. `Right` is similar to the Basic `Right` function (except that indexes in Basic are zero-based).
-For multibyte character sets (MBCS), *nCount* refers to each 8-bit character; that is, a lead and trail byte in one multibyte character are counted as two characters.
+For multibyte character sets (`MBCS`), *`nCount`* refers to each 8-bit character; that is, a lead and trail byte in one multibyte character are counted as two characters.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#131](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_35.cpp)]
-## CStringT::SetSysString
+## `CStringT::SetSysString`
-Reallocates the BSTR pointed to by *pbstr* and copies the contents of the `CStringT` object into it, including the NULL character.
+Reallocates the **`BSTR`** pointed to by *`pbstr`* and copies the contents of the **`CStringT`** object into it, including the `NULL` character.
-```
+```cpp
BSTR SetSysString(BSTR* pbstr) const;
```
### Parameters
-*pbstr*
+*`pbstr`*\
A pointer to a character string.
### Return Value
@@ -1473,7 +1472,7 @@ The new string.
### Remarks
-Depending on the contents of the `CStringT` object, the value of the BSTR referenced by *pbstr* can change. The function throws a `CMemoryException` if insufficient memory exists.
+Depending on the contents of the **`CStringT`** object, the value of the **`BSTR`** referenced by *`pbstr`* can change. The function throws a `CMemoryException` if insufficient memory exists.
This function is normally used to change the value of strings passed by reference for Automation.
@@ -1481,88 +1480,86 @@ This function is normally used to change the value of strings passed by referenc
[!code-cpp[NVC_ATLMFC_Utilities#132](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_36.cpp)]
-## CStringT::SpanExcluding
+## `CStringT::SpanExcluding`
-Extracts characters from the string, starting with the first character, that are not in the set of characters identified by *pszCharSet*.
+Extracts characters from the string, starting with the first character, that aren't in the set of characters identified by *`pszCharSet`*.
-```
+```cpp
CStringT SpanExcluding(PCXSTR pszCharSet) const;
```
### Parameters
-*pszCharSet*
+*`pszCharSet`*\
A string interpreted as a set of characters.
### Return Value
-A substring that contains characters in the string that are not in *pszCharSet*, beginning with the first character in the string and ending with the first character found in the string that is also in *pszCharSet* (that is, starting with the first character in the string and up to but excluding the first character in the string that is found *pszCharSet*). It returns the entire string if no character in *pszCharSet* is found in the string.
+A substring that contains characters in the string that aren't in *`pszCharSet`*, beginning with the first character in the string and ending with the first character found in the string that is also in *`pszCharSet`* (that is, starting with the first character in the string and up to but excluding the first character in the string that is found *`pszCharSet`*). It returns the entire string if no character in *`pszCharSet`* is found in the string.
### Remarks
-`SpanExcluding` extracts and returns all characters preceding the first occurrence of a character from *pszCharSet* (in other words, the character from *pszCharSet* and all characters following it in the string, are not returned). If no character from *pszCharSet* is found in the string, then `SpanExcluding` returns the entire string.
+`SpanExcluding` extracts and returns all characters preceding the first occurrence of a character from *`pszCharSet`* (in other words, the character from *`pszCharSet`* and all characters following it in the string, aren't returned). If no character from *`pszCharSet`* is found in the string, then `SpanExcluding` returns the entire string.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#133](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_37.cpp)]
-## CStringT::SpanIncluding
+## `CStringT::SpanIncluding`
-Extracts characters from the string, starting with the first character, that are in the set of characters identified by *pszCharSet*.
+Extracts characters from the string, starting with the first character, that are in the set of characters identified by *`pszCharSet`*.
-```
+```cpp
CStringT SpanIncluding(PCXSTR pszCharSet) const;
```
### Parameters
-*pszCharSet*
+*`pszCharSet`*\
A string interpreted as a set of characters.
### Return Value
-A substring that contains characters in the string that are in *pszCharSet*, beginning with the first character in the string and ending when a character is found in the string that is not in *pszCharSet*. `SpanIncluding` returns an empty substring if the first character in the string is not in the specified set.
+A substring that contains characters in the string that are in *`pszCharSet`*, beginning with the first character in the string and ending when a character is found in the string that isn't in *`pszCharSet`*. `SpanIncluding` returns an empty substring if the first character in the string isn't in the specified set.
### Remarks
-If the first character of the string is not in the character set, then `SpanIncluding` returns an empty string. Otherwise, it returns a sequence of consecutive characters that are in the set.
+If the first character of the string isn't in the character set, then `SpanIncluding` returns an empty string. Otherwise, it returns a sequence of consecutive characters that are in the set.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#134](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_38.cpp)]
-## CStringT::Tokenize
+## `CStringT::Tokenize`
Finds the next token in a target string
-```
+```cpp
CStringT Tokenize(PCXSTR pszTokens, int& iStart) const;
```
### Parameters
-*pszTokens*
-A string containing token delimiters. The order of these delimiters is not important.
+*`pszTokens`*\
+A string containing token delimiters. The order of these delimiters isn't important.
-*iStart*
+*`iStart`*\
The zero-based index to begin the search.
### Return Value
-A `CStringT` object containing the current token value.
+A **`CStringT`** object containing the current token value.
### Remarks
-The `Tokenize` function finds the next token in the target string. The set of characters in *pszTokens* specifies possible delimiters of the token to be found. On each call to `Tokenize` the function starts at *iStart*, skips leading delimiters, and returns a `CStringT` object containing the current token, which is the string of characters up to the next delimiter character. The value of *iStart* is updated to be the position following the ending delimiter character, or -1 if the end of the string was reached. More tokens can be broken out of the remainder of the target string by a series of calls to `Tokenize`, using *iStart* to keep track of where in the string the next token is to be read. When there are no more tokens the function will return an empty string and *iStart* will be set to -1.
+The `Tokenize` function finds the next token in the target string. The set of characters in *`pszTokens`* specifies possible delimiters of the token to be found. On each call to `Tokenize` the function starts at *`iStart`*, skips leading delimiters, and returns a **`CStringT`** object containing the current token, which is the string of characters up to the next delimiter character. The value of *`iStart`* is updated to be the position following the ending delimiter character, or -1 if the end of the string was reached. More tokens can be broken out of the rest of the target string by a series of calls to `Tokenize`, using *`iStart`* to keep track of where in the string the next token is to be read. When there are no more tokens, the function will return an empty string and *`iStart`* will be set to -1.
-Unlike the CRT tokenize functions like [strtok_s, _strtok_s_l, wcstok_s, _wcstok_s_l, _mbstok_s, _mbstok_s_l](../../c-runtime-library/reference/strtok-s-strtok-s-l-wcstok-s-wcstok-s-l-mbstok-s-mbstok-s-l.md), `Tokenize` does not modify the target string.
+Unlike the CRT tokenize functions like [`strtok_s`, `_strtok_s_l`, `wcstok_s`, `_wcstok_s_l`, `_mbstok_s`, `_mbstok_s_l`](../../c-runtime-library/reference/strtok-s-strtok-s-l-wcstok-s-wcstok-s-l-mbstok-s-mbstok-s-l.md), `Tokenize` doesn't modify the target string.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#135](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_39.cpp)]
-### Remarks
-
The output from this example is as follows:
```Output
@@ -1571,11 +1568,11 @@ Resulting Token: Second
Resulting Token: Third
```
-## CStringT::Trim
+## `CStringT::Trim`
Trims leading and trailing characters from the string.
-```
+```cpp
CStringT& Trim(XCHAR chTarget);
CStringT& Trim(PCXSTR pszTargets);
CStringT& Trim();
@@ -1583,11 +1580,11 @@ CStringT& Trim();
### Parameters
-*chTarget*
+*`chTarget`*\
The target character to be trimmed.
-*pszTargets*
-A pointer to a string containing the target characters to be trimmed. All leading and trailing occurrences of characters in *pszTarget* will be trimmed from the `CStringT` object.
+*`pszTargets`*\
+A pointer to a string containing the target characters to be trimmed. All leading and trailing occurrences of characters in *`pszTargets`* will be trimmed from the **`CStringT`** object.
### Return Value
@@ -1597,9 +1594,9 @@ Returns the trimmed string.
Removes all leading and trailing occurrences of one of the following:
-- The character specified by *chTarget*.
+- The character specified by *`chTarget`*.
-- All characters found in the string specified by *pszTargets*.
+- All characters found in the string specified by *`pszTargets`*.
- Whitespace.
@@ -1607,8 +1604,6 @@ Removes all leading and trailing occurrences of one of the following:
[!code-cpp[NVC_ATLMFC_Utilities#136](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_40.cpp)]
-### Remarks
-
The output from this example is as follows:
```Output
@@ -1616,11 +1611,11 @@ Before: "******Soccer is best, but liquor is quicker!!!!!"
After : "Soccer is best, but liquor is quicker"
```
-## CStringT::TrimLeft
+## `CStringT::TrimLeft`
Trims leading characters from the string.
-```
+```cpp
CStringT& TrimLeft(XCHAR chTarget);
CStringT& TrimLeft(PCXSTR pszTargets);
CStringT& TrimLeft();
@@ -1628,11 +1623,11 @@ CStringT& TrimLeft();
### Parameters
-*chTarget*
+*`chTarget`*\
The target character to be trimmed.
-*pszTargets*
-A pointer to a string containing the target characters to be trimmed. All leading occurrences of characters in *pszTarget* will be trimmed from the `CStringT` object.
+*`pszTargets`*\
+A pointer to a string containing the target characters to be trimmed. All leading occurrences of characters in *`pszTargets`* will be trimmed from the **`CStringT`** object.
### Return Value
@@ -1642,9 +1637,9 @@ The resulting trimmed string.
Removes all leading and trailing occurrences of one of the following:
-- The character specified by *chTarget*.
+- The character specified by *`chTarget`*.
-- All characters found in the string specified by *pszTargets*.
+- All characters found in the string specified by *`pszTargets`*.
- Whitespace.
@@ -1652,11 +1647,11 @@ Removes all leading and trailing occurrences of one of the following:
[!code-cpp[NVC_ATLMFC_Utilities#137](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_41.cpp)]
-## CStringT::TrimRight
+## `CStringT::TrimRight`
Trims trailing characters from the string.
-```
+```cpp
CStringT& TrimRight(XCHAR chTarget);
CStringT& TrimRight(PCXSTR pszTargets);
CStringT& TrimRight();
@@ -1664,33 +1659,31 @@ CStringT& TrimRight();
### Parameters
-*chTarget*
+*`chTarget`*\
The target character to be trimmed.
-*pszTargets*
-A pointer to a string containing the target characters to be trimmed. All trailing occurrences of characters in *pszTarget* will be trimmed from the `CStringT` object.
+*`pszTargets`*\
+A pointer to a string containing the target characters to be trimmed. All trailing occurrences of characters in *`pszTargets`* will be trimmed from the **`CStringT`** object.
### Return Value
-Returns the `CStringT` object that contains the trimmed string.
+Returns the **`CStringT`** object that contains the trimmed string.
### Remarks
Removes trailing occurrences of one of the following:
-- The character specified by *chTarget*.
+- The character specified by *`chTarget`*.
-- All characters found in the string specified by *pszTargets*.
+- All characters found in the string specified by *`pszTargets`*.
- Whitespace.
-The `CStringT& TrimRight(XCHAR chTarget)` version accepts one character parameter and removes all copies of that character from the end of `CStringT` string data. It starts from the end of the string and works toward the front. It stops when it finds a different character or when `CSTringT` runs out of character data.
-
-The `CStringT& TrimRight(PCXSTR pszTargets)` version accepts a null-terminated string that contains all the different characters to search for. It removes all copies of those characters in the `CStringT` object. It starts at the end of the string and works toward the front. It stops when it finds a character that is not in the target string, or when `CStringT` runs out of character data. It does not try to match the whole target string to a substring at the end of `CStringT`.
+The `CStringT& TrimRight(XCHAR chTarget)` version accepts one character parameter and removes all copies of that character from the end of **`CStringT`** string data. It starts from the end of the string and works toward the front. It stops when it finds a different character or when **`CStringT`** runs out of character data.
-The `CStringT& TrimRight()` version requires no parameters. It trims any trailing whitespace characters from the end of the `CStringT` string. Whitespace characters can be line breaks, spaces, or tabs.
+The `CStringT& TrimRight(PCXSTR pszTargets)` version accepts a null-terminated string that contains all the different characters to search for. It removes all copies of those characters in the **`CStringT`** object. It starts at the end of the string and works toward the front. It stops when it finds a character that isn't in the target string, or when **`CStringT`** runs out of character data. It doesn't try to match the whole target string to a substring at the end of **`CStringT`**.
--
+The `CStringT& TrimRight()` version requires no parameters. It trims any trailing whitespace characters from the end of the **`CStringT`** string. Whitespace characters can be line breaks, spaces, or tabs.
### Example
@@ -1698,6 +1691,6 @@ The `CStringT& TrimRight()` version requires no parameters. It trims any trailin
## See also
-[Hierarchy Chart](../../mfc/hierarchy-chart.md)
-[ATL/MFC Shared Classes](../../atl-mfc-shared/atl-mfc-shared-classes.md)
-[CSimpleStringT Class](../../atl-mfc-shared/reference/csimplestringt-class.md)
+[Hierarchy Chart](../../mfc/hierarchy-chart.md)\
+[ATL/MFC Shared Classes](../../atl-mfc-shared/atl-mfc-shared-classes.md)\
+[`CSimpleStringT` Class](../../atl-mfc-shared/reference/csimplestringt-class.md)
diff --git a/docs/atl-mfc-shared/reference/ctime-class.md b/docs/atl-mfc-shared/reference/ctime-class.md
index 7703f13a37..067db91b52 100644
--- a/docs/atl-mfc-shared/reference/ctime-class.md
+++ b/docs/atl-mfc-shared/reference/ctime-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CTime Class"
title: "CTime Class"
ms.date: "10/18/2018"
f1_keywords: ["ATLTIME/ATL::CTime", "ATLTIME/ATL::CTime::CTime", "ATLTIME/ATL::CTime::Format", "ATLTIME/ATL::CTime::FormatGmt", "ATLTIME/ATL::CTime::GetAsDBTIMESTAMP", "ATLTIME/ATL::CTime::GetAsSystemTime", "ATLTIME/ATL::CTime::GetCurrentTime", "ATLTIME/ATL::CTime::GetDay", "ATLTIME/ATL::CTime::GetDayOfWeek", "ATLTIME/ATL::CTime::GetGmtTm", "ATLTIME/ATL::CTime::GetHour", "ATLTIME/ATL::CTime::GetLocalTm", "ATLTIME/ATL::CTime::GetMinute", "ATLTIME/ATL::CTime::GetMonth", "ATLTIME/ATL::CTime::GetSecond", "ATLTIME/ATL::CTime::GetTime", "ATLTIME/ATL::CTime::GetYear", "ATLTIME/ATL::CTime::Serialize64"]
@@ -11,7 +12,7 @@ Represents an absolute time and date.
## Syntax
-```
+```cpp
class CTime
```
@@ -46,7 +47,7 @@ class CTime
### Operators
-|||
+|Name|Description|
|-|-|
|[operator + -](#operator_add_-)|These operators add and subtract `CTimeSpan` and `CTime` objects.|
|[operator +=, -=](#operator_add_eq_-_eq)|These operators add and subtract a `CTimeSpan` object to and from this `CTime` object.|
@@ -81,7 +82,7 @@ For more information about using `CTime`, see the articles [Date and Time](../..
Comparison operators.
-```
+```cpp
bool operator==(CTime time) const throw();
bool operator!=(CTime time) const throw();
bool operator<(CTime time) const throw();
@@ -107,7 +108,7 @@ These operators compare two absolute times and return TRUE if the condition is t
Creates a new `CTime` object initialized with the specified time.
-```
+```cpp
CTime() throw();
CTime(__time64_t time) throw();
CTime(int nYear, int nMonth, int nDay,
@@ -192,7 +193,7 @@ For more information, see the [SYSTEMTIME](/windows/win32/api/minwinbase/ns-minw
Call this member function to create a formatted representation of the date-time value.
-```
+```cpp
CString Format(LPCTSTR pszFormat) const;
CString Format(UINT nFormatID) const;
```
@@ -223,7 +224,7 @@ This method throws an exception if the date-time value to format does not range
Generates a formatted string that corresponds to this `CTime` object.
-```
+```cpp
CString FormatGmt(LPCTSTR pszFormat) const;
CString FormatGmt(UINT nFormatID) const;
```
@@ -254,7 +255,7 @@ See the example for [CTime::Format](#format).
Call this member function to convert the time information stored in the `CTime` object to a Win32-compatible DBTIMESTAMP structure.
-```
+```cpp
bool GetAsDBTIMESTAMP(DBTIMESTAMP& dbts) const throw();
```
@@ -279,7 +280,7 @@ Stores the resulting time in the referenced *dbts* structure. The `DBTIMESTAMP`
Call this member function to convert the time information stored in the `CTime` object to a Win32-compatible [SYSTEMTIME](/windows/win32/api/minwinbase/ns-minwinbase-systemtime) structure.
-```
+```cpp
bool GetAsSystemTime(SYSTEMTIME& st) const throw();
```
@@ -304,7 +305,7 @@ TRUE if successful; otherwise FALSE.
Returns a `CTime` object that represents the current time.
-```
+```cpp
static CTime WINAPI GetCurrentTime() throw();
```
@@ -320,7 +321,7 @@ Returns the current system date and time in Coordinated Universal Time (UTC).
Returns the day represent by the `CTime` object.
-```
+```cpp
int GetDay() const throw();
```
@@ -340,7 +341,7 @@ This function calls `GetLocalTm`, which uses an internal, statically allocated b
Returns the day of the week represented by the `CTime` object.
-```
+```cpp
int GetDayOfWeek() const throw();
```
@@ -360,7 +361,7 @@ This function calls `GetLocalTm`, which uses an internal statically allocated bu
Gets a **struct tm** that contains a decomposition of the time contained in this `CTime` object.
-```
+```cpp
struct tm* GetGmtTm(struct tm* ptm) const;
```
@@ -387,7 +388,7 @@ A pointer to a filled-in **struct tm** as defined in the include file TIME.H. Se
Returns the hour represented by the `CTime` object.
-```
+```cpp
int GetHour() const throw();
```
@@ -407,7 +408,7 @@ This function calls `GetLocalTm`, which uses an internal statically allocated bu
Gets a **struct tm** containing a decomposition of the time contained in this `CTime` object.
-```
+```cpp
struct tm* GetLocalTm(struct tm* ptm) const;
```
@@ -434,7 +435,7 @@ A pointer to a filled-in **struct tm** as defined in the include file TIME.H. Se
Returns the minute represented by the `CTime` object.
-```
+```cpp
int GetMinute() const throw();
```
@@ -454,7 +455,7 @@ See the example for [GetHour](#gethour).
Returns the month represented by the `CTime` object.
-```
+```cpp
int GetMonth() const throw();
```
@@ -474,7 +475,7 @@ See the example for [GetDay](#getday).
Returns the second represented by the `CTime` object.
-```
+```cpp
int GetSecond() const throw();
```
@@ -494,7 +495,7 @@ See the example for [GetHour](#gethour).
Returns a **__time64_t** value for the given `CTime` object.
-```
+```cpp
__time64_t GetTime() const throw();
```
@@ -510,7 +511,7 @@ __time64_t GetTime() const throw();
Returns the year represented by the `CTime` object.
-```
+```cpp
int GetYear();
```
@@ -530,7 +531,7 @@ See the example for [GetDay](#getday).
The assignment operator.
-```
+```cpp
CTime& operator=(__time64_t time) throw();
```
@@ -551,7 +552,7 @@ This overloaded assignment operator copies the source time into this `CTime` obj
These operators add and subtract `CTimeSpan` and `CTime` objects.
-```
+```cpp
CTime operator+(CTimeSpan timeSpan) const throw();
CTime operator-(CTimeSpan timeSpan) const throw();
CTimeSpan operator-(CTime time) const throw();
@@ -581,7 +582,7 @@ A `CTime` or `CTimeSpan` object representing the result of the operation.
These operators add and subtract a `CTimeSpan` object to and from this `CTime` object.
-```
+```cpp
CTime& operator+=(CTimeSpan span) throw();
CTime& operator-=(CTimeSpan span) throw();
```
@@ -610,7 +611,7 @@ These operators allow you to add and subtract a `CTimeSpan` object to and from t
Serializes the data associated with the member variable to or from an archive.
-```
+```cpp
CArchive& Serialize64(CArchive& ar);
```
diff --git a/docs/atl-mfc-shared/reference/ctimespan-class.md b/docs/atl-mfc-shared/reference/ctimespan-class.md
index abebccea3e..ae10bdba1c 100644
--- a/docs/atl-mfc-shared/reference/ctimespan-class.md
+++ b/docs/atl-mfc-shared/reference/ctimespan-class.md
@@ -1,17 +1,17 @@
---
+description: "Learn more about: CTimeSpan Class"
title: "CTimeSpan Class"
ms.date: "10/18/2018"
f1_keywords: ["CTimeSpan", "ATLTIME/ATL::CTimeSpan", "ATLTIME/ATL::CTimeSpan::CTimeSpan", "ATLTIME/ATL::CTimeSpan::Format", "ATLTIME/ATL::CTimeSpan::GetDays", "ATLTIME/ATL::CTimeSpan::GetHours", "ATLTIME/ATL::CTimeSpan::GetMinutes", "ATLTIME/ATL::CTimeSpan::GetSeconds", "ATLTIME/ATL::CTimeSpan::GetTimeSpan", "ATLTIME/ATL::CTimeSpan::GetTotalHours", "ATLTIME/ATL::CTimeSpan::GetTotalMinutes", "ATLTIME/ATL::CTimeSpan::GetTotalSeconds", "ATLTIME/ATL::CTimeSpan::Serialize64"]
helpviewer_keywords: ["elapsed time, CTimeSpan object", "timespan", "time span", "CTimeSpan class", "shared classes, CTimeSpan", "time, elapsed"]
-ms.assetid: ee1e42f6-1839-477a-8435-fb26ad475140
---
-# CTimeSpan Class
+# `CTimeSpan` Class
An amount of time, which is internally stored as the number of seconds in the time span.
## Syntax
-```
+```cpp
class CTimeSpan
```
@@ -21,54 +21,54 @@ class CTimeSpan
|Name|Description|
|----------|-----------------|
-|[CTimeSpan::CTimeSpan](#ctimespan)|Constructs `CTimeSpan` objects in various ways.|
+|[`CTimeSpan::CTimeSpan`](#ctimespan)|Constructs `CTimeSpan` objects in various ways.|
### Public Methods
|Name|Description|
|----------|-----------------|
-|[CTimeSpan::Format](#format)|Converts a `CTimeSpan` into a formatted string.|
-|[CTimeSpan::GetDays](#getdays)|Returns a value that represents the number of complete days in this `CTimeSpan`.|
-|[CTimeSpan::GetHours](#gethours)|Returns a value that represents the number of hours in the current day (-23 through 23).|
-|[CTimeSpan::GetMinutes](#getminutes)|Returns a value that represents the number of minutes in the current hour (-59 through 59).|
-|[CTimeSpan::GetSeconds](#getseconds)|Returns a value that represents the number of seconds in the current minute (-59 through 59).|
-|[CTimeSpan::GetTimeSpan](#gettimespan)|Returns the value of the `CTimeSpan` object.|
-|[CTimeSpan::GetTotalHours](#gettotalhours)|Returns a value that represents the total number of complete hours in this `CTimeSpan`.|
-|[CTimeSpan::GetTotalMinutes](#gettotalminutes)|Returns a value that represents the total number of complete minutes in this `CTimeSpan`.|
-|[CTimeSpan::GetTotalSeconds](#gettotalseconds)|Returns a value that represents the total number of complete seconds in this `CTimeSpan`.|
-|[CTimeSpan::Serialize64](#serialize64)|Serializes data to or from an archive.|
+|[`CTimeSpan::Format`](#format)|Converts a `CTimeSpan` into a formatted string.|
+|[`CTimeSpan::GetDays`](#getdays)|Returns a value that represents the number of complete days in this `CTimeSpan`.|
+|[`CTimeSpan::GetHours`](#gethours)|Returns a value that represents the number of hours in the current day (-23 through 23).|
+|[`CTimeSpan::GetMinutes`](#getminutes)|Returns a value that represents the number of minutes in the current hour (-59 through 59).|
+|[`CTimeSpan::GetSeconds`](#getseconds)|Returns a value that represents the number of seconds in the current minute (-59 through 59).|
+|[`CTimeSpan::GetTimeSpan`](#gettimespan)|Returns the value of the `CTimeSpan` object.|
+|[`CTimeSpan::GetTotalHours`](#gettotalhours)|Returns a value that represents the total number of complete hours in this `CTimeSpan`.|
+|[`CTimeSpan::GetTotalMinutes`](#gettotalminutes)|Returns a value that represents the total number of complete minutes in this `CTimeSpan`.|
+|[`CTimeSpan::GetTotalSeconds`](#gettotalseconds)|Returns a value that represents the total number of complete seconds in this `CTimeSpan`.|
+|[`CTimeSpan::Serialize64`](#serialize64)|Serializes data to or from an archive.|
### Operators
-|||
+|Name|Description|
|-|-|
-|[operator + -](#operator_add_-)|Adds and subtracts `CTimeSpan` objects.|
-|[operator += -=](#operator_add_eq_-_eq)|Adds and subtracts a `CTimeSpan` object to and from this `CTimeSpan`.|
-|[operator == < etc.](#ctimespan_comparison_operators)|Compares two relative time values.|
+|[`operator + -`](#operator_add_-)|Adds and subtracts `CTimeSpan` objects.|
+|[`operator += -=`](#operator_add_eq_-_eq)|Adds and subtracts a `CTimeSpan` object to and from this `CTimeSpan`.|
+|[`operator == < etc.`](#ctimespan_comparison_operators)|Compares two relative time values.|
## Remarks
-`CTimeSpan` does not have a base class.
+`CTimeSpan` doesn't have a base class.
`CTimeSpan` functions convert seconds to various combinations of days, hours, minutes, and seconds.
-The `CTimeSpan` object is stored in a **__time64_t** structure, which is 8 bytes.
+The `CTimeSpan` object is stored in a **`__time64_t`** structure, which is 8 bytes.
-A companion class, [CTime](../../atl-mfc-shared/reference/ctime-class.md), represents an absolute time.
+A companion class, [`CTime`](../../atl-mfc-shared/reference/ctime-class.md), represents an absolute time.
-The `CTime` and `CTimeSpan` classes are not designed for derivation. Because there are no virtual functions, the size of both `CTime` and `CTimeSpan` objects is exactly 8 bytes. Most member functions are inline.
+The `CTime` and `CTimeSpan` classes aren't designed for derivation. Because there are no virtual functions, the size of both `CTime` and `CTimeSpan` objects is exactly 8 bytes. Most member functions are inline.
For more information on using `CTimeSpan`, see the articles [Date and Time](../../atl-mfc-shared/date-and-time.md), and [Time Management](../../c-runtime-library/time-management.md) in the *Run-Time Library Reference*.
## Requirements
-**Header:** atltime.h
+**Header:** `atltime.h`
-## CTimeSpan Comparison Operators
+## `CTimeSpan` Comparison Operators
Comparison operators.
-```
+```cpp
bool operator==(CTimeSpan span) const throw();
bool operator!=(CTimeSpan span) const throw();
bool operator<(CTimeSpan span) const throw();
@@ -79,22 +79,22 @@ bool operator>=(CTimeSpan span) const throw();
### Parameters
-*span*
+*`span`*\
The object to compare.
### Return Value
-These operators compare two relative time values. They return TRUE if the condition is true; otherwise FALSE.
+These operators compare two relative time values. They return `TRUE` if the condition is true; otherwise `FALSE`.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#169](../../atl-mfc-shared/codesnippet/cpp/ctimespan-class_1.cpp)]
-## CTimeSpan::CTimeSpan
+## `CTimeSpan::CTimeSpan`
Constructs `CTimeSpan` objects in various ways.
-```
+```cpp
CTimeSpan() throw();
CTimeSpan(__time64_t time) throw();
@@ -107,13 +107,13 @@ CTimeSpan(
### Parameters
-*timeSpanSrc*
+*`timeSpanSrc`*\
A `CTimeSpan` object that already exists.
-*time*
-A **__time64_t** time value, which is the number of seconds in the time span.
+*`time`*\
+A **`__time64_t`** time value, which is the number of seconds in the time span.
-*lDays*, *nHours*, *nMins*, *nSecs*
+*`lDays`*, *`nHours`*, *`nMins`*, *`nSecs`*\
Days, hours, minutes, and seconds, respectively.
### Remarks
@@ -124,7 +124,7 @@ All these constructors create a new `CTimeSpan` object initialized with the spec
- `CTimeSpan( const CTimeSpan& );` Constructs a `CTimeSpan` object from another `CTimeSpan` value.
-- `CTimeSpan( __time64_t );` Constructs a `CTimeSpan` object from a **__time64_t** type.
+- `CTimeSpan( __time64_t );` Constructs a `CTimeSpan` object from a **`__time64_t`** type.
- `CTimeSpan( LONG, int, int, int );` Constructs a `CTimeSpan` object from components with each component constrained to the following ranges:
@@ -141,11 +141,11 @@ Note that the Debug version of the Microsoft Foundation Class Library asserts if
[!code-cpp[NVC_ATLMFC_Utilities#162](../../atl-mfc-shared/codesnippet/cpp/ctimespan-class_2.cpp)]
-## CTimeSpan::Format
+## `CTimeSpan::Format`
Generates a formatted string that corresponds to this `CTimeSpan`.
-```
+```cpp
CString Format(LPCSTR pFormat) const;
CString Format(LPCTSTR pszFormat) const;
CString Format(UINT nID) const;
@@ -153,20 +153,20 @@ CString Format(UINT nID) const;
### Parameters
-*pFormat*, *pszFormat*
+*`pFormat`*, *`pszFormat`*\
A formatting string similar to the `printf` formatting string. Formatting codes, preceded by a percent (`%`) sign, are replaced by the corresponding `CTimeSpan` component. Other characters in the formatting string are copied unchanged to the returned string. The value and meaning of the formatting codes for `Format` are listed below:
-- **%D** Total days in this `CTimeSpan`
+- **`%D`** Total days in this `CTimeSpan`
-- **%H** Hours in the current day
+- **`%H`** Hours in the current day
-- **%M** Minutes in the current hour
+- **`%M`** Minutes in the current hour
-- **%S** Seconds in the current minute
+- **`%S`** Seconds in the current minute
-- **%%** Percent sign
+- **`%%`** Percent sign
-*nID*
+*`nID`*\
The ID of the string that identifies this format.
### Return Value
@@ -175,17 +175,17 @@ A `CString` object that contains the formatted time.
### Remarks
-The Debug version of the library checks the formatting codes and asserts if the code is not in the list above.
+The Debug version of the library checks the formatting codes and asserts if the code isn't in the list above.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#163](../../atl-mfc-shared/codesnippet/cpp/ctimespan-class_3.cpp)]
-## CTimeSpan::GetDays
+## `CTimeSpan::GetDays`
Returns a value that represents the number of complete days in this `CTimeSpan`.
-```
+```cpp
LONGLONG GetDays() const throw();
```
@@ -195,17 +195,17 @@ Returns the number of complete 24-hour days in the time span. This value may be
### Remarks
-Note that Daylight Savings Time can cause `GetDays` to return a potentially surprising result. For example, when DST is in effect, `GetDays` reports the number of days between April 1 and May 1 as 29, not 30, because one day in April is shortened by an hour and therefore does not count as a complete day.
+Note that Daylight Savings Time (DST) can cause `GetDays` to return a potentially surprising result. For example, when DST is in effect, `GetDays` reports the number of days between April 1 and May 1 as 29, not 30, because one day in April is shortened by an hour and therefore doesn't count as a complete day.
### Example
[!code-cpp[NVC_ATLMFC_Utilities#164](../../atl-mfc-shared/codesnippet/cpp/ctimespan-class_4.cpp)]
-## CTimeSpan::GetHours
+## `CTimeSpan::GetHours`
Returns a value that represents the number of hours in the current day (-23 through 23).
-```
+```cpp
LONG GetHours() const throw();
```
@@ -217,11 +217,11 @@ Returns the number of hours in the current day. The range is -23 through 23.
[!code-cpp[NVC_ATLMFC_Utilities#165](../../atl-mfc-shared/codesnippet/cpp/ctimespan-class_5.cpp)]
-## CTimeSpan::GetMinutes
+## `CTimeSpan::GetMinutes`
Returns a value that represents the number of minutes in the current hour (-59 through 59).
-```
+```cpp
LONG GetMinutes() const throw();
```
@@ -231,13 +231,13 @@ Returns the number of minutes in the current hour. The range is -59 through 59.
### Example
-See the example for [GetHours](#gethours).
+See the example for [`GetHours`](#gethours).
-## CTimeSpan::GetSeconds
+## `CTimeSpan::GetSeconds`
Returns a value that represents the number of seconds in the current minute (-59 through 59).
-```
+```cpp
LONG GetSeconds() const throw();
```
@@ -247,13 +247,13 @@ Returns the number of seconds in the current minute. The range is -59 through 59
### Example
-See the example for [GetHours](#gethours).
+See the example for [`GetHours`](#gethours).
-## CTimeSpan::GetTimeSpan
+## `CTimeSpan::GetTimeSpan`
Returns the value of the `CTimeSpan` object.
-```
+```cpp
__ time64_t GetTimeSpan() const throw();
```
@@ -261,11 +261,11 @@ __ time64_t GetTimeSpan() const throw();
Returns the current value of the `CTimeSpan` object.
-## CTimeSpan::GetTotalHours
+## `CTimeSpan::GetTotalHours`
Returns a value that represents the total number of complete hours in this `CTimeSpan`.
-```
+```cpp
LONGLONG GetTotalHours() const throw();
```
@@ -277,11 +277,11 @@ Returns the total number of complete hours in this `CTimeSpan`.
[!code-cpp[NVC_ATLMFC_Utilities#166](../../atl-mfc-shared/codesnippet/cpp/ctimespan-class_6.cpp)]
-## CTimeSpan::GetTotalMinutes
+## `CTimeSpan::GetTotalMinutes`
Returns a value that represents the total number of complete minutes in this `CTimeSpan`.
-```
+```cpp
LONGLONG GetTotalMinutes() const throw();
```
@@ -291,13 +291,13 @@ Returns the total number of complete minutes in this `CTimeSpan`.
### Example
-See the example for [GetTotalHours](#gettotalhours).
+See the example for [`GetTotalHours`](#gettotalhours).
-## CTimeSpan::GetTotalSeconds
+## `CTimeSpan::GetTotalSeconds`
Returns a value that represents the total number of complete seconds in this `CTimeSpan`.
-```
+```cpp
LONGLONG GetTotalSeconds() const throw();
```
@@ -307,20 +307,20 @@ Returns the total number of complete seconds in this `CTimeSpan`.
### Example
-See the example for [GetTotalHours](#gettotalhours).
+See the example for [`GetTotalHours`](#gettotalhours).
-## CTimeSpan::operator +, -
+## `CTimeSpan::operator +`, `CTimeSpan::operator -`
Adds and subtracts `CTimeSpan` objects.
-```
+```cpp
CTimeSpan operator+(CTimeSpan span) const throw();
CTimeSpan operator-(CTimeSpan span) const throw();
```
### Parameters
-*span*
+*`span`*\
The value to add to the `CTimeSpan` object.
### Return Value
@@ -335,18 +335,18 @@ These two operators allow you to add and subtract `CTimeSpan` objects to and fro
[!code-cpp[NVC_ATLMFC_Utilities#167](../../atl-mfc-shared/codesnippet/cpp/ctimespan-class_7.cpp)]
-## CTimeSpan::operator +=, -=
+## `CTimeSpan::operator +=`, `CTimeSpan::operator -=`
Adds and subtracts a `CTimeSpan` object to and from this `CTimeSpan`.
-```
+```cpp
CTimeSpan& operator+=(CTimeSpan span) throw();
CTimeSpan& operator-=(CTimeSpan span) throw();
```
### Parameters
-*span*
+*`span`*\
The value to add to the `CTimeSpan` object.
### Return Value
@@ -361,20 +361,20 @@ These operators allow you to add and subtract a `CTimeSpan` object to and from t
[!code-cpp[NVC_ATLMFC_Utilities#168](../../atl-mfc-shared/codesnippet/cpp/ctimespan-class_8.cpp)]
-## CTimeSpan::Serialize64
+## `CTimeSpan::Serialize64`
> [!NOTE]
> This method is only available in MFC projects.
Serializes the data associated with the member variable to or from an archive.
-```
+```cpp
CArchive& Serialize64(CArchive& ar);
```
### Parameters
-*ar*
+*`ar`*\
The `CArchive` object that you want to update.
### Return Value
@@ -383,11 +383,11 @@ The updated `CArchive` object.
## See also
-[asctime, _wasctime](../../c-runtime-library/reference/asctime-wasctime.md)
-[_ftime, _ftime32, _ftime64](../../c-runtime-library/reference/ftime-ftime32-ftime64.md)
-[gmtime, _gmtime32, _gmtime64](../../c-runtime-library/reference/gmtime-gmtime32-gmtime64.md)
-[localtime, _localtime32, _localtime64](../../c-runtime-library/reference/localtime-localtime32-localtime64.md)
-[strftime, wcsftime, _strftime_l, _wcsftime_l](../../c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l.md)
-[time, _time32, _time64](../../c-runtime-library/reference/time-time32-time64.md)
-[Hierarchy Chart](../../mfc/hierarchy-chart.md)
+[`asctime`, `_wasctime`](../../c-runtime-library/reference/asctime-wasctime.md)\
+[`_ftime`, `_ftime32`, `_ftime64`](../../c-runtime-library/reference/ftime-ftime32-ftime64.md)\
+[`gmtime`, `_gmtime32`, `_gmtime64`](../../c-runtime-library/reference/gmtime-gmtime32-gmtime64.md)\
+[`localtime`, `_localtime32`, `_localtime64`](../../c-runtime-library/reference/localtime-localtime32-localtime64.md)\
+[`strftime`, `wcsftime`, `_strftime_l`, `_wcsftime_l`](../../c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l.md)\
+[`time`, `_time32`, `_time64`](../../c-runtime-library/reference/time-time32-time64.md)\
+[Hierarchy Chart](../../mfc/hierarchy-chart.md)\
[ATL/MFC Shared Classes](../../atl-mfc-shared/atl-mfc-shared-classes.md)
diff --git a/docs/atl-mfc-shared/reference/iatlstringmgr-class.md b/docs/atl-mfc-shared/reference/iatlstringmgr-class.md
index ddf9bc330e..9eb991ca28 100644
--- a/docs/atl-mfc-shared/reference/iatlstringmgr-class.md
+++ b/docs/atl-mfc-shared/reference/iatlstringmgr-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IAtlStringMgr Class"
title: "IAtlStringMgr Class"
ms.date: "10/18/2018"
f1_keywords: ["IAtlStringMgr", "ATLSIMPSTR/ATL::IAtlStringMgr", "ATLSIMPSTR/ATL::Allocate", "ATLSIMPSTR/ATL::Clone", "ATLSIMPSTR/ATL::Free", "ATLSIMPSTR/ATL::GetNilString", "ATLSIMPSTR/ATL::Reallocate"]
@@ -11,7 +12,7 @@ This class represents the interface to a `CStringT` memory manager.
## Syntax
-```
+```cpp
__interface IAtlStringMgr
```
@@ -19,7 +20,7 @@ __interface IAtlStringMgr
### Methods
-|||
+|Name|Description|
|-|-|
|[Allocate](#allocate)|Call this method to allocate a new string data structure.|
|[Clone](#clone)|Call this method to return a pointer to a new string manager for use with another instance of `CSimpleStringT`.|
@@ -41,7 +42,7 @@ You can also use this class to implement a custom memory manager for your custom
Allocates a new string data structure.
-```
+```cpp
CStringData* Allocate(int nAllocLength,int nCharSize) throw();
```
@@ -71,7 +72,7 @@ Call [IAtlStringMgr::Free](#free) or [IAtlStringMgr::ReAllocate](#reallocate) to
Returns a pointer to a new string manager for use with another instance of `CSimpleStringT`.
-```
+```cpp
IAtlStringMgr* Clone() throw();
```
@@ -112,7 +113,7 @@ Frees the specified memory block previously allocated by [Allocate](#allocate) o
Returns a pointer to a string data structure for an empty string.
-```
+```cpp
CStringData* GetNilString() throw();
```
@@ -134,7 +135,7 @@ Call this function to return a representation of an empty string.
Reallocates a string data structure.
-```
+```cpp
CStringData* Reallocate(
CStringData* pData,
int nAllocLength,
diff --git a/docs/atl-mfc-shared/string-data-management.md b/docs/atl-mfc-shared/string-data-management.md
index 6869f6c88e..b48c6a636d 100644
--- a/docs/atl-mfc-shared/string-data-management.md
+++ b/docs/atl-mfc-shared/string-data-management.md
@@ -1,20 +1,20 @@
---
+description: "Learn more about: String Data Management"
title: "String Data Management"
ms.date: "11/04/2016"
helpviewer_keywords: ["Unicode, string objects"]
-ms.assetid: 0b53a542-eeb1-4108-9ada-6700645b6f8f
---
# String Data Management
Visual C++ provides several ways to manage string data:
-- [String Manipulation](../c-runtime-library/string-manipulation-crt.md) for working with C-style null-terminated strings
+- [String Manipulation](../c-runtime-library/string-manipulation-crt.md) for working with C-style `NULL`-terminated strings
- Win32 API functions for managing strings
-- MFC's class [CStringT Class](../atl-mfc-shared/reference/cstringt-class.md), which provides flexible, resizable string objects
+- MFC's class [`CStringT` Class](../atl-mfc-shared/reference/cstringt-class.md), which provides flexible, resizable string objects
-- Class [CStringT Class](../atl-mfc-shared/reference/cstringt-class.md), which provides an MFC-independent string object with the same functionality as `CString`
+- Class [`CStringT` Class](../atl-mfc-shared/reference/cstringt-class.md), which provides an MFC-independent string object with the same functionality as `CString`
Nearly all programs work with string data. MFC's `CString` class is often the best solution for flexible string handling. Starting with version 7.0, `CString` can be used in MFC or MFC-independent programs. Both the run-time library and `CString` support strings containing multibyte (wide) characters, as in Unicode or MBCS programming.
@@ -22,11 +22,11 @@ This article describes the general-purpose services that the class library provi
- [Unicode and MBCS Provide portability](#_core_unicode_and_mbcs_provide_portability)
-- [CStrings and const char Pointers](#_core_cstrings_and_const_char_pointers)
+- [`CStrings` and `const char` Pointers](#_core_cstrings_and_const_char_pointers)
-- [CString Reference Counting](#_core_cstring_reference_counting)
+- [`CString` Reference Counting](#_core_cstring_reference_counting)
-The [CStringT Class](../atl-mfc-shared/reference/cstringt-class.md) class provides support for manipulating strings. It is intended to replace and extend the functionality normally provided by the C run-time library string package. The `CString` class supplies member functions and operators for simplified string handling, similar to those found in Basic. The class also provides constructors and operators for constructing, assigning, and comparing `CString`s and standard C++ string data types. Because `CString` is not derived from `CObject`, you can use `CString` objects independently of most of the Microsoft Foundation Class Library (MFC).
+The [`CStringT` Class](../atl-mfc-shared/reference/cstringt-class.md) class provides support for manipulating strings. It's intended to replace and extend the functionality normally provided by the C run-time library string package. The `CString` class supplies member functions and operators for simplified string handling, similar to those found in Basic. The class also provides constructors and operators for constructing, assigning, and comparing `CString`s and standard C++ string data types. Because `CString` isn't derived from `CObject`, you can use `CString` objects independently of most of the Microsoft Foundation Class Library (MFC).
`CString` objects follow "value semantics." A `CString` object represents a unique value. Think of a `CString` as an actual string, not as a pointer to a string.
@@ -34,10 +34,10 @@ A `CString` object represents a sequence of a variable number of characters. `CS
## Unicode and MBCS Provide Portability
-With MFC version 3.0 and later, MFC, including `CString`, is enabled for both Unicode and multibyte character sets (MBCS). This support makes it easier for you to write portable applications that you can build for either Unicode or ANSI characters. To enable this portability, each character in a `CString` object is of type TCHAR, which is defined as **`wchar_t`** if you define the symbol _UNICODE when you build your application, or as **`char`** if not. A **`wchar_t`** character is 16 bits wide. MBCS is enabled if you build with the symbol _MBCS defined. MFC itself is built with either the _MBCS symbol (for the NAFX libraries) or the _UNICODE symbol (for the UAFX libraries) defined.
+With MFC version 3.0 and later, MFC, including `CString`, is enabled for both Unicode and multibyte character sets (MBCS). This support makes it easier for you to write portable applications that you can build for either Unicode or ANSI characters. To enable this portability, each character in a `CString` object is of type `TCHAR`, which is defined as **`wchar_t`** if you define the symbol `_UNICODE` when you build your application, or as **`char`** if not. A **`wchar_t`** character is 16 bits wide. MBCS is enabled if you build with the symbol `_MBCS` defined. MFC itself is built with either the `_MBCS` symbol (for the NAFX libraries) or the `_UNICODE` symbol (for the UAFX libraries) defined.
> [!NOTE]
-> The `CString` examples in this and the accompanying articles on strings show literal strings properly formatted for Unicode portability, using the _T macro, which translates the literal string to the form:
+> The `CString` examples in this and the accompanying articles on strings show literal strings properly formatted for Unicode portability, using the `_T` macro, which translates the literal string to the form:
`L"literal string"`
@@ -47,34 +47,34 @@ With MFC version 3.0 and later, MFC, including `CString`, is enabled for both Un
[!code-cpp[NVC_ATLMFC_Utilities#187](../atl-mfc-shared/codesnippet/cpp/string-data-management_1.cpp)]
> [!NOTE]
-> is translated as a Unicode string if _UNICODE is defined or as an ANSI string if not. For more information, see the article [Unicode and Multibyte Character Set (MBCS) Support](../atl-mfc-shared/unicode-and-multibyte-character-set-mbcs-support.md).
+> is translated as a Unicode string if `_UNICODE` is defined or as an ANSI string if not. For more information, see the article [Unicode and Multibyte Character Set (MBCS) Support](../atl-mfc-shared/unicode-and-multibyte-character-set-mbcs-support.md).
-A `CString` object can store up to INT_MAX (2,147,483,647) characters. The TCHAR data type is used to get or set individual characters inside a `CString` object. Unlike character arrays, the `CString` class has a built-in memory allocation capability. This allows `CString` objects to automatically grow as needed (that is, you do not have to worry about growing a `CString` object to fit longer strings).
+A `CString` object can store up to `INT_MAX` (2,147,483,647) characters. The `TCHAR` data type is used to get or set individual characters inside a `CString` object. Unlike character arrays, the `CString` class has a built-in memory allocation capability. This allows `CString` objects to automatically grow as needed (that is, you don't have to worry about growing a `CString` object to fit longer strings).
-## CStrings and const char Pointers
+## `CStrings` and `const char` Pointers
-A `CString` object also can act like a literal C-style string (an `PCXSTR`, which is the same as **const char**\* if not under Unicode). The [CSimpleStringT::operator PCXSTR](../atl-mfc-shared/reference/csimplestringt-class.md#operator_pcxstr) conversion operator allows `CString` objects to be freely substituted for character pointers in function calls. The **CString( LPCWSTR** `pszSrc` **)** constructor allows character pointers to be substituted for `CString` objects.
+A `CString` object also can act like a literal C-style string (an `PCXSTR`, which is the same as `const char*` if not under Unicode). The [`CSimpleStringT::operator PCXSTR`](../atl-mfc-shared/reference/csimplestringt-class.md#operator_pcxstr) conversion operator allows `CString` objects to be freely substituted for character pointers in function calls. The `CString(LPCWSTR pszSrc)` constructor allows character pointers to be substituted for `CString` objects.
-No attempt is made to fold `CString` objects. If you make two `CString` objects containing `Chicago`, for example, the characters in `Chicago` are stored in two places. (This may not be true of future versions of MFC, so you should not depend on it.)
+No attempt is made to fold `CString` objects. If you make two `CString` objects containing `Chicago`, for example, the characters in `Chicago` are stored in two places. (This may not be true of future versions of MFC, so you shouldn't depend on it.)
> [!NOTE]
-> Use the [CSimpleStringT::GetBuffer](../atl-mfc-shared/reference/csimplestringt-class.md#getbuffer) and [CSimpleStringT::ReleaseBuffer](../atl-mfc-shared/reference/csimplestringt-class.md#releasebuffer) member functions when you need to directly access a `CString` as a nonconstant pointer to a character.
+> Use the [`CSimpleStringT::GetBuffer`](../atl-mfc-shared/reference/csimplestringt-class.md#getbuffer) and [`CSimpleStringT::ReleaseBuffer`](../atl-mfc-shared/reference/csimplestringt-class.md#releasebuffer) member functions when you need to directly access a `CString` as a nonconstant pointer to a character.
> [!NOTE]
-> Use the [CStringT::AllocSysString](../atl-mfc-shared/reference/cstringt-class.md#allocsysstring) and [CStringT::SetSysString](../atl-mfc-shared/reference/cstringt-class.md#setsysstring) member functions to allocate and set BSTR objects used in Automation (formerly known as OLE Automation).
+> Use the [`CStringT::AllocSysString`](../atl-mfc-shared/reference/cstringt-class.md#allocsysstring) and [`CStringT::SetSysString`](../atl-mfc-shared/reference/cstringt-class.md#setsysstring) member functions to allocate and set `BSTR` objects used in Automation (formerly known as OLE Automation).
> [!NOTE]
> Where possible, allocate `CString` objects on the frame rather than on the heap. This saves memory and simplifies parameter passing.
-The `CString` class is not implemented as a Microsoft Foundation Class Library collection class, though `CString` objects can certainly be stored as elements in collections.
+The `CString` class isn't implemented as a Microsoft Foundation Class Library collection class, though `CString` objects can certainly be stored as elements in collections.
-## CString Reference Counting
+## `CString` Reference Counting
-As of MFC version 4.0, when [CStringT Class](../atl-mfc-shared/reference/cstringt-class.md) objects are copied, MFC increments a reference count rather than copying the data. This makes passing parameters by value and returning `CString` objects by value more efficient. These operations cause the copy constructor to be called, sometimes more than once. Incrementing a reference count reduces that overhead for these common operations and makes using `CString` a more attractive option.
+As of MFC version 4.0, when [`CStringT` Class](../atl-mfc-shared/reference/cstringt-class.md) objects are copied, MFC increments a reference count rather than copying the data. This makes passing parameters by value and returning `CString` objects by value more efficient. These operations cause the copy constructor to be called, sometimes more than once. Incrementing a reference count reduces that overhead for these common operations and makes using `CString` a more attractive option.
-As each copy is destroyed, the reference count in the original object is decremented. The original `CString` object is not destroyed until its reference count is reduced to zero.
+As each copy is destroyed, the reference count in the original object is decremented. The original `CString` object isn't destroyed until its reference count is reduced to zero.
-You can use the `CString` member functions [CSimpleStringT::LockBuffer](../atl-mfc-shared/reference/csimplestringt-class.md#lockbuffer) and [CSimpleStringT::UnlockBuffer](../atl-mfc-shared/reference/csimplestringt-class.md#unlockbuffer) to disable or enable reference counting.
+You can use the `CString` member functions [`CSimpleStringT::LockBuffer`](../atl-mfc-shared/reference/csimplestringt-class.md#lockbuffer) and [`CSimpleStringT::UnlockBuffer`](../atl-mfc-shared/reference/csimplestringt-class.md#unlockbuffer) to disable or enable reference counting.
## See also
diff --git a/docs/atl-mfc-shared/strings-atl-mfc.md b/docs/atl-mfc-shared/strings-atl-mfc.md
index 9ca8653328..1c0b4515fa 100644
--- a/docs/atl-mfc-shared/strings-atl-mfc.md
+++ b/docs/atl-mfc-shared/strings-atl-mfc.md
@@ -1,8 +1,8 @@
---
+description: "Learn more about: Strings (ATL/MFC)"
title: "Strings (ATL-MFC)"
ms.date: "11/04/2016"
helpviewer_keywords: ["const char pointers", "strings [C++], in ATL", "MFC [C++], string handling class", "MBCS [C++], CString support", "strings [C++], class CStringT", "char pointers", "reference counting [C++]", "strings [C++], string operations", "portability [C++], Unicode and ANSI string objects", "literal strings [C++], class CString", "copying string objects", "ATL, string handling class", "strings [C++], in MFC", "strings [C++]", "C-style strings", "language portability [C++]", "strings [C++], class CString", "literal strings [C++], class CStringT"]
-ms.assetid: 3b33125b-1684-4542-a3a7-b00de7d0419e
---
# Strings (ATL/MFC)
@@ -10,18 +10,18 @@ Nearly all programs work with string data. Visual C++ provides several ways to m
## In This Section
-[Using CStringT](../atl-mfc-shared/using-cstringt.md)
-Describes programming using the template class CStringT.
+[Using `CStringT`](../atl-mfc-shared/using-cstringt.md)\
+Describes programming using the template class `CStringT`.
-[Using CString](../atl-mfc-shared/using-cstring.md)
-Describes programming using CString, the default implementation of CStringT.
+[Using `CString`](../atl-mfc-shared/using-cstring.md)\
+Describes programming using `CString`, the default implementation of `CStringT`.
## Related Sections
-[CStringT Overview](../atl-mfc-shared/reference/cstringt-class.md)
+[`CStringT` Overview](../atl-mfc-shared/reference/cstringt-class.md)\
Provides reference information about the shared `CStringT` class.
-[MFC Concepts](../mfc/mfc-concepts.md)
+[MFC Concepts](../mfc/mfc-concepts.md)\
Provides conceptual and task-based topics to help you program using the MFC Library.
## See also
diff --git a/docs/atl-mfc-shared/toc.yml b/docs/atl-mfc-shared/toc.yml
index dbc065eaca..39bdbdcbe9 100644
--- a/docs/atl-mfc-shared/toc.yml
+++ b/docs/atl-mfc-shared/toc.yml
@@ -1,3 +1,4 @@
+items:
- name: ATL-MFC shared classes
href: ../atl-mfc-shared/atl-mfc-shared-classes.md
- name: ATL-MFC concepts
diff --git a/docs/atl-mfc-shared/unicode-and-multibyte-character-set-mbcs-support.md b/docs/atl-mfc-shared/unicode-and-multibyte-character-set-mbcs-support.md
index 849f8d788f..2ba1928aa6 100644
--- a/docs/atl-mfc-shared/unicode-and-multibyte-character-set-mbcs-support.md
+++ b/docs/atl-mfc-shared/unicode-and-multibyte-character-set-mbcs-support.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Unicode and Multibyte Character Set (MBCS) Support"
title: "Unicode and Multibyte Character Set (MBCS) Support"
ms.date: "01/09/2017"
helpviewer_keywords: ["MFC [C++], character set support", "MBCS [C++], strings and MFC support", "strings [C++], MBCS support in MFC", "character sets [C++], multibyte", "Unicode [C++], MFC strings", "Unicode [C++], string objects", "strings [C++], Unicode", "strings [C++], character set support"]
@@ -7,45 +8,69 @@ helpviewer_keywords: ["MFC [C++], character set support", "MBCS [C++], strings a
Some languages, for example, Japanese and Chinese, have large character sets. To support programming for these markets, the Microsoft Foundation Class Library (MFC) enables two different approaches to handling large character sets:
-- [Unicode](#mfc-support-for-unicode-strings), **`wchar_t`** based wide-characters and strings encoded as UTF-16.
+- [Unicode](#mfc-support-for-unicode-strings), **`wchar_t`** based wide-characters, and strings encoded as UTF-16.
- [Multibyte Character Sets (MBCS)](#mfc-support-for-mbcs-strings), **`char`** based single or double-byte characters and strings encoded in a locale-specific character set.
-Microsoft has recommended the MFC Unicode libraries for all new development, and the MBCS libraries were deprecated in Visual Studio 2013 and Visual Studio 2015. This is no longer the case. The MBCS deprecation warnings have been removed in Visual Studio 2017.
+> [!NOTE]
+> Microsoft recommends the MFC Unicode libraries for all new development.\
+> The MBCS libraries were deprecated in Visual Studio 2013 and Visual Studio 2015. This is no longer the case.\
+> Starting with Visual Studio 2017, the MBCS libraries are no longer deprecated and don't generate deprecation warnings.
## MFC Support for Unicode Strings
-The entire MFC class library is conditionally enabled for Unicode characters and strings stored in wide characters as UTF-16. In particular, class [CString](../atl-mfc-shared/reference/cstringt-class.md) is Unicode-enabled.
+The entire MFC class library is conditionally enabled for Unicode characters and strings stored in wide characters as UTF-16. In particular, class [`CString`](../atl-mfc-shared/reference/cstringt-class.md) is Unicode-enabled.
These library, debugger, and DLL files are used to support Unicode in MFC:
-|||||
-|-|-|-|-|
-|UAFXCW.LIB|UAFXCW.PDB|UAFXCWD.LIB|UAFXCWD.PDB|
-|MFC*version*U.LIB|MFC*version*U.PDB|MFC*version*U.DLL|MFC*version*UD.LIB|
-|MFC*version*UD.PDB|MFC*version*UD.DLL|MFCS*version*U.LIB|MFCS*version*U.PDB|
-|MFCS*version*UD.LIB|MFCS*version*UD.PDB|MFCM*version*U.LIB|MFCM*version*U.PDB|
-|MFCM*version*U.DLL|MFCM*version*UD.LIB|MFCM*version*UD.PDB|MFCM*version*UD.DLL|
+:::row:::
+ :::column span="":::
+ MFC*version*U.LIB\
+ MFC*version*UD.LIB\
+ MFCM*version*U.LIB\
+ MFCM*version*UD.LIB\
+ MFCS*version*U.LIB\
+ MFCS*version*UD.LIB\
+ UAFXCW.LIB\
+ UAFXCWD.LIB
+ :::column-end:::
+ :::column span="":::
+ MFC*version*U.PDB\
+ MFC*version*UD.PDB\
+ MFCM*version*U.PDB\
+ MFCM*version*UD.PDB\
+ MFCS*version*U.PDB\
+ MFCS*version*UD.PDB\
+ UAFXCW.PDB\
+ UAFXCWD.PDB
+ :::column-end:::
+ :::column span="":::
+ MFC*version*U.DLL\
+ MFC*version*UD.DLL\
+ MFCM*version*U.DLL\
+ MFCM*version*UD.DLL
+ :::column-end:::
+:::row-end:::
(*version* represents the version number of the file; for example, '140' means version 14.0.)
-`CString` is based on the TCHAR data type. If the symbol _UNICODE is defined for a build of your program, TCHAR is defined as type **`wchar_t`**, a 16-bit character encoding type. Otherwise, TCHAR is defined as **`char`**, the normal 8-bit character encoding. Therefore, under Unicode, a `CString` is composed of 16-bit characters. Without Unicode, it is composed of characters of type **`char`**.
+`CString` is based on the `TCHAR` data type. If the symbol `_UNICODE` is defined for a build of your program, `TCHAR` is defined as type **`wchar_t`**, a 16-bit character encoding type. Otherwise, `TCHAR` is defined as **`char`**, the normal 8-bit character encoding. Therefore, under Unicode, a `CString` is composed of 16-bit characters. Without Unicode, it's composed of characters of type **`char`**.
To complete Unicode programming of your application, you must also:
-- Use the _T macro to conditionally code literal strings to be portable to Unicode.
+- Use the `_T` macro to conditionally code literal strings to be portable to Unicode.
-- When you pass strings, pay attention to whether function arguments require a length in characters or a length in bytes. The difference is important if you are using Unicode strings.
+- When you pass strings, pay attention to whether function arguments require a length in characters or a length in bytes. The difference is important if you're using Unicode strings.
- Use portable versions of the C run-time string-handling functions.
- Use the following data types for characters and character pointers:
- - Use TCHAR where you would use **`char`**.
+ - Use `TCHAR` where you would use **`char`**.
- - Use LPTSTR where you would use **`char`**\*.
+ - Use `LPTSTR` where you would use **`char`**\*.
- - Use LPCTSTR where you would use **const char**\*. `CString` provides the operator LPCTSTR to convert between `CString` and LPCTSTR.
+ - Use `LPCTSTR` where you would use **`const char`**\*. `CString` provides the operator `LPCTSTR` to convert between `CString` and `LPCTSTR`.
`CString` also supplies Unicode-aware constructors, assignment operators, and comparison operators.
@@ -55,29 +80,29 @@ The [Run-Time Library Reference](../c-runtime-library/c-run-time-library-referen
The class library is also enabled for multibyte character sets, but only for double-byte character sets (DBCS).
-In a multibyte character set, a character can be one or two bytes wide. If it is two bytes wide, its first byte is a special "lead byte" that is chosen from a particular range, depending on which code page is in use. Taken together, the lead and "trail bytes" specify a unique character encoding.
+In a multibyte character set, a character can be one or 2 bytes wide. If it's 2 bytes wide, its first byte is a special "lead byte" that is chosen from a particular range, depending on which code page is in use. Taken together, the lead and "trail bytes" specify a unique character encoding.
-If the symbol _MBCS is defined for a build of your program, type TCHAR, on which `CString` is based, maps to **`char`**. It is up to you to determine which bytes in a `CString` are lead bytes and which are trail bytes. The C run-time library supplies functions to help you determine this.
+If the symbol `_MBCS` is defined for a build of your program, type `TCHAR`, on which `CString` is based, maps to **`char`**. It's up to you to determine which bytes in a `CString` are lead bytes and which are trail bytes. The C run-time library supplies functions to help you determine this.
Under DBCS, a given string can contain all single-byte ANSI characters, all double-byte characters, or a combination of the two. These possibilities require special care in parsing strings. This includes `CString` objects.
> [!NOTE]
> Unicode string serialization in MFC can read both Unicode and MBCS strings regardless of which version of the application that you are running. Your data files are portable between Unicode and MBCS versions of your program.
-`CString` member functions use special "generic text" versions of the C run-time functions they call, or they use Unicode-aware functions. Therefore, for example, if a `CString` function would typically call `strcmp`, it calls the corresponding generic-text function `_tcscmp` instead. Depending on how the symbols _MBCS and _UNICODE are defined, `_tcscmp` maps as follows:
+`CString` member functions use special "generic text" versions of the C run-time functions they call, or they use Unicode-aware functions. Therefore, for example, if a `CString` function would typically call `strcmp`, it calls the corresponding generic-text function `_tcscmp` instead. Depending on how the symbols `_MBCS` and `_UNICODE` are defined, `_tcscmp` maps as follows:
-|||
+|Symbols|Function|
|-|-|
-|_MBCS defined|`_mbscmp`|
-|_UNICODE defined|`wcscmp`|
+|`_MBCS` defined|`_mbscmp`|
+|`_UNICODE` defined|`wcscmp`|
|Neither symbol defined|`strcmp`|
> [!NOTE]
-> The symbols _MBCS and _UNICODE are mutually exclusive.
+> The symbols `_MBCS` and `_UNICODE` are mutually exclusive.
Generic-text function mappings for all of the run-time string-handling routines are discussed in [C Run-Time Library Reference](../c-runtime-library/c-run-time-library-reference.md). For a list, see [Internationalization](../c-runtime-library/internationalization.md).
-Similarly, `CString` methods are implemented by using generic data type mappings. To enable both MBCS and Unicode, MFC uses TCHAR for **`char`** or **`wchar_t`**, LPTSTR for **`char`**\* or `wchar_t*`, and LPCTSTR for **const char**\* or `const wchar_t*`. These ensure the correct mappings for either MBCS or Unicode.
+Similarly, `CString` methods are implemented by using generic data type mappings. To enable both MBCS and Unicode, MFC uses `TCHAR` for **`char`** or **`wchar_t`**, `LPTSTR` for **`char`**\* or `wchar_t*`, and `LPCTSTR` for **`const char`**\* or `const wchar_t*`. These ensure the correct mappings for either MBCS or Unicode.
## See also
diff --git a/docs/atl-mfc-shared/using-cstring.md b/docs/atl-mfc-shared/using-cstring.md
index bd2f1df95e..f6a99466fc 100644
--- a/docs/atl-mfc-shared/using-cstring.md
+++ b/docs/atl-mfc-shared/using-cstring.md
@@ -1,20 +1,21 @@
---
+description: "Learn more about: Using CString"
title: "Using CString"
ms.date: "06/18/2018"
helpviewer_keywords: ["CString objects, C++ string manipulation", "CString objects, reference counting", "CString class (Visual C++)"]
ms.assetid: ed018aaf-8b10-46f9-828c-f9c092dc7609
---
-# Using CString
+# Using `CString`
-The topics in this section describe how to program with `CString`. For reference documentation about the `CString` class, see the documentation for [CStringT](../atl-mfc-shared/reference/cstringt-class.md).
+The topics in this section describe how to program with `CString`. For reference documentation about the `CString` class, see the documentation for [`CStringT`](../atl-mfc-shared/reference/cstringt-class.md).
To use `CString`, include the `atlstr.h` header.
-The `CString`, `CStringA`, and `CStringW` classes are specializations of a class template called [CStringT](../atl-mfc-shared/reference/cstringt-class.md) based on the type of character data they support.
+The `CString`, `CStringA`, and `CStringW` classes are specializations of a class template called [`CStringT`](../atl-mfc-shared/reference/cstringt-class.md) based on the type of character data they support.
A `CStringW` object contains the **`wchar_t`** type and supports Unicode strings. A `CStringA` object contains the **`char`** type, and supports single-byte and multi-byte (MBCS) strings. A `CString` object supports either the **`char`** type or the **`wchar_t`** type, depending on whether the MBCS symbol or the UNICODE symbol is defined at compile time.
-A `CString` object keeps character data in a `CStringData` object. `CString` accepts NULL-terminated C-style strings. `CString` tracks the string length for faster performance, but it also retains the NULL character in the stored character data to support conversion to LPCWSTR. `CString` includes the null terminator when it exports a C-style string. You can insert a NULL at other locations in a `CString`, but it may produce unexpected results.
+A `CString` object keeps character data in a `CStringData` object. `CString` accepts NULL-terminated C-style strings. `CString` tracks the string length for faster performance, but it also retains the `NULL` character in the stored character data to support conversion to `LPCWSTR`. `CString` includes the null terminator when it exports a C-style string. You can insert a `NULL` at other locations in a `CString`, but it may produce unexpected results.
The following set of string classes can be used without linking an MFC library, with or without CRT support: `CAtlString`, `CAtlStringA`, and `CAtlStringW`.
@@ -35,7 +36,7 @@ int main() {
## In This Section
-[Basic CString Operations](../atl-mfc-shared/basic-cstring-operations.md)
+[Basic `CString` Operations](../atl-mfc-shared/basic-cstring-operations.md)
Describes basic `CString` operations, including creating objects from C literal strings, accessing individual characters in a `CString`, concatenating two objects, and comparing `CString` objects.
[String Data Management](../atl-mfc-shared/string-data-management.md)
@@ -47,24 +48,24 @@ Explains how `CString` objects are used.
[CString Operations Relating to C-Style Strings](../atl-mfc-shared/cstring-operations-relating-to-c-style-strings.md)
Describes manipulating the contents of a `CString` object like a C-style null-terminated string.
-[Allocating and Releasing Memory for a BSTR](../atl-mfc-shared/allocating-and-releasing-memory-for-a-bstr.md)
-Discusses using memory for a BSTR and COM objects.
+[Allocating and Releasing Memory for a `BSTR`](../atl-mfc-shared/allocating-and-releasing-memory-for-a-bstr.md)
+Discusses using memory for a `BSTR` and COM objects.
[CString Exception Cleanup](../atl-mfc-shared/cstring-exception-cleanup.md)
Explains that explicit cleanup in MFC 3.0 and later is no longer necessary.
[CString Argument Passing](../atl-mfc-shared/cstring-argument-passing.md)
-Explains how to pass CString objects to functions and how to return `CString` objects from functions.
+Explains how to pass `CString` objects to functions and how to return `CString` objects from functions.
[Unicode and Multibyte Character Set (MBCS) Support](../atl-mfc-shared/unicode-and-multibyte-character-set-mbcs-support.md)
Discusses how MFC is enabled for Unicode and MBCS support.
## Reference
-[CStringT](../atl-mfc-shared/reference/cstringt-class.md)
+[`CStringT`](../atl-mfc-shared/reference/cstringt-class.md)
Provides reference information about the `CStringT` class.
-[CSimpleStringT Class](../atl-mfc-shared/reference/csimplestringt-class.md)
+[`CSimpleStringT` Class](../atl-mfc-shared/reference/csimplestringt-class.md)
Provides reference information about the `CSimpleStringT` class.
## Related Sections
diff --git a/docs/atl-mfc-shared/using-cstringt.md b/docs/atl-mfc-shared/using-cstringt.md
index d864be8de8..e7232579f8 100644
--- a/docs/atl-mfc-shared/using-cstringt.md
+++ b/docs/atl-mfc-shared/using-cstringt.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Using CStringT"
title: "Using CStringT"
ms.date: "11/04/2016"
helpviewer_keywords: ["CStringT class, using"]
diff --git a/docs/atl/active-template-library-atl-concepts.md b/docs/atl/active-template-library-atl-concepts.md
index cbdf4011ce..cda405159a 100644
--- a/docs/atl/active-template-library-atl-concepts.md
+++ b/docs/atl/active-template-library-atl-concepts.md
@@ -1,14 +1,16 @@
---
+description: "Learn more about: Active Template Library (ATL) Concepts"
title: "Active Template Library (ATL) Concepts"
ms.date: "05/06/2019"
helpviewer_keywords: ["ATL, about ATL"]
ms.assetid: a3960991-4d76-4da5-9568-3fa7fde53ff4
+ms.topic: concept-article
---
# Active Template Library (ATL) Concepts
The Active Template Library (ATL) is a set of template-based C++ classes that let you create small, fast Component Object Model (COM) objects. It has special support for key COM features, including stock implementations, dual interfaces, standard COM enumerator interfaces, connection points, tear-off interfaces, and ActiveX controls.
-If you do a lot of ATL programming, you will want to learn more about COM and .NET attributes, which is designed to simplify COM programming. For more information, see [Attributed Programming](../windows/attributed-programming-concepts.md). (COM and .NET attributes are not to be confused with the \[\[attribute]] feature in the C++ standard.)
+If you do a lot of ATL programming, you will want to learn more about COM and .NET attributes, which is designed to simplify COM programming. For more information, see [Attributed Programming](../windows/attributes/cpp-attributes-com-net.md). (COM and .NET attributes are not to be confused with the \[\[attribute]] feature in the C++ standard.)
## In This Section
@@ -27,7 +29,7 @@ Describes the implementation and creation of collections and enumerators in ATL.
[Composite Control Fundamentals](atl-composite-control-fundamentals.md)
Provides step-by-step instructions for creating a composite control. A composite control is a type of ActiveX control that can contain other ActiveX controls or Windows controls.
-[ATL Control Containment FAQ](atl-control-containment-faq.md)
+[ATL Control Containment FAQ](atl-control-containment-faq.yml)
Covers the fundamental questions related to hosting controls with ATL.
[ATL COM Property Pages](atl-com-property-pages.md)
@@ -89,7 +91,7 @@ Contains information on the ATL Project Wizard.
[ATL Control Wizard](reference/atl-control-wizard.md)
Discusses how to add classes.
-[Attributed Programming](../windows/attributed-programming-concepts.md)
+[Attributed Programming](../windows/attributes/cpp-attributes-com-net.md)
Provides an overview on using attributes to simplify COM programming plus a list of links to more detailed topics.
[ATL Class Overview](atl-class-overview.md)
diff --git a/docs/atl/active-template-library-atl-tutorial.md b/docs/atl/active-template-library-atl-tutorial.md
index 52c536ff96..2a9841ea00 100644
--- a/docs/atl/active-template-library-atl-tutorial.md
+++ b/docs/atl/active-template-library-atl-tutorial.md
@@ -5,6 +5,7 @@ ms.custom: "get-started-article"
ms.date: "05/03/2019"
helpviewer_keywords: ["ATL projects, tutorials", "controls [ATL], tutorials", "ATL tutorial", "tutorials [ATL]", "ATL, tutorials"]
ms.assetid: f921a121-09c8-4812-9317-e15b2f1471fa
+ms.topic: tutorial
---
# Active Template Library (ATL) Tutorial
diff --git a/docs/atl/adding-a-control-atl-tutorial-part-2.md b/docs/atl/adding-a-control-atl-tutorial-part-2.md
index 79d232829e..668cb2039f 100644
--- a/docs/atl/adding-a-control-atl-tutorial-part-2.md
+++ b/docs/atl/adding-a-control-atl-tutorial-part-2.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Adding a Control (ATL Tutorial, Part 2)"
title: "Adding a Control (ATL Tutorial, Part 2)"
ms.custom: "get-started-article"
ms.date: "08/19/2019"
ms.assetid: c9575a75-1064-41f1-9697-7aada560c669
+ms.topic: tutorial
---
# Adding a Control (ATL Tutorial, Part 2)
@@ -108,7 +110,7 @@ Now you can build the control to see it in action.
Next, you'll add a custom property to the control.
-[Back to Step 1](../atl/creating-the-project-atl-tutorial-part-1.md) | [On to Step 3](../atl/adding-a-property-to-the-control-atl-tutorial-part-3.md)
+[Back to Step 1](../atl/creating-the-project-atl-tutorial-part-1.md) \| [On to Step 3](../atl/adding-a-property-to-the-control-atl-tutorial-part-3.md)
## See also
diff --git a/docs/atl/adding-a-property-page-atl-tutorial-part-6.md b/docs/atl/adding-a-property-page-atl-tutorial-part-6.md
index 33d3bb8244..394d9aff8d 100644
--- a/docs/atl/adding-a-property-page-atl-tutorial-part-6.md
+++ b/docs/atl/adding-a-property-page-atl-tutorial-part-6.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Adding a Property Page (ATL Tutorial, Part 6)"
title: "Adding a Property Page (ATL Tutorial, Part 6)"
ms.custom: "get-started-article"
ms.date: "09/27/2018"
ms.assetid: df80d255-e7ea-49d9-b940-3f012e90cf9b
+ms.topic: tutorial
---
# Adding a Property Page (ATL Tutorial, Part 6)
@@ -141,7 +143,7 @@ The **Apply** button is initially disabled. Start typing a value in the **Sides*
Next, you will put your control on a Web page.
-[Back to Step 5](../atl/adding-an-event-atl-tutorial-part-5.md) | [On to Step 7](../atl/putting-the-control-on-a-web-page-atl-tutorial-part-7.md)
+[Back to Step 5](../atl/adding-an-event-atl-tutorial-part-5.md) \| [On to Step 7](../atl/putting-the-control-on-a-web-page-atl-tutorial-part-7.md)
## See also
diff --git a/docs/atl/adding-a-property-to-the-control-atl-tutorial-part-3.md b/docs/atl/adding-a-property-to-the-control-atl-tutorial-part-3.md
index 26adb48cad..839a2653ed 100644
--- a/docs/atl/adding-a-property-to-the-control-atl-tutorial-part-3.md
+++ b/docs/atl/adding-a-property-to-the-control-atl-tutorial-part-3.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Adding a Property to the Control (ATL Tutorial, Part 3)"
title: "Adding a Property to the Control (ATL Tutorial, Part 3)"
ms.custom: "get-started-article"
ms.date: "09/26/2018"
ms.assetid: f775fe34-103b-4f07-9999-400e987ee030
+ms.topic: tutorial
---
# Adding a Property to the Control (ATL Tutorial, Part 3)
@@ -56,7 +58,7 @@ The `get_Sides` method returns the current value of the `Sides` property through
You now have a property called `Sides`. In the next step, you will change the drawing code to use it.
-[Back to Step 2](../atl/adding-a-control-atl-tutorial-part-2.md) | [On to Step 4](../atl/changing-the-drawing-code-atl-tutorial-part-4.md)
+[Back to Step 2](../atl/adding-a-control-atl-tutorial-part-2.md) \| [On to Step 4](../atl/changing-the-drawing-code-atl-tutorial-part-4.md)
## See also
diff --git a/docs/atl/adding-an-atl-message-handler.md b/docs/atl/adding-an-atl-message-handler.md
index f19399bf29..ee2243126a 100644
--- a/docs/atl/adding-an-atl-message-handler.md
+++ b/docs/atl/adding-an-atl-message-handler.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Adding an ATL Message Handler"
title: "Adding an ATL Message Handler"
ms.date: "11/04/2016"
helpviewer_keywords: ["message handlers [C++]", "ATL, windows", "message handling [C++], ATL message handler", "windows [C++], ATL", "ATL, message handlers"]
ms.assetid: cdea38a1-0d9b-4f8d-bbd5-b4f063fb3eeb
+ms.topic: concept-article
---
# Adding an ATL Message Handler
diff --git a/docs/atl/adding-an-event-atl-tutorial-part-5.md b/docs/atl/adding-an-event-atl-tutorial-part-5.md
index 68cfe2c834..48d9ef8f01 100644
--- a/docs/atl/adding-an-event-atl-tutorial-part-5.md
+++ b/docs/atl/adding-an-event-atl-tutorial-part-5.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Adding an Event (ATL Tutorial, Part 5)"
title: "Adding an Event (ATL Tutorial, Part 5)"
ms.custom: "get-started-article"
ms.date: "09/27/2018"
ms.assetid: 2de12022-3148-4ce3-8606-8a9d4274f0e9
+ms.topic: tutorial
---
# Adding an Event (ATL Tutorial, Part 5)
@@ -148,7 +150,7 @@ Now try out your events. Build the control and start the ActiveX Control Test Co
Next, you will add a property page.
-[Back to Step 4](../atl/changing-the-drawing-code-atl-tutorial-part-4.md) | [On to Step 6](../atl/adding-a-property-page-atl-tutorial-part-6.md)
+[Back to Step 4](../atl/changing-the-drawing-code-atl-tutorial-part-4.md) \| [On to Step 6](../atl/adding-a-property-page-atl-tutorial-part-6.md)
## See also
diff --git a/docs/atl/adding-connection-points-to-an-object.md b/docs/atl/adding-connection-points-to-an-object.md
index c54bfb9d14..d2564c44cd 100644
--- a/docs/atl/adding-connection-points-to-an-object.md
+++ b/docs/atl/adding-connection-points-to-an-object.md
@@ -1,57 +1,55 @@
---
title: "Adding Connection Points to an Object"
-ms.date: "11/04/2016"
+description: "Learn more about: Adding Connection Points to an Object"
+ms.date: 11/04/2016
helpviewer_keywords: ["connection points [C++], adding to ATL objects", "Implement Connection Point ATL wizard"]
-ms.assetid: 843531be-4a36-4db0-9d54-e029b1a72a8b
+ms.topic: how-to
---
# Adding Connection Points to an Object
-The [ATL Tutorial](../atl/active-template-library-atl-tutorial.md) demonstrates how to create a control with support for connection points, how to add events, and then how to implement the connection point. ATL implements connection points with the [IConnectionPointImpl](../atl/reference/iconnectionpointimpl-class.md) class.
+The [ATL Tutorial](active-template-library-atl-tutorial.md) demonstrates how to create a control with support for connection points, how to add events, and then how to implement the connection point. ATL implements connection points with the [`IConnectionPointImpl`](reference/iconnectionpointimpl-class.md) class.
To implement a connection point, you have two choices:
- Implement your own outgoing event source, by adding a connection point to the control or object.
-
- Reuse a connection point interface defined in another type library.
-In either case, the Implement Connection Point Wizard uses a type library to do its work.
+In either case, the **Implement Connection Point Wizard** uses a type library to do its work.
-### To add a connection point to a control or object
+### Add a connection point to a control or object
-1. Define a dispinterface in the library block of the .idl file. If you enabled support for connection points when you created the control with the ATL Control Wizard, the dispinterface will already be created. If you did not enable support for connection points when you created the control, you must manually add a dispinterface to the .idl file. The following is an example of a dispinterface. Outgoing interfaces are not required to be dispatch interfaces but many scripting languages such as VBScript and JScript require this, so this example uses two dispinterfaces:
+1. Define a dispinterface in the library block of the `.idl` file. If you enabled support for connection points when you created the control with the **ATL Control Wizard**, the dispinterface will already be created. If you did not enable support for connection points when you created the control, you must manually add a dispinterface to the `.idl` file. The following is an example of a dispinterface. Outgoing interfaces are not required to be dispatch interfaces but many scripting languages such as VBScript and JScript require this, so this example uses two dispinterfaces:
- [!code-cpp[NVC_ATL_Windowing#81](../atl/codesnippet/cpp/adding-connection-points-to-an-object_1.idl)]
+ [!code-cpp[NVC_ATL_Windowing#81](codesnippet/cpp/adding-connection-points-to-an-object_1.idl)]
- Use either the uuidgen.exe or guidgen.exe utility to generate a GUID.
+ Use either the `uuidgen.exe` or `guidgen.exe` utility to generate a GUID.
-2. Add the dispinterface as the `[default,source]` interface in the coclass for the object in the project's .idl file. Again, if you enabled support for connection points when you created the control, the ATL Control Wizard will create the `[default,source`] entry. To manually add this entry, add the line in bold:
+2. Add the dispinterface as the `[default,source]` interface in the coclass for the object in the project's `.idl` file. Again, if you enabled support for connection points when you created the control, the ATL Control Wizard will create the `[default,source]` entry. To manually add this entry, add the line in bold:
- [!code-cpp[NVC_ATL_Windowing#82](../atl/codesnippet/cpp/adding-connection-points-to-an-object_2.idl)]
+ [!code-cpp[NVC_ATL_Windowing#82](codesnippet/cpp/adding-connection-points-to-an-object_2.idl)]
- See the .idl file in the [Circ](../overview/visual-cpp-samples.md) ATL sample for an example.
+ See the `.idl` file in the [Circ](../overview/visual-cpp-samples.md) ATL sample for an example.
-3. Use Class View to add methods and properties to the event interface. Right-click the class in Class View, point to **Add** on the shortcut menu, and click **Add Connection Point**.
+3. Use **Class View** to add methods and properties to the event interface. Right-click the class in **Class View**, point to **Add** on the shortcut menu, and select **Add Connection Point**.
-4. In the **Source Interfaces** list box of the Implement Connection Point Wizard, select **Project's interfaces**. If you choose an interface for your control and press **OK**, you will:
+4. In the **Source Interfaces** list box of the **Implement Connection Point Wizard**, select **Project's interfaces**. If you choose an interface for your control and select **OK**, you:
- Generate a header file with an event proxy class that implements the code that will make the outgoing calls for the event.
-
- Add an entry to the connection point map.
- You will also see a list of all of the type libraries on your computer. You should only use one of these other type libraries to define your connection point if you want to implement the exact same outgoing interface found in another type library.
-
-### To reuse a connection point interface defined in another type library
+ You also see a list of all of the type libraries on your computer. Only use one of these other type libraries to define your connection point if you want to implement the exact same outgoing interface found in another type library.
-1. In Class View, right-click a class that implements a **BEGIN_COM_MAP** macro, point to **Add** on the shortcut menu, and click **Add Connection Point**.
+### Reuse a connection point interface defined in another type library
-2. In the Implement Connection Point Wizard, select a type library and an interface in the type library and click **Add**.
+1. In **Class View**, right-click a class that implements a `BEGIN_COM_MAP` macro, point at **Add** on the shortcut menu, and select **Add Connection Point**.
-3. Edit the .idl file to either:
+2. In the **Implement Connection Point Wizard**, select a type library and an interface in the type library and select **Add**.
- - Copy the dispinterface from the .idl file for the object whose event-source is being used.
+3. Edit the `.idl` file to either:
+ - Copy the dispinterface from the `.idl` file for the object whose event-source is being used.
- Use the **importlib** instruction on that type library.
## See also
-[Connection Point](../atl/atl-connection-points.md)
+[Connection Point](atl-connection-points.md)
diff --git a/docs/atl/adding-functionality-to-the-composite-control.md b/docs/atl/adding-functionality-to-the-composite-control.md
index 465323db85..3576620945 100644
--- a/docs/atl/adding-functionality-to-the-composite-control.md
+++ b/docs/atl/adding-functionality-to-the-composite-control.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Adding Functionality to the Composite Control"
title: "Adding Functionality to the Composite Control"
ms.date: "11/04/2016"
helpviewer_keywords: ["event handlers [C++], ActiveX controls", "composite controls, handling events", "ActiveX controls [C++], events"]
ms.assetid: 98f85681-9564-480d-af38-03f9733fe58b
+ms.topic: concept-article
---
# Adding Functionality to the Composite Control
diff --git a/docs/atl/aggregation.md b/docs/atl/aggregation.md
index d6491b1b4e..36c510daf3 100644
--- a/docs/atl/aggregation.md
+++ b/docs/atl/aggregation.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Aggregation"
title: "Aggregation"
ms.date: "11/04/2016"
helpviewer_keywords: ["aggregation [C++]", "aggregate objects [C++]"]
diff --git a/docs/atl/atl-and-the-free-threaded-marshaler.md b/docs/atl/atl-and-the-free-threaded-marshaler.md
index c3bb490621..5d5e78c8a6 100644
--- a/docs/atl/atl-and-the-free-threaded-marshaler.md
+++ b/docs/atl/atl-and-the-free-threaded-marshaler.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL and the Free Threaded Marshaler"
title: "ATL and the Free Threaded Marshaler"
ms.date: "11/04/2016"
helpviewer_keywords: ["ATL, free threaded marshaler", "free threaded marshaler", "threading [C++], marshaler in ATL", "threading [ATL], free threaded marshaler", "FTM in ATL"]
diff --git a/docs/atl/atl-class-overview.md b/docs/atl/atl-class-overview.md
index fffa86786c..98846a0de5 100644
--- a/docs/atl/atl-class-overview.md
+++ b/docs/atl/atl-class-overview.md
@@ -1,40 +1,57 @@
---
-title: "ATL Class Overview"
+description: "Learn more about: ATL class overview"
+title: "ATL class overview"
ms.date: "11/04/2016"
helpviewer_keywords: ["classes [C++], ATL", "ATL, class reference"]
ms.assetid: c38ac93d-c3a2-4ce7-8153-f1d34c0f0fa6
+ms.topic: concept-article
---
-# ATL Class Overview
+# ATL class overview
Classes in the Active Template Library (ATL) can be categorized as follows:
-|||
-|-|-|
-|[Class Factories](../atl/class-factories-classes.md)|[Memory Management](../atl/memory-management-classes.md)|
-|[Class Information](../atl/class-information-classes.md)|[MMC Snap-In](../atl/mmc-snap-in-classes.md)|
-|[Collection](../atl/collection-classes.md)|[Object Safety](../atl/object-safety-classes.md)|
-|[COM Modules](../atl/com-modules-classes.md)|[Persistence](../atl/persistence-classes.md)|
-|[Composite Controls](../atl/composite-controls-classes.md)|[Properties and Property Pages](../atl/properties-and-property-pages-classes.md)|
-|[Connection Points](../atl/connection-points-classes.md)|[Registry Support](../atl/registry-support-classes.md)|
-|[Control Containment](../atl/control-containment-classes.md)|[Running Objects](../atl/running-objects-classes.md)|
-|[Controls: General Support](../atl/controls-general-support-classes.md)|[Security](../atl/security-classes.md)|
-|[Data Transfer](../atl/data-transfer-classes.md)|[Service Provider Support](../atl/service-provider-support-classes.md)|
-|[Data Types](../atl/data-types-classes.md)|[Site Information](../atl/site-information-classes.md)|
-|[Debugging and Exception](../atl/debugging-and-exceptions-classes.md)|[String and Text](../atl/string-and-text-classes.md)|
-|[Dual Interfaces](../atl/dual-interfaces-classes.md)|[Tear-Off Interfaces](../atl/tear-off-interfaces-classes.md)|
-|[Enumerators and Collections](../atl/enumerators-and-collections-classes.md)|[Thread Pooling](../atl/thread-pooling-classes.md)|
-|[Error Information](../atl/error-information-classes.md)|[Threading Models and Critical Sections](../atl/threading-models-and-critical-sections-classes.md)|
-|[File Handling](../atl/file-handling-classes.md)|[UI Support](../atl/ui-support-classes.md)|
-|[Interface Pointers](../atl/interface-pointers-classes.md)|[Windows Support](../atl/windows-support-classes.md)|
-|[IUnknown Implementation](../atl/iunknown-implementation-classes.md)|[Utility](../atl/utility-classes.md)|
+[Class factories](../atl/class-factories-classes.md)\
+[Class information](../atl/class-information-classes.md)\
+[Collection](../atl/collection-classes.md)\
+[COM modules](../atl/com-modules-classes.md)\
+[Composite controls](../atl/composite-controls-classes.md)\
+[Connection points](../atl/connection-points-classes.md)\
+[Control containment](../atl/control-containment-classes.md)\
+[Controls: General support](../atl/controls-general-support-classes.md)\
+[Data transfer](../atl/data-transfer-classes.md)\
+[Data types](../atl/data-types-classes.md)\
+[Debugging and exception](../atl/debugging-and-exceptions-classes.md)\
+[Dual interfaces](../atl/dual-interfaces-classes.md)\
+[Enumerators and collections](../atl/enumerators-and-collections-classes.md)\
+[Error information](../atl/error-information-classes.md)\
+[File handling](../atl/file-handling-classes.md)\
+[Interface pointers](../atl/interface-pointers-classes.md)\
+[IUnknown implementation](../atl/iunknown-implementation-classes.md)\
+[Memory management](../atl/memory-management-classes.md)\
+[MMC snap-in](../atl/mmc-snap-in-classes.md)\
+[Object safety](../atl/object-safety-classes.md)\
+[Persistence](../atl/persistence-classes.md)\
+[Properties and property pages](../atl/properties-and-property-pages-classes.md)\
+[Registry support](../atl/registry-support-classes.md)\
+[Running objects](../atl/running-objects-classes.md)\
+[Security](../atl/security-classes.md)\
+[Service provider support](../atl/service-provider-support-classes.md)\
+[Site information](../atl/site-information-classes.md)\
+[String and text](../atl/string-and-text-classes.md)\
+[Tear-off interfaces](../atl/tear-off-interfaces-classes.md)\
+[Thread pooling](../atl/thread-pooling-classes.md)\
+[Threading models and critical sections](../atl/threading-models-and-critical-sections-classes.md)\
+[UI support](../atl/ui-support-classes.md)\
+[Windows support](../atl/windows-support-classes.md)\
+[Utility](../atl/utility-classes.md)
-For additional classes that can be used in ATL projects, see [Shared Classes](../atl-mfc-shared/atl-mfc-shared-classes.md).
+For additional classes that can be used in ATL projects, see [Shared classes](../atl-mfc-shared/atl-mfc-shared-classes.md).
## See also
[Classes and structs](../atl/reference/atl-classes.md)
-[ATL COM Desktop Components](../atl/atl-com-desktop-components.md)
+[ATL COM desktop components](../atl/atl-com-desktop-components.md)
[Functions](../atl/reference/atl-functions.md)
-[Global Variables](../atl/reference/atl-global-variables.md)
+[Global variables](../atl/reference/atl-global-variables.md)
[Macros](../atl/reference/atl-macros.md)
[Typedefs](../atl/reference/atl-typedefs.md)
diff --git a/docs/atl/atl-collection-and-enumerator-classes.md b/docs/atl/atl-collection-and-enumerator-classes.md
index f790d7b6e1..d96c74e570 100644
--- a/docs/atl/atl-collection-and-enumerator-classes.md
+++ b/docs/atl/atl-collection-and-enumerator-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Collection and Enumerator Classes"
title: "ATL Collection and Enumerator Classes"
ms.date: "11/04/2016"
helpviewer_keywords: ["enumerators, ATL classes", "collection classes, ATL"]
diff --git a/docs/atl/atl-collection-classes.md b/docs/atl/atl-collection-classes.md
index 9cd13f25e2..db96014d6f 100644
--- a/docs/atl/atl-collection-classes.md
+++ b/docs/atl/atl-collection-classes.md
@@ -1,8 +1,10 @@
---
-title: "ATL Collection Classes"
+description: "Learn more about: ATL Collection Classes"
+title: "ATL collection class overview"
ms.date: "11/19/2018"
helpviewer_keywords: ["DestructElements function", "collection classes, choosing", "ConstructElements function", "SerializeElements function", "traits classes", "collection classes, about collection classes", "CTraits classes", "collection classes"]
ms.assetid: 4d619d46-5b4e-41dd-b9fd-e86b1fbc00b5
+ms.topic: concept-article
---
# ATL Collection Classes
@@ -96,7 +98,7 @@ For a list of the CTraits classes, see [Collection Classes](../atl/collection-cl
The following diagram shows the class hierarchy for the CTraits classes.
-
+
## Collection Classes Samples
diff --git a/docs/atl/atl-collections-and-enumerators.md b/docs/atl/atl-collections-and-enumerators.md
index 12b46f4cef..68eea6e6f8 100644
--- a/docs/atl/atl-collections-and-enumerators.md
+++ b/docs/atl/atl-collections-and-enumerators.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Collections and Enumerators"
title: "ATL Collections and Enumerators"
ms.date: "11/04/2016"
helpviewer_keywords: ["enumerator interfaces", "collections, ATL classes", "enumerators, ATL classes", "collection interfaces"]
diff --git a/docs/atl/atl-com-desktop-components.md b/docs/atl/atl-com-desktop-components.md
index 13ac73af8b..3d5d2ad0c9 100644
--- a/docs/atl/atl-com-desktop-components.md
+++ b/docs/atl/atl-com-desktop-components.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL COM Desktop Components"
title: "ATL COM Desktop Components"
ms.date: "10/19/2018"
helpviewer_keywords: ["ATL, reference", "ATL, about ATL"]
diff --git a/docs/atl/atl-com-property-pages.md b/docs/atl/atl-com-property-pages.md
index fb11543bdd..109d83b95c 100644
--- a/docs/atl/atl-com-property-pages.md
+++ b/docs/atl/atl-com-property-pages.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL COM Property Pages"
title: "ATL COM Property Pages"
ms.date: "11/04/2016"
helpviewer_keywords: ["property pages, COM", "ATL COM objects", "COM property pages", "property pages, ATL", "COM objects, ATL", "ATL property pages"]
diff --git a/docs/atl/atl-composite-control-fundamentals.md b/docs/atl/atl-composite-control-fundamentals.md
index caed897fcb..99d5bc76e0 100644
--- a/docs/atl/atl-composite-control-fundamentals.md
+++ b/docs/atl/atl-composite-control-fundamentals.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Composite Control Fundamentals"
title: "ATL Composite Control Fundamentals"
ms.date: "11/04/2016"
helpviewer_keywords: ["composite controls, about composite controls"]
diff --git a/docs/atl/atl-connection-point-classes.md b/docs/atl/atl-connection-point-classes.md
index b752077849..9de4d1eaf4 100644
--- a/docs/atl/atl-connection-point-classes.md
+++ b/docs/atl/atl-connection-point-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Connection Point Classes"
title: "ATL Connection Point Classes"
ms.date: "11/04/2016"
helpviewer_keywords: ["CFirePropNotifyEvent class, connection point classes", "connection points [C++], ATL classes", "ATL, connection points", "CComDynamicUnkArray class, connection point classes", "CFirePropNotifyEvent class", "CComUnkArray class, connection point classes"]
diff --git a/docs/atl/atl-connection-point-example.md b/docs/atl/atl-connection-point-example.md
index 6eb291ed6a..0a7cf22ac7 100644
--- a/docs/atl/atl-connection-point-example.md
+++ b/docs/atl/atl-connection-point-example.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Connection Point Example"
title: "ATL Connection Point Example"
ms.date: "11/04/2016"
helpviewer_keywords: ["connection points [C++], examples", "examples [ATL]"]
diff --git a/docs/atl/atl-connection-points.md b/docs/atl/atl-connection-points.md
index 06448765d6..9bad34db0b 100644
--- a/docs/atl/atl-connection-points.md
+++ b/docs/atl/atl-connection-points.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Connection Points"
title: "ATL Connection Points"
ms.date: "11/04/2016"
helpviewer_keywords: ["connections, connection points", "ATL, connection points", "connection points [C++], about connection points"]
@@ -8,7 +9,7 @@ ms.assetid: 17d76165-5f83-4f95-b36d-483821c247a1
A connectable object is one that supports outgoing interfaces. An outgoing interface allows the object to communicate with a client. For each outgoing interface, the connectable object exposes a connection point. Each outgoing interface is implemented by a client on an object called a sink.
-
+
Each connection point supports the [IConnectionPoint](/windows/win32/api/ocidl/nn-ocidl-iconnectionpoint) interface. The connectable object exposes its connection points to the client through the [IConnectionPointContainer](/windows/win32/api/ocidl/nn-ocidl-iconnectionpointcontainer) interface.
diff --git a/docs/atl/atl-control-containment-faq.md b/docs/atl/atl-control-containment-faq.md
deleted file mode 100644
index 695f7f873a..0000000000
--- a/docs/atl/atl-control-containment-faq.md
+++ /dev/null
@@ -1,105 +0,0 @@
----
-title: "ATL Control Containment FAQ"
-ms.date: "11/04/2016"
-helpviewer_keywords: ["hosting controls using ATL", "ActiveX control containers [C++], ATL control hosting", "ATL, hosting ActiveX controls", "ActiveX controls [C++], hosting", "controls [ATL]"]
-ms.assetid: d4bdfbe0-82ca-4f2f-bb95-cb89bdcc9b53
----
-# ATL Control Containment FAQ
-
-## Which ATL Classes Facilitate ActiveX Control Containment?
-
-ATL's control-hosting code doesn't require you to use any ATL classes; you can simply create an **"AtlAxWin80"** window and use the control-hosting API if necessary (for more information, see **What Is the ATL Control-Hosting API**. However, the following classes make the containment features easier to use.
-
-|Class|Description|
-|-----------|-----------------|
-|[CAxWindow](../atl/reference/caxwindow-class.md)|Wraps an **"AtlAxWin80"** window, providing methods for creating the window, creating a control and/or attaching a control to the window, and retrieving interface pointers on the host object.|
-|[CAxWindow2T](../atl/reference/caxwindow2t-class.md)|Wraps an **"AtlAxWinLic80"** window, providing methods for creating the window, creating a control and/or attaching a licensed control to the window, and retrieving interface pointers on the host object.|
-|[CComCompositeControl](../atl/reference/ccomcompositecontrol-class.md)|Acts as a base class for ActiveX control classes based on a dialog resource. Such controls can contain other ActiveX controls.|
-|[CAxDialogImpl](../atl/reference/caxdialogimpl-class.md)|Acts as a base class for dialog classes based on a dialog resource. Such dialogs can contain ActiveX controls.|
-|[CWindow](../atl/reference/cwindow-class.md)|Provides a method, [GetDlgControl](../atl/reference/cwindow-class.md#getdlgcontrol), that will return an interface pointer on a control, given the ID of its host window. In addition, the Windows API wrappers exposed by `CWindow` generally make window management easier.|
-
-## What Is the ATL Control-Hosting API?
-
-ATL's control-hosting API is the set of functions that allows any window to act as an ActiveX control container. These functions can be statically or dynamically linked into your project since they are available as source code and exposed by ATL90.dll. The control-hosting functions are listed in the table below.
-
-|Function|Description|
-|--------------|-----------------|
-|[AtlAxAttachControl](reference/composite-control-global-functions.md#atlaxattachcontrol)|Creates a host object, connects it to the supplied window, then attaches an existing control.|
-|[AtlAxCreateControl](reference/composite-control-global-functions.md#atlaxcreatecontrol)|Creates a host object, connects it to the supplied window, then loads a control.|
-|[AtlAxCreateControlLic](reference/composite-control-global-functions.md#atlaxcreatecontrollic)|Creates a licensed ActiveX control, initializes it, and hosts it in the specified window, similar to [AtlAxCreateControl](reference/composite-control-global-functions.md#atlaxcreatecontrol).|
-|[AtlAxCreateControlEx](reference/composite-control-global-functions.md#atlaxcreatecontrolex)|Creates a host object, connects it to the supplied window, then loads a control (also allows event sinks to be set up).|
-|[AtlAxCreateControlLicEx](reference/composite-control-global-functions.md#atlaxcreatecontrollicex)|Creates a licensed ActiveX control, initializes it, and hosts it in the specified window, similar to [AtlAxCreateControlLic](reference/composite-control-global-functions.md#atlaxcreatecontrollic).|
-|[AtlAxCreateDialog](reference/composite-control-global-functions.md#atlaxcreatedialog)|Creates a modeless dialog box from a dialog resource and returns the window handle.|
-|[AtlAxDialogBox](reference/composite-control-global-functions.md#atlaxdialogbox)|Creates a modal dialog box from a dialog resource.|
-|[AtlAxGetControl](reference/composite-control-global-functions.md#atlaxgetcontrol)|Returns the **IUnknown** interface pointer of the control hosted in a window.|
-|[AtlAxGetHost](reference/composite-control-global-functions.md#atlaxgethost)|Returns the **IUnknown** interface pointer of the host object connected to a window.|
-|[AtlAxWinInit](reference/composite-control-global-functions.md#atlaxwininit)|Initializes the control-hosting code.|
-|[AtlAxWinTerm](reference/composite-control-global-functions.md#atlaxwinterm)|Uninitializes the control-hosting code.|
-
-The `HWND` parameters in the first three functions must be an existing window of (almost) any type. If you call any of these three functions explicitly (typically, you won't have to), do not pass a handle to a window that's already acting as a host (if you do, the existing host object won't be freed).
-
-The first seven functions call [AtlAxWinInit](reference/composite-control-global-functions.md#atlaxwininit) implicitly.
-
-> [!NOTE]
-> The control-hosting API forms the foundation of ATL's support for ActiveX control containment. However, there is usually little need to call these functions directly if you take advantage of or make full use of ATL's wrapper classes. For more information, see [Which ATL Classes Facilitate ActiveX Control Containment](which-atl-classes-facilitate-activex-control-containment-q.md).
-
-## What Is AtlAxWin100?
-
-`AtlAxWin100` is the name of a window class that helps provide ATL's control-hosting functionality. When you create an instance of this class, the window procedure will automatically use the control-hosting API to create a host object associated with the window and load it with the control that you specify as the title of the window.
-
-## When Do I Need to Call AtlAxWinInit?
-
-[AtlAxWinInit](reference/composite-control-global-functions.md#atlaxwininit) registers the **"AtlAxWin80"** window class (plus a couple of custom window messages) so this function must be called before you try to create a host window. However, you don't always need to call this function explicitly, since the hosting APIs (and the classes that use them) often call this function for you. There is no harm in calling this function more than once.
-
-## What Is a Host Object?
-
-A host object is a COM object that represents the ActiveX control container supplied by ATL for a particular window. The host object subclasses the container window so that it can reflect messages to the control, it provides the necessary container interfaces to be used by the control, and it exposes the [IAxWinHostWindow](../atl/reference/iaxwinhostwindow-interface.md) and [IAxWinAmbientDispatch](../atl/reference/iaxwinambientdispatch-interface.md) interfaces to allow you to configure the environment of the control.
-
-You can use the host object to set the ambient properties of the container.
-
-## Can I Host More Than One Control in a Single Window?
-
-It is not possible to host more than one control in a single ATL host window. Each host window is designed to hold exactly one control at a time (this allows for a simple mechanism for handling message reflection and per-control ambient properties). However, if you need the user to see multiple controls in a single window, it's a simple matter to create multiple host windows as children of that window.
-
-## Can I Reuse a Host Window?
-
-It is not recommended that you reuse host windows. To ensure the robustness of your code, you should tie the lifetime of your host window to the lifetime of a single control.
-
-## When Do I Need to Call AtlAxWinTerm?
-
-[AtlAxWinTerm](reference/composite-control-global-functions.md#atlaxwinterm) unregisters the **"AtlAxWin80"** window class. You should call this function (if you no longer need to create host windows) after all existing host windows have been destroyed. If you don't call this function, the window class will be unregistered automatically when the process terminates.
-
-## Hosting ActiveX Controls Using ATL AXHost
-
-The sample in this section shows how to create AXHost and how to host an ActiveX control using various ATL functions. It also shows how to access the control and sink events (using [IDispEventImpl](../atl/reference/idispeventimpl-class.md)) from the control that is hosted. The sample hosts the Calendar control in a main window or in a child window.
-
-Notice the definition of the `USE_METHOD` symbol. You can change the value of this symbol to vary between 1 and 8. The value of the symbol determines how the control will be created:
-
-- For even-numbered values of `USE_METHOD`, the call to create the host subclasses a window and converts it into a control host. For odd-numbered values, the code creates a child window that acts as a host.
-
-- For values of `USE_METHOD` between 1 and 4, access to the control and sinking of events are accomplished in the call that also creates the host. Values between 5 and 8 query the host for interfaces and hook the sink.
-
-Here's a summary:
-
-|USE_METHOD|Host|Control access and event sinking|Function demonstrated|
-|-----------------|----------|--------------------------------------|---------------------------|
-|1|Child window|One step|CreateControlLicEx|
-|2|Main window|One step|AtlAxCreateControlLicEx|
-|3|Child window|One step|CreateControlEx|
-|4|Main window|One step|AtlAxCreateControlEx|
-|5|Child window|Multiple steps|CreateControlLic|
-|6|Main window|Multiple steps|AtlAxCreateControlLic|
-|7|Child window|Multiple steps|CreateControl|
-|8|Main window|Multiple steps|AtlAxCreateControl|
-
-[!code-cpp[NVC_ATL_AxHost#1](../atl/codesnippet/cpp/hosting-activex-controls-using-atl-axhost_1.cpp)]
-
-## See also
-
-[Control Containment FAQ](../atl/atl-control-containment-faq.md)
-[AtlAxCreateControl](reference/composite-control-global-functions.md#atlaxcreatecontrol)
-[AtlAxCreateControlEx](reference/composite-control-global-functions.md#atlaxcreatecontrolex)
-[AtlAxCreateControlLic](reference/composite-control-global-functions.md#atlaxcreatecontrollic)
-[AtlAxCreateControlLicEx](reference/composite-control-global-functions.md#atlaxcreatecontrolex)
-[CAxWindow2T Class](../atl/reference/caxwindow2t-class.md)
-[IAxWinHostWindowLic Interface](../atl/reference/iaxwinhostwindowlic-interface.md)
diff --git a/docs/atl/atl-control-containment-faq.yml b/docs/atl/atl-control-containment-faq.yml
new file mode 100644
index 0000000000..51c1ecd623
--- /dev/null
+++ b/docs/atl/atl-control-containment-faq.yml
@@ -0,0 +1,122 @@
+### YamlMime:FAQ
+metadata:
+ description: "Learn more about: ATL Control Containment FAQ"
+ title: "ATL Control Containment FAQ"
+ ms.date: "11/04/2016"
+ helpviewer_keywords: ["hosting controls using ATL", "ActiveX control containers [C++], ATL control hosting", "ATL, hosting ActiveX controls", "ActiveX controls [C++], hosting", "controls [ATL]"]
+ ms.assetid: d4bdfbe0-82ca-4f2f-bb95-cb89bdcc9b53
+ ms.topic: faq
+title: ATL Control Containment FAQ
+summary: |
+
+sections:
+ - name: Ignored
+ questions:
+ - question: |
+ Which ATL Classes Facilitate ActiveX Control Containment?
+ answer: |
+ ATL's control-hosting code doesn't require you to use any ATL classes; you can simply create an **"AtlAxWin80"** window and use the control-hosting API if necessary (for more information, see **What Is the ATL Control-Hosting API**. However, the following classes make the containment features easier to use.
+
+ |Class|Description|
+ |-----------|-----------------|
+ |[CAxWindow](../atl/reference/caxwindow-class.md)|Wraps an **"AtlAxWin80"** window, providing methods for creating the window, creating a control and/or attaching a control to the window, and retrieving interface pointers on the host object.|
+ |[CAxWindow2T](../atl/reference/caxwindow2t-class.md)|Wraps an **"AtlAxWinLic80"** window, providing methods for creating the window, creating a control and/or attaching a licensed control to the window, and retrieving interface pointers on the host object.|
+ |[CComCompositeControl](../atl/reference/ccomcompositecontrol-class.md)|Acts as a base class for ActiveX control classes based on a dialog resource. Such controls can contain other ActiveX controls.|
+ |[CAxDialogImpl](../atl/reference/caxdialogimpl-class.md)|Acts as a base class for dialog classes based on a dialog resource. Such dialogs can contain ActiveX controls.|
+ |[CWindow](../atl/reference/cwindow-class.md)|Provides a method, [GetDlgControl](../atl/reference/cwindow-class.md#getdlgcontrol), that will return an interface pointer on a control, given the ID of its host window. In addition, the Windows API wrappers exposed by `CWindow` generally make window management easier.|
+
+ - question: |
+ What Is the ATL Control-Hosting API?
+ answer: |
+ ATL's control-hosting API is the set of functions that allows any window to act as an ActiveX control container. These functions can be statically or dynamically linked into your project since they are available as source code and exposed by ATL90.dll. The control-hosting functions are listed in the table below.
+
+ |Function|Description|
+ |--------------|-----------------|
+ |[AtlAxAttachControl](reference/composite-control-global-functions.md#atlaxattachcontrol)|Creates a host object, connects it to the supplied window, then attaches an existing control.|
+ |[AtlAxCreateControl](reference/composite-control-global-functions.md#atlaxcreatecontrol)|Creates a host object, connects it to the supplied window, then loads a control.|
+ |[AtlAxCreateControlLic](reference/composite-control-global-functions.md#atlaxcreatecontrollic)|Creates a licensed ActiveX control, initializes it, and hosts it in the specified window, similar to [AtlAxCreateControl](reference/composite-control-global-functions.md#atlaxcreatecontrol).|
+ |[AtlAxCreateControlEx](reference/composite-control-global-functions.md#atlaxcreatecontrolex)|Creates a host object, connects it to the supplied window, then loads a control (also allows event sinks to be set up).|
+ |[AtlAxCreateControlLicEx](reference/composite-control-global-functions.md#atlaxcreatecontrollicex)|Creates a licensed ActiveX control, initializes it, and hosts it in the specified window, similar to [AtlAxCreateControlLic](reference/composite-control-global-functions.md#atlaxcreatecontrollic).|
+ |[AtlAxCreateDialog](reference/composite-control-global-functions.md#atlaxcreatedialog)|Creates a modeless dialog box from a dialog resource and returns the window handle.|
+ |[AtlAxDialogBox](reference/composite-control-global-functions.md#atlaxdialogbox)|Creates a modal dialog box from a dialog resource.|
+ |[AtlAxGetControl](reference/composite-control-global-functions.md#atlaxgetcontrol)|Returns the **IUnknown** interface pointer of the control hosted in a window.|
+ |[AtlAxGetHost](reference/composite-control-global-functions.md#atlaxgethost)|Returns the **IUnknown** interface pointer of the host object connected to a window.|
+ |[AtlAxWinInit](reference/composite-control-global-functions.md#atlaxwininit)|Initializes the control-hosting code.|
+ |[AtlAxWinTerm](reference/composite-control-global-functions.md#atlaxwinterm)|Uninitializes the control-hosting code.|
+
+ The `HWND` parameters in the first three functions must be an existing window of (almost) any type. If you call any of these three functions explicitly (typically, you won't have to), do not pass a handle to a window that's already acting as a host (if you do, the existing host object won't be freed).
+
+ The first seven functions call [AtlAxWinInit](reference/composite-control-global-functions.md#atlaxwininit) implicitly.
+
+ > [!NOTE]
+ > The control-hosting API forms the foundation of ATL's support for ActiveX control containment. However, there is usually little need to call these functions directly if you take advantage of or make full use of ATL's wrapper classes. For more information, see [Which ATL Classes Facilitate ActiveX Control Containment](#which-atl-classes-facilitate-activex-control-containment-).
+
+ - question: |
+ What Is AtlAxWin100?
+ answer: |
+ `AtlAxWin100` is the name of a window class that helps provide ATL's control-hosting functionality. When you create an instance of this class, the window procedure will automatically use the control-hosting API to create a host object associated with the window and load it with the control that you specify as the title of the window.
+
+ - question: |
+ When Do I Need to Call AtlAxWinInit?
+ answer: |
+ [AtlAxWinInit](reference/composite-control-global-functions.md#atlaxwininit) registers the **"AtlAxWin80"** window class (plus a couple of custom window messages) so this function must be called before you try to create a host window. However, you don't always need to call this function explicitly, since the hosting APIs (and the classes that use them) often call this function for you. There is no harm in calling this function more than once.
+
+ - question: |
+ What Is a Host Object?
+ answer: |
+ A host object is a COM object that represents the ActiveX control container supplied by ATL for a particular window. The host object subclasses the container window so that it can reflect messages to the control, it provides the necessary container interfaces to be used by the control, and it exposes the [IAxWinHostWindow](../atl/reference/iaxwinhostwindow-interface.md) and [IAxWinAmbientDispatch](../atl/reference/iaxwinambientdispatch-interface.md) interfaces to allow you to configure the environment of the control.
+
+ You can use the host object to set the ambient properties of the container.
+
+ - question: |
+ Can I Host More Than One Control in a Single Window?
+ answer: |
+ It is not possible to host more than one control in a single ATL host window. Each host window is designed to hold exactly one control at a time (this allows for a simple mechanism for handling message reflection and per-control ambient properties). However, if you need the user to see multiple controls in a single window, it's a simple matter to create multiple host windows as children of that window.
+
+ - question: |
+ Can I Reuse a Host Window?
+ answer: |
+ It is not recommended that you reuse host windows. To ensure the robustness of your code, you should tie the lifetime of your host window to the lifetime of a single control.
+
+ - question: |
+ When Do I Need to Call AtlAxWinTerm?
+ answer: |
+ [AtlAxWinTerm](reference/composite-control-global-functions.md#atlaxwinterm) unregisters the **"AtlAxWin80"** window class. You should call this function (if you no longer need to create host windows) after all existing host windows have been destroyed. If you don't call this function, the window class will be unregistered automatically when the process terminates.
+
+ - question: |
+ Hosting ActiveX Controls Using ATL AXHost
+ answer: |
+ The sample in this section shows how to create AXHost and how to host an ActiveX control using various ATL functions. It also shows how to access the control and sink events (using [IDispEventImpl](../atl/reference/idispeventimpl-class.md)) from the control that is hosted. The sample hosts the Calendar control in a main window or in a child window.
+
+ Notice the definition of the `USE_METHOD` symbol. You can change the value of this symbol to vary between 1 and 8. The value of the symbol determines how the control will be created:
+
+ - For even-numbered values of `USE_METHOD`, the call to create the host subclasses a window and converts it into a control host. For odd-numbered values, the code creates a child window that acts as a host.
+
+ - For values of `USE_METHOD` between 1 and 4, access to the control and sinking of events are accomplished in the call that also creates the host. Values between 5 and 8 query the host for interfaces and hook the sink.
+
+ Here's a summary:
+
+ |USE_METHOD|Host|Control access and event sinking|Function demonstrated|
+ |-----------------|----------|--------------------------------------|---------------------------|
+ |1|Child window|One step|CreateControlLicEx|
+ |2|Main window|One step|AtlAxCreateControlLicEx|
+ |3|Child window|One step|CreateControlEx|
+ |4|Main window|One step|AtlAxCreateControlEx|
+ |5|Child window|Multiple steps|CreateControlLic|
+ |6|Main window|Multiple steps|AtlAxCreateControlLic|
+ |7|Child window|Multiple steps|CreateControl|
+ |8|Main window|Multiple steps|AtlAxCreateControl|
+
+ [!code-cpp[NVC_ATL_AxHost#1](../atl/codesnippet/cpp/hosting-activex-controls-using-atl-axhost_1.cpp)]
+
+additionalContent: |
+
+ ## See also
+
+ [Control Containment FAQ](../atl/atl-control-containment-faq.yml)
+ [AtlAxCreateControl](reference/composite-control-global-functions.md#atlaxcreatecontrol)
+ [AtlAxCreateControlEx](reference/composite-control-global-functions.md#atlaxcreatecontrolex)
+ [AtlAxCreateControlLic](reference/composite-control-global-functions.md#atlaxcreatecontrollic)
+ [AtlAxCreateControlLicEx](reference/composite-control-global-functions.md#atlaxcreatecontrolex)
+ [CAxWindow2T Class](../atl/reference/caxwindow2t-class.md)
+ [IAxWinHostWindowLic Interface](../atl/reference/iaxwinhostwindowlic-interface.md)
diff --git a/docs/atl/atl-copy-policy-classes.md b/docs/atl/atl-copy-policy-classes.md
index 2499a35b31..08787e3fe9 100644
--- a/docs/atl/atl-copy-policy-classes.md
+++ b/docs/atl/atl-copy-policy-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Copy Policy Classes"
title: "ATL Copy Policy Classes"
ms.date: "11/04/2016"
helpviewer_keywords: ["data [C++], ATL", "classes [C++], copy policy", "copy policy classes [C++]", "_Copy class", "_CopyInterface class"]
diff --git a/docs/atl/atl-encoding-reference.md b/docs/atl/atl-encoding-reference.md
index a5e899b391..e7153b0520 100644
--- a/docs/atl/atl-encoding-reference.md
+++ b/docs/atl/atl-encoding-reference.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Encoding Reference"
title: "ATL Encoding Reference"
ms.date: "11/04/2016"
helpviewer_keywords: ["encoding", "encoding, functions"]
@@ -6,35 +7,35 @@ ms.assetid: 82d4fdf3-3c4a-4fe2-b297-8ffb4714406f
---
# ATL Encoding Reference
-Encoding in a range of common Internet standards such as uuencode, hexadecimal, and UTF8 is supported by the code found in atlenc.h.
+Encoding in a range of common Internet standards such as uuencode, hexadecimal, and UTF8 is supported by the code found in *`atlenc.h`*.
### Functions
-|||
-|-|-|
-|[AtlGetHexValue](reference/atl-text-encoding-functions.md#atlgethexvalue)|Call this function to get the numeric value of a hexadecimal digit.|
-|[AtlHexDecode](reference/atl-text-encoding-functions.md#atlhexdecode)|Decodes a string of data that has been encoded as hexadecimal text such as by a previous call to [AtlHexEncode](reference/atl-text-encoding-functions.md#atlhexencode).|
-|[AtlHexDecodeGetRequiredLength](reference/atl-text-encoding-functions.md#atlhexdecodegetrequiredlength)|Call this function to get the size in bytes of a buffer that could contain data decoded from a hex-encoded string of the specified length.|
-|[AtlHexEncode](reference/atl-text-encoding-functions.md#atlhexencode)|Call this function to encode some data as a string of hexadecimal text.|
-|[AtlHexEncodeGetRequiredLength](reference/atl-text-encoding-functions.md#atlhexencodegetrequiredlength)|Call this function to get the size in characters of a buffer that could contain a string encoded from data of the specified size.|
-|[AtlUnicodeToUTF8](reference/atl-text-encoding-functions.md#atlunicodetoutf8)|Call this function to convert a Unicode string to UTF-8.|
-|[BEncode](reference/atl-text-encoding-functions.md#bencode)|Call this function to convert some data using the "B" encoding.|
-|[BEncodeGetRequiredLength](reference/atl-text-encoding-functions.md#bencodegetrequiredlength)|Call this function to get the size in characters of a buffer that could contain a string encoded from data of the specified size.|
-|[EscapeXML](reference/atl-text-encoding-functions.md#escapexml)|Call this function to convert characters that are unsafe for use in XML to their safe equivalents.|
-|[GetExtendedChars](reference/atl-text-encoding-functions.md#getextendedchars)|Call this function to get the number of extended characters in a string.|
-|[IsExtendedChar](reference/atl-text-encoding-functions.md#isextendedchar)|Call this function to find out if a given character is an extended character (less than 32, greater than 126, and not a tab, line feed or carriage return)|
-|[QEncode](reference/atl-text-encoding-functions.md#qencode)|Call this function to convert some data using the "Q" encoding.|
-|[QEncodeGetRequiredLength](reference/atl-text-encoding-functions.md#qencodegetrequiredlength)|Call this function to get the size in characters of a buffer that could contain a string encoded from data of the specified size.|
-|[QPDecode](reference/atl-text-encoding-functions.md#qpdecode)|Decodes a string of data that has been encoded in quoted-printable format such as by a previous call to [QPEncode](reference/atl-text-encoding-functions.md#qpencode).|
-|[QPDecodeGetRequiredLength](reference/atl-text-encoding-functions.md#qpdecodegetrequiredlength)|Call this function to get the size in bytes of a buffer that could contain data decoded from quoted-printable-encoded string of the specified length.|
-|[QPEncode](reference/atl-text-encoding-functions.md#qpencode)|Call this function to encode some data in quoted-printable format.|
-|[QPEncodeGetRequiredLength](reference/atl-text-encoding-functions.md#qpencodegetrequiredlength)|Call this function to get the size in characters of a buffer that could contain a string encoded from data of the specified size.|
-|[UUDecode](reference/atl-text-encoding-functions.md#uudecode)|Decodes a string of data that has been uuencoded such as by a previous call to [UUEncode](reference/atl-text-encoding-functions.md#uuencode).|
-|[UUDecodeGetRequiredLength](reference/atl-text-encoding-functions.md#uudecodegetrequiredlength)|Call this function to get the size in bytes of a buffer that could contain data decoded from a uuencoded string of the specified length.|
-|[UUEncode](reference/atl-text-encoding-functions.md#uuencode)|Call this function to uuencode some data.|
-|[UUEncodeGetRequiredLength](reference/atl-text-encoding-functions.md#uuencodegetrequiredlength)|Call this function to get the size in characters of a buffer that could contain a string encoded from data of the specified size.|
+| Function | Use case |
+|--|--|
+| [AtlGetHexValue](reference/atl-text-encoding-functions.md#atlgethexvalue) | Call this function to get the numeric value of a hexadecimal digit. |
+| [AtlHexDecode](reference/atl-text-encoding-functions.md#atlhexdecode) | Decodes a string of data that has been encoded as hexadecimal text such as by a previous call to [AtlHexEncode](reference/atl-text-encoding-functions.md#atlhexencode). |
+| [AtlHexDecodeGetRequiredLength](reference/atl-text-encoding-functions.md#atlhexdecodegetrequiredlength) | Call this function to get the size in bytes of a buffer that could contain data decoded from a hex-encoded string of the specified length. |
+| [AtlHexEncode](reference/atl-text-encoding-functions.md#atlhexencode) | Call this function to encode some data as a string of hexadecimal text. |
+| [AtlHexEncodeGetRequiredLength](reference/atl-text-encoding-functions.md#atlhexencodegetrequiredlength) | Call this function to get the size in characters of a buffer that could contain a string encoded from data of the specified size. |
+| [AtlUnicodeToUTF8](reference/atl-text-encoding-functions.md#atlunicodetoutf8) | Call this function to convert a Unicode string to UTF-8. |
+| [BEncode](reference/atl-text-encoding-functions.md#bencode) | Call this function to convert some data using the "B" encoding. |
+| [BEncodeGetRequiredLength](reference/atl-text-encoding-functions.md#bencodegetrequiredlength) | Call this function to get the size in characters of a buffer that could contain a string encoded from data of the specified size. |
+| [EscapeXML](reference/atl-text-encoding-functions.md#escapexml) | Call this function to convert characters that are unsafe for use in XML to their safe equivalents. |
+| [GetExtendedChars](reference/atl-text-encoding-functions.md#getextendedchars) | Call this function to get the number of extended characters in a string. |
+| [IsExtendedChar](reference/atl-text-encoding-functions.md#isextendedchar) | Call this function to find out if a given character is an extended character (less than 32, greater than 126, and not a tab, line feed or carriage return) |
+| [QEncode](reference/atl-text-encoding-functions.md#qencode) | Call this function to convert some data using the "Q" encoding. |
+| [QEncodeGetRequiredLength](reference/atl-text-encoding-functions.md#qencodegetrequiredlength) | Call this function to get the size in characters of a buffer that could contain a string encoded from data of the specified size. |
+| [QPDecode](reference/atl-text-encoding-functions.md#qpdecode) | Decodes a string of data that has been encoded in quoted-printable format such as by a previous call to [QPEncode](reference/atl-text-encoding-functions.md#qpencode). |
+| [QPDecodeGetRequiredLength](reference/atl-text-encoding-functions.md#qpdecodegetrequiredlength) | Call this function to get the size in bytes of a buffer that could contain data decoded from quoted-printable-encoded string of the specified length. |
+| [QPEncode](reference/atl-text-encoding-functions.md#qpencode) | Call this function to encode some data in quoted-printable format. |
+| [QPEncodeGetRequiredLength](reference/atl-text-encoding-functions.md#qpencodegetrequiredlength) | Call this function to get the size in characters of a buffer that could contain a string encoded from data of the specified size. |
+| [UUDecode](reference/atl-text-encoding-functions.md#uudecode) | Decodes a string of data that has been uuencoded such as by a previous call to [UUEncode](reference/atl-text-encoding-functions.md#uuencode). |
+| [UUDecodeGetRequiredLength](reference/atl-text-encoding-functions.md#uudecodegetrequiredlength) | Call this function to get the size in bytes of a buffer that could contain data decoded from a uuencoded string of the specified length. |
+| [UUEncode](reference/atl-text-encoding-functions.md#uuencode) | Call this function to uuencode some data. |
+| [UUEncodeGetRequiredLength](reference/atl-text-encoding-functions.md#uuencodegetrequiredlength) | Call this function to get the size in characters of a buffer that could contain a string encoded from data of the specified size. |
## See also
[Concepts](../atl/active-template-library-atl-concepts.md)
-[ATL COM Desktop Components](../atl/atl-com-desktop-components.md)
+[ATL COM desktop components](../atl/atl-com-desktop-components.md)
diff --git a/docs/atl/atl-event-handling-summary.md b/docs/atl/atl-event-handling-summary.md
index 57cc50379a..166f1d4028 100644
--- a/docs/atl/atl-event-handling-summary.md
+++ b/docs/atl/atl-event-handling-summary.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Event Handling Summary"
title: "ATL Event Handling Summary"
ms.date: "11/04/2016"
helpviewer_keywords: ["event handling, implementing"]
diff --git a/docs/atl/atl-module-classes.md b/docs/atl/atl-module-classes.md
index 662309606c..4613d5af00 100644
--- a/docs/atl/atl-module-classes.md
+++ b/docs/atl/atl-module-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Module Classes"
title: "ATL Module Classes"
ms.date: "11/04/2016"
helpviewer_keywords: ["CComModule class, what's changed", "ATL, module classes", "module classes"]
diff --git a/docs/atl/atl-registry-component-registrar.md b/docs/atl/atl-registry-component-registrar.md
index fc8dd475b3..6fc68ca1fc 100644
--- a/docs/atl/atl-registry-component-registrar.md
+++ b/docs/atl/atl-registry-component-registrar.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Registry Component (Registrar)"
title: "ATL Registry Component (Registrar)"
ms.date: "11/04/2016"
helpviewer_keywords: ["scripting, registry scripting", "ATL, registry", "registrar scripts [ATL]", "registry, accessing", "ATL Registrar", "scripts, Registrar scripts", "registry, Registrar"]
diff --git a/docs/atl/atl-services.md b/docs/atl/atl-services.md
index 35b7105972..4acde07ca7 100644
--- a/docs/atl/atl-services.md
+++ b/docs/atl/atl-services.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Services"
title: "ATL Services"
ms.date: "11/04/2016"
helpviewer_keywords: ["CServiceModule class", "COM objects, ATL", "services, ATL", "ATL services"]
diff --git a/docs/atl/atl-support-for-dhtml-controls.md b/docs/atl/atl-support-for-dhtml-controls.md
index 612ee901f9..eca0e2fe0b 100644
--- a/docs/atl/atl-support-for-dhtml-controls.md
+++ b/docs/atl/atl-support-for-dhtml-controls.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Support for DHTML Controls"
title: "ATL Support for DHTML Controls"
ms.date: "11/04/2016"
helpviewer_keywords: ["HTML controls, ATL support", "DHTML controls, ATL support", "DHTML controls"]
diff --git a/docs/atl/atl-utilities-reference.md b/docs/atl/atl-utilities-reference.md
index ea0f7d0e1a..d903e4dbab 100644
--- a/docs/atl/atl-utilities-reference.md
+++ b/docs/atl/atl-utilities-reference.md
@@ -1,91 +1,89 @@
---
-title: "ATL Utilities Reference"
-ms.date: "11/04/2016"
-ms.assetid: dd8a2888-34f4-461e-9bf4-834218f9b95b
+title: "ATL utilities reference"
+description: "Learn more about: ATL utilities reference"
+ms.date: 11/04/2016
---
-# ATL Utilities Reference
+# ATL utilities reference
ATL provides code for manipulating paths and URLs in the form of [CPathT](../atl/reference/cpatht-class.md) and [CUrl](../atl/reference/curl-class.md). A thread pool, [CThreadPool](../atl/reference/cthreadpool-class.md), can be used in your applications. This code can be found in atlpath.h and atlutil.h.
-### Classes
+## Classes
-|||
-|-|-|
-|[CPathT Class](../atl/reference/cpatht-class.md)|This class represents a path.|
-|[CDebugReportHook Class](../atl/reference/cdebugreporthook-class.md)|Use this class to send debug reports to a named pipe.|
-|[CNonStatelessWorker Class](../atl/reference/cnonstatelessworker-class.md)|Receives requests from a thread pool and passes them on to a worker object that is created and destroyed on each request.|
-|[CNoWorkerThread Class](../atl/reference/cnoworkerthread-class.md)|Use this class as the argument for the `MonitorClass` template parameter to cache classes if you want to disable dynamic cache maintenance.|
-|[CThreadPool Class](../atl/reference/cthreadpool-class.md)|This class provides a pool of worker threads that process a queue of work items.|
-|[CUrl Class](../atl/reference/curl-class.md)|This class represents a URL. It allows you to manipulate each element of the URL independently of the others whether parsing an existing URL string or building a string from scratch.|
-|[CWorkerThread Class](../atl/reference/cworkerthread-class.md)|This class creates a worker thread or uses an existing one, waits on one or more kernel object handles, and executes a specified client function when one of the handles is signaled.|
+| Name | Description |
+|--|--|
+| [CPathT class](../atl/reference/cpatht-class.md) | This class represents a path. |
+| [CDebugReportHook class](../atl/reference/cdebugreporthook-class.md) | Use this class to send debug reports to a named pipe. |
+| [CNonStatelessWorker class](../atl/reference/cnonstatelessworker-class.md) | Receives requests from a thread pool and passes them on to a worker object that is created and destroyed on each request. |
+| [CNoWorkerThread class](../atl/reference/cnoworkerthread-class.md) | Use this class as the argument for the `MonitorClass` template parameter to cache classes if you want to disable dynamic cache maintenance. |
+| [CThreadPool class](../atl/reference/cthreadpool-class.md) | This class provides a pool of worker threads that process a queue of work items. |
+| [CUrl class](../atl/reference/curl-class.md) | This class represents a URL. It allows you to manipulate each element of the URL independently of the others whether parsing an existing URL string or building a string from scratch. |
+| [CWorkerThread class](../atl/reference/cworkerthread-class.md) | This class creates a worker thread or uses an existing one, waits on one or more kernel object handles, and executes a specified client function when one of the handles is signaled. |
-### Typedefs
+## Typedefs
-|||
-|-|-|
-|[CPath](../atl/reference/atl-typedefs.md#cpath)|A specialization of [CPathT](../atl/reference/cpatht-class.md) using `CString`.|
-|[CPathA](../atl/reference/atl-typedefs.md#cpatha)|A specialization of [CPathT](../atl/reference/cpatht-class.md) using `CStringA`.|
-|[CPathW](../atl/reference/atl-typedefs.md#cpathw)|A specialization of [CPathT](../atl/reference/cpatht-class.md) using `CStringW`.|
-|[ATL_URL_PORT](../atl/reference/atl-typedefs.md#atl_url_port)|The type used by [CUrl](../atl/reference/curl-class.md) for specifying a port number.|
+| Name | Description |
+|--|--|
+| [CPath](../atl/reference/atl-typedefs.md#cpath) | A specialization of [CPathT](../atl/reference/cpatht-class.md) using `CString`. |
+| [CPathA](../atl/reference/atl-typedefs.md#cpatha) | A specialization of [CPathT](../atl/reference/cpatht-class.md) using `CStringA`. |
+| [CPathW](../atl/reference/atl-typedefs.md#cpathw) | A specialization of [CPathT](../atl/reference/cpatht-class.md) using `CStringW`. |
+| [ATL_URL_PORT](../atl/reference/atl-typedefs.md#atl_url_port) | The type used by [CUrl](../atl/reference/curl-class.md) for specifying a port number. |
-### Enums
+## Enums
-|||
-|-|-|
-|[ATL_URL_SCHEME](../atl/reference/atl-url-scheme-enum.md)|The members of this enumeration provide constants for the schemes understood by [CUrl](../atl/reference/curl-class.md).|
+| Name | Description |
+|--|--|
+| [ATL_URL_SCHEME](../atl/reference/atl-url-scheme-enum.md) | The members of this enumeration provide constants for the schemes understood by [CUrl](../atl/reference/curl-class.md). |
-### Functions
+## Functions
-|||
-|-|-|
-|[AtlCanonicalizeUrl](../atl/reference/atl-http-utility-functions.md#atlcanonicalizeurl)|Call this function to canonicalize a URL, which includes converting unsafe characters and spaces into escape sequences.|
-|[AtlCombineUrl](../atl/reference/atl-http-utility-functions.md#atlcombineurl)|Call this function to combine a base URL and a relative URL into a single, canonical URL.|
-|[AtlEscapeUrl](../atl/reference/atl-http-utility-functions.md#atlescapeurl)|Call this function to convert all unsafe characters to escape sequences.|
-|[AtlGetDefaultUrlPort](../atl/reference/atl-http-utility-functions.md#atlgetdefaulturlport)|Call this function to get the default port number associated with a particular internet protocol or scheme.|
-|[AtlHexValue](../atl/reference/atl-text-encoding-functions.md#atlhexvalue)|Call this function to get the numeric value of a hexadecimal digit.|
-|[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::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).|
-|[ATLPath::Canonicalize](../atl/reference/atl-path-functions.md#canonicalize)|This function is an overloaded wrapper for [PathCanonicalize](/windows/win32/api/shlwapi/nf-shlwapi-pathcanonicalizew).|
-|[ATLPath::Combine](../atl/reference/atl-path-functions.md#combine)|This function is an overloaded wrapper for [PathCombine](/windows/win32/api/shlwapi/nf-shlwapi-pathcombinew).|
-|[ATLPath::CommonPrefix](../atl/reference/atl-path-functions.md#commonprefix)|This function is an overloaded wrapper for [PathCommonPrefix](/windows/win32/api/shlwapi/nf-shlwapi-pathcommonprefixw).|
-|[ATLPath::CompactPath](../atl/reference/atl-path-functions.md#compactpath)|This function is an overloaded wrapper for [PathCompactPath](/windows/win32/api/shlwapi/nf-shlwapi-pathcompactpathw).|
-|[ATLPath::CompactPathEx](../atl/reference/atl-path-functions.md#compactpathex)|This function is an overloaded wrapper for [PathCompactPathEx](/windows/win32/api/shlwapi/nf-shlwapi-pathcompactpathexw).|
-|[ATLPath::FileExists](../atl/reference/atl-path-functions.md#fileexists)|This function is an overloaded wrapper for [PathFileExists](/windows/win32/api/shlwapi/nf-shlwapi-pathfileexistsw).|
-|[ATLPath::FindExtension](../atl/reference/atl-path-functions.md#findextension)|This function is an overloaded wrapper for [PathFindExtension](/windows/win32/api/shlwapi/nf-shlwapi-pathfindextensionw).|
-|[ATLPath::FindFileName](../atl/reference/atl-path-functions.md#findfilename)|This function is an overloaded wrapper for [PathFindFileName](/windows/win32/api/shlwapi/nf-shlwapi-pathfindfilenamew).|
-|[ATLPath::GetDriveNumber](../atl/reference/atl-path-functions.md#getdrivenumber)|This function is an overloaded wrapper for [PathGetDriveNumber](/windows/win32/api/shlwapi/nf-shlwapi-pathgetdrivenumberw).|
-|[ATLPath::IsDirectory](../atl/reference/atl-path-functions.md#isdirectory)|This function is an overloaded wrapper for [PathIsDirectory](/windows/win32/api/shlwapi/nf-shlwapi-pathisdirectoryw).|
-|[ATLPath::IsFileSpec](../atl/reference/atl-path-functions.md#isfilespec)|This function is an overloaded wrapper for [PathIsFileSpec](/windows/win32/api/shlwapi/nf-shlwapi-pathisfilespecw).|
-|[ATLPath::IsPrefix](../atl/reference/atl-path-functions.md#isprefix)|This function is an overloaded wrapper for [PathIsPrefix](/windows/win32/api/shlwapi/nf-shlwapi-pathisprefixw).|
-|[ATLPath::IsRelative](../atl/reference/atl-path-functions.md#isrelative)|This function is an overloaded wrapper for [PathIsRelative](/windows/win32/api/shlwapi/nf-shlwapi-pathisrelativew).|
-|[ATLPath::IsRoot](../atl/reference/atl-path-functions.md#isroot)|This function is an overloaded wrapper for [PathIsRoot](/windows/win32/api/shlwapi/nf-shlwapi-pathisrootw).|
-|[ATLPath::IsSameRoot](../atl/reference/atl-path-functions.md#issameroot)|This function is an overloaded wrapper for [PathIsSameRoot](/windows/win32/api/shlwapi/nf-shlwapi-pathissamerootw).|
-|[ATLPath::IsUNC](../atl/reference/atl-path-functions.md#isunc)|This function is an overloaded wrapper for [PathIsUNC](/windows/win32/api/shlwapi/nf-shlwapi-pathisuncw).|
-|[ATLPath::IsUNCServer](../atl/reference/atl-path-functions.md#isuncserver)|This function is an overloaded wrapper for [PathIsUNCServer](/windows/win32/api/shlwapi/nf-shlwapi-pathisuncserverw).|
-|[ATLPath::IsUNCServerShare](../atl/reference/atl-path-functions.md#isuncservershare)|This function is an overloaded wrapper for [PathIsUNCServerShare](/windows/win32/api/shlwapi/nf-shlwapi-pathisuncserversharew).|
-|[ATLPath::MakePretty](../atl/reference/atl-path-functions.md#makepretty)|This function is an overloaded wrapper for [PathMakePretty](/windows/win32/api/shlwapi/nf-shlwapi-pathmakeprettyw).|
-|[ATLPath::MatchSpec](../atl/reference/atl-path-functions.md#matchspec)|This function is an overloaded wrapper for [PathMatchSpec](/windows/win32/api/shlwapi/nf-shlwapi-pathmatchspecw).|
-|[ATLPath::QuoteSpaces](../atl/reference/atl-path-functions.md#quotespaces)|This function is an overloaded wrapper for [PathQuoteSpaces](/windows/win32/api/shlwapi/nf-shlwapi-pathquotespacesw).|
-|[ATLPath::RelativePathTo](../atl/reference/atl-path-functions.md#relativepathto)|This function is an overloaded wrapper for [PathRelativePathTo](/windows/win32/api/shlwapi/nf-shlwapi-pathrelativepathtow).|
-|[ATLPath::RemoveArgs](../atl/reference/atl-path-functions.md#removeargs)|This function is an overloaded wrapper for [PathRemoveArgs](/windows/win32/api/shlwapi/nf-shlwapi-pathremoveargsw).|
-|[ATLPath::RemoveBackslash](../atl/reference/atl-path-functions.md#removebackslash)|This function is an overloaded wrapper for [PathRemoveBackslash](/windows/win32/api/shlwapi/nf-shlwapi-pathremovebackslashw).|
-|[ATLPath::RemoveBlanks](../atl/reference/atl-path-functions.md#removeblanks)|This function is an overloaded wrapper for [PathRemoveBlanks](/windows/win32/api/shlwapi/nf-shlwapi-pathremoveblanksw).|
-|[ATLPath::RemoveExtension](../atl/reference/atl-path-functions.md#removeextension)|This function is an overloaded wrapper for [PathRemoveExtension](/windows/win32/api/shlwapi/nf-shlwapi-pathremoveextensionw).|
-|[ATLPath::RemoveFileSpec](../atl/reference/atl-path-functions.md#removefilespec)|This function is an overloaded wrapper for [PathRemoveFileSpec](/windows/win32/api/shlwapi/nf-shlwapi-pathremovefilespecw).|
-|[ATLPath::RenameExtension](../atl/reference/atl-path-functions.md#renameextension)|This function is an overloaded wrapper for [PathRenameExtension](/windows/win32/api/shlwapi/nf-shlwapi-pathrenameextensionw).|
-|[ATLPath::SkipRoot](../atl/reference/atl-path-functions.md#skiproot)|This function is an overloaded wrapper for [PathSkipRoot](/windows/win32/api/shlwapi/nf-shlwapi-pathskiprootw).|
-|[ATLPath::StripPath](../atl/reference/atl-path-functions.md#strippath)|This function is an overloaded wrapper for [PathStripPath](/windows/win32/api/shlwapi/nf-shlwapi-pathstrippathw).|
-|[ATLPath::StripToRoot](../atl/reference/atl-path-functions.md#striptoroot)|This function is an overloaded wrapper for [PathStripToRoot](/windows/win32/api/shlwapi/nf-shlwapi-pathstriptorootw).|
-|[ATLPath::UnquoteSpaces](../atl/reference/atl-path-functions.md#unquotespaces)|This function is an overloaded wrapper for [PathUnquoteSpaces](/windows/win32/api/shlwapi/nf-shlwapi-pathunquotespacesw).|
+| Name | Description |
+|--|--|
+| [AtlCanonicalizeUrl](../atl/reference/atl-http-utility-functions.md#atlcanonicalizeurl) | Call this function to canonicalize a URL, which includes converting unsafe characters and spaces into escape sequences. |
+| [AtlCombineUrl](../atl/reference/atl-http-utility-functions.md#atlcombineurl) | Call this function to combine a base URL and a relative URL into a single, canonical URL. |
+| [AtlEscapeUrl](../atl/reference/atl-http-utility-functions.md#atlescapeurl) | Call this function to convert all unsafe characters to escape sequences. |
+| [AtlGetDefaultUrlPort](../atl/reference/atl-http-utility-functions.md#atlgetdefaulturlport) | Call this function to get the default port number associated with a particular internet protocol or scheme. |
+| [AtlHexValue](../atl/reference/atl-text-encoding-functions.md#atlhexvalue) | Call this function to get the numeric value of a hexadecimal digit. |
+| [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/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). |
+| [ATLPath::Canonicalize](../atl/reference/atl-path-functions.md#canonicalize) | This function is an overloaded wrapper for [PathCanonicalize](/windows/win32/api/shlwapi/nf-shlwapi-pathcanonicalizew). |
+| [ATLPath::Combine](../atl/reference/atl-path-functions.md#combine) | This function is an overloaded wrapper for [PathCombine](/windows/win32/api/shlwapi/nf-shlwapi-pathcombinew). |
+| [ATLPath::CommonPrefix](../atl/reference/atl-path-functions.md#commonprefix) | This function is an overloaded wrapper for [PathCommonPrefix](/windows/win32/api/shlwapi/nf-shlwapi-pathcommonprefixw). |
+| [ATLPath::CompactPath](../atl/reference/atl-path-functions.md#compactpath) | This function is an overloaded wrapper for [PathCompactPath](/windows/win32/api/shlwapi/nf-shlwapi-pathcompactpathw). |
+| [ATLPath::CompactPathEx](../atl/reference/atl-path-functions.md#compactpathex) | This function is an overloaded wrapper for [PathCompactPathEx](/windows/win32/api/shlwapi/nf-shlwapi-pathcompactpathexw). |
+| [ATLPath::FileExists](../atl/reference/atl-path-functions.md#fileexists) | This function is an overloaded wrapper for [PathFileExists](/windows/win32/api/shlwapi/nf-shlwapi-pathfileexistsw). |
+| [ATLPath::FindExtension](../atl/reference/atl-path-functions.md#findextension) | This function is an overloaded wrapper for [PathFindExtension](/windows/win32/api/shlwapi/nf-shlwapi-pathfindextensionw). |
+| [ATLPath::FindFileName](../atl/reference/atl-path-functions.md#findfilename) | This function is an overloaded wrapper for [PathFindFileName](/windows/win32/api/shlwapi/nf-shlwapi-pathfindfilenamew). |
+| [ATLPath::GetDriveNumber](../atl/reference/atl-path-functions.md#getdrivenumber) | This function is an overloaded wrapper for [PathGetDriveNumber](/windows/win32/api/shlwapi/nf-shlwapi-pathgetdrivenumberw). |
+| [ATLPath::IsDirectory](../atl/reference/atl-path-functions.md#isdirectory) | This function is an overloaded wrapper for [PathIsDirectory](/windows/win32/api/shlwapi/nf-shlwapi-pathisdirectoryw). |
+| [ATLPath::IsFileSpec](../atl/reference/atl-path-functions.md#isfilespec) | This function is an overloaded wrapper for [PathIsFileSpec](/windows/win32/api/shlwapi/nf-shlwapi-pathisfilespecw). |
+| [ATLPath::IsPrefix](../atl/reference/atl-path-functions.md#isprefix) | This function is an overloaded wrapper for [PathIsPrefix](/windows/win32/api/shlwapi/nf-shlwapi-pathisprefixw). |
+| [ATLPath::IsRelative](../atl/reference/atl-path-functions.md#isrelative) | This function is an overloaded wrapper for [PathIsRelative](/windows/win32/api/shlwapi/nf-shlwapi-pathisrelativew). |
+| [ATLPath::IsRoot](../atl/reference/atl-path-functions.md#isroot) | This function is an overloaded wrapper for [PathIsRoot](/windows/win32/api/shlwapi/nf-shlwapi-pathisrootw). |
+| [ATLPath::IsSameRoot](../atl/reference/atl-path-functions.md#issameroot) | This function is an overloaded wrapper for [PathIsSameRoot](/windows/win32/api/shlwapi/nf-shlwapi-pathissamerootw). |
+| [ATLPath::IsUNC](../atl/reference/atl-path-functions.md#isunc) | This function is an overloaded wrapper for [PathIsUNC](/windows/win32/api/shlwapi/nf-shlwapi-pathisuncw). |
+| [ATLPath::IsUNCServer](../atl/reference/atl-path-functions.md#isuncserver) | This function is an overloaded wrapper for [PathIsUNCServer](/windows/win32/api/shlwapi/nf-shlwapi-pathisuncserverw). |
+| [ATLPath::IsUNCServerShare](../atl/reference/atl-path-functions.md#isuncservershare) | This function is an overloaded wrapper for [PathIsUNCServerShare](/windows/win32/api/shlwapi/nf-shlwapi-pathisuncserversharew). |
+| [ATLPath::MakePretty](../atl/reference/atl-path-functions.md#makepretty) | This function is an overloaded wrapper for [PathMakePretty](/windows/win32/api/shlwapi/nf-shlwapi-pathmakeprettyw). |
+| [ATLPath::MatchSpec](../atl/reference/atl-path-functions.md#matchspec) | This function is an overloaded wrapper for [PathMatchSpec](/windows/win32/api/shlwapi/nf-shlwapi-pathmatchspecw). |
+| [ATLPath::QuoteSpaces](../atl/reference/atl-path-functions.md#quotespaces) | This function is an overloaded wrapper for [PathQuoteSpaces](/windows/win32/api/shlwapi/nf-shlwapi-pathquotespacesw). |
+| [ATLPath::RelativePathTo](../atl/reference/atl-path-functions.md#relativepathto) | This function is an overloaded wrapper for [PathRelativePathTo](/windows/win32/api/shlwapi/nf-shlwapi-pathrelativepathtow). |
+| [ATLPath::RemoveArgs](../atl/reference/atl-path-functions.md#removeargs) | This function is an overloaded wrapper for [PathRemoveArgs](/windows/win32/api/shlwapi/nf-shlwapi-pathremoveargsw). |
+| [ATLPath::RemoveBackslash](../atl/reference/atl-path-functions.md#removebackslash) | This function is an overloaded wrapper for [PathRemoveBackslash](/windows/win32/api/shlwapi/nf-shlwapi-pathremovebackslashw). |
+| [ATLPath::RemoveBlanks](../atl/reference/atl-path-functions.md#removeblanks) | This function is an overloaded wrapper for [PathRemoveBlanks](/windows/win32/api/shlwapi/nf-shlwapi-pathremoveblanksw). |
+| [ATLPath::RemoveExtension](../atl/reference/atl-path-functions.md#removeextension) | This function is an overloaded wrapper for [PathRemoveExtension](/windows/win32/api/shlwapi/nf-shlwapi-pathremoveextensionw). |
+| [ATLPath::RemoveFileSpec](../atl/reference/atl-path-functions.md#removefilespec) | This function is an overloaded wrapper for [PathRemoveFileSpec](/windows/win32/api/shlwapi/nf-shlwapi-pathremovefilespecw). |
+| [ATLPath::RenameExtension](../atl/reference/atl-path-functions.md#renameextension) | This function is an overloaded wrapper for [PathRenameExtension](/windows/win32/api/shlwapi/nf-shlwapi-pathrenameextensionw). |
+| [ATLPath::SkipRoot](../atl/reference/atl-path-functions.md#skiproot) | This function is an overloaded wrapper for [PathSkipRoot](/windows/win32/api/shlwapi/nf-shlwapi-pathskiprootw). |
+| [ATLPath::StripPath](../atl/reference/atl-path-functions.md#strippath) | This function is an overloaded wrapper for [PathStripPath](/windows/win32/api/shlwapi/nf-shlwapi-pathstrippathw). |
+| [ATLPath::StripToRoot](../atl/reference/atl-path-functions.md#striptoroot) | This function is an overloaded wrapper for [PathStripToRoot](/windows/win32/api/shlwapi/nf-shlwapi-pathstriptorootw). |
+| [ATLPath::UnquoteSpaces](../atl/reference/atl-path-functions.md#unquotespaces) | This function is an overloaded wrapper for [PathUnquoteSpaces](/windows/win32/api/shlwapi/nf-shlwapi-pathunquotespacesw). |
## See also
-[Concepts](../atl/active-template-library-atl-concepts.md)
-[ATL COM Desktop Components](../atl/atl-com-desktop-components.md)
+[Concepts](../atl/active-template-library-atl-concepts.md)\
+[ATL COM desktop components](../atl/atl-com-desktop-components.md)
diff --git a/docs/atl/atl-window-classes.md b/docs/atl/atl-window-classes.md
index ba9f1581bc..bf9968a031 100644
--- a/docs/atl/atl-window-classes.md
+++ b/docs/atl/atl-window-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Window Classes"
title: "ATL Window Classes"
ms.date: "11/04/2016"
helpviewer_keywords: ["ATL, windows", "windows [C++], subclassing", "windows [C++], superclassing", "windows [C++], ATL", "subclassing ATL window classes", "superclassing", "superclassing, ATL"]
diff --git a/docs/atl/benefits-and-tradeoffs-of-the-method-used-to-link-to-the-crt.md b/docs/atl/benefits-and-tradeoffs-of-the-method-used-to-link-to-the-crt.md
index 74f7c7ba94..d84c7e8e63 100644
--- a/docs/atl/benefits-and-tradeoffs-of-the-method-used-to-link-to-the-crt.md
+++ b/docs/atl/benefits-and-tradeoffs-of-the-method-used-to-link-to-the-crt.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Benefits and Tradeoffs of the Method Used to Link to the CRT"
title: "Benefits and Tradeoffs of the Method Used to Link to the CRT"
ms.date: "05/06/2019"
helpviewer_keywords: ["_ATL_MIN_CRT macro"]
diff --git a/docs/atl/building-and-testing-the-atl-project.md b/docs/atl/building-and-testing-the-atl-project.md
index d3339460f5..d5920c6e59 100644
--- a/docs/atl/building-and-testing-the-atl-project.md
+++ b/docs/atl/building-and-testing-the-atl-project.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Building and Testing the ATL Project"
title: "Building and Testing the ATL Project"
ms.date: "11/04/2016"
helpviewer_keywords: ["composite controls, building and testing the project", "composite controls, containers for"]
ms.assetid: 5c1541f8-f6cb-4c22-bd22-c66bcfbaa077
+ms.topic: concept-article
---
# Building and Testing the ATL Project
diff --git a/docs/atl/calling-cpp-code-from-dhtml.md b/docs/atl/calling-cpp-code-from-dhtml.md
index 6076a5b4cc..a5d05fe09e 100644
--- a/docs/atl/calling-cpp-code-from-dhtml.md
+++ b/docs/atl/calling-cpp-code-from-dhtml.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Calling C++ Code from DHTML"
title: "Calling C++ Code from DHTML"
ms.date: "11/04/2016"
helpviewer_keywords: ["DHTML, calling C++ code from"]
ms.assetid: 37329acd-4c22-40ca-a85a-b7480748f75f
+ms.topic: concept-article
---
# Calling C++ Code from DHTML
diff --git a/docs/atl/catlservicemodulet-handler-function.md b/docs/atl/catlservicemodulet-handler-function.md
index 57221734e1..a2da13bec8 100644
--- a/docs/atl/catlservicemodulet-handler-function.md
+++ b/docs/atl/catlservicemodulet-handler-function.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlServiceModuleT::Handler Function"
title: "CAtlServiceModuleT::Handler Function"
ms.date: "11/04/2016"
helpviewer_keywords: ["Handler method"]
diff --git a/docs/atl/catlservicemodulet-run-function.md b/docs/atl/catlservicemodulet-run-function.md
index 874515b205..9471ee390a 100644
--- a/docs/atl/catlservicemodulet-run-function.md
+++ b/docs/atl/catlservicemodulet-run-function.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlServiceModuleT::Run Function"
title: "CAtlServiceModuleT::Run Function"
ms.date: "11/04/2016"
helpviewer_keywords: ["ATL services, security"]
diff --git a/docs/atl/catlservicemodulet-servicemain-function.md b/docs/atl/catlservicemodulet-servicemain-function.md
index df9815a77d..f3cfffa7fd 100644
--- a/docs/atl/catlservicemodulet-servicemain-function.md
+++ b/docs/atl/catlservicemodulet-servicemain-function.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlServiceModuleT::ServiceMain Function"
title: "CAtlServiceModuleT::ServiceMain Function"
ms.date: "11/04/2016"
helpviewer_keywords: ["ServiceMain method"]
diff --git a/docs/atl/catlservicemodulet-start-function.md b/docs/atl/catlservicemodulet-start-function.md
index e097dd6df0..920857413d 100644
--- a/docs/atl/catlservicemodulet-start-function.md
+++ b/docs/atl/catlservicemodulet-start-function.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlServiceModuleT::Start Function"
title: "CAtlServiceModuleT::Start Function"
ms.date: "11/04/2016"
helpviewer_keywords: ["Start method"]
diff --git a/docs/atl/changing-the-default-class-factory-and-aggregation-model.md b/docs/atl/changing-the-default-class-factory-and-aggregation-model.md
index 2beb7ceea4..78b9ca1c8a 100644
--- a/docs/atl/changing-the-default-class-factory-and-aggregation-model.md
+++ b/docs/atl/changing-the-default-class-factory-and-aggregation-model.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Changing the Default Class Factory and Aggregation Model"
title: "Changing the Default Class Factory and Aggregation Model"
ms.date: "11/04/2016"
helpviewer_keywords: ["CComClassFactory class, making the default", "aggregation [C++], using ATL", "aggregation [C++], aggregation models", "defaults [C++], aggregation model in ATL", "default class factory", "class factories, changing default", "CComCoClass class, default class factory and aggregation model", "default class factory, ATL", "defaults [C++], class factory"]
ms.assetid: 6e040e95-0f38-4839-8a8b-c9800dd47e8c
+ms.topic: concept-article
---
# Changing the Default Class Factory and Aggregation Model
diff --git a/docs/atl/changing-the-drawing-code-atl-tutorial-part-4.md b/docs/atl/changing-the-drawing-code-atl-tutorial-part-4.md
index 2a82dd5ee0..2ed4a960e6 100644
--- a/docs/atl/changing-the-drawing-code-atl-tutorial-part-4.md
+++ b/docs/atl/changing-the-drawing-code-atl-tutorial-part-4.md
@@ -1,9 +1,11 @@
---
+description: "Learn more about: Changing the Drawing Code (ATL Tutorial, Part 4)"
title: "Changing the Drawing Code (ATL Tutorial, Part 4)"
ms.custom: "get-started-article"
ms.date: "09/26/2018"
helpviewer_keywords: ["_ATL_MIN_CRT macro"]
ms.assetid: 08ff14e8-aa49-4139-a110-5d071939cf1e
+ms.topic: tutorial
---
# Changing the Drawing Code (ATL Tutorial, Part 4)
@@ -150,7 +152,7 @@ After adding `FireViewChange`, rebuild and try the control again in the ActiveX
In the next step, you will add an event.
-[Back to Step 3](../atl/adding-a-property-to-the-control-atl-tutorial-part-3.md) | [On to Step 5](../atl/adding-an-event-atl-tutorial-part-5.md)
+[Back to Step 3](../atl/adding-a-property-to-the-control-atl-tutorial-part-3.md) \| [On to Step 5](../atl/adding-an-event-atl-tutorial-part-5.md)
## See also
diff --git a/docs/atl/class-factories-classes.md b/docs/atl/class-factories-classes.md
index 3ece2e4af1..15bda12d38 100644
--- a/docs/atl/class-factories-classes.md
+++ b/docs/atl/class-factories-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Class Factories Classes"
title: " ATL Class Factories Classes"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/class-information-classes.md b/docs/atl/class-information-classes.md
index f14f672583..4f4b3f3158 100644
--- a/docs/atl/class-information-classes.md
+++ b/docs/atl/class-information-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Class Information Classes"
title: "Class Information Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/codesnippet/CPP/atl-collection-classes_1.cpp b/docs/atl/codesnippet/CPP/atl-collection-classes_1.cpp
index 876ad2f58c..baa1deb220 100644
--- a/docs/atl/codesnippet/CPP/atl-collection-classes_1.cpp
+++ b/docs/atl/codesnippet/CPP/atl-collection-classes_1.cpp
@@ -29,7 +29,7 @@ class MyTraits : public CElementTraits< MyData >
return true;
else
return false;
- };
+ }
};
void DoAtlCustomTraitsList()
diff --git a/docs/atl/collection-classes.md b/docs/atl/collection-classes.md
index 376ec684e2..0545b6d29b 100644
--- a/docs/atl/collection-classes.md
+++ b/docs/atl/collection-classes.md
@@ -1,5 +1,6 @@
---
-title: "ATL Collection Classes"
+description: "Learn more about: Collection Classes"
+title: "Collection classes in ATL"
ms.date: "11/04/2016"
ms.topic: "reference"
helpviewer_keywords: ["collection classes"]
@@ -79,7 +80,7 @@ The following classes provide support for arrays, lists, maps, and also traits m
## Related Articles
-[ATL Collection Classes](../atl/atl-collection-classes.md)
+[ATL collection class overview](../atl/atl-collection-classes.md)
## See also
diff --git a/docs/atl/com-modules-classes.md b/docs/atl/com-modules-classes.md
index 2cbad8fb7e..4c4671f123 100644
--- a/docs/atl/com-modules-classes.md
+++ b/docs/atl/com-modules-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: COM Modules Classes"
title: "COM Modules Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/commandhandler.md b/docs/atl/commandhandler.md
index cf7a2fcd68..6ad29accfb 100644
--- a/docs/atl/commandhandler.md
+++ b/docs/atl/commandhandler.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CommandHandler"
title: "CommandHandler"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/composite-controls-classes.md b/docs/atl/composite-controls-classes.md
index 4b612e947d..0e45651cc8 100644
--- a/docs/atl/composite-controls-classes.md
+++ b/docs/atl/composite-controls-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Composite Controls Classes"
title: "Composite Controls Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/connection-points-classes.md b/docs/atl/connection-points-classes.md
index f510c8eae9..52b73a0103 100644
--- a/docs/atl/connection-points-classes.md
+++ b/docs/atl/connection-points-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Connection Points Classes"
title: "Connection Points Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/control-containment-classes.md b/docs/atl/control-containment-classes.md
index 169acafc7f..1446101b69 100644
--- a/docs/atl/control-containment-classes.md
+++ b/docs/atl/control-containment-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Control Containment Classes"
title: "Control Containment Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
@@ -19,7 +20,7 @@ The following classes provide containment support for hosting controls:
## Related Articles
-[ATL Control Containment FAQ](../atl/atl-control-containment-faq.md)
+[ATL Control Containment FAQ](../atl/atl-control-containment-faq.yml)
## See also
diff --git a/docs/atl/controls-general-support-classes.md b/docs/atl/controls-general-support-classes.md
index 8172840341..fdb016140e 100644
--- a/docs/atl/controls-general-support-classes.md
+++ b/docs/atl/controls-general-support-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Controls: General Support Classes"
title: "ATL Controls: General Support Classes"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/creating-an-aggregated-object.md b/docs/atl/creating-an-aggregated-object.md
index bad5079b3a..f0bc8d88b2 100644
--- a/docs/atl/creating-an-aggregated-object.md
+++ b/docs/atl/creating-an-aggregated-object.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Creating an Aggregated Object"
title: "Creating an Aggregated Object"
ms.date: "11/04/2016"
helpviewer_keywords: ["aggregation [C++], creating aggregated objects", "aggregate objects [C++], creating"]
ms.assetid: fc29d7aa-fd53-4276-9c2f-37379f71b179
+ms.topic: how-to
---
# Creating an Aggregated Object
diff --git a/docs/atl/creating-an-atl-dhtml-control.md b/docs/atl/creating-an-atl-dhtml-control.md
index fa81467ac6..1831d58d0b 100644
--- a/docs/atl/creating-an-atl-dhtml-control.md
+++ b/docs/atl/creating-an-atl-dhtml-control.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Creating an ATL DHTML Control"
title: "Creating an ATL DHTML Control"
ms.date: "11/04/2016"
helpviewer_keywords: ["HTML controls, creating", "DHTML controls", "DHTML controls, creating"]
ms.assetid: 1d8f0ede-7d8b-4959-976e-b4d0e2a87f5a
+ms.topic: how-to
---
# Creating an ATL DHTML Control
diff --git a/docs/atl/creating-registrar-scripts.md b/docs/atl/creating-registrar-scripts.md
index 2ee26a8fbc..d9d281b53a 100644
--- a/docs/atl/creating-registrar-scripts.md
+++ b/docs/atl/creating-registrar-scripts.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Creating Registrar scripts"
title: "Creating scripts for ATL Registrar"
ms.date: "05/14/2014"
helpviewer_keywords: ["scripting, registry scripting", "ATL, registry", "registrar scripts [ATL]", "scripts, Registrar scripts", "scripts, creating"]
ms.assetid: cbd5024b-8061-4a71-be65-7fee90374a35
+ms.topic: concept-article
---
# Creating Registrar scripts
diff --git a/docs/atl/creating-the-project-atl-tutorial-part-1.md b/docs/atl/creating-the-project-atl-tutorial-part-1.md
index 273f619ece..b8a01fd225 100644
--- a/docs/atl/creating-the-project-atl-tutorial-part-1.md
+++ b/docs/atl/creating-the-project-atl-tutorial-part-1.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Creating the Project (ATL Tutorial, Part 1)"
title: "Creating the Project (ATL Tutorial, Part 1)"
ms.custom: "get-started-article"
ms.date: "08/19/2019"
ms.assetid: f6b727d1-390a-4b27-b82f-daadcd9fc059
+ms.topic: tutorial
---
# Creating the Project (ATL Tutorial, Part 1)
@@ -44,7 +46,7 @@ This tutorial walks you step-by-step through a non-attributed ATL project that c
Visual Studio will create the project by generating several files. You can view these files in **Solution Explorer** by expanding the `Polygon` object. The files are listed below.
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
|File|Description|
|----------|-----------------|
@@ -60,7 +62,7 @@ Visual Studio will create the project by generating several files. You can view
::: moniker-end
-::: moniker range=">=vs-2019"
+::: moniker range=">=msvc-160"
|File|Description|
|----------|-----------------|
diff --git a/docs/atl/data-transfer-classes.md b/docs/atl/data-transfer-classes.md
index a6bcf766ad..67709a809c 100644
--- a/docs/atl/data-transfer-classes.md
+++ b/docs/atl/data-transfer-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Data Transfer Classes"
title: "Data Transfer Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/data-types-classes.md b/docs/atl/data-types-classes.md
index a89b474781..85d986bad8 100644
--- a/docs/atl/data-types-classes.md
+++ b/docs/atl/data-types-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Data Types Classes"
title: "Data Types Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/dcomcnfg.md b/docs/atl/dcomcnfg.md
index 4ebd1c3d8d..0a0468d6a5 100644
--- a/docs/atl/dcomcnfg.md
+++ b/docs/atl/dcomcnfg.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: DCOMCNFG"
title: "DCOMCNFG"
ms.date: "11/04/2016"
helpviewer_keywords: ["DCOMCNFG utility", "DCOM, configuring in ATL"]
diff --git a/docs/atl/debugging-and-exceptions-classes.md b/docs/atl/debugging-and-exceptions-classes.md
index e32ebc13f9..703972808b 100644
--- a/docs/atl/debugging-and-exceptions-classes.md
+++ b/docs/atl/debugging-and-exceptions-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Debugging and Exceptions Classes"
title: "Debugging and Exceptions Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/debugging-tips.md b/docs/atl/debugging-tips.md
index 8f33d4d9ff..5fcdee636d 100644
--- a/docs/atl/debugging-tips.md
+++ b/docs/atl/debugging-tips.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Debugging Tips"
title: "Debugging Tips (ATL)"
ms.date: "11/04/2016"
helpviewer_keywords: ["ATL, debugging", "services, debugging"]
ms.assetid: 48c60244-d0ce-4466-85fa-6fa65fcfe86c
+ms.topic: concept-article
---
# Debugging Tips
diff --git a/docs/atl/design-principles-for-collection-and-enumerator-interfaces.md b/docs/atl/design-principles-for-collection-and-enumerator-interfaces.md
index 609edc37cc..e75179b64e 100644
--- a/docs/atl/design-principles-for-collection-and-enumerator-interfaces.md
+++ b/docs/atl/design-principles-for-collection-and-enumerator-interfaces.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Design Principles for Collection and Enumerator Interfaces"
title: "Designing Collection and Enumerator Interfaces (ATL)"
ms.date: "11/04/2016"
helpviewer_keywords: ["enumerator interfaces", "collection interfaces"]
ms.assetid: ea19a39e-6333-41a1-be62-5435c236640e
+ms.topic: concept-article
---
# Design Principles for Collection and Enumerator Interfaces
diff --git a/docs/atl/displaying-assertions.md b/docs/atl/displaying-assertions.md
index c051bef184..8587c3eb40 100644
--- a/docs/atl/displaying-assertions.md
+++ b/docs/atl/displaying-assertions.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Displaying Assertions"
title: "Displaying Assertions"
ms.date: "05/05/2019"
helpviewer_keywords: ["debugging [ATL], displaying assertions", "assertions, displaying", "debugging assertions", "assertions, debugging"]
ms.assetid: fa353fe8-4656-4384-a5d2-8866bc977f06
+ms.topic: concept-article
---
# Displaying Assertions
diff --git a/docs/atl/dual-interfaces-and-atl.md b/docs/atl/dual-interfaces-and-atl.md
index 579b4eb081..2039cb3e12 100644
--- a/docs/atl/dual-interfaces-and-atl.md
+++ b/docs/atl/dual-interfaces-and-atl.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Dual Interfaces and ATL"
title: "Dual Interfaces and ATL"
ms.date: "11/04/2016"
helpviewer_keywords: ["COM, and ATL", "ATL, dual interfaces", "dual interfaces, about dual interfaces"]
diff --git a/docs/atl/dual-interfaces-and-events.md b/docs/atl/dual-interfaces-and-events.md
index e6f9af8b2a..a0a520b396 100644
--- a/docs/atl/dual-interfaces-and-events.md
+++ b/docs/atl/dual-interfaces-and-events.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Dual Interfaces and Events"
title: "Dual Interfaces and Events"
ms.date: "11/04/2016"
helpviewer_keywords: ["events [C++], dual interfaces", "dual interfaces, events"]
diff --git a/docs/atl/dual-interfaces-classes.md b/docs/atl/dual-interfaces-classes.md
index 08c1e543c5..b675565549 100644
--- a/docs/atl/dual-interfaces-classes.md
+++ b/docs/atl/dual-interfaces-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Dual Interfaces Classes"
title: "Dual Interfaces Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/enumerators-and-collections-classes.md b/docs/atl/enumerators-and-collections-classes.md
index 2a383e12a1..6ccef203df 100644
--- a/docs/atl/enumerators-and-collections-classes.md
+++ b/docs/atl/enumerators-and-collections-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Enumerators and Collections Classes"
title: "Enumerators and Collections Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/error-information-classes.md b/docs/atl/error-information-classes.md
index 45367457f8..5a2a987385 100644
--- a/docs/atl/error-information-classes.md
+++ b/docs/atl/error-information-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Error Information Classes"
title: "Error Information Classe (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/event-handling-and-atl.md b/docs/atl/event-handling-and-atl.md
index eca0b20a5c..649b68042c 100644
--- a/docs/atl/event-handling-and-atl.md
+++ b/docs/atl/event-handling-and-atl.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Event Handling and ATL"
title: "Event Handling and ATL"
ms.date: "11/04/2016"
helpviewer_keywords: ["event handling, about event handling"]
diff --git a/docs/atl/event-handling-principles.md b/docs/atl/event-handling-principles.md
index e6eb057965..41c766a5e7 100644
--- a/docs/atl/event-handling-principles.md
+++ b/docs/atl/event-handling-principles.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Event Handling Principles"
title: "Event Handling Principles (ATL)"
ms.date: "11/04/2016"
helpviewer_keywords: ["event handling, implementing", "event handling, advising event sources", "interfaces, event and event sink", "dual interfaces, event interfaces", "event handling, dual event interfaces"]
diff --git a/docs/atl/example-implementing-a-property-page.md b/docs/atl/example-implementing-a-property-page.md
index 4943243c88..6e7ee66751 100644
--- a/docs/atl/example-implementing-a-property-page.md
+++ b/docs/atl/example-implementing-a-property-page.md
@@ -1,18 +1,20 @@
---
+description: "Learn more about: Example: Implementing a Property Page"
title: "Implementing a Property Page (ATL)"
ms.date: "05/09/2019"
helpviewer_keywords: ["property pages, implementing"]
ms.assetid: c30b67fe-ce08-4249-ae29-f3060fa8d61e
+ms.topic: how-to
---
# Example: Implementing a Property Page
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
The ATL Property Page wizard is not available in Visual Studio 2019 and later.
::: moniker-end
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
This example shows how to build a property page that displays (and allows you to change) properties of the [Document Classes](../mfc/document-classes.md) interface.
@@ -59,7 +61,7 @@ Click **OK** to have the wizard generate your property page.
Now that your property page has been generated, you'll need to add a few controls to the dialog resource representing your page. Add an edit box, a static text control, and a check box and set their IDs as shown below:
-
+
These controls will be used to display the file name of the document and its read-only status.
@@ -126,7 +128,7 @@ When users want to apply their changes to the objects, the property page site wi
To display this page, you need to create a simple helper object. The helper object will provide a method that simplifies the `OleCreatePropertyFrame` API for displaying a single page connected to a single object. This helper will be designed so that it can be used from Visual Basic.
-Use the [Add Class dialog box](../ide/add-class-dialog-box.md) and the [ATL Simple Object Wizard](../atl/reference/atl-simple-object-wizard.md) to generate a new class and use `Helper` as its short name. Once created, add a method as shown in the table below.
+Use the [Add Class dialog box](../ide/adding-a-class-visual-cpp.md#add-class-dialog-box) and the [ATL Simple Object Wizard](../atl/reference/atl-simple-object-wizard.md) to generate a new class and use `Helper` as its short name. Once created, add a method as shown in the table below.
|Item|Value|
|----------|-----------|
diff --git a/docs/atl/file-handling-classes.md b/docs/atl/file-handling-classes.md
index e885c8ed64..22602083ec 100644
--- a/docs/atl/file-handling-classes.md
+++ b/docs/atl/file-handling-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: File Handling Classes"
title: "File Handling Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/fundamentals-of-atl-com-objects.md b/docs/atl/fundamentals-of-atl-com-objects.md
index 9e1f771156..afc7adb434 100644
--- a/docs/atl/fundamentals-of-atl-com-objects.md
+++ b/docs/atl/fundamentals-of-atl-com-objects.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Fundamentals of ATL COM Objects"
title: "Fundamentals of ATL COM Objects"
ms.date: "11/19/2018"
helpviewer_keywords: ["COM, and ATL", "ATL, COM", "ATL COM objects", "COM objects, ATL"]
@@ -8,7 +9,7 @@ ms.assetid: 0f9c9d98-cc28-45da-89ac-dc94cee422fe
The following illustration depicts the relationship among the classes and interfaces that are used to define an ATL COM object.
-
+
> [!NOTE]
> This diagram shows that `CComObject` is derived from `CYourClass` whereas `CComAggObject` and `CComPolyObject` include `CYourClass` as a member variable.
diff --git a/docs/atl/identifying-the-elements-of-the-dhtml-control-project.md b/docs/atl/identifying-the-elements-of-the-dhtml-control-project.md
index 34a2306c55..7ac825b837 100644
--- a/docs/atl/identifying-the-elements-of-the-dhtml-control-project.md
+++ b/docs/atl/identifying-the-elements-of-the-dhtml-control-project.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Identifying the Elements of the DHTML Control Project"
title: "Identifying the Elements of the DHTML Control Project"
ms.date: "11/19/2018"
helpviewer_keywords: ["HTML controls, ATL support", "DHTML controls, ATL support"]
ms.assetid: b627547a-3768-4346-9900-4b7a21fb8e27
+ms.topic: concept-article
---
# Identifying the Elements of the DHTML Control Project
@@ -18,7 +20,7 @@ A DHTML control is similar to any ATL control, except:
The following graphic illustrates the relationship between your DLL, the DHTML control, the Web browser, and the HTML resource.
-
+
> [!NOTE]
> The names on this graphic are placeholders. The names of your HTML resource and the interfaces exposed on your control are based on the names you assign them in the ATL Control Wizard.
@@ -39,7 +41,7 @@ In this graphic, the elements are:
The ATL Control Wizard generates a control with default code in both the HTML resource and the .cpp file. You can compile and run the control as generated by the wizard, and then view the control in either the Web browser or the ActiveX Control Test Container. The picture below shows the default ATL DHTML control with three buttons displayed in Test Container:
-
+
See [Creating an ATL DHTML Control](../atl/creating-an-atl-dhtml-control.md) to get started building a DHTML control. See [Testing Properties and Events with Test Container](../mfc/testing-properties-and-events-with-test-container.md) for information on how to access Test Container.
diff --git a/docs/atl/implementing-a-dialog-box.md b/docs/atl/implementing-a-dialog-box.md
index 3891be279b..c84428bea5 100644
--- a/docs/atl/implementing-a-dialog-box.md
+++ b/docs/atl/implementing-a-dialog-box.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Implementing a Dialog Box"
title: "Implementing a Dialog Box"
ms.date: "11/04/2016"
helpviewer_keywords: ["CSimpleDialog class, implementing dialog boxes in ATL", "dialog boxes, ATL", "CAxDialogImpl class, implementing dialog boxes in ATL", "ATL, dialog boxes"]
ms.assetid: 478525f2-aa6a-435a-b162-68fc8aa98a8e
+ms.topic: how-to
---
# Implementing a Dialog Box
@@ -10,7 +12,7 @@ There are two ways to add a dialog box to your ATL project: use the ATL Dialog W
## Adding a Dialog Box with the ATL Dialog Wizard
-In the [Add Class dialog box](../ide/add-class-dialog-box.md), select the ATL Dialog object to add a dialog box to your ATL project. Fill in the ATL Dialog Wizard as appropriate and click **Finish**. The wizard adds a class derived from [CAxDialogImpl](../atl/reference/caxdialogimpl-class.md) to your project. Open **Resource View** from the **View** menu, locate your dialog, and double-click it to open it in the resource editor.
+In the [Add Class dialog box](../ide/adding-a-class-visual-cpp.md#add-class-dialog-box), select the ATL Dialog object to add a dialog box to your ATL project. Fill in the ATL Dialog Wizard as appropriate and click **Finish**. The wizard adds a class derived from [CAxDialogImpl](../atl/reference/caxdialogimpl-class.md) to your project. Open **Resource View** from the **View** menu, locate your dialog, and double-click it to open it in the resource editor.
> [!NOTE]
> If your dialog box is derived from `CAxDialogImpl`, it can host both ActiveX and Windows controls. If you don't want the overhead of ActiveX control support in your dialog box class, use [CSimpleDialog](../atl/reference/csimpledialog-class.md) or [CDialogImpl](../atl/reference/cdialogimpl-class.md) instead.
diff --git a/docs/atl/implementing-a-dual-interface.md b/docs/atl/implementing-a-dual-interface.md
index ca04fc66bd..6abd84d51b 100644
--- a/docs/atl/implementing-a-dual-interface.md
+++ b/docs/atl/implementing-a-dual-interface.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Implementing a Dual Interface"
title: "Implementing a Dual Interface (ATL)"
ms.date: "11/04/2016"
helpviewer_keywords: ["IDispatchImpl class, implementing dual interfaces", "dual interfaces, implementing"]
ms.assetid: d1da3633-b445-4dcd-8a0a-3efdafada3ea
+ms.topic: concept-article
---
# Implementing a Dual Interface
@@ -22,7 +24,7 @@ To use this class:
## ATL Simple Object Wizard
-If you want to create a new interface and a new class to implement it, you can use the [ATL Add Class dialog box](../ide/add-class-dialog-box.md), and then the [ATL Simple Object Wizard](../atl/reference/atl-simple-object-wizard.md).
+If you want to create a new interface and a new class to implement it, you can use the [ATL Add Class dialog box](../ide/adding-a-class-visual-cpp.md#add-class-dialog-box), and then the [ATL Simple Object Wizard](../atl/reference/atl-simple-object-wizard.md).
## Implement Interface Wizard
diff --git a/docs/atl/implementing-a-window-with-cwindowimpl.md b/docs/atl/implementing-a-window-with-cwindowimpl.md
index 5cbe34ac7a..be0f590b83 100644
--- a/docs/atl/implementing-a-window-with-cwindowimpl.md
+++ b/docs/atl/implementing-a-window-with-cwindowimpl.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Implementing a Window with CWindowImpl"
title: "Implementing a Window with CWindowImpl"
ms.date: "11/04/2016"
helpviewer_keywords: ["ATL, windows", "windows [C++], subclassing", "windows [C++], superclassing", "windows [C++], ATL", "subclassing ATL window classes", "superclassing, ATL"]
ms.assetid: 3fc40550-f1d6-4702-8b7c-4cf682b6a855
+ms.topic: how-to
---
# Implementing a Window with CWindowImpl
@@ -21,7 +23,7 @@ To implement a window, derive a class from `CWindowImpl`. In your derived class,
> [!NOTE]
> `CWindowImpl` passes NULL to the `DECLARE_WND_CLASS` macro, which means ATL will generate a Windows class name. To specify your own name, pass a string to DECLARE_WND_CLASS in your `CWindowImpl`-derived class.
-## Example
+## Example: Implement a window
Following is an example of a class that implements a window based on a new Windows class:
@@ -38,7 +40,7 @@ The [DECLARE_WND_SUPERCLASS](reference/window-class-macros.md#declare_wnd_superc
When you use DECLARE_WND_SUPERCLASS, a new Windows class will be registered. This new class will be the same as the existing class you specify, but will replace the window procedure with `CWindowImpl::WindowProc` (or with your function that overrides this method).
-## Example
+## Example: Superclass the Edit class
Following is an example of a class that superclasses the standard Edit class:
diff --git a/docs/atl/implementing-a-window.md b/docs/atl/implementing-a-window.md
index 4c17826598..dbe42c3fbc 100644
--- a/docs/atl/implementing-a-window.md
+++ b/docs/atl/implementing-a-window.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Implementing a Window"
title: "Implementing a Window (ATL)"
ms.date: "11/04/2016"
helpviewer_keywords: ["ATL, windows", "CWindowImpl class, using", "windows [C++], implementing in ATL"]
ms.assetid: eb1ce8d6-72f9-4894-aae7-e60a61665628
+ms.topic: concept-article
---
# Implementing a Window
diff --git a/docs/atl/implementing-an-stl-based-collection.md b/docs/atl/implementing-an-stl-based-collection.md
index f686100a78..761ef740d1 100644
--- a/docs/atl/implementing-an-stl-based-collection.md
+++ b/docs/atl/implementing-an-stl-based-collection.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Implementing a C++ Standard Library-Based Collection"
title: "Implementing a C++ Standard Library-Based Collection"
ms.date: "11/04/2016"
helpviewer_keywords: ["ICollectionOnSTLImpl interface"]
ms.assetid: 6d49f819-1957-4813-b074-3f12c494d8ca
+ms.topic: how-to
---
# Implementing a C++ Standard Library-Based Collection
diff --git a/docs/atl/implementing-ccomobject-ccomaggobject-and-ccompolyobject.md b/docs/atl/implementing-ccomobject-ccomaggobject-and-ccompolyobject.md
index 562e357eb9..e7a6428fba 100644
--- a/docs/atl/implementing-ccomobject-ccomaggobject-and-ccompolyobject.md
+++ b/docs/atl/implementing-ccomobject-ccomaggobject-and-ccompolyobject.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Implementing CComObject, CComAggObject, and CComPolyObject"
title: "Implementing CComObject, CComAggObject, and CComPolyObject"
ms.date: "11/04/2016"
helpviewer_keywords: ["CComPolyObject class, implementing", "CreateInstance method", "CComAggObject class", "CComObject class, implementing"]
ms.assetid: 5aabe938-104d-492e-9c41-9f7fb1c62098
+ms.topic: concept-article
---
# Implementing CComObject, CComAggObject, and CComPolyObject
diff --git a/docs/atl/implementing-ccomobjectrootex.md b/docs/atl/implementing-ccomobjectrootex.md
index 2d85e51114..5dc0fc19ca 100644
--- a/docs/atl/implementing-ccomobjectrootex.md
+++ b/docs/atl/implementing-ccomobjectrootex.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Implementing CComObjectRootEx"
title: "Implementing CComObjectRootEx"
ms.date: "11/04/2016"
helpviewer_keywords: ["CComObjectRoot class, implementing", "CComObjectRootEx class"]
ms.assetid: 79630c44-f2df-4e9e-b730-400a0ebfbd2b
+ms.topic: concept-article
---
# Implementing CComObjectRootEx
diff --git a/docs/atl/implementing-property-pages.md b/docs/atl/implementing-property-pages.md
index eae6114c64..d9e3b0942c 100644
--- a/docs/atl/implementing-property-pages.md
+++ b/docs/atl/implementing-property-pages.md
@@ -1,26 +1,28 @@
---
+description: "Learn more about: Implementing Property Pages"
title: "Implementing Property Pages"
ms.date: "11/04/2016"
helpviewer_keywords: ["IPropertyPage2 class", "IPropertyPage class", "property pages, implementing"]
ms.assetid: 62f29440-33a7-40eb-a1ef-3634c95f640c
+ms.topic: how-to
---
# Implementing Property Pages
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
The ATL Property Page wizard is not available in Visual Studio 2019 and later.
::: moniker-end
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
-Property pages are COM objects that implement the `IPropertyPage` or `IPropertyPage2` interface. ATL provides support for implementing property pages through the [ATL Property Page Wizard](../atl/reference/atl-property-page-wizard.md) in the [Add Class dialog box](../ide/add-class-dialog-box.md).
+Property pages are COM objects that implement the `IPropertyPage` or `IPropertyPage2` interface. ATL provides support for implementing property pages through the [ATL Property Page Wizard](../atl/reference/atl-property-page-wizard.md) in the [Add Class dialog box](../ide/adding-a-class-visual-cpp.md#add-class-dialog-box).
To create a property page using ATL:
- Create or open an ATL Dynamic-link library (DLL) server project.
-- Open the [Add Class dialog box](../ide/add-class-dialog-box.md) and select **ATL Property Page**.
+- Open the [Add Class dialog box](../ide/adding-a-class-visual-cpp.md#add-class-dialog-box) and select **ATL Property Page**.
- Make sure your property page is apartment threaded (since it has a user interface).
diff --git a/docs/atl/implementing-the-event-handling-interface.md b/docs/atl/implementing-the-event-handling-interface.md
index a03b89112e..3442039a73 100644
--- a/docs/atl/implementing-the-event-handling-interface.md
+++ b/docs/atl/implementing-the-event-handling-interface.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Implementing the Event Handling Interface"
title: "Implementing the Event Handling Interface"
ms.date: "11/04/2016"
helpviewer_keywords: ["ATL, event handling", "event handling, ATL", "interfaces, event and event sink"]
ms.assetid: eb2a5b33-88dc-4ce3-bee0-c5c38ea050d7
+ms.topic: concept-article
---
# Implementing the Event Handling Interface
diff --git a/docs/atl/inserting-a-composite-control.md b/docs/atl/inserting-a-composite-control.md
index f3a858cd59..ad1f4f6dc2 100644
--- a/docs/atl/inserting-a-composite-control.md
+++ b/docs/atl/inserting-a-composite-control.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Inserting a Composite Control"
title: "Inserting a Composite Control"
ms.date: "11/04/2016"
helpviewer_keywords: ["composite controls, inserting with ATL Object Wizard", "composite controls", "ATL Control Wizard"]
ms.assetid: f10b1927-9fc6-40a7-ac29-efdac70584fe
+ms.topic: how-to
---
# Inserting a Composite Control
diff --git a/docs/atl/interface-pointers-classes.md b/docs/atl/interface-pointers-classes.md
index 8b42ea1f04..d54f0ad4aa 100644
--- a/docs/atl/interface-pointers-classes.md
+++ b/docs/atl/interface-pointers-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Interface Pointers Classes"
title: "Interface Pointers Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/interfaces-atl.md b/docs/atl/interfaces-atl.md
index 348538be30..93422d3cd2 100644
--- a/docs/atl/interfaces-atl.md
+++ b/docs/atl/interfaces-atl.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Interfaces (ATL)"
title: "Interfaces (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/introduction-to-atl-window-classes.md b/docs/atl/introduction-to-atl-window-classes.md
index c67170245b..5ae3fc8c8a 100644
--- a/docs/atl/introduction-to-atl-window-classes.md
+++ b/docs/atl/introduction-to-atl-window-classes.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Introduction to ATL Window Classes"
title: "Introduction to ATL Window Classes"
ms.date: "11/04/2016"
helpviewer_keywords: ["window classes"]
ms.assetid: 503efc2c-a269-495d-97cf-3fb300d52f3d
+ms.topic: concept-article
---
# Introduction to ATL Window Classes
diff --git a/docs/atl/introduction-to-atl.md b/docs/atl/introduction-to-atl.md
index 293759d724..cccfc97391 100644
--- a/docs/atl/introduction-to-atl.md
+++ b/docs/atl/introduction-to-atl.md
@@ -1,9 +1,11 @@
---
+description: "Learn more about: Introduction to ATL"
title: "Introduction to ATL"
ms.custom: "index-page"
ms.date: "11/04/2016"
helpviewer_keywords: ["COM objects, creating in ATL", "ATL"]
ms.assetid: 77f565e8-c4ec-4a80-af4b-7278fcfe5c98
+ms.topic: concept-article
---
# Introduction to ATL
diff --git a/docs/atl/introduction-to-com-and-atl.md b/docs/atl/introduction-to-com-and-atl.md
index 6dceae0574..57e25904bc 100644
--- a/docs/atl/introduction-to-com-and-atl.md
+++ b/docs/atl/introduction-to-com-and-atl.md
@@ -1,9 +1,11 @@
---
+description: "Learn more about: Introduction to COM and ATL"
title: "Introduction to COM and ATL"
ms.custom: "index-page"
ms.date: "11/04/2016"
helpviewer_keywords: ["COM, and ATL", "ATL, COM", "COM objects, ATL"]
ms.assetid: 35d6ae9c-abbb-42f0-9344-33f3c19ac3ce
+ms.topic: concept-article
---
# Introduction to COM and ATL
diff --git a/docs/atl/introduction-to-com.md b/docs/atl/introduction-to-com.md
index f219e8f343..c44fc4f065 100644
--- a/docs/atl/introduction-to-com.md
+++ b/docs/atl/introduction-to-com.md
@@ -1,9 +1,11 @@
---
+description: "Learn more about: Introduction to COM"
title: "Introduction to COM"
ms.custom: "index-page"
ms.date: "11/04/2016"
helpviewer_keywords: ["COM"]
ms.assetid: 120735d9-db71-4ad3-a730-ce576ea2354e
+ms.topic: concept-article
---
# Introduction to COM
diff --git a/docs/atl/invoking-scripts.md b/docs/atl/invoking-scripts.md
index 3bd6109da3..2d33947181 100644
--- a/docs/atl/invoking-scripts.md
+++ b/docs/atl/invoking-scripts.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Invoking Scripts"
title: "Invoking Scripts (ATL)"
ms.date: "11/04/2016"
helpviewer_keywords: ["StringRegister method", "scripts, invoking registry in ATL"]
ms.assetid: eabd41ee-586b-4266-9e92-5aaad04b73a4
+ms.topic: concept-article
---
# Invoking Scripts
diff --git a/docs/atl/iunknown-implementation-classes.md b/docs/atl/iunknown-implementation-classes.md
index 27fbd9e48a..7721fad35c 100644
--- a/docs/atl/iunknown-implementation-classes.md
+++ b/docs/atl/iunknown-implementation-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IUnknown Implementation Classes"
title: "IUnknown Implementation Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/iunknown.md b/docs/atl/iunknown.md
index 19cbfe61eb..ee1578aa31 100644
--- a/docs/atl/iunknown.md
+++ b/docs/atl/iunknown.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IUnknown"
title: "IUnknown"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/linking-to-the-crt-in-your-atl-project.md b/docs/atl/linking-to-the-crt-in-your-atl-project.md
index 7d4c3ad3d9..430134baa4 100644
--- a/docs/atl/linking-to-the-crt-in-your-atl-project.md
+++ b/docs/atl/linking-to-the-crt-in-your-atl-project.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Linking to the CRT in Your ATL Project"
title: "Linking to the CRT in Your ATL Project"
ms.date: "11/04/2016"
helpviewer_keywords: ["CRT, linking with ATL", "WinMainCRTStartup method", "DllMainCRTStartup method", "wWinMainCRTStartup method", "ATL, C Run-Time library (CRT)"]
ms.assetid: 650957ae-362c-4ecf-8b03-5d49138e8b5b
+ms.topic: concept-article
---
# Linking to the CRT in Your ATL Project
diff --git a/docs/atl/marshaling.md b/docs/atl/marshaling.md
index 4eef2ca8b6..1f5c52b2be 100644
--- a/docs/atl/marshaling.md
+++ b/docs/atl/marshaling.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Marshaling"
title: "Marshaling"
ms.date: "11/04/2016"
helpviewer_keywords: ["marshaling, COM interop", "marshaling", "COM interfaces, marshaling"]
ms.assetid: 40644b0a-1106-4fc8-9dfb-9bee9915d825
+ms.topic: concept-article
---
# Marshaling
diff --git a/docs/atl/memory-management-classes.md b/docs/atl/memory-management-classes.md
index ac60898602..680e61f19d 100644
--- a/docs/atl/memory-management-classes.md
+++ b/docs/atl/memory-management-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Memory Management Classes"
title: "Memory Management Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/message-handler-functions.md b/docs/atl/message-handler-functions.md
index ff00f7ba27..a37dc85d18 100644
--- a/docs/atl/message-handler-functions.md
+++ b/docs/atl/message-handler-functions.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Message Handler Functions"
title: "Message Handler Functions"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/message-maps-atl.md b/docs/atl/message-maps-atl.md
index 3e50f39c4b..0ab8a690a8 100644
--- a/docs/atl/message-maps-atl.md
+++ b/docs/atl/message-maps-atl.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Message Maps (ATL)"
title: "Message Maps (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/messagehandler.md b/docs/atl/messagehandler.md
index 9614f5af80..4fcdaad53b 100644
--- a/docs/atl/messagehandler.md
+++ b/docs/atl/messagehandler.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: MessageHandler"
title: "MessageHandler"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/mmc-snap-in-classes.md b/docs/atl/mmc-snap-in-classes.md
index ae959fa479..140e10dc5e 100644
--- a/docs/atl/mmc-snap-in-classes.md
+++ b/docs/atl/mmc-snap-in-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: MMC Snap-In Classes"
title: "MMC Snap-In Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/modifying-the-atl-dhtml-control.md b/docs/atl/modifying-the-atl-dhtml-control.md
index 1d7f40ca6a..3e77a536a1 100644
--- a/docs/atl/modifying-the-atl-dhtml-control.md
+++ b/docs/atl/modifying-the-atl-dhtml-control.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Modifying the ATL DHTML Control"
title: "Modifying the ATL DHTML Control"
ms.date: "11/04/2016"
helpviewer_keywords: ["HTML controls, modifying", "DHTML controls", "DHTML controls, modifying"]
ms.assetid: c053f35f-8629-4600-9595-721f5956777a
+ms.topic: how-to
---
# Modifying the ATL DHTML Control
diff --git a/docs/atl/modifying-the-atl-project.md b/docs/atl/modifying-the-atl-project.md
index 3539311296..d9211d9776 100644
--- a/docs/atl/modifying-the-atl-project.md
+++ b/docs/atl/modifying-the-atl-project.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Modifying the ATL Project"
title: "Modifying the ATL Project"
ms.date: "11/04/2016"
helpviewer_keywords: ["controls [ATL], adding to composite controls", "Dialog editor, working with composite controls", "composite controls, adding controls"]
ms.assetid: 59984518-748f-4b8b-875f-3e97d22d0b0f
+ms.topic: concept-article
---
# Modifying the ATL Project
diff --git a/docs/atl/multiple-dual-interfaces.md b/docs/atl/multiple-dual-interfaces.md
index e18301d513..99c4302524 100644
--- a/docs/atl/multiple-dual-interfaces.md
+++ b/docs/atl/multiple-dual-interfaces.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Multiple Dual Interfaces"
title: "Multiple Dual Interfaces"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/nonextensible-attribute.md b/docs/atl/nonextensible-attribute.md
index cfd1a67af3..08a854a487 100644
--- a/docs/atl/nonextensible-attribute.md
+++ b/docs/atl/nonextensible-attribute.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: nonextensible Attribute"
title: "nonextensible Attribute"
ms.date: "11/04/2016"
helpviewer_keywords: ["nonextensible attribute", "dual interfaces, nonextensible attribute"]
@@ -8,7 +9,7 @@ ms.assetid: 02a4a18b-ffd3-4d53-8fd1-feb1c05ad5ac
If a dual interface will not be extended at run time (that is, you won't provide methods or properties via `IDispatch::Invoke` that are not available via the vtable), you should apply the **nonextensible** attribute to your interface definition. This attribute provides information to client languages (such as Visual Basic) that can be used to enable full code verification at compile time. If this attribute is not supplied, bugs may remain hidden in the client code until run time.
-For more information on the **nonextensible** attribute and an example, see [nonextensible](../windows/nonextensible.md).
+For more information on the **nonextensible** attribute and an example, see [nonextensible](../windows/attributes/nonextensible.md).
## See also
diff --git a/docs/atl/notifyhandler.md b/docs/atl/notifyhandler.md
index 7201748b84..adb1d4a0db 100644
--- a/docs/atl/notifyhandler.md
+++ b/docs/atl/notifyhandler.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: NotifyHandler"
title: "NotifyHandler"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/object-safety-classes.md b/docs/atl/object-safety-classes.md
index cbab7caee1..8021fd778b 100644
--- a/docs/atl/object-safety-classes.md
+++ b/docs/atl/object-safety-classes.md
@@ -1,5 +1,6 @@
---
-title: "Object Safety Classes (ATL)| Microsoft Docs"
+description: "Learn more about: Object Safety Classes"
+title: Object Safety Classes (ATL)
ms.date: "11/04/2016"
ms.topic: "reference"
helpviewer_keywords: ["safety classes", "object safety classes"]
diff --git a/docs/atl/persistence-classes.md b/docs/atl/persistence-classes.md
index 137648b4d7..bce7966eb7 100644
--- a/docs/atl/persistence-classes.md
+++ b/docs/atl/persistence-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Persistence Classes"
title: "Persistence Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/programming-with-atl-and-c-run-time-code.md b/docs/atl/programming-with-atl-and-c-run-time-code.md
index 3910c92a76..66c4ade4f2 100644
--- a/docs/atl/programming-with-atl-and-c-run-time-code.md
+++ b/docs/atl/programming-with-atl-and-c-run-time-code.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Programming with ATL and C Run-Time Code"
title: "Programming with ATL and C Run-Time Code"
ms.date: "11/04/2016"
helpviewer_keywords: ["ATL_MIN_CRT macro", "CRT, using with ATL", "_ATL_MIN_CRT macro", "ATL, C Run-Time library (CRT)"]
ms.assetid: 20f03b66-1eb7-4add-84a2-6047db0911eb
+ms.topic: concept-article
---
# Programming with ATL and C Run-Time Code
diff --git a/docs/atl/programming-with-ccombstr-atl.md b/docs/atl/programming-with-ccombstr-atl.md
index 2def91a492..31f7ee2d37 100644
--- a/docs/atl/programming-with-ccombstr-atl.md
+++ b/docs/atl/programming-with-ccombstr-atl.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Programming with CComBSTR (ATL)"
title: "Programming with CComBSTR (ATL)"
ms.date: "11/04/2016"
helpviewer_keywords: ["CComBSTR class, programming with", "Unicode, using CComBSTR [ATL]"]
ms.assetid: d3bd0851-d132-4be9-9c4c-6ccba17acb2b
+ms.topic: concept-article
---
# Programming with CComBSTR (ATL)
@@ -26,9 +28,7 @@ Although several `CComBSTR` methods will automatically convert an ANSI string ar
[!code-cpp[NVC_ATL_Utilities#114](../atl/codesnippet/cpp/programming-with-ccombstr-atl_1.cpp)]
-If you are using a string literal to modify a `CComBSTR` object, use wide character strings. This will reduce unnecessary conversions.
-
-### Example
+If you're using a string literal to modify a `CComBSTR` object, use wide character strings to reduce unnecessary conversions.
[!code-cpp[NVC_ATL_Utilities#115](../atl/codesnippet/cpp/programming-with-ccombstr-atl_2.cpp)]
diff --git a/docs/atl/properties-and-property-pages-classes.md b/docs/atl/properties-and-property-pages-classes.md
index 95021de1ae..17e8307bb0 100644
--- a/docs/atl/properties-and-property-pages-classes.md
+++ b/docs/atl/properties-and-property-pages-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Properties and Property Pages Classes"
title: "Properties and Property Pages Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/putting-the-control-on-a-web-page-atl-tutorial-part-7.md b/docs/atl/putting-the-control-on-a-web-page-atl-tutorial-part-7.md
index 64752423e7..faf66529f1 100644
--- a/docs/atl/putting-the-control-on-a-web-page-atl-tutorial-part-7.md
+++ b/docs/atl/putting-the-control-on-a-web-page-atl-tutorial-part-7.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Putting the Control on a Web Page (ATL Tutorial, Part 7)"
title: "Putting the Control on a Web Page (ATL Tutorial, Part 7)"
ms.custom: "get-started-article"
ms.date: "05/06/2019"
ms.assetid: 50dc4c95-c95b-4006-b88a-9826f7bdb222
+ms.topic: tutorial
---
# Putting the Control on a Web Page (ATL Tutorial, Part 7)
@@ -14,30 +16,30 @@ In this step, you add functionality to the control and script the Web page to re
### To add control features
-1. Open PolyCtl.cpp and replace the following code:
-
- ```cpp
- if (PtInRegion(hRgn, xPos, yPos))
- Fire_ClickIn(xPos, yPos);
- else
- Fire_ClickOut(xPos, yPos);
- ```
-
- with
-
- ```cpp
- short temp = m_nSides;
- if (PtInRegion(hRgn, xPos, yPos))
- {
- Fire_ClickIn(xPos, yPos);
- put_Sides(++temp);
- }
- else
- {
- Fire_ClickOut(xPos, yPos);
- put_Sides(--temp);
- }
- ```
+Open PolyCtl.cpp and replace the following code:
+
+```cpp
+if (PtInRegion(hRgn, xPos, yPos))
+ Fire_ClickIn(xPos, yPos);
+else
+ Fire_ClickOut(xPos, yPos);
+```
+
+with
+
+```cpp
+short temp = m_nSides;
+if (PtInRegion(hRgn, xPos, yPos))
+{
+ Fire_ClickIn(xPos, yPos);
+ put_Sides(++temp);
+}
+else
+{
+ Fire_ClickOut(xPos, yPos);
+ put_Sides(--temp);
+}
+```
The shape will now add or remove sides depending on where you click.
diff --git a/docs/atl/queryinterface.md b/docs/atl/queryinterface.md
index 1a9387bfd7..3d982e0e93 100644
--- a/docs/atl/queryinterface.md
+++ b/docs/atl/queryinterface.md
@@ -1,19 +1,20 @@
---
+description: "Learn more about: QueryInterface"
title: "QueryInterface"
ms.date: "11/04/2016"
ms.topic: "reference"
helpviewer_keywords: ["interfaces, pointers", "interfaces, availability", "QueryInterface method"]
ms.assetid: 62fce95e-aafa-4187-b50b-e6611b74c3b3
---
-# QueryInterface
+# `QueryInterface`
-Although there are mechanisms by which an object can express the functionality it provides statically (before it is instantiated), the fundamental COM mechanism is to use the `IUnknown` method called [QueryInterface](/windows/win32/api/unknwn/nf-unknwn-iunknown-queryinterface(q)).
+Although there are mechanisms by which an object can express the functionality it provides statically (before it is instantiated), the fundamental COM mechanism is to use the `IUnknown` method called [`QueryInterface`](/windows/win32/api/unknwn/nf-unknwn-iunknown-queryinterface(q)).
-Every interface is derived from `IUnknown`, so every interface has an implementation of `QueryInterface`. Regardless of implementation, this method queries an object using the IID of the interface to which the caller wants a pointer. If the object supports that interface, `QueryInterface` retrieves a pointer to the interface, while also calling `AddRef`. Otherwise, it returns the E_NOINTERFACE error code.
+Every interface is derived from `IUnknown`, so every interface has an implementation of `QueryInterface`. Regardless of implementation, this method queries an object using the `IID` of the interface to which the caller wants a pointer. If the object supports that interface, `QueryInterface` retrieves a pointer to the interface, while also calling `AddRef`. Otherwise, it returns the `E_NOINTERFACE` error code.
-Note that you must obey [Reference Counting](../atl/reference-counting.md) rules at all times. If you call `Release` on an interface pointer to decrement the reference count to zero, you should not use that pointer again. Occasionally you may need to obtain a weak reference to an object (that is, you may wish to obtain a pointer to one of its interfaces without incrementing the reference count), but it is not acceptable to do this by calling `QueryInterface` followed by `Release`. The pointer obtained in such a manner is invalid and should not be used. This more readily becomes apparent when [_ATL_DEBUG_INTERFACES](reference/debugging-and-error-reporting-macros.md#_atl_debug_interfaces) is defined, so defining this macro is a useful way of finding reference counting bugs.
+Note that you must obey [Reference Counting](../atl/reference-counting.md) rules at all times. If you call `Release` on an interface pointer to decrement the reference count to zero, you should not use that pointer again. Occasionally you may need to obtain a weak reference to an object (that is, you may wish to obtain a pointer to one of its interfaces without incrementing the reference count), but it is not acceptable to do this by calling `QueryInterface` followed by `Release`. The pointer obtained in such a manner is invalid and should not be used. This more readily becomes apparent when [`_ATL_DEBUG_INTERFACES`](reference/debugging-and-error-reporting-macros.md#_atl_debug_interfaces) is defined, so defining this macro is a useful way of finding reference counting bugs.
## See also
[Introduction to COM](../atl/introduction-to-com.md)
-[QueryInterface: Navigating in an Object](/windows/win32/com/queryinterface--navigating-in-an-object)
+[`QueryInterface`: Navigating in an Object](/windows/win32/com/queryinterface--navigating-in-an-object)
diff --git a/docs/atl/recommendations-for-choosing-between-atl-and-mfc.md b/docs/atl/recommendations-for-choosing-between-atl-and-mfc.md
index 38dac128db..2fc4145a2b 100644
--- a/docs/atl/recommendations-for-choosing-between-atl-and-mfc.md
+++ b/docs/atl/recommendations-for-choosing-between-atl-and-mfc.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Recommendations for Choosing Between ATL and MFC"
title: "Recommendations for Choosing Between ATL and MFC"
ms.date: "11/04/2016"
helpviewer_keywords: ["MFC, ATL support", "ATL, vs. MFC"]
diff --git a/docs/atl/reference-counting.md b/docs/atl/reference-counting.md
index 8103d2557c..db71a9ca66 100644
--- a/docs/atl/reference-counting.md
+++ b/docs/atl/reference-counting.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Reference Counting"
title: "Reference Counting (ATL)"
ms.date: "11/04/2016"
helpviewer_keywords: ["AddRef method [C++], reference counting", "reference counting", "AddRef method [C++]", "reference counts", "references, counting"]
diff --git a/docs/atl/reference/adding-a-new-interface-in-an-atl-project.md b/docs/atl/reference/adding-a-new-interface-in-an-atl-project.md
index 5f44e2cf41..f9b927b58c 100644
--- a/docs/atl/reference/adding-a-new-interface-in-an-atl-project.md
+++ b/docs/atl/reference/adding-a-new-interface-in-an-atl-project.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Adding a New Interface in an ATL Project"
title: "Adding a New Interface in an ATL Project"
ms.date: "11/04/2016"
f1_keywords: ["vc.appwiz.ATL.interface"]
@@ -17,7 +18,7 @@ You can add a new interface to your control in one of two ways: manually or usin
1. On the shortcut menu, click **Add**, and then click **Implement Interface**.
-1. Select the interfaces to implement in the [Implement Interface Wizard](../../ide/implement-interface-wizard.md). If the interface does not exist in any available typelib, then you must add it manually to the .idl file.
+1. Select the interfaces to implement in the [Implement Interface Wizard](../../ide/implementing-an-interface-visual-cpp.md#implement-interface-wizard). If the interface does not exist in any available typelib, then you must add it manually to the .idl file.
## To add a new interface manually
diff --git a/docs/atl/reference/adding-an-atl-active-server-page-component.md b/docs/atl/reference/adding-an-atl-active-server-page-component.md
index 26450d4049..508bf1fbfc 100644
--- a/docs/atl/reference/adding-an-atl-active-server-page-component.md
+++ b/docs/atl/reference/adding-an-atl-active-server-page-component.md
@@ -1,19 +1,20 @@
---
+description: "Learn more about: Adding an ATL Active Server Page Component"
title: "Adding an ATL Active Server Page Component"
ms.date: "05/09/2019"
ms.assetid: 7be2204c-6e58-4099-8892-001b848c8987
---
# Adding an ATL Active Server Page Component
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
The ATL Active Server Pages component wizard is not available in Visual Studio 2019 and later.
::: moniker-end
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
-To add an Active Template Library (ATL) object to your project, your project must have been created as an ATL COM application or as an MFC application that contains ATL support. You can use the [ATL Project Wizard](../../atl/reference/atl-project-wizard.md) to create an ATL application, you can select **Add ATL Support to MFC** from the [Add Class Dialog Box](../../ide/add-class-dialog-box.md) dialog box, or you can [add an ATL object to your MFC application](../../mfc/reference/adding-atl-support-to-your-mfc-project.md) to implement ATL support for an MFC application.
+To add an Active Template Library (ATL) object to your project, your project must have been created as an ATL COM application or as an MFC application that contains ATL support. You can use the [ATL Project Wizard](../../atl/reference/atl-project-wizard.md) to create an ATL application, you can select **Add ATL Support to MFC** from the [Add Class Dialog Box](../../ide/adding-a-class-visual-cpp.md#add-class-dialog-box) dialog box, or you can [add an ATL object to your MFC application](../../mfc/reference/adding-atl-support-to-your-mfc-project.md) to implement ATL support for an MFC application.
Active Server Pages components are part of the Internet Information Services architecture, which provides the following advanced Web development features:
@@ -29,7 +30,7 @@ Active Server Pages components are part of the Internet Information Services arc
1. From the shortcut menu, click **Add**, and then click **Add Class**.
-1. In the [Add Class](../../ide/add-class-dialog-box.md) dialog box, in the **Templates** pane, click **ATL Active Server Page Component**, and then click **Open** to display the [ATL Active Server Page Component Wizard](../../atl/reference/atl-active-server-page-component-wizard.md).
+1. In the [Add Class](../../ide/adding-a-class-visual-cpp.md#add-class-dialog-box) dialog box, in the **Templates** pane, click **ATL Active Server Page Component**, and then click **Open** to display the [ATL Active Server Page Component Wizard](../../atl/reference/atl-active-server-page-component-wizard.md).
::: moniker-end
diff --git a/docs/atl/reference/adding-an-atl-com-plus-1-0-component.md b/docs/atl/reference/adding-an-atl-com-plus-1-0-component.md
index fa1ddf9744..6df0a367ba 100644
--- a/docs/atl/reference/adding-an-atl-com-plus-1-0-component.md
+++ b/docs/atl/reference/adding-an-atl-com-plus-1-0-component.md
@@ -1,17 +1,18 @@
---
+description: "Learn more about: Adding an ATL COM+ 1.0 Component"
title: "Adding an ATL COM+ 1.0 Component"
ms.date: "05/09/2019"
ms.assetid: c6c95e64-9ee4-4a6e-8804-5930202ce1b9
---
# Adding an ATL COM+ 1.0 Component
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
The ATL COM+ 1.0 Component wizard is not available in Visual Studio 2019 and later.
::: moniker-end
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
This wizard adds an object to your project that supports COM+ 1.0 services, including transactions.
@@ -21,7 +22,7 @@ This wizard adds an object to your project that supports COM+ 1.0 services, incl
1. On the shortcut menu, click **Add**, and then click **Add Class**.
-1. In the [Add Class](../../ide/add-class-dialog-box.md) dialog box, in the **Templates** pane, click **ATL COM+ 1.0 Component**, and then click **Open** to display the [ATL COM+ 1.0 Component Wizard](../../atl/reference/atl-com-plus-1-0-component-wizard.md).
+1. In the [Add Class](../../ide/adding-a-class-visual-cpp.md#add-class-dialog-box) dialog box, in the **Templates** pane, click **ATL COM+ 1.0 Component**, and then click **Open** to display the [ATL COM+ 1.0 Component Wizard](../../atl/reference/atl-com-plus-1-0-component-wizard.md).
## See also
diff --git a/docs/atl/reference/adding-an-atl-control.md b/docs/atl/reference/adding-an-atl-control.md
index 3fe29b55dd..c9a0174533 100644
--- a/docs/atl/reference/adding-an-atl-control.md
+++ b/docs/atl/reference/adding-an-atl-control.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Adding an ATL Control"
title: "Adding an ATL Control"
ms.date: "11/04/2016"
helpviewer_keywords: ["ATL projects, adding controls", "controls [ATL], adding to projects"]
@@ -14,7 +15,7 @@ Use this wizard to add a user interface object to a project that supports interf
1. Click **Add** from the shortcut menu, and then click **Add Class**.
-1. In the [Add Class](../../ide/add-class-dialog-box.md) dialog box, in the templates pane, click **ATL Control**, and then click **Add** to display the [ATL Control Wizard](../../atl/reference/atl-control-wizard.md).
+1. In the [Add Class](../../ide/adding-a-class-visual-cpp.md#add-class-dialog-box) dialog box, in the templates pane, click **ATL Control**, and then click **Add** to display the [ATL Control Wizard](../../atl/reference/atl-control-wizard.md).
Using the **ATL Control Wizard**, you can create one of three types of controls:
diff --git a/docs/atl/reference/adding-an-atl-dialog-box.md b/docs/atl/reference/adding-an-atl-dialog-box.md
index daebc2a397..928fd20430 100644
--- a/docs/atl/reference/adding-an-atl-dialog-box.md
+++ b/docs/atl/reference/adding-an-atl-dialog-box.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Adding an ATL Dialog Box"
title: "Adding an ATL Dialog Box"
ms.date: "11/04/2016"
helpviewer_keywords: ["ATL projects, adding dialog resources", "MFC dialog boxes, ATL dialogs", "dialog boxes, ATL"]
@@ -19,7 +20,7 @@ By default, the ATL Dialog Wizard implements a dialog box derived from [CAxDialo
1. From [Class View](/visualstudio/ide/viewing-the-structure-of-code), right-click the project name and click **Add** from the shortcut menu. Click **Add Class**.
-1. In the **Templates** pane of the [Add Class](../../ide/add-class-dialog-box.md) dialog box, click **ATL Dialog**. Click **Open** to display the [ATL Dialog Wizard](../../atl/reference/atl-dialog-wizard.md).
+1. In the **Templates** pane of the [Add Class](../../ide/adding-a-class-visual-cpp.md#add-class-dialog-box) dialog box, click **ATL Dialog**. Click **Open** to display the [ATL Dialog Wizard](../../atl/reference/atl-dialog-wizard.md).
For more information, see [Implementing a Dialog Box](../../atl/implementing-a-dialog-box.md).
diff --git a/docs/atl/reference/adding-an-atl-ole-db-consumer.md b/docs/atl/reference/adding-an-atl-ole-db-consumer.md
index 762cdb75ea..52b1acc39a 100644
--- a/docs/atl/reference/adding-an-atl-ole-db-consumer.md
+++ b/docs/atl/reference/adding-an-atl-ole-db-consumer.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Adding an ATL OLE DB Consumer"
title: "Adding an ATL OLE DB Consumer"
ms.date: "05/09/2019"
helpviewer_keywords: ["ATL OLE DB consumers"]
@@ -6,13 +7,13 @@ ms.assetid: f940a513-4e42-4148-b521-dd0d7dc89fa2
---
# Adding an ATL OLE DB Consumer
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
The ATL OLE DB Consumer wizard is not available in Visual Studio 2019 and later. You can still add the functionality manually. For more information, see [Creating a Consumer Without Using a Wizard](../../data/oledb/creating-a-consumer-without-using-a-wizard.md).
::: moniker-end
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
Use this wizard to add an ATL OLE DB consumer to a project. An ATL OLE DB consumer consists of an OLE DB accessor class and data bindings necessary to access a data source. The project must have been created as an ATL COM application, or as an MFC or Win32 application that contains ATL support (which the ATL OLE DB Consumer Wizard adds automatically).
diff --git a/docs/atl/reference/adding-an-atl-ole-db-provider.md b/docs/atl/reference/adding-an-atl-ole-db-provider.md
index 639998fa80..3aba76e606 100644
--- a/docs/atl/reference/adding-an-atl-ole-db-provider.md
+++ b/docs/atl/reference/adding-an-atl-ole-db-provider.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Adding an ATL OLE DB Provider"
title: "Adding an ATL OLE DB Provider"
ms.date: "05/09/2019"
helpviewer_keywords: ["OLE DB, adding ATL OLE DB provider to projects", "ATL projects, adding ATL OLE DB providers", "ATL OLE DB providers"]
@@ -6,13 +7,13 @@ ms.assetid: 26fba1e3-880f-4bc6-90e5-2096a48a3a6c
---
# Adding an ATL OLE DB Provider
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
The ATL OLE DB Provider wizard is not available in Visual Studio 2019 and later.
::: moniker-end
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
Use this wizard to add an ATL OLE DB provider to a project. An ATL OLE DB provider consists of a data source, session, command, and rowset classes. The project must have been created as an ATL COM application.
diff --git a/docs/atl/reference/adding-an-atl-property-page.md b/docs/atl/reference/adding-an-atl-property-page.md
index 088f895525..376b4875a7 100644
--- a/docs/atl/reference/adding-an-atl-property-page.md
+++ b/docs/atl/reference/adding-an-atl-property-page.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Adding an ATL Property Page"
title: "Adding an ATL Property Page"
ms.date: "05/09/2019"
helpviewer_keywords: ["property pages, adding", "ATL projects, adding property pages", "controls [ATL], property pages"]
@@ -22,7 +23,7 @@ If you are adding a property page for a control, your control must support the [
1. From the shortcut menu, click **Add** and then click **Add Class**.
-1. In the [Add Class](../../ide/add-class-dialog-box.md) dialog box, in the **Templates** pane, click **ATL Property Page** and then click **Open** to display the [ATL Property Page Wizard](../../atl/reference/atl-property-page-wizard.md).
+1. In the [Add Class](../../ide/adding-a-class-visual-cpp.md#add-class-dialog-box) dialog box, in the **Templates** pane, click **ATL Property Page** and then click **Open** to display the [ATL Property Page Wizard](../../atl/reference/atl-property-page-wizard.md).
Once you create a property page for a control, you must provide the [PROP_PAGE](property-map-macros.md#prop_page) entry in the property map for the control.
diff --git a/docs/atl/reference/adding-an-atl-simple-object.md b/docs/atl/reference/adding-an-atl-simple-object.md
index 310606ba03..91e8e2ddac 100644
--- a/docs/atl/reference/adding-an-atl-simple-object.md
+++ b/docs/atl/reference/adding-an-atl-simple-object.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Adding an ATL Simple Object"
title: "Adding an ATL Simple Object"
ms.date: "11/04/2016"
f1_keywords: ["vc.codewiz.classes.adding.atl"]
@@ -9,7 +10,7 @@ ms.assetid: 9c57d2ef-0447-4c84-8982-3304b8e49847
To add an ATL (Active Template Library) object to your project, your project must have been created as an ATL application or as an MFC application that contains ATL support. You can use the [ATL Project Wizard](../../atl/reference/atl-project-wizard.md) to create an ATL application, or [add an ATL object to your MFC application](../../mfc/reference/adding-atl-support-to-your-mfc-project.md) to implement ATL support for an MFC application.
-You can define COM interfaces for your new ATL object when you first create it, or add them later by using the [Implement Interface](../../ide/implement-interface-wizard.md) command from the **Class View** shortcut menu.
+You can define COM interfaces for your new ATL object when you first create it, or add them later by using the [Implement Interface](../../ide/implementing-an-interface-visual-cpp.md#implement-interface-wizard) command from the **Class View** shortcut menu.
## To add an ATL simple object to your ATL COM project
@@ -17,7 +18,7 @@ You can define COM interfaces for your new ATL object when you first create it,
1. From the shortcut menu, click **Add**, and then click **Add Class**.
-1. In the [Add Class](../../ide/add-class-dialog-box.md) dialog box, in the **Templates** pane, click **ATL Simple Object**, and then click **Open** to display the [ATL Simple Object Wizard](../../atl/reference/atl-simple-object-wizard.md).
+1. In the [Add Class](../../ide/adding-a-class-visual-cpp.md#add-class-dialog-box) dialog box, in the **Templates** pane, click **ATL Simple Object**, and then click **Open** to display the [ATL Simple Object Wizard](../../atl/reference/atl-simple-object-wizard.md).
1. Set additional options for your project on the [Options](../../atl/reference/options-atl-simple-object-wizard.md) page of the **ATL Simple Object** wizard.
diff --git a/docs/atl/reference/adding-objects-and-controls-to-an-atl-project.md b/docs/atl/reference/adding-objects-and-controls-to-an-atl-project.md
index 79dcf0eb69..036b72dc54 100644
--- a/docs/atl/reference/adding-objects-and-controls-to-an-atl-project.md
+++ b/docs/atl/reference/adding-objects-and-controls-to-an-atl-project.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Adding Objects and Controls to an ATL Project"
title: "Adding Objects and Controls to an ATL Project"
ms.date: "05/09/2019"
f1_keywords: ["vc.appwiz.ATL.controls"]
@@ -12,11 +13,15 @@ ms.assetid: c0adcbd0-07fe-4c55-a8fd-8c2c65ecdaad
You can use one of the ATL code wizards to add an object or a control to your ATL- or MFC-based projects. For each COM object or control you add, the wizard generates .cpp and .h files, as well as an .rgs file for script-based registry support. The following ATL code wizards are available in Visual Studio:
-||||
-|-|-|-|
-|[ATL Simple Object](../../atl/reference/atl-simple-object-wizard.md)|[ATL Dialog](../../atl/reference/atl-dialog-wizard.md)|[ATL Control](../../atl/reference/atl-control-wizard.md)|
-|[ATL Property Page](../../atl/reference/atl-property-page-wizard.md)|[ATL Active Server Page Component](../../atl/reference/atl-active-server-page-component-wizard.md)|[ATL OLE DB Consumer](../../atl/reference/atl-ole-db-consumer-wizard.md)|
-|[Add ATL Support to MFC](../../mfc/reference/adding-atl-support-to-your-mfc-project.md)|[ATL COM+ 1.0 Component Wizard](../../atl/reference/atl-com-plus-1-0-component-wizard.md)|[ATL OLE DB Provider](../../atl/reference/atl-ole-db-provider-wizard.md)|
+- [ATL Simple Object](../../atl/reference/atl-simple-object-wizard.md)
+- [ATL Dialog](../../atl/reference/atl-dialog-wizard.md)
+- [ATL Control](../../atl/reference/atl-control-wizard.md)
+- [ATL Property Page](../../atl/reference/atl-property-page-wizard.md)
+- [ATL Active Server Page Component](../../atl/reference/atl-active-server-page-component-wizard.md)
+- [ATL OLE DB Consumer](../../atl/reference/atl-ole-db-consumer-wizard.md)
+- [Add ATL Support to MFC](../../mfc/reference/adding-atl-support-to-your-mfc-project.md)
+- [ATL COM+ 1.0 Component Wizard](../../atl/reference/atl-com-plus-1-0-component-wizard.md)
+- [ATL OLE DB Provider](../../atl/reference/atl-ole-db-provider-wizard.md)
> [!NOTE]
> Before adding an ATL object to your project, you should review the details and requirements for the object in its related Help topics.
@@ -25,7 +30,7 @@ You can use one of the ATL code wizards to add an object or a control to your AT
1. In **Solution Explorer**, right-click the project node and click **Add** from the shortcut menu. Click **Add Class**.
- The [Add Class](../../ide/add-class-dialog-box.md) dialog box appears.
+ The [Add Class](../../ide/adding-a-class-visual-cpp.md#add-class-dialog-box) dialog box appears.
1. With the **ATL** folder selected in the **Categories** pane, select an object to insert from the **Templates** pane. Click **Open**. The code wizard for the selected object appears.
diff --git a/docs/atl/reference/aggregation-and-class-factory-macros.md b/docs/atl/reference/aggregation-and-class-factory-macros.md
index 93521129a0..b6dacd4282 100644
--- a/docs/atl/reference/aggregation-and-class-factory-macros.md
+++ b/docs/atl/reference/aggregation-and-class-factory-macros.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Aggregation and Class Factory Macros"
title: "Aggregation and Class Factory Macros"
ms.date: 08/12/2020
f1_keywords: ["ATLCOM/ATL::DECLARE_AGGREGATABLE", "ATLCOM/ATL::DECLARE_CLASSFACTORY", "ATLCOM/ATL::DECLARE_CLASSFACTORY_EX", "ATLCOM/ATL::DECLARE_CLASSFACTORY_AUTO_THREAD", "ATLCOM/ATL::DECLARE_CLASSFACTORY_SINGLETON", "ATLCOM/ATL::DECLARE_GET_CONTROLLING_UNKNOWN", "ATLCOM/ATL::DECLARE_NOT_AGGREGATABLE", "ATLCOM/ATL::DECLARE_ONLY_AGGREGATABLE", "ATLCOM/ATL::DECLARE_POLY_AGGREGATABLE", "ATLCOM/ATL::DECLARE_PROTECT_FINAL_CONSTRUCT", "ATLCOM/ATL::DECLARE_VIEW_STATUS", "ATLDEF/ATL::DECLARE_AGGREGATABLE", "ATLDEF/ATL::DECLARE_CLASSFACTORY", "ATLDEF/ATL::DECLARE_CLASSFACTORY_EX", "ATLDEF/ATL::DECLARE_CLASSFACTORY_AUTO_THREAD", "ATLDEF/ATL::DECLARE_CLASSFACTORY_SINGLETON", "ATLDEF/ATL::DECLARE_GET_CONTROLLING_UNKNOWN", "ATLDEF/ATL::DECLARE_NOT_AGGREGATABLE", "ATLDEF/ATL::DECLARE_ONLY_AGGREGATABLE", "ATLDEF/ATL::DECLARE_POLY_AGGREGATABLE", "ATLDEF/ATL::DECLARE_PROTECT_FINAL_CONSTRUCT", "ATLDEF/ATL::DECLARE_VIEW_STATUS", "ATLCOM/DECLARE_AGGREGATABLE", "ATLCOM/DECLARE_CLASSFACTORY", "ATLCOM/DECLARE_CLASSFACTORY_EX", "ATLCOM/DECLARE_CLASSFACTORY_AUTO_THREAD", "ATLCOM/DECLARE_CLASSFACTORY_SINGLETON", "ATLCOM/DECLARE_GET_CONTROLLING_UNKNOWN", "ATLCOM/DECLARE_NOT_AGGREGATABLE", "ATLCOM/DECLARE_ONLY_AGGREGATABLE", "ATLCOM/DECLARE_POLY_AGGREGATABLE", "ATLCOM/DECLARE_PROTECT_FINAL_CONSTRUCT", "ATLCOM/DECLARE_VIEW_STATUS", "ATL::DECLARE_AGGREGATABLE", "ATL::DECLARE_CLASSFACTORY", "ATL::DECLARE_CLASSFACTORY_EX", "ATL::DECLARE_CLASSFACTORY_AUTO_THREAD", "ATL::DECLARE_CLASSFACTORY_SINGLETON", "ATL::DECLARE_GET_CONTROLLING_UNKNOWN", "ATL::DECLARE_NOT_AGGREGATABLE", "ATL::DECLARE_ONLY_AGGREGATABLE", "ATL::DECLARE_POLY_AGGREGATABLE", "ATL::DECLARE_PROTECT_FINAL_CONSTRUCT", "ATL::DECLARE_VIEW_STATUS", "DECLARE_AGGREGATABLE", "DECLARE_CLASSFACTORY", "DECLARE_CLASSFACTORY_EX", "DECLARE_CLASSFACTORY_AUTO_THREAD", "DECLARE_CLASSFACTORY_SINGLETON", "DECLARE_GET_CONTROLLING_UNKNOWN", "DECLARE_NOT_AGGREGATABLE", "DECLARE_ONLY_AGGREGATABLE", "DECLARE_POLY_AGGREGATABLE", "DECLARE_PROTECT_FINAL_CONSTRUCT", "DECLARE_VIEW_STATUS"]
diff --git a/docs/atl/reference/appearance-atl-control-wizard.md b/docs/atl/reference/appearance-atl-control-wizard.md
index 9bade2038d..5a28f5a572 100644
--- a/docs/atl/reference/appearance-atl-control-wizard.md
+++ b/docs/atl/reference/appearance-atl-control-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Appearance, ATL Control Wizard"
title: "Appearance, ATL Control Wizard"
ms.date: "08/31/2018"
f1_keywords: ["vc.codewiz.class.atl.control.misc"]
diff --git a/docs/atl/reference/application-settings-atl-project-wizard.md b/docs/atl/reference/application-settings-atl-project-wizard.md
index e22ac23913..03b0fade12 100644
--- a/docs/atl/reference/application-settings-atl-project-wizard.md
+++ b/docs/atl/reference/application-settings-atl-project-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Application Settings, ATL Project Wizard"
title: "Application Settings, ATL Project Wizard"
ms.date: "11/04/2016"
f1_keywords: ["vc.appwiz.atl.com.appset"]
diff --git a/docs/atl/reference/asp-atl-active-server-page-component-wizard.md b/docs/atl/reference/asp-atl-active-server-page-component-wizard.md
index e2a93af9f1..efb54c5bbf 100644
--- a/docs/atl/reference/asp-atl-active-server-page-component-wizard.md
+++ b/docs/atl/reference/asp-atl-active-server-page-component-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ASP, ATL Active Server Page Component Wizard"
title: "ASP, ATL Active Server Page Component Wizard"
ms.date: "11/04/2016"
f1_keywords: ["vc.codewiz.class.atl.asp.asp"]
diff --git a/docs/atl/reference/atl-active-server-page-component-wizard.md b/docs/atl/reference/atl-active-server-page-component-wizard.md
index dfcb2d2374..ceab8c73f9 100644
--- a/docs/atl/reference/atl-active-server-page-component-wizard.md
+++ b/docs/atl/reference/atl-active-server-page-component-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Active Server Page Component Wizard"
title: "ATL Active Server Page Component Wizard"
ms.date: "05/09/2019"
helpviewer_keywords: ["ASP components, creating in ATL"]
@@ -6,13 +7,13 @@ ms.assetid: 5a5cb904-dbbf-44ea-ad3d-2ddd14c1d3c5
---
# ATL Active Server Page Component Wizard
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
This wizard is not available in Visual Studio 2019 and later.
::: moniker-end
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
This wizard inserts into the project an Active Server Pages (ASP) component. The Microsoft Internet Information Services (IIS) uses ASP components as part of its enhanced Web page development architecture.
@@ -60,7 +61,7 @@ Provides information for the C++ class created for the object.
By default for nonattributed projects, any objects you add after you set this option are designated as attributed (the check box is selected). You can clear this box to add an object that does not use attributes.
- See [Application Settings, ATL Project Wizard](../../atl/reference/application-settings-atl-project-wizard.md) and [Basic Mechanics of Attributes](../../windows/basic-mechanics-of-attributes.md) for more information.
+ See [Application Settings, ATL Project Wizard](../../atl/reference/application-settings-atl-project-wizard.md) and [Basic mechanics of attributes](../../windows/attributes/cpp-attributes-com-net.md#basic-mechanics-of-attributes) for more information.
### COM
diff --git a/docs/atl/reference/atl-base-module70-structure.md b/docs/atl/reference/atl-base-module70-structure.md
index 882799cae4..78cbd73876 100644
--- a/docs/atl/reference/atl-base-module70-structure.md
+++ b/docs/atl/reference/atl-base-module70-structure.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: _ATL_BASE_MODULE70 Structure"
title: "_ATL_BASE_MODULE70 Structure"
ms.date: "11/04/2016"
f1_keywords: ["ATL::_ATL_BASE_MODULE70", "ATL._ATL_BASE_MODULE70", "_ATL_BASE_MODULE70"]
diff --git a/docs/atl/reference/atl-classes.md b/docs/atl/reference/atl-classes.md
index c2609d4318..36a3ed3f0d 100644
--- a/docs/atl/reference/atl-classes.md
+++ b/docs/atl/reference/atl-classes.md
@@ -1,8 +1,8 @@
---
-title: "ATL classes and structs| Microsoft Docs"
+description: "Learn more about: ATL classes and structs"
+title: ATL classes and structs
ms.date: "05/03/2018"
helpviewer_keywords: ["classes [C++], ATL", "ATL, classes"]
-ms.assetid: 7da42e2d-ac84-4506-92bd-502a86d68bdc
---
# ATL classes and structs
@@ -10,211 +10,211 @@ The Active Template Library (ATL) includes the following classes and structs. To
|Class / struct|Description|Header file|
|-----------|-----------------|-----------------|
-|[ATL_DRAWINFO](../../atl/reference/atl-drawinfo-structure.md)|Contains information used for rendering to various targets, such as a printer, metafile, or ActiveX control.|atlctl.h|
-|[_AtlCreateWndData](../../atl/reference/atlcreatewnddata-structure.md)|Contains class instance data in windowing code in ATL.|atlbase.h|
-|[_ATL_BASE_MODULE70](../../atl/reference/atl-base-module70-structure.md)|Used by any project that uses ATL.|atlbase.h|
-|[_ATL_COM_MODULE70](../../atl/reference/atl-com-module70-structure.md)|Used by COM-related code in ATL.| atlbase.h|
-|[_ATL_FUNC_INFO](../../atl/reference/atl-func-info-structure.md)|Contains type information used to describe a method or property on a dispinterface.|atlcom.h|
-|[_ATL_MODULE70](../../atl/reference/atl-module70-structure.md)|Contains data used by every ATL module.|atlbase.h|
-|[_ATL_WIN_MODULE70](../../atl/reference/atl-win-module70-structure.md)|Used by windowing code in ATL.|atlbase.h|
-|[CA2AEX](../../atl/reference/ca2aex-class.md)|This class is used by the string conversion macros CA2TEX and CT2AEX, and the typedef CA2A.|atlconv.h|
-|[CA2CAEX](../../atl/reference/ca2caex-class.md)|This class is used by string conversion macros CA2CTEX and CT2CAEX, and the typedef CA2CA.|atlconv.h|
-|[CA2WEX](../../atl/reference/ca2wex-class.md)|This class is used by the string conversion macros CA2TEX, CA2CTEX, CT2WEX, and CT2CWEX, and the typedef CA2W.|atlconv.h|
-|[CAccessToken](../../atl/reference/caccesstoken-class.md)|This class is a wrapper for an access token.|atlsecurity.h|
-|[CAcl](../../atl/reference/cacl-class.md)|This class is a wrapper for an ACL (access-control list) structure.|atlsecurity.h|
-|[CAdapt](../../atl/reference/cadapt-class.md)|This template is used to wrap classes that redefine the address-of operator to return something other than the address of the object.|atlcomcli.h|
-|[CAtlArray](../../atl/reference/catlarray-class.md)|This class implements an array object.|atlcoll.h|
-|[CAtlAutoThreadModule](../../atl/reference/catlautothreadmodule-class.md)|This class implements a thread-pooled, apartment-model COM server.|atlbase.h|
-|[CAtlAutoThreadModuleT](../../atl/reference/catlautothreadmodulet-class.md)|This class provides methods for implementing a thread-pooled, apartment-model COM server.|atlbase.h|
-|[CAtlBaseModule](../../atl/reference/catlbasemodule-class.md)|This class is instantiated in every ATL project.|atlcore.h|
-|[CAtlComModule](../../atl/reference/catlcommodule-class.md)|This class implements a COM server module.|atlbase.h|
-|[CAtlDebugInterfacesModule](../../atl/reference/catldebuginterfacesmodule-class.md)|This class provides support for debugging interfaces.|atlbase.h|
-|[CAtlDllModuleT](../../atl/reference/catldllmodulet-class.md)|This class represents the module for a DLL.|atlbase.h|
-|[CAtlException](../../atl/reference/catlexception-class.md)|This class defines an ATL exception.|atlexcept.h|
-|[CAtlExeModuleT](../../atl/reference/catlexemodulet-class.md)|This class represents the module for an application.|atlbase.h|
-|[CAtlFile](../../atl/reference/catlfile-class.md)|This class provides a thin wrapper around the Windows file-handling API.|atlfile.h|
-|[CAtlFileMapping](../../atl/reference/catlfilemapping-class.md)|This class represents a memory-mapped file, adding a cast operator to the methods of [CAtlFileMappingBase](../../atl/reference/catlfilemappingbase-class.md).|atlfile.h|
-|[CAtlFileMappingBase](../../atl/reference/catlfilemappingbase-class.md)|This class represents a memory-mapped file.|atlfile.h|
-|[CAtlList](../../atl/reference/catllist-class.md)|This class provides methods for creating and managing a list object.|atlcoll.h|
-|[CAtlMap](../../atl/reference/catlmap-class.md)|This class provides methods for creating and managing a map object.|atlcoll.h|
-|[CAtlModule](../../atl/reference/catlmodule-class.md)|This class provides methods used by several ATL module classes.|atlbase.h|
-|[CAtlModuleT](../../atl/reference/catlmodulet-class.md)|This class implements an ATL module.|atlbase.h|
-|[CAtlPreviewCtrlImpl](../../atl/reference/catlpreviewctrlimpl-class.md)|This class is an ATL implementation of a window that is placed on a host window provided by the Shell for Rich Preview.|atlpreviewctrlimpl.h|
-|[CAtlServiceModuleT](../../atl/reference/catlservicemodulet-class.md)|This class implements a service.|atlbase.h|
-|[CAtlTemporaryFile](../../atl/reference/catltemporaryfile-class.md)|This class provides methods for the creation and use of a temporary file.|atlfile.h|
-|[CAtlTransactionManager](../../atl/reference/catltransactionmanager-class.md)|This class provides a wrapper to Kernel Transaction Manager (KTM) functions.|atltransactionmanager.h|
-|[CAtlWinModule](../../atl/reference/catlwinmodule-class.md)|This class provides support for ATL windowing components.|atlbase.h|
-|[CAutoPtr](../../atl/reference/cautoptr-class.md)|This class represents a smart pointer object.|atlbase.h|
-|[CAutoPtrArray](../../atl/reference/cautoptrarray-class.md)|This class provides methods useful when constructing an array of smart pointers.|atlbase.h|
-|[CAutoPtrElementTraits](../../atl/reference/cautoptrelementtraits-class.md)|This class provides methods, static functions, and typedefs useful when creating collections of smart pointers.|atlcoll.h|
-|[CAutoPtrList](../../atl/reference/cautoptrlist-class.md)|This class provides methods useful when constructing a list of smart pointers.|atlcoll.h|
-|[CAutoVectorPtr](../../atl/reference/cautovectorptr-class.md)|This class represents a smart pointer object using vector new and delete operators.|atlbase.h|
-|[CAutoVectorPtrElementTraits](../../atl/reference/cautovectorptrelementtraits-class.md)|This class provides methods, static functions, and typedefs useful when creating collections of smart pointers using vector new and delete operators.|atlcoll.h|
-|[CAxDialogImpl](../../atl/reference/caxdialogimpl-class.md)|This class implements a dialog box (modal or modeless) that hosts ActiveX controls.|atlwin.h|
-|[CAxWindow](../../atl/reference/caxwindow-class.md)|This class provides methods for manipulating a window hosting an ActiveX control.|atlwin.h|
-|[CAxWindow2T](../../atl/reference/caxwindow2t-class.md)|This class provides methods for manipulating a window that hosts an ActiveX control and also has support for hosting licensed ActiveX controls.|atlwin.h|
-|[CBindStatusCallback](../../atl/reference/cbindstatuscallback-class.md)|This class implements the `IBindStatusCallback` interface.|atlctl.h|
-|[CComAggObject](../../atl/reference/ccomaggobject-class.md)|This class implements [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) for an aggregated object.|atlcom.h|
-|[CComAllocator](../../atl/reference/ccomallocator-class.md)|This class provides methods for managing memory using COM memory routines.|atlbase.h|
-|[CComApartment](../../atl/reference/ccomapartment-class.md)|This class provides support for managing an apartment in a thread-pooled EXE module.|atlbase.h|
-|[CComAutoCriticalSection](../../atl/reference/ccomautocriticalsection-class.md)|This class provides methods for obtaining and releasing ownership of a critical section object.|atlcore.h|
-|[CComAutoThreadModule](../../atl/reference/ccomautothreadmodule-class.md)|As of ATL 7.0, `CComAutoThreadModule` is obsolete: see [ATL Modules](../../atl/atl-module-classes.md) for more details.|atlbase.h|
-|[CComBSTR](../../atl/reference/ccombstr-class.md)|This class is a wrapper for BSTRs.|atlbase.h|
-|[CComCachedTearOffObject](../../atl/reference/ccomcachedtearoffobject-class.md)|This class implements [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) for a tear-off interface.|atlcom.h|
-|[CComClassFactory](../../atl/reference/ccomclassfactory-class.md)|This class implements the [IClassFactory](/windows/win32/api/unknwnbase/nn-unknwnbase-iclassfactory) interface.|atlcom.h|
-|[CComClassFactory2](../../atl/reference/ccomclassfactory2-class.md)|This class implements the [IClassFactory2](/windows/win32/api/ocidl/nn-ocidl-iclassfactory2) interface.|atlcom.h|
-|[CComClassFactoryAutoThread](../../atl/reference/ccomclassfactoryautothread-class.md)|This class implements the [IClassFactory](/windows/win32/api/unknwnbase/nn-unknwnbase-iclassfactory) interface and allows objects to be created in multiple apartments.|atlcom.h|
-|[CComClassFactorySingleton](../../atl/reference/ccomclassfactorysingleton-class.md)|This class derives from [CComClassFactory](../../atl/reference/ccomclassfactory-class.md) and uses [CComObjectGlobal](../../atl/reference/ccomobjectglobal-class.md) to construct a single object.|atlcom.h|
-|[CComCoClass](../../atl/reference/ccomcoclass-class.md)|This class provides methods for creating instances of a class and obtaining its properties.|atlcom.h|
-|[CComCompositeControl](../../atl/reference/ccomcompositecontrol-class.md)|This class provides the methods required to implement a composite control.|atlctl.h|
-|[CComContainedObject](../../atl/reference/ccomcontainedobject-class.md)|This class implements [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) by delegating to the owner object's `IUnknown`.|atlcom.h|
-|[CComControl](../../atl/reference/ccomcontrol-class.md)|This class provides methods for creating and managing ATL controls.|atlctl.h|
-|[CComControlBase](../../atl/reference/ccomcontrolbase-class.md)|This class provides methods for creating and managing ATL controls.|atlctl.h|
-|[CComCriticalSection](../../atl/reference/ccomcriticalsection-class.md)|This class provides methods for obtaining and releasing ownership of a critical section object.|atlcore.h|
-|[CComCritSecLock](../../atl/reference/ccomcritseclock-class.md)|This class provides methods for locking and unlocking a critical section object.|atlbase.h|
-|[CComCurrency](../../atl/reference/ccomcurrency-class.md)|This class has methods and operators for creating and managing a CURRENCY object.|atlcur.h|
-|[CComDynamicUnkArray](../../atl/reference/ccomdynamicunkarray-class.md)|This class stores an array of `IUnknown` pointers.|atlcom.h|
-|[CComEnum](../../atl/reference/ccomenum-class.md)|This class defines a COM enumerator object based on an array.|atlcom.h|
-|[CComEnumImpl](../../atl/reference/ccomenumimpl-class.md)|This class provides the implementation for a COM enumerator interface where the items being enumerated are stored in an array.|atlcom.h|
-|[CComEnumOnSTL](../../atl/reference/ccomenumonstl-class.md)|This class defines a COM enumerator object based on a C++ Standard Library collection.|atlcom.h|
-|[CComFakeCriticalSection](../../atl/reference/ccomfakecriticalsection-class.md)|This class provides the same methods as [CComCriticalSection](../../atl/reference/ccomcriticalsection-class.md) but does not provide a critical section.|atlcore.h|
-|[CComGITPtr](../../atl/reference/ccomgitptr-class.md)|This class provides methods for dealing with interface pointers and the global interface table (GIT).|atlbase.h|
-|[CComHeap](../../atl/reference/ccomheap-class.md)|This class implements [IAtlMemMgr](../../atl/reference/iatlmemmgr-class.md) using the COM memory allocation functions.|ATLComMem.h|
-|[CComHeapPtr](../../atl/reference/ccomheapptr-class.md)|A smart pointer class for managing heap pointers.|atlbase.h|
-|[CComModule](../../atl/reference/ccommodule-class.md)|As of ATL 7.0, `CComModule` is obsolete: see [ATL Modules](../../atl/atl-module-classes.md) for more details.|atlbase.h|
-|[CComMultiThreadModel](../../atl/reference/ccommultithreadmodel-class.md)|This class provides thread-safe methods for incrementing and decrementing the value of a variable.|atlbase.h|
-|[CComMultiThreadModelNoCS](../../atl/reference/ccommultithreadmodelnocs-class.md)|This class provides thread-safe methods for incrementing and decrementing the value of a variable, without critical section locking or unlocking functionality.|atlbase.h|
-|[CComObject](../../atl/reference/ccomobject-class.md)|This class implements `IUnknown` for a nonaggregated object.|atlcom.h|
-|[CComObjectGlobal](../../atl/reference/ccomobjectglobal-class.md)|This class manages a reference count on the module containing your `Base` object.|atlcom.h|
-|[CComObjectNoLock](../../atl/reference/ccomobjectnolock-class.md)|This class implements `IUnknown` for a nonaggregated object, but does not increment the module lock count in the constructor.|atlcom.h|
-|[CComObjectRoot](../../atl/reference/ccomobjectroot-class.md)|This typedef of [CComObjectRootEx](../../atl/reference/ccomobjectrootex-class.md) is templatized on the default threading model of the server.|atlcom.h|
-|[CComObjectRootEx](../../atl/reference/ccomobjectrootex-class.md)|This class provides methods to handle object reference count management for both nonaggregated and aggregated objects.|atlcom.h|
-|[CComObjectStack](../../atl/reference/ccomobjectstack-class.md)|This class creates a temporary COM object and provides it with a skeletal implementation of `IUnknown`.|atlcom.h|
-|[CComPolyObject](../../atl/reference/ccompolyobject-class.md)|This class implements `IUnknown` for an aggregated or nonaggregated object.|atlcom.h|
-|[CComPtr](../../atl/reference/ccomptr-class.md)|A smart pointer class for managing COM interface pointers.|atlcomcli.h|
-|[CComPtrBase](../../atl/reference/ccomptrbase-class.md)|This class provides a basis for smart pointer classes using COM-based memory routines.|atlcomcli.h|
-|[CComQIPtr](../../atl/reference/ccomqiptr-class.md)|A smart pointer class for managing COM interface pointers.|atlcomcli.h|
-|[CComQIPtrElementTraits](../../atl/reference/ccomqiptrelementtraits-class.md)|This class provides methods, static functions, and typedefs useful when creating collections of COM interface pointers.|atlcoll.h|
-|[CComSafeArray](../../atl/reference/ccomsafearray-class.md)|This class is a wrapper for the `SAFEARRAY Data Type` structure.|atlsafe.h|
-|[CComSafeArrayBound](../../atl/reference/ccomsafearraybound-class.md)|This class is a wrapper for a `SAFEARRAYBOUND` structure.|atlsafe.h|
-|[CComSimpleThreadAllocator](../../atl/reference/ccomsimplethreadallocator-class.md)|This class manages thread selection for the class [CComAutoThreadModule](../../atl/reference/ccomautothreadmodule-class.md).|atlbase.h|
-|[CComSingleThreadModel](../../atl/reference/ccomsinglethreadmodel-class.md)|This class provides methods for incrementing and decrementing the value of a variable.|atlbase.h|
-|[CComTearOffObject](../../atl/reference/ccomtearoffobject-class.md)|This class implements a tear-off interface.|atlcom.h|
-|[CComUnkArray](../../atl/reference/ccomunkarray-class.md)|This class stores `IUnknown` pointers and is designed to be used as a parameter to the [IConnectionPointImpl](../../atl/reference/iconnectionpointimpl-class.md) template class.|atlcom.h|
-|[CComVariant](../../atl/reference/ccomvariant-class.md)|This class wraps the VARIANT type, providing a member indicating the type of data stored.|atlcomcli.h|
-|[CContainedWindowT](../../atl/reference/ccontainedwindowt-class.md)|This class implements a window contained within another object.|atlwin.h|
-|[CCRTAllocator](../../atl/reference/ccrtallocator-class.md)|This class provides methods for managing memory using CRT memory routines.|atlcore.h|
-|[CCRTHeap](../../atl/reference/ccrtheap-class.md)|This class implements [IAtlMemMgr](../../atl/reference/iatlmemmgr-class.md) using the CRT heap functions.|atlmem.h|
-|[CDacl](../../atl/reference/cdacl-class.md)|This class is a wrapper for a DACL (discretionary access-control list) structure.|atlsecurity.h|
-|[CDebugReportHook Class](../../atl/reference/cdebugreporthook-class.md)|Use this class to send debug reports to a named pipe.|atlutil.h|
-|[CDefaultCharTraits](../../atl/reference/cdefaultchartraits-class.md)|This class provides two static functions for converting characters between uppercase and lowercase.|atlcoll.h|
-|[CDefaultCompareTraits](../../atl/reference/cdefaultcomparetraits-class.md)|This class provides default element comparison functions.|atlcoll.h|
-|[CDefaultElementTraits](../../atl/reference/cdefaultelementtraits-class.md)|This class provides default methods and functions for a collection class.|atlcoll.h|
-|[CDefaultHashTraits](../../atl/reference/cdefaulthashtraits-class.md)|This class provides a static function for calculating hash values.|atlcoll.h|
-|[CDialogImpl](../../atl/reference/cdialogimpl-class.md)|This class provides methods for creating a modal or modeless dialog box.|atlwin.h|
-|[CDynamicChain](../../atl/reference/cdynamicchain-class.md)|This class provides methods supporting the dynamic chaining of message maps.|atlwin.h|
-|[CElementTraits](../../atl/reference/celementtraits-class.md)|This class is used by collection classes to provide methods and functions for moving, copying, comparison, and hashing operations.|atlcoll.h|
-|[CElementTraitsBase](../../atl/reference/celementtraitsbase-class.md)|This class provides default copy and move methods for a collection class.|atlcoll.h|
-|[CFirePropNotifyEvent](../../atl/reference/cfirepropnotifyevent-class.md)|This class provides methods for notifying the container's sink regarding control property changes.|atlctl.h|
-|[CGlobalHeap](../../atl/reference/cglobalheap-class.md)|This class implements [IAtlMemMgr](../../atl/reference/iatlmemmgr-class.md) using the Win32 global heap functions.|atlmem.h|
-|[CHandle](../../atl/reference/chandle-class.md)|This class provides methods for creating and using a handle object.|atlbase.h|
-|[CHeapPtr](../../atl/reference/cheapptr-class.md)|A smart pointer class for managing heap pointers.|atlcore.h|
-|[CHeapPtrBase](../../atl/reference/cheapptrbase-class.md)|This class forms the basis for several smart heap pointer classes.|atlcore.h|
-|[CHeapPtrElementTraits Class](../../atl/reference/cheapptrelementtraits-class.md)|This class provides methods, static functions, and typedefs useful when creating collections of heap pointers.|atlcoll.h|
-|[CHeapPtrList](../../atl/reference/cheapptrlist-class.md)|This class provides methods useful when constructing a list of heap pointers.|atlcoll.h|
-|[CImage](../../atl-mfc-shared/reference/cimage-class.md)|Provides enhanced bitmap support, including the ability to load and save images in JPEG, GIF, BMP, and Portable Network Graphics (PNG) formats.|atlimage.h|
-|[CInterfaceArray](../../atl/reference/cinterfacearray-class.md)|This class provides methods useful when constructing an array of COM interface pointers.|atlcoll.h|
-|[CInterfaceList](../../atl/reference/cinterfacelist-class.md)|This class provides methods useful when constructing a list of COM interface pointers.|atlcoll.h|
-|[CLocalHeap](../../atl/reference/clocalheap-class.md)|This class implements [IAtlMemMgr](../../atl/reference/iatlmemmgr-class.md) using the Win32 local heap functions.|atlmem.h|
-|[CMessageMap](../../atl/reference/cmessagemap-class.md)|This class allows an object's message maps to be accessed by another object.|atlwin.h|
-|[CNonStatelessWorker Class](../../atl/reference/cnonstatelessworker-class.md)|Receives requests from a thread pool and passes them on to a worker object that is created and destroyed on each request.|atlutil.h|
-|[CNoWorkerThread Class](../../atl/reference/cnoworkerthread-class.md)|Use this class as the argument for the `MonitorClass` template parameter cache classes if you want to disable dynamic cache maintenance.|atlutil.h|
-|[CPathT Class](../../atl/reference/cpatht-class.md)|This class represents a path.|atlpath.h|
-|[CPrimitiveElementTraits](../../atl/reference/cprimitiveelementtraits-class.md)|This class provides default methods and functions for a collection class composed of primitive data types.|atlcoll.h|
-|[CPrivateObjectSecurityDesc](../../atl/reference/cprivateobjectsecuritydesc-class.md)|This class represents a private object security descriptor object.|atlsecurity.h|
-|[CRBMap](../../atl/reference/crbmap-class.md)|This class represents a mapping structure, using a Red-Black binary tree.|atlcoll.h|
-|[CRBMultiMap](../../atl/reference/crbmultimap-class.md)|This class represents a mapping structure that allows each key to be associated with more than one value, using a Red-Black binary tree.|atlcoll.h|
-|[CRBTree](../../atl/reference/crbtree-class.md)|This class provides methods for creating and utilizing a Red-Black tree.|atlcoll.h|
-|[CRegKey](../../atl/reference/cregkey-class.md)|This class provides methods for manipulating entries in the system registry.|atlbase.h|
-|[CRTThreadTraits](../../atl/reference/crtthreadtraits-class.md)|This class provides the creation function for a CRT thread. Use this class if the thread will use CRT functions.|atlbase.h|
-|[CSacl](../../atl/reference/csacl-class.md)|This class is a wrapper for a SACL (system access-control list) structure.|atlsecurity.h|
-|[CSecurityAttributes](../../atl/reference/csecurityattributes-class.md)|This class is a thin wrapper for the `SECURITY_ATTRIBUTES` structure.|atlsecurity.h|
-|[CSecurityDesc](../../atl/reference/csecuritydesc-class.md)|This class is a wrapper for the `SECURITY_DESCRIPTOR` structure.|atlsecurity.h|
-|[CSid](../../atl/reference/csid-class.md)|This class is a wrapper for a `SID` (security identifier) structure.|atlsecurity.h|
-|[CSimpleArray](../../atl/reference/csimplearray-class.md)|This class provides methods for managing a simple array.|atlsimpcoll.h|
-|[CSimpleArrayEqualHelper](../../atl/reference/csimplearrayequalhelper-class.md)|This class is a helper for the [CSimpleArray](../../atl/reference/csimplearray-class.md) class.|atlsimpcoll.h|
-|[CSimpleArrayEqualHelperFalse](../../atl/reference/csimplearrayequalhelperfalse-class.md)|This class is a helper for the [CSimpleArray](../../atl/reference/csimplearray-class.md) class.|atlsimpcoll.h|
-|[CSimpleDialog](../../atl/reference/csimpledialog-class.md)|This class implements a basic modal dialog box.|atlwin.h|
-|[CSimpleMap](../../atl/reference/csimplemap-class.md)|This class provides support for a simple mapping array.|atlsimpcoll.h|
-|[CSimpleMapEqualHelper](../../atl/reference/csimplemapequalhelper-class.md)|This class is a helper for the [CSimpleMap](../../atl/reference/csimplemap-class.md) class.|atlsimpcoll.h|
-|[CSimpleMapEqualHelperFalse](../../atl/reference/csimplemapequalhelperfalse-class.md)|This class is a helper for the [CSimpleMap](../../atl/reference/csimplemap-class.md) class.|atlsimpcoll.h|
-|[CSnapInItemImpl](../../atl/reference/csnapinitemimpl-class.md)|This class provides methods for implementing a snap-in node object.|atlsnap.h|
-|[CSnapInPropertyPageImpl](../../atl/reference/csnapinpropertypageimpl-class.md)|This class provides methods for implementing a snap-in property page object.|atlsnap.h|
-|[CStockPropImpl](../../atl/reference/cstockpropimpl-class.md)|This class provides methods for supporting stock property values.|atlctl.h|
-|[CStringElementTraits](../../atl/reference/cstringelementtraits-class.md)|This class provides static functions used by collection classes storing `CString` objects.|cstringt.h|
-|[CStringElementTraitsI](../../atl/reference/cstringelementtraitsi-class.md)|This class provides static functions related to strings stored in collection class objects. It is similar to [CStringElementTraits](../../atl/reference/cstringelementtraits-class.md), but performs case-insensitive comparisons.|atlcoll.h|
-|[CStringRefElementTraits](../../atl/reference/cstringrefelementtraits-class.md)|This class provides static functions related to strings stored in collection class objects. The string objects are dealt with as references.|atlcoll.h|
-|[CThreadPool Class](../../atl/reference/cthreadpool-class.md)|This class provides a pool of worker threads that process a queue of work items.|atlutil.h|
-|[CTokenGroups](../../atl/reference/ctokengroups-class.md)|This class is a wrapper for the `TOKEN_GROUPS` structure.|atlsecurity.h|
-|[CTokenPrivileges](../../atl/reference/ctokenprivileges-class.md)|This class is a wrapper for the `TOKEN_PRIVILEGES` structure.|atlsecurity.h|
-|[CUrl Class](../../atl/reference/curl-class.md)|This class represents a URL. It allows you to manipulate each element of the URL independently of the others whether parsing an existing URL string or building a string from scratch.|atlutil.h|
-|[CW2AEX](../../atl/reference/cw2aex-class.md)|This class is used by the string conversion macros CT2AEX, CW2TEX, CW2CTEX, and CT2CAEX, and the typedef CW2A.|atlconv.h|
-|[CW2CWEX](../../atl/reference/cw2cwex-class.md)|This class is used by the string conversion macros CW2CTEX and CT2CWEX, and the typedef CW2CW.|atlconv.h|
-|[CW2WEX](../../atl/reference/cw2wex-class.md)|This class is used by the string conversion macros CW2TEX and CT2WEX, and the typedef CW2W.|atlconv.h|
-|[CWin32Heap](../../atl/reference/cwin32heap-class.md)|This class implements [IAtlMemMgr](../../atl/reference/iatlmemmgr-class.md) using the Win32 heap allocation functions.|atlmem.h|
-|[CWindow](../../atl/reference/cwindow-class.md)|This class provides methods for manipulating a window.|atlwin.h|
-|[CWindowImpl](../../atl/reference/cwindowimpl-class.md)|This class provides methods for creating or subclassing a window.|atlwin.h|
-|[CWinTraits](../../atl/reference/cwintraits-class.md)|This class provides a method for standardizing the styles used when creating a window object.|atlwin.h|
-|[CWinTraitsOR](../../atl/reference/cwintraitsor-class.md)|This class provides a method for standardizing the styles used when creating a window object.|atlwin.h|
-|[CWndClassInfo](../../atl/reference/cwndclassinfo-class.md)|This class provides methods for registering information for a window class.|atlwin.h|
-|[CWorkerThread Class](../../atl/reference/cworkerthread-class.md)|This class creates a worker thread or uses an existing one, waits on one or more kernel object handles, and executes a specified client function when one of the handles is signaled.|atlutil.h|
-|[IAtlAutoThreadModule](../../atl/reference/iatlautothreadmodule-class.md)|This class represents an interface to a `CreateInstance` method.|atlbase.h|
-|[IAtlMemMgr](../../atl/reference/iatlmemmgr-class.md)|This class represents the interface to a memory manager.|atlmem.h|
-|[IAxWinAmbientDispatch](../../atl/reference/iaxwinambientdispatch-interface.md)|This interface provides methods for specifying characteristics of the hosted control or container.|atlbase.h, ATLIFace.h|
-|[IAxWinAmbientDispatchEx](../../atl/reference/iaxwinambientdispatchex-interface.md)|This interface implements supplemental ambient properties for a hosted control.|atlbase.h, ATLIFace.h|
-|[IAxWinHostWindow](../../atl/reference/iaxwinhostwindow-interface.md)|This interface provides methods for manipulating a control and its host object.|atlbase.h, ATLIFace.h|
-|[IAxWinHostWindowLic](../../atl/reference/iaxwinhostwindowlic-interface.md)|This interface provides methods for manipulating a licensed control and its host object.|atlbase.h, ATLIFace.h|
-|[ICollectionOnSTLImpl](../../atl/reference/icollectiononstlimpl-class.md)|This class provides methods used by a collection class.|atlcom.h|
-|[IConnectionPointContainerImpl](../../atl/reference/iconnectionpointcontainerimpl-class.md)|This class implements a connection point container to manage a collection of [IConnectionPointImpl](../../atl/reference/iconnectionpointimpl-class.md) objects.|atlcom.h|
-|[IConnectionPointImpl](../../atl/reference/iconnectionpointimpl-class.md)|This class implements a connection point.|atlcom.h|
-|[IDataObjectImpl](../../atl/reference/idataobjectimpl-class.md)|This class provides methods for supporting Uniform Data Transfer and managing connections.|atlctl.h|
-|[IDispatchImpl](../../atl/reference/idispatchimpl-class.md)|This class provides a default implementation for the `IDispatch` portion of a dual interface.|atlcom.h|
-|[IDispEventImpl](../../atl/reference/idispeventimpl-class.md)|This class provides implementations of the `IDispatch` methods.|atlcom.h|
-|[IDispEventSimpleImpl](../../atl/reference/idispeventsimpleimpl-class.md)|This class provides implementations of the `IDispatch` methods, without getting type information from a type library.|atlcom.h|
-|[IDocHostUIHandlerDispatch](../../atl/reference/idochostuihandlerdispatch-interface.md)|An interface to the Microsoft HTML parsing and rendering engine.|atlbase.h, ATLIFace.h|
-|[IEnumOnSTLImpl](../../atl/reference/ienumonstlimpl-class.md)|This class defines an enumerator interface based on a C++ Standard Library collection.|atlcom.h|
-|[IObjectSafetyImpl](../../atl/reference/iobjectsafetyimpl-class.md)|This class provides a default implementation of the `IObjectSafety` interface to allow a client to retrieve and set an object's safety levels.|atlctl.h|
-|[IObjectWithSiteImpl](../../atl/reference/iobjectwithsiteimpl-class.md)|This class provides methods allowing an object to communicate with its site.|atlcom.h|
-|[IOleControlImpl](../../atl/reference/iolecontrolimpl-class.md)|This class provides a default implementation of the `IOleControl` interface and implements `IUnknown`.|atlctl.h|
-|[IOleInPlaceActiveObjectImpl](../../atl/reference/ioleinplaceactiveobjectimpl-class.md)|This class provides methods for assisting communication between an in-place control and its container.|atlctl.h|
-|[IOleInPlaceObjectWindowlessImpl](../../atl/reference/ioleinplaceobjectwindowlessimpl-class.md)|This class implements `IUnknown` and provides methods that enable a windowless control to receive window messages and to participate in drag-and-drop operations.|atlctl.h|
-|[IOleObjectImpl](../../atl/reference/ioleobjectimpl-class.md)|This class implements `IUnknown` and is the principal interface through which a container communicates with a control.|atlctl.h|
-|[IPerPropertyBrowsingImpl](../../atl/reference/iperpropertybrowsingimpl-class.md)|This class implements `IUnknown` and allows a client to access the information in an object's property pages.|atlctl.h|
-|[IPersistPropertyBagImpl](../../atl/reference/ipersistpropertybagimpl-class.md)|This class implements `IUnknown` and allows an object to save its properties to a client-supplied property bag.|atlcom.h|
-|[IPersistStorageImpl](../../atl/reference/ipersiststorageimpl-class.md)|This class implements the [IPersistStorage](/windows/win32/api/objidl/nn-objidl-ipersiststorage) interface.|atlcom.h|
-|[IPersistStreamInitImpl](../../atl/reference/ipersiststreaminitimpl-class.md)|This class implements `IUnknown` and provides a default implementation of the [IPersistStreamInit](/windows/win32/api/ocidl/nn-ocidl-ipersiststreaminit) interface.|atlcom.h|
-|[IPointerInactiveImpl](../../atl/reference/ipointerinactiveimpl-class.md)|This class implements `IUnknown` and the [IPointerInactive](/windows/win32/api/ocidl/nn-ocidl-ipointerinactive) interface methods.|atlctl.h|
-|[IPropertyNotifySinkCP](../../atl/reference/ipropertynotifysinkcp-class.md)|This class exposes the [IPropertyNotifySink](/windows/win32/api/ocidl/nn-ocidl-ipropertynotifysink) interface as an outgoing interface on a connectable object.|atlctl.h|
-|[IPropertyPage2Impl](../../atl/reference/ipropertypage2impl-class.md)|This class implements `IUnknown` and inherits the default implementation of [IPropertyPageImpl](../../atl/reference/ipropertypageimpl-class.md).|atlctl.h|
-|[IPropertyPageImpl](../../atl/reference/ipropertypageimpl-class.md)|This class implements `IUnknown` and provides a default implementation of the [IPropertyPage](/windows/win32/api/ocidl/nn-ocidl-ipropertypage) interface.|atlctl.h|
-|[IProvideClassInfo2Impl](../../atl/reference/iprovideclassinfo2impl-class.md)|This class provides a default implementation of the [IProvideClassInfo](/windows/win32/api/ocidl/nn-ocidl-iprovideclassinfo) and [IProvideClassInfo2](/windows/win32/api/ocidl/nn-ocidl-iprovideclassinfo2) methods.|atlcom.h|
-|[IQuickActivateImpl](../../atl/reference/iquickactivateimpl-class.md)|This class combines containers' control initialization into a single call.|atlctl.h|
-|[IRunnableObjectImpl](../../atl/reference/irunnableobjectimpl-class.md)|This class implements `IUnknown` and provides a default implementation of the [IRunnableObject](/windows/win32/api/objidl/nn-objidl-irunnableobject) interface.|atlctl.h|
-|[IServiceProviderImpl](../../atl/reference/iserviceproviderimpl-class.md)|This class provides a default implementation of the `IServiceProvider` interface.|atlcom.h|
-|[ISpecifyPropertyPagesImpl](../../atl/reference/ispecifypropertypagesimpl-class.md)|This class implements `IUnknown` and provides a default implementation of the [ISpecifyPropertyPages](/windows/win32/api/ocidl/nn-ocidl-ispecifypropertypages) interface.|atlcom.h|
-|[ISupportErrorInfoImpl](../../atl/reference/isupporterrorinfoimpl-class.md)|This class provides a default implementation of the `ISupportErrorInfo Interface` interface and can be used when only a single interface generates errors on an object.|atlcom.h|
-|[IThreadPoolConfig Interface](../../atl/reference/ithreadpoolconfig-interface.md)|This interface provides methods for configuring a thread pool.|atlutil.h|
-|[IViewObjectExImpl](../../atl/reference/iviewobjecteximpl-class.md)|This class implements `IUnknown` and provides default implementations of the [IViewObject](/windows/win32/api/oleidl/nn-oleidl-iviewobject), [IViewObject2](/windows/win32/api/oleidl/nn-oleidl-iviewobject2), and [IViewObjectEx](/windows/win32/api/ocidl/nn-ocidl-iviewobjectex) interfaces.|atlctl.h|
-|[IWorkerThreadClient Interface](../../atl/reference/iworkerthreadclient-interface.md)|`IWorkerThreadClient` is the interface implemented by clients of the [CWorkerThread](../../atl/reference/cworkerthread-class.md) class.|atlutil.h|
-|[_U_MENUorID](../../atl/reference/u-menuorid-class.md)|This class provides wrappers for `CreateWindow` and `CreateWindowEx`.|atlwin.h|
-|[_U_RECT](../../atl/reference/u-rect-class.md)|This argument adapter class allows either `RECT` pointers or references to be passed to a function that is implemented in terms of pointers.|atlwin.h|
-|[_U_STRINGorID](../../atl/reference/u-stringorid-class.md)|This argument adapter class allows either resource names (LPCTSTRs) or resource IDs (UINTs) to be passed to a function without requiring the caller to convert the ID to a string using the MAKEINTRESOURCE macro.|atlwin.h|
-|[Win32ThreadTraits](../../atl/reference/win32threadtraits-class.md)|This class provides the creation function for a Windows thread. Use this class if the thread will not use CRT functions.|atlbase.h|
+|[`ATL_DRAWINFO`](../../atl/reference/atl-drawinfo-structure.md)|Contains information used for rendering to various targets, such as a printer, metafile, or ActiveX control.|`atlctl.h`|
+|[`_AtlCreateWndData`](../../atl/reference/atlcreatewnddata-structure.md)|Contains class instance data in windowing code in ATL.|`atlbase.h`|
+|[`_ATL_BASE_MODULE70`](../../atl/reference/atl-base-module70-structure.md)|Used by any project that uses ATL.|`atlbase.h`|
+|[`_ATL_COM_MODULE70`](../../atl/reference/atl-com-module70-structure.md)|Used by COM-related code in ATL.| `atlbase.h`|
+|[`_ATL_FUNC_INFO`](../../atl/reference/atl-func-info-structure.md)|Contains type information used to describe a method or property on a dispinterface.|`atlcom.h`|
+|[`_ATL_MODULE70`](../../atl/reference/atl-module70-structure.md)|Contains data used by every ATL module.|`atlbase.h`|
+|[`_ATL_WIN_MODULE70`](../../atl/reference/atl-win-module70-structure.md)|Used by windowing code in ATL.|`atlbase.h`|
+|[`CA2AEX`](../../atl/reference/ca2aex-class.md)|This class is used by the string conversion macros `CA2TEX` and `CT2AEX`, and the typedef `CA2A`.|`atlconv.h`|
+|[`CA2CAEX`](../../atl/reference/ca2caex-class.md)|This class is used by string conversion macros `CA2CTEX` and `CT2CAEX`, and the typedef `CA2CA`.|`atlconv.h`|
+|[`CA2WEX`](../../atl/reference/ca2wex-class.md)|This class is used by the string conversion macros `CA2TEX`, `CA2CTEX`, `CT2WEX`, and `CT2CWEX`, and the typedef `CA2W`.|`atlconv.h`|
+|[`CAccessToken`](../../atl/reference/caccesstoken-class.md)|This class is a wrapper for an access token.|`atlsecurity.h`|
+|[`CAcl`](../../atl/reference/cacl-class.md)|This class is a wrapper for an ACL (access-control list) structure.|`atlsecurity.h`|
+|[`CAdapt`](../../atl/reference/cadapt-class.md)|This template is used to wrap classes that redefine the address-of operator to return something other than the address of the object.|`atlcomcli.h`|
+|[`CAtlArray`](../../atl/reference/catlarray-class.md)|This class implements an array object.|`atlcoll.h`|
+|[`CAtlAutoThreadModule`](../../atl/reference/catlautothreadmodule-class.md)|This class implements a thread-pooled, apartment-model COM server.|`atlbase.h`|
+|[`CAtlAutoThreadModuleT`](../../atl/reference/catlautothreadmodulet-class.md)|This class provides methods for implementing a thread-pooled, apartment-model COM server.|`atlbase.h`|
+|[`CAtlBaseModule`](../../atl/reference/catlbasemodule-class.md)|This class is instantiated in every ATL project.|`atlcore.h`|
+|[`CAtlComModule`](../../atl/reference/catlcommodule-class.md)|This class implements a COM server module.|`atlbase.h`|
+|[`CAtlDebugInterfacesModule`](../../atl/reference/catldebuginterfacesmodule-class.md)|This class provides support for debugging interfaces.|`atlbase.h`|
+|[`CAtlDllModuleT`](../../atl/reference/catldllmodulet-class.md)|This class represents the module for a DLL.|`atlbase.h`|
+|[`CAtlException`](../../atl/reference/catlexception-class.md)|This class defines an ATL exception.|`atlexcept.h`|
+|[`CAtlExeModuleT`](../../atl/reference/catlexemodulet-class.md)|This class represents the module for an application.|`atlbase.h`|
+|[`CAtlFile`](../../atl/reference/catlfile-class.md)|This class provides a thin wrapper around the Windows file-handling API.|`atlfile.h`|
+|[`CAtlFileMapping`](../../atl/reference/catlfilemapping-class.md)|This class represents a memory-mapped file, adding a cast operator to the methods of [`CAtlFileMappingBase`](../../atl/reference/catlfilemappingbase-class.md).|`atlfile.h`|
+|[`CAtlFileMappingBase`](../../atl/reference/catlfilemappingbase-class.md)|This class represents a memory-mapped file.|`atlfile.h`|
+|[`CAtlList`](../../atl/reference/catllist-class.md)|This class provides methods for creating and managing a list object.|`atlcoll.h`|
+|[`CAtlMap`](../../atl/reference/catlmap-class.md)|This class provides methods for creating and managing a map object.|`atlcoll.h`|
+|[`CAtlModule`](../../atl/reference/catlmodule-class.md)|This class provides methods used by several ATL module classes.|`atlbase.h`|
+|[`CAtlModuleT`](../../atl/reference/catlmodulet-class.md)|This class implements an ATL module.|`atlbase.h`|
+|[`CAtlPreviewCtrlImpl`](../../atl/reference/catlpreviewctrlimpl-class.md)|This class is an ATL implementation of a window that is placed on a host window provided by the Shell for Rich Preview.|`atlpreviewctrlimpl`.h|
+|[`CAtlServiceModuleT`](../../atl/reference/catlservicemodulet-class.md)|This class implements a service.|`atlbase.h`|
+|[`CAtlTemporaryFile`](../../atl/reference/catltemporaryfile-class.md)|This class provides methods for the creation and use of a temporary file.|`atlfile.h`|
+|[`CAtlTransactionManager`](../../atl/reference/catltransactionmanager-class.md)|This class provides a wrapper to Kernel Transaction Manager (KTM) functions.|`atltransactionmanager`.h|
+|[`CAtlWinModule`](../../atl/reference/catlwinmodule-class.md)|This class provides support for ATL windowing components.|`atlbase.h`|
+|[`CAutoPtr`](../../atl/reference/cautoptr-class.md)|This class represents a smart pointer object.|`atlbase.h`|
+|[`CAutoPtrArray`](../../atl/reference/cautoptrarray-class.md)|This class provides methods useful when constructing an array of smart pointers.|`atlbase.h`|
+|[`CAutoPtrElementTraits`](../../atl/reference/cautoptrelementtraits-class.md)|This class provides methods, static functions, and typedefs useful when creating collections of smart pointers.|`atlcoll.h`|
+|[`CAutoPtrList`](../../atl/reference/cautoptrlist-class.md)|This class provides methods useful when constructing a list of smart pointers.|`atlcoll.h`|
+|[`CAutoVectorPtr`](../../atl/reference/cautovectorptr-class.md)|This class represents a smart pointer object using vector new and delete operators.|`atlbase.h`|
+|[`CAutoVectorPtrElementTraits`](../../atl/reference/cautovectorptrelementtraits-class.md)|This class provides methods, static functions, and typedefs useful when creating collections of smart pointers using vector new and delete operators.|`atlcoll.h`|
+|[`CAxDialogImpl`](../../atl/reference/caxdialogimpl-class.md)|This class implements a dialog box (modal or modeless) that hosts ActiveX controls.|`atlwin.h`|
+|[`CAxWindow`](../../atl/reference/caxwindow-class.md)|This class provides methods for manipulating a window hosting an ActiveX control.|`atlwin.h`|
+|[`CAxWindow2T`](../../atl/reference/caxwindow2t-class.md)|This class provides methods for manipulating a window that hosts an ActiveX control and also has support for hosting licensed ActiveX controls.|`atlwin.h`|
+|[`CBindStatusCallback`](../../atl/reference/cbindstatuscallback-class.md)|This class implements the `IBindStatusCallback` interface.|`atlctl.h`|
+|[`CComAggObject`](../../atl/reference/ccomaggobject-class.md)|This class implements [`IUnknown`](/windows/win32/api/unknwn/nn-unknwn-iunknown) for an aggregated object.|`atlcom.h`|
+|[`CComAllocator`](../../atl/reference/ccomallocator-class.md)|This class provides methods for managing memory using COM memory routines.|`atlbase.h`|
+|[`CComApartment`](../../atl/reference/ccomapartment-class.md)|This class provides support for managing an apartment in a thread-pooled EXE module.|`atlbase.h`|
+|[`CComAutoCriticalSection`](../../atl/reference/ccomautocriticalsection-class.md)|This class provides methods for obtaining and releasing ownership of a critical section object.|`atlcore.h`|
+|[`CComAutoThreadModule`](../../atl/reference/ccomautothreadmodule-class.md)|As of ATL 7.0, `CComAutoThreadModule` is obsolete: see [ATL Modules](../../atl/atl-module-classes.md) for more details.|`atlbase.h`|
+|[`CComBSTR`](../../atl/reference/ccombstr-class.md)|This class is a wrapper for BSTRs.|`atlbase.h`|
+|[`CComCachedTearOffObject`](../../atl/reference/ccomcachedtearoffobject-class.md)|This class implements [`IUnknown`](/windows/win32/api/unknwn/nn-unknwn-iunknown) for a tear-off interface.|`atlcom.h`|
+|[`CComClassFactory`](../../atl/reference/ccomclassfactory-class.md)|This class implements the [`IClassFactory`](/windows/win32/api/unknwnbase/nn-unknwnbase-iclassfactory) interface.|`atlcom.h`|
+|[`CComClassFactory2`](../../atl/reference/ccomclassfactory2-class.md)|This class implements the [`IClassFactory2`](/windows/win32/api/ocidl/nn-ocidl-iclassfactory2) interface.|`atlcom.h`|
+|[`CComClassFactoryAutoThread`](../../atl/reference/ccomclassfactoryautothread-class.md)|This class implements the [`IClassFactory`](/windows/win32/api/unknwnbase/nn-unknwnbase-iclassfactory) interface and allows objects to be created in multiple apartments.|`atlcom.h`|
+|[`CComClassFactorySingleton`](../../atl/reference/ccomclassfactorysingleton-class.md)|This class derives from [`CComClassFactory`](../../atl/reference/ccomclassfactory-class.md) and uses [`CComObjectGlobal`](../../atl/reference/ccomobjectglobal-class.md) to construct a single object.|`atlcom.h`|
+|[`CComCoClass`](../../atl/reference/ccomcoclass-class.md)|This class provides methods for creating instances of a class and obtaining its properties.|`atlcom.h`|
+|[`CComCompositeControl`](../../atl/reference/ccomcompositecontrol-class.md)|This class provides the methods required to implement a composite control.|`atlctl.h`|
+|[`CComContainedObject`](../../atl/reference/ccomcontainedobject-class.md)|This class implements [`IUnknown`](/windows/win32/api/unknwn/nn-unknwn-iunknown) by delegating to the owner object's `IUnknown`.|`atlcom.h`|
+|[`CComControl`](../../atl/reference/ccomcontrol-class.md)|This class provides methods for creating and managing ATL controls.|`atlctl.h`|
+|[`CComControlBase`](../../atl/reference/ccomcontrolbase-class.md)|This class provides methods for creating and managing ATL controls.|`atlctl.h`|
+|[`CComCriticalSection`](../../atl/reference/ccomcriticalsection-class.md)|This class provides methods for obtaining and releasing ownership of a critical section object.|`atlcore.h`|
+|[`CComCritSecLock`](../../atl/reference/ccomcritseclock-class.md)|This class provides methods for locking and unlocking a critical section object.|`atlbase.h`|
+|[`CComCurrency`](../../atl/reference/ccomcurrency-class.md)|This class has methods and operators for creating and managing a `CURRENCY` object.|`atlcur.h`|
+|[`CComDynamicUnkArray`](../../atl/reference/ccomdynamicunkarray-class.md)|This class stores an array of `IUnknown` pointers.|`atlcom.h`|
+|[`CComEnum`](../../atl/reference/ccomenum-class.md)|This class defines a COM enumerator object based on an array.|`atlcom.h`|
+|[`CComEnumImpl`](../../atl/reference/ccomenumimpl-class.md)|This class provides the implementation for a COM enumerator interface where the items being enumerated are stored in an array.|`atlcom.h`|
+|[`CComEnumOnSTL`](../../atl/reference/ccomenumonstl-class.md)|This class defines a COM enumerator object based on a C++ Standard Library collection.|`atlcom.h`|
+|[`CComFakeCriticalSection`](../../atl/reference/ccomfakecriticalsection-class.md)|This class provides the same methods as [`CComCriticalSection`](../../atl/reference/ccomcriticalsection-class.md) but doesn't provide a critical section.|`atlcore.h`|
+|[`CComGITPtr`](../../atl/reference/ccomgitptr-class.md)|This class provides methods for dealing with interface pointers and the global interface table (GIT).|`atlbase.h`|
+|[`CComHeap`](../../atl/reference/ccomheap-class.md)|This class implements [`IAtlMemMgr`](../../atl/reference/iatlmemmgr-class.md) using the COM memory allocation functions.|`ATLComMem.h`|
+|[`CComHeapPtr`](../../atl/reference/ccomheapptr-class.md)|A smart pointer class for managing heap pointers.|`atlbase.h`|
+|[`CComModule`](../../atl/reference/ccommodule-class.md)|As of ATL 7.0, `CComModule` is obsolete: see [ATL Modules](../../atl/atl-module-classes.md) for more details.|`atlbase.h`|
+|[`CComMultiThreadModel`](../../atl/reference/ccommultithreadmodel-class.md)|This class provides thread-safe methods for incrementing and decrementing the value of a variable.|`atlbase.h`|
+|[`CComMultiThreadModelNoCS`](../../atl/reference/ccommultithreadmodelnocs-class.md)|This class provides thread-safe methods for incrementing and decrementing the value of a variable, without critical section locking or unlocking functionality.|`atlbase.h`|
+|[`CComObject`](../../atl/reference/ccomobject-class.md)|This class implements `IUnknown` for a nonaggregated object.|`atlcom.h`|
+|[`CComObjectGlobal`](../../atl/reference/ccomobjectglobal-class.md)|This class manages a reference count on the module containing your `Base` object.|`atlcom.h`|
+|[`CComObjectNoLock`](../../atl/reference/ccomobjectnolock-class.md)|This class implements `IUnknown` for a nonaggregated object, but doesn't increment the module lock count in the constructor.|`atlcom.h`|
+|[`CComObjectRoot`](../../atl/reference/ccomobjectroot-class.md)|This typedef of [`CComObjectRootEx`](../../atl/reference/ccomobjectrootex-class.md) is templatized on the default threading model of the server.|`atlcom.h`|
+|[`CComObjectRootEx`](../../atl/reference/ccomobjectrootex-class.md)|This class provides methods to handle object reference count management for both nonaggregated and aggregated objects.|`atlcom.h`|
+|[`CComObjectStack`](../../atl/reference/ccomobjectstack-class.md)|This class creates a temporary COM object and provides it with a skeletal implementation of `IUnknown`.|`atlcom.h`|
+|[`CComPolyObject`](../../atl/reference/ccompolyobject-class.md)|This class implements `IUnknown` for an aggregated or nonaggregated object.|`atlcom.h`|
+|[`CComPtr`](../../atl/reference/ccomptr-class.md)|A smart pointer class for managing COM interface pointers.|`atlcomcli.h`|
+|[`CComPtrBase`](../../atl/reference/ccomptrbase-class.md)|This class provides a basis for smart pointer classes using COM-based memory routines.|`atlcomcli.h`|
+|[`CComQIPtr`](../../atl/reference/ccomqiptr-class.md)|A smart pointer class for managing COM interface pointers.|`atlcomcli.h`|
+|[`CComQIPtrElementTraits`](../../atl/reference/ccomqiptrelementtraits-class.md)|This class provides methods, static functions, and typedefs useful when creating collections of COM interface pointers.|`atlcoll.h`|
+|[`CComSafeArray`](../../atl/reference/ccomsafearray-class.md)|This class is a wrapper for the `SAFEARRAY Data Type` structure.|`atlsafe.h`|
+|[`CComSafeArrayBound`](../../atl/reference/ccomsafearraybound-class.md)|This class is a wrapper for a `SAFEARRAYBOUND` structure.|`atlsafe.h`|
+|[`CComSimpleThreadAllocator`](../../atl/reference/ccomsimplethreadallocator-class.md)|This class manages thread selection for the class [`CComAutoThreadModule`](../../atl/reference/ccomautothreadmodule-class.md).|`atlbase.h`|
+|[`CComSingleThreadModel`](../../atl/reference/ccomsinglethreadmodel-class.md)|This class provides methods for incrementing and decrementing the value of a variable.|`atlbase.h`|
+|[`CComTearOffObject`](../../atl/reference/ccomtearoffobject-class.md)|This class implements a tear-off interface.|`atlcom.h`|
+|[`CComUnkArray`](../../atl/reference/ccomunkarray-class.md)|This class stores `IUnknown` pointers and is designed to be used as a parameter to the [`IConnectionPointImpl`](../../atl/reference/iconnectionpointimpl-class.md) template class.|`atlcom.h`|
+|[`CComVariant`](../../atl/reference/ccomvariant-class.md)|This class wraps the `VARIANT` type, providing a member indicating the type of data stored.|`atlcomcli.h`|
+|[`CContainedWindowT`](../../atl/reference/ccontainedwindowt-class.md)|This class implements a window contained within another object.|`atlwin.h`|
+|[`CCRTAllocator`](../../atl/reference/ccrtallocator-class.md)|This class provides methods for managing memory using CRT memory routines.|`atlcore.h`|
+|[`CCRTHeap`](../../atl/reference/ccrtheap-class.md)|This class implements [`IAtlMemMgr`](../../atl/reference/iatlmemmgr-class.md) using the CRT heap functions.|`atlmem.h`|
+|[`CDacl`](../../atl/reference/cdacl-class.md)|This class is a wrapper for a DACL (discretionary access-control list) structure.|`atlsecurity.h`|
+|[`CDebugReportHook` Class](../../atl/reference/cdebugreporthook-class.md)|Use this class to send debug reports to a named pipe.|`atlutil.h`|
+|[`CDefaultCharTraits`](../../atl/reference/cdefaultchartraits-class.md)|This class provides two static functions for converting characters between uppercase and lowercase.|`atlcoll.h`|
+|[`CDefaultCompareTraits`](../../atl/reference/cdefaultcomparetraits-class.md)|This class provides default element comparison functions.|`atlcoll.h`|
+|[`CDefaultElementTraits`](../../atl/reference/cdefaultelementtraits-class.md)|This class provides default methods and functions for a collection class.|`atlcoll.h`|
+|[`CDefaultHashTraits`](../../atl/reference/cdefaulthashtraits-class.md)|This class provides a static function for calculating hash values.|`atlcoll.h`|
+|[`CDialogImpl`](../../atl/reference/cdialogimpl-class.md)|This class provides methods for creating a modal or modeless dialog box.|`atlwin.h`|
+|[`CDynamicChain`](../../atl/reference/cdynamicchain-class.md)|This class provides methods supporting the dynamic chaining of message maps.|`atlwin.h`|
+|[`CElementTraits`](../../atl/reference/celementtraits-class.md)|This class is used by collection classes to provide methods and functions for moving, copying, comparison, and hashing operations.|`atlcoll.h`|
+|[`CElementTraitsBase`](../../atl/reference/celementtraitsbase-class.md)|This class provides default copy and move methods for a collection class.|`atlcoll.h`|
+|[`CFirePropNotifyEvent`](../../atl/reference/cfirepropnotifyevent-class.md)|This class provides methods for notifying the container's sink regarding control property changes.|`atlctl.h`|
+|[`CGlobalHeap`](../../atl/reference/cglobalheap-class.md)|This class implements [`IAtlMemMgr`](../../atl/reference/iatlmemmgr-class.md) using the Win32 global heap functions.|`atlmem.h`|
+|[`CHandle`](../../atl/reference/chandle-class.md)|This class provides methods for creating and using a handle object.|`atlbase.h`|
+|[`CHeapPtr`](../../atl/reference/cheapptr-class.md)|A smart pointer class for managing heap pointers.|`atlcore.h`|
+|[`CHeapPtrBase`](../../atl/reference/cheapptrbase-class.md)|This class forms the basis for several smart heap pointer classes.|`atlcore.h`|
+|[`CHeapPtrElementTraits` Class](../../atl/reference/cheapptrelementtraits-class.md)|This class provides methods, static functions, and typedefs useful when creating collections of heap pointers.|`atlcoll.h`|
+|[`CHeapPtrList`](../../atl/reference/cheapptrlist-class.md)|This class provides methods useful when constructing a list of heap pointers.|`atlcoll.h`|
+|[`CImage`](../../atl-mfc-shared/reference/cimage-class.md)|Provides enhanced bitmap support, including the ability to load and save images in JPEG, GIF, BMP, and Portable Network Graphics (PNG) formats.|`atlimage.h`|
+|[`CInterfaceArray`](../../atl/reference/cinterfacearray-class.md)|This class provides methods useful when constructing an array of COM interface pointers.|`atlcoll.h`|
+|[`CInterfaceList`](../../atl/reference/cinterfacelist-class.md)|This class provides methods useful when constructing a list of COM interface pointers.|`atlcoll.h`|
+|[`CLocalHeap`](../../atl/reference/clocalheap-class.md)|This class implements [`IAtlMemMgr`](../../atl/reference/iatlmemmgr-class.md) using the Win32 local heap functions.|`atlmem.h`|
+|[`CMessageMap`](../../atl/reference/cmessagemap-class.md)|This class allows an object's message maps to be accessed by another object.|`atlwin.h`|
+|[`CNonStatelessWorker` Class](../../atl/reference/cnonstatelessworker-class.md)|Receives requests from a thread pool and passes them on to a worker object that is created and destroyed on each request.|`atlutil.h`|
+|[`CNoWorkerThread` Class](../../atl/reference/cnoworkerthread-class.md)|Use this class as the argument for the `MonitorClass` template parameter cache classes if you want to disable dynamic cache maintenance.|`atlutil.h`|
+|[`CPathT` Class](../../atl/reference/cpatht-class.md)|This class represents a path.|`atlpath.h`|
+|[`CPrimitiveElementTraits`](../../atl/reference/cprimitiveelementtraits-class.md)|This class provides default methods and functions for a collection class composed of primitive data types.|`atlcoll.h`|
+|[`CPrivateObjectSecurityDesc`](../../atl/reference/cprivateobjectsecuritydesc-class.md)|This class represents a private object security descriptor object.|`atlsecurity.h`|
+|[`CRBMap`](../../atl/reference/crbmap-class.md)|This class represents a mapping structure, using a Red-Black binary tree.|`atlcoll.h`|
+|[`CRBMultiMap`](../../atl/reference/crbmultimap-class.md)|This class represents a mapping structure that allows each key to be associated with more than one value, using a Red-Black binary tree.|`atlcoll.h`|
+|[`CRBTree`](../../atl/reference/crbtree-class.md)|This class provides methods for creating and utilizing a Red-Black tree.|`atlcoll.h`|
+|[`CRegKey`](../../atl/reference/cregkey-class.md)|This class provides methods for manipulating entries in the system registry.|`atlbase.h`|
+|[`CRTThreadTraits`](../../atl/reference/crtthreadtraits-class.md)|This class provides the creation function for a CRT thread. Use this class if the thread will use CRT functions.|`atlbase.h`|
+|[`CSacl`](../../atl/reference/csacl-class.md)|This class is a wrapper for a SACL (system access-control list) structure.|`atlsecurity.h`|
+|[`CSecurityAttributes`](../../atl/reference/csecurityattributes-class.md)|This class is a thin wrapper for the `SECURITY_ATTRIBUTES` structure.|`atlsecurity.h`|
+|[`CSecurityDesc`](../../atl/reference/csecuritydesc-class.md)|This class is a wrapper for the `SECURITY_DESCRIPTOR` structure.|`atlsecurity.h`|
+|[`CSid`](../../atl/reference/csid-class.md)|This class is a wrapper for a `SID` (security identifier) structure.|`atlsecurity.h`|
+|[`CSimpleArray`](../../atl/reference/csimplearray-class.md)|This class provides methods for managing a simple array.|`atlsimpcoll.h`|
+|[`CSimpleArrayEqualHelper`](../../atl/reference/csimplearrayequalhelper-class.md)|This class is a helper for the [`CSimpleArray`](../../atl/reference/csimplearray-class.md) class.|`atlsimpcoll.h`|
+|[`CSimpleArrayEqualHelperFalse`](../../atl/reference/csimplearrayequalhelperfalse-class.md)|This class is a helper for the [`CSimpleArray`](../../atl/reference/csimplearray-class.md) class.|`atlsimpcoll.h`|
+|[`CSimpleDialog`](../../atl/reference/csimpledialog-class.md)|This class implements a basic modal dialog box.|`atlwin.h`|
+|[`CSimpleMap`](../../atl/reference/csimplemap-class.md)|This class provides support for a simple mapping array.|`atlsimpcoll.h`|
+|[`CSimpleMapEqualHelper`](../../atl/reference/csimplemapequalhelper-class.md)|This class is a helper for the [`CSimpleMap`](../../atl/reference/csimplemap-class.md) class.|`atlsimpcoll.h`|
+|[`CSimpleMapEqualHelperFalse`](../../atl/reference/csimplemapequalhelperfalse-class.md)|This class is a helper for the [`CSimpleMap`](../../atl/reference/csimplemap-class.md) class.|`atlsimpcoll.h`|
+|[`CSnapInItemImpl`](../../atl/reference/csnapinitemimpl-class.md)|This class provides methods for implementing a snap-in node object.|`atlsnap.h`|
+|[`CSnapInPropertyPageImpl`](../../atl/reference/csnapinpropertypageimpl-class.md)|This class provides methods for implementing a snap-in property page object.|`atlsnap.h`|
+|[`CStockPropImpl`](../../atl/reference/cstockpropimpl-class.md)|This class provides methods for supporting stock property values.|`atlctl.h`|
+|[`CStringElementTraits`](../../atl/reference/cstringelementtraits-class.md)|This class provides static functions used by collection classes storing `CString` objects.|`cstringt`.h|
+|[`CStringElementTraitsI`](../../atl/reference/cstringelementtraitsi-class.md)|This class provides static functions related to strings stored in collection class objects. It's similar to [`CStringElementTraits`](../../atl/reference/cstringelementtraits-class.md), but performs case-insensitive comparisons.|`atlcoll.h`|
+|[`CStringRefElementTraits`](../../atl/reference/cstringrefelementtraits-class.md)|This class provides static functions related to strings stored in collection class objects. The string objects are dealt with as references.|`atlcoll.h`|
+|[`CThreadPool` Class](../../atl/reference/cthreadpool-class.md)|This class provides a pool of worker threads that process a queue of work items.|`atlutil.h`|
+|[`CTokenGroups`](../../atl/reference/ctokengroups-class.md)|This class is a wrapper for the `TOKEN_GROUPS` structure.|`atlsecurity.h`|
+|[`CTokenPrivileges`](../../atl/reference/ctokenprivileges-class.md)|This class is a wrapper for the `TOKEN_PRIVILEGES` structure.|`atlsecurity.h`|
+|[`CUrl` Class](../../atl/reference/curl-class.md)|This class represents a URL. It allows you to manipulate each element of the URL independently of the others whether parsing an existing URL string or building a string from scratch.|`atlutil.h`|
+|[`CW2AEX`](../../atl/reference/cw2aex-class.md)|This class is used by the string conversion macros `CT2AEX`, `CW2TEX`, `CW2CTEX`, and `CT2CAEX`, and the typedef `CW2A`.|`atlconv.h`|
+|[`CW2CWEX`](../../atl/reference/cw2cwex-class.md)|This class is used by the string conversion macros `CW2CTEX` and `CT2CWEX`, and the typedef `CW2CW`.|`atlconv.h`|
+|[`CW2WEX`](../../atl/reference/cw2wex-class.md)|This class is used by the string conversion macros `CW2TEX` and `CT2WEX`, and the typedef `CW2W`.|`atlconv.h`|
+|[`CWin32Heap`](../../atl/reference/cwin32heap-class.md)|This class implements [`IAtlMemMgr`](../../atl/reference/iatlmemmgr-class.md) using the Win32 heap allocation functions.|`atlmem.h`|
+|[`CWindow`](../../atl/reference/cwindow-class.md)|This class provides methods for manipulating a window.|`atlwin.h`|
+|[`CWindowImpl`](../../atl/reference/cwindowimpl-class.md)|This class provides methods for creating or subclassing a window.|`atlwin.h`|
+|[`CWinTraits`](../../atl/reference/cwintraits-class.md)|This class provides a method for standardizing the styles used when creating a window object.|`atlwin.h`|
+|[`CWinTraitsOR`](../../atl/reference/cwintraitsor-class.md)|This class provides a method for standardizing the styles used when creating a window object.|`atlwin.h`|
+|[`CWndClassInfo`](../../atl/reference/cwndclassinfo-class.md)|This class provides methods for registering information for a window class.|`atlwin.h`|
+|[`CWorkerThread` Class](../../atl/reference/cworkerthread-class.md)|This class creates a worker thread or uses an existing one, waits on one or more kernel object handles, and executes a specified client function when one of the handles is signaled.|`atlutil.h`|
+|[`IAtlAutoThreadModule`](../../atl/reference/iatlautothreadmodule-class.md)|This class represents an interface to a `CreateInstance` method.|`atlbase.h`|
+|[`IAtlMemMgr`](../../atl/reference/iatlmemmgr-class.md)|This class represents the interface to a memory manager.|`atlmem.h`|
+|[`IAxWinAmbientDispatch`](../../atl/reference/iaxwinambientdispatch-interface.md)|This interface provides methods for specifying characteristics of the hosted control or container.|`atlbase.h`, `ATLIFace.h`|
+|[`IAxWinAmbientDispatchEx`](../../atl/reference/iaxwinambientdispatchex-interface.md)|This interface implements supplemental ambient properties for a hosted control.|`atlbase.h`, `ATLIFace.h`|
+|[`IAxWinHostWindow`](../../atl/reference/iaxwinhostwindow-interface.md)|This interface provides methods for manipulating a control and its host object.|`atlbase.h`, `ATLIFace.h`|
+|[`IAxWinHostWindowLic`](../../atl/reference/iaxwinhostwindowlic-interface.md)|This interface provides methods for manipulating a licensed control and its host object.|`atlbase.h`, `ATLIFace.h`|
+|[`ICollectionOnSTLImpl`](../../atl/reference/icollectiononstlimpl-class.md)|This class provides methods used by a collection class.|`atlcom.h`|
+|[`IConnectionPointContainerImpl`](../../atl/reference/iconnectionpointcontainerimpl-class.md)|This class implements a connection point container to manage a collection of [`IConnectionPointImpl`](../../atl/reference/iconnectionpointimpl-class.md) objects.|`atlcom.h`|
+|[`IConnectionPointImpl`](../../atl/reference/iconnectionpointimpl-class.md)|This class implements a connection point.|`atlcom.h`|
+|[`IDataObjectImpl`](../../atl/reference/idataobjectimpl-class.md)|This class provides methods for supporting Uniform Data Transfer and managing connections.|`atlctl.h`|
+|[`IDispatchImpl`](../../atl/reference/idispatchimpl-class.md)|This class provides a default implementation for the `IDispatch` portion of a dual interface.|`atlcom.h`|
+|[`IDispEventImpl`](../../atl/reference/idispeventimpl-class.md)|This class provides implementations of the `IDispatch` methods.|`atlcom.h`|
+|[`IDispEventSimpleImpl`](../../atl/reference/idispeventsimpleimpl-class.md)|This class provides implementations of the `IDispatch` methods, without getting type information from a type library.|`atlcom.h`|
+|[`IDocHostUIHandlerDispatch`](../../atl/reference/idochostuihandlerdispatch-interface.md)|An interface to the Microsoft HTML parsing and rendering engine.|`atlbase.h`, `ATLIFace.h`|
+|[`IEnumOnSTLImpl`](../../atl/reference/ienumonstlimpl-class.md)|This class defines an enumerator interface based on a C++ Standard Library collection.|`atlcom.h`|
+|[`IObjectSafetyImpl`](../../atl/reference/iobjectsafetyimpl-class.md)|This class provides a default implementation of the `IObjectSafety` interface to allow a client to retrieve and set an object's safety levels.|`atlctl.h`|
+|[`IObjectWithSiteImpl`](../../atl/reference/iobjectwithsiteimpl-class.md)|This class provides methods allowing an object to communicate with its site.|`atlcom.h`|
+|[`IOleControlImpl`](../../atl/reference/iolecontrolimpl-class.md)|This class provides a default implementation of the `IOleControl` interface and implements `IUnknown`.|`atlctl.h`|
+|[`IOleInPlaceActiveObjectImpl`](../../atl/reference/ioleinplaceactiveobjectimpl-class.md)|This class provides methods for assisting communication between an in-place control and its container.|`atlctl.h`|
+|[`IOleInPlaceObjectWindowlessImpl`](../../atl/reference/ioleinplaceobjectwindowlessimpl-class.md)|This class implements `IUnknown` and provides methods that enable a windowless control to receive window messages and to participate in drag-and-drop operations.|`atlctl.h`|
+|[`IOleObjectImpl`](../../atl/reference/ioleobjectimpl-class.md)|This class implements `IUnknown` and is the principal interface through which a container communicates with a control.|`atlctl.h`|
+|[`IPerPropertyBrowsingImpl`](../../atl/reference/iperpropertybrowsingimpl-class.md)|This class implements `IUnknown` and allows a client to access the information in an object's property pages.|`atlctl.h`|
+|[`IPersistPropertyBagImpl`](../../atl/reference/ipersistpropertybagimpl-class.md)|This class implements `IUnknown` and allows an object to save its properties to a client-supplied property bag.|`atlcom.h`|
+|[`IPersistStorageImpl`](../../atl/reference/ipersiststorageimpl-class.md)|This class implements the [`IPersistStorage`](/windows/win32/api/objidl/nn-objidl-ipersiststorage) interface.|`atlcom.h`|
+|[`IPersistStreamInitImpl`](../../atl/reference/ipersiststreaminitimpl-class.md)|This class implements `IUnknown` and provides a default implementation of the [`IPersistStreamInit`](/windows/win32/api/ocidl/nn-ocidl-ipersiststreaminit) interface.|`atlcom.h`|
+|[`IPointerInactiveImpl`](../../atl/reference/ipointerinactiveimpl-class.md)|This class implements `IUnknown` and the [`IPointerInactive`](/windows/win32/api/ocidl/nn-ocidl-ipointerinactive) interface methods.|`atlctl.h`|
+|[`IPropertyNotifySinkCP`](../../atl/reference/ipropertynotifysinkcp-class.md)|This class exposes the [`IPropertyNotifySink`](/windows/win32/api/ocidl/nn-ocidl-ipropertynotifysink) interface as an outgoing interface on a connectable object.|`atlctl.h`|
+|[`IPropertyPage2Impl`](../../atl/reference/ipropertypage2impl-class.md)|This class implements `IUnknown` and inherits the default implementation of [`IPropertyPageImpl`](../../atl/reference/ipropertypageimpl-class.md).|`atlctl.h`|
+|[`IPropertyPageImpl`](../../atl/reference/ipropertypageimpl-class.md)|This class implements `IUnknown` and provides a default implementation of the [`IPropertyPage`](/windows/win32/api/ocidl/nn-ocidl-ipropertypage) interface.|`atlctl.h`|
+|[`IProvideClassInfo2Impl`](../../atl/reference/iprovideclassinfo2impl-class.md)|This class provides a default implementation of the [`IProvideClassInfo`](/windows/win32/api/ocidl/nn-ocidl-iprovideclassinfo) and [`IProvideClassInfo2`](/windows/win32/api/ocidl/nn-ocidl-iprovideclassinfo2) methods.|`atlcom.h`|
+|[`IQuickActivateImpl`](../../atl/reference/iquickactivateimpl-class.md)|This class combines containers' control initialization into a single call.|`atlctl.h`|
+|[`IRunnableObjectImpl`](../../atl/reference/irunnableobjectimpl-class.md)|This class implements `IUnknown` and provides a default implementation of the [`IRunnableObject`](/windows/win32/api/objidl/nn-objidl-irunnableobject) interface.|`atlctl.h`|
+|[`IServiceProviderImpl`](../../atl/reference/iserviceproviderimpl-class.md)|This class provides a default implementation of the `IServiceProvider` interface.|`atlcom.h`|
+|[`ISpecifyPropertyPagesImpl`](../../atl/reference/ispecifypropertypagesimpl-class.md)|This class implements `IUnknown` and provides a default implementation of the [`ISpecifyPropertyPages`](/windows/win32/api/ocidl/nn-ocidl-ispecifypropertypages) interface.|`atlcom.h`|
+|[`ISupportErrorInfoImpl`](../../atl/reference/isupporterrorinfoimpl-class.md)|This class provides a default implementation of the `ISupportErrorInfo Interface` interface and can be used when only a single interface generates errors on an object.|`atlcom.h`|
+|[`IThreadPoolConfig` Interface](../../atl/reference/ithreadpoolconfig-interface.md)|This interface provides methods for configuring a thread pool.|`atlutil.h`|
+|[`IViewObjectExImpl`](../../atl/reference/iviewobjecteximpl-class.md)|This class implements `IUnknown` and provides default implementations of the [`IViewObject`](/windows/win32/api/oleidl/nn-oleidl-iviewobject), [`IViewObject2`](/windows/win32/api/oleidl/nn-oleidl-iviewobject2), and [`IViewObjectEx`](/windows/win32/api/ocidl/nn-ocidl-iviewobjectex) interfaces.|`atlctl.h`|
+|[`IWorkerThreadClient` Interface](../../atl/reference/iworkerthreadclient-interface.md)|`IWorkerThreadClient` is the interface implemented by clients of the [`CWorkerThread`](../../atl/reference/cworkerthread-class.md) class.|`atlutil.h`|
+|[`_U_MENUorID`](../../atl/reference/u-menuorid-class.md)|This class provides wrappers for `CreateWindow` and `CreateWindowEx`.|`atlwin.h`|
+|[`_U_RECT`](../../atl/reference/u-rect-class.md)|This argument adapter class allows either `RECT` pointers or references to be passed to a function that is implemented in terms of pointers.|`atlwin.h`|
+|[`_U_STRINGorID`](../../atl/reference/u-stringorid-class.md)|This argument adapter class allows either resource names (LPCTSTRs) or resource IDs (UINTs) to be passed to a function without requiring the caller to convert the ID to a string using the `MAKEINTRESOURCE` macro.|`atlwin.h`|
+|[`Win32ThreadTraits`](../../atl/reference/win32threadtraits-class.md)|This class provides the creation function for a Windows thread. Use this class if the thread won't use CRT functions.|`atlbase.h`|
## See also
-[ATL COM Desktop Components](../../atl/atl-com-desktop-components.md)
-[Functions](../../atl/reference/atl-functions.md)
-[Global Variables](../../atl/reference/atl-global-variables.md)
-[Typedefs](../../atl/reference/atl-typedefs.md)
+[ATL COM Desktop Components](../../atl/atl-com-desktop-components.md)\
+[Functions](../../atl/reference/atl-functions.md)\
+[Global Variables](../../atl/reference/atl-global-variables.md)\
+[Typedefs](../../atl/reference/atl-typedefs.md)\
[Class Overview](../../atl/atl-class-overview.md)
diff --git a/docs/atl/reference/atl-com-module70-structure.md b/docs/atl/reference/atl-com-module70-structure.md
index 1bed0efc1d..3f37add4ec 100644
--- a/docs/atl/reference/atl-com-module70-structure.md
+++ b/docs/atl/reference/atl-com-module70-structure.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: _ATL_COM_MODULE70 Structure"
title: "_ATL_COM_MODULE70 Structure"
ms.date: "11/04/2016"
f1_keywords: ["ATL::_ATL_COM_MODULE70", "ATL._ATL_COM_MODULE70", "_ATL_COM_MODULE70"]
diff --git a/docs/atl/reference/atl-com-plus-1-0-component-wizard.md b/docs/atl/reference/atl-com-plus-1-0-component-wizard.md
index e5e5e3bafb..4f342caa93 100644
--- a/docs/atl/reference/atl-com-plus-1-0-component-wizard.md
+++ b/docs/atl/reference/atl-com-plus-1-0-component-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL COM+ 1.0 Component Wizard"
title: "ATL COM+ 1.0 Component Wizard"
ms.date: "05/08/2019"
helpviewer_keywords: ["ATL projects, adding components"]
@@ -6,13 +7,13 @@ ms.assetid: 11670681-8671-4122-96a4-2e52f8dadce0
---
# ATL COM+ 1.0 Component Wizard
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
This wizard is not available in Visual Studio 2019 and later.
::: moniker-end
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
Use this wizard to add an object to your project that supports COM+ 1.0 services, including transactions.
@@ -54,7 +55,7 @@ Specify the names for the object, interface, and classes to be added to your pro
Any objects you add following setting this option are designated as attributed by default (the check box is selected). You can clear this box to add an object that does not use attributes.
- See [Application Settings, ATL Project Wizard](../../atl/reference/application-settings-atl-project-wizard.md) and [Basic Mechanics of Attributes](../../windows/basic-mechanics-of-attributes.md) for more information.
+ See [Application Settings, ATL Project Wizard](../../atl/reference/application-settings-atl-project-wizard.md) and [Basic mechanics of attributes](../../windows/attributes/cpp-attributes-com-net.md#basic-mechanics-of-attributes) for more information.
### COM
diff --git a/docs/atl/reference/atl-control-wizard.md b/docs/atl/reference/atl-control-wizard.md
index f30fedc78d..f1ba09a54d 100644
--- a/docs/atl/reference/atl-control-wizard.md
+++ b/docs/atl/reference/atl-control-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Control Wizard"
title: "ATL Control Wizard"
ms.date: "11/04/2016"
f1_keywords: ["vc.codewiz.class.atl.control.overview"]
@@ -60,7 +61,7 @@ Provides information for the C++ class created to implement the object.
By default, any objects you add after you set this option are designated as attributed (the check box is selected). You can clear this box to add an object that does not use attributes.
- See [Application Settings, ATL Project Wizard](../../atl/reference/application-settings-atl-project-wizard.md) and [Basic Mechanics of Attributes](../../windows/basic-mechanics-of-attributes.md) for more information.
+ See [Application Settings, ATL Project Wizard](../../atl/reference/application-settings-atl-project-wizard.md) and [Basic mechanics of attributes](../../windows/attributes/cpp-attributes-com-net.md#basic-mechanics-of-attributes) for more information.
### COM
@@ -83,7 +84,7 @@ Provides information about the COM functionality for the object.
- **ProgID**
- Sets the name that containers can use instead of the CLSID of the object. This field is not automatically populated. If you do not manually populate this field, the control may not be available to other tools. For example, ActiveX controls that are generated without a `ProgID` are not available in the **Insert ActiveX Control** dialog box. For more information about the dialog box, see [Insert ActiveX Control Dialog Box](../../windows/insert-activex-control-dialog-box.md).
+ Sets the name that containers can use instead of the CLSID of the object. This field is not automatically populated. If you do not manually populate this field, the control may not be available to other tools. For example, ActiveX controls that are generated without a `ProgID` are not available in the **Insert ActiveX Control** dialog box. For more information about the dialog box, see [Insert ActiveX controls](../../windows/adding-editing-or-deleting-controls.md#insert-activex-controls).
## See also
diff --git a/docs/atl/reference/atl-dialog-wizard.md b/docs/atl/reference/atl-dialog-wizard.md
index f5fc0dde7b..c2908571e3 100644
--- a/docs/atl/reference/atl-dialog-wizard.md
+++ b/docs/atl/reference/atl-dialog-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Dialog Wizard"
title: "ATL Dialog Wizard"
ms.date: "11/04/2016"
f1_keywords: ["vc.codewiz.class.atl.dlg.overview"]
diff --git a/docs/atl/reference/atl-drawinfo-structure.md b/docs/atl/reference/atl-drawinfo-structure.md
index 2bc47678d4..8c44e5e231 100644
--- a/docs/atl/reference/atl-drawinfo-structure.md
+++ b/docs/atl/reference/atl-drawinfo-structure.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL_DRAWINFO Structure"
title: "ATL_DRAWINFO Structure"
ms.date: "11/04/2016"
f1_keywords: ["ATL::ATL_DRAWINFO", "ATL_DRAWINFO", "ATL.ATL_DRAWINFO"]
diff --git a/docs/atl/reference/atl-func-info-structure.md b/docs/atl/reference/atl-func-info-structure.md
index eab7648030..2be432a32d 100644
--- a/docs/atl/reference/atl-func-info-structure.md
+++ b/docs/atl/reference/atl-func-info-structure.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: _ATL_FUNC_INFO Structure"
title: "_ATL_FUNC_INFO Structure"
ms.date: "11/04/2016"
f1_keywords: ["_ATL_FUNC_INFO", "ATL::_ATL_FUNC_INFO", "ATL._ATL_FUNC_INFO"]
diff --git a/docs/atl/reference/atl-functions.md b/docs/atl/reference/atl-functions.md
index 2dddc1985c..f32f42b204 100644
--- a/docs/atl/reference/atl-functions.md
+++ b/docs/atl/reference/atl-functions.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Functions"
title: "ATL Functions"
ms.date: "11/04/2016"
helpviewer_keywords: ["functions [ATL]", "ATL, global functions"]
diff --git a/docs/atl/reference/atl-global-variables.md b/docs/atl/reference/atl-global-variables.md
index 2fbfd36a26..68a23951c1 100644
--- a/docs/atl/reference/atl-global-variables.md
+++ b/docs/atl/reference/atl-global-variables.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Global Variables"
title: "ATL Global Variables"
ms.date: "12/06/2017"
f1_keywords: ["ATLBASE/_pAtlModule"]
diff --git a/docs/atl/reference/atl-http-utility-functions.md b/docs/atl/reference/atl-http-utility-functions.md
index 2ac450a0ea..47f78813f0 100644
--- a/docs/atl/reference/atl-http-utility-functions.md
+++ b/docs/atl/reference/atl-http-utility-functions.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL HTTP Utility Functions"
title: "ATL HTTP Utility Functions"
ms.date: "11/04/2016"
ms.assetid: 4db57ef2-31fa-4696-bbeb-79a9035033ed
@@ -7,7 +8,7 @@ ms.assetid: 4db57ef2-31fa-4696-bbeb-79a9035033ed
These functions support manipulation of URLs.
-|||
+|Function|Description|
|-|-|
|[AtlCanonicalizeUrl](#atlcanonicalizeurl)|Canonicalizes a URL, which includes converting unsafe characters and spaces into escape sequences.|
|[AtlCombineUrl](#atlcombineurl)|Combines a base URL and a relative URL into a single, canonical URL.|
diff --git a/docs/atl/reference/atl-macros.md b/docs/atl/reference/atl-macros.md
index 7ac52771b5..28f62b3011 100644
--- a/docs/atl/reference/atl-macros.md
+++ b/docs/atl/reference/atl-macros.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Macros"
title: "ATL Macros"
ms.date: "11/04/2016"
helpviewer_keywords: ["ATL, macros", "macros, ATL"]
diff --git a/docs/atl/reference/atl-module70-structure.md b/docs/atl/reference/atl-module70-structure.md
index f9d7274d81..eeee426327 100644
--- a/docs/atl/reference/atl-module70-structure.md
+++ b/docs/atl/reference/atl-module70-structure.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: _ATL_MODULE70 Structure"
title: "_ATL_MODULE70 Structure"
ms.date: "11/04/2016"
f1_keywords: ["_ATL_MODULE70", "ATL::_ATL_MODULE70", "ATL._ATL_MODULE70"]
diff --git a/docs/atl/reference/atl-ole-db-consumer-wizard.md b/docs/atl/reference/atl-ole-db-consumer-wizard.md
index 94510665a1..da09ffeebb 100644
--- a/docs/atl/reference/atl-ole-db-consumer-wizard.md
+++ b/docs/atl/reference/atl-ole-db-consumer-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL OLE DB Consumer Wizard"
title: "ATL OLE DB Consumer Wizard"
ms.date: "07/02/2019"
helpviewer_keywords: ["ATL projects, adding ATL OLE DB consumers"]
@@ -6,13 +7,13 @@ ms.assetid: dcb68ed1-2224-422f-9f7b-108a74864204
---
# ATL OLE DB Consumer Wizard
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
This wizard is not available in Visual Studio 2019 and later.
::: moniker-end
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
This wizard sets up an OLE DB consumer class with the data bindings necessary to access the specified data source through the specified OLE DB provider.
@@ -148,7 +149,7 @@ This wizard sets up an OLE DB consumer class with the data bindings necessary to
// for consumer type of 'table'
```
- See [Basic Mechanics of Attributes](../../windows/basic-mechanics-of-attributes.md) for more information.
+ See [Basic mechanics of attributes](../../windows/attributes/cpp-attributes-com-net.md#basic-mechanics-of-attributes) for more information.
- **Type**
diff --git a/docs/atl/reference/atl-ole-db-provider-wizard.md b/docs/atl/reference/atl-ole-db-provider-wizard.md
index d4e6cee054..29417f6f85 100644
--- a/docs/atl/reference/atl-ole-db-provider-wizard.md
+++ b/docs/atl/reference/atl-ole-db-provider-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL OLE DB Provider Wizard"
title: "ATL OLE DB Provider Wizard"
ms.date: "05/09/2019"
helpviewer_keywords: ["ATL projects, adding ATL OLE DB providers"]
@@ -6,13 +7,13 @@ ms.assetid: cf91ba78-01d1-4d12-b673-e95d96bfbebe
---
# ATL OLE DB Provider Wizard
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
This wizard is not available in Visual Studio 2019 and later.
::: moniker-end
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
## Remarks
diff --git a/docs/atl/reference/atl-operators.md b/docs/atl/reference/atl-operators.md
index 18dffb6593..85beb951ab 100644
--- a/docs/atl/reference/atl-operators.md
+++ b/docs/atl/reference/atl-operators.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Operators"
title: "ATL Operators"
ms.date: "11/04/2016"
helpviewer_keywords: ["operators [ATL]"]
diff --git a/docs/atl/reference/atl-path-functions.md b/docs/atl/reference/atl-path-functions.md
index a704907c84..33562d071a 100644
--- a/docs/atl/reference/atl-path-functions.md
+++ b/docs/atl/reference/atl-path-functions.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Path functions"
title: "ATL Path functions"
ms.date: "11/04/2016"
helpviewer_keywords: ["ATL, path"]
@@ -11,13 +12,13 @@ ATL provides the ATLPath class for manipulating paths in the form of [CPathT](cp
## Related Classes
-|||
+|Class|Description|
|-|-|
|[CPathT Class](cpatht-class.md)|This class represents a path.|
## Related Typedefs
-|||
+|Typedef|Description|
|-|-|
|`CPath`|A specialization of [CPathT](cpatht-class.md) using `CString`.|
|`CPathA`|A specialization of [CPathT](cpatht-class.md) using `CStringA`.|
@@ -25,7 +26,7 @@ ATL provides the ATLPath class for manipulating paths in the form of [CPathT](cp
## Functions
-|||
+|Function|Description|
|-|-|
|[ATLPath::AddBackslash](#addbackslash)|This function is an overloaded wrapper for [PathAddBackslash](/windows/win32/api/shlwapi/nf-shlwapi-pathaddbackslashw).|
|[ATLPath::AddExtension](#addextension)|This function is an overloaded wrapper for [PathAddExtension](/windows/win32/api/shlwapi/nf-shlwapi-pathaddextensionw).|
diff --git a/docs/atl/reference/atl-project-wizard.md b/docs/atl/reference/atl-project-wizard.md
index 45ef199443..54180ade5d 100644
--- a/docs/atl/reference/atl-project-wizard.md
+++ b/docs/atl/reference/atl-project-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Project Wizard"
title: "ATL Project Wizard"
ms.date: "11/04/2016"
f1_keywords: ["vc.appwiz.atl.com.overview"]
diff --git a/docs/atl/reference/atl-property-page-wizard.md b/docs/atl/reference/atl-property-page-wizard.md
index e11300a445..16c0045690 100644
--- a/docs/atl/reference/atl-property-page-wizard.md
+++ b/docs/atl/reference/atl-property-page-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Property Page Wizard"
title: "ATL Property Page Wizard"
ms.date: "05/09/2019"
f1_keywords: ["vc.codewiz.class.atl.ppg.overview"]
@@ -7,13 +8,13 @@ ms.assetid: 6113e325-facd-4f68-b491-144d75209922
---
# ATL Property Page Wizard
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
This wizard is not available in Visual Studio 2019 and later.
::: moniker-end
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
This wizard [adds a property page into an ATL project](../../atl/reference/adding-an-atl-property-page.md) or to an MFC project with ATL support. An ATL property page provides a user interface for setting the properties (or calling the methods) of one or more COM objects.
@@ -32,14 +33,13 @@ Specify the names for the object, interface, and classes to be added to your pro
Provides information for the C++ class created to implement the object.
-|||
-|-|-|
|Term|Definition|
+|-|-|
|**Short name**|Sets the abbreviated name for the object. The name that you provide determines the class and **Coclass** names, the file (**.cpp** and **.h**) names, the **Type** name, and the **ProgID**, unless you change those fields individually.|
|**.h file**|Sets the name of the header file for the new object's class. By default, this name is based on the name that you provide in **Short name**. Click the ellipsis button to save the file name to the location of your choice, or to append the class declaration to an existing file. If you select an existing file, the wizard will not save it to the selected location until you click **Finish** in the wizard.
The wizard does not overwrite a file. If you select the name of an existing file, when you click **Finish**, the wizard prompts you to indicate whether the class declaration should be appended to the contents of the file. Click **Yes** to append the file; click **No** to return to the wizard and specify another file name.|
|**Class**|Sets the name of the class that implements the object. This name is based on the name that you provide in **Short name**, preceded by 'C', the typical prefix for a class name.|
|**.cpp file**|Sets the name of the implementation file for the new object's class. By default, this name is based on the name that you provide in **Short name**. Click the ellipsis button to save the file name to the location of your choice. The file is not saved to the selected location until you click **Finish** in the wizard.
The wizard does not overwrite a file. If you select the name of an existing file, when you click **Finish**, the wizard prompts you to indicate whether the class implementation should be appended to the contents of the file. Click **Yes** to append the file; click **No** to return to the wizard and specify another file name.|
-|**Attributed**|Indicates whether the object uses attributes. If you are adding an object to an attributed ATL project, this option is selected and not available to change, that is, you can add only attributed objects to a project created with attribute support.
You can add an attributed object only to an ATL project that uses attributes. If you select this option for an ATL project that does not have attribute support, the wizard prompts you to specify whether you want to add attribute support to the project.
By default, any objects you add after you set this option are designated as attributed (the check box is selected). You can clear this box to add an object that does not use attributes.
See [Application Settings, ATL Project Wizard](../../atl/reference/application-settings-atl-project-wizard.md) and [Basic Mechanics of Attributes](../../windows/basic-mechanics-of-attributes.md) for more information.|
+|**Attributed**|Indicates whether the object uses attributes. If you are adding an object to an attributed ATL project, this option is selected and not available to change, that is, you can add only attributed objects to a project created with attribute support.
You can add an attributed object only to an ATL project that uses attributes. If you select this option for an ATL project that does not have attribute support, the wizard prompts you to specify whether you want to add attribute support to the project.
By default, any objects you add after you set this option are designated as attributed (the check box is selected). You can clear this box to add an object that does not use attributes.
See [Application Settings, ATL Project Wizard](../../atl/reference/application-settings-atl-project-wizard.md) and [Basic mechanics of attributes](../../windows/attributes/cpp-attributes-com-net.md#basic-mechanics-of-attributes) for more information.|
### COM
diff --git a/docs/atl/reference/atl-simple-object-wizard.md b/docs/atl/reference/atl-simple-object-wizard.md
index 9c31c4b6f9..23a819b1bf 100644
--- a/docs/atl/reference/atl-simple-object-wizard.md
+++ b/docs/atl/reference/atl-simple-object-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Simple Object Wizard"
title: "ATL Simple Object Wizard"
ms.date: "11/04/2016"
f1_keywords: ["vc.codewiz.class.atl.simple.overview"]
@@ -54,7 +55,7 @@ Provides information for the C++ class created for the object.
By default, any objects you add after you set this option are designated as attributed (the check box is selected). You can clear this box to add an object that does not use attributes.
- See [Application Settings, ATL Project Wizard](../../atl/reference/application-settings-atl-project-wizard.md) and [Basic Mechanics of Attributes](../../windows/basic-mechanics-of-attributes.md) for more information.
+ See [Application Settings, ATL Project Wizard](../../atl/reference/application-settings-atl-project-wizard.md) and [Basic mechanics of attributes](../../windows/attributes/cpp-attributes-com-net.md#basic-mechanics-of-attributes) for more information.
## COM
diff --git a/docs/atl/reference/atl-text-encoding-functions.md b/docs/atl/reference/atl-text-encoding-functions.md
index 76ff1156b0..aa50e31f2e 100644
--- a/docs/atl/reference/atl-text-encoding-functions.md
+++ b/docs/atl/reference/atl-text-encoding-functions.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Text Encoding Functions"
title: "ATL Text Encoding Functions"
ms.date: "11/04/2016"
f1_keywords: ["atlbase/ATL::AtlGetHexValue", "atlbase/ATL::AtlGetVersion", "atlenc/ATL::AtlHexDecode", "atlenc/ATL::AtlHexDecodeGetRequiredLength", "atlenc/ATL::AtlHexEncode", "atlenc/ATL::AtlHexEncodeGetRequiredLength", "atlenc/ATL::AtlHexValue", "atlenc/ATL::BEncode", "atlenc/ATL::BEncodeGetRequiredLength", "atlenc/ATL::EscapeXML", "atlenc/ATL::GetExtendedChars", "atlenc/ATL::IsExtendedChar", "atlenc/ATL::QEncode", "atlenc/ATL::QEncodeGetRequiredLength", "atlenc/ATL::QPDecode", "atlenc/ATL::QPDecodeGetRequiredLength", "atlenc/ATL::QPEncode", "atlenc/ATL::QPEncodeGetRequiredLength", "atlenc/ATL::UUDecode", "atlenc/ATL::UUDecodeGetRequiredLength", "atlenc/ATL::UUEncode", "atlenc/ATL::UUEncodeGetRequiredLength"]
@@ -8,7 +9,7 @@ ms.assetid: 2ae1648b-2b87-4112-92aa-0069fcfd23da
These functions support text encoding and decoding.
-|||
+|Function|Description|
|-|-|
|[AtlGetHexValue](#atlgethexvalue)|Call this function to get the numeric value of a hexadecimal digit.|
|[AtlGetVersion](#atlgetversion)|Call this function to get the version of the ATL library that you are using. |
@@ -334,13 +335,13 @@ The length in characters of the converted string.
Possible conversions performed by this function are shown in the table:
-|Source|Destination|
-|------------|-----------------|
-|\<|<|
-|>|>|
-|&|&|
-|'|'|
-|"|"|
+| Source | Destination |
+|--|--|
+| \< | \< |
+| > | \> |
+| & | \& |
+| ' | \' |
+| " | \" |
## GetExtendedChars
diff --git a/docs/atl/reference/atl-typedefs.md b/docs/atl/reference/atl-typedefs.md
index b027344273..471587e327 100644
--- a/docs/atl/reference/atl-typedefs.md
+++ b/docs/atl/reference/atl-typedefs.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Typedefs"
title: "ATL Typedefs"
ms.date: "11/04/2016"
f1_keywords: ["atlcore/ATL::_ATL_BASE_MODULE", "atlbase/ATL::_ATL_COM_MODULE", "atlbase/ATL::_ATL_MODULE", "atlbase/ATL::_ATL_WIN_MODULE", "atlutil/ATL::ATL_URL_PORT", "atlbase/ATL::CComDispatchDriver", "atlbase/ATL::CComGlobalsThreadModel", "atlbase/ATL::CComObjectThreadModel", "atlwin/ATL::CContainedWindow", "atlpath/ATL::CPath", "atlpath/ATL::CPathA", "atlpath/ATL::CPathW", " atlsimpcoll/ATL::CSimpleValArray", " atlutil/ATL::LPCURL", "atlbase/ATL::DefaultThreadTraits", "atlutil/ATL::LPURL"]
@@ -9,7 +10,7 @@ ms.assetid: 7dd05baa-3efb-4e3b-af23-793c610f4560
The Active Template Library includes the following typedefs.
-|||
+|Typedef|Description|
|-|-|
|[_ATL_BASE_MODULE](#_atl_base_module)|Defined as a typedef based on [_ATL_BASE_MODULE70](../../atl/reference/atl-base-module70-structure.md).|
|[_ATL_COM_MODULE](#_atl_com_module)|Defined as a typedef based on [_ATL_COM_MODULE70](../../atl/reference/atl-com-module70-structure.md).|
diff --git a/docs/atl/reference/atl-url-scheme-enum.md b/docs/atl/reference/atl-url-scheme-enum.md
index ccab260de1..fbed95cb01 100644
--- a/docs/atl/reference/atl-url-scheme-enum.md
+++ b/docs/atl/reference/atl-url-scheme-enum.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL_URL_SCHEME"
title: "ATL_URL_SCHEME enumeration"
ms.date: "11/04/2016"
helpviewer_keywords: ["ATLUTIL/ATL::ATL_URL_SCHEME"]
diff --git a/docs/atl/reference/atl-win-module70-structure.md b/docs/atl/reference/atl-win-module70-structure.md
index 58f8691a93..4a053f0aec 100644
--- a/docs/atl/reference/atl-win-module70-structure.md
+++ b/docs/atl/reference/atl-win-module70-structure.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: _ATL_WIN_MODULE70 Structure"
title: "_ATL_WIN_MODULE70 Structure"
ms.date: "11/04/2016"
f1_keywords: ["_ATL_WIN_MODULE70", "ATL::_ATL_WIN_MODULE70", "ATL._ATL_WIN_MODULE70"]
diff --git a/docs/atl/reference/atl-wizards-and-dialog-boxes.md b/docs/atl/reference/atl-wizards-and-dialog-boxes.md
index 1ce169938d..0632227a11 100644
--- a/docs/atl/reference/atl-wizards-and-dialog-boxes.md
+++ b/docs/atl/reference/atl-wizards-and-dialog-boxes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ATL Wizards and Dialog Boxes"
title: "ATL Wizards and Dialog Boxes"
ms.date: "06/26/2020"
helpviewer_keywords: ["ATL, class wizards"]
diff --git a/docs/atl/reference/atlcreatewnddata-structure.md b/docs/atl/reference/atlcreatewnddata-structure.md
index a8486f78d4..ab5f1b3cf6 100644
--- a/docs/atl/reference/atlcreatewnddata-structure.md
+++ b/docs/atl/reference/atlcreatewnddata-structure.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: _AtlCreateWndData Structure"
title: "_AtlCreateWndData Structure"
ms.date: "11/04/2016"
f1_keywords: ["ATL::_AtlCreateWndData", "ATL._AtlCreateWndData", "_AtlCreateWndData"]
diff --git a/docs/atl/reference/ca2aex-class.md b/docs/atl/reference/ca2aex-class.md
index 1c39e72eb6..17184ac1d4 100644
--- a/docs/atl/reference/ca2aex-class.md
+++ b/docs/atl/reference/ca2aex-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CA2AEX Class"
title: "CA2AEX Class"
ms.date: "11/04/2016"
f1_keywords: ["CA2AEX", "ATLCONV/ATL::CA2AEX", "ATLCONV/ATL::CA2AEX::CA2AEX", "ATLCONV/ATL::CA2AEX::m_psz", "ATLCONV/ATL::CA2AEX::m_szBuffer"]
diff --git a/docs/atl/reference/ca2caex-class.md b/docs/atl/reference/ca2caex-class.md
index 92a0ff95f0..384efbd5ea 100644
--- a/docs/atl/reference/ca2caex-class.md
+++ b/docs/atl/reference/ca2caex-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CA2CAEX Class"
title: "CA2CAEX Class"
ms.date: "11/04/2016"
f1_keywords: ["CA2CAEX", "ATLCONV/ATL::CA2CAEX", "ATLCONV/ATL::CA2CAEX::CA2CAEX", "ATLCONV/ATL::CA2CAEX::m_psz"]
diff --git a/docs/atl/reference/ca2wex-class.md b/docs/atl/reference/ca2wex-class.md
index 965ee1edc3..6b350dc68c 100644
--- a/docs/atl/reference/ca2wex-class.md
+++ b/docs/atl/reference/ca2wex-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CA2WEX Class"
title: "CA2WEX Class"
ms.date: "11/04/2016"
f1_keywords: ["CA2WEX", "ATLCONV/ATL::CA2WEX", "ATLCONV/ATL::CA2WEX::CA2WEX", "ATLCONV/ATL::CA2WEX::m_psz", "ATLCONV/ATL::CA2WEX::m_szBuffer"]
diff --git a/docs/atl/reference/caccesstoken-class.md b/docs/atl/reference/caccesstoken-class.md
index 7bc57a281b..49272bfcd4 100644
--- a/docs/atl/reference/caccesstoken-class.md
+++ b/docs/atl/reference/caccesstoken-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAccessToken Class"
title: "CAccessToken Class"
ms.date: "07/02/2019"
f1_keywords: ["CAccessToken", "ATLSECURITY/ATL::CAccessToken", "ATLSECURITY/ATL::CAccessToken::Attach", "ATLSECURITY/ATL::CAccessToken::CheckTokenMembership", "ATLSECURITY/ATL::CAccessToken::CreateImpersonationToken", "ATLSECURITY/ATL::CAccessToken::CreatePrimaryToken", "ATLSECURITY/ATL::CAccessToken::CreateProcessAsUser", "ATLSECURITY/ATL::CAccessToken::CreateRestrictedToken", "ATLSECURITY/ATL::CAccessToken::Detach", "ATLSECURITY/ATL::CAccessToken::DisablePrivilege", "ATLSECURITY/ATL::CAccessToken::DisablePrivileges", "ATLSECURITY/ATL::CAccessToken::EnablePrivilege", "ATLSECURITY/ATL::CAccessToken::EnablePrivileges", "ATLSECURITY/ATL::CAccessToken::GetDefaultDacl", "ATLSECURITY/ATL::CAccessToken::GetEffectiveToken", "ATLSECURITY/ATL::CAccessToken::GetGroups", "ATLSECURITY/ATL::CAccessToken::GetHandle", "ATLSECURITY/ATL::CAccessToken::GetImpersonationLevel", "ATLSECURITY/ATL::CAccessToken::GetLogonSessionId", "ATLSECURITY/ATL::CAccessToken::GetLogonSid", "ATLSECURITY/ATL::CAccessToken::GetOwner", "ATLSECURITY/ATL::CAccessToken::GetPrimaryGroup", "ATLSECURITY/ATL::CAccessToken::GetPrivileges", "ATLSECURITY/ATL::CAccessToken::GetProcessToken", "ATLSECURITY/ATL::CAccessToken::GetProfile", "ATLSECURITY/ATL::CAccessToken::GetSource", "ATLSECURITY/ATL::CAccessToken::GetStatistics", "ATLSECURITY/ATL::CAccessToken::GetTerminalServicesSessionId", "ATLSECURITY/ATL::CAccessToken::GetThreadToken", "ATLSECURITY/ATL::CAccessToken::GetTokenId", "ATLSECURITY/ATL::CAccessToken::GetType", "ATLSECURITY/ATL::CAccessToken::GetUser", "ATLSECURITY/ATL::CAccessToken::HKeyCurrentUser", "ATLSECURITY/ATL::CAccessToken::Impersonate", "ATLSECURITY/ATL::CAccessToken::ImpersonateLoggedOnUser", "ATLSECURITY/ATL::CAccessToken::IsTokenRestricted", "ATLSECURITY/ATL::CAccessToken::LoadUserProfile", "ATLSECURITY/ATL::CAccessToken::LogonUser", "ATLSECURITY/ATL::CAccessToken::OpenCOMClientToken", "ATLSECURITY/ATL::CAccessToken::OpenNamedPipeClientToken", "ATLSECURITY/ATL::CAccessToken::OpenRPCClientToken", "ATLSECURITY/ATL::CAccessToken::OpenThreadToken", "ATLSECURITY/ATL::CAccessToken::PrivilegeCheck", "ATLSECURITY/ATL::CAccessToken::Revert", "ATLSECURITY/ATL::CAccessToken::SetDefaultDacl", "ATLSECURITY/ATL::CAccessToken::SetOwner", "ATLSECURITY/ATL::CAccessToken::SetPrimaryGroup"]
diff --git a/docs/atl/reference/cacl-class.md b/docs/atl/reference/cacl-class.md
index f579a74e28..1521ad15fe 100644
--- a/docs/atl/reference/cacl-class.md
+++ b/docs/atl/reference/cacl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAcl Class"
title: "CAcl Class"
ms.date: "11/04/2016"
f1_keywords: ["CAcl", "ATLSECURITY/ATL::CAcl", "ATLSECURITY/ATL::CAcl::CAccessMaskArray", "ATLSECURITY/ATL::CAcl::CAceFlagArray", "ATLSECURITY/ATL::CAcl::CAceTypeArray", "ATLSECURITY/ATL::CAcl::CAcl", "ATLSECURITY/ATL::CAcl::GetAceCount", "ATLSECURITY/ATL::CAcl::GetAclEntries", "ATLSECURITY/ATL::CAcl::GetAclEntry", "ATLSECURITY/ATL::CAcl::GetLength", "ATLSECURITY/ATL::CAcl::GetPACL", "ATLSECURITY/ATL::CAcl::IsEmpty", "ATLSECURITY/ATL::CAcl::IsNull", "ATLSECURITY/ATL::CAcl::RemoveAce", "ATLSECURITY/ATL::CAcl::RemoveAces", "ATLSECURITY/ATL::CAcl::SetEmpty", "ATLSECURITY/ATL::CAcl::SetNull"]
diff --git a/docs/atl/reference/cadapt-class.md b/docs/atl/reference/cadapt-class.md
index 52fbb6d534..e3596e34f0 100644
--- a/docs/atl/reference/cadapt-class.md
+++ b/docs/atl/reference/cadapt-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAdapt Class"
title: "CAdapt Class"
ms.date: "11/04/2016"
f1_keywords: ["CAdapt", "ATLCOMCLI/ATL::CAdapt", "ATLCOMCLI/ATL::CAdapt::CAdapt", "ATLCOMCLI/ATL::CAdapt::m_T"]
@@ -91,7 +92,7 @@ T m_T;
This **`public`** data member can be accessed directly or indirectly with [operator const T&](#operator_const_t_amp) and [operator T&](#operator_t_amp).
-## CAdapt::operator const T&
+## CAdapt::operator const T&
Returns a **`const`** reference to the [m_T](#m_t) member, allowing the adapter object to be treated as if it were an object of type *T*.
@@ -103,7 +104,7 @@ operator const T&() const;
A **`const`** reference to `m_T`.
-## CAdapt::operator T&
+## CAdapt::operator T&
Returns a reference to the [m_T](#m_t) member, allowing the adapter object to be treated as if it were an object of type *T*.
@@ -115,7 +116,7 @@ operator T&();
A reference to `m_T`.
-## CAdapt::operator <
+## `CAdapt::operator <`
Compares an object of the adapted type with [m_T](#m_t).
diff --git a/docs/atl/reference/category-macros.md b/docs/atl/reference/category-macros.md
index 0baf8d0cd8..2520af5960 100644
--- a/docs/atl/reference/category-macros.md
+++ b/docs/atl/reference/category-macros.md
@@ -1,14 +1,15 @@
---
+description: "Learn more about: Category Macros"
title: "Category Macros"
ms.date: "11/04/2016"
-f1_keywords: ["atlcom/ATL::BEGIN_CATEGORY_MAP", "atlcom/ATL::END_CATEGORY_MAP", "atlcom/ATL::IMPLEMENTED_CATEGORY", "atlcom/ATL::REQUIRED_CATEGORY"]
+f1_keywords: ["ATLCOM/BEGIN_CATEGORY_MAP", "ATLCOM/END_CATEGORY_MAP", "ATLCOM/IMPLEMENTED_CATEGORY", "ATLCOM/REQUIRED_CATEGORY", "atlcom/ATL::BEGIN_CATEGORY_MAP", "atlcom/ATL::END_CATEGORY_MAP", "atlcom/ATL::IMPLEMENTED_CATEGORY", "atlcom/ATL::REQUIRED_CATEGORY"]
ms.assetid: 223578cb-6180-4787-a8d8-ba3787a5d3ee
---
# Category Macros
These macros define category maps.
-|||
+|Macro|Description|
|-|-|
|[BEGIN_CATEGORY_MAP](#begin_category_map)|Marks the beginning of the category map.|
|[END_CATEGORY_MAP](#end_category_map)|Marks the end of the category map.|
diff --git a/docs/atl/reference/catlarray-class.md b/docs/atl/reference/catlarray-class.md
index 669da3a6a9..e2ff7b40f5 100644
--- a/docs/atl/reference/catlarray-class.md
+++ b/docs/atl/reference/catlarray-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlArray Class"
title: "CAtlArray Class"
ms.date: "11/04/2016"
f1_keywords: ["CAtlArray", "ATLCOLL/ATL::CAtlArray", "ATLCOLL/ATL::Add", "ATLCOLL/ATL::Append", "ATLCOLL/ATL::AssertValid", "ATLCOLL/ATL::Copy", "ATLCOLL/ATL::FreeExtra", "ATLCOLL/ATL::GetAt", "ATLCOLL/ATL::GetCount", "ATLCOLL/ATL::GetData", "ATLCOLL/ATL::InsertArrayAt", "ATLCOLL/ATL::InsertAt", "ATLCOLL/ATL::IsEmpty", "ATLCOLL/ATL::RemoveAll", "ATLCOLL/ATL::RemoveAt", "ATLCOLL/ATL::SetAt", "ATLCOLL/ATL::SetAtGrow", "ATLCOLL/ATL::SetCount", "ATLCOLL/ATL::INARGTYPE", "ATLCOLL/ATL::OUTARGTYPE"]
@@ -28,7 +29,7 @@ The code used to copy or move elements.
### Methods
-|||
+|Function|Description|
|-|-|
|[Add](#add)|Call this method to add an element to the array object.|
|[Append](#append)|Call this method to add the contents of one array to the end of another.|
@@ -51,13 +52,13 @@ The code used to copy or move elements.
### Operators
-|||
+|Operator|Description|
|-|-|
-|[operator []](#operator_at)|Call this operator to return a reference to an element in the array.|
+|[`operator []`](#operator_at)|Call this operator to return a reference to an element in the array.|
### Typedefs
-|||
+|Typedef|Description|
|-|-|
|[INARGTYPE](#inargtype)|The data type to use for adding elements to the array.|
|[OUTARGTYPE](#outargtype)|The data type to use for retrieving elements from the array.|
diff --git a/docs/atl/reference/catlautothreadmodule-class.md b/docs/atl/reference/catlautothreadmodule-class.md
index 7ab2eb95de..ad171cbf11 100644
--- a/docs/atl/reference/catlautothreadmodule-class.md
+++ b/docs/atl/reference/catlautothreadmodule-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlAutoThreadModule Class"
title: "CAtlAutoThreadModule Class"
ms.date: "11/04/2016"
f1_keywords: ["CAtlAutoThreadModule", "atlbase/ATL::CAtlAutoThreadModule"]
diff --git a/docs/atl/reference/catlautothreadmodulet-class.md b/docs/atl/reference/catlautothreadmodulet-class.md
index 194fba7e78..b3551f67c2 100644
--- a/docs/atl/reference/catlautothreadmodulet-class.md
+++ b/docs/atl/reference/catlautothreadmodulet-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlAutoThreadModuleT Class"
title: "CAtlAutoThreadModuleT Class"
ms.date: "11/04/2016"
f1_keywords: ["CAtlAutoThreadModuleT", "ATLBASE/ATL::CAtlAutoThreadModuleT", "ATLBASE/ATL::CAtlAutoThreadModuleT::GetDefaultThreads"]
diff --git a/docs/atl/reference/catlbasemodule-class.md b/docs/atl/reference/catlbasemodule-class.md
index 2745c5a87d..ca75cf7b50 100644
--- a/docs/atl/reference/catlbasemodule-class.md
+++ b/docs/atl/reference/catlbasemodule-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlBaseModule Class"
title: "CAtlBaseModule Class"
ms.date: "11/04/2016"
f1_keywords: ["CAtlBaseModule", "ATLCORE/ATL::CAtlBaseModule", "ATLCORE/ATL::CAtlBaseModule::CAtlBaseModule", "ATLCORE/ATL::CAtlBaseModule::AddResourceInstance", "ATLCORE/ATL::CAtlBaseModule::GetHInstanceAt", "ATLCORE/ATL::CAtlBaseModule::GetModuleInstance", "ATLCORE/ATL::CAtlBaseModule::GetResourceInstance", "ATLCORE/ATL::CAtlBaseModule::RemoveResourceInstance", "ATLCORE/ATL::CAtlBaseModule::SetResourceInstance", "ATLCORE/ATL::CAtlBaseModule::m_bInitFailed"]
diff --git a/docs/atl/reference/catlcommodule-class.md b/docs/atl/reference/catlcommodule-class.md
index aa453f662c..ec1824a976 100644
--- a/docs/atl/reference/catlcommodule-class.md
+++ b/docs/atl/reference/catlcommodule-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlComModule Class"
title: "CAtlComModule Class"
ms.date: "11/04/2016"
f1_keywords: ["CAtlComModule", "ATLBASE/ATL::CAtlComModule", "ATLBASE/ATL::CAtlComModule::CAtlComModule", "ATLBASE/ATL::CAtlComModule::RegisterServer", "ATLBASE/ATL::CAtlComModule::RegisterTypeLib", "ATLBASE/ATL::CAtlComModule::UnregisterServer", "ATLBASE/ATL::CAtlComModule::UnRegisterTypeLib"]
diff --git a/docs/atl/reference/catldebuginterfacesmodule-class.md b/docs/atl/reference/catldebuginterfacesmodule-class.md
index 9130fb259a..38a674b3e7 100644
--- a/docs/atl/reference/catldebuginterfacesmodule-class.md
+++ b/docs/atl/reference/catldebuginterfacesmodule-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlDebugInterfacesModule Class"
title: "CAtlDebugInterfacesModule Class"
ms.date: "11/04/2016"
f1_keywords: ["CAtlDebugInterfacesModule", "atlbase/ATL::CAtlDebugInterfacesModule"]
diff --git a/docs/atl/reference/catldllmodulet-class.md b/docs/atl/reference/catldllmodulet-class.md
index 2d0c861f98..af960db0ee 100644
--- a/docs/atl/reference/catldllmodulet-class.md
+++ b/docs/atl/reference/catldllmodulet-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlDllModuleT Class"
title: "CAtlDllModuleT Class"
ms.date: "11/04/2016"
f1_keywords: ["CAtlDllModuleT", "ATLBASE/ATL::CAtlDllModuleT", "ATLBASE/ATL::CAtlDllModuleT::CAtlDllModuleT", "ATLBASE/ATL::CAtlDllModuleT::DllCanUnloadNow", "ATLBASE/ATL::CAtlDllModuleT::DllGetClassObject", "ATLBASE/ATL::CAtlDllModuleT::DllMain", "ATLBASE/ATL::CAtlDllModuleT::DllRegisterServer", "ATLBASE/ATL::CAtlDllModuleT::DllUnregisterServer", "ATLBASE/ATL::CAtlDllModuleT::GetClassObject"]
diff --git a/docs/atl/reference/catlexception-class.md b/docs/atl/reference/catlexception-class.md
index 032169e6dc..5549aa2ab7 100644
--- a/docs/atl/reference/catlexception-class.md
+++ b/docs/atl/reference/catlexception-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlException Class"
title: "CAtlException Class"
ms.date: "11/04/2016"
f1_keywords: ["CAtlException", "ATLEXCEPT/ATL::CAtlException", "ATLEXCEPT/ATL::CAtlException::CAtlException", "ATLEXCEPT/ATL::CAtlException::m_hr"]
diff --git a/docs/atl/reference/catlexemodulet-class.md b/docs/atl/reference/catlexemodulet-class.md
index f825bd22be..9d191306d9 100644
--- a/docs/atl/reference/catlexemodulet-class.md
+++ b/docs/atl/reference/catlexemodulet-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlExeModuleT Class"
title: "CAtlExeModuleT Class"
ms.date: "11/04/2016"
f1_keywords: ["CAtlExeModuleT", "ATLBASE/ATL::CAtlExeModuleT", "ATLBASE/ATL::CAtlExeModuleT::CAtlExeModuleT", "ATLBASE/ATL::CAtlExeModuleT::InitializeCom", "ATLBASE/ATL::CAtlExeModuleT::ParseCommandLine", "ATLBASE/ATL::CAtlExeModuleT::PostMessageLoop", "ATLBASE/ATL::CAtlExeModuleT::PreMessageLoop", "ATLBASE/ATL::CAtlExeModuleT::RegisterClassObjects", "ATLBASE/ATL::CAtlExeModuleT::RevokeClassObjects", "ATLBASE/ATL::CAtlExeModuleT::Run", "ATLBASE/ATL::CAtlExeModuleT::RunMessageLoop", "ATLBASE/ATL::CAtlExeModuleT::UninitializeCom", "ATLBASE/ATL::CAtlExeModuleT::Unlock", "ATLBASE/ATL::CAtlExeModuleT::WinMain", "ATLBASE/ATL::CAtlExeModuleT::m_bDelayShutdown", "ATLBASE/ATL::CAtlExeModuleT::m_dwPause", "ATLBASE/ATL::CAtlExeModuleT::m_dwTimeOut"]
diff --git a/docs/atl/reference/catlfile-class.md b/docs/atl/reference/catlfile-class.md
index 10b54bd10d..bbc448b979 100644
--- a/docs/atl/reference/catlfile-class.md
+++ b/docs/atl/reference/catlfile-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlFile Class"
title: "CAtlFile Class"
ms.date: "11/04/2016"
f1_keywords: ["CAtlFile", "ATLFILE/ATL::CAtlFile", "ATLFILE/ATL::CAtlFile::CAtlFile", "ATLFILE/ATL::CAtlFile::Create", "ATLFILE/ATL::CAtlFile::Flush", "ATLFILE/ATL::CAtlFile::GetOverlappedResult", "ATLFILE/ATL::CAtlFile::GetPosition", "ATLFILE/ATL::CAtlFile::GetSize", "ATLFILE/ATL::CAtlFile::LockRange", "ATLFILE/ATL::CAtlFile::Read", "ATLFILE/ATL::CAtlFile::Seek", "ATLFILE/ATL::CAtlFile::SetSize", "ATLFILE/ATL::CAtlFile::UnlockRange", "ATLFILE/ATL::CAtlFile::Write", "ATLFILE/ATL::CAtlFile::m_pTM"]
diff --git a/docs/atl/reference/catlfilemapping-class.md b/docs/atl/reference/catlfilemapping-class.md
index 47ff5b0148..8eebfc290c 100644
--- a/docs/atl/reference/catlfilemapping-class.md
+++ b/docs/atl/reference/catlfilemapping-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlFileMapping Class"
title: "CAtlFileMapping Class"
ms.date: "11/04/2016"
f1_keywords: ["CAtlFileMapping", "atlfile/ATL::CAtlFileMapping"]
diff --git a/docs/atl/reference/catlfilemappingbase-class.md b/docs/atl/reference/catlfilemappingbase-class.md
index 2487ac77e0..f7084aa957 100644
--- a/docs/atl/reference/catlfilemappingbase-class.md
+++ b/docs/atl/reference/catlfilemappingbase-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlFileMappingBase Class"
title: "CAtlFileMappingBase Class"
ms.date: "11/04/2016"
f1_keywords: ["CAtlFileMappingBase", "ATLFILE/ATL::CAtlFileMappingBase", "ATLFILE/ATL::CAtlFileMappingBase::CAtlFileMappingBase", "ATLFILE/ATL::CAtlFileMappingBase::CopyFrom", "ATLFILE/ATL::CAtlFileMappingBase::GetData", "ATLFILE/ATL::CAtlFileMappingBase::GetHandle", "ATLFILE/ATL::CAtlFileMappingBase::GetMappingSize", "ATLFILE/ATL::CAtlFileMappingBase::MapFile", "ATLFILE/ATL::CAtlFileMappingBase::MapSharedMem", "ATLFILE/ATL::CAtlFileMappingBase::OpenMapping", "ATLFILE/ATL::CAtlFileMappingBase::Unmap"]
diff --git a/docs/atl/reference/catllist-class.md b/docs/atl/reference/catllist-class.md
index c76645de14..6b1fc2ce91 100644
--- a/docs/atl/reference/catllist-class.md
+++ b/docs/atl/reference/catllist-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlList Class"
title: "CAtlList Class"
ms.date: "11/04/2016"
f1_keywords: ["CAtlList", "ATLCOLL/ATL::CAtlList", "ATLCOLL/ATL::CAtlList::INARGTYPE", "ATLCOLL/ATL::CAtlList::CAtlList", "ATLCOLL/ATL::CAtlList::AddHead", "ATLCOLL/ATL::CAtlList::AddHeadList", "ATLCOLL/ATL::CAtlList::AddTail", "ATLCOLL/ATL::CAtlList::AddTailList", "ATLCOLL/ATL::CAtlList::AssertValid", "ATLCOLL/ATL::CAtlList::Find", "ATLCOLL/ATL::CAtlList::FindIndex", "ATLCOLL/ATL::CAtlList::GetAt", "ATLCOLL/ATL::CAtlList::GetCount", "ATLCOLL/ATL::CAtlList::GetHead", "ATLCOLL/ATL::CAtlList::GetHeadPosition", "ATLCOLL/ATL::CAtlList::GetNext", "ATLCOLL/ATL::CAtlList::GetPrev", "ATLCOLL/ATL::CAtlList::GetTail", "ATLCOLL/ATL::CAtlList::GetTailPosition", "ATLCOLL/ATL::CAtlList::InsertAfter", "ATLCOLL/ATL::CAtlList::InsertBefore", "ATLCOLL/ATL::CAtlList::IsEmpty", "ATLCOLL/ATL::CAtlList::MoveToHead", "ATLCOLL/ATL::CAtlList::MoveToTail", "ATLCOLL/ATL::CAtlList::RemoveAll", "ATLCOLL/ATL::CAtlList::RemoveAt", "ATLCOLL/ATL::CAtlList::RemoveHead", "ATLCOLL/ATL::CAtlList::RemoveHeadNoReturn", "ATLCOLL/ATL::CAtlList::RemoveTail", "ATLCOLL/ATL::CAtlList::RemoveTailNoReturn", "ATLCOLL/ATL::CAtlList::SetAt", "ATLCOLL/ATL::CAtlList::SwapElements"]
diff --git a/docs/atl/reference/catlmap-class.md b/docs/atl/reference/catlmap-class.md
index 38c16d8841..b9273b02c8 100644
--- a/docs/atl/reference/catlmap-class.md
+++ b/docs/atl/reference/catlmap-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlMap Class"
title: "CAtlMap Class"
ms.date: "11/04/2016"
f1_keywords: ["CAtlMap", "ATLCOLL/ATL::CAtlMap", "ATLCOLL/ATL::CAtlMap::KINARGTYPE", "ATLCOLL/ATL::CAtlMap::KOUTARGTYPE", "ATLCOLL/ATL::CAtlMap::VINARGTYPE", "ATLCOLL/ATL::CAtlMap::VOUTARGTYPE", "ATLCOLL/ATL::CPair::m_key", "ATLCOLL/ATL::CPair::m_value", "ATLCOLL/ATL::CAtlMap::CAtlMap", "ATLCOLL/ATL::CAtlMap::AssertValid", "ATLCOLL/ATL::CAtlMap::DisableAutoRehash", "ATLCOLL/ATL::CAtlMap::EnableAutoRehash", "ATLCOLL/ATL::CAtlMap::GetAt", "ATLCOLL/ATL::CAtlMap::GetCount", "ATLCOLL/ATL::CAtlMap::GetHashTableSize", "ATLCOLL/ATL::CAtlMap::GetKeyAt", "ATLCOLL/ATL::CAtlMap::GetNext", "ATLCOLL/ATL::CAtlMap::GetNextAssoc", "ATLCOLL/ATL::CAtlMap::GetNextKey", "ATLCOLL/ATL::CAtlMap::GetNextValue", "ATLCOLL/ATL::CAtlMap::GetStartPosition", "ATLCOLL/ATL::CAtlMap::GetValueAt", "ATLCOLL/ATL::CAtlMap::InitHashTable", "ATLCOLL/ATL::CAtlMap::IsEmpty", "ATLCOLL/ATL::CAtlMap::Lookup", "ATLCOLL/ATL::CAtlMap::Rehash", "ATLCOLL/ATL::CAtlMap::RemoveAll", "ATLCOLL/ATL::CAtlMap::RemoveAtPos", "ATLCOLL/ATL::CAtlMap::RemoveKey", "ATLCOLL/ATL::CAtlMap::SetAt", "ATLCOLL/ATL::CAtlMap::SetOptimalLoad", "ATLCOLL/ATL::CAtlMap::SetValueAt"]
diff --git a/docs/atl/reference/catlmodule-class.md b/docs/atl/reference/catlmodule-class.md
index 3bb7a0ed6a..637193f3c8 100644
--- a/docs/atl/reference/catlmodule-class.md
+++ b/docs/atl/reference/catlmodule-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlModule Class"
title: "CAtlModule Class"
ms.date: "11/04/2016"
f1_keywords: ["CAtlModule", "ATLBASE/ATL::CAtlModule", "ATLBASE/ATL::CAtlModule::CAtlModule", "ATLBASE/ATL::CAtlModule::AddCommonRGSReplacements", "ATLBASE/ATL::CAtlModule::AddTermFunc", "ATLBASE/ATL::CAtlModule::GetGITPtr", "ATLBASE/ATL::CAtlModule::GetLockCount", "ATLBASE/ATL::CAtlModule::Lock", "ATLBASE/ATL::CAtlModule::Term", "ATLBASE/ATL::CAtlModule::Unlock", "ATLBASE/ATL::CAtlModule::UpdateRegistryFromResourceD", "ATLBASE/ATL::CAtlModule::UpdateRegistryFromResourceDHelper", "ATLBASE/ATL::CAtlModule::UpdateRegistryFromResourceS", "ATLBASE/ATL::CAtlModule::m_libid", "ATLBASE/ATL::CAtlModule::m_pGIT"]
diff --git a/docs/atl/reference/catlmodulet-class.md b/docs/atl/reference/catlmodulet-class.md
index e550880c22..aeddee3c88 100644
--- a/docs/atl/reference/catlmodulet-class.md
+++ b/docs/atl/reference/catlmodulet-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlModuleT Class"
title: "CAtlModuleT Class"
ms.date: "11/04/2016"
f1_keywords: ["CAtlModuleT", "ATLBASE/ATL::CAtlModuleT", "ATLBASE/ATL::CAtlModuleT::CAtlModuleT", "ATLBASE/ATL::CAtlModuleT::InitLibId", "ATLBASE/ATL::CAtlModuleT::RegisterAppId", "ATLBASE/ATL::CAtlModuleT::RegisterServer", "ATLBASE/ATL::CAtlModuleT::UnregisterAppId", "ATLBASE/ATL::CAtlModuleT::UnregisterServer", "ATLBASE/ATL::CAtlModuleT::UpdateRegistryAppId"]
diff --git a/docs/atl/reference/catlpreviewctrlimpl-class.md b/docs/atl/reference/catlpreviewctrlimpl-class.md
index ef082551ac..2f2fc09617 100644
--- a/docs/atl/reference/catlpreviewctrlimpl-class.md
+++ b/docs/atl/reference/catlpreviewctrlimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlPreviewCtrlImpl Class"
title: "CAtlPreviewCtrlImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["CAtlPreviewCtrlImpl", "ATLPREVIEWCTRLIMPL/ATL::CAtlPreviewCtrlImpl", "ATLPREVIEWCTRLIMPL/ATL::CAtlPreviewCtrlImpl::CAtlPreviewCtrlImpl", "ATLPREVIEWCTRLIMPL/ATL::CAtlPreviewCtrlImpl::Create", "ATLPREVIEWCTRLIMPL/ATL::CAtlPreviewCtrlImpl::Destroy", "ATLPREVIEWCTRLIMPL/ATL::CAtlPreviewCtrlImpl::Focus", "ATLPREVIEWCTRLIMPL/ATL::CAtlPreviewCtrlImpl::OnPaint", "ATLPREVIEWCTRLIMPL/ATL::CAtlPreviewCtrlImpl::Redraw", "ATLPREVIEWCTRLIMPL/ATL::CAtlPreviewCtrlImpl::SetHost", "ATLPREVIEWCTRLIMPL/ATL::CAtlPreviewCtrlImpl::SetPreviewVisuals", "ATLPREVIEWCTRLIMPL/ATL::CAtlPreviewCtrlImpl::SetRect", "ATLPREVIEWCTRLIMPL/ATL::CAtlPreviewCtrlImpl::DoPaint", "ATLPREVIEWCTRLIMPL/ATL::CAtlPreviewCtrlImpl::m_plf", "ATLPREVIEWCTRLIMPL/ATL::CAtlPreviewCtrlImpl::m_clrBack", "ATLPREVIEWCTRLIMPL/ATL::CAtlPreviewCtrlImpl::m_clrText"]
diff --git a/docs/atl/reference/catlservicemodulet-class.md b/docs/atl/reference/catlservicemodulet-class.md
index 20f4280c90..8931b81512 100644
--- a/docs/atl/reference/catlservicemodulet-class.md
+++ b/docs/atl/reference/catlservicemodulet-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlServiceModuleT Class"
title: "CAtlServiceModuleT Class"
ms.date: "05/06/2019"
f1_keywords: ["CAtlServiceModuleT", "ATLBASE/ATL::CAtlServiceModuleT", "ATLBASE/ATL::CAtlServiceModuleT::CAtlServiceModuleT", "ATLBASE/ATL::CAtlServiceModuleT::Handler", "ATLBASE/ATL::CAtlServiceModuleT::InitializeSecurity", "ATLBASE/ATL::CAtlServiceModuleT::Install", "ATLBASE/ATL::CAtlServiceModuleT::IsInstalled", "ATLBASE/ATL::CAtlServiceModuleT::LogEvent", "ATLBASE/ATL::CAtlServiceModuleT::OnContinue", "ATLBASE/ATL::CAtlServiceModuleT::OnInterrogate", "ATLBASE/ATL::CAtlServiceModuleT::OnPause", "ATLBASE/ATL::CAtlServiceModuleT::OnShutdown", "ATLBASE/ATL::CAtlServiceModuleT::OnStop", "ATLBASE/ATL::CAtlServiceModuleT::OnUnknownRequest", "ATLBASE/ATL::CAtlServiceModuleT::ParseCommandLine", "ATLBASE/ATL::CAtlServiceModuleT::PreMessageLoop", "ATLBASE/ATL::CAtlServiceModuleT::RegisterAppId", "ATLBASE/ATL::CAtlServiceModuleT::Run", "ATLBASE/ATL::CAtlServiceModuleT::ServiceMain", "ATLBASE/ATL::CAtlServiceModuleT::SetServiceStatus", "ATLBASE/ATL::CAtlServiceModuleT::Start", "ATLBASE/ATL::CAtlServiceModuleT::Uninstall", "ATLBASE/ATL::CAtlServiceModuleT::Unlock", "ATLBASE/ATL::CAtlServiceModuleT::UnregisterAppId", "ATLBASE/ATL::CAtlServiceModuleT::WinMain", "ATLBASE/ATL::CAtlServiceModuleT::m_bService", "ATLBASE/ATL::CAtlServiceModuleT::m_dwThreadID", "ATLBASE/ATL::CAtlServiceModuleT::m_hServiceStatus", "ATLBASE/ATL::CAtlServiceModuleT::m_status", "ATLBASE/ATL::CAtlServiceModuleT::m_szServiceName"]
diff --git a/docs/atl/reference/catltemporaryfile-class.md b/docs/atl/reference/catltemporaryfile-class.md
index 30b12eedcf..9878d4a0d9 100644
--- a/docs/atl/reference/catltemporaryfile-class.md
+++ b/docs/atl/reference/catltemporaryfile-class.md
@@ -1,9 +1,9 @@
---
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
@@ -356,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/catltransactionmanager-class.md b/docs/atl/reference/catltransactionmanager-class.md
index 83645c2a65..4c4430bf45 100644
--- a/docs/atl/reference/catltransactionmanager-class.md
+++ b/docs/atl/reference/catltransactionmanager-class.md
@@ -1,9 +1,9 @@
---
title: "CAtlTransactionManager Class"
-ms.date: "11/04/2016"
+description: "Learn more about: CAtlTransactionManager Class"
+ms.date: 11/04/2016
f1_keywords: ["CAtlTransactionManager", "ATLTRANSACTIONMANAGER/ATL::CAtlTransactionManager", "ATLTRANSACTIONMANAGER/ATL::Close", "ATLTRANSACTIONMANAGER/ATL::Commit", "ATLTRANSACTIONMANAGER/ATL::Create", "ATLTRANSACTIONMANAGER/ATL::CreateFile", "ATLTRANSACTIONMANAGER/ATL::DeleteFile", "ATLTRANSACTIONMANAGER/ATL::FindFirstFile", "ATLTRANSACTIONMANAGER/ATL::GetFileAttributes", "ATLTRANSACTIONMANAGER/ATL::GetFileAttributesEx", "ATLTRANSACTIONMANAGER/ATL::GetHandle", "ATLTRANSACTIONMANAGER/ATL::IsFallback", "ATLTRANSACTIONMANAGER/ATL::MoveFile", "ATLTRANSACTIONMANAGER/ATL::RegCreateKeyEx", "ATLTRANSACTIONMANAGER/ATL::RegDeleteKey", "ATLTRANSACTIONMANAGER/ATL::RegOpenKeyEx", "ATLTRANSACTIONMANAGER/ATL::Rollback", "ATLTRANSACTIONMANAGER/ATL::SetFileAttributes", "ATLTRANSACTIONMANAGER/ATL::m_bFallback", "ATLTRANSACTIONMANAGER/ATL::m_hTransaction"]
helpviewer_keywords: ["CAtlTransactionManager class"]
-ms.assetid: b01732dc-1d16-4b42-bfac-b137fca2b740
---
# CAtlTransactionManager Class
@@ -65,7 +65,7 @@ class CAtlTransactionManager;
**Header:** atltransactionmanager.h
-## ~CAtlTransactionManager
+## ~CAtlTransactionManager
CAtlTransactionManager destructor.
@@ -164,7 +164,7 @@ inline HANDLE CreateFile(
The name of an object to be created or opened.
*dwDesiredAccess*
-The access to the object, which can be summarized as read, write, both, or neither (zero). The most commonly used values are GENERIC_READ, GENERIC_WRITE, or both: GENERIC_READ | GENERIC_WRITE.
+The access to the object, which can be summarized as read, write, both, or neither (zero). The most commonly used values are `GENERIC_READ`, `GENERIC_WRITE`, or both: `GENERIC_READ | GENERIC_WRITE`.
*dwShareMode*
The sharing mode of an object, which can be read, write, both, delete, all of these, or none: 0, FILE_SHARE_DELETE, FILE_SHARE_READ, FILE_SHARE_WRITE.
diff --git a/docs/atl/reference/catlwinmodule-class.md b/docs/atl/reference/catlwinmodule-class.md
index cc0ad3af5c..fe46bab7a8 100644
--- a/docs/atl/reference/catlwinmodule-class.md
+++ b/docs/atl/reference/catlwinmodule-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAtlWinModule Class"
title: "CAtlWinModule Class"
ms.date: "11/04/2016"
f1_keywords: ["CAtlWinModule", "ATLBASE/ATL::CAtlWinModule", "ATLBASE/ATL::CAtlWinModule::CAtlWinModule", "ATLBASE/ATL::CAtlWinModule::AddCreateWndData", "ATLBASE/ATL::CAtlWinModule::ExtractCreateWndData"]
diff --git a/docs/atl/reference/cautoptr-class.md b/docs/atl/reference/cautoptr-class.md
index e3c2269de9..ec51839b4b 100644
--- a/docs/atl/reference/cautoptr-class.md
+++ b/docs/atl/reference/cautoptr-class.md
@@ -1,11 +1,12 @@
---
-title: "CAutoPtr Class"
+description: "Learn more about: CAutoPtr class"
+title: "CAutoPtr class"
ms.date: "11/04/2016"
f1_keywords: ["CAutoPtr", "ATLBASE/ATL::CAutoPtr", "ATLBASE/ATL::CAutoPtr::CAutoPtr", "ATLBASE/ATL::CAutoPtr::Attach", "ATLBASE/ATL::CAutoPtr::Detach", "ATLBASE/ATL::CAutoPtr::Free", "ATLBASE/ATL::CAutoPtr::m_p"]
helpviewer_keywords: ["CAutoPtr class"]
ms.assetid: 08988d53-4fb0-4711-bdfc-8ac29c63f410
---
-# CAutoPtr Class
+# `CAutoPtr` class
This class represents a smart pointer object.
@@ -21,51 +22,51 @@ class CAutoPtr
### Parameters
-*T*
+*`T`*\
The pointer type.
## Members
-### Public Constructors
+### Public constructors
-|Name|Description|
-|----------|-----------------|
-|[CAutoPtr::CAutoPtr](#cautoptr)|The constructor.|
-|[CAutoPtr::~CAutoPtr](#dtor)|The destructor.|
+| Name | Description |
+|--|--|
+| [`CAutoPtr::CAutoPtr`](#cautoptr) | The constructor. |
+| [`CAutoPtr::~CAutoPtr`](#dtor) | The destructor. |
-### Public Methods
+### Public methods
-|Name|Description|
-|----------|-----------------|
-|[CAutoPtr::Attach](#attach)|Call this method to take ownership of an existing pointer.|
-|[CAutoPtr::Detach](#detach)|Call this method to release ownership of a pointer.|
-|[CAutoPtr::Free](#free)|Call this method to delete an object pointed to by a `CAutoPtr`.|
+| Name | Description |
+|--|--|
+| [`CAutoPtr::Attach`](#attach) | Call this method to take ownership of an existing pointer. |
+| [`CAutoPtr::Detach`](#detach) | Call this method to release ownership of a pointer. |
+| [`CAutoPtr::Free`](#free) | Call this method to delete an object pointed to by a `CAutoPtr`. |
-### Public Operators
+### Public operators
-|Name|Description|
-|----------|-----------------|
-|[CAutoPtr::operator T*](#operator_t_star)|The cast operator.|
-|[CAutoPtr::operator =](#operator_eq)|The assignment operator.|
-|[CAutoPtr::operator ->](#operator_ptr)|The pointer-to-member operator.|
+| Name | Description |
+|--|--|
+| [`CAutoPtr::operator T*`](#operator_t_star) | The cast operator. |
+| [`CAutoPtr::operator =`](#operator_eq) | The assignment operator. |
+| [`CAutoPtr::operator ->`](#operator_ptr) | The pointer-to-member operator. |
-### Public Data Members
+### Public data members
-|Name|Description|
-|----------|-----------------|
-|[CAutoPtr::m_p](#m_p)|The pointer data member variable.|
+| Name | Description |
+|--|--|
+| [`CAutoPtr::m_p`](#m_p) | The pointer data member variable. |
## Remarks
-This class provides methods for creating and managing a smart pointer, which will help protect against memory leaks by automatically freeing resources when it falls out of scope.
+This class provides methods for creating and managing a smart pointer. Smart pointers help protect against memory leaks by automatically freeing resources when it falls out of scope.
-Further, `CAutoPtr`'s copy constructor and assignment operator transfer ownership of the pointer, copying the source pointer to the destination pointer and setting the source pointer to NULL. It is therefore impossible to have two `CAutoPtr` objects each storing the same pointer, and this reduces the possibility of deleting the same pointer twice.
+Further, `CAutoPtr`'s copy constructor and assignment operator transfer ownership of the pointer, copying the source pointer to the destination pointer and setting the source pointer to NULL. That's why it's impossible to have two `CAutoPtr` objects each storing the same pointer, and it reduces the possibility of deleting the same pointer twice.
`CAutoPtr` also simplifies the creation of collections of pointers. Instead of deriving a collection class and overriding the destructor, it's simpler to make a collection of `CAutoPtr` objects. When the collection is deleted, the `CAutoPtr` objects will go out of scope and automatically delete themselves.
-[CHeapPtr](../../atl/reference/cheapptr-class.md) and variants work in the same way as `CAutoPtr`, except that they allocate and free memory using different heap functions instead of the C++ **`new`** and **`delete`** operators. [CAutoVectorPtr](../../atl/reference/cautovectorptr-class.md) is similar to `CAutoPtr`, the only difference being that it uses **vector new[]** and **vector delete[]** to allocate and free memory.
+[`CHeapPtr`](../../atl/reference/cheapptr-class.md) and variants work in the same way as `CAutoPtr`, except that they allocate and free memory using different heap functions instead of the C++ **`new`** and **`delete`** operators. [`CAutoVectorPtr`](../../atl/reference/cautovectorptr-class.md) is similar to `CAutoPtr`, the only difference being that it uses **vector new[]** and **vector delete[]** to allocate and free memory.
-See also [CAutoPtrArray](../../atl/reference/cautoptrarray-class.md) and [CAutoPtrList](../../atl/reference/cautoptrlist-class.md) when arrays or lists of smart pointers are required.
+See also [`CAutoPtrArray`](../../atl/reference/cautoptrarray-class.md) and [`CAutoPtrList`](../../atl/reference/cautoptrlist-class.md) when arrays or lists of smart pointers are required.
## Requirements
@@ -75,7 +76,7 @@ See also [CAutoPtrArray](../../atl/reference/cautoptrarray-class.md) and [CAutoP
[!code-cpp[NVC_ATL_Utilities#74](../../atl/codesnippet/cpp/cautoptr-class_1.cpp)]
-## CAutoPtr::Attach
+## `CAutoPtr::Attach`
Call this method to take ownership of an existing pointer.
@@ -85,20 +86,20 @@ void Attach(T* p) throw();
### Parameters
-*p*
+*`p`*\
The `CAutoPtr` object will take ownership of this pointer.
### Remarks
-When a `CAutoPtr` object takes ownership of a pointer, it will automatically delete the pointer and any allocated data when it goes out of scope. If [CAutoPtr::Detach](#detach) is called, the programmer is again given responsibility for freeing any allocated resources.
+When a `CAutoPtr` object takes ownership of a pointer, it will automatically delete the pointer and any allocated data when it goes out of scope. If [`CAutoPtr::Detach`](#detach) is called, the programmer is again given responsibility for freeing any allocated resources.
-In debug builds, an assertion failure will occur if the [CAutoPtr::m_p](#m_p) data member currently points to an existing value; that is, it is not equal to NULL.
+In debug builds, an assertion failure will occur if the [`CAutoPtr::m_p`](#m_p) data member currently points to an existing value; that is, it's not equal to NULL.
### Example
-See the example in the [CAutoPtr Overview](../../atl/reference/cautoptr-class.md).
+See the example in the [`CAutoPtr` Overview](../../atl/reference/cautoptr-class.md).
-## CAutoPtr::CAutoPtr
+## `CAutoPtr::CAutoPtr`
The constructor.
@@ -115,10 +116,10 @@ CAutoPtr(CAutoPtr& p) throw();
### Parameters
-*p*
+*`p`*\
An existing pointer.
-*TSrc*
+*`TSrc`*\
The type being managed by another `CAutoPtr`, used to initialize the current object.
### Remarks
@@ -127,9 +128,9 @@ The `CAutoPtr` object can be created using an existing pointer, in which case it
### Example
-See the example in the [CAutoPtr Overview](../../atl/reference/cautoptr-class.md).
+See the example in the [`CAutoPtr` overview](../../atl/reference/cautoptr-class.md).
-## CAutoPtr::~CAutoPtr
+## `CAutoPtr::~CAutoPtr`
The destructor.
@@ -139,9 +140,9 @@ The destructor.
### Remarks
-Frees any allocated resources. Calls [CAutoPtr::Free](#free).
+Frees any allocated resources. Calls [`CAutoPtr::Free`](#free).
-## CAutoPtr::Detach
+## `CAutoPtr::Detach`
Call this method to release ownership of a pointer.
@@ -149,19 +150,19 @@ Call this method to release ownership of a pointer.
T* Detach() throw();
```
-### Return Value
+### Return value
Returns a copy of the pointer.
### Remarks
-Releases ownership of a pointer, sets the [CAutoPtr::m_p](#m_p) data member variable to NULL, and returns a copy of the pointer. After calling `Detach`, it is up to the programmer to free any allocated resources over which the `CAutoPtr` object may have previously assumed reponsibility.
+Releases ownership of a pointer, sets the [`CAutoPtr::m_p`](#m_p) data member variable to NULL, and returns a copy of the pointer. After calling `Detach`, it's up to the programmer to free any allocated resources over which the `CAutoPtr` object may have previously assumed responsibility.
### Example
-See the example in the [CAutoPtr Overview](../../atl/reference/cautoptr-class.md).
+See the example in the [`CAutoPtr` overview](../../atl/reference/cautoptr-class.md).
-## CAutoPtr::Free
+## `CAutoPtr::Free`
Call this method to delete an object pointed to by a `CAutoPtr`.
@@ -171,9 +172,9 @@ void Free() throw();
### Remarks
-The object pointed to by the `CAutoPtr` is freed, and the [CAutoPtr::m_p](#m_p) data member variable is set to NULL.
+The object pointed to by the `CAutoPtr` is freed, and the [`CAutoPtr::m_p`](#m_p) data member variable is set to NULL.
-## CAutoPtr::m_p
+## `CAutoPtr::m_p`
The pointer data member variable.
@@ -185,7 +186,7 @@ T* m_p;
This member variable holds the pointer information.
-## CAutoPtr::operator =
+## `CAutoPtr::operator =`
The assignment operator.
@@ -199,25 +200,25 @@ CAutoPtr& operator= (CAutoPtr& p);
### Parameters
-*p*
+*`p`*\
A pointer.
-*TSrc*
+*`TSrc`*\
A class type.
-### Return Value
+### Return value
-Returns a reference to a **CAutoPtr\< T >**.
+Returns a reference to a `CAutoPtr< T >`.
### Remarks
-The assignment operator detaches the `CAutoPtr` object from any current pointer and attaches the new pointer, *p*, in its place.
+The assignment operator detaches the `CAutoPtr` object from any current pointer and attaches the new pointer, *`p`*, in its place.
### Example
-See the example in the [CAutoPtr Overview](../../atl/reference/cautoptr-class.md).
+See the example in the [`CAutoPtr` overview](../../atl/reference/cautoptr-class.md).
-## CAutoPtr::operator ->
+## `CAutoPtr::operator ->`
The pointer-to-member operator.
@@ -225,9 +226,9 @@ The pointer-to-member operator.
T* operator->() const throw();
```
-### Return Value
+### Return value
-Returns the value of the [CAutoPtr::m_p](#m_p) data member variable.
+Returns the value of the [`CAutoPtr::m_p`](#m_p) data member variable.
### Remarks
@@ -235,9 +236,9 @@ Use this operator to call a method in a class pointed to by the `CAutoPtr` objec
### Example
-See the example in the [CAutoPtr Overview](../../atl/reference/cautoptr-class.md).
+See the example in the [`CAutoPtr` Overview](../../atl/reference/cautoptr-class.md).
-## CAutoPtr::operator T*
+## `CAutoPtr::operator T*`
The cast operator.
@@ -245,16 +246,16 @@ The cast operator.
operator T* () const throw();
```
-### Return Value
+### Return value
Returns a pointer to the object data type defined in the class template.
### Example
-See the example in the [CAutoPtr Overview](../../atl/reference/cautoptr-class.md).
+See the example in the [`CAutoPtr` overview](../../atl/reference/cautoptr-class.md).
## See also
-[CHeapPtr Class](../../atl/reference/cheapptr-class.md)
-[CAutoVectorPtr Class](../../atl/reference/cautovectorptr-class.md)
-[Class Overview](../../atl/atl-class-overview.md)
+[`CHeapPtr` class](../../atl/reference/cheapptr-class.md)\
+[`CAutoVectorPtr` class](../../atl/reference/cautovectorptr-class.md)\
+[Class overview](../../atl/atl-class-overview.md)
diff --git a/docs/atl/reference/cautoptrarray-class.md b/docs/atl/reference/cautoptrarray-class.md
index 880b8bab26..cadb53e14a 100644
--- a/docs/atl/reference/cautoptrarray-class.md
+++ b/docs/atl/reference/cautoptrarray-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAutoPtrArray Class"
title: "CAutoPtrArray Class"
ms.date: "11/04/2016"
f1_keywords: ["CAutoPtrArray", "ATLCOLL/ATL::CAutoPtrArray", "ATLCOLL/ATL::CAutoPtrArray::CAutoPtrArray"]
diff --git a/docs/atl/reference/cautoptrelementtraits-class.md b/docs/atl/reference/cautoptrelementtraits-class.md
index 5f58b4a2be..90b8dbbea8 100644
--- a/docs/atl/reference/cautoptrelementtraits-class.md
+++ b/docs/atl/reference/cautoptrelementtraits-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAutoPtrElementTraits Class"
title: "CAutoPtrElementTraits Class"
ms.date: "11/04/2016"
f1_keywords: ["CAutoPtrElementTraits", "ATLCOLL/ATL::CAutoPtrElementTraits", "ATLCOLL/ATL::CAutoPtrElementTraits::INARGTYPE", "ATLCOLL/ATL::CAutoPtrElementTraits::OUTARGTYPE"]
diff --git a/docs/atl/reference/cautoptrlist-class.md b/docs/atl/reference/cautoptrlist-class.md
index ac317408f1..c2b8e2a7d2 100644
--- a/docs/atl/reference/cautoptrlist-class.md
+++ b/docs/atl/reference/cautoptrlist-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAutoPtrList Class"
title: "CAutoPtrList Class"
ms.date: "11/04/2016"
f1_keywords: ["CAutoPtrList", "ATLCOLL/ATL::CAutoPtrList", "ATLCOLL/ATL::CAutoPtrList::CAutoPtrList"]
diff --git a/docs/atl/reference/cautorevertimpersonation-class.md b/docs/atl/reference/cautorevertimpersonation-class.md
index e438153196..6f63d12451 100644
--- a/docs/atl/reference/cautorevertimpersonation-class.md
+++ b/docs/atl/reference/cautorevertimpersonation-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAutoRevertImpersonation Class"
title: "CAutoRevertImpersonation Class"
ms.date: "11/04/2016"
f1_keywords: ["CAutoRevertImpersonation", "ATLSECURITY/ATL::CAutoRevertImpersonation", "ATLSECURITY/ATL::CAutoRevertImpersonation::CAutoRevertImpersonation", "ATLSECURITY/ATL::CAutoRevertImpersonation::Attach", "ATLSECURITY/ATL::CAutoRevertImpersonation::Detach", "ATLSECURITY/ATL::CAutoRevertImpersonation::GetAccessToken"]
diff --git a/docs/atl/reference/cautovectorptr-class.md b/docs/atl/reference/cautovectorptr-class.md
index 35de635a4f..be4c474bcc 100644
--- a/docs/atl/reference/cautovectorptr-class.md
+++ b/docs/atl/reference/cautovectorptr-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAutoVectorPtr Class"
title: "CAutoVectorPtr Class"
ms.date: "11/04/2016"
f1_keywords: ["CAutoVectorPtr", "ATLBASE/ATL::CAutoVectorPtr", "ATLBASE/ATL::CAutoVectorPtr::CAutoVectorPtr", "ATLBASE/ATL::CAutoVectorPtr::Allocate", "ATLBASE/ATL::CAutoVectorPtr::Attach", "ATLBASE/ATL::CAutoVectorPtr::Detach", "ATLBASE/ATL::CAutoVectorPtr::Free", "ATLBASE/ATL::CAutoVectorPtr::m_p"]
@@ -57,7 +58,7 @@ The pointer type.
## Remarks
-This class provides methods for creating and managing a smart pointer, which will help protect against memory leaks by automatically freeing resources when it falls out of scope. `CAutoVectorPtr` is similar to `CAutoPtr`, the only difference being that `CAutoVectorPtr` uses [vector new[]](../../standard-library/new-operators.md#op_new_arr) and [vector delete[]](../../standard-library/new-operators.md#op_delete_arr) to allocate and free memory instead of the C++ **`new`** and **`delete`** operators. See [CAutoVectorPtrElementTraits](../../atl/reference/cautovectorptrelementtraits-class.md) if collection classes of `CAutoVectorPtr` are required.
+This class provides methods for creating and managing a smart pointer, which will help protect against memory leaks by automatically freeing resources when it falls out of scope. `CAutoVectorPtr` is similar to `CAutoPtr`, the only difference being that `CAutoVectorPtr` uses [`vector new[]`](../../standard-library/new-operators.md#op_new_arr) and [`vector delete[]`](../../standard-library/new-operators.md#op_delete_arr) to allocate and free memory instead of the C++ **`new`** and **`delete`** operators. See [CAutoVectorPtrElementTraits](../../atl/reference/cautovectorptrelementtraits-class.md) if collection classes of `CAutoVectorPtr` are required.
See [CAutoPtr](../../atl/reference/cautoptr-class.md) for an example of using a smart pointer class.
diff --git a/docs/atl/reference/cautovectorptrelementtraits-class.md b/docs/atl/reference/cautovectorptrelementtraits-class.md
index 44342da5f9..86e766db0b 100644
--- a/docs/atl/reference/cautovectorptrelementtraits-class.md
+++ b/docs/atl/reference/cautovectorptrelementtraits-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAutoVectorPtrElementTraits Class"
title: "CAutoVectorPtrElementTraits Class"
ms.date: "11/04/2016"
f1_keywords: ["CAutoVectorPtrElementTraits", "ATLCOLL/ATL::CAutoVectorPtrElementTraits", "ATLCOLL/ATL::CAutoVectorPtrElementTraits::INARGTYPE", "ATLCOLL/ATL::CAutoVectorPtrElementTraits::OUTARGTYPE"]
diff --git a/docs/atl/reference/caxdialogimpl-class.md b/docs/atl/reference/caxdialogimpl-class.md
index 264dd77b8c..76937ed12b 100644
--- a/docs/atl/reference/caxdialogimpl-class.md
+++ b/docs/atl/reference/caxdialogimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAxDialogImpl Class"
title: "CAxDialogImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["CAxDialogImpl", "ATLWIN/ATL::CAxDialogImpl", "ATLWIN/ATL::CAxDialogImpl::AdviseSinkMap", "ATLWIN/ATL::CAxDialogImpl::Create", "ATLWIN/ATL::CAxDialogImpl::DestroyWindow", "ATLWIN/ATL::CAxDialogImpl::DoModal", "ATLWIN/ATL::CAxDialogImpl::EndDialog", "ATLWIN/ATL::CAxDialogImpl::GetDialogProc", "ATLWIN/ATL::CAxDialogImpl::GetIDD", "ATLWIN/ATL::CAxDialogImpl::IsDialogMessage", "ATLWIN/ATL::CAxDialogImpl::m_bModal"]
@@ -64,7 +65,7 @@ See [Implementing a Dialog Box](../../atl/implementing-a-dialog-box.md) for more
Note that an ActiveX control on a modal dialog box created with `CAxDialogImpl` will not support accelerator keys. To support accelerator keys on a dialog box created with `CAxDialogImpl`, create a modeless dialog box and, using your own message loop, use [CAxDialogImpl::IsDialogMessage](#isdialogmessage) after getting a message from the queue to handle an accelerator key.
-For more information on `CAxDialogImpl`, see [ATL Control Containment FAQ](../../atl/atl-control-containment-faq.md).
+For more information on `CAxDialogImpl`, see [ATL Control Containment FAQ](../../atl/atl-control-containment-faq.yml).
## Inheritance Hierarchy
diff --git a/docs/atl/reference/caxwindow-class.md b/docs/atl/reference/caxwindow-class.md
index e1d0ff1892..1817a66fc3 100644
--- a/docs/atl/reference/caxwindow-class.md
+++ b/docs/atl/reference/caxwindow-class.md
@@ -1,9 +1,16 @@
---
+description: "Learn more about: CAxWindow Class"
title: "CAxWindow Class"
ms.date: "11/04/2016"
f1_keywords: ["CAxWindow", "ATLWIN/ATL::CAxWindow", "ATLWIN/ATL::AttachControl", "ATLWIN/ATL::CreateControl", "ATLWIN/ATL::CreateControlEx", "ATLWIN/ATL::GetWndClassName", "ATLWIN/ATL::QueryControl", "ATLWIN/ATL::QueryHost", "ATLWIN/ATL::SetExternalDispatch", "ATLWIN/ATL::SetExternalUIHandler"]
helpviewer_keywords: ["CAxWindow class", "ATL, hosting ActiveX controls"]
ms.assetid: 85e79261-43e4-4770-bde0-1ff87f222b0f
+api_type:
+- DllExport
+api_location:
+- atlhost.dll
+api_name:
+- CAxWindow::CreateControlEx
---
# CAxWindow Class
@@ -22,7 +29,7 @@ class CAxWindow : public CWindow
### Methods
-|||
+|Function|Description|
|-|-|
|[AttachControl](#attachcontrol)|Attaches an existing ActiveX control to the `CAxWindow` object.|
|[CAxWindow](#caxwindow)|Constructs a `CAxWindow` object.|
@@ -36,7 +43,7 @@ class CAxWindow : public CWindow
### Operators
-|||
+|Operator|Description|
|-|-|
|[operator =](#operator_eq)|Assigns an HWND to an existing `CAxWindow` object.|
@@ -152,7 +159,7 @@ See [CAxWindow2T::CreateControlLic](../../atl/reference/caxwindow2t-class.md#cre
### Example
-See [Hosting ActiveX Controls Using ATL AXHost](../../atl/hosting-activex-controls-using-atl-axhost.md) for a sample that uses `CreateControl`.
+See [Hosting ActiveX Controls Using ATL AXHost](../../atl/atl-control-containment-faq.yml#hosting-activex-controls-using-atl-axhost) for a sample that uses `CreateControl`.
## CAxWindow::CreateControlEx
@@ -224,7 +231,7 @@ See [CAxWindow2T::CreateControlLicEx](../../atl/reference/caxwindow2t-class.md#c
### Example
-See [Hosting ActiveX Controls Using ATL AXHost](../../atl/hosting-activex-controls-using-atl-axhost.md) for a sample that uses `CreateControlEx`.
+See [Hosting ActiveX Controls Using ATL AXHost](../../atl/atl-control-containment-faq.yml#hosting-activex-controls-using-atl-axhost) for a sample that uses `CreateControlEx`.
## CAxWindow::GetWndClassName
@@ -353,4 +360,4 @@ The external `IDocHostUIHandlerDispatch` interface is used by controls that quer
[CWindow Class](../../atl/reference/cwindow-class.md)
[Composite Control Fundamentals](../../atl/atl-composite-control-fundamentals.md)
[Class Overview](../../atl/atl-class-overview.md)
-[Control Containment FAQ](../../atl/atl-control-containment-faq.md)
+[Control Containment FAQ](../../atl/atl-control-containment-faq.yml)
diff --git a/docs/atl/reference/caxwindow2t-class.md b/docs/atl/reference/caxwindow2t-class.md
index 85ae94b8cc..866f52ad95 100644
--- a/docs/atl/reference/caxwindow2t-class.md
+++ b/docs/atl/reference/caxwindow2t-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CAxWindow2T Class"
title: "CAxWindow2T Class"
ms.date: "11/04/2016"
f1_keywords: ["CAxWindow2T", "ATLWIN/ATL::CAxWindow2T", "ATLWIN/ATL::CAxWindow2T::CAxWindow2T", "ATLWIN/ATL::CAxWindow2T::Create", "ATLWIN/ATL::CAxWindow2T::CreateControlLic", "ATLWIN/ATL::CAxWindow2T::CreateControlLicEx", "ATLWIN/ATL::CAxWindow2T::GetWndClassName"]
@@ -59,7 +60,7 @@ Class `CAxWindow2` is implemented as a specialization of the `CAxWindow2T` class
> [!NOTE]
> `CAxWindowT` members are documented under [CAxWindow](../../atl/reference/caxwindow-class.md).
-See [Hosting ActiveX Controls Using ATL AXHost](../../atl/hosting-activex-controls-using-atl-axhost.md) for a sample that uses the members of this class.
+See [Hosting ActiveX Controls Using ATL AXHost](../../atl/atl-control-containment-faq.yml#hosting-activex-controls-using-atl-axhost) for a sample that uses the members of this class.
## Inheritance Hierarchy
@@ -111,7 +112,7 @@ See `CWindow::Create` for a description of the parameters and return value.
### Example
-See [Hosting ActiveX Controls Using ATL AXHost](../../atl/hosting-activex-controls-using-atl-axhost.md) for a sample that uses `CAxWindow2T::Create`.
+See [Hosting ActiveX Controls Using ATL AXHost](../../atl/atl-control-containment-faq.yml#hosting-activex-controls-using-atl-axhost) for a sample that uses `CAxWindow2T::Create`.
## CAxWindow2T::CreateControlLic
@@ -142,7 +143,7 @@ See [CAxWindow::CreateControl](../../atl/reference/caxwindow-class.md#createcont
### Example
-See [Hosting ActiveX Controls Using ATL AXHost](../../atl/hosting-activex-controls-using-atl-axhost.md) for a sample that uses `CAxWindow2T::CreateControlLic`.
+See [Hosting ActiveX Controls Using ATL AXHost](../../atl/atl-control-containment-faq.yml#hosting-activex-controls-using-atl-axhost) for a sample that uses `CAxWindow2T::CreateControlLic`.
## CAxWindow2T::CreateControlLicEx
@@ -179,7 +180,7 @@ See [CAxWindow::CreateControlEx](../../atl/reference/caxwindow-class.md#createco
### Example
-See [Hosting ActiveX Controls Using ATL AXHost](../../atl/hosting-activex-controls-using-atl-axhost.md) for a sample that uses `CAxWindow2T::CreateControlLicEx`.
+See [Hosting ActiveX Controls Using ATL AXHost](../../atl/atl-control-containment-faq.yml#hosting-activex-controls-using-atl-axhost) for a sample that uses `CAxWindow2T::CreateControlLicEx`.
## CAxWindow2T::GetWndClassName
@@ -209,4 +210,4 @@ A handle of an existing window.
## See also
[Class Overview](../../atl/atl-class-overview.md)
-[Control Containment FAQ](../../atl/atl-control-containment-faq.md)
+[Control Containment FAQ](../../atl/atl-control-containment-faq.yml)
diff --git a/docs/atl/reference/cbindstatuscallback-class.md b/docs/atl/reference/cbindstatuscallback-class.md
index ade19ae4da..1de6349c0c 100644
--- a/docs/atl/reference/cbindstatuscallback-class.md
+++ b/docs/atl/reference/cbindstatuscallback-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CBindStatusCallback Class"
title: "CBindStatusCallback Class"
ms.date: "11/04/2016"
f1_keywords: ["CBindStatusCallback", "ATLCTL/ATL::CBindStatusCallback", "ATLCTL/ATL::CBindStatusCallback::CBindStatusCallback", "ATLCTL/ATL::CBindStatusCallback::Download", "ATLCTL/ATL::CBindStatusCallback::GetBindInfo", "ATLCTL/ATL::CBindStatusCallback::GetPriority", "ATLCTL/ATL::CBindStatusCallback::OnDataAvailable", "ATLCTL/ATL::CBindStatusCallback::OnLowResource", "ATLCTL/ATL::CBindStatusCallback::OnObjectAvailable", "ATLCTL/ATL::CBindStatusCallback::OnProgress", "ATLCTL/ATL::CBindStatusCallback::OnStartBinding", "ATLCTL/ATL::CBindStatusCallback::OnStopBinding", "ATLCTL/ATL::CBindStatusCallback::StartAsyncDownload", "ATLCTL/ATL::CBindStatusCallback::m_dwAvailableToRead", "ATLCTL/ATL::CBindStatusCallback::m_dwTotalRead", "ATLCTL/ATL::CBindStatusCallback::m_pFunc", "ATLCTL/ATL::CBindStatusCallback::m_pT", "ATLCTL/ATL::CBindStatusCallback::m_spBindCtx", "ATLCTL/ATL::CBindStatusCallback::m_spBinding", "ATLCTL/ATL::CBindStatusCallback::m_spMoniker", "ATLCTL/ATL::CBindStatusCallback::m_spStream"]
diff --git a/docs/atl/reference/ccomaggobject-class.md b/docs/atl/reference/ccomaggobject-class.md
index ebc212701e..b6eefe7233 100644
--- a/docs/atl/reference/ccomaggobject-class.md
+++ b/docs/atl/reference/ccomaggobject-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComAggObject Class"
title: "CComAggObject Class"
ms.date: "11/04/2016"
f1_keywords: ["CComAggObject", "ATLCOM/ATL::CComAggObject", "ATLCOM/ATL::CComAggObject::CComAggObject", "ATLCOM/ATL::CComAggObject::AddRef", "ATLCOM/ATL::CComAggObject::CreateInstance", "ATLCOM/ATL::CComAggObject::FinalConstruct", "ATLCOM/ATL::CComAggObject::FinalRelease", "ATLCOM/ATL::CComAggObject::QueryInterface", "ATLCOM/ATL::CComAggObject::Release", "ATLCOM/ATL::CComAggObject::m_contained"]
diff --git a/docs/atl/reference/ccomallocator-class.md b/docs/atl/reference/ccomallocator-class.md
index fd94c2885b..c29ebdbe01 100644
--- a/docs/atl/reference/ccomallocator-class.md
+++ b/docs/atl/reference/ccomallocator-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComAllocator Class"
title: "CComAllocator Class"
ms.date: "11/04/2016"
f1_keywords: ["CComAllocator", "ATLBASE/ATL::CComAllocator", "ATLBASE/ATL::CComAllocator::Allocate", "ATLBASE/ATL::CComAllocator::Free", "ATLBASE/ATL::CComAllocator::Reallocate"]
diff --git a/docs/atl/reference/ccomapartment-class.md b/docs/atl/reference/ccomapartment-class.md
index a510ef6ee6..b49417cff8 100644
--- a/docs/atl/reference/ccomapartment-class.md
+++ b/docs/atl/reference/ccomapartment-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComApartment Class"
title: "CComApartment Class"
ms.date: "11/04/2016"
f1_keywords: ["CComApartment", "ATLBASE/ATL::CComApartment", "ATLBASE/ATL::CComApartment::CComApartment", "ATLBASE/ATL::CComApartment::Apartment", "ATLBASE/ATL::CComApartment::GetLockCount", "ATLBASE/ATL::CComApartment::Lock", "ATLBASE/ATL::CComApartment::Unlock", "ATLBASE/ATL::CComApartment::m_dwThreadID", "ATLBASE/ATL::CComApartment::m_hThread", "ATLBASE/ATL::CComApartment::m_nLockCnt"]
diff --git a/docs/atl/reference/ccomautocriticalsection-class.md b/docs/atl/reference/ccomautocriticalsection-class.md
index cf88a1c757..1307f3e999 100644
--- a/docs/atl/reference/ccomautocriticalsection-class.md
+++ b/docs/atl/reference/ccomautocriticalsection-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComAutoCriticalSection Class"
title: "CComAutoCriticalSection Class"
ms.date: "11/04/2016"
f1_keywords: ["CComAutoCriticalSection", "ATLCORE/ATL::CComAutoCriticalSection", "ATLCORE/ATL::CComAutoCriticalSection::CComAutoCriticalSection"]
diff --git a/docs/atl/reference/ccomautodeletecriticalsection-class.md b/docs/atl/reference/ccomautodeletecriticalsection-class.md
index 2095a3ba54..b7ab596a45 100644
--- a/docs/atl/reference/ccomautodeletecriticalsection-class.md
+++ b/docs/atl/reference/ccomautodeletecriticalsection-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComAutoDeleteCriticalSection Class"
title: "CComAutoDeleteCriticalSection Class"
ms.date: "11/04/2016"
f1_keywords: ["CComAutoDeleteCriticalSection", "atlcore/ATL::CComAutoDeleteCriticalSection"]
diff --git a/docs/atl/reference/ccomautothreadmodule-class.md b/docs/atl/reference/ccomautothreadmodule-class.md
index 689dcd9caf..4cff4d76b9 100644
--- a/docs/atl/reference/ccomautothreadmodule-class.md
+++ b/docs/atl/reference/ccomautothreadmodule-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComAutoThreadModule Class"
title: "CComAutoThreadModule Class"
ms.date: "11/04/2016"
f1_keywords: ["CComAutoThreadModule", "ATLBASE/ATL::CComAutoThreadModule", "ATLBASE/ATL::CreateInstance", "ATLBASE/ATL::GetDefaultThreads", "ATLBASE/ATL::Init", "ATLBASE/ATL::Lock", "ATLBASE/ATL::Unlock", "ATLBASE/ATL::dwThreadID", "ATLBASE/ATL::m_Allocator", "ATLBASE/ATL::m_nThreads", "ATLBASE/ATL::m_pApartments"]
@@ -28,7 +29,7 @@ class CComAutoThreadModule : public CComModule
### Methods
-|||
+|Function|Description|
|-|-|
|[CreateInstance](#createinstance)|Selects a thread and then creates an object in the associated apartment.|
|[GetDefaultThreads](#getdefaultthreads)|(Static) Dynamically calculates the number of threads for the module based on the number of processors.|
@@ -38,9 +39,7 @@ class CComAutoThreadModule : public CComModule
### Data Members
-### Data Members
-
-|||
+|Data member|Description|
|-|-|
|[dwThreadID](#dwthreadid)|Contains the identifier of the current thread.|
|[m_Allocator](#m_allocator)|Manages thread selection.|
diff --git a/docs/atl/reference/ccombstr-class.md b/docs/atl/reference/ccombstr-class.md
index 1d4191aa01..14c7a7e8d8 100644
--- a/docs/atl/reference/ccombstr-class.md
+++ b/docs/atl/reference/ccombstr-class.md
@@ -1,13 +1,14 @@
---
+description: "Learn more about: CComBSTR Class"
title: "CComBSTR Class"
ms.date: "11/04/2016"
f1_keywords: ["CComBSTR", "ATLBASE/ATL::CComBSTR", "ATLBASE/ATL::CComBSTR::CComBSTR", "ATLBASE/ATL::CComBSTR::Append", "ATLBASE/ATL::CComBSTR::AppendBSTR", "ATLBASE/ATL::CComBSTR::AppendBytes", "ATLBASE/ATL::CComBSTR::ArrayToBSTR", "ATLBASE/ATL::CComBSTR::AssignBSTR", "ATLBASE/ATL::CComBSTR::Attach", "ATLBASE/ATL::CComBSTR::BSTRToArray", "ATLBASE/ATL::CComBSTR::ByteLength", "ATLBASE/ATL::CComBSTR::Copy", "ATLBASE/ATL::CComBSTR::CopyTo", "ATLBASE/ATL::CComBSTR::Detach", "ATLBASE/ATL::CComBSTR::Empty", "ATLBASE/ATL::CComBSTR::Length", "ATLBASE/ATL::CComBSTR::LoadString", "ATLBASE/ATL::CComBSTR::ReadFromStream", "ATLBASE/ATL::CComBSTR::ToLower", "ATLBASE/ATL::CComBSTR::ToUpper", "ATLBASE/ATL::CComBSTR::WriteToStream", "ATLBASE/ATL::CComBSTR::m_str"]
helpviewer_keywords: ["BSTRs, wrapper", "CComBSTR class", "CComBSTR"]
ms.assetid: 8fea1879-a05e-47a5-a803-8dec60eaa534
---
-# CComBSTR Class
+# `CComBSTR` Class
-This class is a wrapper for [BSTR](/previous-versions/windows/desktop/automat/bstr)s.
+This class is a wrapper for [`BSTR`](/previous-versions/windows/desktop/automat/bstr)s.
## Syntax
@@ -21,57 +22,57 @@ class CComBSTR
|Name|Description|
|----------|-----------------|
-|[CComBSTR::CComBSTR](#ccombstr)|The constructor.|
-|[CComBSTR::~CComBSTR](#dtor)|The destructor.|
+|[`CComBSTR::CComBSTR`](#ccombstr)|The constructor.|
+|[`CComBSTR::~CComBSTR`](#dtor)|The destructor.|
### Public Methods
|Name|Description|
|----------|-----------------|
-|[CComBSTR::Append](#append)|Appends a string to `m_str`.|
-|[CComBSTR::AppendBSTR](#appendbstr)|Appends a BSTR to `m_str`.|
-|[CComBSTR::AppendBytes](#appendbytes)|Appends a specified number of bytes to `m_str`.|
-|[CComBSTR::ArrayToBSTR](#arraytobstr)|Creates a BSTR from the first character of each element in the safearray and attaches it to the `CComBSTR` object.|
-|[CComBSTR::AssignBSTR](#assignbstr)|Assigns a BSTR to `m_str`.|
-|[CComBSTR::Attach](#attach)|Attaches a BSTR to the `CComBSTR` object.|
-|[CComBSTR::BSTRToArray](#bstrtoarray)|Creates a zero-based one-dimensional safearray, where each element of the array is a character from the `CComBSTR` object.|
-|[CComBSTR::ByteLength](#bytelength)|Returns the length of `m_str` in bytes.|
-|[CComBSTR::Copy](#copy)|Returns a copy of `m_str`.|
-|[CComBSTR::CopyTo](#copyto)|Returns a copy of `m_str` via an **[out]** parameter|
-|[CComBSTR::Detach](#detach)|Detaches `m_str` from the `CComBSTR` object.|
-|[CComBSTR::Empty](#empty)|Frees `m_str`.|
-|[CComBSTR::Length](#length)|Returns the length of `m_str`.|
-|[CComBSTR::LoadString](#loadstring)|Loads a string resource.|
-|[CComBSTR::ReadFromStream](#readfromstream)|Loads a BSTR object from a stream.|
-|[CComBSTR::ToLower](#tolower)|Converts the string to lowercase.|
-|[CComBSTR::ToUpper](#toupper)|Converts the string to uppercase.|
-|[CComBSTR::WriteToStream](#writetostream)|Saves `m_str` to a stream.|
+|[`CComBSTR::Append`](#append)|Appends a string to `m_str`.|
+|[`CComBSTR::AppendBSTR`](#appendbstr)|Appends a `BSTR` to `m_str`.|
+|[`CComBSTR::AppendBytes`](#appendbytes)|Appends a specified number of bytes to `m_str`.|
+|[`CComBSTR::ArrayToBSTR`](#arraytobstr)|Creates a `BSTR` from the first character of each element in the safearray and attaches it to the `CComBSTR` object.|
+|[`CComBSTR::AssignBSTR`](#assignbstr)|Assigns a `BSTR` to `m_str`.|
+|[`CComBSTR::Attach`](#attach)|Attaches a `BSTR` to the `CComBSTR` object.|
+|[`CComBSTR::BSTRToArray`](#bstrtoarray)|Creates a zero-based one-dimensional safearray, where each element of the array is a character from the `CComBSTR` object.|
+|[`CComBSTR::ByteLength`](#bytelength)|Returns the length of `m_str` in bytes.|
+|[`CComBSTR::Copy`](#copy)|Returns a copy of `m_str`.|
+|[`CComBSTR::CopyTo`](#copyto)|Returns a copy of `m_str` via an **`[out]`** parameter|
+|[`CComBSTR::Detach`](#detach)|Detaches `m_str` from the `CComBSTR` object.|
+|[`CComBSTR::Empty`](#empty)|Frees `m_str`.|
+|[`CComBSTR::Length`](#length)|Returns the length of `m_str`.|
+|[`CComBSTR::LoadString`](#loadstring)|Loads a string resource.|
+|[`CComBSTR::ReadFromStream`](#readfromstream)|Loads a `BSTR` object from a stream.|
+|[`CComBSTR::ToLower`](#tolower)|Converts the string to lowercase.|
+|[`CComBSTR::ToUpper`](#toupper)|Converts the string to uppercase.|
+|[`CComBSTR::WriteToStream`](#writetostream)|Saves `m_str` to a stream.|
### Public Operators
|Name|Description|
|----------|-----------------|
-|[CComBSTR::operator BSTR](#operator_bstr)|Casts a `CComBSTR` object to a BSTR.|
-|[CComBSTR::operator !](#operator_not)|Returns TRUE or FALSE, depending on whether `m_str`is NULL.|
-|[CComBSTR::operator !=](#operator_neq)|Compares a `CComBSTR` with a string.|
-|[CComBSTR::operator &](#operator_amp)|Returns the address of `m_str`.|
-|[CComBSTR::operator +=](#operator_add_eq)|Appends a `CComBSTR` to the object.|
-|[CComBSTR::operator <](#operator_lt)|Compares a `CComBSTR` with a string.|
-|[CComBSTR::operator =](#operator_eq)|Assigns a value to `m_str`.|
-|[CComBSTR::operator ==](#operator_eq_eq)|Compares a `CComBSTR` with a string.|
-|[CComBSTR::operator >](#operator_gt)|Compares a `CComBSTR` with a string.|
+|[`CComBSTR::operator BSTR`](#operator_bstr)|Casts a `CComBSTR` object to a BSTR.|
+|[`CComBSTR::operator !`](#operator_not)|Returns TRUE or FALSE, depending on whether `m_str` is NULL.|
+|[`CComBSTR::operator !=`](#operator_neq)|Compares a `CComBSTR` with a string.|
+|[`CComBSTR::operator &`](#operator_amp)|Returns the address of `m_str`.|
+|[`CComBSTR::operator +=`](#operator_add_eq)|Appends a `CComBSTR` to the object.|
+|[`CComBSTR::operator <`](#operator_lt)|Compares a `CComBSTR` with a string.|
+|[`CComBSTR::operator =`](#operator_eq)|Assigns a value to `m_str`.|
+|[`CComBSTR::operator ==`](#operator_eq_eq)|Compares a `CComBSTR` with a string.|
+|[`CComBSTR::operator >`](#operator_gt)|Compares a `CComBSTR` with a string.|
### Public Data Members
|Name|Description|
|----------|-----------------|
-|[CComBSTR::m_str](#m_str)|Contains the BSTR associated with the `CComBSTR` object.|
+|[`CComBSTR::m_str`](#m_str)|Contains the `BSTR` associated with the `CComBSTR` object.|
## Remarks
-The `CComBSTR` class is a wrapper for BSTRs, which are length-prefixed strings. The length is stored as an integer at the memory location preceding the data in the string.
+The `CComBSTR` class is a wrapper for `BSTR`s, which are length-prefixed strings. The length is stored as an integer at the memory location preceding the data in the string.
-A [BSTR](/previous-versions/windows/desktop/automat/bstr) is null-terminated after the last counted character but may also contain null characters embedded within the string. The string length is determined by the character count, not the first null character.
+A [`BSTR`](/previous-versions/windows/desktop/automat/bstr) is null-terminated after the last counted character but may also contain null characters embedded within the string. The string length is determined by the character count, not the first null character.
> [!NOTE]
> The `CComBSTR` class provides a number of members (constructors, assignment operators, and comparison operators) that take either ANSI or Unicode strings as arguments. The ANSI versions of these functions are less efficient than their Unicode counterparts because temporary Unicode strings are often created internally. For efficiency, use the Unicode versions where possible.
@@ -79,15 +80,15 @@ A [BSTR](/previous-versions/windows/desktop/automat/bstr) is null-terminated aft
> [!NOTE]
> Because of the improved lookup behavior implemented in Visual Studio .NET, code such as `bstr = L"String2" + bstr;`, which may have compiled in previous releases, should instead be implemented as `bstr = CStringW(L"String2") + bstr`.
-For a list of cautions when using `CComBSTR`, see [Programming with CComBSTR](../../atl/programming-with-ccombstr-atl.md).
+For a list of cautions when using `CComBSTR`, see [Programming with `CComBSTR`](../../atl/programming-with-ccombstr-atl.md).
## Requirements
-**Header:** atlbase.h
+**Header:** `atlbase.h`
-## CComBSTR::Append
+## `CComBSTR::Append`
-Appends either *lpsz* or the BSTR member of *bstrSrc* to [m_str](#m_str).
+Appends either *`lpsz`* or the BSTR member of *`bstrSrc`* to [`m_str`](#m_str).
```
HRESULT Append(const CComBSTR& bstrSrc) throw();
@@ -100,21 +101,21 @@ HRESULT Append(LPCOLESTR lpsz, int nLen) throw();
### Parameters
-*bstrSrc*
+*`bstrSrc`*
[in] A `CComBSTR` object to append.
-*ch*
+*`ch`*
[in] A character to append.
-*lpsz*
-[in] A zero-terminated character string to append. You can pass a Unicode string via the LPCOLESTR overload or an ANSI string via the LPCSTR version.
+*`lpsz`*
+[in] A zero-terminated character string to append. You can pass a Unicode string via the `LPCOLESTR` overload or an ANSI string via the `LPCSTR` version.
-*nLen*
-[in] The number of characters from *lpsz* to append.
+*`nLen`*
+[in] The number of characters from *`lpsz`* to append.
### Return Value
-S_OK on success, or any standard HRESULT error value.
+`S_OK` on success, or any standard `HRESULT` error value.
### Remarks
@@ -124,9 +125,9 @@ An ANSI string will be converted to Unicode before being appended.
[!code-cpp[NVC_ATL_Utilities#32](../../atl/codesnippet/cpp/ccombstr-class_1.cpp)]
-## CComBSTR::AppendBSTR
+## `CComBSTR::AppendBSTR`
-Appends the specified BSTR to [m_str](#m_str).
+Appends the specified `BSTR` to [`m_str`](#m_str).
```
HRESULT AppendBSTR(BSTR p) throw();
@@ -134,12 +135,12 @@ HRESULT AppendBSTR(BSTR p) throw();
### Parameters
-*p*
-[in] A BSTR to append.
+*`p`*
+[in] A `BSTR` to append.
### Return Value
-S_OK on success, or any standard HRESULT error value.
+`S_OK` on success, or any standard `HRESULT` error value.
### Remarks
@@ -149,9 +150,9 @@ Do not pass an ordinary wide-character string to this method. The compiler canno
[!code-cpp[NVC_ATL_Utilities#33](../../atl/codesnippet/cpp/ccombstr-class_2.cpp)]
-## CComBSTR::AppendBytes
+## `CComBSTR::AppendBytes`
-Appends the specified number of bytes to [m_str](#m_str) without conversion.
+Appends the specified number of bytes to [`m_str`](#m_str) without conversion.
```
HRESULT AppendBytes(const char* lpsz, int nLen) throw();
@@ -159,23 +160,23 @@ HRESULT AppendBytes(const char* lpsz, int nLen) throw();
### Parameters
-*lpsz*
+*`lpsz`*
[in] A pointer to an array of bytes to append.
-*p*
+*`p`*
[in] The number of bytes to append.
### Return Value
-S_OK on success, or any standard HRESULT error value.
+`S_OK` on success, or any standard `HRESULT` error value.
### Example
[!code-cpp[NVC_ATL_Utilities#34](../../atl/codesnippet/cpp/ccombstr-class_3.cpp)]
-## CComBSTR::ArrayToBSTR
+## `CComBSTR::ArrayToBSTR`
-Frees any existing string held in the `CComBSTR` object, then creates a BSTR from the first character of each element in the safearray and attaches it to the `CComBSTR` object.
+Frees any existing string held in the `CComBSTR` object, then creates a `BSTR` from the first character of each element in the safearray and attaches it to the `CComBSTR` object.
```
HRESULT ArrayToBSTR(const SAFEARRAY* pSrc) throw();
@@ -183,16 +184,16 @@ HRESULT ArrayToBSTR(const SAFEARRAY* pSrc) throw();
### Parameters
-*pSrc*
+*`pSrc`*
[in] The safearray containing the elements used to create the string.
### Return Value
-S_OK on success, or any standard HRESULT error value.
+`S_OK` on success, or any standard `HRESULT` error value.
-## CComBSTR::AssignBSTR
+## `CComBSTR::AssignBSTR`
-Assigns a BSTR to [m_str](#m_str).
+Assigns a `BSTR` to [`m_str`](#m_str).
```
HRESULT AssignBSTR(const BSTR bstrSrc) throw();
@@ -200,16 +201,16 @@ HRESULT AssignBSTR(const BSTR bstrSrc) throw();
### Parameters
-*bstrSrc*
+*`bstrSrc`*
[in] A BSTR to assign to the current `CComBSTR` object.
### Return Value
-S_OK on success, or any standard HRESULT error value.
+`S_OK` on success, or any standard `HRESULT` error value.
-## CComBSTR::Attach
+## `CComBSTR::Attach`
-Attaches a BSTR to the `CComBSTR` object by setting the [m_str](#m_str) member to *src*.
+Attaches a `BSTR` to the `CComBSTR` object by setting the [`m_str`](#m_str) member to *`src`*.
```cpp
void Attach(BSTR src) throw();
@@ -217,8 +218,8 @@ void Attach(BSTR src) throw();
### Parameters
-*src*
-[in] The BSTR to attach to the object.
+*`src`*
+[in] The `BSTR` to attach to the object.
### Remarks
@@ -231,7 +232,7 @@ Do not pass an ordinary wide-character string to this method. The compiler canno
[!code-cpp[NVC_ATL_Utilities#35](../../atl/codesnippet/cpp/ccombstr-class_4.cpp)]
-## CComBSTR::BSTRToArray
+## `CComBSTR::BSTRToArray`
Creates a zero-based one-dimensional safearray, where each element of the array is a character from the `CComBSTR` object.
@@ -241,14 +242,14 @@ HRESULT BSTRToArray(LPSAFEARRAY* ppArray) throw();
### Parameters
-*ppArray*
+*`ppArray`*
[out] The pointer to the safearray used to hold the results of the function.
### Return Value
-S_OK on success, or any standard HRESULT error value.
+`S_OK` on success, or any standard `HRESULT` error value.
-## CComBSTR::ByteLength
+## `CComBSTR::ByteLength`
Returns the number of bytes in `m_str`, excluding the terminating null character.
@@ -258,19 +259,19 @@ unsigned int ByteLength() const throw();
### Return Value
-The length of the [m_str](#m_str) member in bytes.
+The length of the [`m_str`](#m_str) member in bytes.
### Remarks
-Returns 0 if `m_str` is NULL.
+Returns 0 if `m_str` is `NULL`.
### Example
[!code-cpp[NVC_ATL_Utilities#36](../../atl/codesnippet/cpp/ccombstr-class_5.cpp)]
-## CComBSTR::CComBSTR
+## `CComBSTR::CComBSTR`
-The constructor. The default constructor sets the [m_str](#m_str) member to NULL.
+The constructor. The default constructor sets the [`m_str`](#m_str) member to `NULL`.
```
CComBSTR() throw();
@@ -286,26 +287,26 @@ CComBSTR(CComBSTR&& src) throw(); // (Visual Studio 2017)
### Parameters
-*nSize*
-[in] The number of characters to copy from *sz* or the initial size in characters for the `CComBSTR`.
+*`nSize`*
+[in] The number of characters to copy from *`sz`* or the initial size in characters for the `CComBSTR`.
-*sz*
-[in] A string to copy. The Unicode version specifies an LPCOLESTR; the ANSI version specifies an LPCSTR.
+*`sz`*
+[in] A string to copy. The Unicode version specifies an `LPCOLESTR`; the ANSI version specifies an LPCSTR.
-*pSrc*
-[in] A string to copy. The Unicode version specifies an LPCOLESTR; the ANSI version specifies an LPCSTR.
+*`pSrc`*
+[in] A string to copy. The Unicode version specifies an `LPCOLESTR`; the ANSI version specifies an LPCSTR.
-*src*
+*`src`*
[in] A `CComBSTR` object.
-*guid*
+*`guid`*
[in] A reference to a `GUID` structure.
### Remarks
-The copy constructor sets `m_str` to a copy of the BSTR member of *src*. The `REFGUID` constructor converts the GUID to a string using `StringFromGUID2` and stores the result.
+The copy constructor sets `m_str` to a copy of the BSTR member of *`src`*. The `REFGUID` constructor converts the GUID to a string using `StringFromGUID2` and stores the result.
-The other constructors set `m_str` to a copy of the specified string. If you pass a value for *nSize*, then only *nSize* characters will be copied, followed by a terminating null character.
+The other constructors set `m_str` to a copy of the specified string. If you pass a value for *`nSize`*, then only *`nSize`* characters will be copied, followed by a terminating null character.
`CComBSTR` supports move semantics. You can use the move constructor (the constructor that takes an rvalue reference (`&&`) to create a new object that uses the same underlying data as the old object you pass in as an argument, without the overhead of copying the object.
@@ -315,7 +316,7 @@ The destructor frees the string pointed to by `m_str`.
[!code-cpp[NVC_ATL_Utilities#37](../../atl/codesnippet/cpp/ccombstr-class_6.cpp)]
-## CComBSTR::~CComBSTR
+## `CComBSTR::~CComBSTR`
The destructor.
@@ -327,7 +328,7 @@ The destructor.
The destructor frees the string pointed to by `m_str`.
-## CComBSTR::Copy
+## `CComBSTR::Copy`
Allocates and returns a copy of `m_str`.
@@ -337,15 +338,15 @@ BSTR Copy() const throw();
### Return Value
-A copy of the [m_str](#m_str) member. If `m_str` is NULL, returns NULL.
+A copy of the [`m_str`](#m_str) member. If `m_str` is `NULL`, returns `NULL`.
### Example
[!code-cpp[NVC_ATL_Utilities#38](../../atl/codesnippet/cpp/ccombstr-class_7.cpp)]
-## CComBSTR::CopyTo
+## `CComBSTR::CopyTo`
-Allocates and returns a copy of [m_str](#m_str) via the parameter.
+Allocates and returns a copy of [`m_str`](#m_str) via the parameter.
```
HRESULT CopyTo(BSTR* pbstr) throw();
@@ -355,27 +356,27 @@ HRESULT CopyTo(VARIANT* pvarDest) throw();
### Parameters
-*pbstr*
-[out] The address of a BSTR in which to return the string allocated by this method.
+*`pbstr`*
+[out] The address of a `BSTR` in which to return the string allocated by this method.
-*pvarDest*
-[out] The address of a VARIANT in which to return the string allocated by this method.
+*`pvarDest`*
+[out] The address of a `VARIANT` in which to return the string allocated by this method.
### Return Value
-A standard HRESULT value indicating the success or failure of the copy.
+A standard `HRESULT` value indicating the success or failure of the copy.
### Remarks
-After calling this method, the VARIANT pointed to by *pvarDest* will be of type VT_BSTR.
+After calling this method, the `VARIANT` pointed to by *`pvarDest`* will be of type `VT_BSTR`.
### Example
[!code-cpp[NVC_ATL_Utilities#39](../../atl/codesnippet/cpp/ccombstr-class_8.cpp)]
-## CComBSTR::Detach
+## `CComBSTR::Detach`
-Detaches [m_str](#m_str) from the `CComBSTR` object and sets `m_str` to NULL.
+Detaches [`m_str`](#m_str) from the `CComBSTR` object and sets `m_str` to `NULL`.
```
BSTR Detach() throw();
@@ -383,15 +384,15 @@ BSTR Detach() throw();
### Return Value
-The BSTR associated with the `CComBSTR` object.
+The `BSTR` associated with the `CComBSTR` object.
### Example
[!code-cpp[NVC_ATL_Utilities#40](../../atl/codesnippet/cpp/ccombstr-class_9.cpp)]
-## CComBSTR::Empty
+## `CComBSTR::Empty`
-Frees the [m_str](#m_str) member.
+Frees the [`m_str`](#m_str) member.
```cpp
void Empty() throw();
@@ -401,7 +402,7 @@ void Empty() throw();
[!code-cpp[NVC_ATL_Utilities#41](../../atl/codesnippet/cpp/ccombstr-class_10.cpp)]
-## CComBSTR::Length
+## `CComBSTR::Length`
Returns the number of characters in `m_str`, excluding the terminating null character.
@@ -411,15 +412,15 @@ unsigned int Length() const throw();
### Return Value
-The length of the [m_str](#m_str) member.
+The length of the [`m_str`](#m_str) member.
### Example
[!code-cpp[NVC_ATL_Utilities#42](../../atl/codesnippet/cpp/ccombstr-class_11.cpp)]
-## CComBSTR::LoadString
+## `CComBSTR::LoadString`
-Loads a string resource specified by *nID* and stores it in this object.
+Loads a string resource specified by *`nID`* and stores it in this object.
```
bool LoadString(HINSTANCE hInst, UINT nID) throw();
@@ -428,23 +429,23 @@ bool LoadString(UINT nID) throw();
### Parameters
-See [LoadString](/windows/win32/api/winuser/nf-winuser-loadstringw) in the Windows SDK.
+See [`LoadString`](/windows/win32/api/winuser/nf-winuser-loadstringw) in the Windows SDK.
### Return Value
-Returns TRUE if the string is successfully loaded; otherwise, returns FALSE.
+Returns `TRUE` if the string is successfully loaded; otherwise, returns `FALSE`.
### Remarks
-The first function loads the resource from the module identified by you via the *hInst* parameter. The second function loads the resource from the resource module associated with the [CComModule](../../atl/reference/ccommodule-class.md)-derived object used in this project.
+The first function loads the resource from the module identified by you via the *`hInst`* parameter. The second function loads the resource from the resource module associated with the [`CComModule`](../../atl/reference/ccommodule-class.md)-derived object used in this project.
### Example
[!code-cpp[NVC_ATL_Utilities#43](../../atl/codesnippet/cpp/ccombstr-class_12.cpp)]
-## CComBSTR::m_str
+## `CComBSTR::m_str`
-Contains the BSTR associated with the `CComBSTR` object.
+Contains the `BSTR` associated with the `CComBSTR` object.
```
BSTR m_str;
@@ -454,9 +455,9 @@ BSTR m_str;
[!code-cpp[NVC_ATL_Utilities#49](../../atl/codesnippet/cpp/ccombstr-class_13.cpp)]
-## CComBSTR::operator BSTR
+## `CComBSTR::operator BSTR`
-Casts a `CComBSTR` object to a BSTR.
+Casts a `CComBSTR` object to a `BSTR`.
```
operator BSTR() const throw();
@@ -464,15 +465,15 @@ operator BSTR() const throw();
### Remarks
-Allows you to pass `CComBSTR` objects to functions that have **[in] BSTR** parameters.
+Allows you to pass `CComBSTR` objects to functions that have **[in] `BSTR`** parameters.
### Example
-See the example for [CComBSTR::m_str](#m_str).
+See the example for [`CComBSTR::m_str`](#m_str).
-## CComBSTR::operator !
+## `CComBSTR::operator !`
-Checks whether BSTR string is NULL.
+Checks whether `BSTR` string is `NULL`.
```
bool operator!() const throw();
@@ -480,19 +481,19 @@ bool operator!() const throw();
### Return Value
-Returns TRUE if the [m_str](#m_str) member is NULL; otherwise, FALSE.
+Returns `TRUE` if the [`m_str`](#m_str) member is `NULL`; otherwise, `FALSE`.
### Remarks
-This operator only checks for a NULL value, not for an empty string.
+This operator only checks for a `NULL` value, not for an empty string.
### Example
[!code-cpp[NVC_ATL_Utilities#35](../../atl/codesnippet/cpp/ccombstr-class_4.cpp)]
-## CComBSTR::operator !=
+## `CComBSTR::operator !=`
-Returns the logical opposite of [operator ==](#operator_eq_eq).
+Returns the logical opposite of [`operator ==`](#operator_eq_eq).
```
bool operator!= (const CComBSTR& bstrSrc) const throw();
@@ -503,26 +504,26 @@ bool operator!= (int nNull) const throw();
### Parameters
-*bstrSrc*
+*`bstrSrc`*
[in] A `CComBSTR` object.
-*pszSrc*
+*`pszSrc`*
[in] A zero-terminated string.
-*nNull*
+*`nNull`*
[in] Must be NULL.
### Return Value
-Returns TRUE if the item being compared is not equal to the `CComBSTR` object; otherwise, returns FALSE.
+Returns `TRUE` if the item being compared is not equal to the `CComBSTR` object; otherwise, returns `FALSE`.
### Remarks
-`CComBSTR`s are compared textually in the context of the user's default locale. The final comparison operator just compares the contained string against NULL.
+`CComBSTR`s are compared textually in the context of the user's default locale. The final comparison operator just compares the contained string against `NULL`.
-## CComBSTR::operator &
+## `CComBSTR::operator &`
-Returns the address of the BSTR stored in the [m_str](#m_str) member.
+Returns the address of the `BSTR` stored in the [`m_str`](#m_str) member.
```
BSTR* operator&() throw();
@@ -530,9 +531,9 @@ BSTR* operator&() throw();
### Remarks
-`CComBstr operator &` has a special assertion associated with it to help identify memory leaks. The program will assert when the `m_str` member is initialized. This assertion was created to identify situations where a programmer uses the `& operator` to assign a new value to `m_str` member without freeing the first allocation of `m_str`. If `m_str` equals NULL, the program assumes that m_str wasn't allocated yet. In this case, the program will not assert.
+`CComBstr operator &` has a special assertion associated with it to help identify memory leaks. The program will assert when the `m_str` member is initialized. This assertion was created to identify situations where a programmer uses the `& operator` to assign a new value to `m_str` member without freeing the first allocation of `m_str`. If `m_str` equals `NULL`, the program assumes that m_str wasn't allocated yet. In this case, the program will not assert.
-This assertion is not enabled by default. Define ATL_CCOMBSTR_ADDRESS_OF_ASSERT to enable this assertion.
+This assertion is not enabled by default. Define `ATL_CCOMBSTR_ADDRESS_OF_ASSERT` to enable this assertion.
### Example
@@ -540,7 +541,7 @@ This assertion is not enabled by default. Define ATL_CCOMBSTR_ADDRESS_OF_ASSERT
[!code-cpp[NVC_ATL_Utilities#47](../../atl/codesnippet/cpp/ccombstr-class_15.cpp)]
-## CComBSTR::operator +=
+## `CComBSTR::operator +=`
Appends a string to the `CComBSTR` object.
@@ -551,21 +552,21 @@ CComBSTR& operator+= (const LPCOLESTR pszSrc);
### Parameters
-*bstrSrc*
+*`bstrSrc`*
[in] A `CComBSTR` object to append.
-*pszSrc*
+*`pszSrc`*
[in] A zero-terminated string to append.
### Remarks
-`CComBSTR`s are compared textually in the context of the user's default locale. The LPCOLESTR comparison is done using `memcmp` on the raw data in each string. The LPCSTR comparison is carried out in the same way once a temporary Unicode copy of *pszSrc* has been created. The final comparison operator just compares the contained string against NULL.
+`CComBSTR`s are compared textually in the context of the user's default locale. The `LPCOLESTR` comparison is done using `memcmp` on the raw data in each string. The `LPCSTR` comparison is carried out in the same way once a temporary Unicode copy of *`pszSrc`* has been created. The final comparison operator just compares the contained string against `NULL`.
### Example
[!code-cpp[NVC_ATL_Utilities#48](../../atl/codesnippet/cpp/ccombstr-class_16.cpp)]
-## CComBSTR::operator <
+## `CComBSTR::operator <`
Compares a `CComBSTR` with a string.
@@ -577,15 +578,15 @@ bool operator<(LPCSTR pszSrc) const throw();
### Return Value
-Returns TRUE if the item being compared is less than the `CComBSTR` object; otherwise, returns FALSE.
+Returns `TRUE` if the item being compared is less than the `CComBSTR` object; otherwise, returns `FALSE`.
### Remarks
The comparison is performed using the user's default locale.
-## CComBSTR::operator =
+## `CComBSTR::operator =`
-Sets the [m_str](#m_str) member to a copy of *pSrc* or to a copy of the BSTR member of *src*. The move assignment operator moves `src` without copying it.
+Sets the [`m_str`](#m_str) member to a copy of *`pSrc`* or to a copy of the `BSTR` member of *`src`*. The move assignment operator moves `src` without copying it.
```
CComBSTR& operator= (const CComBSTR& src);
@@ -596,13 +597,13 @@ CComBSTR& operator= (CComBSTR&& src) throw(); // (Visual Studio 2017)
### Remarks
-The *pSrc* parameter specifies either an LPCOLESTR for Unicode versions or LPCSTR for ANSI versions.
+The *`pSrc`* parameter specifies either an `LPCOLESTR` for Unicode versions or `LPCSTR` for ANSI versions.
### Example
-See the example for [CComBSTR::Copy](#copy).
+See the example for [`CComBSTR::Copy`](#copy).
-## CComBSTR::operator ==
+## `CComBSTR::operator ==`
Compares a `CComBSTR` with a string. `CComBSTR`s are compared textually in the context of the user's default locale.
@@ -615,24 +616,24 @@ bool operator== (int nNull) const throw();
### Parameters
-*bstrSrc*
+*`bstrSrc`*
[in] A `CComBSTR` object.
-*pszSrc*
+*`pszSrc`*
[in] A zero-terminated string.
-*nNull*
-[in] Must be NULL.
+*`nNull`*
+[in] Must be `NULL`.
### Return Value
-Returns TRUE if the item being compared is equal to the `CComBSTR` object; otherwise, returns FALSE.
+Returns `TRUE` if the item being compared is equal to the `CComBSTR` object; otherwise, returns `FALSE`.
### Remarks
-The final comparison operator just compares the contained string against NULL.
+The final comparison operator just compares the contained string against `NULL`.
-## CComBSTR::operator >
+## `CComBSTR::operator >`
Compares a `CComBSTR` with a string.
@@ -642,15 +643,15 @@ bool operator>(const CComBSTR& bstrSrc) const throw();
### Return Value
-Returns TRUE if the item being compared is greater than the `CComBSTR` object; otherwise, returns FALSE.
+Returns `TRUE` if the item being compared is greater than the `CComBSTR` object; otherwise, returns `FALSE`.
### Remarks
The comparison is performed using the user's default locale.
-## CComBSTR::ReadFromStream
+## `CComBSTR::ReadFromStream`
-Sets the [m_str](#m_str) member to the BSTR contained in the specified stream.
+Sets the [`m_str`](#m_str) member to the `BSTR` contained in the specified stream.
```
HRESULT ReadFromStream(IStream* pStream) throw();
@@ -658,22 +659,22 @@ HRESULT ReadFromStream(IStream* pStream) throw();
### Parameters
-*pStream*
-[in] A pointer to the [IStream](/windows/win32/api/objidl/nn-objidl-istream) interface on the stream containing the data.
+*`pStream`*
+[in] A pointer to the [`IStream`](/windows/win32/api/objidl/nn-objidl-istream) interface on the stream containing the data.
### Return Value
-A standard HRESULT value.
+A standard `HRESULT` value.
### Remarks
-`ReadToStream` requires the contents of the stream at the current position to be compatible with the data format written out by a call to [WriteToStream](#writetostream).
+`ReadToStream` requires the contents of the stream at the current position to be compatible with the data format written out by a call to [`WriteToStream`](#writetostream).
### Example
[!code-cpp[NVC_ATL_Utilities#44](../../atl/codesnippet/cpp/ccombstr-class_17.cpp)]
-## CComBSTR::ToLower
+## `CComBSTR::ToLower`
Converts the contained string to lowercase.
@@ -683,13 +684,13 @@ HRESULT ToLower() throw();
### Return Value
-A standard HRESULT value.
+A standard `HRESULT` value.
### Remarks
See `CharLowerBuff` for more information on how the conversion is performed.
-## CComBSTR::ToUpper
+## `CComBSTR::ToUpper`
Converts the contained string to uppercase.
@@ -699,15 +700,15 @@ HRESULT ToUpper() throw();
### Return Value
-A standard HRESULT value.
+A standard `HRESULT` value.
### Remarks
See `CharUpperBuff` for more information on how the conversion is performed.
-## CComBSTR::WriteToStream
+## `CComBSTR::WriteToStream`
-Saves the [m_str](#m_str) member to a stream.
+Saves the [`m_str`](#m_str) member to a stream.
```
HRESULT WriteToStream(IStream* pStream) throw();
@@ -715,16 +716,16 @@ HRESULT WriteToStream(IStream* pStream) throw();
### Parameters
-*pStream*
-[in] A pointer to the [IStream](/windows/win32/api/objidl/nn-objidl-istream) interface on a stream.
+*`pStream`*
+[in] A pointer to the [`IStream`](/windows/win32/api/objidl/nn-objidl-istream) interface on a stream.
### Return Value
-A standard HRESULT value.
+A standard `HRESULT` value.
### Remarks
-You can recreate a BSTR from the contents of the stream using the [ReadFromStream](#readfromstream) function.
+You can recreate a `BSTR` from the contents of the stream using the [`ReadFromStream`](#readfromstream) function.
### Example
diff --git a/docs/atl/reference/ccomcachedtearoffobject-class.md b/docs/atl/reference/ccomcachedtearoffobject-class.md
index 9bd762b1ff..26e8f9526d 100644
--- a/docs/atl/reference/ccomcachedtearoffobject-class.md
+++ b/docs/atl/reference/ccomcachedtearoffobject-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComCachedTearOffObject Class"
title: "CComCachedTearOffObject Class"
ms.date: "11/04/2016"
f1_keywords: ["CComCachedTearOffObject", "ATLCOM/ATL::CComCachedTearOffObject", "ATLCOM/ATL::CComCachedTearOffObject::CComCachedTearOffObject", "ATLCOM/ATL::CComCachedTearOffObject::AddRef", "ATLCOM/ATL::CComCachedTearOffObject::FinalConstruct", "ATLCOM/ATL::CComCachedTearOffObject::FinalRelease", "ATLCOM/ATL::CComCachedTearOffObject::QueryInterface", "ATLCOM/ATL::CComCachedTearOffObject::Release", "ATLCOM/ATL::CComCachedTearOffObject::m_contained"]
diff --git a/docs/atl/reference/ccomclassfactory-class.md b/docs/atl/reference/ccomclassfactory-class.md
index bd54bb607c..02636d54b1 100644
--- a/docs/atl/reference/ccomclassfactory-class.md
+++ b/docs/atl/reference/ccomclassfactory-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComClassFactory Class"
title: "CComClassFactory Class"
ms.date: "11/04/2016"
f1_keywords: ["CComClassFactory", "ATLCOM/ATL::CComClassFactory", "ATLCOM/ATL::CComClassFactory::CreateInstance", "ATLCOM/ATL::CComClassFactory::LockServer"]
diff --git a/docs/atl/reference/ccomclassfactory2-class.md b/docs/atl/reference/ccomclassfactory2-class.md
index ce3062c6e4..6a40fbd71e 100644
--- a/docs/atl/reference/ccomclassfactory2-class.md
+++ b/docs/atl/reference/ccomclassfactory2-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComClassFactory2 Class"
title: "CComClassFactory2 Class"
ms.date: "11/04/2016"
f1_keywords: ["CComClassFactory2", "ATLCOM/ATL::CComClassFactory2", "ATLCOM/ATL::CComClassFactory2::CreateInstance", "ATLCOM/ATL::CComClassFactory2::CreateInstanceLic", "ATLCOM/ATL::CComClassFactory2::GetLicInfo", "ATLCOM/ATL::CComClassFactory2::LockServer", "ATLCOM/ATL::CComClassFactory2::RequestLicKey"]
diff --git a/docs/atl/reference/ccomclassfactoryautothread-class.md b/docs/atl/reference/ccomclassfactoryautothread-class.md
index d785208336..af076db252 100644
--- a/docs/atl/reference/ccomclassfactoryautothread-class.md
+++ b/docs/atl/reference/ccomclassfactoryautothread-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComClassFactoryAutoThread Class"
title: "CComClassFactoryAutoThread Class"
ms.date: "11/04/2016"
f1_keywords: ["CComClassFactoryAutoThread", "ATLCOM/ATL::CComClassFactoryAutoThread", "ATLCOM/ATL::CComClassFactoryAutoThread::CreateInstance", "ATLCOM/ATL::CComClassFactoryAutoThread::LockServer"]
diff --git a/docs/atl/reference/ccomclassfactorysingleton-class.md b/docs/atl/reference/ccomclassfactorysingleton-class.md
index a46f70d061..7559d27a59 100644
--- a/docs/atl/reference/ccomclassfactorysingleton-class.md
+++ b/docs/atl/reference/ccomclassfactorysingleton-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComClassFactorySingleton Class"
title: "CComClassFactorySingleton Class"
ms.date: "11/04/2016"
f1_keywords: ["CComClassFactorySingleton", "ATLCOM/ATL::CComClassFactorySingleton", "ATLCOM/ATL::CComClassFactorySingleton::CreateInstance", "ATLCOM/ATL::CComClassFactorySingleton::m_spObj"]
diff --git a/docs/atl/reference/ccomcoclass-class.md b/docs/atl/reference/ccomcoclass-class.md
index fd521ea7b0..2101a31f89 100644
--- a/docs/atl/reference/ccomcoclass-class.md
+++ b/docs/atl/reference/ccomcoclass-class.md
@@ -1,9 +1,9 @@
---
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
@@ -11,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
@@ -57,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
@@ -100,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,
@@ -129,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,
@@ -142,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
@@ -169,7 +169,7 @@ A standard HRESULT value. For details, see Remarks.
### Remarks
-To call `Error`, your object must implement the `ISupportErrorInfo Interface` interface.
+To call `Error`, your object must implement the `ISupportErrorInfo` interface.
If the *hRes* parameter is nonzero, then `Error` returns the value of *hRes*. If *hRes* is zero, then the first four versions of `Error` return DISP_E_EXCEPTION. The last two versions return the result of the macro **MAKE_HRESULT( 1, FACILITY_ITF,** *nID* **)**.
@@ -177,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();
```
@@ -189,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/ccomcompositecontrol-class.md b/docs/atl/reference/ccomcompositecontrol-class.md
index 482eafac89..d2899ea4af 100644
--- a/docs/atl/reference/ccomcompositecontrol-class.md
+++ b/docs/atl/reference/ccomcompositecontrol-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComCompositeControl Class"
title: "CComCompositeControl Class"
ms.date: "11/04/2016"
f1_keywords: ["CComCompositeControl", "ATLCTL/ATL::CComCompositeControl", "ATLCTL/ATL::CComCompositeControl::CComCompositeControl", "ATLCTL/ATL::CComCompositeControl::AdviseSinkMap", "ATLCTL/ATL::CComCompositeControl::CalcExtent", "ATLCTL/ATL::CComCompositeControl::Create", "ATLCTL/ATL::CComCompositeControl::CreateControlWindow", "ATLCTL/ATL::CComCompositeControl::SetBackgroundColorFromAmbient", "ATLCTL/ATL::CComCompositeControl::m_hbrBackground", "ATLCTL/ATL::CComCompositeControl::m_hWndFocus"]
@@ -99,14 +100,14 @@ True if all controls are to be advised; otherwise false.
### Return Value
-|||
-|-|-|
-|S_OK |All controls in the event sink map were connected or disconnected from their event source successfully.|
-|E_FAIL |Not all controls in the event sink map could be connected or disconnected from their event source successfully.|
-|E_POINTER |This error usually indicates a problem with an entry in the control's event sink map or a problem with a template argument used in an `IDispEventImpl` or `IDispEventSimpleImpl` base class.|
-|CONNECT_E_ADVISELIMIT |The connection point has already reached its limit of connections and cannot accept any more.|
-|CONNECT_E_CANNOTCONNECT |The sink does not support the interface required by this connection point.|
-|CONNECT_E_NOCONNECTION |The cookie value does not represent a valid connection. This error usually indicates a problem with an entry in the control's event sink map or a problem with a template argument used in an `IDispEventImpl` or `IDispEventSimpleImpl` base class.|
+| Value | Description |
+|--|--|
+| `S_OK` | All controls in the event sink map were connected or disconnected from their event source successfully. |
+| `E_FAIL` | Not all controls in the event sink map could be connected or disconnected from their event source successfully. |
+| `E_POINTER` | This error usually indicates a problem with an entry in the control's event sink map or a problem with a template argument used in an `IDispEventImpl` or `IDispEventSimpleImpl` base class. |
+| `CONNECT_E_ADVISELIMIT` | The connection point has already reached its limit of connections and cannot accept any more. |
+| `CONNECT_E_CANNOTCONNECT` | The sink does not support the interface required by this connection point. |
+| `CONNECT_E_NOCONNECTION` | The cookie value does not represent a valid connection. This error usually indicates a problem with an entry in the control's event sink map or a problem with a template argument used in an `IDispEventImpl` or `IDispEventSimpleImpl` base class. |
### Remarks
diff --git a/docs/atl/reference/ccomcontainedobject-class.md b/docs/atl/reference/ccomcontainedobject-class.md
index d2ea040eb6..1f6f7008ce 100644
--- a/docs/atl/reference/ccomcontainedobject-class.md
+++ b/docs/atl/reference/ccomcontainedobject-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComContainedObject Class"
title: "CComContainedObject Class"
ms.date: "11/04/2016"
f1_keywords: ["CComContainedObject", "ATLCOM/ATL::CComContainedObject", "ATLCOM/ATL::CComContainedObject::CComContainedObject", "ATLCOM/ATL::CComContainedObject::AddRef", "ATLCOM/ATL::CComContainedObject::GetControllingUnknown", "ATLCOM/ATL::CComContainedObject::QueryInterface", "ATLCOM/ATL::CComContainedObject::Release"]
diff --git a/docs/atl/reference/ccomcontrol-class.md b/docs/atl/reference/ccomcontrol-class.md
index 4af4e3f7f9..4c3cba00c3 100644
--- a/docs/atl/reference/ccomcontrol-class.md
+++ b/docs/atl/reference/ccomcontrol-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComControl Class"
title: "CComControl Class"
ms.date: "11/04/2016"
f1_keywords: ["CComControl", "ATLCTL/ATL::CComControl", "ATLCTL/ATL::CComControl::CComControl", "ATLCTL/ATL::CComControl::ControlQueryInterface", "ATLCTL/ATL::CComControl::CreateControlWindow", "ATLCTL/ATL::CComControl::FireOnChanged", "ATLCTL/ATL::CComControl::FireOnRequestEdit", "ATLCTL/ATL::CComControl::MessageBox"]
diff --git a/docs/atl/reference/ccomcontrolbase-class.md b/docs/atl/reference/ccomcontrolbase-class.md
index edc35120c0..f65f6c90ee 100644
--- a/docs/atl/reference/ccomcontrolbase-class.md
+++ b/docs/atl/reference/ccomcontrolbase-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComControlBase Class"
title: "CComControlBase Class"
ms.date: "11/04/2016"
f1_keywords: ["CComControlBase", "ATLCTL/ATL::CComControlBase", "ATLCTL/ATL::CComControlBase::AppearanceType", "ATLCTL/ATL::CComControlBase::CComControlBase", "ATLCTL/ATL::CComControlBase::ControlQueryInterface", "ATLCTL/ATL::CComControlBase::DoesVerbActivate", "ATLCTL/ATL::CComControlBase::DoesVerbUIActivate", "ATLCTL/ATL::CComControlBase::DoVerbProperties", "ATLCTL/ATL::CComControlBase::FireViewChange", "ATLCTL/ATL::CComControlBase::GetAmbientAppearance", "ATLCTL/ATL::CComControlBase::GetAmbientAutoClip", "ATLCTL/ATL::CComControlBase::GetAmbientBackColor", "ATLCTL/ATL::CComControlBase::GetAmbientCharSet", "ATLCTL/ATL::CComControlBase::GetAmbientCodePage", "ATLCTL/ATL::CComControlBase::GetAmbientDisplayAsDefault", "ATLCTL/ATL::CComControlBase::GetAmbientDisplayName", "ATLCTL/ATL::CComControlBase::GetAmbientFont", "ATLCTL/ATL::CComControlBase::GetAmbientFontDisp", "ATLCTL/ATL::CComControlBase::GetAmbientForeColor", "ATLCTL/ATL::CComControlBase::GetAmbientLocaleID", "ATLCTL/ATL::CComControlBase::GetAmbientMessageReflect", "ATLCTL/ATL::CComControlBase::GetAmbientPalette", "ATLCTL/ATL::CComControlBase::GetAmbientProperty", "ATLCTL/ATL::CComControlBase::GetAmbientRightToLeft", "ATLCTL/ATL::CComControlBase::GetAmbientScaleUnits", "ATLCTL/ATL::CComControlBase::GetAmbientShowGrabHandles", "ATLCTL/ATL::CComControlBase::GetAmbientShowHatching", "ATLCTL/ATL::CComControlBase::GetAmbientSupportsMnemonics", "ATLCTL/ATL::CComControlBase::GetAmbientTextAlign", "ATLCTL/ATL::CComControlBase::GetAmbientTopToBottom", "ATLCTL/ATL::CComControlBase::GetAmbientUIDead", "ATLCTL/ATL::CComControlBase::GetAmbientUserMode", "ATLCTL/ATL::CComControlBase::GetDirty", "ATLCTL/ATL::CComControlBase::GetZoomInfo", "ATLCTL/ATL::CComControlBase::InPlaceActivate", "ATLCTL/ATL::CComControlBase::InternalGetSite", "ATLCTL/ATL::CComControlBase::OnDraw", "ATLCTL/ATL::CComControlBase::OnDrawAdvanced", "ATLCTL/ATL::CComControlBase::OnKillFocus", "ATLCTL/ATL::CComControlBase::OnMouseActivate", "ATLCTL/ATL::CComControlBase::OnPaint", "ATLCTL/ATL::CComControlBase::OnSetFocus", "ATLCTL/ATL::CComControlBase::PreTranslateAccelerator", "ATLCTL/ATL::CComControlBase::SendOnClose", "ATLCTL/ATL::CComControlBase::SendOnDataChange", "ATLCTL/ATL::CComControlBase::SendOnRename", "ATLCTL/ATL::CComControlBase::SendOnSave", "ATLCTL/ATL::CComControlBase::SendOnViewChange", "ATLCTL/ATL::CComControlBase::SetControlFocus", "ATLCTL/ATL::CComControlBase::SetDirty", "ATLCTL/ATL::CComControlBase::m_bAutoSize", "ATLCTL/ATL::CComControlBase::m_bDrawFromNatural", "ATLCTL/ATL::CComControlBase::m_bDrawGetDataInHimetric", "ATLCTL/ATL::CComControlBase::m_bInPlaceActive", "ATLCTL/ATL::CComControlBase::m_bInPlaceSiteEx", "ATLCTL/ATL::CComControlBase::m_bNegotiatedWnd", "ATLCTL/ATL::CComControlBase::m_bRecomposeOnResize", "ATLCTL/ATL::CComControlBase::m_bRequiresSave", "ATLCTL/ATL::CComControlBase::m_bResizeNatural", "ATLCTL/ATL::CComControlBase::m_bUIActive", "ATLCTL/ATL::CComControlBase::m_bUsingWindowRgn", "ATLCTL/ATL::CComControlBase::m_bWasOnceWindowless", "ATLCTL/ATL::CComControlBase::m_bWindowOnly", "ATLCTL/ATL::CComControlBase::m_bWndLess", "ATLCTL/ATL::CComControlBase::m_hWndCD", "ATLCTL/ATL::CComControlBase::m_nFreezeEvents", "ATLCTL/ATL::CComControlBase::m_rcPos", "ATLCTL/ATL::CComControlBase::m_sizeExtent", "ATLCTL/ATL::CComControlBase::m_sizeNatural", "ATLCTL/ATL::CComControlBase::m_spAdviseSink", "ATLCTL/ATL::CComControlBase::m_spAmbientDispatch", "ATLCTL/ATL::CComControlBase::m_spClientSite", "ATLCTL/ATL::CComControlBase::m_spDataAdviseHolder", "ATLCTL/ATL::CComControlBase::m_spInPlaceSite", "ATLCTL/ATL::CComControlBase::m_spOleAdviseHolder"]
@@ -251,7 +252,7 @@ One of the standard HRESULT values.
### Example
[!code-cpp[NVC_ATL_COM#19](../../atl/codesnippet/cpp/ccomcontrolbase-class_2.cpp)]
-
+
[!code-cpp[NVC_ATL_COM#20](../../atl/codesnippet/cpp/ccomcontrolbase-class_3.h)]
## CComControlBase::FireViewChange
diff --git a/docs/atl/reference/ccomcriticalsection-class.md b/docs/atl/reference/ccomcriticalsection-class.md
index 39822f74d3..7ee8d73ac5 100644
--- a/docs/atl/reference/ccomcriticalsection-class.md
+++ b/docs/atl/reference/ccomcriticalsection-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComCriticalSection Class"
title: "CComCriticalSection Class"
ms.date: "11/04/2016"
f1_keywords: ["CComCriticalSection", "ATLCORE/ATL::CComCriticalSection", "ATLCORE/ATL::CComCriticalSection::CComCriticalSection", "ATLCORE/ATL::CComCriticalSection::Init", "ATLCORE/ATL::CComCriticalSection::Lock", "ATLCORE/ATL::CComCriticalSection::Term", "ATLCORE/ATL::CComCriticalSection::Unlock", "ATLCORE/ATL::CComCriticalSection::m_sec"]
diff --git a/docs/atl/reference/ccomcritseclock-class.md b/docs/atl/reference/ccomcritseclock-class.md
index 0b75b14467..726f3bc79c 100644
--- a/docs/atl/reference/ccomcritseclock-class.md
+++ b/docs/atl/reference/ccomcritseclock-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComCritSecLock Class"
title: "CComCritSecLock Class"
ms.date: "11/04/2016"
f1_keywords: ["CComCritSecLock", "ATLBASE/ATL::CComCritSecLock", "ATLBASE/ATL::CComCritSecLock::CComCritSecLock", "ATLBASE/ATL::CComCritSecLock::Lock", "ATLBASE/ATL::CComCritSecLock::Unlock"]
diff --git a/docs/atl/reference/ccomcurrency-class.md b/docs/atl/reference/ccomcurrency-class.md
index 61526c0191..cee7bfd016 100644
--- a/docs/atl/reference/ccomcurrency-class.md
+++ b/docs/atl/reference/ccomcurrency-class.md
@@ -1,92 +1,92 @@
---
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
+# `CComCurrency` Class
-`CComCurrency` has methods and operators for creating and managing a CURRENCY object.
+`CComCurrency` has methods and operators for creating and managing a `CURRENCY` object.
## Syntax
-```
-class CComCurrency
+```cpp
+class CComCurrency;
```
## Members
-### Public Constructors
-
-|Name|Description|
-|----------|-----------------|
-|[CComCurrency::CComCurrency](#ccomcurrency)|The constructor for a `CComCurrency` object.|
-
-### Public Methods
-
-|Name|Description|
-|----------|-----------------|
-|[CComCurrency::GetCurrencyPtr](#getcurrencyptr)|Returns the address of an `m_currency` data member.|
-|[CComCurrency::GetFraction](#getfraction)|Call this method to return the fractional component of a `CComCurrency` object.|
-|[CComCurrency::GetInteger](#getinteger)|Call this method to return the integer component of a `CComCurrency` object.|
-|[CComCurrency::Round](#round)|Call this method to round a `CComCurrency` object to the nearest integer value.|
-|[CComCurrency::SetFraction](#setfraction)|Call this method to set the fractional component of a `CComCurrency` object.|
-|[CComCurrency::SetInteger](#setinteger)|Call this method to set the integer component of a `CComCurrency` object.|
-
-### Public Operators
-
-|Name|Description|
-|----------|-----------------|
-|[CComCurrency::operator -](#operator_-)|This operator is used to perform subtraction on a `CComCurrency` object.|
-|[CComCurrency::operator !=](#operator_neq)|Compares two `CComCurrency` objects for inequality.|
-|[CComCurrency::operator *](#operator_star)|This operator is used to perform multiplication on a `CComCurrency` object.|
-|[CComCurrency::operator *=](#operator_star_eq)|This operator is used to perform multiplication on a `CComCurrency` object and assign it the result.|
-|[CComCurrency::operator /](#operator_div)|This operator is used to perform division on a `CComCurrency` object.|
-|[CComCurrency::operator /=](#operator_div_eq)|This operator is used to perform division on a `CComCurrency` object and assign it the result.|
-|[CComCurrency::operator +](#operator_add)|This operator is used to perform addition on a `CComCurrency` object.|
-|[CComCurrency::operator +=](#operator_add_eq)|This operator is used to perform addition on a `CComCurrency` object and assign the result to the current object.|
-|[CComCurrency::operator <](#operator_lt)|This operator compares two `CComCurrency` objects to determine the lesser.|
-|[CComCurrency::operator <=](#operator_lt_eq)|This operator compares two `CComCurrency` objects to determine equality or the lesser.|
-|[CComCurrency::operator =](#operator_eq)|This operator assigns the `CComCurrency` object to a new value.|
-|[CComCurrency::operator -=](#operator_-_eq)|This operator is used to perform subtraction on a `CComCurrency` object and assign it the result.|
-|[CComCurrency::operator ==](#operator_eq_eq)|This operator compares two `CComCurrency` objects for equality.|
-|[CComCurrency::operator >](#operator_gt)|This operator compares two `CComCurrency` objects to determine the larger.|
-|[CComCurrency::operator >=](#operator_gt_eq)|This operator compares two `CComCurrency` objects to determine equality or the larger.|
-|[CComCurrency::operator CURRENCY](#operator_currency)|Casts a CURRENCY object.|
-
-### Public Data Members
-
-|Name|Description|
-|----------|-----------------|
-|[CComCurrency::m_currency](#m_currency)|The CURRENCY variable created by your class instance.|
+### Public constructors
+
+| Name | Description |
+|--|--|
+| [`CComCurrency::CComCurrency`](#ccomcurrency) | The constructor for a `CComCurrency` object. |
+
+### Public methods
+
+| Name | Description |
+|--|--|
+| [`CComCurrency::GetCurrencyPtr`](#getcurrencyptr) | Returns the address of an `m_currency` data member. |
+| [`CComCurrency::GetFraction`](#getfraction) | Call this method to return the fractional component of a `CComCurrency` object. |
+| [`CComCurrency::GetInteger`](#getinteger) | Call this method to return the integer component of a `CComCurrency` object. |
+| [`CComCurrency::Round`](#round) | Call this method to round a `CComCurrency` object to the nearest integer value. |
+| [`CComCurrency::SetFraction`](#setfraction) | Call this method to set the fractional component of a `CComCurrency` object. |
+| [`CComCurrency::SetInteger`](#setinteger) | Call this method to set the integer component of a `CComCurrency` object. |
+
+### Public operators
+
+| Name | Description |
+|--|--|
+| [`CComCurrency::operator -`](#operator_-) | This operator is used to perform subtraction on a `CComCurrency` object. |
+| [`CComCurrency::operator !=`](#operator_neq) | Compares two `CComCurrency` objects for inequality. |
+| [`CComCurrency::operator *`](#operator_star) | This operator is used to perform multiplication on a `CComCurrency` object. |
+| [`CComCurrency::operator *=`](#operator_star_eq) | This operator is used to perform multiplication on a `CComCurrency` object and assign it the result. |
+| [`CComCurrency::operator /`](#operator_div) | This operator is used to perform division on a `CComCurrency` object. |
+| [`CComCurrency::operator /=`](#operator_div_eq) | This operator is used to perform division on a `CComCurrency` object and assign it the result. |
+| [`CComCurrency::operator +`](#operator_add) | This operator is used to perform addition on a `CComCurrency` object. |
+| [`CComCurrency::operator +=`](#operator_add_eq) | This operator is used to perform addition on a `CComCurrency` object and assign the result to the current object. |
+| [`CComCurrency::operator <`](#operator_lt) | This operator compares two `CComCurrency` objects to determine the lesser. |
+| [`CComCurrency::operator <=`](#operator_lt_eq) | This operator compares two `CComCurrency` objects to determine equality or the lesser. |
+| [`CComCurrency::operator =`](#operator_eq) | This operator assigns the `CComCurrency` object to a new value. |
+| [`CComCurrency::operator -=`](#operator_-_eq) | This operator is used to perform subtraction on a `CComCurrency` object and assign it the result. |
+| [`CComCurrency::operator ==`](#operator_eq_eq) | This operator compares two `CComCurrency` objects for equality. |
+| [`CComCurrency::operator >`](#operator_gt) | This operator compares two `CComCurrency` objects to determine the larger. |
+| [`CComCurrency::operator >=`](#operator_gt_eq) | This operator compares two `CComCurrency` objects to determine equality or the larger. |
+| [`CComCurrency::operator CURRENCY`](#operator_currency) | Casts a `CURRENCY` object. |
+
+### Public data members
+
+| Name | Description |
+|--|--|
+| [`CComCurrency::m_currency`](#m_currency) | The `CURRENCY` variable created by your class instance. |
## Remarks
-`CComCurrency` is a wrapper for the CURRENCY data type. CURRENCY is implemented as an 8-byte two's-complement integer value scaled by 10,000. This gives a fixed-point number with 15 digits to the left of the decimal point and 4 digits to the right. The CURRENCY data type is extremely useful for calculations involving money, or for any fixed-point calculations where accuracy is important.
+`CComCurrency` is a wrapper for the `CURRENCY` data type. `CURRENCY` is implemented as an 8-byte two's-complement integer value scaled by 10,000. This scaling gives a fixed-point number with 15 digits left of the decimal point and 4 digits to the right. The `CURRENCY` data type is useful for calculations involving money, or for any fixed-point calculations where accuracy is important.
The `CComCurrency` wrapper implements arithmetic, assignment, and comparison operations for this fixed-point type. The supported applications have been selected to control the rounding errors that can occur during fixed-point calculations.
-The `CComCurrency` object provides access to the numbers on either side of the decimal point in the form of two components: an integer component which stores the value to the left of the decimal point, and a fractional component which stores the value to the right of the decimal point. The fractional component is stored internally as an integer value between -9999 (CY_MIN_FRACTION) and +9999 (CY_MAX_FRACTION). The method [CComCurrency::GetFraction](#getfraction) returns a value scaled by a factor of 10000 (CY_SCALE).
+The `CComCurrency` object provides access to the numbers on either side of the decimal point in the form of two components: an integer component, which stores the value to the left of the decimal point, and a fractional component, which stores the value to the right of the decimal point. The fractional component is stored internally as an integer value between -9999 (`CY_MIN_FRACTION`) and +9999 (`CY_MAX_FRACTION`). The method [`CComCurrency::GetFraction`](#getfraction) returns a value scaled by a factor of 10000 (`CY_SCALE`).
-When specifying the integer and fractional components of a `CComCurrency` object, remember that the fractional component is a number in the range 0 to 9999. This is important when dealing with a currency such as the US dollar that expresses amounts using only two significant digits after the decimal point. Even though the last two digits are not displayed, they must be taken into account.
+When specifying the integer and fractional components of a `CComCurrency` object, remember that the fractional component is a number in the range 0 to 9999. This consideration is important when dealing with a currency such as the US dollar. Dollar amounts are commonly expressed using only two significant digits after the decimal point. Even though the last two digits aren't displayed, they must be taken into account.
-|Value|Possible CComCurrency assignments|
-|-----------|---------------------------------------|
-|$10.50|CComCurrency(10,5000) *or* CComCurrency(10.50)|
-|$10.05|CComCurrency(10,500) *or* CComCurrency(10.05)|
+| Value | Possible CComCurrency assignments |
+|--|--|
+| $10.50 | `CComCurrency(10,5000)` or `CComCurrency(10.50)` |
+| $10.05 | `CComCurrency(10,500)` or `CComCurrency(10.05)` |
-The values CY_MIN_FRACTION, CY_MAX_FRACTION, and CY_SCALE are defined in atlcur.h.
+The values `CY_MIN_FRACTION`, `CY_MAX_FRACTION`, and `CY_SCALE` are defined in atlcur.h.
## Requirements
**Header:** atlcur.h
-## CComCurrency::CComCurrency
+## `CComCurrency::CComCurrency`
The constructor.
-```
+```cpp
CComCurrency() throw();
CComCurrency(const CComCurrency& curSrc) throw();
CComCurrency(CURRENCY cySrc) throw();
@@ -108,79 +108,79 @@ explicit CComCurrency(LPCSTR szSrc);
### Parameters
-*curSrc*
+*`curSrc`*\
An existing `CComCurrency` object.
-*cySrc*
-A variable of type CURRENCY.
+*`cySrc`*\
+A variable of type `CURRENCY`.
-*bSrc*, *dSrc*, *fSrc*, *lSrc*, *sSrc*, *ulSrc, usSrc*
+*`bSrc`*, *`dSrc`*, *`fSrc`*, *`lSrc`*, *`sSrc`*, *`ulSrc`*, *`usSrc`*\
The initial value given to the member variable `m_currency`.
-*cSrc*
+*`cSrc`*\
A character containing the initial value given to the member variable `m_currency`.
-*nInteger*, *nFraction*
-The integer and fractional components of the initial monetary value. See the [CComCurrency](../../atl/reference/ccomcurrency-class.md) overview for more information.
+*`nInteger`*, *`nFraction`*\
+The initial monetary value's integer and fractional components. For more information, see the [`CComCurrency`](../../atl/reference/ccomcurrency-class.md) overview.
-*pDispSrc*
+*`pDispSrc`*\
An `IDispatch` pointer.
-*varSrc*
-A variable of type VARIANT. The locale of the current thread is used to perform the conversion.
+*`varSrc`*\
+A variable of type `VARIANT`. The locale of the current thread is used to perform the conversion.
-*szSrc*
+*`szSrc`*\
A Unicode or ANSI string containing the initial value. The locale of the current thread is used to perform the conversion.
### Remarks
-The constructor sets the initial value of [CComCurrency::m_currency](#m_currency), and accepts a wide range of data types, including integers, strings, floating-point numbers, CURRENCY variables, and other `CComCurrency` objects. If no value is provided, `m_currency` is set to 0.
+The constructor sets the initial value of [`CComCurrency::m_currency`](#m_currency), and accepts a wide range of data types, including integers, strings, floating-point numbers, `CURRENCY` variables, and other `CComCurrency` objects. If no value is provided, `m_currency` is set to 0.
-In the event of an error, such as an overflow, the constructors lacking an empty exception specification (**throw()**) call `AtlThrow` with an HRESULT describing the error.
+If there's an error, such as an overflow, the constructors lacking an empty exception specification (**`throw()`**) call `AtlThrow` with an `HRESULT` describing the error.
-When using floating-point or double values to assign a value, note that `CComCurrency(10.50)` is equivalent to `CComCurrency(10,5000)` and not `CComCurrency(10,50)`.
+When using floating-point or double values to assign a value, remember that `CComCurrency(10.50)` is equivalent to `CComCurrency(10,5000)`, and not `CComCurrency(10,50)`.
-## CComCurrency::GetCurrencyPtr
+## `CComCurrency::GetCurrencyPtr`
Returns the address of an `m_currency` data member.
-```
+```cpp
CURRENCY* GetCurrencyPtr() throw();
```
-### Return Value
+### Return value
Returns the address of an `m_currency` data member
-## CComCurrency::GetFraction
+## `CComCurrency::GetFraction`
Call this method to return the fractional component of the `CComCurrency` object.
-```
+```cpp
SHORT GetFraction() const;
```
-### Return Value
+### Return value
Returns the fractional component of the `m_currency` data member.
### Remarks
-The fractional component is a 4-digit integer value between -9999 (CY_MIN_FRACTION) and +9999 (CY_MAX_FRACTION). `GetFraction` returns this value scaled by 10000 (CY_SCALE). The values of CY_MIN_FRACTION, CY_MAX_FRACTION, and CY_SCALE are defined in atlcur.h.
+The fractional component is a 4-digit integer value between -9999 (`CY_MIN_FRACTION`) and +9999 (`CY_MAX_FRACTION`). `GetFraction` returns this value scaled by 10000 (`CY_SCALE`). The values of `CY_MIN_FRACTION`, `CY_MAX_FRACTION`, and `CY_SCALE` are defined in atlcur.h.
### Example
[!code-cpp[NVC_ATL_Utilities#50](../../atl/codesnippet/cpp/ccomcurrency-class_1.cpp)]
-## CComCurrency::GetInteger
+## `CComCurrency::GetInteger`
Call this method to get the integer component of a `CComCurrency` object.
-```
+```cpp
LONGLONG GetInteger() const;
```
-### Return Value
+### Return value
Returns the integer component of the `m_currency` data member.
@@ -188,11 +188,11 @@ Returns the integer component of the `m_currency` data member.
[!code-cpp[NVC_ATL_Utilities#51](../../atl/codesnippet/cpp/ccomcurrency-class_2.cpp)]
-## CComCurrency::m_currency
+## `CComCurrency::m_currency`
-The CURRENCY data member.
+The `CURRENCY` data member.
-```
+```cpp
CURRENCY m_currency;
```
@@ -200,113 +200,113 @@ CURRENCY m_currency;
This member holds the currency accessed and manipulated by the methods of this class.
-## CComCurrency::operator -
+## `CComCurrency::operator -`
This operator is used to perform subtraction on a `CComCurrency` object.
-```
+```cpp
CComCurrency operator-() const;
CComCurrency operator-(const CComCurrency& cur) const;
```
### Parameters
-*cur*
+*`cur`*\
A `CComCurrency` object.
-### Return Value
+### Return value
-Returns a `CComCurrency` object representing the result of the subtraction. In the event of an error, such as an overflow, this operator calls `AtlThrow` with an HRESULT describing the error.
+Returns a `CComCurrency` object representing the result of the subtraction. If there's an error, such as an overflow, this operator calls `AtlThrow` with an `HRESULT` describing the error.
### Example
[!code-cpp[NVC_ATL_Utilities#55](../../atl/codesnippet/cpp/ccomcurrency-class_3.cpp)]
-## CComCurrency::operator !=
+## `CComCurrency::operator !=`
This operator compares two objects for inequality.
-```
+```cpp
bool operator!= (const CComCurrency& cur) const;
```
### Parameters
-*cur*
+*`cur`*\
The `CComCurrency` object to be compared.
-### Return Value
+### Return value
-Returns TRUE if the item being compared is not equal to the `CComCurrency` object; otherwise, FALSE.
+Returns `TRUE` if the item being compared isn't equal to the `CComCurrency` object; otherwise, `FALSE`.
### Example
[!code-cpp[NVC_ATL_Utilities#56](../../atl/codesnippet/cpp/ccomcurrency-class_4.cpp)]
-## CComCurrency::operator *
+## `CComCurrency::operator *`
This operator is used to perform multiplication on a `CComCurrency` object.
-```
+```cpp
CComCurrency operator*(long nOperand) const;
CComCurrency operator*(const CComCurrency& cur) const;
```
### Parameters
-*nOperand*
+*`nOperand`*\
The multiplier.
-*cur*
+*`cur`*\
The `CComCurrency` object used as the multiplier.
-### Return Value
+### Return value
-Returns a `CComCurrency` object representing the result of the multiplication. In the event of an error, such as an overflow, this operator calls `AtlThrow` with an HRESULT describing the error.
+Returns a `CComCurrency` object representing the result of the multiplication. If there's an error, such as an overflow, this operator calls `AtlThrow` with an `HRESULT` describing the error.
### Example
[!code-cpp[NVC_ATL_Utilities#57](../../atl/codesnippet/cpp/ccomcurrency-class_5.cpp)]
-## CComCurrency::operator \*=
+## `CComCurrency::operator *=`
This operator is used to perform multiplication on a `CComCurrency` object and assign it the result.
-```
+```cpp
const CComCurrency& operator*= (long nOperand);
const CComCurrency& operator*= (const CComCurrency& cur);
```
### Parameters
-*nOperand*
+*`nOperand`*\
The multiplier.
-*cur*
+*`cur`*\
The `CComCurrency` object used as the multiplier.
-### Return Value
+### Return value
-Returns the updated `CComCurrency` object. In the event of an error, such as an overflow, this operator calls `AtlThrow` with an HRESULT describing the error.
+Returns the updated `CComCurrency` object. If there's an error, such as an overflow, this operator calls `AtlThrow` with an `HRESULT` describing the error.
### Example
[!code-cpp[NVC_ATL_Utilities#58](../../atl/codesnippet/cpp/ccomcurrency-class_6.cpp)]
-## CComCurrency::operator /
+## `CComCurrency::operator /`
This operator is used to perform division on a `CComCurrency` object.
-```
+```cpp
CComCurrency operator/(long nOperand) const;
```
### Parameters
-*nOperand*
+*`nOperand`*\
The divisor.
-### Return Value
+### Return value
Returns a `CComCurrency` object representing the result of the division. If the divisor is 0, an assert failure will occur.
@@ -314,20 +314,20 @@ Returns a `CComCurrency` object representing the result of the division. If the
[!code-cpp[NVC_ATL_Utilities#59](../../atl/codesnippet/cpp/ccomcurrency-class_7.cpp)]
-## CComCurrency::operator /=
+## `CComCurrency::operator /=`
This operator is used to perform division on a `CComCurrency` object and assign it the result.
-```
+```cpp
const CComCurrency& operator/= (long nOperand);
```
### Parameters
-*nOperand*
+*`nOperand`*\
The divisor.
-### Return Value
+### Return value
Returns the updated `CComCurrency` object. If the divisor is 0, an assert failure will occur.
@@ -335,95 +335,95 @@ Returns the updated `CComCurrency` object. If the divisor is 0, an assert failur
[!code-cpp[NVC_ATL_Utilities#60](../../atl/codesnippet/cpp/ccomcurrency-class_8.cpp)]
-## CComCurrency::operator +
+## `CComCurrency::operator +`
This operator is used to perform addition on a `CComCurrency` object.
-```
+```cpp
CComCurrency operator+(const CComCurrency& cur) const;
```
### Parameters
-*cur*
+*`cur`*\
The `CComCurrency` object to be added to the original object.
-### Return Value
+### Return value
-Returns a `CComCurrency` object representing the result of the addition. In the event of an error, such as an overflow, this operator calls `AtlThrow` with an HRESULT describing the error.
+Returns a `CComCurrency` object representing the result of the addition. If there's an error, such as an overflow, this operator calls `AtlThrow` with an `HRESULT` describing the error.
### Example
[!code-cpp[NVC_ATL_Utilities#61](../../atl/codesnippet/cpp/ccomcurrency-class_9.cpp)]
-## CComCurrency::operator +=
+## `CComCurrency::operator +=`
This operator is used to perform addition on a `CComCurrency` object and assign the result to the current object.
-```
+```cpp
const CComCurrency& operator+= (const CComCurrency& cur);
```
### Parameters
-*cur*
+*`cur`*\
The `CComCurrency` object.
-### Return Value
+### Return value
-Returns the updated `CComCurrency` object. In the event of an error, such as an overflow, this operator calls `AtlThrow` with an HRESULT describing the error.
+Returns the updated `CComCurrency` object. If there's an error, such as an overflow, this operator calls `AtlThrow` with an `HRESULT` describing the error.
### Example
[!code-cpp[NVC_ATL_Utilities#62](../../atl/codesnippet/cpp/ccomcurrency-class_10.cpp)]
-## CComCurrency::operator <
+## `CComCurrency::operator <`
This operator compares two `CComCurrency` objects to determine the lesser.
-```
+```cpp
bool operator<(const CComCurrency& cur) const;
```
### Parameters
-*cur*
+*`cur`*\
A `CComCurrency` object.
-### Return Value
+### Return value
-Returns TRUE if the first object is less than the second, FALSE otherwise.
+Returns `TRUE` if the first object is less than the second, `FALSE` otherwise.
### Example
[!code-cpp[NVC_ATL_Utilities#63](../../atl/codesnippet/cpp/ccomcurrency-class_11.cpp)]
-## CComCurrency::operator <=
+## `CComCurrency::operator <=`
This operator compares two `CComCurrency` objects to determine equality or the lesser.
-```
+```cpp
bool operator<= (const CComCurrency& cur) const;
```
### Parameters
-*cur*
+*`cur`*\
A `CComCurrency` object.
-### Return Value
+### Return value
-Returns TRUE if the first object is less than or equal to the second, FALSE otherwise.
+Returns `TRUE` if the first object is less than or equal to the second, `FALSE` otherwise.
### Example
[!code-cpp[NVC_ATL_Utilities#64](../../atl/codesnippet/cpp/ccomcurrency-class_12.cpp)]
-## CComCurrency::operator =
+## `CComCurrency::operator =`
This operator assigns the `CComCurrency` object to a new value.
-```
+```cpp
const CComCurrency& operator= (const CComCurrency& curSrc) throw();
const CComCurrency& operator= (CURRENCY cySrc) throw();
const CComCurrency& operator= (FLOAT fSrc);
@@ -439,184 +439,184 @@ const CComCurrency& operator= (DECIMAL dSrc);
### Parameters
-*curSrc*
+*`curSrc`*\
A `CComCurrency` object.
-*cySrc*
-A variable of type CURRENCY.
+*`cySrc`*\
+A variable of type `CURRENCY`.
-*sSrc*, *fSrc*, *lSrc*, *bSrc*, *usSrc*, *dSrc*, *cSrc*, *ulSrc*, *dSrc*
+*`sSrc`*, *`fSrc`*, *`lSrc`*, *`bSrc`*, *`usSrc`*, *`dSrc`*, *`cSrc`*, *`ulSrc`*, *`dSrc`*\
The numeric value to assign to the `CComCurrency` object.
-### Return Value
+### Return value
-Returns the updated `CComCurrency` object. In the event of an error, such as an overflow, this operator calls `AtlThrow` with an HRESULT describing the error.
+Returns the updated `CComCurrency` object. If there's an error, such as an overflow, this operator calls `AtlThrow` with an `HRESULT` describing the error.
### Example
[!code-cpp[NVC_ATL_Utilities#65](../../atl/codesnippet/cpp/ccomcurrency-class_13.cpp)]
-## CComCurrency::operator -=
+## `CComCurrency::operator -=`
This operator is used to perform subtraction on a `CComCurrency` object and assign it the result.
-```
+```cpp
const CComCurrency& operator-= (const CComCurrency& cur);
```
### Parameters
-*cur*
+*`cur`*\
A `CComCurrency` object.
-### Return Value
+### Return value
-Returns the updated `CComCurrency` object. In the event of an error, such as an overflow, this operator calls `AtlThrow` with an HRESULT describing the error.
+Returns the updated `CComCurrency` object. If there's an error, such as an overflow, this operator calls `AtlThrow` with an `HRESULT` describing the error.
### Example
[!code-cpp[NVC_ATL_Utilities#66](../../atl/codesnippet/cpp/ccomcurrency-class_14.cpp)]
-## CComCurrency::operator ==
+## `CComCurrency::operator ==`
This operator compares two `CComCurrency` objects for equality.
-```
+```cpp
bool operator== (const CComCurrency& cur) const;
```
### Parameters
-*cur*
+*`cur`*\
The `CComCurrency` object to compare.
-### Return Value
+### Return value
-Returns TRUE if the objects are equal (that is, the `m_currency` data members, both integer and fractional, in both objects have the same value), FALSE otherwise.
+Returns `TRUE` if the objects are equal (that is, the `m_currency` data members, both integer and fractional, in both objects have the same value), `FALSE` otherwise.
### Example
[!code-cpp[NVC_ATL_Utilities#67](../../atl/codesnippet/cpp/ccomcurrency-class_15.cpp)]
-## CComCurrency::operator >
+## `CComCurrency::operator >`
This operator compares two `CComCurrency` objects to determine the larger.
-```
+```cpp
bool operator>(const CComCurrency& cur) const;
```
### Parameters
-*cur*
+*`cur`*\
A `CComCurrency` object.
-### Return Value
+### Return value
-Returns TRUE if the first object is greater than the second, FALSE otherwise.
+Returns `TRUE` if the first object is greater than the second, `FALSE` otherwise.
### Example
[!code-cpp[NVC_ATL_Utilities#68](../../atl/codesnippet/cpp/ccomcurrency-class_16.cpp)]
-## CComCurrency::operator >=
+## `CComCurrency::operator >=`
This operator compares two `CComCurrency` objects to determine equality or the larger.
-```
+```cpp
bool operator>= (const CComCurrency& cur) const;
```
### Parameters
-*cur*
+*`cur`*\
A `CComCurrency` object.
-### Return Value
+### Return value
-Returns TRUE if the first object is greater than or equal to the second, FALSE otherwise.
+Returns `TRUE` if the first object is greater than or equal to the second, `FALSE` otherwise.
### Example
[!code-cpp[NVC_ATL_Utilities#69](../../atl/codesnippet/cpp/ccomcurrency-class_17.cpp)]
-## CComCurrency::operator CURRENCY
+## `CComCurrency::operator CURRENCY`
-These operators are used to cast a `CComCurrency` object to a CURRENCY data type.
+These operators are used to cast a `CComCurrency` object to a `CURRENCY` data type.
-```
+```cpp
operator CURRENCY&() throw();
operator const CURRENCY&() const throw();
```
-### Return Value
+### Return value
-Returns a reference to a CURRENCY object.
+Returns a reference to a `CURRENCY` object.
### Example
[!code-cpp[NVC_ATL_Utilities#70](../../atl/codesnippet/cpp/ccomcurrency-class_18.cpp)]
-## CComCurrency::Round
+## `CComCurrency::Round`
Call this method to round the currency to a specified number of decimal places.
-```
-HRESULT Roundint nDecimals);
+```cpp
+HRESULT Round(int nDecimals);
```
### Parameters
-*nDecimals*
+*`nDecimals`*\
The number of digits to which `m_currency` will be rounded, in the range 0 to 4.
-### Return Value
+### Return value
-Returns S_OK on success, or an error HRESULT on failure.
+Returns `S_OK` on success, or an error `HRESULT` on failure.
### Example
[!code-cpp[NVC_ATL_Utilities#52](../../atl/codesnippet/cpp/ccomcurrency-class_19.cpp)]
-## CComCurrency::SetFraction
+## `CComCurrency::SetFraction`
Call this method to set the fractional component of a `CComCurrency` object.
-```
+```cpp
HRESULT SetFraction(SHORT nFraction);
```
### Parameters
-*nFraction*
-The value to be assigned to the fractional component of the `m_currency` data member. The sign of the fractional component must the same as the integer component, and the value must be in range -9999 (CY_MIN_FRACTION) to +9999 (CY_MAX_FRACTION).
+*`nFraction`*\
+The value to assign to the fractional component of the `m_currency` data member. The sign of the fractional component must be the same as the integer component, and the value must be in the range -9999 (`CY_MIN_FRACTION`) to +9999 (`CY_MAX_FRACTION`).
-### Return Value
+### Return value
-Returns S_OK on success, or an error HRESULT on failure.
+Returns `S_OK` on success, or an error `HRESULT` on failure.
### Example
[!code-cpp[NVC_ATL_Utilities#53](../../atl/codesnippet/cpp/ccomcurrency-class_20.cpp)]
-## CComCurrency::SetInteger
+## `CComCurrency::SetInteger`
Call this method to set the integer component of a `CComCurrency` object.
-```
+```cpp
HRESULT SetInteger(LONGLONG nInteger);
```
### Parameters
-*nInteger*
+*`nInteger`*\
The value to be assigned to the integer component of the `m_currency` data member. The sign of the integer component must match the sign of the existing fractional component.
-*nInteger* must be in the range CY_MIN_INTEGER to CY_MAX_INTEGER inclusive. These values are defined in atlcur.h.
+*`nInteger`* must be in the range `CY_MIN_INTEGER` to `CY_MAX_INTEGER`, inclusive. These values are defined in atlcur.h.
-### Return Value
+### Return value
-Returns S_OK on success, or an error HRESULT on failure.
+Returns `S_OK` on success, or an error `HRESULT` on failure.
### Example
@@ -624,6 +624,6 @@ Returns S_OK on success, or an error HRESULT on failure.
## See also
-[COleCurrency Class](../../mfc/reference/colecurrency-class.md)
-[CURRENCY](/windows/win32/api/wtypes/ns-wtypes-cy-r1)
-[Class Overview](../../atl/atl-class-overview.md)
+[`COleCurrency` class](../../mfc/reference/colecurrency-class.md)\
+[`CURRENCY`](/windows/win32/api/wtypes/ns-wtypes-cy-r1)\
+[Class overview](../../atl/atl-class-overview.md)
diff --git a/docs/atl/reference/ccomdynamicunkarray-class.md b/docs/atl/reference/ccomdynamicunkarray-class.md
index 3746b309ff..682edba816 100644
--- a/docs/atl/reference/ccomdynamicunkarray-class.md
+++ b/docs/atl/reference/ccomdynamicunkarray-class.md
@@ -1,9 +1,9 @@
---
title: "CComDynamicUnkArray Class"
-ms.date: "11/04/2016"
+description: "Learn more about: CComDynamicUnkArray Class"
+ms.date: 11/04/2016
f1_keywords: ["CComDynamicUnkArray", "ATLCOM/ATL::CComDynamicUnkArray", "ATLCOM/ATL::CComDynamicUnkArray::CComDynamicUnkArray", "ATLCOM/ATL::CComDynamicUnkArray::Add", "ATLCOM/ATL::CComDynamicUnkArray::begin", "ATLCOM/ATL::CComDynamicUnkArray::clear", "ATLCOM/ATL::CComDynamicUnkArray::end", "ATLCOM/ATL::CComDynamicUnkArray::GetAt", "ATLCOM/ATL::CComDynamicUnkArray::GetCookie", "ATLCOM/ATL::CComDynamicUnkArray::GetSize", "ATLCOM/ATL::CComDynamicUnkArray::GetUnknown", "ATLCOM/ATL::CComDynamicUnkArray::Remove"]
helpviewer_keywords: ["connection points [C++], managing", "CComDynamicUnkArray class"]
-ms.assetid: 202470d7-9a1b-498f-b96d-659d681acd65
---
# CComDynamicUnkArray Class
@@ -34,7 +34,7 @@ class CComDynamicUnkArray
|[CComDynamicUnkArray::end](#end)|Returns a pointer to one past the last `IUnknown` pointer in the collection.|
|[CComDynamicUnkArray::GetAt](#getat)|Retrieves the element at the specified index.|
|[CComDynamicUnkArray::GetCookie](#getcookie)|Call this method to get the cookie associated with a given `IUnknown` pointer.|
-|[CComDynamicUnkArray::GetSize](#getsize)|Returns the length of an array.|
+|[CComDynamicUnkArray::GetSize](#getsize)|Returns the number of elements the array can store.|
|[CComDynamicUnkArray::GetUnknown](#getunknown)|Call this method to get the `IUnknown` pointer associated with a given cookie.|
|[CComDynamicUnkArray::Remove](#remove)|Call this method to remove an `IUnknown` pointer from the array.|
@@ -68,7 +68,12 @@ The `IUnknown` pointer to add to the array.
### Return Value
-Returns the cookie associated with the newly added pointer.
+Returns the cookie associated with the newly added pointer. Use this cookie to retrieve the pointer from the array with [CComDynamicUnkArray::GetAt](#getat).
+
+### Remarks
+
+The position where this item is inserted won't necessarily be directly after the last-inserted item if `Remove()` was previously called on this array. Use the returned cookie to reliably access the inserted pointer.
+The array's size might be increased to accommodate more items. Use `GetSize()` to get the new size.
## CComDynamicUnkArray::begin
@@ -91,7 +96,7 @@ Before using the `IUnknown` interface, you should check that it is not NULL.
## CComDynamicUnkArray::clear
-Empties the array.
+Empties the array. Resets the size to 0.
```cpp
void clear();
@@ -123,7 +128,9 @@ Frees resources allocated by the class constructor.
## CComDynamicUnkArray::end
-Returns a pointer to one past the last `IUnknown` pointer in the collection.
+Returns a pointer to one-past the last element in the array's allocated buffer.
+
+Note: this means that the last-inserted pointer is not guaranteed to be at `end()-1` because the array may not be filled to capacity.
```
IUnknown**
@@ -149,7 +156,7 @@ The index of the element to retrieve.
### Return Value
-A pointer to an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface.
+A pointer to an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface if an element was previously added and exists at this index; otherwise `NULL`.
## CComDynamicUnkArray::GetCookie
@@ -174,7 +181,9 @@ If there is more than one instance of the same `IUnknown` pointer, this function
## CComDynamicUnkArray::GetSize
-Returns the length of an array.
+Returns the allocated capacity of the array.
+
+Note: this is not the same as the number of non-NULL elements currently in the array.
```
int GetSize() const;
@@ -182,7 +191,7 @@ int GetSize() const;
### Return Value
-The length of the array.
+The number of elements the array can store. `GetSize() == end() - begin()`.
## CComDynamicUnkArray::GetUnknown
@@ -205,6 +214,8 @@ Returns the `IUnknown` pointer, or NULL if no matching cookie is found.
Call this method to remove an `IUnknown` pointer from the array.
+All other elements are unchanged and retain their index and cookie.
+
```
BOOL Remove(DWORD dwCookie);
```
diff --git a/docs/atl/reference/ccomenum-class.md b/docs/atl/reference/ccomenum-class.md
index c54aec616c..874c02b84c 100644
--- a/docs/atl/reference/ccomenum-class.md
+++ b/docs/atl/reference/ccomenum-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComEnum Class"
title: "CComEnum Class"
ms.date: "11/04/2016"
f1_keywords: ["CComEnum", "atlcom/ATL::CComEnum"]
@@ -75,7 +76,7 @@ The code shown below provides a reusable function for creating and initializing
[!code-cpp[NVC_ATL_COM#32](../../atl/codesnippet/cpp/ccomenum-class_1.h)]
-This template function can be used to implement the `_NewEnum` property of a collection interface as shown below:
+This function template can be used to implement the `_NewEnum` property of a collection interface as shown below:
[!code-cpp[NVC_ATL_COM#33](../../atl/codesnippet/cpp/ccomenum-class_2.h)]
diff --git a/docs/atl/reference/ccomenumimpl-class.md b/docs/atl/reference/ccomenumimpl-class.md
index 211b29fe21..904acfd49b 100644
--- a/docs/atl/reference/ccomenumimpl-class.md
+++ b/docs/atl/reference/ccomenumimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComEnumImpl Class"
title: "CComEnumImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["CComEnumImpl", "ATLCOM/ATL::CComEnumImpl", "ATLCOM/ATL::CComEnumImpl::CComEnumImpl", "ATLCOM/ATL::CComEnumImpl::Clone", "ATLCOM/ATL::CComEnumImpl::Init", "ATLCOM/ATL::CComEnumImpl::Next", "ATLCOM/ATL::CComEnumImpl::Reset", "ATLCOM/ATL::CComEnumImpl::Skip", "ATLCOM/ATL::CComEnumImpl::m_begin", "ATLCOM/ATL::CComEnumImpl::m_dwFlags", "ATLCOM/ATL::CComEnumImpl::m_end", "ATLCOM/ATL::CComEnumImpl::m_iter", "ATLCOM/ATL::CComEnumImpl::m_spUnk"]
diff --git a/docs/atl/reference/ccomenumonstl-class.md b/docs/atl/reference/ccomenumonstl-class.md
index c6019606f3..7ab682b506 100644
--- a/docs/atl/reference/ccomenumonstl-class.md
+++ b/docs/atl/reference/ccomenumonstl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComEnumOnSTL Class"
title: "CComEnumOnSTL Class"
ms.date: "11/04/2016"
f1_keywords: ["CComEnumOnSTL", "atlcom/ATL::CComEnumOnSTL"]
@@ -84,7 +85,7 @@ The code shown below provides a generic function to handle the creation and init
[!code-cpp[NVC_ATL_COM#34](../../atl/codesnippet/cpp/ccomenumonstl-class_1.h)]
-This template function can be used to implement the `_NewEnum` property of a collection interface as shown below:
+This function template can be used to implement the `_NewEnum` property of a collection interface as shown below:
[!code-cpp[NVC_ATL_COM#35](../../atl/codesnippet/cpp/ccomenumonstl-class_2.h)]
diff --git a/docs/atl/reference/ccomfakecriticalsection-class.md b/docs/atl/reference/ccomfakecriticalsection-class.md
index d793a688e3..087bc175ff 100644
--- a/docs/atl/reference/ccomfakecriticalsection-class.md
+++ b/docs/atl/reference/ccomfakecriticalsection-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComFakeCriticalSection Class"
title: "CComFakeCriticalSection Class"
ms.date: "11/04/2016"
f1_keywords: ["CComFakeCriticalSection", "ATLCORE/ATL::CComFakeCriticalSection", "ATLCORE/ATL::CComFakeCriticalSection::Init", "ATLCORE/ATL::CComFakeCriticalSection::Lock", "ATLCORE/ATL::CComFakeCriticalSection::Term", "ATLCORE/ATL::CComFakeCriticalSection::Unlock"]
diff --git a/docs/atl/reference/ccomgitptr-class.md b/docs/atl/reference/ccomgitptr-class.md
index 347c86c9eb..1cc42d0b16 100644
--- a/docs/atl/reference/ccomgitptr-class.md
+++ b/docs/atl/reference/ccomgitptr-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComGITPtr Class"
title: "CComGITPtr Class"
ms.date: "11/04/2016"
f1_keywords: ["CComGITPtr", "ATLBASE/ATL::CComGITPtr", "ATLBASE/ATL::CComGITPtr::CComGITPtr", "ATLBASE/ATL::CComGITPtr::Attach", "ATLBASE/ATL::CComGITPtr::CopyTo", "ATLBASE/ATL::CComGITPtr::Detach", "ATLBASE/ATL::CComGITPtr::GetCookie", "ATLBASE/ATL::CComGITPtr::Revoke", "ATLBASE/ATL::CComGITPtr::m_dwCookie"]
diff --git a/docs/atl/reference/ccomheap-class.md b/docs/atl/reference/ccomheap-class.md
index fe3a815080..f561ecf30d 100644
--- a/docs/atl/reference/ccomheap-class.md
+++ b/docs/atl/reference/ccomheap-class.md
@@ -1,43 +1,44 @@
---
+description: "Learn more about: CComHeap Class"
title: "CComHeap Class"
ms.date: "11/04/2016"
f1_keywords: ["CComHeap", "ATLCOMMEM/ATL::CComHeap", "ATLCOMMEM/ATL::CComHeap::Allocate", "ATLCOMMEM/ATL::CComHeap::Free", "ATLCOMMEM/ATL::CComHeap::GetSize", "ATLCOMMEM/ATL::CComHeap::Reallocate"]
helpviewer_keywords: ["CComHeap class"]
ms.assetid: c74183ce-98ae-46fb-b186-93ea4cf0222b
---
-# CComHeap Class
+# `CComHeap` Class
-This class implements [IAtlMemMgr](../../atl/reference/iatlmemmgr-class.md) using the COM memory allocation functions.
+This class implements [`IAtlMemMgr`](../../atl/reference/iatlmemmgr-class.md) using the COM memory allocation functions.
> [!IMPORTANT]
> This class and its members cannot be used in applications that execute in the Windows Runtime.
## Syntax
-```
+```cpp
class CComHeap : public IAtlMemMgr
```
## Members
-### Public Methods
+### Public methods
|Name|Description|
|----------|-----------------|
-|[CComHeap::Allocate](#allocate)|Call this method to allocate a block of memory.|
-|[CComHeap::Free](#free)|Call this method to free a block of memory allocated by this memory manager.|
-|[CComHeap::GetSize](#getsize)|Call this method to get the allocated size of a memory block allocated by this memory manager.|
-|[CComHeap::Reallocate](#reallocate)|Call this method to reallocate memory allocated by this memory manager.|
+|[`CComHeap::Allocate`](#allocate)|Call this method to allocate a block of memory.|
+|[`CComHeap::Free`](#free)|Call this method to free a block of memory allocated by this memory manager.|
+|[`CComHeap::GetSize`](#getsize)|Call this method to get the allocated size of a memory block allocated by this memory manager.|
+|[`CComHeap::Reallocate`](#reallocate)|Call this method to reallocate memory allocated by this memory manager.|
## Remarks
-`CComHeap` implements memory allocation functions using the COM allocation functions, including [CoTaskMemAlloc](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemalloc), [CoTaskMemFree](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemfree), [IMalloc::GetSize](/windows/win32/api/objidlbase/nf-objidlbase-imalloc-getsize), and [CoTaskMemRealloc](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemrealloc). The maximum amount of memory that can be allocated is equal to INT_MAX (2147483647) bytes.
+`CComHeap` implements memory allocation functions using the COM allocation functions, including [`CoTaskMemAlloc`](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemalloc), [`CoTaskMemFree`](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemfree), [`IMalloc::GetSize`](/windows/win32/api/objidlbase/nf-objidlbase-imalloc-getsize), and [`CoTaskMemRealloc`](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemrealloc). The maximum amount of memory that can be allocated is equal to `INT_MAX` (2147483647) bytes.
## Example
-See the example for [IAtlMemMgr](../../atl/reference/iatlmemmgr-class.md).
+See the example for [`IAtlMemMgr`](../../atl/reference/iatlmemmgr-class.md).
-## Inheritance Hierarchy
+## Inheritance hierarchy
`IAtlMemMgr`
@@ -51,95 +52,95 @@ See the example for [IAtlMemMgr](../../atl/reference/iatlmemmgr-class.md).
Call this method to allocate a block of memory.
-```
+```cpp
virtual __declspec(allocator) void* Allocate(size_t nBytes) throw();
```
### Parameters
-*nBytes*
+*`nBytes`*\
The requested number of bytes in the new memory block.
-### Return Value
+### Return value
Returns a pointer to the start of the newly allocated memory block.
### Remarks
-Call [CComHeap::Free](#free) or [CComHeap::Reallocate](#reallocate) to free the memory allocated by this method.
+Call [`CComHeap::Free`](#free) or [`CComHeap::Reallocate`](#reallocate) to free the memory allocated by this method.
-Implemented using [CoTaskMemAlloc](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemalloc).
+Implemented using [`CoTaskMemAlloc`](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemalloc).
## CComHeap::Free
Call this method to free a block of memory allocated by this memory manager.
-```
+```cpp
virtual void Free(void* p) throw();
```
### Parameters
-*p*
+*`p`*\
Pointer to memory previously allocated by this memory manager. NULL is a valid value and does nothing.
### Remarks
-Implemented using [CoTaskMemFree](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemfree).
+Implemented using [`CoTaskMemFree`](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemfree).
## CComHeap::GetSize
Call this method to get the allocated size of a memory block allocated by this memory manager.
-```
+```cpp
virtual size_t GetSize(void* p) throw();
```
### Parameters
-*p*
+*`p`*\
Pointer to memory previously allocated by this memory manager.
-### Return Value
+### Return value
Returns the size of the allocated memory block in bytes.
### Remarks
-Implemented using [IMalloc::GetSize](/windows/win32/api/objidlbase/nf-objidlbase-imalloc-getsize).
+Implemented using [`IMalloc::GetSize`](/windows/win32/api/objidlbase/nf-objidlbase-imalloc-getsize).
## CComHeap::Reallocate
Call this method to reallocate memory allocated by this memory manager.
-```
+```cpp
virtual __declspec(allocator) void* Reallocate(void* p, size_t nBytes) throw();
```
### Parameters
-*p*
+*`p`*\
Pointer to memory previously allocated by this memory manager.
-*nBytes*
+*`nBytes`*\
The requested number of bytes in the new memory block.
-### Return Value
+### Return value
Returns a pointer to the start of the newly allocated memory block.
### Remarks
-Call [CComHeap::Free](#free) to free the memory allocated by this method.
+Call [`CComHeap::Free`](#free) to free the memory allocated by this method.
-Implemented using [CoTaskMemRealloc](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemrealloc).
+Implemented using [`CoTaskMemRealloc`](/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemrealloc).
## See also
-[DynamicConsumer Sample](../../overview/visual-cpp-samples.md)
-[Class Overview](../../atl/atl-class-overview.md)
-[CWin32Heap Class](../../atl/reference/cwin32heap-class.md)
-[CLocalHeap Class](../../atl/reference/clocalheap-class.md)
-[CGlobalHeap Class](../../atl/reference/cglobalheap-class.md)
-[CCRTHeap Class](../../atl/reference/ccrtheap-class.md)
-[IAtlMemMgr Class](../../atl/reference/iatlmemmgr-class.md)
+[DynamicConsumer Sample](../../overview/visual-cpp-samples.md)\
+[Class Overview](../../atl/atl-class-overview.md)\
+[`CWin32Heap` Class](../../atl/reference/cwin32heap-class.md)\
+[`CLocalHeap` Class](../../atl/reference/clocalheap-class.md)\
+[`CGlobalHeap` Class](../../atl/reference/cglobalheap-class.md)\
+[`CCRTHeap` Class](../../atl/reference/ccrtheap-class.md)\
+[`IAtlMemMgr` Class](../../atl/reference/iatlmemmgr-class.md)
diff --git a/docs/atl/reference/ccomheapptr-class.md b/docs/atl/reference/ccomheapptr-class.md
index 0439fc2866..0edb83160e 100644
--- a/docs/atl/reference/ccomheapptr-class.md
+++ b/docs/atl/reference/ccomheapptr-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComHeapPtr Class"
title: "CComHeapPtr Class"
ms.date: "11/04/2016"
f1_keywords: ["CComHeapPtr", "ATLBASE/ATL::CComHeapPtr", "ATLBASE/ATL::CComHeapPtr::CComHeapPtr"]
diff --git a/docs/atl/reference/ccommodule-class.md b/docs/atl/reference/ccommodule-class.md
index e4c60b031e..eb17faf3c4 100644
--- a/docs/atl/reference/ccommodule-class.md
+++ b/docs/atl/reference/ccommodule-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComModule Class"
title: "CComModule Class"
ms.date: "08/19/2019"
f1_keywords: ["CComModule", "ATLBASE/ATL::CComModule", "ATLBASE/ATL::CComModule::GetClassObject", "ATLBASE/ATL::CComModule::GetModuleInstance", "ATLBASE/ATL::CComModule::GetResourceInstance", "ATLBASE/ATL::CComModule::GetTypeLibInstance", "ATLBASE/ATL::CComModule::Init", "ATLBASE/ATL::CComModule::RegisterClassHelper", "ATLBASE/ATL::CComModule::RegisterClassObjects", "ATLBASE/ATL::CComModule::RegisterServer", "ATLBASE/ATL::CComModule::RegisterTypeLib", "ATLBASE/ATL::CComModule::RevokeClassObjects", "ATLBASE/ATL::CComModule::Term", "ATLBASE/ATL::CComModule::UnregisterClassHelper", "ATLBASE/ATL::CComModule::UnregisterServer", "ATLBASE/ATL::CComModule::UpdateRegistryClass", "ATLBASE/ATL::CComModule::UpdateRegistryFromResourceD", "ATLBASE/ATL::CComModule::UpdateRegistryFromResourceS", "ATLBASE/ATL::CComModule::m_csObjMap", "ATLBASE/ATL::CComModule::m_csTypeInfoHolder", "ATLBASE/ATL::CComModule::m_csWindowCreate", "ATLBASE/ATL::CComModule::m_hInst", "ATLBASE/ATL::CComModule::m_hInstResource", "ATLBASE/ATL::CComModule::m_hInstTypeLib", "ATLBASE/ATL::CComModule::m_pObjMap"]
diff --git a/docs/atl/reference/ccommultithreadmodel-class.md b/docs/atl/reference/ccommultithreadmodel-class.md
index ff912da21f..651aa91f66 100644
--- a/docs/atl/reference/ccommultithreadmodel-class.md
+++ b/docs/atl/reference/ccommultithreadmodel-class.md
@@ -1,9 +1,9 @@
---
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
@@ -11,7 +11,7 @@ ms.assetid: db8f1662-2f7a-44b3-b341-ffbfb6e422a3
## Syntax
-```
+```cpp
class CComMultiThreadModel
```
@@ -34,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|
|-------------|----------------------|-------------------------|--------------------|
@@ -53,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;
```
@@ -119,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;
```
@@ -143,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
@@ -164,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
@@ -185,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;
```
@@ -207,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/ccommultithreadmodelnocs-class.md b/docs/atl/reference/ccommultithreadmodelnocs-class.md
index 4db352ab15..9a116848ea 100644
--- a/docs/atl/reference/ccommultithreadmodelnocs-class.md
+++ b/docs/atl/reference/ccommultithreadmodelnocs-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComMultiThreadModelNoCS Class"
title: "CComMultiThreadModelNoCS Class"
ms.date: "11/04/2016"
f1_keywords: ["CComMultiThreadModelNoCS", "ATLBASE/ATL::CComMultiThreadModelNoCS", "ATLBASE/ATL::CComMultiThreadModelNoCS::AutoCriticalSection", "ATLBASE/ATL::CComMultiThreadModelNoCS::CriticalSection", "ATLBASE/ATL::CComMultiThreadModelNoCS::ThreadModelNoCS", "ATLBASE/ATL::CComMultiThreadModelNoCS::Decrement", "ATLBASE/ATL::CComMultiThreadModelNoCS::Increment"]
diff --git a/docs/atl/reference/ccomobject-class.md b/docs/atl/reference/ccomobject-class.md
index 145e28b3fa..940285715a 100644
--- a/docs/atl/reference/ccomobject-class.md
+++ b/docs/atl/reference/ccomobject-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComObject Class"
title: "CComObject Class"
ms.date: "11/04/2016"
f1_keywords: ["CComObject", "ATLCOM/ATL::CComObject", "ATLCOM/ATL::CComObject::CComObject", "ATLCOM/ATL::CComObject::AddRef", "ATLCOM/ATL::CComObject::CreateInstance", "ATLCOM/ATL::CComObject::QueryInterface", "ATLCOM/ATL::CComObject::Release"]
@@ -124,7 +125,7 @@ If you do not need direct access to the object, but still want to create a new o
### Example
[!code-cpp[NVC_ATL_COM#38](../../atl/codesnippet/cpp/ccomobject-class_1.h)]
-
+
[!code-cpp[NVC_ATL_COM#39](../../atl/codesnippet/cpp/ccomobject-class_2.cpp)]
## CComObject::QueryInterface
diff --git a/docs/atl/reference/ccomobjectglobal-class.md b/docs/atl/reference/ccomobjectglobal-class.md
index ba40912189..14afcb2e9d 100644
--- a/docs/atl/reference/ccomobjectglobal-class.md
+++ b/docs/atl/reference/ccomobjectglobal-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComObjectGlobal Class"
title: "CComObjectGlobal Class"
ms.date: "11/04/2016"
f1_keywords: ["CComObjectGlobal", "ATLCOM/ATL::CComObjectGlobal", "ATLCOM/ATL::CComObjectGlobal::CComObjectGlobal", "ATLCOM/ATL::CComObjectGlobal::AddRef", "ATLCOM/ATL::CComObjectGlobal::QueryInterface", "ATLCOM/ATL::CComObjectGlobal::Release", "ATLCOM/ATL::CComObjectGlobal::m_hResFinalConstruct"]
diff --git a/docs/atl/reference/ccomobjectnolock-class.md b/docs/atl/reference/ccomobjectnolock-class.md
index c56974cb25..e98933f364 100644
--- a/docs/atl/reference/ccomobjectnolock-class.md
+++ b/docs/atl/reference/ccomobjectnolock-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComObjectNoLock Class"
title: "CComObjectNoLock Class"
ms.date: "11/04/2016"
f1_keywords: ["CComObjectNoLock", "ATLCOM/ATL::CComObjectNoLock", "ATLCOM/ATL::CComObjectNoLock::CComObjectNoLock", "ATLCOM/ATL::CComObjectNoLock::AddRef", "ATLCOM/ATL::CComObjectNoLock::QueryInterface", "ATLCOM/ATL::CComObjectNoLock::Release"]
diff --git a/docs/atl/reference/ccomobjectroot-class.md b/docs/atl/reference/ccomobjectroot-class.md
index 8b0775b314..5a34267e8d 100644
--- a/docs/atl/reference/ccomobjectroot-class.md
+++ b/docs/atl/reference/ccomobjectroot-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComObjectRoot Class"
title: "CComObjectRoot Class"
ms.date: "11/04/2016"
f1_keywords: ["CComObjectRoot", "atlcom/ATL::CComObjectRoot"]
diff --git a/docs/atl/reference/ccomobjectrootex-class.md b/docs/atl/reference/ccomobjectrootex-class.md
index a63950388c..d28e79d490 100644
--- a/docs/atl/reference/ccomobjectrootex-class.md
+++ b/docs/atl/reference/ccomobjectrootex-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComObjectRootEx Class"
title: "CComObjectRootEx Class"
ms.date: "11/04/2016"
f1_keywords: ["CComObjectRootEx", "ATLCOM/ATL::CComObjectRootEx", "ATLCOM/ATL::InternalAddRef", "ATLCOM/ATL::InternalRelease", "ATLCOM/ATL::Lock", "ATLCOM/ATL::Unlock", "ATLCOM/ATL::FinalConstruct", "ATLCOM/ATL::FinalRelease", "ATLCOM/ATL::OuterAddRef", "ATLCOM/ATL::OuterQueryInterface", "ATLCOM/ATL::OuterRelease", "ATLCOM/ATL::InternalQueryInterface", "ATLCOM/ATL::ObjectMain", "ATLCOM/ATL::m_dwRef", "ATLCOM/ATL::m_pOuterUnknown"]
@@ -25,7 +26,7 @@ The class whose methods implement the desired threading model. You can explicitl
### Methods
-|||
+|Function|Description|
|-|-|
|[CComObjectRootEx](#ccomobjectrootex)|Constructor.|
|[InternalAddRef](#internaladdref)|Increments the reference count for a nonaggregated object.|
@@ -35,7 +36,7 @@ The class whose methods implement the desired threading model. You can explicitl
### CComObjectRootBase Methods
-|||
+|Function|Description|
|-|-|
|[FinalConstruct](#finalconstruct)|Override in your class to perform any initialization required by your object.|
|[FinalRelease](#finalrelease)|Override in your class to perform any cleanup required by your object.|
@@ -45,14 +46,14 @@ The class whose methods implement the desired threading model. You can explicitl
### Static Functions
-|||
+|Function|Description|
|-|-|
|[InternalQueryInterface](#internalqueryinterface)|Delegates to the `IUnknown` of a nonaggregated object.|
|[ObjectMain](#objectmain)|Called during module initialization and termination for derived classes listed in the object map.|
### Data Members
-|||
+|Data member|Description|
|-|-|
|[m_dwRef](#m_dwref)|With `m_pOuterUnknown`, part of a union. Used when the object is not aggregated to hold the reference count of `AddRef` and `Release`.|
|[m_pOuterUnknown](#m_pouterunknown)|With `m_dwRef`, part of a union. Used when the object is aggregated to hold a pointer to the outer unknown.|
diff --git a/docs/atl/reference/ccomobjectstack-class.md b/docs/atl/reference/ccomobjectstack-class.md
index cde88aa669..946beb5b66 100644
--- a/docs/atl/reference/ccomobjectstack-class.md
+++ b/docs/atl/reference/ccomobjectstack-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComObjectStack Class"
title: "CComObjectStack Class"
ms.date: "11/04/2016"
f1_keywords: ["CComObjectStack", "ATLCOM/ATL::CComObjectStack", "ATLCOM/ATL::CComObjectStack::CComObjectStack", "ATLCOM/ATL::CComObjectStack::AddRef", "ATLCOM/ATL::CComObjectStack::QueryInterface", "ATLCOM/ATL::CComObjectStack::Release", "ATLCOM/ATL::CComObjectStack::m_hResFinalConstruct"]
diff --git a/docs/atl/reference/ccompolyobject-class.md b/docs/atl/reference/ccompolyobject-class.md
index b581c7315b..d3632a5283 100644
--- a/docs/atl/reference/ccompolyobject-class.md
+++ b/docs/atl/reference/ccompolyobject-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComPolyObject Class"
title: "CComPolyObject Class"
ms.date: "11/04/2016"
f1_keywords: ["CComPolyObject", "ATLCOM/ATL::CComPolyObject", "ATLCOM/ATL::CComPolyObject::CComPolyObject", "ATLCOM/ATL::CComPolyObject::AddRef", "ATLCOM/ATL::CComPolyObject::CreateInstance", "ATLCOM/ATL::CComPolyObject::FinalConstruct", "ATLCOM/ATL::CComPolyObject::FinalRelease", "ATLCOM/ATL::CComPolyObject::QueryInterface", "ATLCOM/ATL::CComPolyObject::Release", "ATLCOM/ATL::CComPolyObject::m_contained"]
diff --git a/docs/atl/reference/ccomptr-class.md b/docs/atl/reference/ccomptr-class.md
index cfc07923e8..6ccf609038 100644
--- a/docs/atl/reference/ccomptr-class.md
+++ b/docs/atl/reference/ccomptr-class.md
@@ -6,7 +6,7 @@ f1_keywords: ["CComPtr", "ATLBASE/ATL::CComPtr", "ATLBASE/ATL::CComPtr::CComPtr"
helpviewer_keywords: ["CComPtr class"]
ms.assetid: 22d9ea8d-ed66-4c34-940f-141db11e83bd
---
-# CComPtr Class
+# `CComPtr` Class
A smart pointer class for managing COM interface pointers.
@@ -19,7 +19,7 @@ class CComPtr
### Parameters
-*T*
+*`T`*
A COM interface specifying the type of pointer to be stored.
## Members
@@ -28,37 +28,37 @@ A COM interface specifying the type of pointer to be stored.
|Name|Description|
|----------|-----------------|
-|[CComPtr::CComPtr](#ccomptr)|The constructor.|
+|[`CComPtr::CComPtr`](#ccomptr)|The constructor.|
### Public Operators
|Name|Description|
|----------|-----------------|
-|[CComPtr::operator =](#operator_eq)|Assigns a pointer to the member pointer.|
+|[`CComPtr::operator =`](#operator_eq)|Assigns a pointer to the member pointer.|
## Remarks
-ATL uses `CComPtr` and [CComQIPtr](../../atl/reference/ccomqiptr-class.md) to manage COM interface pointers. Both are derived from [CComPtrBase](../../atl/reference/ccomptrbase-class.md), and both do automatic reference counting.
+ATL uses `CComPtr` and [`CComQIPtr`](../../atl/reference/ccomqiptr-class.md) to manage COM interface pointers. Both are derived from [`CComPtrBase`](../../atl/reference/ccomptrbase-class.md), and both do automatic reference counting.
-The `CComPtr` and [CComQIPtr](../../atl/reference/ccomqiptr-class.md) classes can help eliminate memory leaks by performing automatic reference counting. The following functions both do the same logical operations. However, the second version may be less error-prone because it uses the `CComPtr` class:
+The `CComPtr` and [`CComQIPtr`](../../atl/reference/ccomqiptr-class.md) classes can help eliminate memory leaks by performing automatic reference counting. The following functions both do the same logical operations. However, the second version may be less error-prone because it uses the `CComPtr` class:
[!code-cpp[NVC_ATL_Utilities#130](../../atl/codesnippet/cpp/ccomptr-class_1.cpp)]
-
+
[!code-cpp[NVC_ATL_Utilities#131](../../atl/codesnippet/cpp/ccomptr-class_2.cpp)]
In Debug builds, link atlsd.lib for code tracing.
## Inheritance Hierarchy
-[CComPtrBase](../../atl/reference/ccomptrbase-class.md)
+[`CComPtrBase`](../../atl/reference/ccomptrbase-class.md)
`CComPtr`
## Requirements
-**Header:** atlbase.h
+**Header:** `atlbase.h`
-## CComPtr::CComPtr
+## `CComPtr::CComPtr`
The constructor.
@@ -70,17 +70,17 @@ CComPtr (const CComPtr& lp) throw ();
### Parameters
-*lp*
+*`lp`*
Used to initialize the interface pointer.
-*T*
+*`T`*
A COM interface.
### Remarks
-The constructors that take an argument call `AddRef` on *lp*, if it isn't a null pointer. A non-null owned object gets a `Release` call upon the CComPtr object's destruction, or if a new object is assigned to the CComPtr object.
+The constructors that take an argument call `AddRef` on *`lp`*, if it isn't a null pointer. A non-null owned object gets a `Release` call upon the CComPtr object's destruction, or if a new object is assigned to the CComPtr object.
-## CComPtr::operator =
+## `CComPtr::operator =`
Assignment operator.
@@ -99,6 +99,6 @@ This operation AddRefs the new object and releases the existing object, if one e
## See also
-[CComPtr::CComPtr](#ccomptr)
-[CComQIPtr::CComQIPtr](../../atl/reference/ccomqiptr-class.md#ccomqiptr)
+[`CComPtr::CComPtr`](#ccomptr)
+[`CComQIPtr::CComQIPtr`](../../atl/reference/ccomqiptr-class.md#ccomqiptr)
[Class Overview](../../atl/atl-class-overview.md)
diff --git a/docs/atl/reference/ccomptrbase-class.md b/docs/atl/reference/ccomptrbase-class.md
index b4ffe7ca19..c2363d848e 100644
--- a/docs/atl/reference/ccomptrbase-class.md
+++ b/docs/atl/reference/ccomptrbase-class.md
@@ -1,79 +1,80 @@
---
+description: "Learn more about: CComPtrBase Class"
title: "CComPtrBase Class"
ms.date: "11/04/2016"
f1_keywords: ["CComPtrBase", "ATLCOMCLI/ATL::CComPtrBase", "ATLCOMCLI/ATL::CComPtrBase::Advise", "ATLCOMCLI/ATL::CComPtrBase::Attach", "ATLCOMCLI/ATL::CComPtrBase::CoCreateInstance", "ATLCOMCLI/ATL::CComPtrBase::CopyTo", "ATLCOMCLI/ATL::CComPtrBase::Detach", "ATLCOMCLI/ATL::CComPtrBase::IsEqualObject", "ATLCOMCLI/ATL::CComPtrBase::QueryInterface", "ATLCOMCLI/ATL::CComPtrBase::Release", "ATLCOMCLI/ATL::CComPtrBase::SetSite", "ATLCOMCLI/ATL::CComPtrBase::p"]
helpviewer_keywords: ["CComPtrBase class"]
ms.assetid: 6dbe9543-dee8-4a97-b02f-dd3a25f4a1a0
---
-# CComPtrBase Class
+# `CComPtrBase` Class
This class provides a basis for smart pointer classes using COM-based memory routines.
## Syntax
-```
+```cpp
template
class CComPtrBase
```
-#### Parameters
+### Parameters
-*T*
+*`T`*\
The object type to be referenced by the smart pointer.
## Members
-### Public Constructors
+### Public constructors
-|Name|Description|
-|----------|-----------------|
-|[CComPtrBase::~CComPtrBase](#dtor)|The destructor.|
+| Name | Description |
+|--|--|
+| [`CComPtrBase::~CComPtrBase`](#dtor) | The destructor. |
-### Public Methods
+### Public methods
-|Name|Description|
-|----------|-----------------|
-|[CComPtrBase::Advise](#advise)|Call this method to create a connection between the `CComPtrBase`'s connection point and a client's sink.|
-|[CComPtrBase::Attach](#attach)|Call this method to take ownership of an existing pointer.|
-|[CComPtrBase::CoCreateInstance](#cocreateinstance)|Call this method to create an object of the class associated with a specified Class ID or Program ID.|
-|[CComPtrBase::CopyTo](#copyto)|Call this method to copy the `CComPtrBase` pointer to another pointer variable.|
-|[CComPtrBase::Detach](#detach)|Call this method to release ownership of a pointer.|
-|[CComPtrBase::IsEqualObject](#isequalobject)|Call this method to check if the specified `IUnknown` points to the same object associated with the `CComPtrBase` object.|
-|[CComPtrBase::QueryInterface](#queryinterface)|Call this method to return a pointer to a specified interface.|
-|[CComPtrBase::Release](#release)|Call this method to release the interface.|
-|[CComPtrBase::SetSite](#setsite)|Call this method to set the site of the `CComPtrBase` object to the `IUnknown` of the parent object.|
+| Name | Description |
+|--|--|
+| [`CComPtrBase::Advise`](#advise) | Call this method to create a connection between the `CComPtrBase`'s connection point and a client's sink. |
+| [`CComPtrBase::Attach`](#attach) | Call this method to take ownership of an existing pointer. |
+| [`CComPtrBase::CoCreateInstance`](#cocreateinstance) | Call this method to create an object of the class associated with a specified Class ID or Program ID. |
+| [`CComPtrBase::CopyTo`](#copyto) | Call this method to copy the `CComPtrBase` pointer to another pointer variable. |
+| [`CComPtrBase::Detach`](#detach) | Call this method to release ownership of a pointer. |
+| [`CComPtrBase::IsEqualObject`](#isequalobject) | Call this method to check if the specified `IUnknown` points to the same object associated with the `CComPtrBase` object. |
+| [`CComPtrBase::QueryInterface`](#queryinterface) | Call this method to return a pointer to a specified interface. |
+| [`CComPtrBase::Release`](#release) | Call this method to release the interface. |
+| [`CComPtrBase::SetSite`](#setsite) | Call this method to set the site of the `CComPtrBase` object to the `IUnknown` of the parent object. |
-### Public Operators
+### Public operators
-|Name|Description|
-|----------|-----------------|
-|[CComPtrBase::operator T*](#operator_t_star)|The cast operator.|
-|[CComPtrBase::operator !](#operator_not)|The NOT operator.|
-|[CComPtrBase::operator &](#operator_amp)|The & operator.|
-|[CComPtrBase::operator *](#operator_star)|The \* operator.|
-|[CComPtrBase::operator <](#ccomptrbase__operator lt)|The less-than operator.|
-|[CComPtrBase::operator ==](#operator_eq_eq)|The equality operator.|
-|[CComPtrBase::operator ->](#operator_ptr)|The pointer-to-members operator.|
+| Name | Description |
+|--|--|
+| [`CComPtrBase::operator T*`](#operator_t_star) | The cast operator. |
+| [`CComPtrBase::operator !`](#operator_not) | The NOT operator. |
+| [`CComPtrBase::operator &`](#operator_amp) | The address-of `&` operator. |
+| [`CComPtrBase::operator *`](#operator_star) | The pointer-to `*` operator. |
+| [`CComPtrBase::operator <`](#operator_lt) | The less-than operator. |
+| [`CComPtrBase::operator ==`](#operator_eq_eq) | The equality operator. |
+| [`CComPtrBase::operator ->`](#operator_ptr) | The pointer-to-members operator. |
-### Public Data Members
+### Public data members
-|Name|Description|
-|----------|-----------------|
-|[CComPtrBase::p](#p)|The pointer data member variable.|
+| Name | Description |
+|--|--|
+| [`CComPtrBase::p`](#p) | The pointer data member variable. |
## Remarks
-This class provides the basis for other smart pointers which use COM memory management routines, such as [CComQIPtr](../../atl/reference/ccomqiptr-class.md) and [CComPtr](../../atl/reference/ccomptr-class.md). The derived classes add their own constructors and operators, but rely on the methods provided by `CComPtrBase`.
+This class provides the basis for other smart pointers that use COM memory management routines, such as [`CComQIPtr`](../../atl/reference/ccomqiptr-class.md) and [`CComPtr`](../../atl/reference/ccomptr-class.md). The derived classes add their own constructors and operators, but rely on the methods provided by `CComPtrBase`.
## Requirements
**Header:** atlcomcli.h
-## CComPtrBase::Advise
+## `CComPtrBase::Advise`
Call this method to create a connection between the `CComPtrBase`'s connection point and a client's sink.
-```
+```cpp
HRESULT Advise(
IUnknown* pUnk,
const IID& iid,
@@ -82,24 +83,24 @@ HRESULT Advise(
### Parameters
-*pUnk*
+*`pUnk`*\
A pointer to the client's `IUnknown`.
-*iid*
-The GUID of the connection point. Typically, this is the same as the outgoing interface managed by the connection point.
+*`iid`*\
+The GUID of the connection point. Typically, this GUID is the same as the outgoing interface managed by the connection point.
-*pdw*
+*`pdw`*\
A pointer to the cookie that uniquely identifies the connection.
-### Return Value
+### Return value
-Returns S_OK on success, or an error HRESULT on failure.
+Returns `S_OK` on success, or an error `HRESULT` on failure.
### Remarks
-See [AtlAdvise](connection-point-global-functions.md#atladvise) for more information.
+For more information, see [`AtlAdvise`](connection-point-global-functions.md#atladvise).
-## CComPtrBase::Attach
+## `CComPtrBase::Attach`
Call this method to take ownership of an existing pointer.
@@ -109,18 +110,18 @@ void Attach(T* p2) throw();
### Parameters
-*p2*
+*`p2`*\
The `CComPtrBase` object will take ownership of this pointer.
### Remarks
-`Attach` calls [CComPtrBase::Release](#release) on the existing [CComPtrBase::p](#p) member variable and then assigns *p2* to `CComPtrBase::p`. When a `CComPtrBase` object takes ownership of a pointer, it will automatically call `Release` on the pointer which will delete the pointer and any allocated data if the reference count on the object goes to 0.
+`Attach` calls [`CComPtrBase::Release`](#release) on the existing [`CComPtrBase::p`](#p) member variable and then assigns *`p2`* to `CComPtrBase::p`. When a `CComPtrBase` object takes ownership of a pointer, it will automatically call `Release` on the pointer, which deletes the pointer and any allocated data if the reference count on the object goes to 0.
-## CComPtrBase::~CComPtrBase
+## `CComPtrBase::~CComPtrBase`
The destructor.
-```
+```cpp
~CComPtrBase() throw();
```
@@ -128,11 +129,11 @@ The destructor.
Releases the interface pointed to by `CComPtrBase`.
-## CComPtrBase::CoCreateInstance
+## `CComPtrBase::CoCreateInstance`
Call this method to create an object of the class associated with a specified Class ID or Program ID.
-```
+```cpp
HRESULT CoCreateInstance(
LPCOLESTR szProgID,
LPUNKNOWN pUnkOuter = NULL,
@@ -146,177 +147,177 @@ HRESULT CoCreateInstance(
### Parameters
-*szProgID*
+*`szProgID`*\
Pointer to a ProgID, used to recover the CLSID.
-*pUnkOuter*
-If NULL, indicates that the object is not being created as part of an aggregate. If non- NULL, is a pointer to the aggregate object's `IUnknown` interface (the controlling `IUnknown`).
+*`pUnkOuter`*\
+If NULL, indicates that the object isn't being created as part of an aggregate. If non- NULL, is a pointer to the aggregate object's `IUnknown` interface (the controlling `IUnknown`).
-*dwClsContext*
+*`dwClsContext`*\
Context in which the code that manages the newly created object will run.
-*rclsid*
+*`rclsid`*\
CLSID associated with the data and code that will be used to create the object.
-### Return Value
+### Return value
-Returns S_OK on success, or REGDB_E_CLASSNOTREG, CLASS_E_NOAGGREGATION, CO_E_CLASSSTRING or E_NOINTERFACE on failure. See [CoCreateClassInstance](/windows/win32/api/combaseapi/nf-combaseapi-cocreateinstance) and [CLSIDFromProgID](/windows/win32/api/combaseapi/nf-combaseapi-clsidfromprogid) for a description of these errors.
+Returns `S_OK` on success, or `REGDB_E_CLASSNOTREG`, `CLASS_E_NOAGGREGATION`, `CO_E_CLASSSTRING`, or `E_NOINTERFACE` on failure. See [`CoCreateClassInstance`](/windows/win32/api/combaseapi/nf-combaseapi-cocreateinstance) and [`CLSIDFromProgID`](/windows/win32/api/combaseapi/nf-combaseapi-clsidfromprogid) for a description of these errors.
### Remarks
-If the first form of the method is called, [CLSIDFromProgID](/windows/win32/api/combaseapi/nf-combaseapi-clsidfromprogid) is used to recover the CLSID. Both forms then call [CoCreateClassInstance](/windows/win32/api/combaseapi/nf-combaseapi-cocreateinstance).
+If the first form of the method is called, [`CLSIDFromProgID`](/windows/win32/api/combaseapi/nf-combaseapi-clsidfromprogid) is used to recover the CLSID. Both forms then call [`CoCreateClassInstance`](/windows/win32/api/combaseapi/nf-combaseapi-cocreateinstance).
-In debug builds, an assertion error will occur if [CComPtrBase::p](#p) is not equal to NULL.
+In debug builds, an assertion error will occur if [`CComPtrBase::p`](#p) isn't equal to NULL.
-## CComPtrBase::CopyTo
+## `CComPtrBase::CopyTo`
Call this method to copy the `CComPtrBase` pointer to another pointer variable.
-```
+```cpp
HRESULT CopyTo(T** ppT) throw();
```
### Parameters
-*ppT*
-Address of the variable which will receive the `CComPtrBase` pointer.
+*`ppT`*\
+Address of the variable to receive the `CComPtrBase` pointer.
-### Return Value
+### Return value
-Returns S_OK on success, E_POINTER on failure.
+Returns `S_OK` on success, `E_POINTER` on failure.
### Remarks
-Copies the `CComPtrBase` pointer to *ppT*. The reference count on the [CComPtrBase::p](#p) member variable is incremented.
+Copies the `CComPtrBase` pointer to *`ppT`*. The reference count on the [`CComPtrBase::p`](#p) member variable is incremented.
-An error HRESULT will be returned if *ppT* is equal to NULL. In debug builds, an assertion error will occur if *ppT* is equal to NULL.
+An error `HRESULT` will be returned if *`ppT`* is equal to NULL. In debug builds, an assertion error will occur if *`ppT`* is equal to NULL.
-## CComPtrBase::Detach
+## `CComPtrBase::Detach`
Call this method to release ownership of a pointer.
-```
+```cpp
T* Detach() throw();
```
-### Return Value
+### Return value
Returns a copy of the pointer.
### Remarks
-Releases ownership of a pointer, sets the [CComPtrBase::p](#p) data member variable to NULL, and returns a copy of the pointer.
+Releases ownership of a pointer, sets the [`CComPtrBase::p`](#p) data member variable to NULL, and returns a copy of the pointer.
-## CComPtrBase::IsEqualObject
+## `CComPtrBase::IsEqualObject`
Call this method to check if the specified `IUnknown` points to the same object associated with the `CComPtrBase` object.
-```
+```cpp
bool IsEqualObject(IUnknown* pOther) throw();
```
### Parameters
-*pOther*
+*`pOther`*\
The `IUnknown *` to compare.
-### Return Value
+### Return value
Returns true if the objects are identical, false otherwise.
-## CComPtrBase::operator !
+## `CComPtrBase::operator !`
The NOT operator.
-```
+```cpp
bool operator!() const throw();
```
-### Return Value
+### Return value
Returns true if the `CComHeapPtr` pointer is equal to NULL, false otherwise.
-## CComPtrBase::operator &
+## `CComPtrBase::operator &`
-The & operator.
+The address-of `&` operator.
-```
+```cpp
T** operator&() throw();
```
-### Return Value
+### Return value
Returns the address of the object pointed to by the `CComPtrBase` object.
-## CComPtrBase::operator \*
+## `CComPtrBase::operator *`
-The \* operator.
+The pointer-to `*` operator.
-```
+```cpp
T& operator*() const throw();
```
-### Return Value
+### Return value
-Returns the value of [CComPtrBase::p](#p); that is, a pointer to the object referenced by the `CComPtrBase` object.
+Returns the value of [`CComPtrBase::p`](#p); that is, a pointer to the object referenced by the `CComPtrBase` object.
-If debug builds, an assertion error will occur if [CComPtrBase::p](#p) is not equal to NULL.
+If debug builds, an assertion error will occur if [`CComPtrBase::p`](#p) isn't equal to NULL.
-## CComPtrBase::operator ==
+## `CComPtrBase::operator ==`
The equality operator.
-```
+```cpp
bool operator== (T* pT) const throw();
```
### Parameters
-*pT*
+*`pT`*\
A pointer to an object.
-### Return Value
+### Return value
-Returns true if `CComPtrBase` and *pT* point to the same object, false otherwise.
+Returns true if `CComPtrBase` and *`pT`* point to the same object, false otherwise.
-## CComPtrBase::operator ->
+## `CComPtrBase::operator ->`
The pointer-to-member operator.
-```
+```cpp
_NoAddRefReleaseOnCComPtr* operator->() const throw();
```
-### Return Value
+### Return value
-Returns the value of the [CComPtrBase::p](#p) data member variable.
+Returns the value of the [`CComPtrBase::p`](#p) data member variable.
### Remarks
Use this operator to call a method in a class pointed to by the `CComPtrBase` object. In debug builds, an assertion failure will occur if the `CComPtrBase` data member points to NULL.
-## CComPtrBase::operator <
+## `CComPtrBase::operator <`
The less-than operator.
-```
+```cpp
bool operator<(T* pT) const throw();
```
### Parameters
-*pT*
+*`pT`*\
A pointer to an object.
-### Return Value
+### Return value
-Returns true if the pointer managed by current object is less than the pointer to which it is being compared.
+Returns true if the pointer managed by current object is less than the pointer to which it's being compared.
-## CComPtrBase::operator T\*
+## `CComPtrBase::operator T*`
The cast operator.
-```
+```cpp
operator T*() const throw();
```
@@ -324,11 +325,11 @@ operator T*() const throw();
Returns a pointer to the object data type defined in the class template.
-## CComPtrBase::p
+## `CComPtrBase::p`
The pointer data member variable.
-```
+```cpp
T* p;
```
@@ -336,34 +337,34 @@ T* p;
This member variable holds the pointer information.
-## CComPtrBase::QueryInterface
+## `CComPtrBase::QueryInterface`
Call this method to return a pointer to a specified interface.
-```
+```cpp
template HRESULT QueryInterface(Q
** pp) const throw();
```
### Parameters
-*Q*
+*`Q`*\
The object type whose interface pointer is required.
-*pp*
+*`pp`*\
Address of output variable that receives the requested interface pointer.
-### Return Value
+### Return value
-Returns S_OK on success, or E_NOINTERFACE on failure.
+Returns `S_OK` on success, or `E_NOINTERFACE` on failure.
### Remarks
-This method calls [IUnknown::QueryInterface](/windows/win32/api/unknwn/nf-unknwn-iunknown-queryinterface(q)).
+This method calls [`IUnknown::QueryInterface`](/windows/win32/api/unknwn/nf-unknwn-iunknown-queryinterface(q)).
-In debug builds, an assertion error will occur if *pp* is not equal to NULL.
+In debug builds, an assertion error will occur if *`pp`* isn't equal to NULL.
-## CComPtrBase::Release
+## `CComPtrBase::Release`
Call this method to release the interface.
@@ -373,29 +374,29 @@ void Release() throw();
### Remarks
-The interface is released, and [CComPtrBase::p](#p) is set to NULL.
+The interface is released, and [`CComPtrBase::p`](#p) is set to NULL.
-## CComPtrBase::SetSite
+## `CComPtrBase::SetSite`
Call this method to set the site of the `CComPtrBase` object to the `IUnknown` of the parent object.
-```
+```cpp
HRESULT SetSite(IUnknown* punkParent) throw();
```
### Parameters
-*punkParent*
+*`punkParent`*\
A pointer to the `IUnknown` interface of the parent.
-### Return Value
+### Return value
-Returns S_OK on success, or an error HRESULT on failure.
+Returns `S_OK` on success, or an error `HRESULT` on failure.
### Remarks
-This method calls [AtlSetChildSite](composite-control-global-functions.md#atlsetchildsite).
+This method calls [`AtlSetChildSite`](composite-control-global-functions.md#atlsetchildsite).
## See also
-[Class Overview](../../atl/atl-class-overview.md)
+[Class overview](../../atl/atl-class-overview.md)
diff --git a/docs/atl/reference/ccomqiptr-class.md b/docs/atl/reference/ccomqiptr-class.md
index 59a5c34ad9..03490efe16 100644
--- a/docs/atl/reference/ccomqiptr-class.md
+++ b/docs/atl/reference/ccomqiptr-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComQIPtr Class"
title: "CComQIPtr Class"
ms.date: "11/04/2016"
f1_keywords: ["CComQIPtr", "ATLCOMCLI/ATL::CComQIPtr", "ATLCOMCLI/ATL::CComQIPtr::CComQIPtr"]
diff --git a/docs/atl/reference/ccomqiptrelementtraits-class.md b/docs/atl/reference/ccomqiptrelementtraits-class.md
index 6bb9530907..c81c56e55e 100644
--- a/docs/atl/reference/ccomqiptrelementtraits-class.md
+++ b/docs/atl/reference/ccomqiptrelementtraits-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComQIPtrElementTraits Class"
title: "CComQIPtrElementTraits Class"
ms.date: "11/04/2016"
f1_keywords: ["CComQIPtrElementTraits", "ATLCOLL/ATL::CComQIPtrElementTraits", "ATLCOLL/ATL::CComQIPtrElementTraits::INARGTYPE"]
diff --git a/docs/atl/reference/ccomsafearray-class.md b/docs/atl/reference/ccomsafearray-class.md
index 102699cc92..d9c6729e91 100644
--- a/docs/atl/reference/ccomsafearray-class.md
+++ b/docs/atl/reference/ccomsafearray-class.md
@@ -1,24 +1,24 @@
---
+description: "Learn more about: CComSafeArray Class"
title: "CComSafeArray Class"
ms.date: "05/06/2019"
f1_keywords: ["CComSafeArray", "ATLSAFE/ATL::CComSafeArray", "ATLSAFE/ATL::CComSafeArray::CComSafeArray", "ATLSAFE/ATL::CComSafeArray::Add", "ATLSAFE/ATL::CComSafeArray::Attach", "ATLSAFE/ATL::CComSafeArray::CopyFrom", "ATLSAFE/ATL::CComSafeArray::CopyTo", "ATLSAFE/ATL::CComSafeArray::Create", "ATLSAFE/ATL::CComSafeArray::Destroy", "ATLSAFE/ATL::CComSafeArray::Detach", "ATLSAFE/ATL::CComSafeArray::GetAt", "ATLSAFE/ATL::CComSafeArray::GetCount", "ATLSAFE/ATL::CComSafeArray::GetDimensions", "ATLSAFE/ATL::CComSafeArray::GetLowerBound", "ATLSAFE/ATL::CComSafeArray::GetSafeArrayPtr", "ATLSAFE/ATL::CComSafeArray::GetType", "ATLSAFE/ATL::CComSafeArray::GetUpperBound", "ATLSAFE/ATL::CComSafeArray::IsSizable", "ATLSAFE/ATL::CComSafeArray::MultiDimGetAt", "ATLSAFE/ATL::CComSafeArray::MultiDimSetAt", "ATLSAFE/ATL::CComSafeArray::Resize", "ATLSAFE/ATL::CComSafeArray::SetAt", "ATLSAFE/ATL::CComSafeArray::m_psa"]
helpviewer_keywords: ["CComSafeArray class"]
-ms.assetid: ee349aef-33db-4c85-bd08-5d86a3c9d53a
---
-# CComSafeArray Class
+# `CComSafeArray` Class
This class is a wrapper for the `SAFEARRAY` structure.
## Syntax
-```
+```cpp
template ::type>
class CComSafeArray
```
-#### Parameters
+### Parameters
-*T*
+*`T`*\
The type of data to be stored in the array.
## Members
@@ -27,90 +27,90 @@ The type of data to be stored in the array.
|Name|Description|
|----------|-----------------|
-|[CComSafeArray::CComSafeArray](#ccomsafearray)|The constructor.|
-|[CComSafeArray::~CComSafeArray](#dtor)|The destructor.|
+|[`CComSafeArray::CComSafeArray`](#ccomsafearray)|The constructor.|
+|[`CComSafeArray::~CComSafeArray`](#dtor)|The destructor.|
### Public Methods
|Name|Description|
|----------|-----------------|
-|[CComSafeArray::Add](#add)|Adds one or more elements, or a `SAFEARRAY` structure, to a `CComSafeArray`.|
-|[CComSafeArray::Attach](#attach)|Attaches a `SAFEARRAY` structure to a `CComSafeArray` object.|
-|[CComSafeArray::CopyFrom](#copyfrom)|Copies the contents of a `SAFEARRAY` structure into the `CComSafeArray` object.|
-|[CComSafeArray::CopyTo](#copyto)|Creates a copy of the `CComSafeArray` object.|
-|[CComSafeArray::Create](#create)|Creates a `CComSafeArray` object.|
-|[CComSafeArray::Destroy](#destroy)|Destroys a `CComSafeArray` object.|
-|[CComSafeArray::Detach](#detach)|Detaches a `SAFEARRAY` from a `CComSafeArray` object.|
-|[CComSafeArray::GetAt](#getat)|Retrieves a single element from a single-dimensional array.|
-|[CComSafeArray::GetCount](#getcount)|Returns the number of elements in the array.|
-|[CComSafeArray::GetDimensions](#getdimensions)|Returns the number of dimensions in the array.|
-|[CComSafeArray::GetLowerBound](#getlowerbound)|Returns the lower bound for a given dimension of the array.|
-|[CComSafeArray::GetSafeArrayPtr](#getsafearrayptr)|Returns the address of the `m_psa` data member.|
-|[CComSafeArray::GetType](#gettype)|Returns the type of data stored in the array.|
-|[CComSafeArray::GetUpperBound](#getupperbound)|Returns the upper bound for any dimension of the array.|
-|[CComSafeArray::IsSizable](#issizable)|Tests if a `CComSafeArray` object can be resized.|
-|[CComSafeArray::MultiDimGetAt](#multidimgetat)|Retrieves a single element from a multidimensional array.|
-|[CComSafeArray::MultiDimSetAt](#multidimsetat)|Sets the value of an element in a multidimensional array.|
-|[CComSafeArray::Resize](#resize)|Resizes a `CComSafeArray` object.|
-|[CComSafeArray::SetAt](#setat)|Sets the value of an element in a single-dimensional array.|
+|[`CComSafeArray::Add`](#add)|Adds one or more elements, or a `SAFEARRAY` structure, to a `CComSafeArray`.|
+|[`CComSafeArray::Attach`](#attach)|Attaches a `SAFEARRAY` structure to a `CComSafeArray` object.|
+|[`CComSafeArray::CopyFrom`](#copyfrom)|Copies the contents of a `SAFEARRAY` structure into the `CComSafeArray` object.|
+|[`CComSafeArray::CopyTo`](#copyto)|Creates a copy of the `CComSafeArray` object.|
+|[`CComSafeArray::Create`](#create)|Creates a `CComSafeArray` object.|
+|[`CComSafeArray::Destroy`](#destroy)|Destroys a `CComSafeArray` object.|
+|[`CComSafeArray::Detach`](#detach)|Detaches a `SAFEARRAY` from a `CComSafeArray` object.|
+|[`CComSafeArray::GetAt`](#getat)|Retrieves a single element from a single-dimensional array.|
+|[`CComSafeArray::GetCount`](#getcount)|Returns the number of elements in the array.|
+|[`CComSafeArray::GetDimensions`](#getdimensions)|Returns the number of dimensions in the array.|
+|[`CComSafeArray::GetLowerBound`](#getlowerbound)|Returns the lower bound for a given dimension of the array.|
+|[`CComSafeArray::GetSafeArrayPtr`](#getsafearrayptr)|Returns the address of the `m_psa` data member.|
+|[`CComSafeArray::GetType`](#gettype)|Returns the type of data stored in the array.|
+|[`CComSafeArray::GetUpperBound`](#getupperbound)|Returns the upper bound for any dimension of the array.|
+|[`CComSafeArray::IsSizable`](#issizable)|Tests if a `CComSafeArray` object can be resized.|
+|[`CComSafeArray::MultiDimGetAt`](#multidimgetat)|Retrieves a single element from a multidimensional array.|
+|[`CComSafeArray::MultiDimSetAt`](#multidimsetat)|Sets the value of an element in a multidimensional array.|
+|[`CComSafeArray::Resize`](#resize)|Resizes a `CComSafeArray` object.|
+|[`CComSafeArray::SetAt`](#setat)|Sets the value of an element in a single-dimensional array.|
### Public Operators
|Name|Description|
|----------|-----------------|
-|[CComSafeArray::operator LPSAFEARRAY](#operator_lpsafearray)|Casts a value to a `SAFEARRAY` pointer.|
-|[CComSafeArray::operator\[\]](ccomsafearray-class.md#operator_at)|Retrieves an element from the array.|
-|[CComSafeArray::operator =](#operator_eq)|Assignment operator.|
+|[`CComSafeArray::operator LPSAFEARRAY`](#operator_lpsafearray)|Casts a value to a `SAFEARRAY` pointer.|
+|[`CComSafeArray::operator[]`](ccomsafearray-class.md#operator_at)|Retrieves an element from the array.|
+|[`CComSafeArray::operator =`](#operator_eq)|Assignment operator.|
### Public Data Members
|Name|Description|
|----------|-----------------|
-|[CComSafeArray::m_psa](#m_psa)|This data member holds the address of the `SAFEARRAY` structure.|
+|[`CComSafeArray::m_psa`](#m_psa)|This data member holds the address of the `SAFEARRAY` structure.|
## Remarks
-`CComSafeArray` provides a wrapper for the [SAFEARRAY Data Type](/windows/win32/api/oaidl/ns-oaidl-safearray) class, making it a simple matter to create and manage single- and multidimensional arrays of almost any of the VARIANT-supported types.
+`CComSafeArray` provides a wrapper for the [`SAFEARRAY` data type](/windows/win32/api/oaidl/ns-oaidl-safearray) class, making it a simple matter to create and manage single- and multidimensional arrays of almost any of the supported `VARIANT` types.
`CComSafeArray` simplifies passing arrays between processes, and in addition provides extra security by checking array index values against upper and lower bounds.
The lower bound of a `CComSafeArray` can start at any user-defined value; however, arrays that are accessed through C++ should use a lower bound of 0. Other languages such as Visual Basic may use other bounding values (for example, -10 to 10).
-Use [CComSafeArray::Create](#create) to create a `CComSafeArray` object, and [CComSafeArray::Destroy](#destroy) to delete it.
-
-A `CComSafeArray` can contain the following subset of VARIANT data types:
-
-|VARTYPE|Description|
-|-------------|-----------------|
-|VT_I1|char|
-|VT_I2|short|
-|VT_I4|int|
-|VT_I4|long|
-|VT_I8|longlong|
-|VT_UI1|byte|
-|VT_UI2|ushort|
-|VT_UI4|uint|
-|VT_UI4|ulong|
-|VT_UI8|ulonglong|
-|VT_R4|float|
-|VT_R8|double|
-|VT_DECIMAL|decimal pointer|
-|VT_VARIANT|variant pointer|
-|VT_CY|Currency data type|
+Use [`CComSafeArray::Create`](#create) to create a `CComSafeArray` object, and [`CComSafeArray::Destroy`](#destroy) to delete it.
+
+A `CComSafeArray` can contain the following subset of `VARIANT` data types:
+
+| `VARTYPE` | Description |
+|--|--|
+| `VT_I1` | `char` |
+| `VT_I2` | `short` |
+| `VT_I4` | `int` |
+| `VT_I4` | `long` |
+| `VT_I8` | `longlong` |
+| `VT_UI1` | `byte` |
+| `VT_UI2` | `ushort` |
+| `VT_UI4` | `uint` |
+| `VT_UI4` | `ulong` |
+| `VT_UI8` | `ulonglong` |
+| `VT_R4` | `float` |
+| `VT_R8` | `double` |
+| `VT_DECIMAL` | decimal pointer |
+| `VT_VARIANT` | variant pointer |
+| `VT_CY` | Currency data type |
## Requirements
-**Header:** atlsafe.h
+**Header:** `atlsafe.h`
## Example
[!code-cpp[NVC_ATL_Utilities#75](../../atl/codesnippet/cpp/ccomsafearray-class_1.cpp)]
-## CComSafeArray::Add
+## `CComSafeArray::Add`
Adds one or more elements, or a `SAFEARRAY` structure, to a `CComSafeArray`.
-```
+```cpp
HRESULT Add(const SAFEARRAY* psaSrc);
HRESULT Add(ULONG ulCount, const T* pT, BOOL bCopy = TRUE);
HRESULT Add(const T& t, BOOL bCopy = TRUE);
@@ -118,57 +118,57 @@ HRESULT Add(const T& t, BOOL bCopy = TRUE);
### Parameters
-*psaSrc*
+*`psaSrc`*\
A pointer to a `SAFEARRAY` object.
-*ulCount*
+*`ulCount`*\
The number of objects to add to the array.
-*pT*
+*`pT`*\
A pointer to one or more objects to be added to the array.
-*t*
+*`t`*\
A reference to the object to be added to the array.
-*bCopy*
-Indicates whether a copy of the data should be created. The default value is TRUE.
+*`bCopy`*\
+Indicates whether a copy of the data should be created. The default value is `TRUE`.
-### Return Value
+### Return value
-Returns S_OK on success, or an error HRESULT on failure.
+Returns `S_OK` on success, or an error `HRESULT` on failure.
### Remarks
-The new objects are appended to the end of the existing `SAFEARRAY` object. Adding an object to a multidimensional `SAFEARRAY` object is not supported. When adding an existing array of objects, both arrays must contain elements of the same type.
+The new objects are appended to the end of the existing `SAFEARRAY` object. Adding an object to a multidimensional `SAFEARRAY` object isn't supported. When adding an existing array of objects, both arrays must contain elements of the same type.
-The *bCopy* flag is taken into account when elements of type BSTR or VARIANT are added to an array. The default value of TRUE ensures that a new copy is made of the data when the element is added to the array.
+The *`bCopy`* flag is taken into account when elements of type `BSTR` or `VARIANT` are added to an array. The default value of `TRUE` ensures that a new copy is made of the data when the element is added to the array.
-## CComSafeArray::Attach
+## `CComSafeArray::Attach`
Attaches a `SAFEARRAY` structure to a `CComSafeArray` object.
-```
+```cpp
HRESULT Attach(const SAFEARRAY* psaSrc);
```
### Parameters
-*psaSrc*
+*`psaSrc`*\
A pointer to the `SAFEARRAY` structure.
-### Return Value
+### Return value
-Returns S_OK on success, or an error HRESULT on failure.
+Returns `S_OK` on success, or an error `HRESULT` on failure.
### Remarks
Attaches a `SAFEARRAY` structure to a `CComSafeArray` object, making the existing `CComSafeArray` methods available.
-## CComSafeArray::CComSafeArray
+## `CComSafeArray::CComSafeArray`
The constructor.
-```
+```cpp
CComSafeArray();
CComSafeArray(const SAFEARRAYBOUND& bound);
CComSafeArray(ULONG ulCount, LONG lLBound = 0);
@@ -180,36 +180,36 @@ CComSafeArray(const SAFEARRAY* psaSrc);
### Parameters
-*bound*
+*`bound`*\
A `SAFEARRAYBOUND` structure.
-*ulCount*
+*`ulCount`*\
The number of elements in the array.
-*lLBound*
+*`lLBound`*\
The lower bound value; that is, the index of the first element in the array.
-*pBound*
+*`pBound`*\
A pointer to a `SAFEARRAYBOUND` structure.
-*uDims*
+*`uDims`*\
The count of dimensions in the array.
-*saSrc*
-A reference to a `SAFEARRAY` structure or `CComSafeArray` object. In either case the constructor uses this reference to make a copy of the array, so the array is not referenced after construction.
+*`saSrc`*\
+A reference to a `SAFEARRAY` structure or `CComSafeArray` object. In either case, the constructor uses this reference to make a copy of the array, so the array isn't referenced after construction.
-*psaSrc*
-A pointer to a `SAFEARRAY` structure. The constructor uses this address to make a copy of the array, so the array is not referenced after construction.
+*`psaSrc`*\
+A pointer to a `SAFEARRAY` structure. The constructor uses this address to make a copy of the array, so the array is never referenced after construction.
### Remarks
Creates a `CComSafeArray` object.
-## CComSafeArray::~CComSafeArray
+## `CComSafeArray::~CComSafeArray`
The destructor.
-```
+```cpp
~CComSafeArray() throw()
```
@@ -217,104 +217,104 @@ The destructor.
Frees all allocated resources.
-## CComSafeArray::CopyFrom
+## `CComSafeArray::CopyFrom`
Copies the contents of a `SAFEARRAY` structure into the `CComSafeArray` object.
-```
+```cpp
HRESULT CopyFrom(LPSAFEARRAY* ppArray);
```
### Parameters
-*ppArray*
+*`ppArray`*\
Pointer to the `SAFEARRAY` to copy.
-### Return Value
+### Return value
-Returns S_OK on success, or an error HRESULT on failure.
+Returns `S_OK` on success, or an error `HRESULT` on failure.
### Remarks
This method copies the contents of a `SAFEARRAY` into the current `CComSafeArray` object. The existing contents of the array are replaced.
-## CComSafeArray::CopyTo
+## `CComSafeArray::CopyTo`
Creates a copy of the `CComSafeArray` object.
-```
+```cpp
HRESULT CopyTo(LPSAFEARRAY* ppArray);
```
### Parameters
-*ppArray*
+*`ppArray`*\
A pointer to a location in which to create the new `SAFEARRAY`.
-### Return Value
+### Return value
-Returns S_OK on success, or an error HRESULT on failure.
+Returns `S_OK` on success, or an error `HRESULT` on failure.
### Remarks
This method copies the contents of a `CComSafeArray` object into a `SAFEARRAY` structure.
-## CComSafeArray::Create
+## `CComSafeArray::Create`
Creates a `CComSafeArray`.
-```
+```cpp
HRESULT Create(const SAFEARRAYBOUND* pBound, UINT uDims = 1);
HRESULT Create(ULONG ulCount = 0, LONG lLBound = 0);
```
### Parameters
-*pBound*
+*`pBound`*\
A pointer to a `SAFEARRAYBOUND` object.
-*uDims*
+*`uDims`*\
The number of dimensions in the array.
-*ulCount*
+*`ulCount`*\
The number of elements in the array.
-*lLBound*
+*`lLBound`*\
The lower bound value; that is, the index of the first element in the array.
-### Return Value
+### Return value
-Returns S_OK on success, or an error HRESULT on failure.
+Returns `S_OK` on success, or an error `HRESULT` on failure.
### Remarks
A `CComSafeArray` object can be created from an existing `SAFEARRAYBOUND` structure and the number of dimensions, or by specifying the number of elements in the array and the lower bound. If the array is to be accessed from C++, the lower bound should be 0. Other languages may allow other values for the lower bound (for example, Visual Basic supports arrays with elements with a range such as -10 to 10).
-## CComSafeArray::Destroy
+## `CComSafeArray::Destroy`
Destroys a `CComSafeArray` object.
-```
+```cpp
HRESULT Destroy();
```
-### Return Value
+### Return value
-Returns S_OK on success, or an error HRESULT on failure.
+Returns `S_OK` on success, or an error `HRESULT` on failure.
### Remarks
Destroys an existing `CComSafeArray` object and all of the data it contains.
-## CComSafeArray::Detach
+## `CComSafeArray::Detach`
Detaches a `SAFEARRAY` from a `CComSafeArray` object.
-```
+```cpp
LPSAFEARRAY Detach();
```
-### Return Value
+### Return value
Returns a pointer to a `SAFEARRAY` object.
@@ -322,37 +322,37 @@ Returns a pointer to a `SAFEARRAY` object.
This method detaches the `SAFEARRAY` object from the `CComSafeArray` object.
-## CComSafeArray::GetAt
+## `CComSafeArray::GetAt`
Retrieves a single element from a single-dimensional array.
-```
+```cpp
T& GetAt(LONG lIndex) const;
```
### Parameters
-*lIndex*
+*`lIndex`*\
The index number of the value in the array to return.
-### Return Value
+### Return value
Returns a reference to the required array element.
-## CComSafeArray::GetCount
+## `CComSafeArray::GetCount`
Returns the number of elements in the array.
-```
+```cpp
ULONG GetCount(UINT uDim = 0) const;
```
### Parameters
-*uDim*
+*`uDim`*\
The array dimension.
-### Return Value
+### Return value
Returns the number of elements in the array.
@@ -360,279 +360,279 @@ Returns the number of elements in the array.
When used with a multidimensional array, this method will return the number of elements in a specific dimension only.
-## CComSafeArray::GetDimensions
+## `CComSafeArray::GetDimensions`
Returns the number of dimensions in the array.
-```
+```cpp
UINT GetDimensions() const;
```
-### Return Value
+### Return value
Returns the number of dimensions in the array.
-## CComSafeArray::GetLowerBound
+## `CComSafeArray::GetLowerBound`
Returns the lower bound for a given dimension of the array.
-```
+```cpp
LONG GetLowerBound(UINT uDim = 0) const;
```
### Parameters
-*uDim*
+*`uDim`*\
The array dimension for which to get the lower bound. If omitted, the default is 0.
-### Return Value
+### Return value
Returns the lower bound.
### Remarks
-If the lower bound is 0, this indicates a C-like array whose first element is element number 0. In the event of an error, for example, an invalid dimension argument, this method calls `AtlThrow` with an HRESULT describing the error.
+If the lower bound is 0, this indicates a C-like array whose first element is element number 0. In the event of an error, for example, an invalid dimension argument, this method calls `AtlThrow` with an `HRESULT` describing the error.
-## CComSafeArray::GetSafeArrayPtr
+## `CComSafeArray::GetSafeArrayPtr`
Returns the address of the `m_psa` data member.
-```
+```cpp
LPSAFEARRAY* GetSafeArrayPtr() throw();
```
-### Return Value
+### Return value
-Returns a pointer to the [CComSafeArray::m_psa](#m_psa) data member.
+Returns a pointer to the [`CComSafeArray::m_psa`](#m_psa) data member.
-## CComSafeArray::GetType
+## `CComSafeArray::GetType`
Returns the type of data stored in the array.
-```
+```cpp
VARTYPE GetType() const;
```
-### Return Value
+### Return value
Returns the type of data stored in the array, which could be any of the following types:
-|VARTYPE|Description|
-|-------------|-----------------|
-|VT_I1|char|
-|VT_I2|short|
-|VT_I4|int|
-|VT_I4|long|
-|VT_I8|longlong|
-|VT_UI1|byte|
-|VT_UI2|ushort|
-|VT_UI4|uint|
-|VT_UI4|ulong|
-|VT_UI8|ulonglong|
-|VT_R4|float|
-|VT_R8|double|
-|VT_DECIMAL|decimal pointer|
-|VT_VARIANT|variant pointer|
-|VT_CY|Currency data type|
-
-## CComSafeArray::GetUpperBound
+| `VARTYPE` | Description |
+|--|--|
+| `VT_I1` | `char` |
+| `VT_I2` | `short` |
+| `VT_I4` | `int` |
+| `VT_I4` | `long` |
+| `VT_I8` | `longlong` |
+| `VT_UI1` | `byte` |
+| `VT_UI2` | `ushort` |
+| `VT_UI4` | `uint` |
+| `VT_UI4` | `ulong` |
+| `VT_UI8` | `ulonglong` |
+| `VT_R4` | `float` |
+| `VT_R8` | `double` |
+| `VT_DECIMAL` | decimal pointer |
+| `VT_VARIANT` | variant pointer |
+| `VT_CY` | Currency data type |
+
+## `CComSafeArray::GetUpperBound`
Returns the upper bound for any dimension of the array.
-```
+```cpp
LONG GetUpperBound(UINT uDim = 0) const;
```
### Parameters
-*uDim*
+*`uDim`*\
The array dimension for which to get the upper bound. If omitted, the default is 0.
-### Return Value
+### Return value
Returns the upper bound. This value is inclusive, the maximum valid index for this dimension.
### Remarks
-In the event of an error, for example, an invalid dimension argument, this method calls `AtlThrow` with an HRESULT describing the error.
+In the event of an error, for example, an invalid dimension argument, this method calls `AtlThrow` with an `HRESULT` describing the error.
-## CComSafeArray::IsSizable
+## `CComSafeArray::IsSizable`
Tests if a `CComSafeArray` object can be resized.
-```
+```cpp
bool IsSizable() const;
```
-### Return Value
+### Return value
-Returns TRUE if the `CComSafeArray` can be resized, FALSE if it cannot.
+Returns `TRUE` if the `CComSafeArray` can be resized, `FALSE` if it cannot.
-## CComSafeArray::m_psa
+## `CComSafeArray::m_psa`
Holds the address of the `SAFEARRAY` structure accessed.
-```
+```cpp
LPSAFEARRAY m_psa;
```
-## CComSafeArray::MultiDimGetAt
+## `CComSafeArray::MultiDimGetAt`
Retrieves a single element from a multidimensional array.
-```
+```cpp
HRESULT MultiDimGetAt(const LONG* alIndex, T& t);
```
### Parameters
-*alIndex*
+*`alIndex`*\
Pointer to a vector of indexes for each dimension in the array. The leftmost (most significant) dimension is `alIndex[0]`.
-*t*
+*`t`*\
A reference to the data returned.
-### Return Value
+### Return value
-Returns S_OK on success, or an error HRESULT on failure.
+Returns `S_OK` on success, or an error `HRESULT` on failure.
-## CComSafeArray::MultiDimSetAt
+## `CComSafeArray::MultiDimSetAt`
Sets the value of an element in a multidimensional array.
-```
+```cpp
HRESULT MultiDimSetAt(const LONG* alIndex, const T& t);
```
### Parameters
-*alIndex*
-Pointer to a vector of indexes for each dimension in the array. The rightmost (least significant) dimension is `alIndex`[0].
+*`alIndex`*\
+Pointer to a vector of indexes for each dimension in the array. The rightmost (least significant) dimension is `alIndex[0]`.
-*T*
+*`T`*\
Specifies the value of the new element.
-### Return Value
+### Return value
-Returns S_OK on success, or an error HRESULT on failure.
+Returns `S_OK` on success, or an error `HRESULT` on failure.
### Remarks
-This is a multidimensional version of [CComSafeArray::SetAt](#setat).
+This is a multidimensional version of [`CComSafeArray::SetAt`](#setat).
-## CComSafeArray::operator \[\]
+## `CComSafeArray::operator []`
Retrieves an element from the array.
-```
+```cpp
T& operator[](long lindex) const;
-T& operator[]int nindex) const;
+T& operator[](int nindex) const;
```
### Parameters
-*lIndex, nIndex*
+*`lIndex`*, *`nIndex`*\
The index number of the required element in the array.
-### Return Value
+### Return value
Returns the appropriate array element.
### Remarks
-Performs a similar function to [CComSafeArray::GetAt](#getat), however this operator only works with single-dimensional arrays.
+Performs a similar function to [`CComSafeArray::GetAt`](#getat), however this operator only works with single-dimensional arrays.
-## CComSafeArray::operator =
+## `CComSafeArray::operator =`
Assignment operator.
-```
+```cpp
ATL::CComSafeArray& operator=(const ATL::CComSafeArray& saSrc);
ATL::CComSafeArray& operator=(const SAFEARRAY* psaSrc);
```
### Parameters
-*saSrc*
+*`saSrc`*\
A reference to a `CComSafeArray` object.
-*psaSrc*
+*`psaSrc`*\
A pointer to a `SAFEARRAY` object.
-### Return Value
+### Return value
Returns the type of data stored in the array.
-## CComSafeArray::operator LPSAFEARRAY
+## `CComSafeArray::operator LPSAFEARRAY`
Casts a value to a `SAFEARRAY` pointer.
-```
+```cpp
operator LPSAFEARRAY() const;
```
-### Return Value
+### Return value
Casts a value to a `SAFEARRAY` pointer.
-## CComSafeArray::Resize
+## `CComSafeArray::Resize`
Resizes a `CComSafeArray` object.
-```
+```cpp
HRESULT Resize(const SAFEARRAYBOUND* pBound);
HRESULT Resize(ULONG ulCount, LONG lLBound = 0);
```
### Parameters
-*pBound*
+*`pBound`*\
A pointer to a `SAFEARRAYBOUND` structure that contains information on the number of elements and the lower bound of an array.
-*ulCount*
+*`ulCount`*\
The requested number of objects in the resized array.
-*lLBound*
+*`lLBound`*\
The lower bound.
-### Return Value
+### Return value
-Returns S_OK on success, or an error HRESULT on failure.
+Returns `S_OK` on success, or an error `HRESULT` on failure.
### Remarks
-This method only resizes the rightmost dimension. It will not resize arrays that return `IsResizable` as FALSE.
+This method only resizes the rightmost dimension. It will not resize arrays that return `IsResizable` as `FALSE`.
-## CComSafeArray::SetAt
+## `CComSafeArray::SetAt`
Sets the value of an element in a single-dimensional array.
-```
+```cpp
HRESULT SetAt(LONG lIndex, const T& t, BOOL bCopy = TRUE);
```
### Parameters
-*lIndex*
+*`lIndex`*\
The index number of the array element to set.
-*t*
+*`t`*\
The new value of the specified element.
-*bCopy*
-Indicates whether a copy of the data should be created. The default value is TRUE.
+*`bCopy`*\
+Indicates whether a copy of the data should be created. The default value is `TRUE`.
-### Return Value
+### Return value
-Returns S_OK on success, or an error HRESULT on failure.
+Returns `S_OK` on success, or an error `HRESULT` on failure.
### Remarks
-The *bCopy* flag is taken into account when elements of type BSTR or VARIANT are added to an array. The default value of TRUE ensures that a new copy is made of the data when the element is added to the array.
+The *`bCopy`* flag is taken into account when elements of type `BSTR` or `VARIANT` are added to an array. The default value of `TRUE` ensures that a new copy is made of the data when the element is added to the array.
## See also
-[SAFEARRAY Data Type](/windows/win32/api/oaidl/ns-oaidl-safearray)
-[CComSafeArray::Create](#create)
-[CComSafeArray::Destroy](#destroy)
+[`SAFEARRAY` Data Type](/windows/win32/api/oaidl/ns-oaidl-safearray)\
+[`CComSafeArray::Create`](#create)\
+[`CComSafeArray::Destroy`](#destroy)\
[Class Overview](../../atl/atl-class-overview.md)
diff --git a/docs/atl/reference/ccomsafearraybound-class.md b/docs/atl/reference/ccomsafearraybound-class.md
index f9447c01c3..fa65d7b399 100644
--- a/docs/atl/reference/ccomsafearraybound-class.md
+++ b/docs/atl/reference/ccomsafearraybound-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComSafeArrayBound Class"
title: "CComSafeArrayBound Class"
ms.date: "05/06/2019"
f1_keywords: ["CComSafeArrayBound", "ATLSAFE/ATL::CComSafeArrayBound", "ATLSAFE/ATL::GetCount", "ATLSAFE/ATL::GetLowerBound", "ATLSAFE/ATL::GetUpperBound", "ATLSAFE/ATL::SetCount", "ATLSAFE/ATL::SetLowerBound"]
@@ -19,7 +20,7 @@ class CComSafeArrayBound : public SAFEARRAYBOUND
### Methods
-|||
+|Function|Description|
|-|-|
|[CComSafeArrayBound](#ccomsafearraybound)|The constructor.|
|[GetCount](#getcount)|Call this method to return the number of elements.|
@@ -30,7 +31,7 @@ class CComSafeArrayBound : public SAFEARRAYBOUND
### Operators
-|||
+|Operator|Description|
|-|-|
|[operator =](#operator_eq)|Sets the `CComSafeArrayBound` to a new value.|
diff --git a/docs/atl/reference/ccomsafedeletecriticalsection-class.md b/docs/atl/reference/ccomsafedeletecriticalsection-class.md
index 9264fb7d33..1ece1377c3 100644
--- a/docs/atl/reference/ccomsafedeletecriticalsection-class.md
+++ b/docs/atl/reference/ccomsafedeletecriticalsection-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComSafeDeleteCriticalSection Class"
title: "CComSafeDeleteCriticalSection Class"
ms.date: "11/04/2016"
f1_keywords: ["CComSafeDeleteCriticalSection", "ATLCORE/ATL::CComSafeDeleteCriticalSection", "ATLCORE/ATL::CComSafeDeleteCriticalSection::CComSafeDeleteCriticalSection", "ATLCORE/ATL::CComSafeDeleteCriticalSection::Init", "ATLCORE/ATL::CComSafeDeleteCriticalSection::Lock", "ATLCORE/ATL::CComSafeDeleteCriticalSection::Term", "ATLCORE/ATL::m_bInitialized"]
@@ -34,7 +35,7 @@ class CComSafeDeleteCriticalSection : public CComCriticalSection
### Data Members
-|||
+|Data member|Description|
|-|-|
|[m_bInitialized](#m_binitialized)|Flags whether the internal `CRITICAL_SECTION` object has been initialized.|
diff --git a/docs/atl/reference/ccomsimplethreadallocator-class.md b/docs/atl/reference/ccomsimplethreadallocator-class.md
index 64ed616eed..3ba04a9ad2 100644
--- a/docs/atl/reference/ccomsimplethreadallocator-class.md
+++ b/docs/atl/reference/ccomsimplethreadallocator-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComSimpleThreadAllocator Class"
title: "CComSimpleThreadAllocator Class"
ms.date: "11/04/2016"
f1_keywords: ["CComSimpleThreadAllocator", "ATLBASE/ATL::CComSimpleThreadAllocator", "ATLBASE/ATL::CComSimpleThreadAllocator::GetThread"]
diff --git a/docs/atl/reference/ccomsinglethreadmodel-class.md b/docs/atl/reference/ccomsinglethreadmodel-class.md
index 5f0104a517..1fdb2f95db 100644
--- a/docs/atl/reference/ccomsinglethreadmodel-class.md
+++ b/docs/atl/reference/ccomsinglethreadmodel-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComSingleThreadModel Class"
title: "CComSingleThreadModel Class"
ms.date: "2/29/2020"
f1_keywords: ["CComSingleThreadModel", "ATLBASE/ATL::CComSingleThreadModel", "ATLBASE/ATL::CComSingleThreadModel::AutoCriticalSection", "ATLBASE/ATL::CComSingleThreadModel::CriticalSection", "ATLBASE/ATL::CComSingleThreadModel::ThreadModelNoCS", "ATLBASE/ATL::CComSingleThreadModel::Decrement", "ATLBASE/ATL::CComSingleThreadModel::Increment"]
diff --git a/docs/atl/reference/ccomtearoffobject-class.md b/docs/atl/reference/ccomtearoffobject-class.md
index 7db32f7d8a..42f6daf517 100644
--- a/docs/atl/reference/ccomtearoffobject-class.md
+++ b/docs/atl/reference/ccomtearoffobject-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComTearOffObject Class"
title: "CComTearOffObject Class"
ms.date: "11/04/2016"
f1_keywords: ["CComTearOffObject", "ATLCOM/ATL::CComTearOffObject", "ATLCOM/ATL::CComTearOffObject::CComTearOffObject", "ATLCOM/ATL::CComTearOffObject::AddRef", "ATLCOM/ATL::CComTearOffObject::QueryInterface", "ATLCOM/ATL::CComTearOffObject::Release", "ATLCOM/ATL::CComTearOffObjectBase", "ATLCOM/ATL::m_pOwner"]
@@ -42,13 +43,13 @@ ATL implements its tear-off interfaces in two phases — the `CComTearOffObjectB
### CComTearOffObjectBase Methods
-|||
+|Function|Description|
|-|-|
|[CComTearOffObjectBase](#ccomtearoffobjectbase)|Constructor.|
### CComTearOffObjectBase Data Members
-|||
+|Data member|Description|
|-|-|
|[m_pOwner](#m_powner)|A pointer to a `CComObject` derived from the owner class.|
diff --git a/docs/atl/reference/ccomunkarray-class.md b/docs/atl/reference/ccomunkarray-class.md
index 3cda3831b3..dcdc5ecd76 100644
--- a/docs/atl/reference/ccomunkarray-class.md
+++ b/docs/atl/reference/ccomunkarray-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CComUnkArray Class"
title: "CComUnkArray Class"
ms.date: "11/04/2016"
f1_keywords: ["CComUnkArray", "ATLCOM/ATL::CComUnkArray", "ATLCOM/ATL::CComUnkArray::CComUnkArray", "ATLCOM/ATL::CComUnkArray::Add", "ATLCOM/ATL::CComUnkArray::begin", "ATLCOM/ATL::CComUnkArray::end", "ATLCOM/ATL::CComUnkArray::GetCookie", "ATLCOM/ATL::CComUnkArray::GetUnknown", "ATLCOM/ATL::CComUnkArray::Remove"]
diff --git a/docs/atl/reference/ccomvariant-class.md b/docs/atl/reference/ccomvariant-class.md
index ba18ff739f..e3b806e113 100644
--- a/docs/atl/reference/ccomvariant-class.md
+++ b/docs/atl/reference/ccomvariant-class.md
@@ -1,13 +1,13 @@
---
-title: "CComVariant Class"
+description: "Learn more about: CComVariant class"
+title: "CComVariant class"
ms.date: "11/04/2016"
f1_keywords: ["CComVariant", "ATLCOMCLI/ATL::CComVariant", "ATLCOMCLI/ATL::CComVariant::CComVariant", "ATLCOMCLI/ATL::CComVariant::Attach", "ATLCOMCLI/ATL::CComVariant::ChangeType", "ATLCOMCLI/ATL::CComVariant::Clear", "ATLCOMCLI/ATL::CComVariant::Copy", "ATLCOMCLI/ATL::CComVariant::CopyTo", "ATLCOMCLI/ATL::CComVariant::Detach", "ATLCOMCLI/ATL::CComVariant::GetSize", "ATLCOMCLI/ATL::CComVariant::ReadFromStream", "ATLCOMCLI/ATL::CComVariant::SetByRef", "ATLCOMCLI/ATL::CComVariant::WriteToStream"]
helpviewer_keywords: ["VARIANT macro", "CComVariant class", "VARIANT macro, ATL"]
-ms.assetid: 4d31149c-d005-44b5-a509-10f84afa2b61
---
-# CComVariant Class
+# `CComVariant` class
-This class wraps the VARIANT type, providing a member indicating the type of data stored.
+This class wraps the `VARIANT` type, providing a member indicating the type of data stored.
## Syntax
@@ -17,80 +17,79 @@ class CComVariant : public tagVARIANT
## Members
-### Public Constructors
-
-|Name|Description|
-|----------|-----------------|
-|[CComVariant::CComVariant](#ccomvariant)|The constructor.|
-|[CComVariant::~CComVariant](#dtor)|The destructor.|
-
-### Public Methods
-
-|Name|Description|
-|----------|-----------------|
-|[CComVariant::Attach](#attach)|Attaches a VARIANT to the `CComVariant` object.|
-|[CComVariant::ChangeType](#changetype)|Converts the `CComVariant` object to a new type.|
-|[CComVariant::Clear](#clear)|Clears the `CComVariant` object.|
-|[CComVariant::Copy](#copy)|Copies a VARIANT to the `CComVariant` object.|
-|[CComVariant::CopyTo](#copyto)|Copies the contents of the `CComVariant` object.|
-|[CComVariant::Detach](#detach)|Detaches the underlying VARIANT from the `CComVariant` object.|
-|[CComVariant::GetSize](#getsize)|Returns the size in number of bytes of the contents of the `CComVariant` object.|
-|[CComVariant::ReadFromStream](#readfromstream)|Loads a VARIANT from a stream.|
-|[CComVariant::SetByRef](#setbyref)|Initializes the `CComVariant` object and sets the `vt` member to VT_BYREF.|
-|[CComVariant::WriteToStream](#writetostream)|Saves the underlying VARIANT to a stream.|
-
-### Public Operators
-
-|||
-|-|-|
-|[CComVariant::operator <](#operator_lt)|Indicates whether the `CComVariant` object is less than the specified VARIANT.|
-|[CComVariant::operator >](#operator_gt)|Indicates whether the `CComVariant` object is greater than the specified VARIANT.|
-|[operator !=](#operator_neq)|Indicates whether the `CComVariant` object does not equal the specified VARIANT.|
-|[operator =](#operator_eq)|Assigns a value to the `CComVariant` object.|
-|[operator ==](#operator_eq_eq)|Indicates whether the `CComVariant` object equals the specified VARIANT.|
+### Public constructors
+
+| Name | Description |
+|--|--|
+| [`CComVariant::CComVariant`](#ccomvariant) | The constructor. |
+| [`CComVariant::~CComVariant`](#dtor) | The destructor. |
+
+### Public methods
+
+| Name | Description |
+|--|--|
+| [`CComVariant::Attach`](#attach) | Attaches a `VARIANT` to the `CComVariant` object. |
+| [`CComVariant::ChangeType`](#changetype) | Converts the `CComVariant` object to a new type. |
+| [`CComVariant::Clear`](#clear) | Clears the `CComVariant` object. |
+| [`CComVariant::Copy`](#copy) | Copies a `VARIANT` to the `CComVariant` object. |
+| [`CComVariant::CopyTo`](#copyto) | Copies the contents of the `CComVariant` object. |
+| [`CComVariant::Detach`](#detach) | Detaches the underlying `VARIANT` from the `CComVariant` object. |
+| [`CComVariant::GetSize`](#getsize) | Returns the size in number of bytes of the contents of the `CComVariant` object. |
+| [`CComVariant::ReadFromStream`](#readfromstream) | Loads a `VARIANT` from a stream. |
+| [`CComVariant::SetByRef`](#setbyref) | Initializes the `CComVariant` object and sets the `vt` member to `VT_BYREF`. |
+| [`CComVariant::WriteToStream`](#writetostream) | Saves the underlying `VARIANT` to a stream. |
+
+### Public operators
+
+| Operator | Description |
+|--|--|
+| [`CComVariant::operator <`](#operator_lt) | Indicates whether the `CComVariant` object is less than the specified `VARIANT`. |
+| [`CComVariant::operator >`](#operator_gt) | Indicates whether the `CComVariant` object is greater than the specified `VARIANT`. |
+| [`CComVariant::operator !=`](#operator_neq) | Indicates whether the `CComVariant` object doesn't equal the specified `VARIANT`. |
+| [`CComVariant::operator =`](#operator_eq) | Assigns a value to the `CComVariant` object. |
+| [`CComVariant::operator ==`](#operator_eq_eq) | Indicates whether the `CComVariant` object equals the specified `VARIANT`. |
## Remarks
-`CComVariant` wraps the VARIANT and VARIANTARG type, which consists of a union and a member indicating the type of the data stored in the union. VARIANTs are typically used in Automation.
+`CComVariant` wraps the `VARIANT` and `VARIANTARG` type, which consists of a union and a member indicating the type of the data stored in the union. `VARIANT`s are typically used in Automation.
-`CComVariant` derives from the VARIANT type so it can be used wherever a VARIANT can be used. You can, for example, use the V_VT macro to extract the type of a `CComVariant` or you can access the `vt` member directly just as you can with a VARIANT.
+`CComVariant` derives from the `VARIANT` type so it can be used wherever a `VARIANT` can be used. You can, for example, use the `V_VT` macro to extract the type of a `CComVariant` or you can access the `vt` member directly just as you can with a `VARIANT`.
-## Inheritance Hierarchy
+## Inheritance hierarchy
-`tagVARIANT`
-
-`CComVariant`
+[`tagVARIANT`](/windows/win32/api/oaidl/ns-oaidl-variant)\
+ └ [`CComVariant`](ccomvariant-class.md)
## Requirements
-**Header:** atlcomcli.h
+**Header:** `atlcomcli.h`
-## CComVariant::Attach
+## `CComVariant::Attach`
-Safely clears the current contents of the `CComVariant` object, copies the contents of *pSrc* into this object, then sets the variant type of *pSrc* to VT_EMPTY.
+Safely clears the current contents of the `CComVariant` object, copies the contents of *`pSrc`* into this object, then sets the variant type of *`pSrc`* to `VT_EMPTY`.
-```
+```cpp
HRESULT Attach(VARIANT* pSrc);
```
### Parameters
-*pSrc*
-[in] Points to the [VARIANT](/windows/win32/api/oaidl/ns-oaidl-variant) to be attached to the object.
+*`pSrc`*\
+[in] Points to the [`VARIANT`](/windows/win32/api/oaidl/ns-oaidl-variant) to be attached to the object.
-### Return Value
+### Return value
-A standard HRESULT value.
+A standard `HRESULT` value.
### Remarks
-Ownership of the data held by *pSrc* is transferred to the `CComVariant` object.
+Ownership of the data held by *`pSrc`* is transferred to the `CComVariant` object.
-## CComVariant::CComVariant
+## `CComVariant::CComVariant`
Each constructor handles the safe initialization of the `CComVariant` object by calling the `VariantInit` Win32 function or by setting the object's value and type according to the parameters passed.
-```
+```cpp
CComVariant() throw();
CComVariant(const CComVariant& varSrc);
CComVariant(const VARIANT& varSrc);
@@ -118,181 +117,181 @@ CComVariant(const CComBSTR& bstrSrc);
### Parameters
-*varSrc*
-[in] The `CComVariant` or VARIANT used to initialize the `CComVariant` object. The contents of the source variant are copied to the destination without conversion.
+*`varSrc`*\
+[in] The `CComVariant` or `VARIANT` used to initialize the `CComVariant` object. The contents of the source variant are copied to the destination without conversion.
-*lpszSrc*
-[in] The character string used to initialize the `CComVariant` object. You can pass a zero-terminated wide (Unicode) character string to the LPCOLESTR version of the constructor or an ANSI string to the LPCSTR version. In either case the string is converted to a Unicode BSTR allocated using `SysAllocString`. The type of the `CComVariant` object will be VT_BSTR.
+*`lpszSrc`*\
+[in] The character string used to initialize the `CComVariant` object. You can pass a zero-terminated wide (Unicode) character string to the `LPCOLESTR` version of the constructor or an ANSI string to the `LPCSTR` version. In either case, the string is converted to a Unicode `BSTR` allocated using `SysAllocString`. The type of the `CComVariant` object is `VT_BSTR`.
-*bSrc*
-[in] The **`bool`** used to initialize the `CComVariant` object. The **`bool`** argument is converted to a VARIANT_BOOL before being stored. The type of the `CComVariant` object will be VT_BOOL.
+*`bSrc`*\
+[in] The **`bool`** used to initialize the `CComVariant` object. The **`bool`** argument is converted to a `VARIANT_BOOL` before being stored. The type of the `CComVariant` object is `VT_BOOL`.
-*nSrc*
-[in] The **`int`**, **BYTE**, **`short`**, **`long`**, LONGLONG, ULONGLONG, **`unsigned short`**, **`unsigned long`**, or **`unsigned int`** used to initialize the `CComVariant` object. The type of the `CComVariant` object will be VT_I4, VT_UI1, VT_I2, VT_I4, VT_I8, VT_UI8, VT_UI2, VT_UI4, or VT_UI4, respectively.
+*`nSrc`*\
+[in] The **`int`**, `BYTE`, **`short`**, **`long`**, `LONGLONG`, `ULONGLONG`, **`unsigned short`**, **`unsigned long`**, or **`unsigned int`** used to initialize the `CComVariant` object. The type of the `CComVariant` object is `VT_I4`, `VT_UI1`, `VT_I2`, `VT_I4`, `VT_I8`, `VT_UI8`, `VT_UI2`, `VT_UI4`, or `VT_UI4`, respectively.
-*vtSrc*
-[in] The type of the variant. When the first parameter is **`int`**, valid types are VT_I4 and VT_INT. When the first parameter is **`long`**, valid types are VT_I4 and VT_ERROR. When the first parameter is **`double`**, valid types are VT_R8 and VT_DATE. When the first parameter is **`unsigned int`**, valid types are VT_UI4 and VT_UINT.
+*`vtSrc`*\
+[in] The type of the variant. When the first parameter is **`int`**, valid types are `VT_I4` and `VT_INT`. When the first parameter is **`long`**, valid types are `VT_I4` and `VT_ERROR`. When the first parameter is **`double`**, valid types are `VT_R8` and `VT_DATE`. When the first parameter is **`unsigned int`**, valid types are `VT_UI4` and `VT_UINT`.
-*fltSrc*
-[in] The **`float`** used to initialize the `CComVariant` object. The type of the `CComVariant` object will be VT_R4.
+*`fltSrc`*\
+[in] The **`float`** used to initialize the `CComVariant` object. The type of the `CComVariant` object is `VT_R4`.
-*dblSrc*
-[in] The **`double`** used to initialize the `CComVariant` object. The type of the `CComVariant` object will be VT_R8.
+*`dblSrc`*\
+[in] The **`double`** used to initialize the `CComVariant` object. The type of the `CComVariant` object is `VT_R8`.
-*cySrc*
-[in] The `CY` used to initialize the `CComVariant` object. The type of the `CComVariant` object will be VT_CY.
+*`cySrc`*\
+[in] The `CY` used to initialize the `CComVariant` object. The type of the `CComVariant` object is `VT_CY`.
-*pSrc*
-[in] The `IDispatch` or `IUnknown` pointer used to initialize the `CComVariant` object. `AddRef` will be called on the interface pointer. The type of the `CComVariant` object will be VT_DISPATCH or VT_UNKNOWN, respectively.
+*`pSrc`*\
+[in] The `IDispatch` or `IUnknown` pointer used to initialize the `CComVariant` object. `AddRef` is called on the interface pointer. The type of the `CComVariant` object is `VT_DISPATCH` or `VT_UNKNOWN`, respectively.
-Or, the SAFERRAY pointer used to initialize the `CComVariant` object. A copy of the SAFEARRAY is stored in the `CComVariant` object. The type of the `CComVariant` object will be a combination of the original type of the SAFEARRAY and VT_ARRAY.
+Or, the `SAFERRAY` pointer used to initialize the `CComVariant` object. A copy of the `SAFEARRAY` is stored in the `CComVariant` object. The type of the `CComVariant` object is a combination of the original type of the `SAFEARRAY` and `VT_ARRAY`.
-*cSrc*
-[in] The **`char`** used to initialize the `CComVariant` object. The type of the `CComVariant` object will be VT_I1.
+*`cSrc`*\
+[in] The **`char`** used to initialize the `CComVariant` object. The type of the `CComVariant` object is `VT_I1`.
-*bstrSrc*
-[in] The BSTR used to initialize the `CComVariant` object. The type of the `CComVariant` object will be VT_BSTR.
+*`bstrSrc`*\
+[in] The `BSTR` used to initialize the `CComVariant` object. The type of the `CComVariant` object is `VT_BSTR`.
### Remarks
-The destructor manages cleanup by calling [CComVariant::Clear](#clear).
+The destructor manages cleanup by calling [`CComVariant::Clear`](#clear).
-## CComVariant::~CComVariant
+## `CComVariant::~CComVariant`
The destructor.
-```
+```cpp
~CComVariant() throw();
```
### Remarks
-This method manages cleanup by calling [CComVariant::Clear](#clear).
+This method manages cleanup by calling [`CComVariant::Clear`](#clear).
-## CComVariant::ChangeType
+## `CComVariant::ChangeType`
Converts the `CComVariant` object to a new type.
-```
+```cpp
HRESULT ChangeType(VARTYPE vtNew, const VARIANT* pSrc = NULL);
```
### Parameters
-*vtNew*
+*`vtNew`*\
[in] The new type for the `CComVariant` object.
-*pSrc*
-[in] A pointer to the VARIANT whose value will be converted to the new type. The default value is NULL, meaning the `CComVariant` object will be converted in place.
+*`pSrc`*\
+[in] A pointer to the `VARIANT` whose value is converted to the new type. The default value is `NULL`, meaning the `CComVariant` object is converted in place.
-### Return Value
+### Return value
-A standard HRESULT value.
+A standard `HRESULT` value.
### Remarks
-If you pass a value for *pSrc*, `ChangeType` will use this VARIANT as the source for the conversion. Otherwise, the `CComVariant` object will be the source.
+If you pass a value for *`pSrc`*, `ChangeType` will use this `VARIANT` as the source for the conversion. Otherwise, the `CComVariant` object is the source.
-## CComVariant::Clear
+## `CComVariant::Clear`
Clears the `CComVariant` object by calling the `VariantClear` Win32 function.
-```
+```cpp
HRESULT Clear();
```
-### Return Value
+### Return value
-A standard HRESULT value.
+A standard `HRESULT` value.
### Remarks
The destructor automatically calls `Clear`.
-## CComVariant::Copy
+## `CComVariant::Copy`
-Frees the `CComVariant` object and then assigns it a copy of the specified VARIANT.
+Frees the `CComVariant` object and then assigns it a copy of the specified `VARIANT`.
-```
+```cpp
HRESULT Copy(const VARIANT* pSrc);
```
### Parameters
-*pSrc*
-[in] A pointer to the [VARIANT](/windows/win32/api/oaidl/ns-oaidl-variant) to be copied.
+*`pSrc`*\
+[in] A pointer to the [`VARIANT`](/windows/win32/api/oaidl/ns-oaidl-variant) to be copied.
-### Return Value
+### Return value
-A standard HRESULT value.
+A standard `HRESULT` value.
-## CComVariant::CopyTo
+## `CComVariant::CopyTo`
Copies the contents of the `CComVariant` object.
-```
+```cpp
HRESULT CopyTo(BSTR* pstrDest);
```
### Parameters
-*pstrDest*
-Points to a BSTR that will receive a copy of the contents of the `CComVariant` object.
+*`pstrDest`*\
+Points to a `BSTR` that will receive a copy of the contents of the `CComVariant` object.
-### Return Value
+### Return value
-A standard HRESULT value.
+A standard `HRESULT` value.
### Remarks
-The `CComVariant` object must be of type VT_BSTR.
+The `CComVariant` object must be of type `VT_BSTR`.
-## CComVariant::Detach
+## `CComVariant::Detach`
-Detaches the underlying VARIANT from the `CComVariant` object and sets the object's type to VT_EMPTY.
+Detaches the underlying `VARIANT` from the `CComVariant` object and sets the object's type to `VT_EMPTY`.
-```
+```cpp
HRESULT Detach(VARIANT* pDest);
```
### Parameters
-*pDest*
-[out] Returns the underlying VARIANT value of the object.
+*`pDest`*\
+[out] Returns the underlying `VARIANT` value of the object.
-### Return Value
+### Return value
-A standard HRESULT value.
+A standard `HRESULT` value.
### Remarks
-Note that the contents of the VARIANT referenced by *pDest* will automatically be cleared before being assigned the value and type of the calling `CComVariant` object.
+The contents of the `VARIANT` referenced by *`pDest`* are automatically cleared before being assigned the value and type of the calling `CComVariant` object.
-## CComVariant::GetSize
+## `CComVariant::GetSize`
-For simple-fixed size VARIANTs, this method returns the **`sizeof`** value for the underlying data type plus **sizeof(VARTYPE)**.
+For simple-fixed size `VARIANT`s, this method returns the **`sizeof`** value for the underlying data type plus `sizeof(VARTYPE)`.
-```
+```cpp
ULONG GetSize() const;
```
-### Return Value
+### Return value
The size in bytes of the current contents of the `CComVariant` object.
### Remarks
-If the VARIANT contains an interface pointer, `GetSize` queries for `IPersistStream` or `IPersistStreamInit`. If successful, the return value is the low-order 32 bits of the value returned by `GetSizeMax` plus `sizeof(CLSID)` and `sizeof(VARTYPE)`. If the interface pointer is NULL, `GetSize` returns `sizeof(CLSID)` plus `sizeof(VARTYPE)`. If the total size is larger than ULONG_MAX, `GetSize` returns `sizeof(VARTYPE)` which indicates an error.
+If the `VARIANT` contains an interface pointer, `GetSize` queries for `IPersistStream` or `IPersistStreamInit`. If successful, the return value is the low-order 32 bits of the value returned by `GetSizeMax` plus `sizeof(CLSID)` and `sizeof(VARTYPE)`. If the interface pointer is `NULL`, `GetSize` returns `sizeof(CLSID)` plus `sizeof(VARTYPE)`. If the total size is larger than `ULONG_MAX`, `GetSize` returns `sizeof(VARTYPE)`, which indicates an error.
-In all other cases, a temporary VARIANT of type VT_BSTR is coerced from the current VARIANT. The length of this BSTR is calculated as the size of the length of the string plus the length of the string itself plus the size of the null character plus **sizeof(VARTYPE)**. If the VARIANT cannot be coerced to a VARIANT of type VT_BSTR, `GetSize` returns **sizeof(VARTYPE)**.
+In all other cases, a temporary `VARIANT` of type `VT_BSTR` is coerced from the current `VARIANT`. The length of this `BSTR` is calculated as the size of the length of the string plus the length of the string itself plus the size of the `NULL` character plus `sizeof(VARTYPE)`. If the `VARIANT` can't be coerced to a `VARIANT` of type `VT_BSTR`, `GetSize` returns `sizeof(VARTYPE)`.
-The size returned by this method matches the number of bytes used by [CComVariant::WriteToStream](#writetostream) under successful conditions.
+The size returned by this method matches the number of bytes used by [`CComVariant::WriteToStream`](#writetostream) under successful conditions.
-## CComVariant::operator =
+## `CComVariant::operator =`
Assigns a value and corresponding type to the `CComVariant` object.
-```
+```cpp
CComVariant& operator=(const CComVariant& varSrc);
CComVariant& operator=(const VARIANT& varSrc);
CComVariant& operator=(const CComBSTR& bstrSrc);
@@ -319,151 +318,151 @@ CComVariant& operator=(char cSrc) throw();
### Parameters
-*varSrc*
-[in] The `CComVariant` or [VARIANT](/windows/win32/api/oaidl/ns-oaidl-variant) to be assigned to the `CComVariant` object. The contents of the source variant are copied to the destination without conversion.
+*`varSrc`*\
+[in] The `CComVariant` or [`VARIANT`](/windows/win32/api/oaidl/ns-oaidl-variant) to be assigned to the `CComVariant` object. The contents of the source variant are copied to the destination without conversion.
-*bstrSrc*
-[in] The BSTR to be assigned to the `CComVariant` object. The type of the `CComVariant` object will be VT_BSTR.
+*`bstrSrc`*\
+[in] The `BSTR` to be assigned to the `CComVariant` object. The type of the `CComVariant` object is `VT_BSTR`.
-*lpszSrc*
-[in] The character string to be assigned to the `CComVariant` object. You can pass a zero-terminated wide (Unicode) character string to the LPCOLESTR version of the operator or an ANSI string to the LPCSTR version. In either case, the string is converted to a Unicode BSTR allocated using `SysAllocString`. The type of the `CComVariant` object will be VT_BSTR.
+*`lpszSrc`*\
+[in] The character string to be assigned to the `CComVariant` object. You can pass a zero-terminated wide (Unicode) character string to the `LPCOLESTR` version of the operator or an ANSI string to the `LPCSTR` version. In either case, the string is converted to a Unicode `BSTR` allocated using `SysAllocString`. The type of the `CComVariant` object is `VT_BSTR`.
-*bSrc*
-[in] The **`bool`** to be assigned to the `CComVariant` object. The **`bool`** argument is converted to a VARIANT_BOOL before being stored. The type of the `CComVariant` object will be VT_BOOL.
+*`bSrc`*\
+[in] The **`bool`** to be assigned to the `CComVariant` object. The **`bool`** argument is converted to a `VARIANT_BOOL` before being stored. The type of the `CComVariant` object is `VT_BOOL`.
-*nSrc*
-[in] The **`int`**, BYTE, **`short`**, **`long`**, LONGLONG, ULONGLONG, **`unsigned short`**, **`unsigned long`**, or **`unsigned int`** to be assigned to the `CComVariant` object. The type of the `CComVariant` object will be VT_I4, VT_UI1, VT_I2, VT_I4, VT_I8, VT_UI8, VT_UI2, VT_UI4, or VT_UI4, respectively.
+*`nSrc`*\
+[in] The **`int`**, `BYTE`, **`short`**, **`long`**, `LONGLONG`, `ULONGLONG`, **`unsigned short`**, **`unsigned long`**, or **`unsigned int`** to be assigned to the `CComVariant` object. The type of the `CComVariant` object is `VT_I4`, `VT_UI1`, `VT_I2`, `VT_I4`, `VT_I8`, `VT_UI8`, `VT_UI2`, `VT_UI4`, or `VT_UI4`, respectively.
-*fltSrc*
-[in] The **`float`** to be assigned to the `CComVariant` object. The type of the `CComVariant` object will be VT_R4.
+*`fltSrc`*\
+[in] The **`float`** to be assigned to the `CComVariant` object. The type of the `CComVariant` object is `VT_R4`.
-*dblSrc*
-[in] The **`double`** to be assigned to the `CComVariant` object. The type of the `CComVariant` object will be VT_R8.
+*`dblSrc`*\
+[in] The **`double`** to be assigned to the `CComVariant` object. The type of the `CComVariant` object is `VT_R8`.
-*cySrc*
-[in] The `CY` to be assigned to the `CComVariant` object. The type of the `CComVariant` object will be VT_CY.
+*`cySrc`*\
+[in] The `CY` to be assigned to the `CComVariant` object. The type of the `CComVariant` object is `VT_CY`.
-*pSrc*
-[in] The `IDispatch` or `IUnknown` pointer to be assigned to the `CComVariant` object. `AddRef` will be called on the interface pointer. The type of the `CComVariant` object will be VT_DISPATCH or VT_UNKNOWN, respectively.
+*`pSrc`*\
+[in] The `IDispatch` or `IUnknown` pointer to be assigned to the `CComVariant` object. `AddRef` is called on the interface pointer. The type of the `CComVariant` object is `VT_DISPATCH` or `VT_UNKNOWN`, respectively.
-Or, a SAFEARRAY pointer to be assigned to the `CComVariant` object. A copy of the SAFEARRAY is stored in the `CComVariant` object. The type of the `CComVariant` object will be a combination of the original type of the SAFEARRAY and VT_ARRAY.
+Or, a `SAFEARRAY` pointer to be assigned to the `CComVariant` object. A copy of the `SAFEARRAY` is stored in the `CComVariant` object. The type of the `CComVariant` object is a combination of the original type of the `SAFEARRAY` and `VT_ARRAY`.
-*cSrc*
-[in] The char to be assigned to the `CComVariant` object. The type of the `CComVariant` object will be VT_I1.
+*`cSrc`*\
+[in] The char to be assigned to the `CComVariant` object. The type of the `CComVariant` object is `VT_I1`.
-## CComVariant::operator ==
+## `CComVariant::operator ==`
-Indicates whether the `CComVariant` object equals the specified VARIANT.
+Indicates whether the `CComVariant` object equals the specified `VARIANT`.
-```
+```cpp
bool operator==(const VARIANT& varSrc) const throw();
```
### Remarks
-Returns TRUE if the value and type of *varSrc* are equal to the value and type, respectively, of the `CComVariant` object. Otherwise, FALSE. The operator uses the user's default locale to perform the comparison.
+Returns `TRUE` if the value and type of *`varSrc`* are equal to the value and type, respectively, of the `CComVariant` object. Otherwise, `FALSE`. The operator uses the user's default locale to perform the comparison.
The operator compares only the value of the variant types. It compares strings, integers, and floating points, but not arrays or records.
-## CComVariant::operator !=
+## `CComVariant::operator !=`
-Indicates whether the `CComVariant` object does not equal the specified VARIANT.
+Indicates whether the `CComVariant` object doesn't equal the specified `VARIANT`.
-```
+```cpp
bool operator!=(const VARIANT& varSrc) const throw();
```
### Remarks
-Returns TRUE if either the value or type of *varSrc* is not equal to the value or type, respectively, of the `CComVariant` object. Otherwise, FALSE. The operator uses the user's default locale to perform the comparison.
+Returns `TRUE` if either the value or type of *`varSrc`* isn't equal to the value or type, respectively, of the `CComVariant` object. Otherwise, `FALSE`. The operator uses the user's default locale to perform the comparison.
The operator compares only the value of the variant types. It compares strings, integers, and floating points, but not arrays or records.
-## CComVariant::operator <
+## `CComVariant::operator <`
-Indicates whether the `CComVariant` object is less than the specified VARIANT.
+Indicates whether the `CComVariant` object is less than the specified `VARIANT`.
-```
+```cpp
bool operator<(const VARIANT& varSrc) const throw();
```
### Remarks
-Returns TRUE if the value of the `CComVariant` object is less than the value of *varSrc*. Otherwise, FALSE. The operator uses the user's default locale to perform the comparison.
+Returns `TRUE` if the value of the `CComVariant` object is less than the value of *`varSrc`*. Otherwise, `FALSE`. The operator uses the user's default locale to perform the comparison.
-## CComVariant::operator >
+## `CComVariant::operator >`
-Indicates whether the `CComVariant` object is greater than the specified VARIANT.
+Indicates whether the `CComVariant` object is greater than the specified `VARIANT`.
-```
+```cpp
bool operator>(const VARIANT& varSrc) const throw();
```
### Remarks
-Returns TRUE if the value of the `CComVariant` object is greater than the value of *varSrc*. Otherwise, FALSE. The operator uses the user's default locale to perform the comparison.
+Returns `TRUE` if the value of the `CComVariant` object is greater than the value of *`varSrc`*. Otherwise, `FALSE`. The operator uses the user's default locale to perform the comparison.
-## CComVariant::ReadFromStream
+## `CComVariant::ReadFromStream`
-Sets the underlying VARIANT to the VARIANT contained in the specified stream.
+Sets the underlying `VARIANT` to the `VARIANT` contained in the specified stream.
-```
+```cpp
HRESULT ReadFromStream(IStream* pStream);
```
### Parameters
-*pStream*
-[in] A pointer to the [IStream](/windows/win32/api/objidl/nn-objidl-istream) interface on the stream containing the data.
+*`pStream`*\
+[in] A pointer to the [`IStream`](/windows/win32/api/objidl/nn-objidl-istream) interface on the stream containing the data.
-### Return Value
+### Return value
-A standard HRESULT value.
+A standard `HRESULT` value.
### Remarks
-`ReadToStream` requires a previous call to [WriteToStream](#writetostream).
+`ReadToStream` requires a previous call to [`WriteToStream`](#writetostream).
-## CComVariant::SetByRef
+## `CComVariant::SetByRef`
-Initializes the `CComVariant` object and sets the `vt` member to VT_BYREF.
+Initializes the `CComVariant` object and sets the `vt` member to `VT_BYREF`.
-```
+```cpp
template < typename T >
void SetByRef(T* pT) throw();
```
### Parameters
-*T*
-The type of VARIANT, for example, BSTR, **`int`**, or **`char`**.
+*`T`*\
+The type of `VARIANT`, for example, `BSTR`, **`int`**, or **`char`**.
-*pT*
+*`pT`*\
The pointer used to initialize the `CComVariant` object.
### Remarks
-`SetByRef` is a function template that initializes the `CComVariant` object to the pointer *pT* and sets the `vt` member to VT_BYREF. For example:
+`SetByRef` is a function template that initializes the `CComVariant` object to the pointer *`pT`* and sets the `vt` member to `VT_BYREF`. For example:
[!code-cpp[NVC_ATL_Utilities#76](../../atl/codesnippet/cpp/ccomvariant-class_1.cpp)]
-## CComVariant::WriteToStream
+## `CComVariant::WriteToStream`
-Saves the underlying VARIANT to a stream.
+Saves the underlying `VARIANT` to a stream.
-```
+```cpp
HRESULT WriteToStream(IStream* pStream);
```
### Parameters
-*pStream*
-[in] A pointer to the [IStream](/windows/win32/api/objidl/nn-objidl-istream) interface on a stream.
+*`pStream`*\
+[in] A pointer to the [`IStream`](/windows/win32/api/objidl/nn-objidl-istream) interface on a stream.
-### Return Value
+### Return value
-A standard HRESULT value.
+A standard `HRESULT` value.
## See also
-[Class Overview](../../atl/atl-class-overview.md)
+[Class overview](../../atl/atl-class-overview.md)
diff --git a/docs/atl/reference/ccontainedwindowt-class.md b/docs/atl/reference/ccontainedwindowt-class.md
index 0a22ddb5ec..92e55f8f39 100644
--- a/docs/atl/reference/ccontainedwindowt-class.md
+++ b/docs/atl/reference/ccontainedwindowt-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CContainedWindowT Class"
title: "CContainedWindowT Class"
ms.date: "11/04/2016"
f1_keywords: ["CContainedWindowT", "ATLWIN/ATL::CContainedWindowT", "ATLWIN/ATL::CContainedWindowT::CContainedWindowT", "ATLWIN/ATL::CContainedWindowT::Create", "ATLWIN/ATL::CContainedWindowT::DefWindowProc", "ATLWIN/ATL::CContainedWindowT::GetCurrentMessage", "ATLWIN/ATL::CContainedWindowT::RegisterWndSuperclass", "ATLWIN/ATL::CContainedWindowT::SubclassWindow", "ATLWIN/ATL::CContainedWindowT::SwitchMessageMap", "ATLWIN/ATL::CContainedWindowT::UnsubclassWindow", "ATLWIN/ATL::CContainedWindowT::WindowProc", "ATLWIN/ATL::CContainedWindowT::m_dwMsgMapID", "ATLWIN/ATL::CContainedWindowT::m_lpszClassName", "ATLWIN/ATL::CContainedWindowT::m_pfnSuperWindowProc", "ATLWIN/ATL::CContainedWindowT::m_pObject"]
@@ -74,9 +75,9 @@ A traits class that defines styles for your window. The default is `CControlWinT
When you use the **Add control based on** option in the ATL Project Wizard, the wizard will automatically add a `CContainedWindowT` data member to the class implementing the control. The following example shows how the contained window is declared:
[!code-cpp[NVC_ATL_Windowing#38](../../atl/codesnippet/cpp/ccontainedwindowt-class_1.h)]
-
+
[!code-cpp[NVC_ATL_Windowing#39](../../atl/codesnippet/cpp/ccontainedwindowt-class_2.h)]
-
+
[!code-cpp[NVC_ATL_Windowing#40](../../atl/codesnippet/cpp/ccontainedwindowt-class_3.h)]
|For more information about|See|
@@ -196,7 +197,7 @@ HWND Create(
[in] Specifies the name of the window. The default value is NULL.
*dwStyle*
-[in] The style of the window. The default value is WS_CHILD | WS_VISIBLE. For a list of possible values, see [CreateWindow](/windows/win32/api/winuser/nf-winuser-createwindoww) in the Windows SDK.
+[in] The style of the window. The default value is `WS_CHILD | WS_VISIBLE`. For a list of possible values, see [CreateWindow](/windows/win32/api/winuser/nf-winuser-createwindoww) in the Windows SDK.
*dwExStyle*
[in] The extended window style. The default value is 0, meaning no extended style. For a list of possible values, see [CreateWindowEx](/windows/win32/api/winuser/nf-winuser-createwindowexw) in the Windows SDK.
diff --git a/docs/atl/reference/ccrtallocator-class.md b/docs/atl/reference/ccrtallocator-class.md
index 290e451804..782c70f47f 100644
--- a/docs/atl/reference/ccrtallocator-class.md
+++ b/docs/atl/reference/ccrtallocator-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CCRTAllocator Class"
title: "CCRTAllocator Class"
ms.date: "11/04/2016"
f1_keywords: ["CCRTAllocator", "ATLCORE/ATL::CCRTAllocator", "ATLCORE/ATL::CCRTAllocator::Allocate", "ATLCORE/ATL::CCRTAllocator::Free", "ATLCORE/ATL::CCRTAllocator::Reallocate"]
diff --git a/docs/atl/reference/ccrtheap-class.md b/docs/atl/reference/ccrtheap-class.md
index 8caa4973cf..2c032d979d 100644
--- a/docs/atl/reference/ccrtheap-class.md
+++ b/docs/atl/reference/ccrtheap-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CCRTHeap Class"
title: "CCRTHeap Class"
ms.date: "11/04/2016"
f1_keywords: ["CCRTHeap", "ATLMEM/ATL::CCRTHeap", "ATLMEM/ATL::CCRTHeap::Allocate", "ATLMEM/ATL::CCRTHeap::Free", "ATLMEM/ATL::CCRTHeap::GetSize", "ATLMEM/ATL::CCRTHeap::Reallocate"]
diff --git a/docs/atl/reference/cdacl-class.md b/docs/atl/reference/cdacl-class.md
index b07c8a0299..dcd93c40d5 100644
--- a/docs/atl/reference/cdacl-class.md
+++ b/docs/atl/reference/cdacl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CDacl Class"
title: "CDacl Class"
ms.date: "11/04/2016"
f1_keywords: ["CDacl", "ATLSECURITY/ATL::CDacl", "ATLSECURITY/ATL::CDacl::CDacl", "ATLSECURITY/ATL::CDacl::AddAllowedAce", "ATLSECURITY/ATL::CDacl::AddDeniedAce", "ATLSECURITY/ATL::CDacl::GetAceCount", "ATLSECURITY/ATL::CDacl::RemoveAce", "ATLSECURITY/ATL::CDacl::RemoveAllAces"]
diff --git a/docs/atl/reference/cdebugreporthook-class.md b/docs/atl/reference/cdebugreporthook-class.md
index c7532787ef..a525a35257 100644
--- a/docs/atl/reference/cdebugreporthook-class.md
+++ b/docs/atl/reference/cdebugreporthook-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CDebugReportHook Class"
title: "CDebugReportHook Class"
ms.date: "11/04/2016"
f1_keywords: ["CDebugReportHook", "ATLUTIL/ATL::CDebugReportHook", "ATLUTIL/ATL::CDebugReportHook::CDebugReportHook", "ATLUTIL/ATL::CDebugReportHook::CDebugReportHookProc", "ATLUTIL/ATL::CDebugReportHook::RemoveHook", "ATLUTIL/ATL::CDebugReportHook::SetHook", "ATLUTIL/ATL::CDebugReportHook::SetPipeName", "ATLUTIL/ATL::CDebugReportHook::SetTimeout"]
diff --git a/docs/atl/reference/cdefaultchartraits-class.md b/docs/atl/reference/cdefaultchartraits-class.md
index a142fadcc0..6d941499c6 100644
--- a/docs/atl/reference/cdefaultchartraits-class.md
+++ b/docs/atl/reference/cdefaultchartraits-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CDefaultCharTraits Class"
title: "CDefaultCharTraits Class"
ms.date: "11/04/2016"
f1_keywords: ["CDefaultCharTraits", "ATLCOLL/ATL::CDefaultCharTraits", "ATLCOLL/ATL::CDefaultCharTraits::CharToLower", "ATLCOLL/ATL::CDefaultCharTraits::CharToUpper"]
diff --git a/docs/atl/reference/cdefaultcomparetraits-class.md b/docs/atl/reference/cdefaultcomparetraits-class.md
index 26e1f20666..ba680d5061 100644
--- a/docs/atl/reference/cdefaultcomparetraits-class.md
+++ b/docs/atl/reference/cdefaultcomparetraits-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CDefaultCompareTraits Class"
title: "CDefaultCompareTraits Class"
ms.date: "11/04/2016"
f1_keywords: ["CDefaultCompareTraits", "ATLCOLL/ATL::CDefaultCompareTraits", "ATLCOLL/ATL::CDefaultCompareTraits::CompareElements", "ATLCOLL/ATL::CDefaultCompareTraits::CompareElementsOrdered"]
diff --git a/docs/atl/reference/cdefaultelementtraits-class.md b/docs/atl/reference/cdefaultelementtraits-class.md
index dd3f9bf896..ee35bca2b3 100644
--- a/docs/atl/reference/cdefaultelementtraits-class.md
+++ b/docs/atl/reference/cdefaultelementtraits-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CDefaultElementTraits Class"
title: "CDefaultElementTraits Class"
ms.date: "11/04/2016"
f1_keywords: ["CDefaultElementTraits", "atlcoll/ATL::CDefaultElementTraits"]
diff --git a/docs/atl/reference/cdefaulthashtraits-class.md b/docs/atl/reference/cdefaulthashtraits-class.md
index c6602452a7..8c626840a9 100644
--- a/docs/atl/reference/cdefaulthashtraits-class.md
+++ b/docs/atl/reference/cdefaulthashtraits-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CDefaultHashTraits Class"
title: "CDefaultHashTraits Class"
ms.date: "11/04/2016"
f1_keywords: ["CDefaultHashTraits", "ATLCOLL/ATL::CDefaultHashTraits", "ATLCOLL/ATL::CDefaultHashTraits::Hash"]
diff --git a/docs/atl/reference/cdialogimpl-class.md b/docs/atl/reference/cdialogimpl-class.md
index a1590b22c0..56a1d4713c 100644
--- a/docs/atl/reference/cdialogimpl-class.md
+++ b/docs/atl/reference/cdialogimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CDialogImpl Class"
title: "CDialogImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["CDialogImpl", "ATLWIN/ATL::CDialogImpl", "ATLWIN/ATL::Create", "ATLWIN/ATL::DestroyWindow", "ATLWIN/ATL::DoModal", "ATLWIN/ATL::EndDialog", "ATLWIN/ATL::GetDialogProc", "ATLWIN/ATL::MapDialogRect", "ATLWIN/ATL::OnFinalMessage", "ATLWIN/ATL::DialogProc", "ATLWIN/ATL::StartDialogProc"]
@@ -32,7 +33,7 @@ The base class of your new class. The default base class is [CWindow](../../atl/
### Methods
-|||
+|Function|Description|
|-|-|
|[Create](#create)|Creates a modeless dialog box.|
|[DestroyWindow](#destroywindow)|Destroys a modeless dialog box.|
@@ -41,7 +42,7 @@ The base class of your new class. The default base class is [CWindow](../../atl/
### CDialogImplBaseT Methods
-|||
+|Function|Description|
|-|-|
|[GetDialogProc](#getdialogproc)|Returns the current dialog box procedure.|
|[MapDialogRect](#mapdialogrect)|Maps the dialog-box units of the specified rectangle to screen units (pixels).|
@@ -49,7 +50,7 @@ The base class of your new class. The default base class is [CWindow](../../atl/
### Static Functions
-|||
+|Function|Description|
|-|-|
|[DialogProc](#dialogproc)|Processes messages sent to the dialog box.|
|[StartDialogProc](#startdialogproc)|Called when the first message is received to process messages sent to the dialog box.|
diff --git a/docs/atl/reference/cdynamicchain-class.md b/docs/atl/reference/cdynamicchain-class.md
index 7e47151415..27e0374b8f 100644
--- a/docs/atl/reference/cdynamicchain-class.md
+++ b/docs/atl/reference/cdynamicchain-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CDynamicChain Class"
title: "CDynamicChain Class"
ms.date: "11/04/2016"
f1_keywords: ["CDynamicChain", "ATLWIN/ATL::CDynamicChain", "ATLWIN/ATL::CDynamicChain::CDynamicChain", "ATLWIN/ATL::CDynamicChain::CallChain", "ATLWIN/ATL::CDynamicChain::RemoveChainEntry", "ATLWIN/ATL::CDynamicChain::SetChainEntry"]
diff --git a/docs/atl/reference/celementtraits-class.md b/docs/atl/reference/celementtraits-class.md
index 47b9f2eece..067c69927e 100644
--- a/docs/atl/reference/celementtraits-class.md
+++ b/docs/atl/reference/celementtraits-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CElementTraits Class"
title: "CElementTraits Class"
ms.date: "11/04/2016"
f1_keywords: ["CElementTraits", "atlcoll/ATL::CElementTraits"]
diff --git a/docs/atl/reference/celementtraitsbase-class.md b/docs/atl/reference/celementtraitsbase-class.md
index 1f24adce4f..8bf122174c 100644
--- a/docs/atl/reference/celementtraitsbase-class.md
+++ b/docs/atl/reference/celementtraitsbase-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CElementTraitsBase Class"
title: "CElementTraitsBase Class"
ms.date: "11/04/2016"
f1_keywords: ["CElementTraitsBase", "ATLCOLL/ATL::CElementTraitsBase", "ATLCOLL/ATL::CElementTraitsBase::INARGTYPE", "ATLCOLL/ATL::CElementTraitsBase::OUTARGTYPE", "ATLCOLL/ATL::CElementTraitsBase::CopyElements", "ATLCOLL/ATL::CElementTraitsBase::RelocateElements"]
diff --git a/docs/atl/reference/cfirepropnotifyevent-class.md b/docs/atl/reference/cfirepropnotifyevent-class.md
index 6a79f525a9..76834b9a5e 100644
--- a/docs/atl/reference/cfirepropnotifyevent-class.md
+++ b/docs/atl/reference/cfirepropnotifyevent-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CFirePropNotifyEvent Class"
title: "CFirePropNotifyEvent Class"
ms.date: "11/04/2016"
f1_keywords: ["CFirePropNotifyEvent", "ATLCTL/ATL::CFirePropNotifyEvent", "ATLCTL/ATL::CFirePropNotifyEvent::FireOnChanged", "ATLCTL/ATL::CFirePropNotifyEvent::FireOnRequestEdit"]
diff --git a/docs/atl/reference/cglobalheap-class.md b/docs/atl/reference/cglobalheap-class.md
index bc1dc3bca8..426101159d 100644
--- a/docs/atl/reference/cglobalheap-class.md
+++ b/docs/atl/reference/cglobalheap-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CGlobalHeap Class"
title: "CGlobalHeap Class"
ms.date: "11/04/2016"
f1_keywords: ["CGlobalHeap", "ATLMEM/ATL::CGlobalHeap", "ATLMEM/ATL::CGlobalHeap::Allocate", "ATLMEM/ATL::CGlobalHeap::Free", "ATLMEM/ATL::CGlobalHeap::GetSize", "ATLMEM/ATL::CGlobalHeap::Reallocate"]
diff --git a/docs/atl/reference/chandle-class.md b/docs/atl/reference/chandle-class.md
index 313bc2c17a..237fa0cd88 100644
--- a/docs/atl/reference/chandle-class.md
+++ b/docs/atl/reference/chandle-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CHandle Class"
title: "CHandle Class"
ms.date: "07/09/2019"
f1_keywords: ["CHandle", "ATLBASE/ATL::CHandle", "ATLBASE/ATL::CHandle::CHandle", "ATLBASE/ATL::CHandle::Attach", "ATLBASE/ATL::CHandle::Close", "ATLBASE/ATL::CHandle::Detach", "ATLBASE/ATL::CHandle::m_h"]
diff --git a/docs/atl/reference/cheapptr-class.md b/docs/atl/reference/cheapptr-class.md
index 7643038e95..c7888bfbcc 100644
--- a/docs/atl/reference/cheapptr-class.md
+++ b/docs/atl/reference/cheapptr-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CHeapPtr Class"
title: "CHeapPtr Class"
ms.date: "11/04/2016"
f1_keywords: ["CHeapPtr", "ATLCORE/ATL::CHeapPtr", "ATLCORE/ATL::CHeapPtr::CHeapPtr", "ATLCORE/ATL::CHeapPtr::Allocate", "ATLCORE/ATL::CHeapPtr::Reallocate"]
diff --git a/docs/atl/reference/cheapptrbase-class.md b/docs/atl/reference/cheapptrbase-class.md
index b484cf9fb7..8ba15f0fb6 100644
--- a/docs/atl/reference/cheapptrbase-class.md
+++ b/docs/atl/reference/cheapptrbase-class.md
@@ -1,11 +1,12 @@
---
-title: "CHeapPtrBase Class"
+description: "Learn more about: CHeapPtrBase class"
+title: "CHeapPtrBase class"
ms.date: "11/04/2016"
f1_keywords: ["CHeapPtrBase", "ATLCORE/ATL::CHeapPtrBase", "ATLCORE/ATL::CHeapPtrBase::AllocateBytes", "ATLCORE/ATL::CHeapPtrBase::Attach", "ATLCORE/ATL::CHeapPtrBase::Detach", "ATLCORE/ATL::CHeapPtrBase::Free", "ATLCORE/ATL::CHeapPtrBase::ReallocateBytes", "ATLCORE/ATL::CHeapPtrBase::m_pData"]
helpviewer_keywords: ["CHeapPtrBase class"]
ms.assetid: 501ac1b2-fb34-4c72-b7e6-a4f1fc8fda21
---
-# CHeapPtrBase Class
+# `CHeapPtrBase` class
This class forms the basis for several smart heap pointer classes.
@@ -14,81 +15,81 @@ This class forms the basis for several smart heap pointer classes.
## Syntax
-```
+```cpp
template
class CHeapPtrBase
```
#### Parameters
-*T*
+*`T`*\
The object type to be stored on the heap.
-*Allocator*
+*`Allocator`*\
The memory allocation class to use. By default CRT routines are used to allocate and free memory.
## Members
-### Public Constructors
+### Public constructors
-|Name|Description|
-|----------|-----------------|
-|[CHeapPtrBase::~CHeapPtrBase](#dtor)|The destructor.|
+| Name | Description |
+|--|--|
+| [`CHeapPtrBase::~CHeapPtrBase`](#dtor) | The destructor. |
-### Public Methods
+### Public methods
-|Name|Description|
-|----------|-----------------|
-|[CHeapPtrBase::AllocateBytes](#allocatebytes)|Call this method to allocate memory.|
-|[CHeapPtrBase::Attach](#attach)|Call this method to take ownership of an existing pointer.|
-|[CHeapPtrBase::Detach](#detach)|Call this method to release ownership of a pointer.|
-|[CHeapPtrBase::Free](#free)|Call this method to delete an object pointed to by a `CHeapPtrBase`.|
-|[CHeapPtrBase::ReallocateBytes](#reallocatebytes)|Call this method to reallocate memory.|
+| Name | Description |
+|--|--|
+| [`CHeapPtrBase::AllocateBytes`](#allocatebytes) | Call this method to allocate memory. |
+| [`CHeapPtrBase::Attach`](#attach) | Call this method to take ownership of an existing pointer. |
+| [`CHeapPtrBase::Detach`](#detach) | Call this method to release ownership of a pointer. |
+| [`CHeapPtrBase::Free`](#free) | Call this method to delete an object pointed to by a `CHeapPtrBase`. |
+| [`CHeapPtrBase::ReallocateBytes`](#reallocatebytes) | Call this method to reallocate memory. |
-### Public Operators
+### Public operators
-|Name|Description|
-|----------|-----------------|
-|[CHeapPtrBase::operator T*](#operator_t_star)|The cast operator.|
-|[CHeapPtrBase::operator &](#operator_amp)|The & operator.|
-|[CHeapPtrBase::operator ->](#operator_ptr)|The pointer-to-member operator.|
+| Name | Description |
+|--|--|
+| [`CHeapPtrBase::operator T*`](#operator_t_star) | The cast operator. |
+| [`CHeapPtrBase::operator &`](#operator_amp) | The & operator. |
+| [`CHeapPtrBase::operator ->`](#operator_ptr) | The pointer-to-member operator. |
-### Public Data Members
+### Public data members
-|Name|Description|
-|----------|-----------------|
-|[CHeapPtrBase::m_pData](#m_pdata)|The pointer data member variable.|
+| Name | Description |
+|--|--|
+| [`CHeapPtrBase::m_pData`](#m_pdata) | The pointer data member variable. |
## Remarks
-This class forms the basis for several smart heap pointer classes. The derived classes, for example, [CHeapPtr](../../atl/reference/cheapptr-class.md) and [CComHeapPtr](../../atl/reference/ccomheapptr-class.md), add their own constructors and operators. See these classes for implementation examples.
+This class forms the basis for several smart heap pointer classes. The derived classes, for example, [`CHeapPtr`](../../atl/reference/cheapptr-class.md) and [`CComHeapPtr`](../../atl/reference/ccomheapptr-class.md), add their own constructors and operators. See these classes for implementation examples.
## Requirements
**Header:** atlcore.h
-## CHeapPtrBase::AllocateBytes
+## `CHeapPtrBase::AllocateBytes`
Call this method to allocate memory.
-```
+```cpp
bool AllocateBytes(size_t nBytes) throw();
```
### Parameters
-*nBytes*
+*`nBytes`*\
The number of bytes of memory to allocate.
-### Return Value
+### Return value
Returns true if the memory is successfully allocated, false otherwise.
### Remarks
-In debug builds, an assertion failure will occur if the [CHeapPtrBase::m_pData](#m_pdata) member variable currently points to an existing value; that is, it is not equal to NULL.
+In debug builds, an assertion failure will occur if the [`CHeapPtrBase::m_pData`](#m_pdata) member variable currently points to an existing value; that is, it's not equal to NULL.
-## CHeapPtrBase::Attach
+## `CHeapPtrBase::Attach`
Call this method to take ownership of an existing pointer.
@@ -98,20 +99,20 @@ void Attach(T* pData) throw();
### Parameters
-*pData*
+*`pData`*\
The `CHeapPtrBase` object will take ownership of this pointer.
### Remarks
When a `CHeapPtrBase` object takes ownership of a pointer, it will automatically delete the pointer and any allocated data when it goes out of scope.
-In debug builds, an assertion failure will occur if the [CHeapPtrBase::m_pData](#m_pdata) member variable currently points to an existing value; that is, it is not equal to NULL.
+In debug builds, an assertion failure will occur if the [`CHeapPtrBase::m_pData`](#m_pdata) member variable currently points to an existing value; that is, it's not equal to NULL.
-## CHeapPtrBase::~CHeapPtrBase
+## `CHeapPtrBase::~CHeapPtrBase`
The destructor.
-```
+```cpp
~CHeapPtrBase() throw();
```
@@ -119,23 +120,23 @@ The destructor.
Frees all allocated resources.
-## CHeapPtrBase::Detach
+## `CHeapPtrBase::Detach`
Call this method to release ownership of a pointer.
-```
+```cpp
T* Detach() throw();
```
-### Return Value
+### Return value
Returns a copy of the pointer.
### Remarks
-Releases ownership of a pointer, sets the [CHeapPtrBase::m_pData](#m_pdata) member variable to NULL, and returns a copy of the pointer.
+Releases ownership of a pointer, sets the [`CHeapPtrBase::m_pData`](#m_pdata) member variable to NULL, and returns a copy of the pointer.
-## CHeapPtrBase::Free
+## `CHeapPtrBase::Free`
Call this method to delete an object pointed to by a `CHeapPtrBase`.
@@ -145,13 +146,13 @@ void Free() throw();
### Remarks
-The object pointed to by the `CHeapPtrBase` is freed, and the [CHeapPtrBase::m_pData](#m_pdata) member variable is set to NULL.
+The object pointed to by the `CHeapPtrBase` is freed, and the [`CHeapPtrBase::m_pData`](#m_pdata) member variable is set to NULL.
-## CHeapPtrBase::m_pData
+## `CHeapPtrBase::m_pData`
The pointer data member variable.
-```
+```cpp
T* m_pData;
```
@@ -159,65 +160,65 @@ T* m_pData;
This member variable holds the pointer information.
-## CHeapPtrBase::operator &
+## `CHeapPtrBase::operator &`
The & operator.
-```
+```cpp
T** operator&() throw();
```
-### Return Value
+### Return value
Returns the address of the object pointed to by the `CHeapPtrBase` object.
-## CHeapPtrBase::operator ->
+## `CHeapPtrBase::operator ->`
The pointer-to-member operator.
-```
+```cpp
T* operator->() const throw();
```
-### Return Value
+### Return value
-Returns the value of the [CHeapPtrBase::m_pData](#m_pdata) member variable.
+Returns the value of the [`CHeapPtrBase::m_pData`](#m_pdata) member variable.
### Remarks
Use this operator to call a method in a class pointed to by the `CHeapPtrBase` object. In debug builds, an assertion failure will occur if the `CHeapPtrBase` points to NULL.
-## CHeapPtrBase::operator T*
+## `CHeapPtrBase::operator T*`
The cast operator.
-```
+```cpp
operator T*() const throw();
```
### Remarks
-Returns [CHeapPtrBase::m_pData](#m_pdata).
+Returns [`CHeapPtrBase::m_pData`](#m_pdata).
-## CHeapPtrBase::ReallocateBytes
+## `CHeapPtrBase::ReallocateBytes`
Call this method to reallocate memory.
-```
+```cpp
bool ReallocateBytes(size_t nBytes) throw();
```
### Parameters
-*nBytes*
+*`nBytes`*\
The new amount of memory to allocate, in bytes.
-### Return Value
+### Return value
Returns true if the memory is successfully allocated, false otherwise.
## See also
-[CHeapPtr Class](../../atl/reference/cheapptr-class.md)
-[CComHeapPtr Class](../../atl/reference/ccomheapptr-class.md)
-[Class Overview](../../atl/atl-class-overview.md)
+[`CHeapPtr` class](../../atl/reference/cheapptr-class.md)\
+[`CComHeapPtr` class](../../atl/reference/ccomheapptr-class.md)\
+[Class overview](../../atl/atl-class-overview.md)
diff --git a/docs/atl/reference/cheapptrelementtraits-class.md b/docs/atl/reference/cheapptrelementtraits-class.md
index 231d83cb0c..3ff0b3f44d 100644
--- a/docs/atl/reference/cheapptrelementtraits-class.md
+++ b/docs/atl/reference/cheapptrelementtraits-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CHeapPtrElementTraits Class"
title: "CHeapPtrElementTraits Class"
ms.date: "11/04/2016"
f1_keywords: ["CHeapPtrElementTraits", "ATLCOLL/ATL::CHeapPtrElementTraits", "ATLCOLL/ATL::CHeapPtrElementTraits::INARGTYPE", "ATLCOLL/ATL::CHeapPtrElementTraits::OUTARGTYPE"]
diff --git a/docs/atl/reference/cheapptrlist-class.md b/docs/atl/reference/cheapptrlist-class.md
index 835c2635d9..591c578772 100644
--- a/docs/atl/reference/cheapptrlist-class.md
+++ b/docs/atl/reference/cheapptrlist-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CHeapPtrList Class"
title: "CHeapPtrList Class"
ms.date: "11/04/2016"
f1_keywords: ["CHeapPtrList", "ATLCOLL/ATL::CHeapPtrList", "ATLCOLL/ATL::CHeapPtrList::CHeapPtrList"]
diff --git a/docs/atl/reference/cinterfacearray-class.md b/docs/atl/reference/cinterfacearray-class.md
index 5b5753ea80..3a6ec0bc1d 100644
--- a/docs/atl/reference/cinterfacearray-class.md
+++ b/docs/atl/reference/cinterfacearray-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CInterfaceArray Class"
title: "CInterfaceArray Class"
ms.date: "11/04/2016"
f1_keywords: ["CInterfaceArray", "ATLCOLL/ATL::CInterfaceArray", "ATLCOLL/ATL::CInterfaceArray::CInterfaceArray"]
diff --git a/docs/atl/reference/cinterfacelist-class.md b/docs/atl/reference/cinterfacelist-class.md
index d31c32ecf9..e5aae7bdce 100644
--- a/docs/atl/reference/cinterfacelist-class.md
+++ b/docs/atl/reference/cinterfacelist-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CInterfaceList Class"
title: "CInterfaceList Class"
ms.date: "11/04/2016"
f1_keywords: ["CInterfaceList", "ATLCOLL/ATL::CInterfaceList", "ATLCOLL/ATL::CInterfaceList::CInterfaceList"]
diff --git a/docs/atl/reference/clocalheap-class.md b/docs/atl/reference/clocalheap-class.md
index 642c75e20b..32ff5c199e 100644
--- a/docs/atl/reference/clocalheap-class.md
+++ b/docs/atl/reference/clocalheap-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CLocalHeap Class"
title: "CLocalHeap Class"
ms.date: "11/04/2016"
f1_keywords: ["CLocalHeap", "ATLMEM/ATL::CLocalHeap", "ATLMEM/ATL::CLocalHeap::Allocate", "ATLMEM/ATL::CLocalHeap::Free", "ATLMEM/ATL::CLocalHeap::GetSize", "ATLMEM/ATL::CLocalHeap::Reallocate"]
diff --git a/docs/atl/reference/cmessagemap-class.md b/docs/atl/reference/cmessagemap-class.md
index 900e6fd6ab..1f8f30e742 100644
--- a/docs/atl/reference/cmessagemap-class.md
+++ b/docs/atl/reference/cmessagemap-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CMessageMap Class"
title: "CMessageMap Class"
ms.date: "11/04/2016"
f1_keywords: ["CMessageMap", "ATLWIN/ATL::CMessageMap", "ATLWIN/ATL::CMessageMap::ProcessWindowMessage"]
diff --git a/docs/atl/reference/cnonstatelessworker-class.md b/docs/atl/reference/cnonstatelessworker-class.md
index 8a2f8045fb..014cd170ab 100644
--- a/docs/atl/reference/cnonstatelessworker-class.md
+++ b/docs/atl/reference/cnonstatelessworker-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CNonStatelessWorker Class"
title: "CNonStatelessWorker Class"
ms.date: "11/04/2016"
f1_keywords: ["CNonStatelessWorker", "ATLUTIL/ATL::CNonStatelessWorker", "ATLUTIL/ATL::CNonStatelessWorker::RequestType", "ATLUTIL/ATL::CNonStatelessWorker::Execute", "ATLUTIL/ATL::CNonStatelessWorker::Initialize", "ATLUTIL/ATL::CNonStatelessWorker::Terminate"]
diff --git a/docs/atl/reference/cnoworkerthread-class.md b/docs/atl/reference/cnoworkerthread-class.md
index bba941dd46..69c725ddc5 100644
--- a/docs/atl/reference/cnoworkerthread-class.md
+++ b/docs/atl/reference/cnoworkerthread-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CNoWorkerThread Class"
title: "CNoWorkerThread Class"
ms.date: "11/04/2016"
f1_keywords: ["CNoWorkerThread", "ATLUTIL/ATL::CNoWorkerThread", "ATLUTIL/ATL::CNoWorkerThread::AddHandle", "ATLUTIL/ATL::CNoWorkerThread::AddTimer", "ATLUTIL/ATL::CNoWorkerThread::GetThreadHandle", "ATLUTIL/ATL::CNoWorkerThread::GetThreadId", "ATLUTIL/ATL::CNoWorkerThread::Initialize", "ATLUTIL/ATL::CNoWorkerThread::RemoveHandle", "ATLUTIL/ATL::CNoWorkerThread::Shutdown"]
diff --git a/docs/atl/reference/com-interface-entry-macros.md b/docs/atl/reference/com-interface-entry-macros.md
index 4c3f04dec1..83a187ec49 100644
--- a/docs/atl/reference/com-interface-entry-macros.md
+++ b/docs/atl/reference/com-interface-entry-macros.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: COM_INTERFACE_ENTRY Macros"
title: "COM Interface Entry Macros"
ms.date: "03/28/2017"
f1_keywords: ["atlcom/ATL::COM_INTERFACE_ENTRY", "atlcom/ATL::COM_INTERFACE_ENTRY_IID", "atlcom/ATL::COM_INTERFACE_ENTRY_AGGREGATE", "atlcom/ATL::COM_INTERFACE_ENTRY_AGGREGATE_BLIND", "atlcom/ATL::COM_INTERFACE_ENTRY_AUTOAGGREGATE", "atlcom/ATL::COM_INTERFACE_ENTRY_AUTOAGGREGATE_BLIND", "atlcom/ATL::COM_INTERFACE_ENTRY_BREAK", "atlcom/ATL::COM_INTERFACE_ENTRY_CACHED_TEAR_OFF", "atlcom/ATL::COM_INTERFACE_ENTRY_TEAR_OFF", "atlcom/ATL::COM_INTERFACE_ENTRY_CHAIN", "atlcom/ATL::COM_INTERFACE_ENTRY_FUNC", "atlcom/ATL::COM_INTERFACE_ENTRY_FUNC_BLIND", "atlcom/ATL::COM_INTERFACE_ENTRY_NOINTERFACE"]
@@ -9,7 +10,7 @@ ms.assetid: 19dcb768-2e1f-4b8d-a618-453a01a4bd00
These macros enter an object's interfaces into its COM map so that they can be accessed by `QueryInterface`. The order of entries in the COM map is the order interfaces will be checked for a matching IID during `QueryInterface`.
-|||
+|Macro|Description|
|-|-|
|[COM_INTERFACE_ENTRY](#com_interface_entry)|Enters interfaces into the COM interface map.|
|[COM_INTERFACE_ENTRY2](#com_interface_entry2)|Use this macro to disambiguate two branches of inheritance.|
diff --git a/docs/atl/reference/com-map-global-functions.md b/docs/atl/reference/com-map-global-functions.md
index a661c2e62b..97e1980264 100644
--- a/docs/atl/reference/com-map-global-functions.md
+++ b/docs/atl/reference/com-map-global-functions.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: COM Map Global Functions"
title: "COM Map Global Functions"
ms.date: "11/04/2016"
f1_keywords: ["atlbase/ATL::AtlInternalQueryInterface", "atlbase/ATL::InlineIsEqualIUnknown"]
@@ -9,7 +10,7 @@ ms.assetid: b9612d30-eb23-46ef-8093-d56f237d3cf1
These functions provide support for COM Map `IUnknown` implementations.
-|||
+|Function|Description|
|-|-|
|[AtlInternalQueryInterface](#atlinternalqueryinterface)|Delegates to the `IUnknown` of a nonaggregated object.|
|[InlineIsEqualIUnknown](#inlineisequaliunknown)|Generates efficient code for comparing interfaces against `IUnknown`.|
diff --git a/docs/atl/reference/com-map-macros.md b/docs/atl/reference/com-map-macros.md
index f68ae030c5..6734604721 100644
--- a/docs/atl/reference/com-map-macros.md
+++ b/docs/atl/reference/com-map-macros.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: COM Map Macros"
title: "COM Map Macros"
ms.date: "11/04/2016"
-f1_keywords: ["atlcom/ATL::BEGIN_COM_MAP", "atlcom/ATL::END_COM_MAP"]
+f1_keywords: ["atlcom/ATL::BEGIN_COM_MAP", "atlcom/ATL::END_COM_MAP", "ATLCOM/BEGIN_COM_MAP", "ATLCOM/END_COM_MAP"]
helpviewer_keywords: ["COM interfaces, COM map macros"]
ms.assetid: 0f33656d-321f-4996-90cc-9a7f21ab73c3
---
@@ -9,7 +10,7 @@ ms.assetid: 0f33656d-321f-4996-90cc-9a7f21ab73c3
These macros define COM interface maps.
-|||
+|Macro|Description|
|-|-|
|[BEGIN_COM_MAP](#begin_com_map)|Marks the beginning of the COM interface map entries.|
|[END_COM_MAP](#end_com_map)|Marks the end of the COM interface map entries.|
diff --git a/docs/atl/reference/com-plus-1-0-atl-com-plus-1-0-component-wizard.md b/docs/atl/reference/com-plus-1-0-atl-com-plus-1-0-component-wizard.md
index f1110386b1..0a12524551 100644
--- a/docs/atl/reference/com-plus-1-0-atl-com-plus-1-0-component-wizard.md
+++ b/docs/atl/reference/com-plus-1-0-atl-com-plus-1-0-component-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: COM+ 1.0, ATL COM+ 1.0 Component Wizard"
title: "COM+ 1.0, ATL COM+ 1.0 Component Wizard"
ms.date: "05/09/2019"
f1_keywords: ["vc.codewiz.class.atl.mts.options"]
@@ -6,13 +7,13 @@ ms.assetid: 2fbe259c-6be1-4d0e-9cfe-721c75c97cb1
---
# COM+ 1.0, ATL COM+ 1.0 Component Wizard
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
This wizard is not available in Visual Studio 2019 and later.
::: moniker-end
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
Use this page of the ATL COM+ 1.0 Component Wizard to specify interface type and additional interfaces to be supported.
diff --git a/docs/atl/reference/com-plus-1-0-support-in-atl-projects.md b/docs/atl/reference/com-plus-1-0-support-in-atl-projects.md
index 326f3bb809..ae0f296311 100644
--- a/docs/atl/reference/com-plus-1-0-support-in-atl-projects.md
+++ b/docs/atl/reference/com-plus-1-0-support-in-atl-projects.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: COM+ 1.0 Support in ATL Projects"
title: "COM+ 1.0 Support in ATL Projects"
ms.date: "11/04/2016"
f1_keywords: ["vc.appwiz.ATL.MTS"]
diff --git a/docs/atl/reference/compiler-options-macros.md b/docs/atl/reference/compiler-options-macros.md
index 81d590b390..4c80bb5d9b 100644
--- a/docs/atl/reference/compiler-options-macros.md
+++ b/docs/atl/reference/compiler-options-macros.md
@@ -1,33 +1,34 @@
---
+description: "Learn more about: Compiler Options Macros"
title: "Compiler Options Macros"
-ms.date: "08/19/2019"
-f1_keywords: ["_ATL_ALL_WARNINGS", "_ATL_APARTMENT_THREADED", "_ATL_CSTRING_EXPLICIT_CONSTRUCTORS ", "_ATL_ENABLE_PTM_WARNING", "_ATL_FREE_THREADED", "_ATL_MULTI_THREADED", "_ATL_NO_AUTOMATIC_NAMESPACE", "_ATL_NO_COM_SUPPORT", "ATL_NO_VTABLE", "ATL_NOINLINE", "_ATL_SINGLE_THREADED"]
+ms.date: 02/01/2023
+f1_keywords: ["_ATL_ALL_WARNINGS", "_ATL_APARTMENT_THREADED", "_ATL_CSTRING_EXPLICIT_CONSTRUCTORS ", "_ATL_ENABLE_PTM_WARNING", "_ATL_FREE_THREADED", "_ATL_MODULES", "_ATL_MULTI_THREADED", "_ATL_NO_AUTOMATIC_NAMESPACE", "_ATL_NO_COM_SUPPORT", "ATL_NO_VTABLE", "ATL_NOINLINE", "_ATL_SINGLE_THREADED"]
helpviewer_keywords: ["compiler options, macros"]
-ms.assetid: a869adc6-b3de-4299-b040-9ae20b45f82c
---
# Compiler Options Macros
These macros control specific compiler features.
-|||
+|Macro|Description|
|-|-|
-|[_ATL_ALL_WARNINGS](#_atl_all_warnings)|A symbol that enables errors in projects converted from previous versions of ATL.|
-|[_ATL_APARTMENT_THREADED](#_atl_apartment_threaded)|Define if one or more of your objects use apartment threading.|
-|[_ATL_CSTRING_EXPLICIT_CONSTRUCTORS](#_atl_cstring_explicit_constructors)|Makes certain `CString` constructors explicit, preventing any unintentional conversions.|
-|[_ATL_ENABLE_PTM_WARNING](#_atl_enable_ptm_warning)|Define this macro in order to use C++ standard compliant syntax, which generates the C4867 compiler error when a non-standard syntax is used to initialize a pointer to a member function.|
-|[_ATL_FREE_THREADED](#_atl_free_threaded)|Define if one or more of your objects use free or neutral threading.|
-|[_ATL_MULTI_THREADED](#_atl_multi_threaded)|A symbol that indicates the project will have objects that are marked as Both, Free or Neutral. The macro [_ATL_FREE_THREADED](#_atl_free_threaded) should be used instead.|
-|[_ATL_NO_AUTOMATIC_NAMESPACE](#_atl_no_automatic_namespace)|A symbol that prevents the default use of namespace as ATL.|
-|[_ATL_NO_COM_SUPPORT](#_atl_no_com_support)|A symbol that prevents COM-related code from being compiled with your project.|
-|[ATL_NO_VTABLE](#atl_no_vtable)|A symbol that prevents the vtable pointer from being initialized in the class's constructor and destructor.|
-|[ATL_NOINLINE](#atl_noinline)|A symbol that indicates a function should not be inlined.|
-|[_ATL_SINGLE_THREADED](#_atl_single_threaded)|Define if all of your objects use the single threading model.|
-
-## _ATL_ALL_WARNINGS
+|[`_ATL_ALL_WARNINGS`](#_atl_all_warnings)|A symbol that enables errors in projects converted from previous versions of ATL.|
+|[`_ATL_APARTMENT_THREADED`](#_atl_apartment_threaded)|Define if one or more of your objects use apartment threading.|
+|[`_ATL_CSTRING_EXPLICIT_CONSTRUCTORS`](#_atl_cstring_explicit_constructors)|Makes certain `CString` constructors explicit, preventing any unintentional conversions.|
+|[`_ATL_ENABLE_PTM_WARNING`](#_atl_enable_ptm_warning)|Define this macro to require C++ standard syntax. It generates the C4867 compiler error when nonstandard syntax is used to initialize a pointer to a member function.|
+|[`_ATL_FREE_THREADED`](#_atl_free_threaded)|Define if one or more of your objects use free or neutral threading.|
+|[`_ATL_MODULES`](#_ATL_MODULES)|Allows you to compile ATL projects with [permissive-](../../build/reference/permissive-standards-conformance.md) and use ATL with [C++ modules](../../cpp/modules-cpp.md).|
+|[`_ATL_MULTI_THREADED`](#_atl_multi_threaded)|A symbol that indicates the project has objects marked as Both, Free or Neutral. The macro [`_ATL_FREE_THREADED`](#_atl_free_threaded) should be used instead.|
+|[`_ATL_NO_AUTOMATIC_NAMESPACE`](#_atl_no_automatic_namespace)|A symbol that prevents the default use of namespace as ATL.|
+|[`_ATL_NO_COM_SUPPORT`](#_atl_no_com_support)|A symbol that prevents COM-related code from being compiled with your project.|
+|[`ATL_NO_VTABLE`](#atl_no_vtable)|A symbol that prevents the vtable pointer from being initialized in the class's constructor and destructor.|
+|[`ATL_NOINLINE`](#atl_noinline)|A symbol that indicates a function shouldn't be inlined.|
+|[`_ATL_SINGLE_THREADED`](#_atl_single_threaded)|Define if all of your objects use the single threading model.|
+
+## `_ATL_ALL_WARNINGS`
A symbol that enables errors in projects converted from previous versions of ATL.
-```
+```cpp
#define _ATL_ALL_WARNINGS
```
@@ -51,27 +52,27 @@ Before Visual C++ .NET 2002, ATL disabled many warnings and left them disabled s
In projects converted from previous versions, these warnings are still disabled by the libraries headers.
-By adding the following line to the *pch.h* (*stdafx.h* in Visual Studio 2017 and earlier) file before including libraries headers, this behavior can be changed.
+To change this behavior, add the following line to the *`pch.h`* (*`stdafx.h`* in Visual Studio 2017 and earlier) file before including libraries headers.
[!code-cpp[NVC_ATL_Utilities#97](../../atl/codesnippet/cpp/compiler-options-macros_1.h)]
-If this `#define` is added, the ATL headers are careful to preserve the state of these warnings so that they are not disabled globally (or if the user explicitly disables individual warnings, not to enable them).
+If this `#define` is added, the ATL headers are careful to preserve the state of these warnings so that they're not disabled globally (or if the user explicitly disables individual warnings, not to enable them).
New projects have this `#define` set in *pch.h* (*stdafx.h* in Visual Studio 2017 and earlier) by default.
-## _ATL_APARTMENT_THREADED
+## `_ATL_APARTMENT_THREADED`
Define if one or more of your objects use apartment threading.
-```
+```cpp
_ATL_APARTMENT_THREADED
```
### Remarks
-Specifies apartment threading. See [Specifying the Project's Threading Model](../../atl/specifying-the-threading-model-for-a-project-atl.md) for other threading options, and [Options, ATL Simple Object Wizard](../../atl/reference/options-atl-simple-object-wizard.md) for a description of the threading models available for an ATL object.
+Specifies apartment threading. For other options, and a description of the threading models available for an ATL object, see [Specifying the Project's Threading Model](../../atl/specifying-the-threading-model-for-a-project-atl.md) and [Options, ATL Simple Object Wizard](../../atl/reference/options-atl-simple-object-wizard.md).
-## _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
+## `_ATL_CSTRING_EXPLICIT_CONSTRUCTORS`
Makes certain `CString` constructors explicit, preventing any unintentional conversions.
@@ -81,25 +82,25 @@ _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
### Remarks
-When this constructor is defined, all CString constructors that take a single parameter are compiled with the explicit keyword, which prevents implicit conversions of input arguments. This means, for example, that when _UNICODE is defined, if you attempt to use a char* string as a CString constructor argument, a compiler error will result. Use this macro in situations where you need to prevent implicit conversions between narrow and wide string types.
+When this constructor is defined, all `CString` constructors that take a single parameter are compiled with the explicit keyword, which prevents implicit conversions of input arguments. This means, for example, that when `_UNICODE` is defined, if you attempt to use a `char*` string as a `CString` constructor argument, a compiler error results. Use this macro in situations where you need to prevent implicit conversions between narrow and wide string types.
-By using the _T macro on all constructor string arguments, you can define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS and avoid compile errors regardless of whether _UNICODE is defined.
+By using the `_T` macro on all constructor string arguments, you can define `_ATL_CSTRING_EXPLICIT_CONSTRUCTORS` and avoid compile errors regardless of whether `_UNICODE` is defined.
-## _ATL_ENABLE_PTM_WARNING
+## `_ATL_ENABLE_PTM_WARNING`
-Define this macro in order to force the use of ANSI C++ standard-compliant syntax for pointer to member functions. Using this macro will cause the C4867 compiler error to be generated when non-standard syntax is used to initialize a pointer to a member function.
+Define this macro in order to force the use of ANSI C++ standard-conforming syntax for pointer to member functions. Using this macro causes the C4867 compiler error to be generated when nonstandard syntax is used to initialize a pointer to a member function.
-```
+```cpp
#define _ATL_ENABLE_PTM_WARNING
```
### Remarks
-The ATL and MFC libraries have been changed to match the Microsoft C++ compiler's improved standard C++ compliance. According to the ANSI C++ standard, the syntax of a pointer to a class member function should be `&CMyClass::MyFunc`.
+The ATL and MFC libraries have been changed to match the Microsoft C++ compiler's improved standard C++ conformance. According to the ANSI C++ standard, the syntax of a pointer to a class member function should be `&CMyClass::MyFunc`.
-When [_ATL_ENABLE_PTM_WARNING](#_atl_enable_ptm_warning) is not defined (the default case), ATL/MFC disables the C4867 error in macro maps (notably message maps) so that code that was created in earlier versions can continue to build as before. If you define **_ATL_ENABLE_PTM_WARNING**, your code should be C++ standard compliant.
+When [`_ATL_ENABLE_PTM_WARNING`](#_atl_enable_ptm_warning) isn't defined (the default case), ATL/MFC disables the C4867 error in macro maps (notably message maps) so that code that was created in earlier versions can continue to build as before. If you define `_ATL_ENABLE_PTM_WARNING`, your code should conform to the C++ standard.
-However, the non-standard form has been deprecated. You need to move existing code to C++ standard compliant syntax. For example, the following code:
+However, the nonstandard form has been deprecated. You need to move existing code to C++ standard syntax. For example, the following code:
[!code-cpp[NVC_MFCListView#14](../../atl/reference/codesnippet/cpp/compiler-options-macros_2.cpp)]
@@ -109,7 +110,7 @@ Should be changed to:
For map macros, add the ampersand '&' character. You shouldn't add the character again in your code.
-## _ATL_FREE_THREADED
+## `_ATL_FREE_THREADED`
Define if one or more of your objects use free or neutral threading.
@@ -121,9 +122,17 @@ _ATL_FREE_THREADED
Specifies free threading. Free threading is equivalent to a multithread apartment model. See [Specifying the Project's Threading Model](../../atl/specifying-the-threading-model-for-a-project-atl.md) for other threading options, and [Options, ATL Simple Object Wizard](../../atl/reference/options-atl-simple-object-wizard.md) for a description of the threading models available for an ATL object.
-## _ATL_MULTI_THREADED
+## `_ATL_MODULES`
+
+Allows you to compile ATL projects with [`permissive-`](../../build/reference/permissive-standards-conformance.md) and use ATL with [C++ modules](../../cpp/modules-cpp.md).
+
+```
+_ATL_MODULES
+```
+
+## `_ATL_MULTI_THREADED`
-A symbol that indicates the project will have objects that are marked as Both, Free or Neutral.
+A symbol that indicates the project has objects that are marked as Both, Free or Neutral.
```
_ATL_MULTI_THREADED
@@ -131,9 +140,9 @@ _ATL_MULTI_THREADED
### Remarks
-If this symbol is defined, ATL will pull in code that will correctly synchronize access to global data. New code should use the equivalent macro [_ATL_FREE_THREADED](#_atl_free_threaded) instead.
+If this symbol is defined, ATL pulls in code that will correctly synchronize access to global data. New code should use the equivalent macro [`_ATL_FREE_THREADED`](#_atl_free_threaded) instead.
-## _ATL_NO_AUTOMATIC_NAMESPACE
+## `_ATL_NO_AUTOMATIC_NAMESPACE`
A symbol that prevents the default use of namespace as ATL.
@@ -143,9 +152,9 @@ _ATL_NO_AUTOMATIC_NAMESPACE
### Remarks
-If this symbol is not defined, including atlbase.h will perform **using namespace ATL** by default, which may lead to naming conflicts. To prevent this, define this symbol.
+If this symbol isn't defined, including `atlbase.h` performs `using namespace ATL` by default, which may lead to naming conflicts. To prevent this, define this symbol.
-## _ATL_NO_COM_SUPPORT
+## `_ATL_NO_COM_SUPPORT`
A symbol that prevents COM-related code from being compiled with your project.
@@ -153,7 +162,7 @@ A symbol that prevents COM-related code from being compiled with your project.
_ATL_NO_COM_SUPPORT
```
-## ATL_NO_VTABLE
+## `ATL_NO_VTABLE`
A symbol that prevents the vtable pointer from being initialized in the class's constructor and destructor.
@@ -163,13 +172,13 @@ ATL_NO_VTABLE
### Remarks
-If the vtable pointer is prevented from being initialized in the class's constructor and destructor, the linker can eliminate the vtable and all of the functions to which it points. Expands to **`__declspec(novtable)`**.
+If the vtable pointer is prevented from being initialized in the class's constructor and destructor, the linker can eliminate the vtable and all of the functions to which it points. Expands to `__declspec(novtable)`.
### Example
[!code-cpp[NVC_ATL_COM#53](../../atl/codesnippet/cpp/compiler-options-macros_4.h)]
-## ATL_NOINLINE
+## `ATL_NOINLINE`
A symbol that indicates a function shouldn't be inlined.
@@ -183,14 +192,14 @@ A symbol that indicates a function shouldn't be inlined.
### Parameters
-*myfunction*
-The function that should not be inlined.
+*`myfunction`*\
+The function that shouldn't be inlined.
### Remarks
-Use this symbol if you want to ensure a function does not get inlined by the compiler, even though it must be declared as inline so that it can be placed in a header file. Expands to **`__declspec(noinline)`**.
+Use this symbol if you want to ensure a function doesn't get inlined by the compiler, even though it must be declared as inline so that it can be placed in a header file. Expands to `__declspec(noinline)`.
-## _ATL_SINGLE_THREADED
+## `_ATL_SINGLE_THREADED`
Define if all of your objects use the single threading model
diff --git a/docs/atl/reference/composite-control-global-functions.md b/docs/atl/reference/composite-control-global-functions.md
index 3b0d13b506..b55042bb27 100644
--- a/docs/atl/reference/composite-control-global-functions.md
+++ b/docs/atl/reference/composite-control-global-functions.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Composite Control Global Functions"
title: "Composite Control Global Functions"
ms.date: "11/04/2016"
f1_keywords: ["atlhost/ATL::AtlAxDialogBox", "atlhost/ATL::AtlAxCreateDialog", "atlhost/ATL::AtlAxCreateControl", "atlhost/ATL::AtlAxCreateControlEx", "atlhost/ATL::AtlAxCreateControlLic", "atlhost/ATL::AtlAxCreateControlLicEx", "atlhost/ATL::AtlAxAttachControl", "atlhost/ATL::AtlAxGetHost", "atlhost/ATL::AtlAxGetControl", "atlhost/ATL::AtlSetChildSite", "atlhost/ATL::AtlAxWinInit", "atlhost/ATL::AtlAxWinTerm", "atlhost/ATL::AtlGetObjectSourceInterface"]
@@ -12,7 +13,7 @@ These functions provide support for creating dialog boxes, and for creating, hos
> [!IMPORTANT]
> The functions listed in the following table cannot be used in applications that execute in the Windows Runtime.
-|||
+|Function|Description|
|-|-|
|[AtlAxDialogBox](#atlaxdialogbox)|Creates a modal dialog box from a dialog template provided by the user. The resulting dialog box can contain ActiveX controls.|
|[AtlAxCreateDialog](#atlaxcreatedialog)|Creates a modeless dialog box from a dialog template provided by the user. The resulting dialog box can contain ActiveX controls.|
@@ -75,7 +76,7 @@ CONTROL "{04FE35E9-ADBC-4f1d-83FE-8FA4D1F71C7F}", IDC_TEST,
"AtlAxWin80", WS_GROUP | WS_TABSTOP, 0, 0, 100, 100
```
-For more information on editing resource scripts, see [How to: Open a Resource Script File in Text Format](../../windows/how-to-open-a-resource-script-file-in-text-format.md). For more information on control resource-definition statements, see [Common Control Parameters](/windows/win32/menurc/common-control-parameters) under Windows SDK: SDK Tools.
+For more information on editing resource scripts, see [How to: Create Resources](../../windows/how-to-create-a-resource-script-file.md). For more information on control resource-definition statements, see [Common Control Parameters](/windows/win32/menurc/common-control-parameters) under Windows SDK: SDK Tools.
For more information on dialog boxes in general, refer to [DialogBox](/windows/win32/api/winuser/nf-winuser-dialogboxw) and [CreateDialogParam](/windows/win32/api/winuser/nf-winuser-createdialogparamw) in the Windows SDK.
@@ -278,7 +279,7 @@ One of the standard HRESULT values.
### Example
-See [Hosting ActiveX Controls Using ATL AXHost](../../atl/hosting-activex-controls-using-atl-axhost.md) for a sample of how to use `AtlAxCreateControlLic`.
+See [Hosting ActiveX Controls Using ATL AXHost](../../atl/atl-control-containment-faq.yml#hosting-activex-controls-using-atl-axhost) for a sample of how to use `AtlAxCreateControlLic`.
## AtlAxCreateControlLicEx
@@ -345,7 +346,7 @@ One of the standard HRESULT values.
### Example
-See [Hosting ActiveX Controls Using ATL AXHost](../../atl/hosting-activex-controls-using-atl-axhost.md) for a sample of how to use `AtlAxCreateControlLicEx`.
+See [Hosting ActiveX Controls Using ATL AXHost](../../atl/atl-control-containment-faq.yml#hosting-activex-controls-using-atl-axhost) for a sample of how to use `AtlAxCreateControlLicEx`.
## AtlAxAttachControl
diff --git a/docs/atl/reference/composite-control-macros.md b/docs/atl/reference/composite-control-macros.md
index 4578e12c45..9721f16031 100644
--- a/docs/atl/reference/composite-control-macros.md
+++ b/docs/atl/reference/composite-control-macros.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: Composite Control Macros"
title: "Composite Control Macros"
ms.date: "05/06/2019"
-f1_keywords: ["atlcom/ATL::BEGIN_SINK_MAP", "atlcom/ATL::END_SINK_MAP", "atlcom/ATL::SINK_ENTRY"]
+f1_keywords: ["atlcom/ATL::BEGIN_SINK_MAP", "atlcom/ATL::END_SINK_MAP", "atlcom/ATL::SINK_ENTRY", "ATLCOM/BEGIN_SINK_MAP", "ATLCOM/END_SINK_MAP", "ATLCOM/SINK_ENTRY", "ATLCOM/SINK_ENTRY_EX", "ATLCOM/SINK_ENTRY_EX_P", "ATLCOM/SINK_ENTRY_INFO", "ATLCOM/SINK_ENTRY_INFO_P", "BEGIN_SINK_MAP", "END_SINK_MAP", "SINK_ENTRY", "SINK_ENTRY_EX", "SINK_ENTRY_EX_P", "SINK_ENTRY_INFO", "SINK_ENTRY_INFO_P"]
helpviewer_keywords: ["composite controls, macros"]
ms.assetid: 17f2dd5e-07e6-4aa6-b965-7a361c78c45e
---
@@ -9,12 +10,12 @@ ms.assetid: 17f2dd5e-07e6-4aa6-b965-7a361c78c45e
These macros define event sink maps and entries.
-|||
+|Macro|Description|
|-|-|
|[BEGIN_SINK_MAP](#begin_sink_map)|Marks the beginning of the event sink map for the composite control.|
|[END_SINK_MAP](#end_sink_map)|Marks the end of the event sink map for the composite control.|
|[SINK_ENTRY](#sink_entry)|Entry to the event sink map.|
-|[SINK_ENTRY_EX](#sink_entry_ex)|Entry to the event sink map with an additional parameter.|
+|[SINK_ENTRY_EX](#sink_entry_ex)|Entry to the event sink map with an extra parameter.|
|[SINK_ENTRY_EX_P](#sink_entry_ex)| (Visual Studio 2017) Similar to SINK_ENTRY_EX except that it takes a pointer to iid.|
|[SINK_ENTRY_INFO](#sink_entry_info)|Entry to the event sink map with manually supplied type information for use with [IDispEventSimpleImpl](../../atl/reference/idispeventsimpleimpl-class.md).|
|[SINK_ENTRY_INFO_P](#sink_entry_info)| (Visual Studio 2017) Similar to SINK_ENTRY_INFO except that it takes a pointer to iid.|
@@ -42,7 +43,7 @@ BEGIN_SINK_MAP(_class)
### Remarks
-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.
## END_SINK_MAP
@@ -58,7 +59,7 @@ END_SINK_MAP()
### Remarks
-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.
## SINK_ENTRY
@@ -85,7 +86,7 @@ SINK_ENTRY( id, dispid, fn )
### Remarks
-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.
## SINK_ENTRY_EX and SINK_ENTRY_EX_P
@@ -119,7 +120,7 @@ SINK_ENTRY_EX_P( id, piid, dispid, fn ) // (Visual Studio 2017)
### Remarks
-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.
## SINK_ENTRY_INFO and SINK_ENTRY_INFO_P
@@ -152,7 +153,7 @@ SINK_ENTRY_INFO_P( id, piid, dispid, fn, info ) // (Visual Studio 2017)
### Remarks
-The first four macro parameters are the same as those for the [SINK_ENTRY_EX](#sink_entry_ex) macro. The final parameter provides type information for the event. 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.
+The first four macro parameters are the same as the ones for the [SINK_ENTRY_EX](#sink_entry_ex) macro. The final parameter provides type information for the event. 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.
## See also
diff --git a/docs/atl/reference/connection-point-global-functions.md b/docs/atl/reference/connection-point-global-functions.md
index 995af33e61..be49a8643a 100644
--- a/docs/atl/reference/connection-point-global-functions.md
+++ b/docs/atl/reference/connection-point-global-functions.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Connection Point Global Functions"
title: "Connection Point Global Functions"
ms.date: "11/04/2016"
f1_keywords: ["atlbase/ATL::AtlAdvise", "atlbase/ATL::AtlUnadvise", "atlbase/ATL::AtlAdviseSinkMap"]
@@ -12,7 +13,7 @@ These functions provide support for connection points and sink maps.
> [!IMPORTANT]
> The functions listed in the following table cannot be used in applications that execute in the Windows Runtime.
-|||
+|Function|Description|
|-|-|
|[AtlAdvise](#atladvise)|Creates a connection between an object's connection point and a client's sink.|
|[AtlUnadvise](#atlunadvise)|Terminates the connection established through `AtlAdvise`.|
diff --git a/docs/atl/reference/connection-point-macros.md b/docs/atl/reference/connection-point-macros.md
index b9be9eac5d..490abb2c38 100644
--- a/docs/atl/reference/connection-point-macros.md
+++ b/docs/atl/reference/connection-point-macros.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: Connection Point Macros"
title: "Connection Point Macros"
ms.date: "11/04/2016"
-f1_keywords: ["atlcom/ATL::BEGIN_CONNECTION_POINT_MAP", "atlcom/ATL::END_CONNECTION_POINT_MAP"]
+f1_keywords: ["atlcom/ATL::BEGIN_CONNECTION_POINT_MAP", "atlcom/ATL::END_CONNECTION_POINT_MAP", "ATLCOM/BEGIN_CONNECTION_POINT_MAP", "ATLCOM/END_CONNECTION_POINT_MAP", "ATLCOM/CONNECTION_POINT_ENTRY", "ATLCOM/CONNECTION_POINT_ENTRY_P", "BEGIN_CONNECTION_POINT_MAP", "END_CONNECTION_POINT_MAP", "CONNECTION_POINT_ENTRY", "CONNECTION_POINT_ENTRY_P"]
helpviewer_keywords: ["connection points [C++], macros"]
ms.assetid: cc3a6dd3-5538-45df-b027-1f34963c31e5
---
@@ -9,7 +10,7 @@ ms.assetid: cc3a6dd3-5538-45df-b027-1f34963c31e5
These macros define connection point maps and entries.
-|||
+|Macro|Description|
|-|-|
|[BEGIN_CONNECTION_POINT_MAP](#begin_connection_point_map)|Marks the beginning of the connection point map entries.|
|[CONNECTION_POINT_ENTRY](#connection_point_entry)|Enters connection points into the map.|
diff --git a/docs/atl/reference/cpatht-class.md b/docs/atl/reference/cpatht-class.md
index 1042819d05..32b31a3db1 100644
--- a/docs/atl/reference/cpatht-class.md
+++ b/docs/atl/reference/cpatht-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CPathT Class"
title: "CPathT Class"
ms.date: "03/27/2019"
f1_keywords: ["CPathT", "ATLPATH/ATL::CPathT", "ATLPATH/ATL::CPathT::PCXSTR", "ATLPATH/ATL::CPathT::PXSTR", "ATLPATH/ATL::CPathT::XCHAR", "ATLPATH/ATL::CPathT::CPathT", "ATLPATH/ATL::CPathT::AddBackslash", "ATLPATH/ATL::CPathT::AddExtension", "ATLPATH/ATL::CPathT::Append", "ATLPATH/ATL::CPathT::BuildRoot", "ATLPATH/ATL::CPathT::Canonicalize", "ATLPATH/ATL::CPathT::Combine", "ATLPATH/ATL::CPathT::CommonPrefix", "ATLPATH/ATL::CPathT::CompactPath", "ATLPATH/ATL::CPathT::CompactPathEx", "ATLPATH/ATL::CPathT::FileExists", "ATLPATH/ATL::CPathT::FindExtension", "ATLPATH/ATL::CPathT::FindFileName", "ATLPATH/ATL::CPathT::GetDriveNumber", "ATLPATH/ATL::CPathT::GetExtension", "ATLPATH/ATL::CPathT::IsDirectory", "ATLPATH/ATL::CPathT::IsFileSpec", "ATLPATH/ATL::CPathT::IsPrefix", "ATLPATH/ATL::CPathT::IsRelative", "ATLPATH/ATL::CPathT::IsRoot", "ATLPATH/ATL::CPathT::IsSameRoot", "ATLPATH/ATL::CPathT::IsUNC", "ATLPATH/ATL::CPathT::IsUNCServer", "ATLPATH/ATL::CPathT::IsUNCServerShare", "ATLPATH/ATL::CPathT::MakePretty", "ATLPATH/ATL::CPathT::MatchSpec", "ATLPATH/ATL::CPathT::QuoteSpaces", "ATLPATH/ATL::CPathT::RelativePathTo", "ATLPATH/ATL::CPathT::RemoveArgs", "ATLPATH/ATL::CPathT::RemoveBackslash", "ATLPATH/ATL::CPathT::RemoveBlanks", "ATLPATH/ATL::CPathT::RemoveExtension", "ATLPATH/ATL::CPathT::RemoveFileSpec", "ATLPATH/ATL::CPathT::RenameExtension", "ATLPATH/ATL::CPathT::SkipRoot", "ATLPATH/ATL::CPathT::StripPath", "ATLPATH/ATL::CPathT::StripToRoot", "ATLPATH/ATL::CPathT::UnquoteSpaces", "ATLPATH/ATL::CPathT::m_strPath"]
@@ -59,14 +60,14 @@ The ATL/MFC string class to use for the path (see [CStringT](../../atl-mfc-share
|[CPathT::GetDriveNumber](#getdrivenumber)|Call this method to search the path for a drive letter within the range of 'A' to 'Z' and return the corresponding drive number.|
|[CPathT::GetExtension](#getextension)|Call this method to get the file extension from the path.|
|[CPathT::IsDirectory](#isdirectory)|Call this method to check whether the path is a valid directory.|
-|[CPathT::IsFileSpec](#isfilespec)|Call this method to search a path for any path-delimiting characters (for example, ':' or '\\' ). If there are no path-delimiting characters present, the path is considered to be a File Spec path.|
+|[CPathT::IsFileSpec](#isfilespec)|Call this method to search a path for any path-delimiting characters (for example, `:` or `\`). If there are no path-delimiting characters present, the path is considered to be a File Spec path.|
|[CPathT::IsPrefix](#isprefix)|Call this method to determine whether a path contains a valid prefix of the type passed by *pszPrefix*.|
|[CPathT::IsRelative](#isrelative)|Call this method to determine if the path is relative.|
|[CPathT::IsRoot](#isroot)|Call this method to determine if the path is a directory root.|
|[CPathT::IsSameRoot](#issameroot)|Call this method to determine whether another path has a common root component with the current path.|
|[CPathT::IsUNC](#isunc)|Call this method to determine whether the path is a valid UNC (universal naming convention) path for a server and share.|
|[CPathT::IsUNCServer](#isuncserver)|Call this method to determine whether the path is a valid UNC (universal naming convention) path for a server only.|
-|[CPathT::IsUNCServerShare](#isuncservershare)|Call this method to determine whether the path is a valid UNC (universal naming convention) share path, \\\ *server*\ *share*.|
+|[CPathT::IsUNCServerShare](#isuncservershare)|Call this method to determine whether the path is a valid UNC (universal naming convention) share path, *`\\server\share`*.|
|[CPathT::MakePretty](#makepretty)|Call this method to convert a path to all lowercase characters to give the path a consistent appearance.|
|[CPathT::MatchSpec](#matchspec)|Call this method to search the path for a string containing a wildcard match type.|
|[CPathT::QuoteSpaces](#quotespaces)|Call this method to enclose the path in quotation marks if it contains any spaces.|
@@ -176,7 +177,7 @@ void BuildRoot(int iDrive);
### Parameters
*iDrive*
-The drive number (0 is A:, 1 is B:, and so on).
+The drive number (0 is *`A:`*, 1 is *`B:`*, and so on).
### Remarks
@@ -395,7 +396,7 @@ For more information, see [PathIsDirectory](/windows/win32/api/shlwapi/nf-shlwap
## CPathT::IsFileSpec
-Call this method to search a path for any path-delimiting characters (for example, ':' or '\\' ). If there are no path-delimiting characters present, the path is considered to be a File Spec path.
+Call this method to search a path for any path-delimiting characters (for example, `:` or `\`). If there are no path-delimiting characters present, the path is considered to be a File Spec path.
```
BOOL IsFileSpec() const;
@@ -597,7 +598,7 @@ The string to append.
Returns the updated path.
-## CPathT::operator const StringType &
+## CPathT::operator const StringType &
This operator allows the object to be treated like a string.
@@ -621,7 +622,7 @@ operator PCXSTR() const throw();
Returns a string representing the current path managed by this object.
-## CPathT::operator StringType &
+## CPathT::operator StringType &
This operator allows the object to be treated like a string.
diff --git a/docs/atl/reference/cprimitiveelementtraits-class.md b/docs/atl/reference/cprimitiveelementtraits-class.md
index 03ec8da38f..7a0da283d4 100644
--- a/docs/atl/reference/cprimitiveelementtraits-class.md
+++ b/docs/atl/reference/cprimitiveelementtraits-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CPrimitiveElementTraits Class"
title: "CPrimitiveElementTraits Class"
ms.date: "11/04/2016"
f1_keywords: ["CPrimitiveElementTraits", "ATLCOLL/ATL::CPrimitiveElementTraits", "ATLCOLL/ATL::CPrimitiveElementTraits::INARGTYPE", "ATLCOLL/ATL::CPrimitiveElementTraits::OUTARGTYPE"]
diff --git a/docs/atl/reference/cprivateobjectsecuritydesc-class.md b/docs/atl/reference/cprivateobjectsecuritydesc-class.md
index db915df3b7..8d18a4cef8 100644
--- a/docs/atl/reference/cprivateobjectsecuritydesc-class.md
+++ b/docs/atl/reference/cprivateobjectsecuritydesc-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CPrivateObjectSecurityDesc Class"
title: "CPrivateObjectSecurityDesc Class"
ms.date: "11/04/2016"
f1_keywords: ["CPrivateObjectSecurityDesc", "ATLSECURITY/ATL::CPrivateObjectSecurityDesc", "ATLSECURITY/ATL::CPrivateObjectSecurityDesc::CPrivateObjectSecurityDesc", "ATLSECURITY/ATL::CPrivateObjectSecurityDesc::ConvertToAutoInherit", "ATLSECURITY/ATL::CPrivateObjectSecurityDesc::Create", "ATLSECURITY/ATL::CPrivateObjectSecurityDesc::Get", "ATLSECURITY/ATL::CPrivateObjectSecurityDesc::Set"]
@@ -35,7 +36,7 @@ class CPrivateObjectSecurityDesc : public CSecurityDesc
### Operators
-|||
+|Operator|Description|
|-|-|
|[operator =](#operator_eq)|Assignment operator.|
diff --git a/docs/atl/reference/crbmap-class.md b/docs/atl/reference/crbmap-class.md
index eb33aa175f..4617fc49e3 100644
--- a/docs/atl/reference/crbmap-class.md
+++ b/docs/atl/reference/crbmap-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CRBMap Class"
title: "CRBMap Class"
ms.date: "11/04/2016"
f1_keywords: ["CRBMap", "ATLCOLL/ATL::CRBMap", "ATLCOLL/ATL::CRBMap::CRBMap", "ATLCOLL/ATL::CRBMap::Lookup", "ATLCOLL/ATL::CRBMap::RemoveKey", "ATLCOLL/ATL::CRBMap::SetAt"]
diff --git a/docs/atl/reference/crbmultimap-class.md b/docs/atl/reference/crbmultimap-class.md
index c4f52f3787..3788491f6d 100644
--- a/docs/atl/reference/crbmultimap-class.md
+++ b/docs/atl/reference/crbmultimap-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CRBMultiMap Class"
title: "CRBMultiMap Class"
ms.date: "11/04/2016"
f1_keywords: ["CRBMultiMap", "ATLCOLL/ATL::CRBMultiMap", "ATLCOLL/ATL::CRBMultiMap::CRBMultiMap", "ATLCOLL/ATL::CRBMultiMap::FindFirstWithKey", "ATLCOLL/ATL::CRBMultiMap::GetNextValueWithKey", "ATLCOLL/ATL::CRBMultiMap::GetNextWithKey", "ATLCOLL/ATL::CRBMultiMap::Insert", "ATLCOLL/ATL::CRBMultiMap::RemoveKey"]
diff --git a/docs/atl/reference/crbtree-class.md b/docs/atl/reference/crbtree-class.md
index b6b0fadc37..1b37d5c41e 100644
--- a/docs/atl/reference/crbtree-class.md
+++ b/docs/atl/reference/crbtree-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CRBTree Class"
title: "CRBTree Class"
ms.date: "11/04/2016"
f1_keywords: ["CRBTree", "ATLCOLL/ATL::CRBTree", "ATLCOLL/ATL::CRBTree::KINARGTYPE", "ATLCOLL/ATL::CRBTree::KOUTARGTYPE", "ATLCOLL/ATL::CRBTree::VINARGTYPE", "ATLCOLL/ATL::CRBTree::VOUTARGTYPE", "ATLCOLL/ATL::CRBTree::FindFirstKeyAfter", "ATLCOLL/ATL::CRBTree::GetAt", "ATLCOLL/ATL::CRBTree::GetCount", "ATLCOLL/ATL::CRBTree::GetHeadPosition", "ATLCOLL/ATL::CRBTree::GetKeyAt", "ATLCOLL/ATL::CRBTree::GetNext", "ATLCOLL/ATL::CRBTree::GetNextAssoc", "ATLCOLL/ATL::CRBTree::GetNextKey", "ATLCOLL/ATL::CRBTree::GetNextValue", "ATLCOLL/ATL::CRBTree::GetPrev", "ATLCOLL/ATL::CRBTree::GetTailPosition", "ATLCOLL/ATL::CRBTree::GetValueAt", "ATLCOLL/ATL::CRBTree::IsEmpty", "ATLCOLL/ATL::CRBTree::RemoveAll", "ATLCOLL/ATL::CRBTree::RemoveAt", "ATLCOLL/ATL::CRBTree::SetValueAt"]
@@ -103,7 +104,7 @@ This class is used by the methods [CRBTree::GetAt](#getat), [CRBTree::GetNext](#
The members are as follows:
-|||
+|Data member|Description|
|-|-|
|`m_key`|The data member storing the key element.|
|`m_value`|The data member storing the value element.|
diff --git a/docs/atl/reference/creating-an-atl-project.md b/docs/atl/reference/creating-an-atl-project.md
index 88126c0028..0e82550faf 100644
--- a/docs/atl/reference/creating-an-atl-project.md
+++ b/docs/atl/reference/creating-an-atl-project.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Creating an ATL Project"
title: "Creating an ATL Project"
ms.date: "05/06/2019"
f1_keywords: ["vc.appwiz.ATL.project"]
diff --git a/docs/atl/reference/cregkey-class.md b/docs/atl/reference/cregkey-class.md
index a2c11e55cf..175495ad2e 100644
--- a/docs/atl/reference/cregkey-class.md
+++ b/docs/atl/reference/cregkey-class.md
@@ -1,11 +1,11 @@
---
+description: "Learn more about: CRegKey Class"
title: "CRegKey Class"
ms.date: "11/04/2016"
f1_keywords: ["CRegKey", "ATLBASE/ATL::CRegKey", "ATLBASE/ATL::CRegKey::CRegKey", "ATLBASE/ATL::CRegKey::Attach", "ATLBASE/ATL::CRegKey::Close", "ATLBASE/ATL::CRegKey::Create", "ATLBASE/ATL::CRegKey::DeleteSubKey", "ATLBASE/ATL::CRegKey::DeleteValue", "ATLBASE/ATL::CRegKey::Detach", "ATLBASE/ATL::CRegKey::EnumKey", "ATLBASE/ATL::CRegKey::Flush", "ATLBASE/ATL::CRegKey::GetKeySecurity", "ATLBASE/ATL::CRegKey::NotifyChangeKeyValue", "ATLBASE/ATL::CRegKey::Open", "ATLBASE/ATL::CRegKey::QueryBinaryValue", "ATLBASE/ATL::CRegKey::QueryDWORDValue", "ATLBASE/ATL::CRegKey::QueryGUIDValue", "ATLBASE/ATL::CRegKey::QueryMultiStringValue", "ATLBASE/ATL::CRegKey::QueryQWORDValue", "ATLBASE/ATL::CRegKey::QueryStringValue", "ATLBASE/ATL::CRegKey::QueryValue", "ATLBASE/ATL::CRegKey::RecurseDeleteKey", "ATLBASE/ATL::CRegKey::SetBinaryValue", "ATLBASE/ATL::CRegKey::SetDWORDValue", "ATLBASE/ATL::CRegKey::SetGUIDValue", "ATLBASE/ATL::CRegKey::SetKeySecurity", "ATLBASE/ATL::CRegKey::SetKeyValue", "ATLBASE/ATL::CRegKey::SetMultiStringValue", "ATLBASE/ATL::CRegKey::SetQWORDValue", "ATLBASE/ATL::CRegKey::SetStringValue", "ATLBASE/ATL::CRegKey::SetValue", "ATLBASE/ATL::CRegKey::m_hKey", "ATLBASE/ATL::CRegKey::m_pTM"]
helpviewer_keywords: ["CRegKey class", "ATL, registry", "registry, deleting values", "registry, writing to", "registry, deleting keys"]
-ms.assetid: 3afce82b-ba2c-4c1a-8404-dc969e1af74b
---
-# CRegKey Class
+# `CRegKey` Class
This class provides methods for manipulating entries in the system registry.
@@ -24,55 +24,55 @@ class CRegKey
|Name|Description|
|----------|-----------------|
-|[CRegKey::CRegKey](#cregkey)|The constructor.|
-|[CRegKey::~CRegKey](#dtor)|The destructor.|
+|[`CRegKey::CRegKey`](#cregkey)|The constructor.|
+|[`CRegKey::~CRegKey`](#dtor)|The destructor.|
### Public Methods
|Name|Description|
|----------|-----------------|
-|[CRegKey::Attach](#attach)|Call this method to attach an HKEY to the `CRegKey` object by setting the [m_hKey](#m_hkey) member handle to `hKey`.|
-|[CRegKey::Close](#close)|Call this method to release the [m_hKey](#m_hkey) member handle and set it to NULL.|
-|[CRegKey::Create](#create)|Call this method to create the specified key, if it does not exist as a subkey of `hKeyParent`.|
-|[CRegKey::DeleteSubKey](#deletesubkey)|Call this method to remove the specified key from the registry.|
-|[CRegKey::DeleteValue](#deletevalue)|Call this method to remove a value field from [m_hKey](#m_hkey).|
-|[CRegKey::Detach](#detach)|Call this method to detach the [m_hKey](#m_hkey) member handle from the `CRegKey` object and set `m_hKey` to NULL.|
-|[CRegKey::EnumKey](#enumkey)|Call this method to enumerate the subkeys of the open registry key.|
-|[CRegKey::Flush](#flush)|Call this method to write all of the attributes of the open registry key into the registry.|
-|[CRegKey::GetKeySecurity](#getkeysecurity)|Call this method to retrieve a copy of the security descriptor protecting the open registry key.|
-|[CRegKey::NotifyChangeKeyValue](#notifychangekeyvalue)|This method notifies the caller about changes to the attributes or contents of the open registry key.|
-|[CRegKey::Open](#open)|Call this method to open the specified key and set [m_hKey](#m_hkey) to the handle of this key.|
-|[CRegKey::QueryBinaryValue](#querybinaryvalue)|Call this method to retrieve the binary data for a specified value name.|
-|[CRegKey::QueryDWORDValue](#querydwordvalue)|Call this method to retrieve the DWORD data for a specified value name.|
-|[CRegKey::QueryGUIDValue](#queryguidvalue)|Call this method to retrieve the GUID data for a specified value name.|
-|[CRegKey::QueryMultiStringValue](#querymultistringvalue)|Call this method to retrieve the multistring data for a specified value name.|
-|[CRegKey::QueryQWORDValue](#queryqwordvalue)|Call this method to retrieve the QWORD data for a specified value name.|
-|[CRegKey::QueryStringValue](#querystringvalue)|Call this method to retrieve the string data for a specified value name.|
-|[CRegKey::QueryValue](#queryvalue)|Call this method to retrieve the data for the specified value field of [m_hKey](#m_hkey). Earlier versions of this method are no longer supported and are marked as ATL_DEPRECATED.|
-|[CRegKey::RecurseDeleteKey](#recursedeletekey)|Call this method to remove the specified key from the registry and explicitly remove any subkeys.|
-|[CRegKey::SetBinaryValue](#setbinaryvalue)|Call this method to set the binary value of the registry key.|
-|[CRegKey::SetDWORDValue](#setdwordvalue)|Call this method to set the DWORD value of the registry key.|
-|[CRegKey::SetGUIDValue](#setguidvalue)|Call this method to set the GUID value of the registry key.|
-|[CRegKey::SetKeySecurity](#setkeysecurity)|Call this method to set the security of the registry key.|
-|[CRegKey::SetKeyValue](#setkeyvalue)|Call this method to store data in a specified value field of a specified key.|
-|[CRegKey::SetMultiStringValue](#setmultistringvalue)|Call this method to set the multistring value of the registry key.|
-|[CRegKey::SetQWORDValue](#setqwordvalue)|Call this method to set the QWORD value of the registry key.|
-|[CRegKey::SetStringValue](#setstringvalue)|Call this method to set the string value of the registry key.|
-|[CRegKey::SetValue](#setvalue)|Call this method to store data in the specified value field of [m_hKey](#m_hkey). Earlier versions of this method are no longer supported and are marked as ATL_DEPRECATED.|
+|[`CRegKey::Attach`](#attach)|Call this method to attach an HKEY to the `CRegKey` object by setting the [`m_hKey`](#m_hkey) member handle to `hKey`.|
+|[`CRegKey::Close`](#close)|Call this method to release the [`m_hKey`](#m_hkey) member handle and set it to `NULL`.|
+|[`CRegKey::Create`](#create)|Call this method to create the specified key, if it doesn't exist as a subkey of `hKeyParent`.|
+|[`CRegKey::DeleteSubKey`](#deletesubkey)|Call this method to remove the specified key from the registry.|
+|[`CRegKey::DeleteValue`](#deletevalue)|Call this method to remove a value field from [`m_hKey`](#m_hkey).|
+|[`CRegKey::Detach`](#detach)|Call this method to detach the [`m_hKey`](#m_hkey) member handle from the `CRegKey` object and set `m_hKey` to `NULL`.|
+|[`CRegKey::EnumKey`](#enumkey)|Call this method to enumerate the subkeys of the open registry key.|
+|[`CRegKey::Flush`](#flush)|Call this method to write all of the attributes of the open registry key into the registry.|
+|[`CRegKey::GetKeySecurity`](#getkeysecurity)|Call this method to retrieve a copy of the security descriptor protecting the open registry key.|
+|[`CRegKey::NotifyChangeKeyValue`](#notifychangekeyvalue)|This method notifies the caller about changes to the attributes or contents of the open registry key.|
+|[`CRegKey::Open`](#open)|Call this method to open the specified key and set [`m_hKey`](#m_hkey) to the handle of this key.|
+|[`CRegKey::QueryBinaryValue`](#querybinaryvalue)|Call this method to retrieve the binary data for a specified value name.|
+|[`CRegKey::QueryDWORDValue`](#querydwordvalue)|Call this method to retrieve the `DWORD` data for a specified value name.|
+|[`CRegKey::QueryGUIDValue`](#queryguidvalue)|Call this method to retrieve the GUID data for a specified value name.|
+|[`CRegKey::QueryMultiStringValue`](#querymultistringvalue)|Call this method to retrieve the multistring data for a specified value name.|
+|[`CRegKey::QueryQWORDValue`](#queryqwordvalue)|Call this method to retrieve the `QWORD` data for a specified value name.|
+|[`CRegKey::QueryStringValue`](#querystringvalue)|Call this method to retrieve the string data for a specified value name.|
+|[`CRegKey::QueryValue`](#queryvalue)|Call this method to retrieve the data for the specified value field of [`m_hKey`](#m_hkey). Earlier versions of this method are no longer supported and are marked as `ATL_DEPRECATED`.|
+|[`CRegKey::RecurseDeleteKey`](#recursedeletekey)|Call this method to remove the specified key from the registry and explicitly remove any subkeys.|
+|[`CRegKey::SetBinaryValue`](#setbinaryvalue)|Call this method to set the binary value of the registry key.|
+|[`CRegKey::SetDWORDValue`](#setdwordvalue)|Call this method to set the `DWORD` value of the registry key.|
+|[`CRegKey::SetGUIDValue`](#setguidvalue)|Call this method to set the GUID value of the registry key.|
+|[`CRegKey::SetKeySecurity`](#setkeysecurity)|Call this method to set the security of the registry key.|
+|[`CRegKey::SetKeyValue`](#setkeyvalue)|Call this method to store data in a specified value field of a specified key.|
+|[`CRegKey::SetMultiStringValue`](#setmultistringvalue)|Call this method to set the multistring value of the registry key.|
+|[`CRegKey::SetQWORDValue`](#setqwordvalue)|Call this method to set the `QWORD` value of the registry key.|
+|[`CRegKey::SetStringValue`](#setstringvalue)|Call this method to set the string value of the registry key.|
+|[`CRegKey::SetValue`](#setvalue)|Call this method to store data in the specified value field of [`m_hKey`](#m_hkey). Earlier versions of this method are no longer supported and are marked as `ATL_DEPRECATED`.|
### Public Operators
|Name|Description|
|----------|-----------------|
-|[CRegKey::operator HKEY](#operator_hkey)|Converts a `CRegKey` object to an HKEY.|
-|[CRegKey::operator =](#operator_eq)|Assignment operator.|
+|[`CRegKey::operator HKEY`](#operator_hkey)|Converts a `CRegKey` object to an `HKEY`.|
+|[`CRegKey::operator =`](#operator_eq)|Assignment operator.|
### Public Data Members
|Name|Description|
|----------|-----------------|
-|[CRegKey::m_hKey](#m_hkey)|Contains a handle of the registry key associated with the `CRegKey` object.|
-|[CRegKey::m_pTM](#m_ptm)|Pointer to `CAtlTransactionManager` object|
+|[`CRegKey::m_hKey`](#m_hkey)|Contains a handle of the registry key associated with the `CRegKey` object.|
+|[`CRegKey::m_pTM`](#m_ptm)|Pointer to `CAtlTransactionManager` object|
## Remarks
@@ -80,18 +80,18 @@ class CRegKey
`CRegKey` provides a programming interface to the system registry for a given machine. For example, to open a particular registry key, call `CRegKey::Open`. To retrieve or modify a data value, call `CRegKey::QueryValue` or `CRegKey::SetValue`, respectively. To close a key, call `CRegKey::Close`.
-When you close a key, its registry data is written (flushed) to the hard disk. This process may take several seconds. If your application must explicitly write registry data to the hard disk, you can call the [RegFlushKey](/windows/win32/api/winreg/nf-winreg-regflushkey) Win32 function. However, `RegFlushKey` uses many system resources and should be called only when absolutely necessary.
+When you close a key, its registry data is written (flushed) to the hard disk. This process may take several seconds. If your application must explicitly write registry data to the hard disk, you can call the [`RegFlushKey`](/windows/win32/api/winreg/nf-winreg-regflushkey) Win32 function. However, `RegFlushKey` uses many system resources and should be called only when absolutely necessary.
> [!IMPORTANT]
-> Any methods that allow the caller to specify a registry location have the potential to read data that cannot be trusted. Methods that make use of [RegQueryValueEx](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) should take into consideration that this function does not explicitly handle strings which are NULL terminated. Both conditions should be checked for by the calling code.
+> Any methods that allow the caller to specify a registry location have the potential to read data that cannot be trusted. Methods that make use of [`RegQueryValueEx`](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) should take into consideration that this function does not explicitly handle strings which are null-terminated. Both conditions should be checked for by the calling code.
## Requirements
-**Header:** atlbase.h
+**Header:** `atlbase.h`
-## CRegKey::Attach
+## `CRegKey::Attach`
-Call this method to attach an HKEY to the `CRegKey` object by setting the [m_hKey](#m_hkey) member handle to *hKey*.
+Call this method to attach an `HKEY` to the `CRegKey` object by setting the [`m_hKey`](#m_hkey) member handle to *`hKey`*.
```cpp
void Attach(HKEY hKey) throw();
@@ -99,16 +99,16 @@ void Attach(HKEY hKey) throw();
### Parameters
-*hKey*
+`hKey`\
The handle of a registry key.
### Remarks
-`Attach` will assert if `m_hKey` is non-NULL.
+`Attach` will assert if `m_hKey` is non-`NULL`.
-## CRegKey::Close
+## `CRegKey::Close`
-Call this method to release the [m_hKey](#m_hkey) member handle and set it to NULL.
+Call this method to release the [`m_hKey`](#m_hkey) member handle and set it to `NULL`.
```
LONG Close() throw();
@@ -116,11 +116,11 @@ LONG Close() throw();
### Return Value
-If successful, returns ERROR_SUCCESS; otherwise returns an error value.
+If successful, returns `ERROR_SUCCESS`; otherwise returns an error value.
-## CRegKey::Create
+## `CRegKey::Create`
-Call this method to create the specified key, if it does not exist as a subkey of *hKeyParent*.
+Call this method to create the specified key, if it doesn't exist as a subkey of *`hKeyParent`*.
```
LONG Create(
@@ -135,36 +135,36 @@ LONG Create(
### Parameters
-*hKeyParent*
+*`hKeyParent`*\
The handle of an open key.
-*lpszKeyName*
-Specifies the name of a key to be created or opened. This name must be a subkey of *hKeyParent*.
+*`lpszKeyName`*\
+Specifies the name of a key to be created or opened. This name must be a subkey of *`hKeyParent`*.
-*lpszClass*
+*`lpszClass`*\
Specifies the class of the key to be created or opened. The default value is REG_NONE.
-*dwOptions*
-Options for the key. The default value is REG_OPTION_NON_VOLATILE. For a list of possible values and descriptions, see [RegCreateKeyEx](/windows/win32/api/winreg/nf-winreg-regcreatekeyexw) in the Windows SDK.
+*`dwOptions`*\
+Options for the key. The default value is `REG_OPTION_NON_VOLATILE`. For a list of possible values and descriptions, see [`RegCreateKeyEx`](/windows/win32/api/winreg/nf-winreg-regcreatekeyexw) in the Windows SDK.
-*samDesired*
-The security access for the key. The default value is KEY_READ | KEY_WRITE. For a list of possible values and descriptions, see `RegCreateKeyEx`.
+*`samDesired`*\
+The security access for the key. The default value is `KEY_READ | KEY_WRITE`. For a list of possible values and descriptions, see `RegCreateKeyEx`.
-*lpSecAttr*
-A pointer to a [SECURITY_ATTRIBUTES](/previous-versions/windows/desktop/legacy/aa379560\(v=vs.85\)) structure that indicates whether the handle of the key can be inherited by a child process. By default, this parameter is NULL (meaning the handle cannot be inherited).
+*`lpSecAttr`*\
+A pointer to a [`SECURITY_ATTRIBUTES`](/previous-versions/windows/desktop/legacy/aa379560\(v=vs.85\)) structure that indicates whether the handle of the key can be inherited by a child process. By default, this parameter is `NULL` (meaning the handle can't be inherited).
-*lpdwDisposition*
-[out] If non-NULL, retrieves either REG_CREATED_NEW_KEY (if the key did not exist and was created) or REG_OPENED_EXISTING_KEY (if the key existed and was opened).
+*`lpdwDisposition`*\
+[out] If non-`NULL`, retrieves either `REG_CREATED_NEW_KEY` (if the key didn't exist and was created) or `REG_OPENED_EXISTING_KEY` (if the key existed and was opened).
### Return Value
-If successful, returns ERROR_SUCCESS and opens the key. If the method fails, the return value is a nonzero error code defined in WINERROR.H.
+If successful, returns `ERROR_SUCCESS` and opens the key. If the method fails, the return value is a nonzero error code defined in `WINERROR.H`.
### Remarks
-`Create` sets the [m_hKey](#m_hkey) member to the handle of this key.
+`Create` sets the [`m_hKey`](#m_hkey) member to the handle of this key.
-## CRegKey::CRegKey
+## `CRegKey::CRegKey`
The constructor.
@@ -177,20 +177,20 @@ CRegKey(CAtlTransactionManager* pTM) throw();
### Parameters
-*key*
+*`key`*\
A reference to a `CRegKey` object.
-*hKey*
+`hKey`\
A handle to a registry key.
-*pTM*
-Pointer to CAtlTransactionManager object
+*`pTM`*\
+Pointer to `CAtlTransactionManager` object
### Remarks
Creates a new `CRegKey` object. The object can be created from an existing `CRegKey` object, or from a handle to a registry key.
-## CRegKey::~CRegKey
+## `CRegKey::~CRegKey`
The destructor.
@@ -202,7 +202,7 @@ The destructor.
The destructor releases `m_hKey`.
-## CRegKey::DeleteSubKey
+## `CRegKey::DeleteSubKey`
Call this method to remove the specified key from the registry.
@@ -212,20 +212,20 @@ LONG DeleteSubKey(LPCTSTR lpszSubKey) throw();
### Parameters
-*lpszSubKey*
-Specifies the name of the key to delete. This name must be a subkey of [m_hKey](#m_hkey).
+*`lpszSubKey`*\
+Specifies the name of the key to delete. This name must be a subkey of [`m_hKey`](#m_hkey).
### Return Value
-If successful, returns ERROR_SUCCESS. If the method fails, the return value is a nonzero error code defined in WINERROR.H.
+If successful, returns `ERROR_SUCCESS`. If the method fails, the return value is a nonzero error code defined in `WINERROR.H`.
### Remarks
-`DeleteSubKey` can only delete a key that has no subkeys. If the key has subkeys, call [RecurseDeleteKey](#recursedeletekey) instead.
+`DeleteSubKey` can only delete a key that has no subkeys. If the key has subkeys, call [`RecurseDeleteKey`](#recursedeletekey) instead.
-## CRegKey::DeleteValue
+## `CRegKey::DeleteValue`
-Call this method to remove a value field from [m_hKey](#m_hkey).
+Call this method to remove a value field from [`m_hKey`](#m_hkey).
```
LONG DeleteValue(LPCTSTR lpszValue) throw();
@@ -233,16 +233,16 @@ LONG DeleteValue(LPCTSTR lpszValue) throw();
### Parameters
-*lpszValue*
+*`lpszValue`*\
Specifies the value field to remove.
### Return Value
-If successful, returns ERROR_SUCCESS. If the method fails, the return value is a nonzero error code defined in WINERROR.H.
+If successful, returns `ERROR_SUCCESS`. If the method fails, the return value is a nonzero error code defined in `WINERROR.H`.
-## CRegKey::Detach
+## `CRegKey::Detach`
-Call this method to detach the [m_hKey](#m_hkey) member handle from the `CRegKey` object and set `m_hKey` to NULL.
+Call this method to detach the [`m_hKey`](#m_hkey) member handle from the `CRegKey` object and set `m_hKey` to `NULL`.
```
HKEY Detach() throw();
@@ -252,7 +252,7 @@ HKEY Detach() throw();
The HKEY associated with the `CRegKey` object.
-## CRegKey::EnumKey
+## `CRegKey::EnumKey`
Call this method to enumerate the subkeys of the open registry key.
@@ -266,27 +266,27 @@ LONG EnumKey(
### Parameters
-*iIndex*
+*`iIndex`*\
The subkey index. This parameter should be zero for the first call and then incremented for subsequent calls
-*pszName*
+*`pszName`*\
Pointer to a buffer that receives the name of the subkey, including the terminating null character. Only the name of the subkey is copied to the buffer, not the full key hierarchy.
-*pnNameLength*
-Pointer to a variable that specifies the size, in TCHARs, of the buffer specified by the *pszName* parameter. This size should include the terminating null character. When the method returns, the variable pointed to by *pnNameLength* contains the number of characters stored in the buffer. The count returned does not include the terminating null character.
+*`pnNameLength`*\
+Pointer to a variable that specifies the size, in `TCHARs`, of the buffer specified by the *`pszName`* parameter. This size should include the terminating null character. When the method returns, the variable pointed to by *`pnNameLength`* contains the number of characters stored in the buffer. The count returned doesn't include the terminating null character.
-*pftLastWriteTime*
+*`pftLastWriteTime`*\
Pointer to a variable that receives the time the enumerated subkey was last written to.
### Return Value
-If the method succeeds, the return value is ERROR_SUCCESS. If the method fails, the return value is a nonzero error code defined in WINERROR.H.
+If the method succeeds, the return value is `ERROR_SUCCESS`. If the method fails, the return value is a nonzero error code defined in `WINERROR.H`.
### Remarks
-To enumerate the subkeys, call `CRegKey::EnumKey` with an index of zero. Increment the index value and repeat until the method returns ERROR_NO_MORE_ITEMS. For more information, see [RegEnumKeyEx](/windows/win32/api/winreg/nf-winreg-regenumkeyexw) in the Windows SDK.
+To enumerate the subkeys, call `CRegKey::EnumKey` with an index of zero. Increment the index value and repeat until the method returns `ERROR_NO_MORE_ITEMS`. For more information, see [`RegEnumKeyEx`](/windows/win32/api/winreg/nf-winreg-regenumkeyexw) in the Windows SDK.
-## CRegKey::Flush
+## `CRegKey::Flush`
Call this method to write all of the attributes of the open registry key into the registry.
@@ -296,13 +296,13 @@ LONG Flush() throw();
### Return Value
-If the method succeeds, the return value is ERROR_SUCCESS. If the method fails, the return value is a nonzero error code defined in WINERROR.H.
+If the method succeeds, the return value is `ERROR_SUCCESS`. If the method fails, the return value is a nonzero error code defined in `WINERROR.H`.
### Remarks
-For more information, see [RegEnumFlush](/windows/win32/api/winreg/nf-winreg-regflushkey) in the Windows SDK.
+For more information, see [`RegEnumFlush`](/windows/win32/api/winreg/nf-winreg-regflushkey) in the Windows SDK.
-## CRegKey::GetKeySecurity
+## `CRegKey::GetKeySecurity`
Call this method to retrieve a copy of the security descriptor protecting the open registry key.
@@ -315,24 +315,24 @@ LONG GetKeySecurity(
### Parameters
-*si*
-The [SECURITY_INFORMATION](/windows/win32/SecAuthZ/security-information) value that indicates the requested security information.
+*`si`*\
+The [`SECURITY_INFORMATION`](/windows/win32/SecAuthZ/security-information) value that indicates the requested security information.
-*psd*
+*`psd`*\
A pointer to a buffer that receives a copy of the requested security descriptor.
-*pnBytes*
-The size, in bytes, of the buffer pointed to by *psd*.
+*`pnBytes`*\
+The size, in bytes, of the buffer pointed to by *`psd`*.
### Return Value
-If the method succeeds, the return value is ERROR_SUCCESS. If the method fails, the return value is a nonzero error code is defined in WINERROR.H.
+If the method succeeds, the return value is `ERROR_SUCCESS`. If the method fails, the return value is a nonzero error code is defined in `WINERROR.H`.
### Remarks
-For more information, see [RegGetKeySecurity](/windows/win32/api/winreg/nf-winreg-reggetkeysecurity).
+For more information, see [`RegGetKeySecurity`](/windows/win32/api/winreg/nf-winreg-reggetkeysecurity).
-## CRegKey::m_hKey
+## `CRegKey::m_hKey`
Contains a handle of the registry key associated with the `CRegKey` object.
@@ -340,7 +340,7 @@ Contains a handle of the registry key associated with the `CRegKey` object.
HKEY m_hKey;
```
-## CRegKey::m_pTM
+## `CRegKey::m_pTM`
Pointer to a `CAtlTransactionManager` object.
@@ -350,7 +350,7 @@ CAtlTransactionManager* m_pTM;
### Remarks
-## CRegKey::NotifyChangeKeyValue
+## `CRegKey::NotifyChangeKeyValue`
This method notifies the caller about changes to the attributes or contents of the open registry key.
@@ -364,39 +364,39 @@ LONG NotifyChangeKeyValue(
### Parameters
-*bWatchSubtree*
-Specifies a flag that indicates whether to report changes in the specified key and all of its subkeys or only in the specified key. If this parameter is TRUE, the method reports changes in the key and its subkeys. If the parameter is FALSE, the method reports changes only in the key.
+*`bWatchSubtree`*\
+Specifies a flag that indicates whether to report changes in the specified key and all of its subkeys or only in the specified key. If this parameter is `TRUE`, the method reports changes in the key and its subkeys. If the parameter is `FALSE`, the method reports changes only in the key.
-*dwNotifyFilter*
+*`dwNotifyFilter`*\
Specifies a set of flags that control which changes should be reported. This parameter can be a combination of the following values:
|Value|Meaning|
|-----------|-------------|
-|REG_NOTIFY_CHANGE_NAME|Notify the caller if a subkey is added or deleted.|
-|REG_NOTIFY_CHANGE_ATTRIBUTES|Notify the caller of changes to the attributes of the key, such as the security descriptor information.|
-|REG_NOTIFY_CHANGE_LAST_SET|Notify the caller of changes to a value of the key. This can include adding or deleting a value, or changing an existing value.|
-|REG_NOTIFY_CHANGE_SECURITY|Notify the caller of changes to the security descriptor of the key.|
+|`REG_NOTIFY_CHANGE_NAME`|Notify the caller if a subkey is added or deleted.|
+|`REG_NOTIFY_CHANGE_ATTRIBUTES`|Notify the caller of changes to the attributes of the key, such as the security descriptor information.|
+|`REG_NOTIFY_CHANGE_LAST_SET`|Notify the caller of changes to a value of the key. This can include adding or deleting a value, or changing an existing value.|
+|`REG_NOTIFY_CHANGE_SECURITY`|Notify the caller of changes to the security descriptor of the key.|
-*hEvent*
-Handle to an event. If the *bAsync* parameter is TRUE, the method returns immediately and changes are reported by signaling this event. If *bAsync* is FALSE, *hEvent* is ignored.
+*`hEvent`*\
+Handle to an event. If the *`bAsync`* parameter is `TRUE`, the method returns immediately and changes are reported by signaling this event. If *`bAsync`* is `FALSE`, *`hEvent`* is ignored.
-*bAsync*
-Specifies a flag that indicates how the method reports changes. If this parameter is TRUE, the method returns immediately and reports changes by signaling the specified event. When this parameter is FALSE, the method does not return until a change has occurred. If *hEvent* does not specify a valid event, the *bAsync* parameter cannot be TRUE.
+*`bAsync`*\
+Specifies a flag that indicates how the method reports changes. If this parameter is `TRUE`, the method returns immediately and reports changes by signaling the specified event. When this parameter is `FALSE`, the method doesn't return until a change has occurred. If *`hEvent`* doesn't specify a valid event, the *`bAsync`* parameter can't be `TRUE`.
### Return Value
-If the method succeeds, the return value is ERROR_SUCCESS. If the method fails, the return value is a nonzero error code defined in WINERROR.H.
+If the method succeeds, the return value is `ERROR_SUCCESS`. If the method fails, the return value is a nonzero error code defined in `WINERROR.H`.
### Remarks
> [!NOTE]
> This method does not notify the caller if the specified key is deleted.
-For more details and a sample program, see [RegNotifyChangeKeyValue](/windows/win32/api/winreg/nf-winreg-regnotifychangekeyvalue).
+For more details and a sample program, see [`RegNotifyChangeKeyValue`](/windows/win32/api/winreg/nf-winreg-regnotifychangekeyvalue).
-## CRegKey::Open
+## `CRegKey::Open`
-Call this method to open the specified key and set [m_hKey](#m_hkey) to the handle of this key.
+Call this method to open the specified key and set [`m_hKey`](#m_hkey) to the handle of this key.
```
LONG Open(
@@ -407,34 +407,34 @@ LONG Open(
### Parameters
-*hKeyParent*
+*`hKeyParent`*\
The handle of an open key.
-*lpszKeyName*
-Specifies the name of a key to be created or opened. This name must be a subkey of *hKeyParent*.
+*`lpszKeyName`*\
+Specifies the name of a key to be created or opened. This name must be a subkey of *`hKeyParent`*.
-*samDesired*
-The security access for the key. The default value is KEY_ALL_ACCESS. For a list of possible values and descriptions, see [RegCreateKeyEx](/windows/win32/api/winreg/nf-winreg-regcreatekeyexw) in the Windows SDK.
+*`samDesired`*\
+The security access for the key. The default value is `KEY_ALL_ACCESS`. For a list of possible values and descriptions, see [`RegCreateKeyEx`](/windows/win32/api/winreg/nf-winreg-regcreatekeyexw) in the Windows SDK.
### Return Value
-If successful, returns ERROR_SUCCESS; otherwise, a non-zero error value defined in WINERROR.H.
+If successful, returns `ERROR_SUCCESS`; otherwise, a non-zero error value defined in `WINERROR.H`.
### Remarks
-If the *lpszKeyName* parameter is NULL or points to an empty string, `Open` opens a new handle of the key identified by *hKeyParent*, but does not close any previously opened handle.
+If the *`lpszKeyName`* parameter is `NULL` or points to an empty string, `Open` opens a new handle of the key identified by *`hKeyParent`*, but doesn't close any previously opened handle.
-Unlike [CRegKey::Create](#create), `Open` will not create the specified key if it does not exist.
+Unlike [`CRegKey::Create`](#create), `Open` won't create the specified key if it doesn't exist.
-## CRegKey::operator HKEY
+## `CRegKey::operator HKEY`
-Converts a `CRegKey` object to an HKEY.
+Converts a `CRegKey` object to an `HKEY`.
```
operator HKEY() const throw();
```
-## CRegKey::operator =
+## `CRegKey::operator =`
Assignment operator.
@@ -444,7 +444,7 @@ CRegKey& operator= (CRegKey& key) throw();
### Parameters
-*key*
+*`key`*\
The key to copy.
### Return Value
@@ -453,9 +453,9 @@ Returns a reference to the new key.
### Remarks
-This operator detaches *key* from its current object and assigns it to the `CRegKey` object instead.
+This operator detaches *`key`* from its current object and assigns it to the `CRegKey` object instead.
-## CRegKey::QueryBinaryValue
+## `CRegKey::QueryBinaryValue`
Call this method to retrieve the binary data for a specified value name.
@@ -468,29 +468,29 @@ LONG QueryBinaryValue(
### Parameters
-*pszValueName*
-Pointer to a null-terminated string containing the name of the value to query.
+*`pszValueName`*\
+Pointer to a `NULL`-terminated string containing the name of the value to query.
-*pValue*
+*`pValue`*\
Pointer to a buffer that receives the value's data.
-*pnBytes*
-Pointer to a variable that specifies the size, in bytes, of the buffer pointed to by the *pValue* parameter. When the method returns, this variable contains the size of the data copied to the buffer.
+*`pnBytes`*\
+Pointer to a variable that specifies the size, in bytes, of the buffer pointed to by the *`pValue`* parameter. When the method returns, this variable contains the size of the data copied to the buffer.
### Return Value
-If the method succeeds, ERROR_SUCCESS is returned. If the method fails to read a value, it returns a nonzero error code defined in WINERROR.H. If the data referenced is not of type REG_BINARY, ERROR_INVALID_DATA is returned.
+If the method succeeds, `ERROR_SUCCESS` is returned. If the method fails to read a value, it returns a nonzero error code defined in `WINERROR.H`. If the data referenced isn't of type `REG_BINARY`, `ERROR_INVALID_DATA` is returned.
### Remarks
-This method makes use of `RegQueryValueEx` and confirms that the correct type of data is returned. See [RegQueryValueEx](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) for more details.
+This method makes use of `RegQueryValueEx` and confirms that the correct type of data is returned. See [`RegQueryValueEx`](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) for more details.
> [!IMPORTANT]
-> This method allows the caller to specify any registry location, potentially reading data which cannot be trusted. Also, the [RegQueryValueEx](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) function used by this method does not explicitly handle strings which are NULL terminated. Both conditions should be checked for by the calling code.
+> This method allows the caller to specify any registry location, potentially reading data which cannot be trusted. Also, the [`RegQueryValueEx`](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) function used by this method does not explicitly handle strings which are null-terminated. Both conditions should be checked for by the calling code.
-## CRegKey::QueryDWORDValue
+## `CRegKey::QueryDWORDValue`
-Call this method to retrieve the DWORD data for a specified value name.
+Call this method to retrieve the `DWORD` data for a specified value name.
```
LONG QueryDWORDValue(
@@ -500,24 +500,24 @@ LONG QueryDWORDValue(
### Parameters
-*pszValueName*
-Pointer to a null-terminated string containing the name of the value to query.
+*`pszValueName`*\
+Pointer to a `NULL`-terminated string containing the name of the value to query.
-*dwValue*
-Pointer to a buffer that receives the DWORD.
+*`dwValue`*\
+Pointer to a buffer that receives the `DWORD`.
### Return Value
-If the method succeeds, ERROR_SUCCESS is returned. If the method fails to read a value, it returns a nonzero error code defined in WINERROR.H. If the data referenced is not of type REG_DWORD, ERROR_INVALID_DATA is returned.
+If the method succeeds, `ERROR_SUCCESS` is returned. If the method fails to read a value, it returns a nonzero error code defined in `WINERROR.H`. If the data referenced isn't of type `REG_DWORD`, `ERROR_INVALID_DATA` is returned.
### Remarks
-This method makes use of `RegQueryValueEx` and confirms that the correct type of data is returned. See [RegQueryValueEx](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) for more details.
+This method makes use of `RegQueryValueEx` and confirms that the correct type of data is returned. See [`RegQueryValueEx`](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) for more details.
> [!IMPORTANT]
-> This method allows the caller to specify any registry location, potentially reading data which cannot be trusted. Also, the [RegQueryValueEx](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) function used by this method does not explicitly handle strings which are NULL terminated. Both conditions should be checked for by the calling code.
+> This method allows the caller to specify any registry location, potentially reading data which cannot be trusted. Also, the [`RegQueryValueEx`](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) function used by this method does not explicitly handle strings which are null-terminated. Both conditions should be checked for by the calling code.
-## CRegKey::QueryGUIDValue
+## `CRegKey::QueryGUIDValue`
Call this method to retrieve the GUID data for a specified value name.
@@ -529,24 +529,24 @@ LONG QueryGUIDValue(
### Parameters
-*pszValueName*
-Pointer to a null-terminated string containing the name of the value to query.
+*`pszValueName`*\
+Pointer to a `NULL`-terminated string containing the name of the value to query.
-*guidValue*
+*`guidValue`*\
Pointer to a variable that receives the GUID.
### Return Value
-If the method succeeds, ERROR_SUCCESS is returned. If the method fails to read a value, it returns a nonzero error code defined in WINERROR.H. If the data referenced is not a valid GUID, ERROR_INVALID_DATA is returned.
+If the method succeeds, `ERROR_SUCCESS` is returned. If the method fails to read a value, it returns a nonzero error code defined in `WINERROR.H`. If the data referenced isn't a valid GUID, `ERROR_INVALID_DATA` is returned.
### Remarks
-This method makes use of `CRegKey::QueryStringValue` and converts the string into a GUID using [CLSIDFromString](/windows/win32/api/combaseapi/nf-combaseapi-clsidfromstring).
+This method makes use of `CRegKey::QueryStringValue` and converts the string into a GUID using [`CLSIDFromString`](/windows/win32/api/combaseapi/nf-combaseapi-clsidfromstring).
> [!IMPORTANT]
> This method allows the caller to specify any registry location, potentially reading data which cannot be trusted.
-## CRegKey::QueryMultiStringValue
+## `CRegKey::QueryMultiStringValue`
Call this method to retrieve the multistring data for a specified value name.
@@ -559,29 +559,29 @@ LONG QueryMultiStringValue(
### Parameters
-*pszValueName*
-Pointer to a null-terminated string containing the name of the value to query.
+*`pszValueName`*\
+Pointer to a `NULL`-terminated string containing the name of the value to query.
-*pszValue*
-Pointer to a buffer that receives the multistring data. A multistring is an array of null-terminated strings, terminated by two null characters.
+*`pszValue`*\
+Pointer to a buffer that receives the multistring data. A multistring is an array of `NULL`-terminated strings, terminated by two null characters.
-*pnChars*
-The size, in TCHARs, of the buffer pointed to by *pszValue*. When the method returns, *pnChars* contains the size, in TCHARs, of the multistring retrieved, including a terminating null character.
+*`pnChars`*\
+The size, in `TCHARs`, of the buffer pointed to by *`pszValue`*. When the method returns, *`pnChars`* contains the size, in `TCHARs`, of the multistring retrieved, including a terminating null character.
### Return Value
-If the method succeeds, ERROR_SUCCESS is returned. If the method fails to read a value, it returns a nonzero error code defined in WINERROR.H. If the data referenced is not of type REG_MULTI_SZ, ERROR_INVALID_DATA is returned.
+If the method succeeds, `ERROR_SUCCESS` is returned. If the method fails to read a value, it returns a nonzero error code defined in `WINERROR.H`. If the data referenced isn't of type `REG_MULTI_SZ`, `ERROR_INVALID_DATA` is returned.
### Remarks
-This method makes use of `RegQueryValueEx` and confirms that the correct type of data is returned. See [RegQueryValueEx](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) for more details.
+This method makes use of `RegQueryValueEx` and confirms that the correct type of data is returned. See [`RegQueryValueEx`](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) for more details.
> [!IMPORTANT]
-> This method allows the caller to specify any registry location, potentially reading data which cannot be trusted. Also, the [RegQueryValueEx](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) function used by this method does not explicitly handle strings which are NULL terminated. Both conditions should be checked for by the calling code.
+> This method allows the caller to specify any registry location, potentially reading data which cannot be trusted. Also, the [`RegQueryValueEx`](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) function used by this method does not explicitly handle strings which are null-terminated. Both conditions should be checked for by the calling code.
-## CRegKey::QueryQWORDValue
+## `CRegKey::QueryQWORDValue`
-Call this method to retrieve the QWORD data for a specified value name.
+Call this method to retrieve the `QWORD` data for a specified value name.
```
LONG QueryQWORDValue(
@@ -591,24 +591,24 @@ LONG QueryQWORDValue(
### Parameters
-*pszValueName*
-Pointer to a null-terminated string containing the name of the value to query.
+*`pszValueName`*\
+Pointer to a `NULL`-terminated string containing the name of the value to query.
-*qwValue*
-Pointer to a buffer that receives the QWORD.
+*`qwValue`*\
+Pointer to a buffer that receives the `QWORD`.
### Return Value
-If the method succeeds, ERROR_SUCCESS is returned. If the method fails to read a value, it returns a nonzero error code defined in WINERROR.H. If the data referenced is not of type REG_QWORD, ERROR_INVALID_DATA is returned.
+If the method succeeds, `ERROR_SUCCESS` is returned. If the method fails to read a value, it returns a nonzero error code defined in `WINERROR.H`. If the data referenced isn't of type `REG_QWORD`, `ERROR_INVALID_DATA` is returned.
### Remarks
-This method makes use of `RegQueryValueEx` and confirms that the correct type of data is returned. See [RegQueryValueEx](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) for more details.
+This method makes use of `RegQueryValueEx` and confirms that the correct type of data is returned. See [`RegQueryValueEx`](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) for more details.
> [!IMPORTANT]
-> This method allows the caller to specify any registry location, potentially reading data which cannot be trusted. Also, the [RegQueryValueEx](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) function used by this method does not explicitly handle strings which are NULL terminated. Both conditions should be checked for by the calling code.
+> This method allows the caller to specify any registry location, potentially reading data which cannot be trusted. Also, the [`RegQueryValueEx`](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) function used by this method does not explicitly handle strings which are null-terminated. Both conditions should be checked for by the calling code.
-## CRegKey::QueryStringValue
+## `CRegKey::QueryStringValue`
Call this method to retrieve the string data for a specified value name.
@@ -621,29 +621,29 @@ LONG QueryStringValue(
### Parameters
-*pszValueName*
-Pointer to a null-terminated string containing the name of the value to query.
+*`pszValueName`*\
+Pointer to a `NULL`-terminated string containing the name of the value to query.
-*pszValue*
+*`pszValue`*\
Pointer to a buffer that receives the string data.
-*pnChars*
-The size, in TCHARs, of the buffer pointed to by *pszValue*. When the method returns, *pnChars* contains the size, in TCHARs, of the string retrieved, including a terminating null character.
+*`pnChars`*\
+The size, in TCHARs, of the buffer pointed to by *`pszValue`*. When the method returns, *`pnChars`* contains the size, in `TCHARs`, of the string retrieved, including a terminating null character.
### Return Value
-If the method succeeds, ERROR_SUCCESS is returned. If the method fails to read a value, it returns a nonzero error code defined in WINERROR.H. If the data referenced is not of type REG_SZ, ERROR_INVALID_DATA is returned. If the method returns ERROR_MORE_DATA, *pnChars* equals zero, not the required buffer size in bytes.
+If the method succeeds, `ERROR_SUCCESS` is returned. If the method fails to read a value, it returns a nonzero error code defined in `WINERROR.H`. If the data referenced isn't of type `REG_SZ`, `ERROR_INVALID_DATA` is returned. If the method returns `ERROR_MORE_DATA`, *`pnChars`* equals zero, not the required buffer size in bytes.
### Remarks
-This method makes use of `RegQueryValueEx` and confirms that the correct type of data is returned. See [RegQueryValueEx](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) for more details.
+This method makes use of `RegQueryValueEx` and confirms that the correct type of data is returned. See [`RegQueryValueEx`](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) for more details.
> [!IMPORTANT]
-> This method allows the caller to specify any registry location, potentially reading data which cannot be trusted. Also, the [RegQueryValueEx](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) function used by this method does not explicitly handle strings which are NULL terminated. Both conditions should be checked for by the calling code.
+> This method allows the caller to specify any registry location, potentially reading data which cannot be trusted. Also, the [`RegQueryValueEx`](/windows/win32/api/winreg/nf-winreg-regqueryvalueexw) function used by this method does not explicitly handle strings which are null-terminated. Both conditions should be checked for by the calling code.
-## CRegKey::QueryValue
+## `CRegKey::QueryValue`
-Call this method to retrieve the data for the specified value field of [m_hKey](#m_hkey). Earlier versions of this method are no longer supported and are marked as ATL_DEPRECATED.
+Call this method to retrieve the data for the specified value field of [`m_hKey`](#m_hkey). Earlier versions of this method are no longer supported and are marked as `ATL_DEPRECATED`.
```
LONG QueryValue(
@@ -664,44 +664,44 @@ ATL_DEPRECATED LONG QueryValue(
### Parameters
-*pszValueName*
-Pointer to a null-terminated string containing the name of the value to query. If *pszValueName* is NULL or an empty string, "", the method retrieves the type and data for the key's unnamed or default value, if any.
+*`pszValueName`*\
+Pointer to a `NULL`-terminated string containing the name of the value to query. If *`pszValueName`* is `NULL` or an empty string, `""`, the method retrieves the type and data for the key's unnamed or default value, if any.
-*pdwType*
-Pointer to a variable that receives a code indicating the type of data stored in the specified value. The *pdwType* parameter can be NULL if the type code is not required.
+*`pdwType`*\
+Pointer to a variable that receives a code indicating the type of data stored in the specified value. The *`pdwType`* parameter can be `NULL` if the type code isn't required.
-*pData*
-Pointer to a buffer that receives the value's data. This parameter can be NULL if the data is not required.
+*`pData`*\
+Pointer to a buffer that receives the value's data. This parameter can be `NULL` if the data isn't required.
-*pnBytes*
-Pointer to a variable that specifies the size, in bytes, of the buffer pointed to by the *pData* parameter. When the method returns, this variable contains the size of the data copied to *pData.*
+*`pnBytes`*\
+Pointer to a variable that specifies the size, in bytes, of the buffer pointed to by the *`pData`* parameter. When the method returns, this variable contains the size of the data copied to *`pData`*.
-*dwValue*
+*`dwValue`*\
The value field's numerical data.
-*lpszValueName*
+*`lpszValueName`*\
Specifies the value field to be queried.
-*szValue*
+*`szValue`*\
The value field's string data.
-*pdwCount*
-The size of the string data. Its value is initially set to the size of the *szValue* buffer.
+*`pdwCount`*\
+The size of the string data. Its value is initially set to the size of the *`szValue`* buffer.
### Return Value
-If successful, returns ERROR_SUCCESS; otherwise, a nonzero error code defined in WINERROR.H.
+If successful, returns `ERROR_SUCCESS`; otherwise, a nonzero error code defined in `WINERROR.H`.
### Remarks
-The two original versions of `QueryValue` are no longer supported and are marked as ATL_DEPRECATED. The compiler will issue a warning if these forms are used.
+The two original versions of `QueryValue` are no longer supported and are marked as `ATL_DEPRECATED`. The compiler will issue a warning if these forms are used.
-The remaining method calls RegQueryValueEx.
+The remaining method calls `RegQueryValueEx`.
> [!IMPORTANT]
-> This method allows the caller to specify any registry location, potentially reading data which cannot be trusted. Also, the RegQueryValueEx function used by this method does not explicitly handle strings which are NULL terminated. Both conditions should be checked for by the calling code.
+> This method allows the caller to specify any registry location, potentially reading data which cannot be trusted. Also, the `RegQueryValueEx` function used by this method does not explicitly handle strings which are null-terminated. Both conditions should be checked for by the calling code.
-## CRegKey::RecurseDeleteKey
+## `CRegKey::RecurseDeleteKey`
Call this method to remove the specified key from the registry and explicitly remove any subkeys.
@@ -711,18 +711,18 @@ LONG RecurseDeleteKey(LPCTSTR lpszKey) throw();
### Parameters
-*lpszKey*
-Specifies the name of the key to delete. This name must be a subkey of [m_hKey](#m_hkey).
+*`lpszKey`*\
+Specifies the name of the key to delete. This name must be a subkey of [`m_hKey`](#m_hkey).
### Return Value
-If successful, returns ERROR_SUCCESS; otherwise, a non-zero error value defined in WINERROR.H.
+If successful, returns `ERROR_SUCCESS`; otherwise, a non-zero error value defined in `WINERROR.H`.
### Remarks
If the key has subkeys, you must call this method to delete the key.
-## CRegKey::SetBinaryValue
+## `CRegKey::SetBinaryValue`
Call this method to set the binary value of the registry key.
@@ -735,26 +735,26 @@ LONG SetBinaryValue(
### Parameters
-*pszValueName*
-Pointer to a string containing the name of the value to set. If a value with this name is not already present, the method adds it to the key.
+*`pszValueName`*\
+Pointer to a string containing the name of the value to set. If a value with this name isn't already present, the method adds it to the key.
-*pValue*
+*`pValue`*\
Pointer to a buffer containing the data to be stored with the specified value name.
-*nBytes*
-Specifies the size, in bytes, of the information pointed to by the *pValue* parameter.
+*`nBytes`*\
+Specifies the size, in bytes, of the information pointed to by the *`pValue`* parameter.
### Return Value
-If the method succeeds, the return value is ERROR_SUCCESS. If the method fails, the return value is a nonzero error code defined in WINERROR.H.
+If the method succeeds, the return value is `ERROR_SUCCESS`. If the method fails, the return value is a nonzero error code defined in `WINERROR.H`.
### Remarks
-This method uses [RegSetValueEx](/windows/win32/api/winreg/nf-winreg-regsetvalueexw) to write the value to the registry.
+This method uses [`RegSetValueEx`](/windows/win32/api/winreg/nf-winreg-regsetvalueexw) to write the value to the registry.
-## CRegKey::SetDWORDValue
+## `CRegKey::SetDWORDValue`
-Call this method to set the DWORD value of the registry key.
+Call this method to set the `DWORD` value of the registry key.
```
LONG SetDWORDValue(LPCTSTR pszValueName, DWORD dwValue) throw();
@@ -762,21 +762,21 @@ LONG SetDWORDValue(LPCTSTR pszValueName, DWORD dwValue) throw();
### Parameters
-*pszValueName*
-Pointer to a string containing the name of the value to set. If a value with this name is not already present, the method adds it to the key.
+*`pszValueName`*\
+Pointer to a string containing the name of the value to set. If a value with this name isn't already present, the method adds it to the key.
-*dwValue*
-The DWORD data to be stored with the specified value name.
+*`dwValue`*\
+The `DWORD` data to be stored with the specified value name.
### Return Value
-If the method succeeds, the return value is ERROR_SUCCESS. If the method fails, the return value is a nonzero error code defined in WINERROR.H.
+If the method succeeds, the return value is `ERROR_SUCCESS`. If the method fails, the return value is a nonzero error code defined in `WINERROR.H`.
### Remarks
-This method uses [RegSetValueEx](/windows/win32/api/winreg/nf-winreg-regsetvalueexw) to write the value to the registry.
+This method uses [`RegSetValueEx`](/windows/win32/api/winreg/nf-winreg-regsetvalueexw) to write the value to the registry.
-## CRegKey::SetGUIDValue
+## `CRegKey::SetGUIDValue`
Call this method to set the GUID value of the registry key.
@@ -786,21 +786,21 @@ LONG SetGUIDValue(LPCTSTR pszValueName, REFGUID guidValue) throw();
### Parameters
-*pszValueName*
-Pointer to a string containing the name of the value to set. If a value with this name is not already present, the method adds it to the key.
+*`pszValueName`*\
+Pointer to a string containing the name of the value to set. If a value with this name isn't already present, the method adds it to the key.
-*guidValue*
+*`guidValue`*\
Reference to the GUID to be stored with the specified value name.
### Return Value
-If the method succeeds, the return value is ERROR_SUCCESS. If the method fails, the return value is a nonzero error code defined in WINERROR.H.
+If the method succeeds, the return value is `ERROR_SUCCESS`. If the method fails, the return value is a nonzero error code defined in `WINERROR.H`.
### Remarks
-This method makes use of `CRegKey::SetStringValue` and converts the GUID into a string using [StringFromGUID2](/windows/win32/api/combaseapi/nf-combaseapi-stringfromguid2).
+This method makes use of `CRegKey::SetStringValue` and converts the GUID into a string using [`StringFromGUID2`](/windows/win32/api/combaseapi/nf-combaseapi-stringfromguid2).
-## CRegKey::SetKeyValue
+## `CRegKey::SetKeyValue`
Call this method to store data in a specified value field of a specified key.
@@ -813,24 +813,24 @@ LONG SetKeyValue(
### Parameters
-*lpszKeyName*
-Specifies the name of the key to be created or opened. This name must be a subkey of [m_hKey](#m_hkey).
+*`lpszKeyName`*\
+Specifies the name of the key to be created or opened. This name must be a subkey of [`m_hKey`](#m_hkey).
-*lpszValue*
-Specifies the data to be stored. This parameter must be non-NULL.
+*`lpszValue`*\
+Specifies the data to be stored. This parameter must be non-`NULL`.
-*lpszValueName*
-Specifies the value field to be set. If a value field with this name does not already exist in the key, it is added.
+*`lpszValueName`*\
+Specifies the value field to be set. If a value field with this name doesn't already exist in the key, it's added.
### Return Value
-If successful, returns ERROR_SUCCESS; otherwise, a nonzero error code defined in WINERROR.H.
+If successful, returns `ERROR_SUCCESS`; otherwise, a nonzero error code defined in `WINERROR.H`.
### Remarks
-Call this method to create or open the *lpszKeyName* key and store the *lpszValue* data in the *lpszValueName* value field.
+Call this method to create or open the *`lpszKeyName`* key and store the *`lpszValue`* data in the *`lpszValueName`* value field.
-## CRegKey::SetKeySecurity
+## `CRegKey::SetKeySecurity`
Call this method to set the security of the registry key.
@@ -840,28 +840,28 @@ LONG SetKeySecurity(SECURITY_INFORMATION si, PSECURITY_DESCRIPTOR psd) throw();
### Parameters
-*si*
+*`si`*\
Specifies the components of the security descriptor to set. The value can be a combination of the following values:
|Value|Meaning|
|-----------|-------------|
-|DACL_SECURITY_INFORMATION|Sets the key's discretionary access-control list (DACL). The key must have WRITE_DAC access, or the calling process must be the object's owner.|
-|GROUP_SECURITY_INFORMATION|Sets the key's primary group security identifier (SID). The key must have WRITE_OWNER access, or the calling process must be the object's owner.|
-|OWNER_SECURITY_INFORMATION|Sets the key's owner SID. The key must have WRITE_OWNER access, or the calling process must be the object's owner or have the SE_TAKE_OWNERSHIP_NAME privilege enabled.|
-|SACL_SECURITY_INFORMATION|Sets the key's system access-control list (SACL). The key must have ACCESS_SYSTEM_SECURITY access. The proper way to get this access is to enable the SE_SECURITY_NAME [privilege](/windows/win32/secauthz/privileges) in the caller's current access token, open the handle for ACCESS_SYSTEM_SECURITY access, and then disable the privilege.|
+|`DACL_SECURITY_INFORMATION`|Sets the key's discretionary access-control list (DACL). The key must have `WRITE_DAC` access, or the calling process must be the object's owner.|
+|`GROUP_SECURITY_INFORMATION`|Sets the key's primary group security identifier (SID). The key must have `WRITE_OWNER` access, or the calling process must be the object's owner.|
+|`OWNER_SECURITY_INFORMATION`|Sets the key's owner SID. The key must have `WRITE_OWNER` access, or the calling process must be the object's owner or have the `SE_TAKE_OWNERSHIP_NAME` privilege enabled.|
+|`SACL_SECURITY_INFORMATION`|Sets the key's system access-control list (SACL). The key must have `ACCESS_SYSTEM_SECURITY` access. The proper way to get this access is to enable the `SE_SECURITY_NAME` [privilege](/windows/win32/secauthz/privileges) in the caller's current access token, open the handle for `ACCESS_SYSTEM_SECURITY` access, and then disable the privilege.|
-*psd*
-Pointer to a [SECURITY_DESCRIPTOR](/windows/win32/api/winnt/ns-winnt-security_descriptor) structure that specifies the security attributes to set for the specified key.
+*`psd`*\
+Pointer to a [`SECURITY_DESCRIPTOR`](/windows/win32/api/winnt/ns-winnt-security_descriptor) structure that specifies the security attributes to set for the specified key.
### Return Value
-If the method succeeds, the return value is ERROR_SUCCESS. If the method fails, the return value is a nonzero error code defined in WINERROR.H.
+If the method succeeds, the return value is `ERROR_SUCCESS`. If the method fails, the return value is a nonzero error code defined in `WINERROR.H`.
### Remarks
-Sets the key's security attributes. See [RegSetKeySecurity](/windows/win32/api/winreg/nf-winreg-regsetkeysecurity) for more details.
+Sets the key's security attributes. See [`RegSetKeySecurity`](/windows/win32/api/winreg/nf-winreg-regsetkeysecurity) for more details.
-## CRegKey::SetMultiStringValue
+## `CRegKey::SetMultiStringValue`
Call this method to set the multistring value of the registry key.
@@ -871,23 +871,23 @@ LONG SetMultiStringValue(LPCTSTR pszValueName, LPCTSTR pszValue) throw();
### Parameters
-*pszValueName*
-Pointer to a string containing the name of the value to set. If a value with this name is not already present, the method adds it to the key.
+*`pszValueName`*\
+Pointer to a string containing the name of the value to set. If a value with this name isn't already present, the method adds it to the key.
-*pszValue*
-Pointer to the multistring data to be stored with the specified value name. A multistring is an array of null-terminated strings, terminated by two null characters.
+*`pszValue`*\
+Pointer to the multistring data to be stored with the specified value name. A multistring is an array of `NULL`-terminated strings, terminated by two null characters.
### Return Value
-If the method succeeds, the return value is ERROR_SUCCESS. If the method fails, the return value is a nonzero error code defined in WINERROR.H.
+If the method succeeds, the return value is `ERROR_SUCCESS`. If the method fails, the return value is a nonzero error code defined in `WINERROR.H`.
### Remarks
-This method uses [RegSetValueEx](/windows/win32/api/winreg/nf-winreg-regsetvalueexw) to write the value to the registry.
+This method uses [`RegSetValueEx`](/windows/win32/api/winreg/nf-winreg-regsetvalueexw) to write the value to the registry.
-## CRegKey::SetQWORDValue
+## `CRegKey::SetQWORDValue`
-Call this method to set the QWORD value of the registry key.
+Call this method to set the `QWORD` value of the registry key.
```
LONG SetQWORDValue(LPCTSTR pszValueName, ULONGLONG qwValue) throw();
@@ -895,21 +895,21 @@ LONG SetQWORDValue(LPCTSTR pszValueName, ULONGLONG qwValue) throw();
### Parameters
-*pszValueName*
-Pointer to a string containing the name of the value to set. If a value with this name is not already present, the method adds it to the key.
+*`pszValueName`*\
+Pointer to a string containing the name of the value to set. If a value with this name isn't already present, the method adds it to the key.
-*qwValue*
-The QWORD data to be stored with the specified value name.
+*`qwValue`*\
+The `QWORD` data to be stored with the specified value name.
### Return Value
-If the method succeeds, the return value is ERROR_SUCCESS. If the method fails, the return value is a nonzero error code defined in WINERROR.H.
+If the method succeeds, the return value is `ERROR_SUCCESS`. If the method fails, the return value is a nonzero error code defined in `WINERROR.H`.
### Remarks
-This method uses [RegSetValueEx](/windows/win32/api/winreg/nf-winreg-regsetvalueexw) to write the value to the registry.
+This method uses [`RegSetValueEx`](/windows/win32/api/winreg/nf-winreg-regsetvalueexw) to write the value to the registry.
-## CRegKey::SetStringValue
+## `CRegKey::SetStringValue`
Call this method to set the string value of the registry key.
@@ -922,26 +922,26 @@ LONG SetStringValue(
### Parameters
-*pszValueName*
-Pointer to a string containing the name of the value to set. If a value with this name is not already present, the method adds it to the key.
+*`pszValueName`*\
+Pointer to a string containing the name of the value to set. If a value with this name isn't already present, the method adds it to the key.
-*pszValue*
+*`pszValue`*\
Pointer to the string data to be stored with the specified value name.
-*dwType*
-The type of the string to write to the registry: either REG_SZ (the default) or REG_EXPAND_SZ (for multistrings).
+*`dwType`*\
+The type of the string to write to the registry: either `REG_SZ` (the default) or `REG_EXPAND_SZ` (for multistrings).
### Return Value
-If the method succeeds, the return value is ERROR_SUCCESS. If the method fails, the return value is a nonzero error code defined in WINERROR.H.
+If the method succeeds, the return value is `ERROR_SUCCESS`. If the method fails, the return value is a nonzero error code defined in `WINERROR.H`.
### Remarks
-This method uses [RegSetValueEx](/windows/win32/api/winreg/nf-winreg-regsetvalueexw) to write the value to the registry.
+This method uses [`RegSetValueEx`](/windows/win32/api/winreg/nf-winreg-regsetvalueexw) to write the value to the registry.
-## CRegKey::SetValue
+## `CRegKey::SetValue`
-Call this method to store data in the specified value field of [m_hKey](#m_hkey). Earlier versions of this method are no longer supported and are marked as ATL_DEPRECATED.
+Call this method to store data in the specified value field of [`m_hKey`](#m_hkey). Earlier versions of this method are no longer supported and are marked as `ATL_DEPRECATED`.
```
LONG SetValue(
@@ -969,50 +969,50 @@ ATL_DEPRECATED LONG SetValue(
### Parameters
-*pszValueName*
-Pointer to a string containing the name of the value to set. If a value with this name is not already present in the key, the method adds it to the key. If *pszValueName* is NULL or an empty string, "", the method sets the type and data for the key's unnamed or default value.
+*`pszValueName`*\
+Pointer to a string containing the name of the value to set. If a value with this name isn't already present in the key, the method adds it to the key. If *`pszValueName`* is `NULL` or an empty string, `""`, the method sets the type and data for the key's unnamed or default value.
-*dwType*
-Specifies a code indicating the type of data pointed to by the *pValue* parameter.
+*`dwType`*\
+Specifies a code indicating the type of data pointed to by the *`pValue`* parameter.
-*pValue*
+*`pValue`*\
Pointer to a buffer containing the data to be stored with the specified value name.
-*nBytes*
-Specifies the size, in bytes, of the information pointed to by the *pValue* parameter. If the data is of type REG_SZ, REG_EXPAND_SZ, or REG_MULTI_SZ, *nBytes* must include the size of the terminating null character.
+*`nBytes`*\
+Specifies the size, in bytes, of the information pointed to by the *`pValue`* parameter. If the data is of type `REG_SZ`, `REG_EXPAND_SZ`, or `REG_MULTI_SZ`, *`nBytes`* must include the size of the terminating null character.
-*hKeyParent*
+*`hKeyParent`*\
The handle of an open key.
-*lpszKeyName*
-Specifies the name of a key to be created or opened. This name must be a subkey of *hKeyParent*.
+*`lpszKeyName`*\
+Specifies the name of a key to be created or opened. This name must be a subkey of *`hKeyParent`*.
-*lpszValue*
-Specifies the data to be stored. This parameter must be non-NULL.
+*`lpszValue`*\
+Specifies the data to be stored. This parameter must be non-`NULL`.
-*lpszValueName*
-Specifies the value field to be set. If a value field with this name does not already exist in the key, it is added.
+*`lpszValueName`*\
+Specifies the value field to be set. If a value field with this name doesn't already exist in the key, it's added.
-*dwValue*
+*`dwValue`*\
Specifies the data to be stored.
-*bMulti*
-If false, indicates the string is of type REG_SZ. If true, indicates the string is a multistring of type REG_MULTI_SZ.
+*`bMulti`*\
+If false, indicates the string is of type `REG_SZ`. If true, indicates the string is a multistring of type `REG_MULTI_SZ`.
-*nValueLen*
-If *bMulti* is true, *nValueLen* is the length of the *lpszValue* string in characters. If *bMulti* is false, a value of -1 indicates that the method will calculate the length automatically.
+*`nValueLen`*\
+If *`bMulti`* is true, *`nValueLen`* is the length of the *`lpszValue`* string in characters. If *`bMulti`* is false, a value of -1 indicates that the method will calculate the length automatically.
### Return Value
-If successful, returns ERROR_SUCCESS; otherwise, a nonzero error code defined in WINERROR.H.
+If successful, returns `ERROR_SUCCESS`; otherwise, a nonzero error code defined in `WINERROR.H`.
### Remarks
-The two original versions of `SetValue` are marked as ATL_DEPRECATED and should no longer be used. The compiler will issue a warning if these forms are used.
+The two original versions of `SetValue` are marked as `ATL_DEPRECATED` and should no longer be used. The compiler will issue a warning if these forms are used.
-The third method calls [RegSetValueEx](/windows/win32/api/winreg/nf-winreg-regsetvalueexw).
+The third method calls [`RegSetValueEx`](/windows/win32/api/winreg/nf-winreg-regsetvalueexw).
## See also
-[DCOM Sample](../../overview/visual-cpp-samples.md)
+[DCOM Sample](../../overview/visual-cpp-samples.md)\
[Class Overview](../../atl/atl-class-overview.md)
diff --git a/docs/atl/reference/crtthreadtraits-class.md b/docs/atl/reference/crtthreadtraits-class.md
index b2dc26db6c..de1edbf63f 100644
--- a/docs/atl/reference/crtthreadtraits-class.md
+++ b/docs/atl/reference/crtthreadtraits-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CRTThreadTraits Class"
title: "CRTThreadTraits Class"
ms.date: "11/04/2016"
f1_keywords: ["CRTThreadTraits", "ATLBASE/ATL::CRTThreadTraits", "ATLBASE/ATL::CRTThreadTraits::CreateThread"]
diff --git a/docs/atl/reference/csacl-class.md b/docs/atl/reference/csacl-class.md
index a835a7066a..47717cec06 100644
--- a/docs/atl/reference/csacl-class.md
+++ b/docs/atl/reference/csacl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CSacl Class"
title: "CSacl Class"
ms.date: "11/04/2016"
f1_keywords: ["CSacl", "ATLSECURITY/ATL::CSacl", "ATLSECURITY/ATL::CSacl::CSacl", "ATLSECURITY/ATL::CSacl::AddAuditAce", "ATLSECURITY/ATL::CSacl::GetAceCount", "ATLSECURITY/ATL::CSacl::RemoveAce", "ATLSECURITY/ATL::CSacl::RemoveAllAces"]
diff --git a/docs/atl/reference/csecurityattributes-class.md b/docs/atl/reference/csecurityattributes-class.md
index bcf0fc4e10..7ba2de9bec 100644
--- a/docs/atl/reference/csecurityattributes-class.md
+++ b/docs/atl/reference/csecurityattributes-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CSecurityAttributes Class"
title: "CSecurityAttributes Class"
ms.date: "11/04/2016"
f1_keywords: ["CSecurityAttributes", "ATLSECURITY/ATL::CSecurityAttributes", "ATLSECURITY/ATL::CSecurityAttributes::CSecurityAttributes", "ATLSECURITY/ATL::CSecurityAttributes::Set"]
diff --git a/docs/atl/reference/csecuritydesc-class.md b/docs/atl/reference/csecuritydesc-class.md
index 86e069d97c..d504290768 100644
--- a/docs/atl/reference/csecuritydesc-class.md
+++ b/docs/atl/reference/csecuritydesc-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CSecurityDesc Class"
title: "CSecurityDesc Class"
ms.date: "11/04/2016"
f1_keywords: ["CSecurityDesc", "ATLSECURITY/ATL::CSecurityDesc", "ATLSECURITY/ATL::CSecurityDesc::CSecurityDesc", "ATLSECURITY/ATL::CSecurityDesc::FromString", "ATLSECURITY/ATL::CSecurityDesc::GetControl", "ATLSECURITY/ATL::CSecurityDesc::GetDacl", "ATLSECURITY/ATL::CSecurityDesc::GetGroup", "ATLSECURITY/ATL::CSecurityDesc::GetOwner", "ATLSECURITY/ATL::CSecurityDesc::GetPSECURITY_DESCRIPTOR", "ATLSECURITY/ATL::CSecurityDesc::GetSacl", "ATLSECURITY/ATL::CSecurityDesc::IsDaclAutoInherited", "ATLSECURITY/ATL::CSecurityDesc::IsDaclDefaulted", "ATLSECURITY/ATL::CSecurityDesc::IsDaclPresent", "ATLSECURITY/ATL::CSecurityDesc::IsDaclProtected", "ATLSECURITY/ATL::CSecurityDesc::IsGroupDefaulted", "ATLSECURITY/ATL::CSecurityDesc::IsOwnerDefaulted", "ATLSECURITY/ATL::CSecurityDesc::IsSaclAutoInherited", "ATLSECURITY/ATL::CSecurityDesc::IsSaclDefaulted", "ATLSECURITY/ATL::CSecurityDesc::IsSaclPresent", "ATLSECURITY/ATL::CSecurityDesc::IsSaclProtected", "ATLSECURITY/ATL::CSecurityDesc::IsSelfRelative", "ATLSECURITY/ATL::CSecurityDesc::MakeAbsolute", "ATLSECURITY/ATL::CSecurityDesc::MakeSelfRelative", "ATLSECURITY/ATL::CSecurityDesc::SetControl", "ATLSECURITY/ATL::CSecurityDesc::SetDacl", "ATLSECURITY/ATL::CSecurityDesc::SetGroup", "ATLSECURITY/ATL::CSecurityDesc::SetOwner", "ATLSECURITY/ATL::CSecurityDesc::SetSacl", "ATLSECURITY/ATL::CSecurityDesc::ToString"]
diff --git a/docs/atl/reference/csid-class.md b/docs/atl/reference/csid-class.md
index b66256092b..49be86aa61 100644
--- a/docs/atl/reference/csid-class.md
+++ b/docs/atl/reference/csid-class.md
@@ -1,78 +1,79 @@
---
-title: "CSid Class"
+description: "Learn more about: CSid class"
+title: "CSid class"
ms.date: "03/27/2019"
f1_keywords: ["CSid", "ATLSECURITY/ATL::CSid", "ATLSECURITY/ATL::CSid::CSidArray", "ATLSECURITY/ATL::CSid::CSid", "ATLSECURITY/ATL::CSid::AccountName", "ATLSECURITY/ATL::CSid::Domain", "ATLSECURITY/ATL::CSid::EqualPrefix", "ATLSECURITY/ATL::CSid::GetLength", "ATLSECURITY/ATL::CSid::GetPSID", "ATLSECURITY/ATL::CSid::GetPSID_IDENTIFIER_AUTHORITY", "ATLSECURITY/ATL::CSid::GetSubAuthority", "ATLSECURITY/ATL::CSid::GetSubAuthorityCount", "ATLSECURITY/ATL::CSid::IsValid", "ATLSECURITY/ATL::CSid::LoadAccount", "ATLSECURITY/ATL::CSid::Sid", "ATLSECURITY/ATL::CSid::SidNameUse"]
helpviewer_keywords: ["CSid class"]
ms.assetid: be58b7ca-5958-49c3-a833-ca341aaaf753
---
-# CSid Class
+# `CSid` class
This class is a wrapper for a `SID` (security identifier) structure.
> [!IMPORTANT]
-> This class and its members cannot be used in applications that execute in the Windows Runtime.
+> This class and its members can't be used in applications that execute in the Windows Runtime.
## Syntax
-```
-class CSid
+```cpp
+class CSid;
```
## Members
-### Public Typedefs
+### Public typedefs
-|Name|Description|
-|----------|-----------------|
-|[CSid::CSidArray](#csidarray)|An array of `CSid` objects.|
+| Name | Description |
+|--|--|
+| [`CSid::CSidArray`](#csidarray) | An array of `CSid` objects. |
-### Public Constructors
+### Public constructors
-|Name|Description|
-|----------|-----------------|
-|[CSid::CSid](#csid)|The constructor.|
-|[CSid::~CSid](#dtor)|The destructor.|
+| Name | Description |
+|--|--|
+| [`CSid::CSid`](#csid) | The constructor. |
+| [`CSid::~CSid`](#dtor) | The destructor. |
-### Public Methods
+### Public methods
-|Name|Description|
-|----------|-----------------|
-|[CSid::AccountName](#accountname)|Returns the name of the account associated with the `CSid` object.|
-|[CSid::Domain](#domain)|Returns the name of the domain associated with the `CSid` object.|
-|[CSid::EqualPrefix](#equalprefix)|Tests `SID` (security identifier) prefixes for equality.|
-|[CSid::GetLength](#getlength)|Returns the length of the `CSid` object.|
-|[CSid::GetPSID](#getpsid)|Returns a pointer to a `SID` structure.|
-|[CSid::GetPSID_IDENTIFIER_AUTHORITY](#getpsid_identifier_authority)|Returns a pointer to the `SID_IDENTIFIER_AUTHORITY` structure.|
-|[CSid::GetSubAuthority](#getsubauthority)|Returns a specified subauthority in a `SID` structure.|
-|[CSid::GetSubAuthorityCount](#getsubauthoritycount)|Returns the subauthority count.|
-|[CSid::IsValid](#isvalid)|Tests the `CSid` object for validity.|
-|[CSid::LoadAccount](#loadaccount)|Updates the `CSid` object given the account name and domain, or an existing `SID` structure.|
-|[CSid::Sid](#sid)|Returns the ID string.|
-|[CSid::SidNameUse](#sidnameuse)|Returns a description of the state of the `CSid` object.|
+| Name | Description |
+|--|--|
+| [`CSid::AccountName`](#accountname) | Returns the name of the account associated with the `CSid` object. |
+| [`CSid::Domain`](#domain) | Returns the name of the domain associated with the `CSid` object. |
+| [`CSid::EqualPrefix`](#equalprefix) | Tests `SID` (security identifier) prefixes for equality. |
+| [`CSid::GetLength`](#getlength) | Returns the length of the `CSid` object. |
+| [`CSid::GetPSID`](#getpsid) | Returns a pointer to a `SID` structure. |
+| [`CSid::GetPSID_IDENTIFIER_AUTHORITY`](#getpsid_identifier_authority) | Returns a pointer to the `SID_IDENTIFIER_AUTHORITY` structure. |
+| [`CSid::GetSubAuthority`](#getsubauthority) | Returns a specified subauthority in a `SID` structure. |
+| [`CSid::GetSubAuthorityCount`](#getsubauthoritycount) | Returns the subauthority count. |
+| [`CSid::IsValid`](#isvalid) | Tests the `CSid` object for validity. |
+| [`CSid::LoadAccount`](#loadaccount) | Updates the `CSid` object given the account name and domain, or an existing `SID` structure. |
+| [`CSid::Sid`](#sid) | Returns the ID string. |
+| [`CSid::SidNameUse`](#sidnameuse) | Returns a description of the state of the `CSid` object. |
### Operators
-|||
-|-|-|
-|[operator =](#operator_eq)|Assignment operator.|
-|[operator const SID *](#operator_const_sid__star)|Casts a `CSid` object to a pointer to a `SID` structure.|
+| Name | Description |
+|--|--|
+| [`CSid::operator =`](#operator_eq) | Assignment operator. |
+| [`CSid::operator const SID *`](#operator_const_sid__star) | Casts a `CSid` object to a pointer to a `SID` structure. |
### Global Operators
-|||
-|-|-|
-|[operator ==](#operator_eq_eq)|Tests two security descriptor objects for equality|
-|[operator !=](#operator_neq)|Tests two security descriptor objects for inequality|
-|[operator \<](#operator_lt)|Compares relative value of two security descriptor objects.|
-|[operator >](#operator_gt)|Compares relative value of two security descriptor objects.|
-|[operator \<=](#operator_lt__eq)|Compares relative value of two security descriptor objects.|
-|[operator >=](#operator_gt__eq)|Compares relative value of two security descriptor objects.|
+| Name | Description |
+|--|--|
+| [`operator ==`](#operator_eq_eq) | Tests two security descriptor objects for equality |
+| [`operator !=`](#operator_neq) | Tests two security descriptor objects for inequality |
+| [`operator <`](#operator_lt) | Compares relative value of two security descriptor objects. |
+| [`operator >`](#operator_gt) | Compares relative value of two security descriptor objects. |
+| [`operator <=`](#operator_lt__eq) | Compares relative value of two security descriptor objects. |
+| [`operator >=`](#operator_gt__eq) | Compares relative value of two security descriptor objects. |
## Remarks
The `SID` structure is a variable-length structure used to uniquely identify users or groups.
-Applications should not modify the `SID` structure directly, but instead use the methods provided in this wrapper class. See also [AtlGetOwnerSid](security-global-functions.md#atlgetownersid), [AtlSetGroupSid](security-global-functions.md#atlsetgroupsid), [AtlGetGroupSid](security-global-functions.md#atlgetgroupsid), and [AtlSetOwnerSid](security-global-functions.md#atlsetownersid).
+Applications shouldn't modify the `SID` structure directly, but instead use the methods provided in this wrapper class. See also [`AtlGetOwnerSid`](security-global-functions.md#atlgetownersid), [`AtlSetGroupSid`](security-global-functions.md#atlsetgroupsid), [`AtlGetGroupSid`](security-global-functions.md#atlgetgroupsid), and [`AtlSetOwnerSid`](security-global-functions.md#atlsetownersid).
For an introduction to the access control model in Windows, see [Access Control](/windows/win32/SecAuthZ/access-control) in the Windows SDK.
@@ -80,29 +81,29 @@ For an introduction to the access control model in Windows, see [Access Control]
**Header:** atlsecurity.h
-## CSid::AccountName
+## `CSid::AccountName`
Returns the name of the account associated with the `CSid` object.
-```
+```cpp
LPCTSTR AccountName() const throw(...);
```
-### Return Value
+### Return value
-Returns the LPCTSTR pointing to the name of the account.
+Returns the `LPCTSTR` pointing to the name of the account.
### Remarks
-This method attempts to find a name for the specified `SID` (security identifier). For full details, see [LookupAccountSid](/windows/win32/api/winbase/nf-winbase-lookupaccountsidw).
+This method attempts to find a name for the specified `SID` (security identifier). For full details, see [`LookupAccountSid`](/windows/win32/api/winbase/nf-winbase-lookupaccountsidw).
-If no account name for the `SID` can be found, `AccountName` returns an empty string. This can occur if a network timeout prevents this method from finding the name. It also occurs for security identifiers with no corresponding account name, such as an `SID` that identifies a sign-in session.
+If no account name for the `SID` can be found, `AccountName` returns an empty string. This result can occur if a network timeout prevents this method from finding the name. It also occurs for security identifiers with no corresponding account name, such as an `SID` that identifies a sign-in session.
-## CSid::CSid
+## `CSid::CSid`
The constructor.
-```
+```cpp
CSid() throw();
CSid(const SID& rhs) throw(...);
CSid(const CSid& rhs) throw(...);
@@ -123,35 +124,35 @@ explicit CSid(
### Parameters
-*rhs*
+*`rhs`*\
An existing `CSid` object or `SID` (security identifier) structure.
-*IdentifierAuthority*
+*`IdentifierAuthority`*\
The authority.
-*nSubAuthorityCount*
+*`nSubAuthorityCount`*\
The subauthority count.
-*pszAccountName*
+*`pszAccountName`*\
The account name.
-*pszSystem*
+*`pszSystem`*\
The system name. This string can be the name of a remote computer. If this string is NULL, the local system is used instead.
-*pSid*
+*`pSid`*\
A pointer to a `SID` structure.
### Remarks
-The constructor initializes the `CSid` object, setting an internal data member to *SidTypeInvalid*, or by copying the settings from an existing `CSid`, `SID`, or existing account.
+The constructor initializes the `CSid` object, setting an internal data member to *`SidTypeInvalid`*, or by copying the settings from an existing `CSid`, `SID`, or existing account.
-If initialization fails, the constructor will throw a [CAtlException Class](../../atl/reference/catlexception-class.md).
+If initialization fails, the constructor will throw a [`CAtlException` Class](../../atl/reference/catlexception-class.md).
-## CSid::~CSid
+## `CSid::~CSid`
The destructor.
-```
+```cpp
virtual ~CSid() throw();
```
@@ -159,166 +160,166 @@ virtual ~CSid() throw();
The destructor frees any resources acquired by the object.
-## CSid::CSidArray
+## `CSid::CSidArray`
-An array of [CSid](../../atl/reference/csid-class.md) objects.
+An array of [`CSid`](../../atl/reference/csid-class.md) objects.
-```
+```cpp
typedef CAtlArray CSidArray;
```
### Remarks
-This typedef specifies the array type that can be used to retrieve security identifiers from an ACL (access-control list). See [CAcl::GetAclEntries](../../atl/reference/cacl-class.md#getaclentries).
+This typedef specifies the array type that can be used to retrieve security identifiers from an ACL (access-control list). See [`CAcl::GetAclEntries`](../../atl/reference/cacl-class.md#getaclentries).
-## CSid::Domain
+## `CSid::Domain`
Returns the name of the domain associated with the `CSid` object.
-```
+```cpp
LPCTSTR Domain() const throw(...);
```
-### Return Value
+### Return value
Returns the `LPCTSTR` pointing to the domain.
### Remarks
-This method attempts to find a name for the specified `SID` (security identifier). For full details, see [LookupAccountSid](/windows/win32/api/winbase/nf-winbase-lookupaccountsidw).
+This method attempts to find a name for the specified `SID` (security identifier). For full details, see [`LookupAccountSid`](/windows/win32/api/winbase/nf-winbase-lookupaccountsidw).
-If no account name for the `SID` can be found, `Domain` returns the domain as an empty string. This can occur if a network timeout prevents this method from finding the name. It also occurs for security identifiers with no corresponding account name, such as an `SID` that identifies a sign-in session.
+If no account name for the `SID` can be found, `Domain` returns the domain as an empty string. This result can occur if a network timeout prevents this method from finding the name. It also occurs for security identifiers with no corresponding account name, such as an `SID` that identifies a sign-in session.
-## CSid::EqualPrefix
+## `CSid::EqualPrefix`
Tests `SID` (security identifier) prefixes for equality.
-```
+```cpp
bool EqualPrefix(const SID& rhs) const throw();
bool EqualPrefix(const CSid& rhs) const throw();
```
### Parameters
-*rhs*
+*`rhs`*\
The `SID` (security identifier) structure or `CSid` object to compare.
-### Return Value
+### Return value
-Returns TRUE on success, FALSE on failure.
+Returns `TRUE` on success, `FALSE` on failure.
### Remarks
-See [EqualPrefixSid](/windows/win32/api/securitybaseapi/nf-securitybaseapi-equalprefixsid) in the Windows SDK for more details.
+For more information, see [`EqualPrefixSid`](/windows/win32/api/securitybaseapi/nf-securitybaseapi-equalprefixsid).
-## CSid::GetLength
+## `CSid::GetLength`
Returns the length of the `CSid` object.
-```
+```cpp
UINT GetLength() const throw();
```
-### Return Value
+### Return value
Returns the length in bytes of the `CSid` object.
### Remarks
-If the `CSid` structure is not valid, the return value is undefined. Before calling `GetLength`, use the [CSid::IsValid](#isvalid) member function to verify that `CSid` is valid.
+If the `CSid` structure isn't valid, the return value is undefined. Before calling `GetLength`, use the [`CSid::IsValid`](#isvalid) member function to verify that `CSid` is valid.
> [!NOTE]
-> Under debug builds the function will cause an ASSERT if the `CSid` object is not valid.
+> Under debug builds the function will cause an ASSERT if the `CSid` object isn't valid.
-## CSid::GetPSID
+## `CSid::GetPSID`
Returns a pointer to a `SID` (security identifier) structure.
-```
+```cpp
const SID* GetPSID() const throw(...);
```
-### Return Value
+### Return value
Returns the address of the `CSid` object's underlying `SID` structure.
-## CSid::GetPSID_IDENTIFIER_AUTHORITY
+## `CSid::GetPSID_IDENTIFIER_AUTHORITY`
Returns a pointer to the `SID_IDENTIFIER_AUTHORITY` structure.
-```
+```cpp
const SID_IDENTIFIER_AUTHORITY* GetPSID_IDENTIFIER_AUTHORITY() const throw();
```
-### Return Value
+### Return value
-If the method succeeds, it returns the address of the `SID_IDENTIFIER_AUTHORITY` structure. If it fails, the return value is undefined. Failure may occur if the `CSid` object is not valid, in which case the [CSid::IsValid](#isvalid) method returns FALSE. The function `GetLastError` can be called for extended error information.
+If the method succeeds, it returns the address of the `SID_IDENTIFIER_AUTHORITY` structure. If it fails, the return value is undefined. Failure may occur if the `CSid` object isn't valid, in which case the [`CSid::IsValid`](#isvalid) method returns `FALSE`. The function `GetLastError` can be called for extended error information.
> [!NOTE]
-> Under debug builds the function will cause an ASSERT if the `CSid` object is not valid.
+> Under debug builds the function will cause an ASSERT if the `CSid` object isn't valid.
-## CSid::GetSubAuthority
+## `CSid::GetSubAuthority`
Returns a specified subauthority in a `SID` (security identifier) structure.
-```
+```cpp
DWORD GetSubAuthority(DWORD nSubAuthority) const throw();
```
### Parameters
-*nSubAuthority*
+*`nSubAuthority`*\
The subauthority.
-### Return Value
+### Return value
-Returns the subauthority referenced by *nSubAuthority.* The subauthority value is a relative identifier (RID).
+Returns the subauthority referenced by *`nSubAuthority`*. The subauthority value is a relative identifier (RID).
### Remarks
-The *nSubAuthority* parameter specifies an index value identifying the subauthority array element the method will return. The method performs no validation tests on this value. An application can call [CSid::GetSubAuthorityCount](#getsubauthoritycount) to discover the range of acceptable values.
+The *`nSubAuthority`* parameter specifies an index value identifying the subauthority array element the method will return. The method performs no validation tests on this value. An application can call [`CSid::GetSubAuthorityCount`](#getsubauthoritycount) to discover the range of acceptable values.
> [!NOTE]
-> Under debug builds the function will cause an ASSERT if the `CSid` object is not valid.
+> Under debug builds the function will cause an ASSERT if the `CSid` object isn't valid.
-## CSid::GetSubAuthorityCount
+## `CSid::GetSubAuthorityCount`
Returns the subauthority count.
-```
+```cpp
UCHAR GetSubAuthorityCount() const throw();
```
-### Return Value
+### Return value
If the method succeeds, the return value is the subauthority count.
If the method fails, the return value is undefined. The method fails if the `CSid` object is invalid. To get extended error information, call `GetLastError`.
> [!NOTE]
-> Under debug builds the function will cause an ASSERT if the `CSid` object is not valid.
+> Under debug builds the function will cause an ASSERT if the `CSid` object isn't valid.
-## CSid::IsValid
+## `CSid::IsValid`
Tests the `CSid` object for validity.
-```
+```cpp
bool IsValid() const throw();
```
-### Return Value
+### Return value
-Returns TRUE if the `CSid` object is valid, FALSE if not. There is no extended error information for this method; do not call `GetLastError`.
+Returns `TRUE` if the `CSid` object is valid, `FALSE` if not. There's no extended error information for this method; don't call `GetLastError`.
### Remarks
The `IsValid` method validates the `CSid` object by verifying that the revision number is within a known range and that the number of subauthorities is less than the maximum.
-## CSid::LoadAccount
+## `CSid::LoadAccount`
-Updates the `CSid` object given the account name and domain, or an existing SID (security identifier) structure.
+Updates the `CSid` object given the account name and domain, or an existing `SID` (security identifier) structure.
-```
+```cpp
bool LoadAccount(
LPCTSTR pszAccountName,
LPCTSTR pszSystem = NULL) throw(...);
@@ -330,46 +331,46 @@ bool LoadAccount(
### Parameters
-*pszAccountName*
+*`pszAccountName`*\
The account name.
-*pszSystem*
+*`pszSystem`*\
The system name. This string can be the name of a remote computer. If this string is NULL, the local system is used instead.
-*pSid*
-A pointer to a [SID](/windows/win32/api/winnt/ns-winnt-sid) structure.
+*`pSid`*\
+A pointer to a [`SID`](/windows/win32/api/winnt/ns-winnt-sid) structure.
-### Return Value
+### Return value
-Returns TRUE on success, FALSE on failure. To get extended error information, call `GetLastError`.
+Returns `TRUE` on success, `FALSE` on failure. To get extended error information, call `GetLastError`.
### Remarks
-`LoadAccount` attempts to find a security identifier for the specified name. See [LookupAccountSid](/windows/win32/api/winbase/nf-winbase-lookupaccountsidw) for more details.
+`LoadAccount` attempts to find a security identifier for the specified name. For more information, see [`LookupAccountSid`](/windows/win32/api/winbase/nf-winbase-lookupaccountsidw).
-## CSid::operator =
+## `CSid::operator =`
Assignment operator.
-```
+```cpp
CSid& operator= (const CSid& rhs) throw(...);
CSid& operator= (const SID& rhs) throw(...);
```
### Parameters
-*rhs*
+*`rhs`*\
The `SID` (security identifier) or `CSid` to assign to the `CSid` object.
-### Return Value
+### Return value
Returns a reference to the updated `CSid` object.
-## CSid::operator ==
+## `operator ==`
Tests two security descriptor objects for equality.
-```
+```cpp
bool operator==(
const CSid& lhs,
const CSid& rhs) throw();
@@ -377,21 +378,21 @@ bool operator==(
### Parameters
-*lhs*
-The `SID` (security identifier) or `CSid` that appears on the left side of the == operator.
+*`lhs`*\
+The `SID` (security identifier) or `CSid` that appears on the left side of the **`==`** operator.
-*rhs*
-The `SID` (security identifier) or `CSid` that appears on the right side of the == operator.
+*`rhs`*\
+The `SID` (security identifier) or `CSid` that appears on the right side of the **`==`** operator.
-### Return Value
+### Return value
-TRUE if the security descriptors are equal, otherwise FALSE.
+`TRUE` if the security descriptors are equal, otherwise `FALSE`.
-## CSid::operator !=
+## `operator !=`
Tests two security descriptor objects for inequality.
-```
+```cpp
bool operator!=(
const CSid& lhs,
const CSid& rhs) throw();
@@ -399,21 +400,21 @@ bool operator!=(
### Parameters
-*lhs*
-The `SID` (security identifier) or `CSid` that appears on the left side of the != operator.
+*`lhs`*\
+The `SID` (security identifier) or `CSid` that appears on the left side of the **`!=`** operator.
-*rhs*
-The `SID` (security identifier) or `CSid` that appears on the right side of the != operator.
+*`rhs`*\
+The `SID` (security identifier) or `CSid` that appears on the right side of the **`!=`** operator.
-### Return Value
+### Return value
-TRUE if the security descriptors are not equal, otherwise FALSE.
+`TRUE` if the security descriptors aren't equal, otherwise `FALSE`.
-## CSid::operator <
+## `operator <`
Compares relative value of two security descriptor objects.
-```
+```cpp
bool operator<(
const CSid& lhs,
const CSid& rhs) throw();
@@ -421,21 +422,21 @@ bool operator<(
### Parameters
-*lhs*
-The `SID` (security identifier) or `CSid` that appears on the left side of the != operator.
+*`lhs`*\
+The `SID` (security identifier) or `CSid` that appears on the left side of the **`<`** operator.
-*rhs*
-The `SID` (security identifier) or `CSid` that appears on the right side of the != operator.
+*`rhs`*\
+The `SID` (security identifier) or `CSid` that appears on the right side of the **`<`** operator.
-### Return Value
+### Return value
-TRUE if *lhs* is less than *rhs*, otherwise FALSE.
+`TRUE` if *`lhs`* is less than *`rhs`*, otherwise `FALSE`.
-## CSid::operator <=
+## `operator <=`
Compares relative value of two security descriptor objects.
-```
+```cpp
bool operator<=(
const CSid& lhs,
const CSid& rhs) throw();
@@ -443,21 +444,21 @@ bool operator<=(
### Parameters
-*lhs*
-The `SID` (security identifier) or `CSid` that appears on the left side of the != operator.
+*`lhs`*\
+The `SID` (security identifier) or `CSid` that appears on the left side of the **`<=`** operator.
-*rhs*
-The `SID` (security identifier) or `CSid` that appears on the right side of the != operator.
+*`rhs`*\
+The `SID` (security identifier) or `CSid` that appears on the right side of the **`<=`** operator.
-### Return Value
+### Return value
-TRUE if *lhs* is less than or equal to *rhs*, otherwise FALSE.
+`TRUE` if *`lhs`* is less than or equal to *`rhs`*, otherwise `FALSE`.
-## CSid::operator >
+## `operator >`
Compares relative value of two security descriptor objects.
-```
+```cpp
bool operator>(
const CSid& lhs,
const CSid& rhs) throw();
@@ -465,21 +466,21 @@ bool operator>(
### Parameters
-*lhs*
-The `SID` (security identifier) or `CSid` that appears on the left side of the != operator.
+*`lhs`*\
+The `SID` (security identifier) or `CSid` that appears on the left side of the **`>`** operator.
-*rhs*
-The `SID` (security identifier) or `CSid` that appears on the right side of the != operator.
+*`rhs`*\
+The `SID` (security identifier) or `CSid` that appears on the right side of the **`>`** operator.
-### Return Value
+### Return value
-TRUE if *lhs* is greater than *rhs*, otherwise FALSE.
+`TRUE` if *`lhs`* is greater than *`rhs`*, otherwise `FALSE`.
-## CSid::operator >=
+## `operator >=`
Compares relative value of two security descriptor objects.
-```
+```cpp
bool operator>=(
const CSid& lhs,
const CSid& rhs) throw());
@@ -487,71 +488,71 @@ bool operator>=(
### Parameters
-*lhs*
-The `SID` (security identifier) or `CSid` that appears on the left side of the != operator.
+*`lhs`*\
+The `SID` (security identifier) or `CSid` that appears on the left side of the **`>=`** operator.
-*rhs*
-The `SID` (security identifier) or `CSid` that appears on the right side of the != operator.
+*`rhs`*\
+The `SID` (security identifier) or `CSid` that appears on the right side of the **`>=`** operator.
-### Return Value
+### Return value
-TRUE if *lhs* is greater than or equal to *rhs*, otherwise FALSE.
+`TRUE` if *`lhs`* is greater than or equal to *`rhs`*, otherwise `FALSE`.
-## CSid::operator const SID \*
+## `CSid::operator const SID *`
Casts a `CSid` object to a pointer to a `SID` (security identifier) structure.
-```
-operator const SID *() const throw(...);
+```cpp
+operator const SID *() const;
```
### Remarks
Returns the address of the `SID` structure.
-## CSid::Sid
+## `CSid::Sid`
Returns the `SID` (security identifier) structure as a string.
-```
+```cpp
LPCTSTR Sid() const throw(...);
```
-### Return Value
+### Return value
-Returns the `SID` structure as a string in a format suitable for display, storage, or transmission. Equivalent to [ConvertSidToStringSid](/windows/win32/api/sddl/nf-sddl-convertsidtostringsidw).
+Returns the `SID` structure as a string in a format suitable for display, storage, or transmission. Equivalent to [`ConvertSidToStringSid`](/windows/win32/api/sddl/nf-sddl-convertsidtostringsidw).
-## CSid::SidNameUse
+## `CSid::SidNameUse`
Returns a description of the state of the `CSid` object.
-```
+```cpp
SID_NAME_USE SidNameUse() const throw();
```
-### Return Value
+### Return value
Returns the value of the data member that stores a value describing the state of the `CSid` object.
-|Value|Description|
-|-----------|-----------------|
-|SidTypeUser|Indicates a user `SID` (security identifier).|
-|SidTypeGroup|Indicates a group `SID`.|
-|SidTypeDomain|Indicates a domain `SID`.|
-|SidTypeAlias|Indicates an alias `SID`.|
-|SidTypeWellKnownGroup|Indicates a `SID` for a well-known group.|
-|SidTypeDeletedAccount|Indicates a `SID` for a deleted account.|
-|SidTypeInvalid|Indicates an invalid `SID`.|
-|SidTypeUnknown|Indicates an unknown `SID` type.|
-|SidTypeComputer|Indicates a `SID` for a computer.|
+| Value | Description |
+|--|--|
+| SidTypeUser | Indicates a user `SID` (security identifier). |
+| SidTypeGroup | Indicates a group `SID`. |
+| SidTypeDomain | Indicates a domain `SID`. |
+| SidTypeAlias | Indicates an alias `SID`. |
+| SidTypeWellKnownGroup | Indicates a `SID` for a well-known group. |
+| SidTypeDeletedAccount | Indicates a `SID` for a deleted account. |
+| SidTypeInvalid | Indicates an invalid `SID`. |
+| SidTypeUnknown | Indicates an unknown `SID` type. |
+| SidTypeComputer | Indicates a `SID` for a computer. |
### Remarks
-Call [CSid::LoadAccount](#loadaccount) to update the `CSid` object before calling `SidNameUse` to return its state. `SidNameUse` does not change the state of the object (by calling to `LookupAccountName` or `LookupAccountSid`), but only returns the current state.
+Call [`CSid::LoadAccount`](#loadaccount) to update the `CSid` object before calling `SidNameUse` to return its state. `SidNameUse` doesn't change the state of the object (by calling to `LookupAccountName` or `LookupAccountSid`), but only returns the current state.
## See also
-[Security Sample](../../overview/visual-cpp-samples.md)
-[Class Overview](../../atl/atl-class-overview.md)
-[Security Global Functions](../../atl/reference/security-global-functions.md)
+[Security sample](../../overview/visual-cpp-samples.md)\
+[Class overview](../../atl/atl-class-overview.md)\
+[Security global functions](../../atl/reference/security-global-functions.md)\
[Operators](../../atl/reference/atl-operators.md)
diff --git a/docs/atl/reference/csimplearray-class.md b/docs/atl/reference/csimplearray-class.md
index 5d45021ef3..12a7cd1332 100644
--- a/docs/atl/reference/csimplearray-class.md
+++ b/docs/atl/reference/csimplearray-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CSimpleArray Class"
title: "CSimpleArray Class"
ms.date: "11/04/2016"
f1_keywords: ["CSimpleArray", "ATLSIMPCOLL/ATL::CSimpleArray", "ATLSIMPCOLL/ATL::CSimpleArray::CSimpleArray", "ATLSIMPCOLL/ATL::CSimpleArray::Add", "ATLSIMPCOLL/ATL::CSimpleArray::Find", "ATLSIMPCOLL/ATL::CSimpleArray::GetData", "ATLSIMPCOLL/ATL::CSimpleArray::GetSize", "ATLSIMPCOLL/ATL::CSimpleArray::Remove", "ATLSIMPCOLL/ATL::CSimpleArray::RemoveAll", "ATLSIMPCOLL/ATL::CSimpleArray::RemoveAt", "ATLSIMPCOLL/ATL::CSimpleArray::SetAtIndex"]
@@ -251,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/csimplearrayequalhelper-class.md b/docs/atl/reference/csimplearrayequalhelper-class.md
index d134ccb4b6..e88c64cd44 100644
--- a/docs/atl/reference/csimplearrayequalhelper-class.md
+++ b/docs/atl/reference/csimplearrayequalhelper-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CSimpleArrayEqualHelper Class"
title: "CSimpleArrayEqualHelper Class"
ms.date: "11/04/2016"
f1_keywords: ["CSimpleArrayEqualHelper", "ATLSIMPCOLL/ATL::CSimpleArrayEqualHelper", "ATLSIMPCOLL/ATL::CSimpleArrayEqualHelper::IsEqual"]
diff --git a/docs/atl/reference/csimplearrayequalhelperfalse-class.md b/docs/atl/reference/csimplearrayequalhelperfalse-class.md
index efcd79f8c1..9b66910ec4 100644
--- a/docs/atl/reference/csimplearrayequalhelperfalse-class.md
+++ b/docs/atl/reference/csimplearrayequalhelperfalse-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CSimpleArrayEqualHelperFalse Class"
title: "CSimpleArrayEqualHelperFalse Class"
ms.date: "11/04/2016"
f1_keywords: ["CSimpleArrayEqualHelperFalse", "ATLSIMPCOLL/ATL::CSimpleArrayEqualHelperFalse", "ATLSIMPCOLL/ATL::CSimpleArrayEqualHelperFalse::IsEqual"]
diff --git a/docs/atl/reference/csimpledialog-class.md b/docs/atl/reference/csimpledialog-class.md
index 04baef4219..9650d3ce7c 100644
--- a/docs/atl/reference/csimpledialog-class.md
+++ b/docs/atl/reference/csimpledialog-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CSimpleDialog Class"
title: "CSimpleDialog Class"
ms.date: "11/04/2016"
f1_keywords: ["CSimpleDialog", "ATLWIN/ATL::CSimpleDialog", "ATLWIN/ATL::CSimpleDialog::DoModal"]
diff --git a/docs/atl/reference/csimplemap-class.md b/docs/atl/reference/csimplemap-class.md
index d54cb75cc3..50f2040375 100644
--- a/docs/atl/reference/csimplemap-class.md
+++ b/docs/atl/reference/csimplemap-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CSimpleMap Class"
title: "CSimpleMap Class"
ms.date: "11/04/2016"
f1_keywords: ["CSimpleMap", "ATLSIMPCOLL/ATL::CSimpleMap", "ATLSIMPCOLL/ATL::CSimpleMap::_ArrayElementType", "ATLSIMPCOLL/ATL::CSimpleMap::_ArrayKeyType", "ATLSIMPCOLL/ATL::CSimpleMap::CSimpleMap", "ATLSIMPCOLL/ATL::CSimpleMap::Add", "ATLSIMPCOLL/ATL::CSimpleMap::FindKey", "ATLSIMPCOLL/ATL::CSimpleMap::FindVal", "ATLSIMPCOLL/ATL::CSimpleMap::GetKeyAt", "ATLSIMPCOLL/ATL::CSimpleMap::GetSize", "ATLSIMPCOLL/ATL::CSimpleMap::GetValueAt", "ATLSIMPCOLL/ATL::CSimpleMap::Lookup", "ATLSIMPCOLL/ATL::CSimpleMap::Remove", "ATLSIMPCOLL/ATL::CSimpleMap::RemoveAll", "ATLSIMPCOLL/ATL::CSimpleMap::RemoveAt", "ATLSIMPCOLL/ATL::CSimpleMap::ReverseLookup", "ATLSIMPCOLL/ATL::CSimpleMap::SetAt", "ATLSIMPCOLL/ATL::CSimpleMap::SetAtIndex"]
diff --git a/docs/atl/reference/csimplemapequalhelper-class.md b/docs/atl/reference/csimplemapequalhelper-class.md
index 10a4addcd8..05c3178fda 100644
--- a/docs/atl/reference/csimplemapequalhelper-class.md
+++ b/docs/atl/reference/csimplemapequalhelper-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CSimpleMapEqualHelper Class"
title: "CSimpleMapEqualHelper Class"
ms.date: "11/04/2016"
f1_keywords: ["CSimpleMapEqualHelper", "ATLSIMPCOLL/ATL::CSimpleMapEqualHelper", "ATLSIMPCOLL/ATL::CSimpleMapEqualHelper::IsEqualKey", "ATLSIMPCOLL/ATL::CSimpleMapEqualHelper::IsEqualValue"]
diff --git a/docs/atl/reference/csimplemapequalhelperfalse-class.md b/docs/atl/reference/csimplemapequalhelperfalse-class.md
index 5e0a1001e2..97e43c2e59 100644
--- a/docs/atl/reference/csimplemapequalhelperfalse-class.md
+++ b/docs/atl/reference/csimplemapequalhelperfalse-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CSimpleMapEqualHelperFalse Class"
title: "CSimpleMapEqualHelperFalse Class"
ms.date: "11/04/2016"
f1_keywords: ["CSimpleMapEqualHelperFalse", "ATLSIMPCOLL/ATL::CSimpleMapEqualHelperFalse", "ATLSIMPCOLL/ATL::CSimpleMapEqualHelperFalse::IsEqualKey", "ATLSIMPCOLL/ATL::CSimpleMapEqualHelperFalse::IsEqualValue"]
diff --git a/docs/atl/reference/csnapinitemimpl-class.md b/docs/atl/reference/csnapinitemimpl-class.md
index 5573e20a71..b302a376c2 100644
--- a/docs/atl/reference/csnapinitemimpl-class.md
+++ b/docs/atl/reference/csnapinitemimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CSnapInItemImpl Class"
title: "CSnapInItemImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["CSnapInItemImpl", "ATLSNAP/ATL::CSnapInItemImpl", "ATLSNAP/ATL::CSnapInItemImpl::CSnapInItemImpl", "ATLSNAP/ATL::CSnapInItemImpl::AddMenuItems", "ATLSNAP/ATL::CSnapInItemImpl::Command", "ATLSNAP/ATL::CSnapInItemImpl::CreatePropertyPages", "ATLSNAP/ATL::CSnapInItemImpl::FillData", "ATLSNAP/ATL::CSnapInItemImpl::GetResultPaneInfo", "ATLSNAP/ATL::CSnapInItemImpl::GetResultViewType", "ATLSNAP/ATL::CSnapInItemImpl::GetScopePaneInfo", "ATLSNAP/ATL::CSnapInItemImpl::Notify", "ATLSNAP/ATL::CSnapInItemImpl::QueryPagesFor", "ATLSNAP/ATL::CSnapInItemImpl::SetMenuInsertionFlags", "ATLSNAP/ATL::CSnapInItemImpl::SetToolbarButtonInfo", "ATLSNAP/ATL::CSnapInItemImpl::UpdateMenuState", "ATLSNAP/ATL::CSnapInItemImpl::UpdateToolbarButton", "ATLSNAP/ATL::CSnapInItemImpl::m_bstrDisplayName", "ATLSNAP/ATL::CSnapInItemImpl::m_resultDataItem", "ATLSNAP/ATL::CSnapInItemImpl::m_scopeDataItem"]
diff --git a/docs/atl/reference/csnapinpropertypageimpl-class.md b/docs/atl/reference/csnapinpropertypageimpl-class.md
index 062479ed44..5bbd52fce6 100644
--- a/docs/atl/reference/csnapinpropertypageimpl-class.md
+++ b/docs/atl/reference/csnapinpropertypageimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CSnapInPropertyPageImpl Class"
title: "CSnapInPropertyPageImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["CSnapInPropertyPageImpl", "ATLSNAP/ATL::CSnapInPropertyPageImpl", "ATLSNAP/ATL::CSnapInPropertyPageImpl::CSnapInPropertyPageImpl", "ATLSNAP/ATL::CSnapInPropertyPageImpl::CancelToClose", "ATLSNAP/ATL::CSnapInPropertyPageImpl::Create", "ATLSNAP/ATL::CSnapInPropertyPageImpl::OnApply", "ATLSNAP/ATL::CSnapInPropertyPageImpl::OnHelp", "ATLSNAP/ATL::CSnapInPropertyPageImpl::OnKillActive", "ATLSNAP/ATL::CSnapInPropertyPageImpl::OnQueryCancel", "ATLSNAP/ATL::CSnapInPropertyPageImpl::OnReset", "ATLSNAP/ATL::CSnapInPropertyPageImpl::OnSetActive", "ATLSNAP/ATL::CSnapInPropertyPageImpl::OnWizardBack", "ATLSNAP/ATL::CSnapInPropertyPageImpl::OnWizardFinish", "ATLSNAP/ATL::CSnapInPropertyPageImpl::OnWizardNext", "ATLSNAP/ATL::CSnapInPropertyPageImpl::QuerySiblings", "ATLSNAP/ATL::CSnapInPropertyPageImpl::SetModified", "ATLSNAP/ATL::CSnapInPropertyPageImpl::m_psp"]
diff --git a/docs/atl/reference/csocketaddr-class.md b/docs/atl/reference/csocketaddr-class.md
index c2f0659ab4..de051c6ae6 100644
--- a/docs/atl/reference/csocketaddr-class.md
+++ b/docs/atl/reference/csocketaddr-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CSocketAddr Class"
title: "CSocketAddr Class"
ms.date: "10/22/2018"
f1_keywords: ["CSocketAddr", "ATLSOCKET/ATL::CSocketAddr", "ATLSOCKET/ATL::CSocketAddr::CSocketAddr", "ATLSOCKET/ATL::CSocketAddr::FindAddr", "ATLSOCKET/ATL::CSocketAddr::FindINET4Addr", "ATLSOCKET/ATL::CSocketAddr::FindINET6Addr", "ATLSOCKET/ATL::CSocketAddr::GetAddrInfo", "ATLSOCKET/ATL::CSocketAddr::GetAddrInfoList"]
diff --git a/docs/atl/reference/cstockpropimpl-class.md b/docs/atl/reference/cstockpropimpl-class.md
index 9d70ac0f67..1f4959941f 100644
--- a/docs/atl/reference/cstockpropimpl-class.md
+++ b/docs/atl/reference/cstockpropimpl-class.md
@@ -1,9 +1,9 @@
---
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
@@ -54,7 +54,7 @@ The class used to manage the type information for *T*. The default value is `CCo
### Public Methods
-|||
+|Name|Description|
|-|-|
|[get_Appearance](#get_appearance)|Call this method to get the paint style used by the control, for example, flat or 3D.|
|[get_AutoSize](#get_autosize)|Call this method to get the status of the flag that indicates if the control cannot be any other size.|
@@ -606,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
@@ -1099,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/cstringelementtraits-class.md b/docs/atl/reference/cstringelementtraits-class.md
index f289392fe4..d314865a59 100644
--- a/docs/atl/reference/cstringelementtraits-class.md
+++ b/docs/atl/reference/cstringelementtraits-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CStringElementTraits Class"
title: "CStringElementTraits Class"
ms.date: "11/04/2016"
f1_keywords: ["CStringElementTraits", "CSTRINGT/ATL::CStringElementTraits", "CSTRINGT/ATL::CStringElementTraits::INARGTYPE", "CSTRINGT/ATL::CStringElementTraits::OUTARGTYPE", "CSTRINGT/ATL::CStringElementTraits::CompareElements", "CSTRINGT/ATL::CStringElementTraits::CompareElementsOrdered", "CSTRINGT/ATL::CStringElementTraits::CopyElements", "CSTRINGT/ATL::CStringElementTraits::Hash", "CSTRINGT/ATL::CStringElementTraits::RelocateElements"]
diff --git a/docs/atl/reference/cstringelementtraitsi-class.md b/docs/atl/reference/cstringelementtraitsi-class.md
index e9253a211d..089e89ec28 100644
--- a/docs/atl/reference/cstringelementtraitsi-class.md
+++ b/docs/atl/reference/cstringelementtraitsi-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CStringElementTraitsI Class"
title: "CStringElementTraitsI Class"
ms.date: "11/04/2016"
f1_keywords: ["CStringElementTraitsI", "ATLCOLL/ATL::CStringElementTraitsI", "ATLCOLL/ATL::CStringElementTraitsI::INARGTYPE", "ATLCOLL/ATL::CStringElementTraitsI::OUTARGTYPE", "ATLCOLL/ATL::CStringElementTraitsI::CompareElements", "ATLCOLL/ATL::CStringElementTraitsI::CompareElementsOrdered", "ATLCOLL/ATL::CStringElementTraitsI::Hash"]
diff --git a/docs/atl/reference/cstringrefelementtraits-class.md b/docs/atl/reference/cstringrefelementtraits-class.md
index 6668d3de02..ed14c61490 100644
--- a/docs/atl/reference/cstringrefelementtraits-class.md
+++ b/docs/atl/reference/cstringrefelementtraits-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CStringRefElementTraits Class"
title: "CStringRefElementTraits Class"
ms.date: "11/04/2016"
f1_keywords: ["CStringRefElementTraits", "ATLCOLL/ATL::CStringRefElementTraits", "ATLCOLL/ATL::CStringRefElementTraits::CompareElements", "ATLCOLL/ATL::CStringRefElementTraits::CompareElementsOrdered", "ATLCOLL/ATL::CStringRefElementTraits::Hash"]
diff --git a/docs/atl/reference/cthreadpool-class.md b/docs/atl/reference/cthreadpool-class.md
index 6679b379b6..0cca6b473f 100644
--- a/docs/atl/reference/cthreadpool-class.md
+++ b/docs/atl/reference/cthreadpool-class.md
@@ -1,9 +1,9 @@
---
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
@@ -264,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/ctokengroups-class.md b/docs/atl/reference/ctokengroups-class.md
index 4959849669..50ca0053c9 100644
--- a/docs/atl/reference/ctokengroups-class.md
+++ b/docs/atl/reference/ctokengroups-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CTokenGroups Class"
title: "CTokenGroups Class"
ms.date: "11/04/2016"
f1_keywords: ["CTokenGroups", "ATLSECURITY/ATL::CTokenGroups", "ATLSECURITY/ATL::CTokenGroups::CTokenGroups", "ATLSECURITY/ATL::CTokenGroups::Add", "ATLSECURITY/ATL::CTokenGroups::Delete", "ATLSECURITY/ATL::CTokenGroups::DeleteAll", "ATLSECURITY/ATL::CTokenGroups::GetCount", "ATLSECURITY/ATL::CTokenGroups::GetLength", "ATLSECURITY/ATL::CTokenGroups::GetPTOKEN_GROUPS", "ATLSECURITY/ATL::CTokenGroups::GetSidsAndAttributes", "ATLSECURITY/ATL::CTokenGroups::LookupSid"]
diff --git a/docs/atl/reference/ctokenprivileges-class.md b/docs/atl/reference/ctokenprivileges-class.md
index 8144718ff7..df23437d13 100644
--- a/docs/atl/reference/ctokenprivileges-class.md
+++ b/docs/atl/reference/ctokenprivileges-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CTokenPrivileges Class"
title: "CTokenPrivileges Class"
ms.date: "11/04/2016"
f1_keywords: ["CTokenPrivileges", "ATLSECURITY/ATL::CTokenPrivileges", "ATLSECURITY/ATL::CTokenPrivileges::CTokenPrivileges", "ATLSECURITY/ATL::CTokenPrivileges::Add", "ATLSECURITY/ATL::CTokenPrivileges::Delete", "ATLSECURITY/ATL::CTokenPrivileges::DeleteAll", "ATLSECURITY/ATL::CTokenPrivileges::GetCount", "ATLSECURITY/ATL::CTokenPrivileges::GetDisplayNames", "ATLSECURITY/ATL::CTokenPrivileges::GetLength", "ATLSECURITY/ATL::CTokenPrivileges::GetLuidsAndAttributes", "ATLSECURITY/ATL::CTokenPrivileges::GetNamesAndAttributes", "ATLSECURITY/ATL::CTokenPrivileges::GetPTOKEN_PRIVILEGES", "ATLSECURITY/ATL::CTokenPrivileges::LookupPrivilege"]
diff --git a/docs/atl/reference/curl-class.md b/docs/atl/reference/curl-class.md
index b496d20244..ff1a201f3f 100644
--- a/docs/atl/reference/curl-class.md
+++ b/docs/atl/reference/curl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CUrl Class"
title: "CUrl Class"
ms.date: "05/06/2019"
f1_keywords: ["CUrl", "ATLUTIL/ATL::CUrl", "ATLUTIL/ATL::CUrl::CUrl", "ATLUTIL/ATL::CUrl::Canonicalize", "ATLUTIL/ATL::CUrl::Clear", "ATLUTIL/ATL::CUrl::CrackUrl", "ATLUTIL/ATL::CUrl::CreateUrl", "ATLUTIL/ATL::CUrl::GetExtraInfo", "ATLUTIL/ATL::CUrl::GetExtraInfoLength", "ATLUTIL/ATL::CUrl::GetHostName", "ATLUTIL/ATL::CUrl::GetHostNameLength", "ATLUTIL/ATL::CUrl::GetPassword", "ATLUTIL/ATL::CUrl::GetPasswordLength", "ATLUTIL/ATL::CUrl::GetPortNumber", "ATLUTIL/ATL::CUrl::GetScheme", "ATLUTIL/ATL::CUrl::GetSchemeName", "ATLUTIL/ATL::CUrl::GetSchemeNameLength", "ATLUTIL/ATL::CUrl::GetUrlLength", "ATLUTIL/ATL::CUrl::GetUrlPath", "ATLUTIL/ATL::CUrl::GetUrlPathLength", "ATLUTIL/ATL::CUrl::GetUserName", "ATLUTIL/ATL::CUrl::GetUserNameLength", "ATLUTIL/ATL::CUrl::SetExtraInfo", "ATLUTIL/ATL::CUrl::SetHostName", "ATLUTIL/ATL::CUrl::SetPassword", "ATLUTIL/ATL::CUrl::SetPortNumber", "ATLUTIL/ATL::CUrl::SetScheme", "ATLUTIL/ATL::CUrl::SetSchemeName", "ATLUTIL/ATL::CUrl::SetUrlPath", "ATLUTIL/ATL::CUrl::SetUserName"]
diff --git a/docs/atl/reference/cw2aex-class.md b/docs/atl/reference/cw2aex-class.md
index 04d01385f6..9029cccbe7 100644
--- a/docs/atl/reference/cw2aex-class.md
+++ b/docs/atl/reference/cw2aex-class.md
@@ -1,13 +1,13 @@
---
+description: "Learn more about: CW2AEX Class"
title: "CW2AEX Class"
ms.date: "11/04/2016"
f1_keywords: ["CW2AEX", "ATLCONV/ATL::CW2AEX", "ATLCONV/ATL::CW2AEX::CW2AEX", "ATLCONV/ATL::CW2AEX::m_psz", "ATLCONV/ATL::CW2AEX::m_szBuffer"]
helpviewer_keywords: ["CW2AEX class"]
-ms.assetid: 44dc2cf5-dd30-440b-a9b9-b21b43f49843
---
-# CW2AEX Class
+# `CW2AEX` Class
-This class is used by the string conversion macros CT2AEX, CW2TEX, CW2CTEX, and CT2CAEX, and the typedef CW2A.
+This class is used by the string conversion macros `CT2AEX`, `CW2TEX`, `CW2CTEX`, and `CT2CAEX`, and the typedef `CW2A`.
> [!IMPORTANT]
> This class and its members cannot be used in applications that execute in the Windows Runtime.
@@ -21,7 +21,7 @@ class CW2AEX
#### Parameters
-*t_nBufferLength*
+*`t_nBufferLength`*\
The size of the buffer used in the translation process. The default length is 128 bytes.
## Members
@@ -30,8 +30,8 @@ The size of the buffer used in the translation process. The default length is 12
|Name|Description|
|----------|-----------------|
-|[CW2AEX::CW2AEX](#cw2aex)|The constructor.|
-|[CW2AEX::~CW2AEX](#dtor)|The destructor.|
+|[`CW2AEX::CW2AEX`](#cw2aex)|The constructor.|
+|[`CW2AEX::~CW2AEX`](#dtor)|The destructor.|
### Public Operators
@@ -43,32 +43,32 @@ The size of the buffer used in the translation process. The default length is 12
|Name|Description|
|----------|-----------------|
-|[CW2AEX::m_psz](#m_psz)|The data member that stores the source string.|
-|[CW2AEX::m_szBuffer](#m_szbuffer)|The static buffer, used to store the converted string.|
+|[`CW2AEX::m_psz`](#m_psz)|The data member that stores the source string.|
+|[`CW2AEX::m_szBuffer`](#m_szbuffer)|The static buffer, used to store the converted string.|
## Remarks
-Unless extra functionality is required, use CT2AEX, CW2TEX, CW2CTEX, CT2CAEX, or CW2A in your code.
+Unless extra functionality is required, use `CT2AEX`, `CW2TEX`, `CW2CTEX`, `CT2CAEX`, or `CW2A` in your code.
-This class contains a fixed-size static buffer which is used to store the result of the conversion. If the result is too large to fit into the static buffer, the class allocates memory using **malloc**, freeing the memory when the object goes out of scope. This ensures that, unlike text conversion macros available in previous versions of ATL, this class is safe to use in loops and that it won't overflow the stack.
+This class contains a fixed-size static buffer that is used to store the result of the conversion. If the result is too large to fit into the static buffer, the class allocates memory using **`malloc`**, freeing the memory when the object goes out of scope. This ensures that, unlike text conversion macros available in previous versions of ATL, this class is safe to use in loops and that it won't overflow the stack.
-If the class tries to allocate memory on the heap and fails, it will call `AtlThrow` with an argument of E_OUTOFMEMORY.
+If the class tries to allocate memory on the heap and fails, it will call `AtlThrow` with an argument of `E_OUTOFMEMORY`.
By default, the ATL conversion classes and macros use the current thread's ANSI code page for the conversion. If you want to override that behavior for a specific conversion, specify the code page as the second parameter to the constructor for the class.
The following macros are based on this class:
-- CT2AEX
+- `CT2AEX`
-- CW2TEX
+- `CW2TEX`
-- CW2CTEX
+- `CW2CTEX`
-- CT2CAEX
+- `CT2CAEX`
The following typedef is based on this class:
-- CW2A
+- `CW2A`
For a discussion of these text conversion macros, see [ATL and MFC String Conversion Macros](string-conversion-macros.md).
@@ -78,9 +78,9 @@ See [ATL and MFC String Conversion Macros](string-conversion-macros.md) for an e
## Requirements
-**Header:** atlconv.h
+**Header:** `atlconv.h`
-## CW2AEX::CW2AEX
+## `CW2AEX::CW2AEX`
The constructor.
@@ -91,17 +91,17 @@ CW2AEX(LPCWSTR psz) throw(...);
### Parameters
-*psz*
+*`psz`*\
The text string to be converted.
-*nCodePage*
-The code page used to perform the conversion. See the code page parameter discussion for the Windows SDK function [MultiByteToWideChar](/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar) for more details.
+*`nCodePage`*\
+The code page used to perform the conversion. See the code page parameter discussion for the Windows SDK function [`MultiByteToWideChar`](/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar) for more details.
### Remarks
Allocates the buffer used in the translation process.
-## CW2AEX::~CW2AEX
+## `CW2AEX::~CW2AEX`
The destructor.
@@ -113,7 +113,7 @@ The destructor.
Frees the allocated buffer.
-## CW2AEX::m_psz
+## `CW2AEX::m_psz`
The data member that stores the source string.
@@ -121,7 +121,7 @@ The data member that stores the source string.
LPSTR m_psz;
```
-## CW2AEX::m_szBuffer
+## `CW2AEX::m_szBuffer`
The static buffer, used to store the converted string.
@@ -129,7 +129,7 @@ The static buffer, used to store the converted string.
char m_szBuffer[t_nBufferLength];
```
-## CW2AEX::operator LPSTR
+## `CW2AEX::operator LPSTR`
Conversion operator.
@@ -139,13 +139,13 @@ operator LPSTR() const throw();
### Return Value
-Returns the text string as type LPSTR.
+Returns the text string as type `LPSTR`.
## See also
-[CA2AEX Class](../../atl/reference/ca2aex-class.md)
-[CA2CAEX Class](../../atl/reference/ca2caex-class.md)
-[CA2WEX Class](../../atl/reference/ca2wex-class.md)
-[CW2CWEX Class](../../atl/reference/cw2cwex-class.md)
-[CW2WEX Class](../../atl/reference/cw2wex-class.md)
+[`CA2AEX` Class](../../atl/reference/ca2aex-class.md)\
+[`CA2CAEX` Class](../../atl/reference/ca2caex-class.md)\
+[`CA2WEX` Class](../../atl/reference/ca2wex-class.md)\
+[`CW2CWEX` Class](../../atl/reference/cw2cwex-class.md)\
+[`CW2WEX` Class](../../atl/reference/cw2wex-class.md)\
[Class Overview](../../atl/atl-class-overview.md)
diff --git a/docs/atl/reference/cw2cwex-class.md b/docs/atl/reference/cw2cwex-class.md
index c533e73ec7..58df28f8f6 100644
--- a/docs/atl/reference/cw2cwex-class.md
+++ b/docs/atl/reference/cw2cwex-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CW2CWEX Class"
title: "CW2CWEX Class"
ms.date: "11/04/2016"
f1_keywords: ["CW2CWEX", "ATLCONV/ATL::CW2CWEX", "ATLCONV/ATL::CW2CWEX::CW2CWEX", "ATLCONV/ATL::CW2CWEX::m_psz"]
diff --git a/docs/atl/reference/cw2wex-class.md b/docs/atl/reference/cw2wex-class.md
index a64b9ac1e6..d5c15f69f2 100644
--- a/docs/atl/reference/cw2wex-class.md
+++ b/docs/atl/reference/cw2wex-class.md
@@ -1,9 +1,9 @@
---
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
@@ -99,7 +99,7 @@ Creates the buffer required for the translation.
## CW2WEX::~CW2WEX
-The destructor..
+The destructor.
```
~CW2WEX() throw();
@@ -139,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/cwin32heap-class.md b/docs/atl/reference/cwin32heap-class.md
index 0e37f54e9a..8c69f91f15 100644
--- a/docs/atl/reference/cwin32heap-class.md
+++ b/docs/atl/reference/cwin32heap-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CWin32Heap Class"
title: "CWin32Heap Class"
ms.date: "11/04/2016"
f1_keywords: ["CWin32Heap", "ATLMEM/ATL::CWin32Heap", "ATLMEM/ATL::CWin32Heap::CWin32Heap", "ATLMEM/ATL::CWin32Heap::Allocate", "ATLMEM/ATL::CWin32Heap::Attach", "ATLMEM/ATL::CWin32Heap::Detach", "ATLMEM/ATL::CWin32Heap::Free", "ATLMEM/ATL::CWin32Heap::GetSize", "ATLMEM/ATL::CWin32Heap::Reallocate", "ATLMEM/ATL::CWin32Heap::m_bOwnHeap", "ATLMEM/ATL::CWin32Heap::m_hHeap"]
diff --git a/docs/atl/reference/cwindow-class.md b/docs/atl/reference/cwindow-class.md
index a2910f2779..c91fae3db6 100644
--- a/docs/atl/reference/cwindow-class.md
+++ b/docs/atl/reference/cwindow-class.md
@@ -1,11 +1,11 @@
---
+description: "Learn more about: CWindow Class"
title: "CWindow Class"
ms.date: "11/04/2016"
f1_keywords: ["CWindow", "ATLWIN/ATL::CWindow", "ATLWIN/ATL::CWindow::CWindow", "ATLWIN/ATL::CWindow::ArrangeIconicWindows", "ATLWIN/ATL::CWindow::Attach", "ATLWIN/ATL::CWindow::BeginPaint", "ATLWIN/ATL::CWindow::BringWindowToTop", "ATLWIN/ATL::CWindow::CenterWindow", "ATLWIN/ATL::CWindow::ChangeClipboardChain", "ATLWIN/ATL::CWindow::CheckDlgButton", "ATLWIN/ATL::CWindow::CheckRadioButton", "ATLWIN/ATL::CWindow::ChildWindowFromPoint", "ATLWIN/ATL::CWindow::ChildWindowFromPointEx", "ATLWIN/ATL::CWindow::ClientToScreen", "ATLWIN/ATL::CWindow::Create", "ATLWIN/ATL::CWindow::CreateCaret", "ATLWIN/ATL::CWindow::CreateGrayCaret", "ATLWIN/ATL::CWindow::CreateSolidCaret", "ATLWIN/ATL::CWindow::DeferWindowPos", "ATLWIN/ATL::CWindow::DestroyWindow", "ATLWIN/ATL::CWindow::Detach", "ATLWIN/ATL::CWindow::DlgDirList", "ATLWIN/ATL::CWindow::DlgDirListComboBox", "ATLWIN/ATL::CWindow::DlgDirSelect", "ATLWIN/ATL::CWindow::DlgDirSelectComboBox", "ATLWIN/ATL::CWindow::DragAcceptFiles", "ATLWIN/ATL::CWindow::DrawMenuBar", "ATLWIN/ATL::CWindow::EnableScrollBar", "ATLWIN/ATL::CWindow::EnableWindow", "ATLWIN/ATL::CWindow::EndPaint", "ATLWIN/ATL::CWindow::FlashWindow", "ATLWIN/ATL::CWindow::GetClientRect", "ATLWIN/ATL::CWindow::GetDC", "ATLWIN/ATL::CWindow::GetDCEx", "ATLWIN/ATL::CWindow::GetDescendantWindow", "ATLWIN/ATL::CWindow::GetDlgControl", "ATLWIN/ATL::CWindow::GetDlgCtrlID", "ATLWIN/ATL::CWindow::GetDlgHost", "ATLWIN/ATL::CWindow::GetDlgItem", "ATLWIN/ATL::CWindow::GetDlgItemInt", "ATLWIN/ATL::CWindow::GetDlgItemText", "ATLWIN/ATL::CWindow::GetExStyle", "ATLWIN/ATL::CWindow::GetFont", "ATLWIN/ATL::CWindow::GetHotKey", "ATLWIN/ATL::CWindow::GetIcon", "ATLWIN/ATL::CWindow::GetLastActivePopup", "ATLWIN/ATL::CWindow::GetMenu", "ATLWIN/ATL::CWindow::GetNextDlgGroupItem", "ATLWIN/ATL::CWindow::GetNextDlgTabItem", "ATLWIN/ATL::CWindow::GetParent", "ATLWIN/ATL::CWindow::GetScrollInfo", "ATLWIN/ATL::CWindow::GetScrollPos", "ATLWIN/ATL::CWindow::GetScrollRange", "ATLWIN/ATL::CWindow::GetStyle", "ATLWIN/ATL::CWindow::GetSystemMenu", "ATLWIN/ATL::CWindow::GetTopLevelParent", "ATLWIN/ATL::CWindow::GetTopLevelWindow", "ATLWIN/ATL::CWindow::GetTopWindow", "ATLWIN/ATL::CWindow::GetUpdateRect", "ATLWIN/ATL::CWindow::GetUpdateRgn", "ATLWIN/ATL::CWindow::GetWindow", "ATLWIN/ATL::CWindow::GetWindowContextHelpId", "ATLWIN/ATL::CWindow::GetWindowDC", "ATLWIN/ATL::CWindow::GetWindowLong", "ATLWIN/ATL::CWindow::GetWindowLongPtr", "ATLWIN/ATL::CWindow::GetWindowPlacement", "ATLWIN/ATL::CWindow::GetWindowProcessID", "ATLWIN/ATL::CWindow::GetWindowRect", "ATLWIN/ATL::CWindow::GetWindowRgn", "ATLWIN/ATL::CWindow::GetWindowText", "ATLWIN/ATL::CWindow::GetWindowTextLength", "ATLWIN/ATL::CWindow::GetWindowThreadID", "ATLWIN/ATL::CWindow::GetWindowWord", "ATLWIN/ATL::CWindow::GotoDlgCtrl", "ATLWIN/ATL::CWindow::HideCaret", "ATLWIN/ATL::CWindow::HiliteMenuItem", "ATLWIN/ATL::CWindow::Invalidate", "ATLWIN/ATL::CWindow::InvalidateRect", "ATLWIN/ATL::CWindow::InvalidateRgn", "ATLWIN/ATL::CWindow::IsChild", "ATLWIN/ATL::CWindow::IsDialogMessage", "ATLWIN/ATL::CWindow::IsDlgButtonChecked", "ATLWIN/ATL::CWindow::IsIconic", "ATLWIN/ATL::CWindow::IsParentDialog", "ATLWIN/ATL::CWindow::IsWindow", "ATLWIN/ATL::CWindow::IsWindowEnabled", "ATLWIN/ATL::CWindow::IsWindowUnicode", "ATLWIN/ATL::CWindow::IsWindowVisible", "ATLWIN/ATL::CWindow::IsZoomed", "ATLWIN/ATL::CWindow::KillTimer", "ATLWIN/ATL::CWindow::LockWindowUpdate", "ATLWIN/ATL::CWindow::MapWindowPoints", "ATLWIN/ATL::CWindow::MessageBox", "ATLWIN/ATL::CWindow::ModifyStyle", "ATLWIN/ATL::CWindow::ModifyStyleEx", "ATLWIN/ATL::CWindow::MoveWindow", "ATLWIN/ATL::CWindow::NextDlgCtrl", "ATLWIN/ATL::CWindow::OpenClipboard", "ATLWIN/ATL::CWindow::PostMessage", "ATLWIN/ATL::CWindow::PrevDlgCtrl", "ATLWIN/ATL::CWindow::Print", "ATLWIN/ATL::CWindow::PrintClient", "ATLWIN/ATL::CWindow::RedrawWindow", "ATLWIN/ATL::CWindow::ReleaseDC", "ATLWIN/ATL::CWindow::ResizeClient", "ATLWIN/ATL::CWindow::ScreenToClient", "ATLWIN/ATL::CWindow::ScrollWindow", "ATLWIN/ATL::CWindow::ScrollWindowEx", "ATLWIN/ATL::CWindow::SendDlgItemMessage", "ATLWIN/ATL::CWindow::SendMessage", "ATLWIN/ATL::CWindow::SendMessageToDescendants", "ATLWIN/ATL::CWindow::SendNotifyMessage", "ATLWIN/ATL::CWindow::SetActiveWindow", "ATLWIN/ATL::CWindow::SetCapture", "ATLWIN/ATL::CWindow::SetClipboardViewer", "ATLWIN/ATL::CWindow::SetDlgCtrlID", "ATLWIN/ATL::CWindow::SetDlgItemInt", "ATLWIN/ATL::CWindow::SetDlgItemText", "ATLWIN/ATL::CWindow::SetFocus", "ATLWIN/ATL::CWindow::SetFont", "ATLWIN/ATL::CWindow::SetHotKey", "ATLWIN/ATL::CWindow::SetIcon", "ATLWIN/ATL::CWindow::SetMenu", "ATLWIN/ATL::CWindow::SetParent", "ATLWIN/ATL::CWindow::SetRedraw", "ATLWIN/ATL::CWindow::SetScrollInfo", "ATLWIN/ATL::CWindow::SetScrollPos", "ATLWIN/ATL::CWindow::SetScrollRange", "ATLWIN/ATL::CWindow::SetTimer", "ATLWIN/ATL::CWindow::SetWindowContextHelpId", "ATLWIN/ATL::CWindow::SetWindowLong", "ATLWIN/ATL::CWindow::SetWindowLongPtr", "ATLWIN/ATL::CWindow::SetWindowPlacement", "ATLWIN/ATL::CWindow::SetWindowPos", "ATLWIN/ATL::CWindow::SetWindowRgn", "ATLWIN/ATL::CWindow::SetWindowText", "ATLWIN/ATL::CWindow::SetWindowWord", "ATLWIN/ATL::CWindow::ShowCaret", "ATLWIN/ATL::CWindow::ShowOwnedPopups", "ATLWIN/ATL::CWindow::ShowScrollBar", "ATLWIN/ATL::CWindow::ShowWindow", "ATLWIN/ATL::CWindow::ShowWindowAsync", "ATLWIN/ATL::CWindow::UpdateWindow", "ATLWIN/ATL::CWindow::ValidateRect", "ATLWIN/ATL::CWindow::ValidateRgn", "ATLWIN/ATL::CWindow::WinHelp", "ATLWIN/ATL::CWindow::m_hWnd", "ATLWIN/ATL::CWindow::rcDefault"]
helpviewer_keywords: ["CWindow class"]
-ms.assetid: fefa00c8-f053-4bcf-87bc-dc84f5386683
---
-# CWindow Class
+# `CWindow` Class
This class provides methods for manipulating a window.
@@ -24,206 +24,206 @@ class CWindow
|Name|Description|
|----------|-----------------|
-|[CWindow::CWindow](#cwindow)|Constructor.|
+|[`CWindow::CWindow`](#cwindow)|Constructor.|
### Public Methods
|Name|Description|
|----------|-----------------|
-|[CWindow::ArrangeIconicWindows](#arrangeiconicwindows)|Arranges all minimized child windows.|
-|[CWindow::Attach](#attach)|Attaches a window to the `CWindow` object.|
-|[CWindow::BeginPaint](#beginpaint)|Prepares the window for painting.|
-|[CWindow::BringWindowToTop](#bringwindowtotop)|Brings the window to the top of the Z order.|
-|[CWindow::CenterWindow](#centerwindow)|Centers the window against a given window.|
-|[CWindow::ChangeClipboardChain](#changeclipboardchain)|Removes the window from the chain of Clipboard viewers.|
-|[CWindow::CheckDlgButton](#checkdlgbutton)|Changes the check state of the specified button.|
-|[CWindow::CheckRadioButton](#checkradiobutton)|Checks the specified radio button.|
-|[CWindow::ChildWindowFromPoint](#childwindowfrompoint)|Retrieves the child window containing the specified point.|
-|[CWindow::ChildWindowFromPointEx](#childwindowfrompointex)|Retrieves a particular type of child window containing the specified point.|
-|[CWindow::ClientToScreen](#clienttoscreen)|Converts client coordinates to screen coordinates.|
-|[CWindow::Create](#create)|Creates a window.|
-|[CWindow::CreateCaret](#createcaret)|Creates a new shape for the system caret.|
-|[CWindow::CreateGrayCaret](#creategraycaret)|Creates a gray rectangle for the system caret.|
-|[CWindow::CreateSolidCaret](#createsolidcaret)|Creates a solid rectangle for the system caret.|
-|[CWindow::DeferWindowPos](#deferwindowpos)|Updates the specified multiple-window-position structure for the specified window.|
-|[CWindow::DestroyWindow](#destroywindow)|Destroys the window associated with the `CWindow` object.|
-|[CWindow::Detach](#detach)|Detaches the window from the `CWindow` object.|
-|[CWindow::DlgDirList](#dlgdirlist)|Fills a list box with the names of all files matching a specified path or file name.|
-|[CWindow::DlgDirListComboBox](#dlgdirlistcombobox)|Fills a combo box with the names of all files matching a specified path or file name.|
-|[CWindow::DlgDirSelect](#dlgdirselect)|Retrieves the current selection from a list box.|
-|[CWindow::DlgDirSelectComboBox](#dlgdirselectcombobox)|Retrieves the current selection from a combo box.|
-|[CWindow::DragAcceptFiles](#dragacceptfiles)|Registers whether the window accepts dragged files.|
-|[CWindow::DrawMenuBar](#drawmenubar)|Redraws the window's menu bar.|
-|[CWindow::EnableScrollBar](#enablescrollbar)|Enables or disables the scroll bar arrows.|
-|[CWindow::EnableWindow](#enablewindow)|Enables or disables input.|
-|[CWindow::EndPaint](#endpaint)|Marks the end of painting.|
-|[CWindow::FlashWindow](#flashwindow)|Flashes the window once.|
-|[CWindow::GetClientRect](#getclientrect)|Retrieves the coordinates of the client area.|
-|[CWindow::GetDC](#getdc)|Retrieves a device context for the client area.|
-|[CWindow::GetDCEx](#getdcex)|Retrieves a device context for the client area and allows clipping options.|
-|[CWindow::GetDescendantWindow](#getdescendantwindow)|Retrieves the specified descendant window.|
-|[CWindow::GetDlgControl](#getdlgcontrol)|Retrieves an interface on the specified control.|
-|[CWindow::GetDlgCtrlID](#getdlgctrlid)|Retrieves the window's identifier (for child windows only).|
-|[CWindow::GetDlgHost](#getdlghost)|Retrieves a pointer to an interface to the ATL Control hosting container.|
-|[CWindow::GetDlgItem](#getdlgitem)|Retrieves the specified child window.|
-|[CWindow::GetDlgItemInt](#getdlgitemint)|Translates a control's text to an integer.|
-|[CWindow::GetDlgItemText](#getdlgitemtext)|Retrieves a control's text.|
-|[CWindow::GetExStyle](#getexstyle)|Retrieves the extended window styles.|
-|[CWindow::GetFont](#getfont)|Retrieves the window's current font.|
-|[CWindow::GetHotKey](#gethotkey)|Determines the hot key associated with the window.|
-|[CWindow::GetIcon](#geticon)|Retrieves the window's large or small icon.|
-|[CWindow::GetLastActivePopup](#getlastactivepopup)|Retrieves the most recently active pop-up window.|
-|[CWindow::GetMenu](#getmenu)|Retrieves the window's menu.|
-|[CWindow::GetNextDlgGroupItem](#getnextdlggroupitem)|Retrieves the previous or next control within a group of controls.|
-|[CWindow::GetNextDlgTabItem](#getnextdlgtabitem)|Retrieves the previous or next control having the WS_TABSTOP style.|
-|[CWindow::GetParent](#getparent)|Retrieves the immediate parent window.|
-|[CWindow::GetScrollInfo](#getscrollinfo)|Retrieves the parameters of a scroll bar.|
-|[CWindow::GetScrollPos](#getscrollpos)|Retrieves the position of the scroll box.|
-|[CWindow::GetScrollRange](#getscrollrange)|Retrieves the scroll bar range.|
-|[CWindow::GetStyle](#getstyle)|Retrieves the window styles.|
-|[CWindow::GetSystemMenu](#getsystemmenu)|Creates a copy of the system menu for modification.|
-|[CWindow::GetTopLevelParent](#gettoplevelparent)|Retrieves the top-level parent or owner window.|
-|[CWindow::GetTopLevelWindow](#gettoplevelwindow)|Retrieves the top-level owner window.|
-|[CWindow::GetTopWindow](#gettopwindow)|Retrieves the top-level child window.|
-|[CWindow::GetUpdateRect](#getupdaterect)|Retrieves the coordinates of the smallest rectangle that completely encloses the update region.|
-|[CWindow::GetUpdateRgn](#getupdatergn)|Retrieves the update region and copies it into a specified region.|
-|[CWindow::GetWindow](#getwindow)|Retrieves the specified window.|
-|[CWindow::GetWindowContextHelpId](#getwindowcontexthelpid)|Retrieves the window's help context identifier.|
-|[CWindow::GetWindowDC](#getwindowdc)|Retrieves a device context for the entire window.|
-|[CWindow::GetWindowLong](#getwindowlong)|Retrieves a 32-bit value at a specified offset into the extra window memory.|
-|[CWindow::GetWindowLongPtr](#getwindowlongptr)|Retrieves information about the specified window, including a value at a specified offset into the extra window memory.|
-|[CWindow::GetWindowPlacement](#getwindowplacement)|Retrieves the show state and positions.|
-|[CWindow::GetWindowProcessID](#getwindowprocessid)|Retrieves the identifier of the process that created the window.|
-|[CWindow::GetWindowRect](#getwindowrect)|Retrieves the window's bounding dimensions.|
-|[CWindow::GetWindowRgn](#getwindowrgn)|Obtains a copy of the window region of a window.|
-|[CWindow::GetWindowText](#getwindowtext)|Retrieves the window's text.|
-|[CWindow::GetWindowTextLength](#getwindowtextlength)|Retrieves the length of the window's text.|
-|[CWindow::GetWindowThreadID](#getwindowthreadid)|Retrieves the identifier of the thread that created the specified window.|
-|[CWindow::GetWindowWord](#getwindowword)|Retrieves a 16-bit value at a specified offset into the extra window memory.|
-|[CWindow::GotoDlgCtrl](#gotodlgctrl)|Sets the keyboard focus to a control in the dialog box.|
-|[CWindow::HideCaret](#hidecaret)|Hides the system caret.|
-|[CWindow::HiliteMenuItem](#hilitemenuitem)|Highlights or removes the highlight from a top-level menu item.|
-|[CWindow::Invalidate](#invalidate)|Invalidates the entire client area.|
-|[CWindow::InvalidateRect](#invalidaterect)|Invalidates the client area within the specified rectangle.|
-|[CWindow::InvalidateRgn](#invalidatergn)|Invalidates the client area within the specified region.|
-|[CWindow::IsChild](#ischild)|Determines whether the specified window is a child window.|
-|[CWindow::IsDialogMessage](#isdialogmessage)|Determines whether a message is intended for the specified dialog box.|
-|[CWindow::IsDlgButtonChecked](#isdlgbuttonchecked)|Determines the check state of the button.|
-|[CWindow::IsIconic](#isiconic)|Determines whether the window is minimized.|
-|[CWindow::IsParentDialog](#isparentdialog)|Determines if the parent window of a control is a dialog window.|
-|[CWindow::IsWindow](#iswindow)|Determines whether the specified window handle identifies an existing window.|
-|[CWindow::IsWindowEnabled](#iswindowenabled)|Determines whether the window is enabled for input.|
-|[CWindow::IsWindowUnicode](#iswindowunicode)|Determines whether the specified window is a native Unicode window.|
-|[CWindow::IsWindowVisible](#iswindowvisible)|Determines the window's visibility state.|
-|[CWindow::IsZoomed](#iszoomed)|Determines whether the window is maximized.|
-|[CWindow::KillTimer](#killtimer)|Destroys a timer event.|
-|[CWindow::LockWindowUpdate](#lockwindowupdate)|Disables or enables drawing in the window.|
-|[CWindow::MapWindowPoints](#mapwindowpoints)|Converts a set of points from the window's coordinate space to the coordinate space of another window.|
-|[CWindow::MessageBox](#messagebox)|Displays a message box.|
-|[CWindow::ModifyStyle](#modifystyle)|Modifies the window styles.|
-|[CWindow::ModifyStyleEx](#modifystyleex)|Modifies the extended window styles.|
-|[CWindow::MoveWindow](#movewindow)|Changes the window's size and position.|
-|[CWindow::NextDlgCtrl](#nextdlgctrl)|Sets the keyboard focus to the next control in the dialog box.|
-|[CWindow::OpenClipboard](#openclipboard)|Opens the Clipboard.|
-|[CWindow::PostMessage](#postmessage)|Places a message in the message queue associated with the thread that created the window. Returns without waiting for the thread to process the message.|
-|[CWindow::PrevDlgCtrl](#prevdlgctrl)|Sets the keyboard focus to the previous control in the dialog box.|
-|[CWindow::Print](#print)|Requests that the window be drawn in a specified device context.|
-|[CWindow::PrintClient](#printclient)|Requests that the window's client area be drawn in a specified device context.|
-|[CWindow::RedrawWindow](#redrawwindow)|Updates a specified rectangle or region in the client area.|
-|[CWindow::ReleaseDC](#releasedc)|Releases a device context.|
-|[CWindow::ResizeClient](#resizeclient)|Resizes the window.|
-|[CWindow::ScreenToClient](#screentoclient)|Converts screen coordinates to client coordinates.|
-|[CWindow::ScrollWindow](#scrollwindow)|Scrolls the specified client area.|
-|[CWindow::ScrollWindowEx](#scrollwindowex)|Scrolls the specified client area with additional features.|
-|[CWindow::SendDlgItemMessage](#senddlgitemmessage)|Sends a message to a control.|
-|[CWindow::SendMessage](#sendmessage)|Sends a message to the window and does not return until the window procedure has processed the message.|
-|[CWindow::SendMessageToDescendants](#sendmessagetodescendants)|Sends a message to the specified descendant windows.|
-|[CWindow::SendNotifyMessage](#sendnotifymessage)|Sends a message to the window. If the window was created by the calling thread, `SendNotifyMessage` does not return until the window procedure has processed the message. Otherwise, it returns immediately.|
-|[CWindow::SetActiveWindow](#setactivewindow)|Activates the window.|
-|[CWindow::SetCapture](#setcapture)|Sends all subsequent mouse input to the window.|
-|[CWindow::SetClipboardViewer](#setclipboardviewer)|Adds the window to the Clipboard viewer chain.|
-|[CWindow::SetDlgCtrlID](#setdlgctrlid)|Changes the window's identifier.|
-|[CWindow::SetDlgItemInt](#setdlgitemint)|Changes a control's text to the string representation of an integer value.|
-|[CWindow::SetDlgItemText](#setdlgitemtext)|Changes a control's text.|
-|[CWindow::SetFocus](#setfocus)|Sets the input focus to the window.|
-|[CWindow::SetFont](#setfont)|Changes the window's current font.|
-|[CWindow::SetHotKey](#sethotkey)|Associates a hot key with the window.|
-|[CWindow::SetIcon](#seticon)|Changes the window's large or small icon.|
-|[CWindow::SetMenu](#setmenu)|Changes the window's current menu.|
-|[CWindow::SetParent](#setparent)|Changes the parent window.|
-|[CWindow::SetRedraw](#setredraw)|Sets or clears the redraw flag.|
-|[CWindow::SetScrollInfo](#setscrollinfo)|Sets the parameters of a scroll bar.|
-|[CWindow::SetScrollPos](#setscrollpos)|Changes the position of the scroll box.|
-|[CWindow::SetScrollRange](#setscrollrange)|Changes the scroll bar range.|
-|[CWindow::SetTimer](#settimer)|Creates a timer event.|
-|[CWindow::SetWindowContextHelpId](#setwindowcontexthelpid)|Sets the window's help context identifier.|
-|[CWindow::SetWindowLong](#setwindowlong)|Sets a 32-bit value at a specified offset into the extra window memory.|
-|[CWindow::SetWindowLongPtr](#setwindowlongptr)|Changes an attribute of the specified window, and also sets a value at the specified offset in the extra window memory.|
-|[CWindow::SetWindowPlacement](#setwindowplacement)|Sets the show state and positions.|
-|[CWindow::SetWindowPos](#setwindowpos)|Sets the size, position, and Z order.|
-|[CWindow::SetWindowRgn](#setwindowrgn)|Sets the window region of a window.|
-|[CWindow::SetWindowText](#setwindowtext)|Changes the window's text.|
-|[CWindow::SetWindowWord](#setwindowword)|Sets a 16-bit value at a specified offset into the extra window memory.|
-|[CWindow::ShowCaret](#showcaret)|Displays the system caret.|
-|[CWindow::ShowOwnedPopups](#showownedpopups)|Shows or hides the pop-up windows owned by the window.|
-|[CWindow::ShowScrollBar](#showscrollbar)|Shows or hides a scroll bar.|
-|[CWindow::ShowWindow](#showwindow)|Sets the window's show state.|
-|[CWindow::ShowWindowAsync](#showwindowasync)|Sets the show state of a window created by a different thread.|
-|[CWindow::UpdateWindow](#updatewindow)|Updates the client area.|
-|[CWindow::ValidateRect](#validaterect)|Validates the client area within the specified rectangle.|
-|[CWindow::ValidateRgn](#validatergn)|Validates the client area within the specified region.|
-|[CWindow::WinHelp](#winhelp)|Starts Windows Help.|
+|[`CWindow::ArrangeIconicWindows`](#arrangeiconicwindows)|Arranges all minimized child windows.|
+|[`CWindow::Attach`](#attach)|Attaches a window to the `CWindow` object.|
+|[`CWindow::BeginPaint`](#beginpaint)|Prepares the window for painting.|
+|[`CWindow::BringWindowToTop`](#bringwindowtotop)|Brings the window to the top of the Z order.|
+|[`CWindow::CenterWindow`](#centerwindow)|Centers the window against a given window.|
+|[`CWindow::ChangeClipboardChain`](#changeclipboardchain)|Removes the window from the chain of Clipboard viewers.|
+|[`CWindow::CheckDlgButton`](#checkdlgbutton)|Changes the check state of the specified button.|
+|[`CWindow::CheckRadioButton`](#checkradiobutton)|Checks the specified radio button.|
+|[`CWindow::ChildWindowFromPoint`](#childwindowfrompoint)|Retrieves the child window containing the specified point.|
+|[`CWindow::ChildWindowFromPointEx`](#childwindowfrompointex)|Retrieves a particular type of child window containing the specified point.|
+|[`CWindow::ClientToScreen`](#clienttoscreen)|Converts client coordinates to screen coordinates.|
+|[`CWindow::Create`](#create)|Creates a window.|
+|[`CWindow::CreateCaret`](#createcaret)|Creates a new shape for the system caret.|
+|[`CWindow::CreateGrayCaret`](#creategraycaret)|Creates a gray rectangle for the system caret.|
+|[`CWindow::CreateSolidCaret`](#createsolidcaret)|Creates a solid rectangle for the system caret.|
+|[`CWindow::DeferWindowPos`](#deferwindowpos)|Updates the specified multiple-window-position structure for the specified window.|
+|[`CWindow::DestroyWindow`](#destroywindow)|Destroys the window associated with the `CWindow` object.|
+|[`CWindow::Detach`](#detach)|Detaches the window from the `CWindow` object.|
+|[`CWindow::DlgDirList`](#dlgdirlist)|Fills a list box with the names of all files matching a specified path or file name.|
+|[`CWindow::DlgDirListComboBox`](#dlgdirlistcombobox)|Fills a combo box with the names of all files matching a specified path or file name.|
+|[`CWindow::DlgDirSelect`](#dlgdirselect)|Retrieves the current selection from a list box.|
+|[`CWindow::DlgDirSelectComboBox`](#dlgdirselectcombobox)|Retrieves the current selection from a combo box.|
+|[`CWindow::DragAcceptFiles`](#dragacceptfiles)|Registers whether the window accepts dragged files.|
+|[`CWindow::DrawMenuBar`](#drawmenubar)|Redraws the window's menu bar.|
+|[`CWindow::EnableScrollBar`](#enablescrollbar)|Enables or disables the scroll bar arrows.|
+|[`CWindow::EnableWindow`](#enablewindow)|Enables or disables input.|
+|[`CWindow::EndPaint`](#endpaint)|Marks the end of painting.|
+|[`CWindow::FlashWindow`](#flashwindow)|Flashes the window once.|
+|[`CWindow::GetClientRect`](#getclientrect)|Retrieves the coordinates of the client area.|
+|[`CWindow::GetDC`](#getdc)|Retrieves a device context for the client area.|
+|[`CWindow::GetDCEx`](#getdcex)|Retrieves a device context for the client area and allows clipping options.|
+|[`CWindow::GetDescendantWindow`](#getdescendantwindow)|Retrieves the specified descendant window.|
+|[`CWindow::GetDlgControl`](#getdlgcontrol)|Retrieves an interface on the specified control.|
+|[`CWindow::GetDlgCtrlID`](#getdlgctrlid)|Retrieves the window's identifier (for child windows only).|
+|[`CWindow::GetDlgHost`](#getdlghost)|Retrieves a pointer to an interface to the ATL Control hosting container.|
+|[`CWindow::GetDlgItem`](#getdlgitem)|Retrieves the specified child window.|
+|[`CWindow::GetDlgItemInt`](#getdlgitemint)|Translates a control's text to an integer.|
+|[`CWindow::GetDlgItemText`](#getdlgitemtext)|Retrieves a control's text.|
+|[`CWindow::GetExStyle`](#getexstyle)|Retrieves the extended window styles.|
+|[`CWindow::GetFont`](#getfont)|Retrieves the window's current font.|
+|[`CWindow::GetHotKey`](#gethotkey)|Determines the hot key associated with the window.|
+|[`CWindow::GetIcon`](#geticon)|Retrieves the window's large or small icon.|
+|[`CWindow::GetLastActivePopup`](#getlastactivepopup)|Retrieves the most recently active pop-up window.|
+|[`CWindow::GetMenu`](#getmenu)|Retrieves the window's menu.|
+|[`CWindow::GetNextDlgGroupItem`](#getnextdlggroupitem)|Retrieves the previous or next control within a group of controls.|
+|[`CWindow::GetNextDlgTabItem`](#getnextdlgtabitem)|Retrieves the previous or next control having the `WS_TABSTOP` style.|
+|[`CWindow::GetParent`](#getparent)|Retrieves the immediate parent window.|
+|[`CWindow::GetScrollInfo`](#getscrollinfo)|Retrieves the parameters of a scroll bar.|
+|[`CWindow::GetScrollPos`](#getscrollpos)|Retrieves the position of the scroll box.|
+|[`CWindow::GetScrollRange`](#getscrollrange)|Retrieves the scroll bar range.|
+|[`CWindow::GetStyle`](#getstyle)|Retrieves the window styles.|
+|[`CWindow::GetSystemMenu`](#getsystemmenu)|Creates a copy of the system menu for modification.|
+|[`CWindow::GetTopLevelParent`](#gettoplevelparent)|Retrieves the top-level parent or owner window.|
+|[`CWindow::GetTopLevelWindow`](#gettoplevelwindow)|Retrieves the top-level owner window.|
+|[`CWindow::GetTopWindow`](#gettopwindow)|Retrieves the top-level child window.|
+|[`CWindow::GetUpdateRect`](#getupdaterect)|Retrieves the coordinates of the smallest rectangle that completely encloses the update region.|
+|[`CWindow::GetUpdateRgn`](#getupdatergn)|Retrieves the update region and copies it into a specified region.|
+|[`CWindow::GetWindow`](#getwindow)|Retrieves the specified window.|
+|[`CWindow::GetWindowContextHelpId`](#getwindowcontexthelpid)|Retrieves the window's help context identifier.|
+|[`CWindow::GetWindowDC`](#getwindowdc)|Retrieves a device context for the entire window.|
+|[`CWindow::GetWindowLong`](#getwindowlong)|Retrieves a 32-bit value at a specified offset into the extra window memory.|
+|[`CWindow::GetWindowLongPtr`](#getwindowlongptr)|Retrieves information about the specified window, including a value at a specified offset into the extra window memory.|
+|[`CWindow::GetWindowPlacement`](#getwindowplacement)|Retrieves the show state and positions.|
+|[`CWindow::GetWindowProcessID`](#getwindowprocessid)|Retrieves the identifier of the process that created the window.|
+|[`CWindow::GetWindowRect`](#getwindowrect)|Retrieves the window's bounding dimensions.|
+|[`CWindow::GetWindowRgn`](#getwindowrgn)|Obtains a copy of the window region of a window.|
+|[`CWindow::GetWindowText`](#getwindowtext)|Retrieves the window's text.|
+|[`CWindow::GetWindowTextLength`](#getwindowtextlength)|Retrieves the length of the window's text.|
+|[`CWindow::GetWindowThreadID`](#getwindowthreadid)|Retrieves the identifier of the thread that created the specified window.|
+|[`CWindow::GetWindowWord`](#getwindowword)|Retrieves a 16-bit value at a specified offset into the extra window memory.|
+|[`CWindow::GotoDlgCtrl`](#gotodlgctrl)|Sets the keyboard focus to a control in the dialog box.|
+|[`CWindow::HideCaret`](#hidecaret)|Hides the system caret.|
+|[`CWindow::HiliteMenuItem`](#hilitemenuitem)|Highlights or removes the highlight from a top-level menu item.|
+|[`CWindow::Invalidate`](#invalidate)|Invalidates the entire client area.|
+|[`CWindow::InvalidateRect`](#invalidaterect)|Invalidates the client area within the specified rectangle.|
+|[`CWindow::InvalidateRgn`](#invalidatergn)|Invalidates the client area within the specified region.|
+|[`CWindow::IsChild`](#ischild)|Determines whether the specified window is a child window.|
+|[`CWindow::IsDialogMessage`](#isdialogmessage)|Determines whether a message is intended for the specified dialog box.|
+|[`CWindow::IsDlgButtonChecked`](#isdlgbuttonchecked)|Determines the check state of the button.|
+|[`CWindow::IsIconic`](#isiconic)|Determines whether the window is minimized.|
+|[`CWindow::IsParentDialog`](#isparentdialog)|Determines if the parent window of a control is a dialog window.|
+|[`CWindow::IsWindow`](#iswindow)|Determines whether the specified window handle identifies an existing window.|
+|[`CWindow::IsWindowEnabled`](#iswindowenabled)|Determines whether the window is enabled for input.|
+|[`CWindow::IsWindowUnicode`](#iswindowunicode)|Determines whether the specified window is a native Unicode window.|
+|[`CWindow::IsWindowVisible`](#iswindowvisible)|Determines the window's visibility state.|
+|[`CWindow::IsZoomed`](#iszoomed)|Determines whether the window is maximized.|
+|[`CWindow::KillTimer`](#killtimer)|Destroys a timer event.|
+|[`CWindow::LockWindowUpdate`](#lockwindowupdate)|Disables or enables drawing in the window.|
+|[`CWindow::MapWindowPoints`](#mapwindowpoints)|Converts a set of points from the window's coordinate space to the coordinate space of another window.|
+|[`CWindow::MessageBox`](#messagebox)|Displays a message box.|
+|[`CWindow::ModifyStyle`](#modifystyle)|Modifies the window styles.|
+|[`CWindow::ModifyStyleEx`](#modifystyleex)|Modifies the extended window styles.|
+|[`CWindow::MoveWindow`](#movewindow)|Changes the window's size and position.|
+|[`CWindow::NextDlgCtrl`](#nextdlgctrl)|Sets the keyboard focus to the next control in the dialog box.|
+|[`CWindow::OpenClipboard`](#openclipboard)|Opens the Clipboard.|
+|[`CWindow::PostMessage`](#postmessage)|Places a message in the message queue associated with the thread that created the window. Returns without waiting for the thread to process the message.|
+|[`CWindow::PrevDlgCtrl`](#prevdlgctrl)|Sets the keyboard focus to the previous control in the dialog box.|
+|[`CWindow::Print`](#print)|Requests that the window be drawn in a specified device context.|
+|[`CWindow::PrintClient`](#printclient)|Requests that the window's client area be drawn in a specified device context.|
+|[`CWindow::RedrawWindow`](#redrawwindow)|Updates a specified rectangle or region in the client area.|
+|[`CWindow::ReleaseDC`](#releasedc)|Releases a device context.|
+|[`CWindow::ResizeClient`](#resizeclient)|Resizes the window.|
+|[`CWindow::ScreenToClient`](#screentoclient)|Converts screen coordinates to client coordinates.|
+|[`CWindow::ScrollWindow`](#scrollwindow)|Scrolls the specified client area.|
+|[`CWindow::ScrollWindowEx`](#scrollwindowex)|Scrolls the specified client area with additional features.|
+|[`CWindow::SendDlgItemMessage`](#senddlgitemmessage)|Sends a message to a control.|
+|[`CWindow::SendMessage`](#sendmessage)|Sends a message to the window and doesn't return until the window procedure has processed the message.|
+|[`CWindow::SendMessageToDescendants`](#sendmessagetodescendants)|Sends a message to the specified descendant windows.|
+|[`CWindow::SendNotifyMessage`](#sendnotifymessage)|Sends a message to the window. If the window was created by the calling thread, `SendNotifyMessage` doesn't return until the window procedure has processed the message. Otherwise, it returns immediately.|
+|[`CWindow::SetActiveWindow`](#setactivewindow)|Activates the window.|
+|[`CWindow::SetCapture`](#setcapture)|Sends all subsequent mouse input to the window.|
+|[`CWindow::SetClipboardViewer`](#setclipboardviewer)|Adds the window to the Clipboard viewer chain.|
+|[`CWindow::SetDlgCtrlID`](#setdlgctrlid)|Changes the window's identifier.|
+|[`CWindow::SetDlgItemInt`](#setdlgitemint)|Changes a control's text to the string representation of an integer value.|
+|[`CWindow::SetDlgItemText`](#setdlgitemtext)|Changes a control's text.|
+|[`CWindow::SetFocus`](#setfocus)|Sets the input focus to the window.|
+|[`CWindow::SetFont`](#setfont)|Changes the window's current font.|
+|[`CWindow::SetHotKey`](#sethotkey)|Associates a hot key with the window.|
+|[`CWindow::SetIcon`](#seticon)|Changes the window's large or small icon.|
+|[`CWindow::SetMenu`](#setmenu)|Changes the window's current menu.|
+|[`CWindow::SetParent`](#setparent)|Changes the parent window.|
+|[`CWindow::SetRedraw`](#setredraw)|Sets or clears the redraw flag.|
+|[`CWindow::SetScrollInfo`](#setscrollinfo)|Sets the parameters of a scroll bar.|
+|[`CWindow::SetScrollPos`](#setscrollpos)|Changes the position of the scroll box.|
+|[`CWindow::SetScrollRange`](#setscrollrange)|Changes the scroll bar range.|
+|[`CWindow::SetTimer`](#settimer)|Creates a timer event.|
+|[`CWindow::SetWindowContextHelpId`](#setwindowcontexthelpid)|Sets the window's help context identifier.|
+|[`CWindow::SetWindowLong`](#setwindowlong)|Sets a 32-bit value at a specified offset into the extra window memory.|
+|[`CWindow::SetWindowLongPtr`](#setwindowlongptr)|Changes an attribute of the specified window, and also sets a value at the specified offset in the extra window memory.|
+|[`CWindow::SetWindowPlacement`](#setwindowplacement)|Sets the show state and positions.|
+|[`CWindow::SetWindowPos`](#setwindowpos)|Sets the size, position, and Z order.|
+|[`CWindow::SetWindowRgn`](#setwindowrgn)|Sets the window region of a window.|
+|[`CWindow::SetWindowText`](#setwindowtext)|Changes the window's text.|
+|[`CWindow::SetWindowWord`](#setwindowword)|Sets a 16-bit value at a specified offset into the extra window memory.|
+|[`CWindow::ShowCaret`](#showcaret)|Displays the system caret.|
+|[`CWindow::ShowOwnedPopups`](#showownedpopups)|Shows or hides the pop-up windows owned by the window.|
+|[`CWindow::ShowScrollBar`](#showscrollbar)|Shows or hides a scroll bar.|
+|[`CWindow::ShowWindow`](#showwindow)|Sets the window's show state.|
+|[`CWindow::ShowWindowAsync`](#showwindowasync)|Sets the show state of a window created by a different thread.|
+|[`CWindow::UpdateWindow`](#updatewindow)|Updates the client area.|
+|[`CWindow::ValidateRect`](#validaterect)|Validates the client area within the specified rectangle.|
+|[`CWindow::ValidateRgn`](#validatergn)|Validates the client area within the specified region.|
+|[`CWindow::WinHelp`](#winhelp)|Starts Windows Help.|
### Public Operators
|Name|Description|
|----------|-----------------|
-|[CWindow::operator HWND](#operator_hwnd)|Converts the `CWindow` object to an HWND.|
-|[CWindow::operator =](#operator_eq)|Assigns an HWND to the `CWindow` object.|
+|[`CWindow::operator HWND`](#operator_hwnd)|Converts the `CWindow` object to an `HWND`.|
+|[`CWindow::operator =`](#operator_eq)|Assigns an `HWND` to the `CWindow` object.|
### Public Data Members
|Name|Description|
|----------|-----------------|
-|[CWindow::m_hWnd](#m_hwnd)|The handle to the window associated with the `CWindow` object.|
-|[CWindow::rcDefault](#rcdefault)|Contains default window dimensions.|
+|[`CWindow::m_hWnd`](#m_hwnd)|The handle to the window associated with the `CWindow` object.|
+|[`CWindow::rcDefault`](#rcdefault)|Contains default window dimensions.|
## Remarks
`CWindow` provides the base functionality for manipulating a window in ATL. Many of the `CWindow` methods simply wrap one of the Win32 API functions. For example, compare the prototypes for `CWindow::ShowWindow` and `ShowWindow`:
-|CWindow method|Win32 function|
-|--------------------|--------------------|
-|**BOOL ShowWindow( int** `nCmdShow` **);**|**BOOL ShowWindow( HWND** `hWnd` **, int** `nCmdShow` **);**|
+| CWindow method | Win32 function |
+|--|--|
+| `BOOL ShowWindow( int nCmdShow );` | `BOOL ShowWindow( HWND hWnd , int nCmdShow );` |
`CWindow::ShowWindow` calls the Win32 function `ShowWindow` by passing `CWindow::m_hWnd` as the first parameter. Every `CWindow` method that directly wraps a Win32 function passes the `m_hWnd` member; therefore, much of the `CWindow` documentation will refer you to the Windows SDK.
> [!NOTE]
> Not every window-related Win32 function is wrapped by `CWindow`, and not every `CWindow` method wraps a Win32 function.
-`CWindow::m_hWnd` stores the HWND that identifies a window. An HWND is attached to your object when you:
+`CWindow::m_hWnd` stores the `HWND` that identifies a window. An `HWND` is attached to your object when you:
-- Specify an HWND in `CWindow`'s constructor.
+- Specify an `HWND` in `CWindow`'s constructor.
- Call `CWindow::Attach`.
-- Use `CWindow`'s **operator =**.
+- Use `CWindow`'s **`operator =`**.
- Create or subclass a window using one of the following classes derived from `CWindow`:
-[CWindowImpl](../../atl/reference/cwindowimpl-class.md) Allows you to create a new window or subclass an existing window.
+[`CWindowImpl`](../../atl/reference/cwindowimpl-class.md) Allows you to create a new window or subclass an existing window.
-[CContainedWindow](../../atl/reference/ccontainedwindowt-class.md) Implements a window contained within another object. You can create a new window or subclass an existing window.
+[`CContainedWindow`](../../atl/reference/ccontainedwindowt-class.md) Implements a window contained within another object. You can create a new window or subclass an existing window.
-[CDialogImpl](../../atl/reference/cdialogimpl-class.md) Allows you to create a modal or modeless dialog box.
+[`CDialogImpl`](../../atl/reference/cdialogimpl-class.md) Allows you to create a modal or modeless dialog box.
For more information about windows, see [Windows](/windows/win32/winmsg/windows) and subsequent topics in the Windows SDK. For more information about using windows in ATL, see the article [ATL Window Classes](../../atl/atl-window-classes.md).
## Requirements
-**Header:** atlwin.h
+**Header:** `atlwin.h`
-## CWindow::ArrangeIconicWindows
+## `CWindow::ArrangeIconicWindows`
Arranges all minimized child windows.
@@ -233,11 +233,11 @@ UINT ArrangeIconicWindows() throw();
### Remarks
-See [ArrangeIconicWindows](/windows/win32/api/winuser/nf-winuser-arrangeiconicwindows) in the Windows SDK.
+See [`ArrangeIconicWindows`](/windows/win32/api/winuser/nf-winuser-arrangeiconicwindows) in the Windows SDK.
-## CWindow::Attach
+## `CWindow::Attach`
-Attaches the window identified by *hWndNew* to the `CWindow` object.
+Attaches the window identified by *`hWndNew`* to the `CWindow` object.
```cpp
void Attach(HWND hWndNew) throw();
@@ -245,14 +245,14 @@ void Attach(HWND hWndNew) throw();
### Parameters
-*hWndNew*
+*`hWndNew`*\
[in] The handle to a window.
### Example
[!code-cpp[NVC_ATL_Windowing#1](../../atl/codesnippet/cpp/cwindow-class_1.cpp)]
-## CWindow::BeginPaint
+## `CWindow::BeginPaint`
Prepares the window for painting.
@@ -262,13 +262,13 @@ HDC BeginPaint(LPPAINTSTRUCT lpPaint) throw();
### Remarks
-See [BeginPaint](/windows/win32/api/winuser/nf-winuser-beginpaint) in the Windows SDK.
+See [`BeginPaint`](/windows/win32/api/winuser/nf-winuser-beginpaint) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#2](../../atl/codesnippet/cpp/cwindow-class_2.cpp)]
-## CWindow::BringWindowToTop
+## `CWindow::BringWindowToTop`
Brings the window to the top of the Z order.
@@ -278,13 +278,13 @@ BOOL BringWindowToTop() throw();
### Remarks
-See [BringWindowToTop](/windows/win32/api/winuser/nf-winuser-bringwindowtotop) in the Windows SDK.
+See [`BringWindowToTop`](/windows/win32/api/winuser/nf-winuser-bringwindowtotop) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#3](../../atl/codesnippet/cpp/cwindow-class_3.cpp)]
-## CWindow::CenterWindow
+## `CWindow::CenterWindow`
Centers the window against a given window.
@@ -294,18 +294,18 @@ BOOL CenterWindow(HWND hWndCenter = NULL) throw();
### Parameters
-*hWndCenter*
-[in] The handle to the window against which to center. If this parameter is NULL (the default value), the method will set *hWndCenter* to the window's parent window if it is a child window. Otherwise, it will set *hWndCenter* to the window's owner window.
+*`hWndCenter`*\
+[in] The handle to the window against which to center. If this parameter is `NULL` (the default value), the method will set *`hWndCenter`* to the window's parent window if it's a child window. Otherwise, it will set *`hWndCenter`* to the window's owner window.
### Return Value
-TRUE if the window is successfully centered; otherwise, FALSE.
+`TRUE` if the window is successfully centered; otherwise, `FALSE`.
### Example
[!code-cpp[NVC_ATL_Windowing#4](../../atl/codesnippet/cpp/cwindow-class_4.cpp)]
-## CWindow::ChangeClipboardChain
+## `CWindow::ChangeClipboardChain`
Removes the window from the chain of Clipboard viewers.
@@ -315,9 +315,9 @@ BOOL ChangeClipboardChain(HWND hWndNewNext) throw();
### Remarks
-See [ChangeClipboardChain](/windows/win32/api/winuser/nf-winuser-changeclipboardchain) in the Windows SDK.
+See [`ChangeClipboardChain`](/windows/win32/api/winuser/nf-winuser-changeclipboardchain) in the Windows SDK.
-## CWindow::CheckDlgButton
+## `CWindow::CheckDlgButton`
Changes the check state of the specified button.
@@ -327,9 +327,9 @@ BOOL CheckDlgButton(int nIDButton, UINT nCheck) throw();
### Remarks
-See [CheckDlgButton](/windows/win32/api/winuser/nf-winuser-checkdlgbutton) in the Windows SDK.
+See [`CheckDlgButton`](/windows/win32/api/winuser/nf-winuser-checkdlgbutton) in the Windows SDK.
-## CWindow::CheckRadioButton
+## `CWindow::CheckRadioButton`
Checks the specified radio button.
@@ -342,9 +342,9 @@ BOOL CheckRadioButton(
### Remarks
-See [CheckRadioButton](/windows/win32/api/winuser/nf-winuser-checkradiobutton) in the Windows SDK.
+See [`CheckRadioButton`](/windows/win32/api/winuser/nf-winuser-checkradiobutton) in the Windows SDK.
-## CWindow::ChildWindowFromPoint
+## `CWindow::ChildWindowFromPoint`
Retrieves the child window containing the specified point.
@@ -354,9 +354,9 @@ HWND ChildWindowFromPoint(POINT point) const throw();
### Remarks
-See [ChildWindowFromPoint](/windows/win32/api/winuser/nf-winuser-childwindowfrompoint) in the Windows SDK.
+See [`ChildWindowFromPoint`](/windows/win32/api/winuser/nf-winuser-childwindowfrompoint) in the Windows SDK.
-## CWindow::ChildWindowFromPointEx
+## `CWindow::ChildWindowFromPointEx`
Retrieves a particular type of child window containing the specified point.
@@ -366,9 +366,9 @@ HWND ChildWindowFromPoint(POINT point, UINT uFlags) const throw();
### Remarks
-See [ChildWindowFromPointEx](/windows/win32/api/winuser/nf-winuser-childwindowfrompointex) in the Windows SDK.
+See [`ChildWindowFromPointEx`](/windows/win32/api/winuser/nf-winuser-childwindowfrompointex) in the Windows SDK.
-## CWindow::ClientToScreen
+## `CWindow::ClientToScreen`
Converts client coordinates to screen coordinates.
@@ -379,11 +379,11 @@ BOOL ClientToScreen(LPRECT lpRect) const throw();
### Remarks
-See [ClientToScreen](/windows/win32/api/winuser/nf-winuser-clienttoscreen) in the Windows SDK.
+See [`ClientToScreen`](/windows/win32/api/winuser/nf-winuser-clienttoscreen) in the Windows SDK.
-The second version of this method allows you to convert the coordinates of a [RECT](/windows/win32/api/windef/ns-windef-rect) structure.
+The second version of this method allows you to convert the coordinates of a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure.
-## CWindow::Create
+## `CWindow::Create`
Creates a window.
@@ -401,43 +401,43 @@ HWND Create(
### Parameters
-*lpstrWndClass*
+*`lpstrWndClass`*\
[in] A pointer to the window's class.
-*hWndParent*
+*`hWndParent`*\
[in] The handle to the parent or owner window.
-*rect*
-[in] A variable of type [_U_RECT](../../atl/reference/u-rect-class.md) specifying the position of the window. The default value is NULL. When this parameter is NULL, the value of `CWindow::rcDefault` is used.
+*`rect`*\
+[in] A variable of type [`_U_RECT`](../../atl/reference/u-rect-class.md) specifying the position of the window. The default value is `NULL`. When this parameter is `NULL`, the value of `CWindow::rcDefault` is used.
-*szWindowName*
-[in] Specifies the name of the window. The default value is NULL.
+*`szWindowName`*\
+[in] Specifies the name of the window. The default value is `NULL`.
-*dwStyle*
-[in] The style of the window. The default value is 0, meaning no style is specified. For a list of possible values, see [CreateWindow](/windows/win32/api/winuser/nf-winuser-createwindoww) in the Windows SDK.
+*`dwStyle`*\
+[in] The style of the window. The default value is 0, meaning no style is specified. For a list of possible values, see [`CreateWindow`](/windows/win32/api/winuser/nf-winuser-createwindoww) in the Windows SDK.
-*dwExStyle*
-[in] The extended window style. The default value is 0, meaning no extended style is specified. For a list of possible values, see [CreateWindowEx](/windows/win32/api/winuser/nf-winuser-createwindowexw) in the Windows SDK.
+*`dwExStyle`*\
+[in] The extended window style. The default value is 0, meaning no extended style is specified. For a list of possible values, see [`CreateWindowEx`](/windows/win32/api/winuser/nf-winuser-createwindowexw) in the Windows SDK.
-*MenuOrID*
-[in] A variable of type [_U_MENUorID](../../atl/reference/u-menuorid-class.md) specifying a handle to a menu or a window identifier. The default value is 0U.
+*`MenuOrID`*\
+[in] A variable of type [`_U_MENUorID`](../../atl/reference/u-menuorid-class.md) specifying a handle to a menu or a window identifier. The default value is `0U`.
-*lpCreateParam*
-A pointer to the window-creation data contained in a [CREATESTRUCT](/windows/win32/api/winuser/ns-winuser-createstructw) structure.
+*`lpCreateParam`*\
+A pointer to the window-creation data contained in a [`CREATESTRUCT`](/windows/win32/api/winuser/ns-winuser-createstructw) structure.
### Return Value
-If successful, the handle to the newly created window, specified by [m_hWnd](#m_hwnd). Otherwise, NULL.
+If successful, the handle to the newly created window, specified by [`m_hWnd`](#m_hwnd). Otherwise, `NULL`.
### Remarks
`CWindow::rcDefault` is defined as `__declspec(selectany) RECT CWindow::rcDefault = {CW_USEDEFAULT, CW_USEDEFAULT, 0, 0};`.
-See [CreateWindow](/windows/win32/api/winuser/nf-winuser-createwindoww) in the Windows SDK for more information.
+See [`CreateWindow`](/windows/win32/api/winuser/nf-winuser-createwindoww) in the Windows SDK for more information.
-**Note** If 0 is used as the value for the *MenuOrID* parameter, it must be specified as 0U (the default value) to avoid a compiler error.
+**Note** If 0 is used as the value for the *`MenuOrID`* parameter, it must be specified as `0U` (the default value) to avoid a compiler error.
-## CWindow::CreateCaret
+## `CWindow::CreateCaret`
Creates a new shape for the system caret.
@@ -447,9 +447,9 @@ BOOL CreateCaret(HBITMAP pBitmap) throw();
### Remarks
-See [CreateCaret](/windows/win32/api/winuser/nf-winuser-createcaret) in the Windows SDK.
+See [`CreateCaret`](/windows/win32/api/winuser/nf-winuser-createcaret) in the Windows SDK.
-## CWindow::CreateGrayCaret
+## `CWindow::CreateGrayCaret`
Creates a gray rectangle for the system caret.
@@ -459,11 +459,11 @@ BOOL CreateGrayCaret(int nWidth, int nHeight) throw();
### Remarks
-See [CreateCaret](/windows/win32/api/winuser/nf-winuser-createcaret) in the Windows SDK.
+See [`CreateCaret`](/windows/win32/api/winuser/nf-winuser-createcaret) in the Windows SDK.
-Passes (HBITMAP) 1 for the bitmap handle parameter to the Win32 function.
+Passes `(HBITMAP) 1` for the bitmap handle parameter to the Win32 function.
-## CWindow::CreateSolidCaret
+## `CWindow::CreateSolidCaret`
Creates a solid rectangle for the system caret.
@@ -473,11 +473,11 @@ BOOL CreateSolidCaret(int nWidth, int nHeight) throw();
### Remarks
-See [CreateCaret](/windows/win32/api/winuser/nf-winuser-createcaret) in the Windows SDK.
+See [`CreateCaret`](/windows/win32/api/winuser/nf-winuser-createcaret) in the Windows SDK.
-Passes (HBITMAP) 0 for the bitmap handle parameter to the Win32 function.
+Passes `(HBITMAP) 0` for the bitmap handle parameter to the Win32 function.
-## CWindow::CWindow
+## `CWindow::CWindow`
The constructor.
@@ -487,17 +487,17 @@ CWindow(HWND hWnd = NULL) throw();
### Parameters
-*hWnd*
+*`hWnd`*\
[in] The handle to a window.
### Remarks
-Initializes the [m_hWnd](#m_hwnd) member to *hWnd*, which by default is NULL.
+Initializes the [`m_hWnd`](#m_hwnd) member to *`hWnd`*, which by default is `NULL`.
> [!NOTE]
-> `CWindow::CWindow` does not create a window. Classes [CWindowImpl](../../atl/reference/cwindowimpl-class.md), [CContainedWindow](../../atl/reference/ccontainedwindowt-class.md), and [CDialogImpl](../../atl/reference/cdialogimpl-class.md) (all of which derive from `CWindow`) provide a method to create a window or dialog box, which is then assigned to `CWindow::m_hWnd`. You can also use the [CreateWindow](/windows/win32/api/winuser/nf-winuser-createwindoww) Win32 function.
+> `CWindow::CWindow` does not create a window. Classes [`CWindowImpl`](../../atl/reference/cwindowimpl-class.md), [`CContainedWindow`](../../atl/reference/ccontainedwindowt-class.md), and [`CDialogImpl`](../../atl/reference/cdialogimpl-class.md) (all of which derive from `CWindow`) provide a method to create a window or dialog box, which is then assigned to `CWindow::m_hWnd`. You can also use the [`CreateWindow`](/windows/win32/api/winuser/nf-winuser-createwindoww) Win32 function.
-## CWindow::DeferWindowPos
+## `CWindow::DeferWindowPos`
Updates the specified multiple-window-position structure for the specified window.
@@ -514,11 +514,11 @@ HDWP DeferWindowPos(
### Remarks
-See [DeferWindowPos](/windows/win32/api/winuser/nf-winuser-deferwindowpos) in the Windows SDK.
+See [`DeferWindowPos`](/windows/win32/api/winuser/nf-winuser-deferwindowpos) in the Windows SDK.
-## CWindow::DestroyWindow
+## `CWindow::DestroyWindow`
-Destroys the window associated with the `CWindow` object and sets [m_hWnd](#m_hwnd) to NULL.
+Destroys the window associated with the `CWindow` object and sets [`m_hWnd`](#m_hwnd) to `NULL`.
```
BOOL DestroyWindow() throw();
@@ -526,17 +526,17 @@ BOOL DestroyWindow() throw();
### Remarks
-See [DestroyWindow](/windows/win32/api/winuser/nf-winuser-destroywindow) in the Windows SDK.
+See [`DestroyWindow`](/windows/win32/api/winuser/nf-winuser-destroywindow) in the Windows SDK.
-It does not destroy the `CWindow` object itself.
+It doesn't destroy the `CWindow` object itself.
### Example
[!code-cpp[NVC_ATL_Windowing#5](../../atl/codesnippet/cpp/cwindow-class_5.cpp)]
-## CWindow::Detach
+## `CWindow::Detach`
-Detaches [m_hWnd](#m_hwnd) from the `CWindow` object and sets `m_hWnd` to NULL.
+Detaches [`m_hWnd`](#m_hwnd) from the `CWindow` object and sets `m_hWnd` to `NULL`.
```
HWND Detach() throw();
@@ -544,13 +544,13 @@ HWND Detach() throw();
### Return Value
-The HWND associated with the `CWindow` object.
+The `HWND` associated with the `CWindow` object.
### Example
[!code-cpp[NVC_ATL_Windowing#6](../../atl/codesnippet/cpp/cwindow-class_6.cpp)]
-## CWindow::DlgDirList
+## `CWindow::DlgDirList`
Fills a list box with the names of all files matching a specified path or file name.
@@ -564,9 +564,9 @@ int DlgDirList(
### Remarks
-See [DlgDirList](/windows/win32/api/winuser/nf-winuser-dlgdirlistw) in the Windows SDK.
+See [`DlgDirList`](/windows/win32/api/winuser/nf-winuser-dlgdirlistw) in the Windows SDK.
-## CWindow::DlgDirListComboBox
+## `CWindow::DlgDirListComboBox`
Fills a combo box with the names of all files matching a specified path or file name.
@@ -580,9 +580,9 @@ int DlgDirListComboBox(
### Remarks
-See [DlgDirListComboBox](/windows/win32/api/winuser/nf-winuser-dlgdirlistcomboboxw) in the Windows SDK.
+See [`DlgDirListComboBox`](/windows/win32/api/winuser/nf-winuser-dlgdirlistcomboboxw) in the Windows SDK.
-## CWindow::DlgDirSelect
+## `CWindow::DlgDirSelect`
Retrieves the current selection from a list box.
@@ -595,9 +595,9 @@ BOOL DlgDirSelect(
### Remarks
-See [DlgDirSelectEx](/windows/win32/api/winuser/nf-winuser-dlgdirselectexw) in the Windows SDK.
+See [`DlgDirSelectEx`](/windows/win32/api/winuser/nf-winuser-dlgdirselectexw) in the Windows SDK.
-## CWindow::DlgDirSelectComboBox
+## `CWindow::DlgDirSelectComboBox`
Retrieves the current selection from a combo box.
@@ -610,9 +610,9 @@ BOOL DlgDirSelectComboBox(
### Remarks
-See [DlgDirSelectComboBoxEx](/windows/win32/api/winuser/nf-winuser-dlgdirselectcomboboxexw) in the Windows SDK.
+See [`DlgDirSelectComboBoxEx`](/windows/win32/api/winuser/nf-winuser-dlgdirselectcomboboxexw) in the Windows SDK.
-## CWindow::DragAcceptFiles
+## `CWindow::DragAcceptFiles`
Registers whether the window accepts dragged files.
@@ -622,9 +622,9 @@ void DragAcceptFiles(BOOL bAccept = TRUE);
### Remarks
-See [DragAcceptFiles](/windows/win32/api/shellapi/nf-shellapi-dragacceptfiles) in the Windows SDK.
+See [`DragAcceptFiles`](/windows/win32/api/shellapi/nf-shellapi-dragacceptfiles) in the Windows SDK.
-## CWindow::DrawMenuBar
+## `CWindow::DrawMenuBar`
Redraws the window's menu bar.
@@ -634,9 +634,9 @@ BOOL DrawMenuBar() throw();
### Remarks
-See [DrawMenuBar](/windows/win32/api/winuser/nf-winuser-drawmenubar) in the Windows SDK.
+See [`DrawMenuBar`](/windows/win32/api/winuser/nf-winuser-drawmenubar) in the Windows SDK.
-## CWindow::EnableScrollBar
+## `CWindow::EnableScrollBar`
Enables or disables the scroll bar arrows.
@@ -646,9 +646,9 @@ BOOL EnableScrollBar(UINT uSBFlags, UINT uArrowFlags = ESB_ENABLE_BOTH) throw();
### Remarks
-See [EnableScrollBar](/windows/win32/api/winuser/nf-winuser-enablescrollbar) in the Windows SDK.
+See [`EnableScrollBar`](/windows/win32/api/winuser/nf-winuser-enablescrollbar) in the Windows SDK.
-## CWindow::EnableWindow
+## `CWindow::EnableWindow`
Enables or disables input.
@@ -658,13 +658,13 @@ BOOL EnableWindow(BOOL bEnable = TRUE) throw();
### Remarks
-See [EnableWindow](/windows/win32/api/winuser/nf-winuser-enablewindow) in the Windows SDK.
+See [`EnableWindow`](/windows/win32/api/winuser/nf-winuser-enablewindow) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#7](../../atl/codesnippet/cpp/cwindow-class_7.cpp)]
-## CWindow::EndPaint
+## `CWindow::EndPaint`
Marks the end of painting.
@@ -674,13 +674,13 @@ void EndPaint(LPPAINTSTRUCT lpPaint) throw();
### Remarks
-See [EndPaint](/windows/win32/api/winuser/nf-winuser-endpaint) in the Windows SDK.
+See [`EndPaint`](/windows/win32/api/winuser/nf-winuser-endpaint) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#2](../../atl/codesnippet/cpp/cwindow-class_2.cpp)]
-## CWindow::FlashWindow
+## `CWindow::FlashWindow`
Flashes the window once.
@@ -690,9 +690,9 @@ BOOL FlashWindow(BOOL bInvert) throw();
### Remarks
-See [FlashWindow](/windows/win32/api/winuser/nf-winuser-flashwindow) in the Windows SDK.
+See [`FlashWindow`](/windows/win32/api/winuser/nf-winuser-flashwindow) in the Windows SDK.
-## CWindow::GetClientRect
+## `CWindow::GetClientRect`
Retrieves the coordinates of the client area.
@@ -702,13 +702,13 @@ BOOL GetClientRect(LPRECT lpRect) const throw();
### Remarks
-See [GetClientRect](/windows/win32/api/winuser/nf-winuser-getclientrect) in the Windows SDK.
+See [`GetClientRect`](/windows/win32/api/winuser/nf-winuser-getclientrect) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#8](../../atl/codesnippet/cpp/cwindow-class_8.cpp)]
-## CWindow::GetDC
+## `CWindow::GetDC`
Retrieves a device context for the client area.
@@ -718,13 +718,13 @@ HDC GetDC() throw();
### Remarks
-See [GetDC](/windows/win32/api/winuser/nf-winuser-getdc) in the Windows SDK.
+See [`GetDC`](/windows/win32/api/winuser/nf-winuser-getdc) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#9](../../atl/codesnippet/cpp/cwindow-class_9.cpp)]
-## CWindow::GetDCEx
+## `CWindow::GetDCEx`
Retrieves a device context for the client area and allows clipping options.
@@ -734,9 +734,9 @@ HDC GetDCEx(HRGN hRgnClip, DWORD flags) throw();
### Remarks
-See [GetDCEx](/windows/win32/api/winuser/nf-winuser-getdcex) in the Windows SDK.
+See [`GetDCEx`](/windows/win32/api/winuser/nf-winuser-getdcex) in the Windows SDK.
-## CWindow::GetDescendantWindow
+## `CWindow::GetDescendantWindow`
Finds the descendant window specified by the given identifier.
@@ -746,7 +746,7 @@ HWND GetDescendantWindow(int nID) const throw();
### Parameters
-*nID*
+*`nID`*\
[in] The identifier of the descendant window to be retrieved.
### Return Value
@@ -757,7 +757,7 @@ The handle to a descendant window.
`GetDescendantWindow` searches the entire tree of child windows, not only the windows that are immediate children.
-## CWindow::GetDlgControl
+## `CWindow::GetDlgControl`
Call this function to get a pointer to an interface of an ActiveX control that is hosted by a composite control or a control-hosting dialog.
@@ -770,24 +770,24 @@ HRESULT GetDlgControl(
### Parameters
-*nID*
+*`nID`*\
[in] The resource ID of the control being retrieved.
-*iid*
+*`iid`*\
[in] The ID of the interface you would like to get from the control.
-*ppCtrl*
+*`ppCtrl`*\
[out] The pointer to the interface.
### Return Value
-Returns S_OK on success or any valid error HRESULT. For example, the function returns E_FAIL if the control specified by *nID* cannot be found and it returns E_NOINTERFACE if the control can be found, but it doesn't support the interface specified by *iid*.
+Returns `S_OK` on success or any valid error `HRESULT`. For example, the function returns `E_FAIL` if the control specified by *`nID`* can't be found and it returns `E_NOINTERFACE` if the control can be found, but it doesn't support the interface specified by *`iid`*.
### Remarks
Using this pointer, you can call methods on the interface.
-## CWindow::GetDlgCtrlID
+## `CWindow::GetDlgCtrlID`
Retrieves the window's identifier (for child windows only).
@@ -797,9 +797,9 @@ int GetDlgCtrlID() const throw();
### Remarks
-See [GetDlgCtrlID](/windows/win32/api/winuser/nf-winuser-getdlgctrlid) in the Windows SDK.
+See [`GetDlgCtrlID`](/windows/win32/api/winuser/nf-winuser-getdlgctrlid) in the Windows SDK.
-## CWindow::GetDlgHost
+## `CWindow::GetDlgHost`
Retrieves a pointer to an interface to the ATL Control hosting container.
@@ -812,24 +812,24 @@ HRESULT GetDlgHost(
### Parameters
-*nID*
+*`nID`*\
[in] The resource ID of the control being retrieved.
-*iid*
+*`iid`*\
[in] The ID of the interface you would like to get from the control.
-*ppHost*
+*`ppHost`*\
[out] The pointer to the interface.
### Return Value
-Returns S_OK if the window specified by *iid* is a Control Container, and the requested interface could be retrieved. Returns E_FAIL if the window is not a Control Container, or if the interface requested could not be retrieved. If a window with the specified ID could not be found, then the return value is equal to HRESULT_FROM_WIN32(ERROR_CONTROL_ID_NOT_FOUND).
+Returns `S_OK` if the window specified by *`iid`* is a Control Container, and the requested interface could be retrieved. Returns `E_FAIL` if the window isn't a Control Container, or if the interface requested couldn't be retrieved. If a window with the specified ID couldn't be found, then the return value is equal to `HRESULT_FROM_WIN32(ERROR_CONTROL_ID_NOT_FOUND)`.
### Remarks
Using this pointer, you can call methods on the interface.
-## CWindow::GetDlgItem
+## `CWindow::GetDlgItem`
Retrieves the specified child window.
@@ -841,7 +841,7 @@ HWND GetDlgItem(int nID) const throw();
See [GetDlgItem](/windows/win32/api/winuser/nf-winuser-getdlgitem) in the Windows SDK.
-## CWindow::GetDlgItemInt
+## `CWindow::GetDlgItemInt`
Translates a control's text to an integer.
@@ -854,9 +854,9 @@ UINT GetDlgItemInt(
### Remarks
-See [GetDlgItemInt](/windows/win32/api/winuser/nf-winuser-getdlgitemint) in the Windows SDK.
+See [`GetDlgItemInt`](/windows/win32/api/winuser/nf-winuser-getdlgitemint) in the Windows SDK.
-## CWindow::GetDlgItemText
+## `CWindow::GetDlgItemText`
Retrieves a control's text.
@@ -873,13 +873,11 @@ BOOL GetDlgItemText(
### Remarks
-See [GetDlgItemText](/windows/win32/api/winuser/nf-winuser-getdlgitemtextw) in the Windows SDK.
+For more information, see [`GetDlgItemText`](/windows/win32/api/winuser/nf-winuser-getdlgitemtextw) in the Windows SDK.
-### Remarks
-
-The second version of this method allows you to copy the control's text to a BSTR. This version returns TRUE if the text is successfully copied; otherwise, FALSE.
+The second version of this method allows you to copy the control's text to a `BSTR`. This version returns `TRUE` if the text is successfully copied; otherwise, `FALSE`.
-## CWindow::GetExStyle
+## `CWindow::GetExStyle`
Retrieves the extended window styles of the window.
@@ -893,15 +891,15 @@ The window's extended styles.
### Remarks
-To retrieve the regular window styles, call [GetStyle](#getstyle).
+To retrieve the regular window styles, call [`GetStyle`](#getstyle).
### Example
[!code-cpp[NVC_ATL_Windowing#10](../../atl/codesnippet/cpp/cwindow-class_10.cpp)]
-## CWindow::GetFont
+## `CWindow::GetFont`
-Retrieves the window's current font by sending a [WM_GETFONT](/windows/win32/winmsg/wm-getfont) message to the window.
+Retrieves the window's current font by sending a [`WM_GETFONT`](/windows/win32/winmsg/wm-getfont) message to the window.
```
HFONT GetFont() const throw();
@@ -911,9 +909,9 @@ HFONT GetFont() const throw();
A font handle.
-## CWindow::GetHotKey
+## `CWindow::GetHotKey`
-Determines the hot key associated with the window by sending a WM_GETHOTKEY message.
+Determines the hot key associated with the window by sending a `WM_GETHOTKEY` message.
```
DWORD GetHotKey() const throw();
@@ -921,9 +919,9 @@ DWORD GetHotKey() const throw();
### Return Value
-The virtual key code and modifiers for the hot key associated with the window. For a list of possible modifiers, see [WM_GETHOTKEY](/windows/win32/inputdev/wm-gethotkey) in the Windows SDK. For a list of standard virtual key codes, see Winuser.h.
+The virtual key code and modifiers for the hot key associated with the window. For a list of possible modifiers, see [`WM_GETHOTKEY`](/windows/win32/inputdev/wm-gethotkey) in the Windows SDK. For a list of standard virtual key codes, see `Winuser.h`.
-## CWindow::GetIcon
+## `CWindow::GetIcon`
Retrieves the handle to the window's large or small icon.
@@ -933,8 +931,8 @@ HICON GetIcon(BOOL bBigIcon = TRUE) const;
### Parameters
-*bBigIcon*
-[in] If TRUE (the default value) the method returns the large icon. Otherwise, it returns the small icon.
+*`bBigIcon`*\
+[in] If `TRUE` (the default value) the method returns the large icon. Otherwise, it returns the small icon.
### Return Value
@@ -942,9 +940,9 @@ An icon handle.
### Remarks
-`GetIcon` sends a [WM_GETICON](/windows/win32/winmsg/wm-geticon) message to the window.
+`GetIcon` sends a [`WM_GETICON`](/windows/win32/winmsg/wm-geticon) message to the window.
-## CWindow::GetLastActivePopup
+## `CWindow::GetLastActivePopup`
Retrieves the most recently active pop-up window.
@@ -954,9 +952,9 @@ HWND GetLastActivePopup() const throw();
### Remarks
-See [GetLastActivePopup](/windows/win32/api/winuser/nf-winuser-getlastactivepopup) in the Windows SDK.
+See [`GetLastActivePopup`](/windows/win32/api/winuser/nf-winuser-getlastactivepopup) in the Windows SDK.
-## CWindow::GetMenu
+## `CWindow::GetMenu`
Retrieves the window's menu.
@@ -966,9 +964,9 @@ HMENU GetMenu() const throw();
### Remarks
-See [GetMenu](/windows/win32/api/winuser/nf-winuser-getmenu) in the Windows SDK.
+See [`GetMenu`](/windows/win32/api/winuser/nf-winuser-getmenu) in the Windows SDK.
-## CWindow::GetNextDlgGroupItem
+## `CWindow::GetNextDlgGroupItem`
Retrieves the previous or next control within a group of controls.
@@ -978,11 +976,11 @@ HWND GetNextDlgGroupItem(HWND hWndCtl, BOOL bPrevious = FALSE) const throw();
### Remarks
-See [GetNextDlgGroupItem](/windows/win32/api/winuser/nf-winuser-getnextdlggroupitem) in the Windows SDK.
+See [`GetNextDlgGroupItem`](/windows/win32/api/winuser/nf-winuser-getnextdlggroupitem) in the Windows SDK.
-## CWindow::GetNextDlgTabItem
+## `CWindow::GetNextDlgTabItem`
-Retrieves the previous or next control having the WS_TABSTOP style.
+Retrieves the previous or next control having the `WS_TABSTOP` style.
```
HWND GetNextDlgTabItem(HWND hWndCtl, BOOL bPrevious = FALSE) const throw();
@@ -990,9 +988,9 @@ HWND GetNextDlgTabItem(HWND hWndCtl, BOOL bPrevious = FALSE) const throw();
### Remarks
-See [GetNextDlgTabItem](/windows/win32/api/winuser/nf-winuser-getnextdlgtabitem) in the Windows SDK.
+See [`GetNextDlgTabItem`](/windows/win32/api/winuser/nf-winuser-getnextdlgtabitem) in the Windows SDK.
-## CWindow::GetParent
+## `CWindow::GetParent`
Retrieves the immediate parent window.
@@ -1002,13 +1000,13 @@ HWND GetParent() const throw();
### Remarks
-See [GetParent](/windows/win32/api/winuser/nf-winuser-getparent) in the Windows SDK.
+See [`GetParent`](/windows/win32/api/winuser/nf-winuser-getparent) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#11](../../atl/codesnippet/cpp/cwindow-class_11.cpp)]
-## CWindow::GetScrollInfo
+## `CWindow::GetScrollInfo`
Retrieves the parameters of a scroll bar.
@@ -1018,9 +1016,9 @@ BOOL GetScrollInfo(int nBar, LPSCROLLINFO lpScrollInfo) throw();
### Remarks
-See [GetScrollInfo](/windows/win32/api/winuser/nf-winuser-getscrollinfo) in the Windows SDK.
+See [`GetScrollInfo`](/windows/win32/api/winuser/nf-winuser-getscrollinfo) in the Windows SDK.
-## CWindow::GetScrollPos
+## `CWindow::GetScrollPos`
Retrieves the position of the scroll box.
@@ -1030,9 +1028,9 @@ int GetScrollPos(int nBar) const throw();
### Remarks
-See [GetScrollPos](/windows/win32/api/winuser/nf-winuser-getscrollpos) in the Windows SDK.
+See [`GetScrollPos`](/windows/win32/api/winuser/nf-winuser-getscrollpos) in the Windows SDK.
-## CWindow::GetScrollRange
+## `CWindow::GetScrollRange`
Retrieves the scroll bar range.
@@ -1045,9 +1043,9 @@ BOOL GetScrollRange(
### Remarks
-See [GetScrollRange](/windows/win32/api/winuser/nf-winuser-getscrollrange) in the Windows SDK.
+See [`GetScrollRange`](/windows/win32/api/winuser/nf-winuser-getscrollrange) in the Windows SDK.
-## CWindow::GetStyle
+## `CWindow::GetStyle`
Retrieves the window styles of the window.
@@ -1061,13 +1059,13 @@ The window's styles.
### Remarks
-To retrieve the extended window styles, call [GetExStyle](#getexstyle).
+To retrieve the extended window styles, call [`GetExStyle`](#getexstyle).
### Example
[!code-cpp[NVC_ATL_Windowing#12](../../atl/codesnippet/cpp/cwindow-class_12.cpp)]
-## CWindow::GetSystemMenu
+## `CWindow::GetSystemMenu`
Creates a copy of the system menu for modification.
@@ -1077,9 +1075,9 @@ HMENU GetSystemMenu(BOOL bRevert) const throw();
### Remarks
-See [GetSystemMenu](/windows/win32/api/winuser/nf-winuser-getsystemmenu) in the Windows SDK.
+See [`GetSystemMenu`](/windows/win32/api/winuser/nf-winuser-getsystemmenu) in the Windows SDK.
-## CWindow::GetTopLevelParent
+## `CWindow::GetTopLevelParent`
Retrieves the window's top-level parent window.
@@ -1091,7 +1089,7 @@ HWND GetTopLevelParent() const throw();
The handle to the top-level parent window.
-## CWindow::GetTopLevelWindow
+## `CWindow::GetTopLevelWindow`
Retrieves the window's top-level parent or owner window.
@@ -1103,7 +1101,7 @@ HWND GetTopLevelWindow() const throw();
The handle to the top-level owner window.
-## CWindow::GetTopWindow
+## `CWindow::GetTopWindow`
Retrieves the top-level child window.
@@ -1113,13 +1111,13 @@ HWND GetTopWindow() const throw();
### Remarks
-See [GetTopWindow](/windows/win32/api/winuser/nf-winuser-gettopwindow) in the Windows SDK.
+See [`GetTopWindow`](/windows/win32/api/winuser/nf-winuser-gettopwindow) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#13](../../atl/codesnippet/cpp/cwindow-class_13.cpp)]
-## CWindow::GetUpdateRect
+## `CWindow::GetUpdateRect`
Retrieves the coordinates of the smallest rectangle that completely encloses the update region.
@@ -1129,9 +1127,9 @@ BOOL GetUpdateRect(LPRECT lpRect, BOOL bErase = FALSE) throw();
### Remarks
-See [GetUpdateRect](/windows/win32/api/winuser/nf-winuser-getupdaterect) in the Windows SDK.
+See [`GetUpdateRect`](/windows/win32/api/winuser/nf-winuser-getupdaterect) in the Windows SDK.
-## CWindow::GetUpdateRgn
+## `CWindow::GetUpdateRgn`
Retrieves the update region and copies it into a specified region.
@@ -1141,9 +1139,9 @@ int GetUpdateRgn(HRGN hRgn, BOOL bErase = FALSE) throw();
### Remarks
-See [GetUpdateRgn](/windows/win32/api/winuser/nf-winuser-getupdatergn) in the Windows SDK.
+See [`GetUpdateRgn`](/windows/win32/api/winuser/nf-winuser-getupdatergn) in the Windows SDK.
-## CWindow::GetWindow
+## `CWindow::GetWindow`
Retrieves the specified window.
@@ -1155,7 +1153,7 @@ HWND GetWindow(UINT nCmd) const throw();
See `GetWindow` in the Windows SDK.
-## CWindow::GetWindowContextHelpId
+## `CWindow::GetWindowContextHelpId`
Retrieves the window's help context identifier.
@@ -1165,9 +1163,9 @@ DWORD GetWindowContextHelpId() const throw();
### Remarks
-See [GetWindowContextHelpId](/windows/win32/api/winuser/nf-winuser-getwindowcontexthelpid) in the Windows SDK.
+See [`GetWindowContextHelpId`](/windows/win32/api/winuser/nf-winuser-getwindowcontexthelpid) in the Windows SDK.
-## CWindow::GetWindowDC
+## `CWindow::GetWindowDC`
Retrieves a device context for the entire window.
@@ -1177,13 +1175,13 @@ HDC GetWindowDC() throw();
### Remarks
-See [GetWindowDC](/windows/win32/api/winuser/nf-winuser-getwindowdc) in the Windows SDK.
+See [`GetWindowDC`](/windows/win32/api/winuser/nf-winuser-getwindowdc) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#14](../../atl/codesnippet/cpp/cwindow-class_14.cpp)]
-## CWindow::GetWindowLong
+## `CWindow::GetWindowLong`
Retrieves a 32-bit value at a specified offset into the extra window memory.
@@ -1193,12 +1191,12 @@ LONG GetWindowLong(int nIndex) const throw();
### Remarks
-See [GetWindowLong](/windows/win32/api/winuser/nf-winuser-getwindowlongw) in the Windows SDK.
+See [`GetWindowLong`](/windows/win32/api/winuser/nf-winuser-getwindowlongw) in the Windows SDK.
> [!NOTE]
-> To write code that is compatible with both 32-bit and 64-bit versions of Windows, use [CWindow::GetWindowLongPtr](#getwindowlongptr).
+> To write code that is compatible with both 32-bit and 64-bit versions of Windows, use [`CWindow::GetWindowLongPtr`](#getwindowlongptr).
-## CWindow::GetWindowLongPtr
+## `CWindow::GetWindowLongPtr`
Retrieves information about the specified window, including a value at a specified offset into the extra window memory.
@@ -1208,18 +1206,16 @@ LONG_PTR GetWindowLongPtr(int nIndex) const throw();
### Remarks
-See [GetWindowLongPtr](/windows/win32/api/winuser/nf-winuser-getwindowlongptrw) in the Windows SDK.
-
-### Remarks
+For more information, see [`GetWindowLongPtr`](/windows/win32/api/winuser/nf-winuser-getwindowlongptrw) in the Windows SDK.
-If you are retrieving a pointer or a handle, this function supersedes the `CWindow::GetWindowLong` method.
+If you're retrieving a pointer or a handle, this function supersedes the `CWindow::GetWindowLong` method.
> [!NOTE]
> Pointers and handles are 32 bits on 32-bit Windows and 64 bits on 64-bit Windows.
To write code that is compatible with both 32-bit and 64-bit versions of Windows, use `CWindow::GetWindowLongPtr`.
-## CWindow::GetWindowPlacement
+## `CWindow::GetWindowPlacement`
Retrieves the show state and positions.
@@ -1229,9 +1225,9 @@ BOOL GetWindowPlacement(WINDOWPLACEMENT FAR* lpwndpl) const throw();
### Remarks
-See [GetWindowPlacement](/windows/win32/api/winuser/nf-winuser-getwindowplacement) in the Windows SDK.
+See [`GetWindowPlacement`](/windows/win32/api/winuser/nf-winuser-getwindowplacement) in the Windows SDK.
-## CWindow::GetWindowProcessID
+## `CWindow::GetWindowProcessID`
Retrieves the identifier of the process that created the window.
@@ -1241,13 +1237,13 @@ DWORD GetWindowProcessID() throw();
### Remarks
-See [GetWindowThreadProcessID](/windows/win32/api/winuser/nf-winuser-getwindowthreadprocessid) in the Windows SDK.
+See [`GetWindowThreadProcessID`](/windows/win32/api/winuser/nf-winuser-getwindowthreadprocessid) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#15](../../atl/codesnippet/cpp/cwindow-class_15.cpp)]
-## CWindow::GetWindowRect
+## `CWindow::GetWindowRect`
Retrieves the window's bounding dimensions.
@@ -1257,9 +1253,9 @@ BOOL GetWindowRect(LPRECT lpRect) const throw();
### Remarks
-See [GetWindowRect](/windows/win32/api/winuser/nf-winuser-getwindowrect) in the Windows SDK.
+See [`GetWindowRect`](/windows/win32/api/winuser/nf-winuser-getwindowrect) in the Windows SDK.
-## CWindow::GetWindowRgn
+## `CWindow::GetWindowRgn`
Obtains a copy of the window region of a window.
@@ -1269,9 +1265,9 @@ int GetWindowRgn(HRGN hRgn) throw();
### Remarks
-See [GetWindowRgn](/windows/win32/api/winuser/nf-winuser-getwindowrgn) in the Windows SDK.
+See [`GetWindowRgn`](/windows/win32/api/winuser/nf-winuser-getwindowrgn) in the Windows SDK.
-## CWindow::GetWindowText
+## `CWindow::GetWindowText`
Retrieves the window's text.
@@ -1283,29 +1279,29 @@ int GetWindowText(CSimpleString& strText) const;
### Parameters
-*lpszStringBuf*
+*`lpszStringBuf`*\
A buffer to which to write the window text.
-*nMaxCount*
+*`nMaxCount`*\
The size of the buffer in characters; also the maximum number of characters to write.
-*bstrText*
-A BSTR in which to store the window text.
+*`bstrText`*\
+A `BSTR` in which to store the window text.
-*strText*
+*`strText`*\
A `CString` in which to store the window text.
### Return Value
-If the text is successfully copied, the return value is TRUE; otherwise, the return value is FALSE.
+If the text is successfully copied, the return value is `TRUE`; otherwise, the return value is `FALSE`.
### Remarks
-See [GetWindowText](/windows/win32/api/winuser/nf-winuser-getwindowtextw) in the Windows SDK.
+See [`GetWindowText`](/windows/win32/api/winuser/nf-winuser-getwindowtextw) in the Windows SDK.
-The second version of this method allows you to store the text in a BSTR; the third version allows you to store the result in a [CString](../../atl-mfc-shared/reference/cstringt-class.md), since `CSimpleString` is the base class of `CString`.
+The second version of this method allows you to store the text in a `BSTR`; the third version allows you to store the result in a [`CString`](../../atl-mfc-shared/reference/cstringt-class.md), since `CSimpleString` is the base class of `CString`.
-## CWindow::GetWindowTextLength
+## `CWindow::GetWindowTextLength`
Retrieves the length of the window's text.
@@ -1315,9 +1311,9 @@ int GetWindowTextLength() const throw();
### Remarks
-See [GetWindowTextLength](/windows/win32/api/winuser/nf-winuser-getwindowtextlengthw) in the Windows SDK.
+See [`GetWindowTextLength`](/windows/win32/api/winuser/nf-winuser-getwindowtextlengthw) in the Windows SDK.
-## CWindow::GetWindowThreadID
+## `CWindow::GetWindowThreadID`
Retrieves the identifier of the thread that created the specified window.
@@ -1327,13 +1323,13 @@ DWORD GetWindowThreadID() throw();
### Remarks
-See [GetWindowThreadProcessID](/windows/win32/api/winuser/nf-winuser-getwindowthreadprocessid) in the Windows SDK.
+See [`GetWindowThreadProcessID`](/windows/win32/api/winuser/nf-winuser-getwindowthreadprocessid) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#16](../../atl/codesnippet/cpp/cwindow-class_16.cpp)]
-## CWindow::GetWindowWord
+## `CWindow::GetWindowWord`
Retrieves a 16-bit value at a specified offset into the extra window memory.
@@ -1343,9 +1339,9 @@ WORD GetWindowWord(int nIndex) const throw();
### Remarks
-See [GetWindowLong](/windows/win32/api/winuser/nf-winuser-getwindowlongw) in the Windows SDK.
+See [`GetWindowLong`](/windows/win32/api/winuser/nf-winuser-getwindowlongw) in the Windows SDK.
-## CWindow::GotoDlgCtrl
+## `CWindow::GotoDlgCtrl`
Sets the keyboard focus to a control in the dialog box.
@@ -1355,9 +1351,9 @@ void GotoDlgCtrl(HWND hWndCtrl) const throw();
### Remarks
-See [WM_NEXTDLGCTL](/windows/win32/dlgbox/wm-nextdlgctl) in the Windows SDK.
+See [`WM_NEXTDLGCTL`](/windows/win32/dlgbox/wm-nextdlgctl) in the Windows SDK.
-## CWindow::HideCaret
+## `CWindow::HideCaret`
Hides the system caret.
@@ -1367,13 +1363,13 @@ BOOL HideCaret() throw();
### Remarks
-See [HideCaret](/windows/win32/api/winuser/nf-winuser-hidecaret) in the Windows SDK.
+See [`HideCaret`](/windows/win32/api/winuser/nf-winuser-hidecaret) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#17](../../atl/codesnippet/cpp/cwindow-class_17.cpp)]
-## CWindow::HiliteMenuItem
+## `CWindow::HiliteMenuItem`
Highlights or removes the highlight from a top-level menu item.
@@ -1386,9 +1382,9 @@ BOOL HiliteMenuItem(
### Remarks
-See [HiliteMenuItem](/windows/win32/api/winuser/nf-winuser-hilitemenuitem) in the Windows SDK.
+See [`HiliteMenuItem`](/windows/win32/api/winuser/nf-winuser-hilitemenuitem) in the Windows SDK.
-## CWindow::Invalidate
+## `CWindow::Invalidate`
Invalidates the entire client area.
@@ -1398,15 +1394,15 @@ BOOL Invalidate(BOOL bErase = TRUE) throw();
### Remarks
-See [InvalidateRect](/windows/win32/api/winuser/nf-winuser-invalidaterect) in the Windows SDK.
+See [`InvalidateRect`](/windows/win32/api/winuser/nf-winuser-invalidaterect) in the Windows SDK.
-Passes NULL for the `RECT` parameter to the `InvalidateRect` Win32 function.
+Passes `NULL` for the `RECT` parameter to the `InvalidateRect` Win32 function.
### Example
[!code-cpp[NVC_ATL_Windowing#18](../../atl/codesnippet/cpp/cwindow-class_18.cpp)]
-## CWindow::InvalidateRect
+## `CWindow::InvalidateRect`
Invalidates the client area within the specified rectangle.
@@ -1416,9 +1412,9 @@ BOOL InvalidateRect(LPCRECT lpRect, BOOL bErase = TRUE) throw();
### Remarks
-See [InvalidateRect](/windows/win32/api/winuser/nf-winuser-invalidaterect) in the Windows SDK.
+See [`InvalidateRect`](/windows/win32/api/winuser/nf-winuser-invalidaterect) in the Windows SDK.
-## CWindow::InvalidateRgn
+## `CWindow::InvalidateRgn`
Invalidates the client area within the specified region.
@@ -1428,13 +1424,11 @@ void InvalidateRgn(HRGN hRgn, BOOL bErase = TRUE) throw();
### Remarks
-See [InvalidateRgn](/windows/win32/api/winuser/nf-winuser-invalidatergn) in the Windows SDK.
-
-### Remarks
+For more information, see [`InvalidateRgn`](/windows/win32/api/winuser/nf-winuser-invalidatergn) in the Windows SDK.
-Specifies a **`void`** return type, while the `InvalidateRgn` Win32 function always returns TRUE.
+Specifies a **`void`** return type, while the `InvalidateRgn` Win32 function always returns `TRUE`.
-## CWindow::IsChild
+## `CWindow::IsChild`
Determines whether the specified window is a child window.
@@ -1444,9 +1438,9 @@ BOOL IsChild(const HWND hWnd) const throw();
### Remarks
-See [IsChild](/windows/win32/api/winuser/nf-winuser-ischild) in the Windows SDK.
+See [`IsChild`](/windows/win32/api/winuser/nf-winuser-ischild) in the Windows SDK.
-## CWindow::IsDialogMessage
+## `CWindow::IsDialogMessage`
Determines whether a message is intended for the specified dialog box.
@@ -1456,9 +1450,9 @@ BOOL IsDialogMessage(LPMSG lpMsg) throw();
### Remarks
-See [IsDialogMessage](/windows/win32/api/winuser/nf-winuser-isdialogmessagew) in the Windows SDK.
+See [`IsDialogMessage`](/windows/win32/api/winuser/nf-winuser-isdialogmessagew) in the Windows SDK.
-## CWindow::IsDlgButtonChecked
+## `CWindow::IsDlgButtonChecked`
Determines the check state of the button.
@@ -1468,9 +1462,9 @@ UINT IsDlgButtonChecked(int nIDButton) const throw();
### Remarks
-See [IsDlgButtonChecked](/windows/win32/api/winuser/nf-winuser-isdlgbuttonchecked) in the Windows SDK.
+See [`IsDlgButtonChecked`](/windows/win32/api/winuser/nf-winuser-isdlgbuttonchecked) in the Windows SDK.
-## CWindow::IsIconic
+## `CWindow::IsIconic`
Determines whether the window is minimized.
@@ -1480,13 +1474,13 @@ BOOL IsIconic() const throw();
### Remarks
-See [IsIconic](/windows/win32/api/winuser/nf-winuser-isiconic) in the Windows SDK.
+See [`IsIconic`](/windows/win32/api/winuser/nf-winuser-isiconic) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#19](../../atl/codesnippet/cpp/cwindow-class_19.cpp)]
-## CWindow::IsParentDialog
+## `CWindow::IsParentDialog`
Determines if the parent window of the control is a dialog window.
@@ -1496,9 +1490,9 @@ BOOL IsParentDialog() throw();
### Return Value
-Returns TRUE if the parent window is a dialog, FALSE otherwise.
+Returns `TRUE` if the parent window is a dialog, `FALSE` otherwise.
-## CWindow::IsWindow
+## `CWindow::IsWindow`
Determines whether the specified window handle identifies an existing window.
@@ -1508,13 +1502,13 @@ BOOL IsWindow() throw();
### Remarks
-See [IsWindow](/windows/win32/api/winuser/nf-winuser-iswindow) in the Windows SDK.
+See [`IsWindow`](/windows/win32/api/winuser/nf-winuser-iswindow) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#20](../../atl/codesnippet/cpp/cwindow-class_20.cpp)]
-## CWindow::IsWindowEnabled
+## `CWindow::IsWindowEnabled`
Determines whether the window is enabled for input.
@@ -1524,13 +1518,13 @@ BOOL IsWindowEnabled() const throw();
### Remarks
-See [IsWindowEnabled](/windows/win32/api/winuser/nf-winuser-iswindowenabled) in the Windows SDK.
+See [`IsWindowEnabled`](/windows/win32/api/winuser/nf-winuser-iswindowenabled) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#21](../../atl/codesnippet/cpp/cwindow-class_21.cpp)]
-## CWindow::IsWindowVisible
+## `CWindow::IsWindowVisible`
Determines the window's visibility state.
@@ -1540,13 +1534,13 @@ BOOL IsWindowVisible() const throw();
### Remarks
-See [IsWindowVisible](/windows/win32/api/winuser/nf-winuser-iswindowvisible) in the Windows SDK.
+See [`IsWindowVisible`](/windows/win32/api/winuser/nf-winuser-iswindowvisible) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#22](../../atl/codesnippet/cpp/cwindow-class_22.cpp)]
-## CWindow::IsWindowUnicode
+## `CWindow::IsWindowUnicode`
Determines whether the specified window is a native Unicode window.
@@ -1556,13 +1550,13 @@ BOOL IsWindowUnicode() throw();
### Remarks
-See [IsWindowUnicode](/windows/win32/api/winuser/nf-winuser-iswindowunicode) in the Windows SDK.
+See [`IsWindowUnicode`](/windows/win32/api/winuser/nf-winuser-iswindowunicode) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#23](../../atl/codesnippet/cpp/cwindow-class_23.cpp)]
-## CWindow::IsZoomed
+## `CWindow::IsZoomed`
Determines whether the window is maximized.
@@ -1572,9 +1566,9 @@ BOOL IsZoomed() const throw();
### Remarks
-See [IsZoomed](/windows/win32/api/winuser/nf-winuser-iszoomed) in the Windows SDK.
+See [`IsZoomed`](/windows/win32/api/winuser/nf-winuser-iszoomed) in the Windows SDK.
-## CWindow::KillTimer
+## `CWindow::KillTimer`
Destroys a timer event created by `CWindow::SetTimer`.
@@ -1584,11 +1578,11 @@ BOOL KillTimer(UINT nIDEvent) throw();
### Remarks
-See [KillTimer](/windows/win32/api/winuser/nf-winuser-killtimer) in the Windows SDK.
+See [`KillTimer`](/windows/win32/api/winuser/nf-winuser-killtimer) in the Windows SDK.
-## CWindow::LockWindowUpdate
+## `CWindow::LockWindowUpdate`
-Disables or enables drawing in the window by calling the [LockWindowUpdate](/windows/win32/api/winuser/nf-winuser-lockwindowupdate) Win32 function.
+Disables or enables drawing in the window by calling the [`LockWindowUpdate`](/windows/win32/api/winuser/nf-winuser-lockwindowupdate) Win32 function.
```
BOOL LockWindowUpdate(BOOL bLock = TRUE) throw();
@@ -1596,18 +1590,18 @@ BOOL LockWindowUpdate(BOOL bLock = TRUE) throw();
### Parameters
-*bLock*
-[in] If TRUE (the default value), the window will be locked. Otherwise, it will be unlocked.
+*`bLock`*\
+[in] If `TRUE` (the default value), the window will be locked. Otherwise, it will be unlocked.
### Return Value
-TRUE if the window is successfully locked; otherwise, FALSE.
+`TRUE` if the window is successfully locked; otherwise, `FALSE`.
### Remarks
-If *bLock* is TRUE, this method passes [m_hWnd](#m_hwnd) to the Win32 function; otherwise, it passes NULL.
+If *`bLock`* is `TRUE`, this method passes [`m_hWnd`](#m_hwnd) to the Win32 function; otherwise, it passes `NULL`.
-## CWindow::m_hWnd
+## `CWindow::m_hWnd`
Contains a handle to the window associated with the `CWindow` object.
@@ -1615,7 +1609,7 @@ Contains a handle to the window associated with the `CWindow` object.
HWND m_hWnd throw() throw();
```
-## CWindow::MapWindowPoints
+## `CWindow::MapWindowPoints`
Converts a set of points from the window's coordinate space to the coordinate space of another window.
@@ -1632,11 +1626,11 @@ int MapWindowPoints(
### Remarks
-See [MapWindowPoints](/windows/win32/api/winuser/nf-winuser-mapwindowpoints) in the Windows SDK.
+See [`MapWindowPoints`](/windows/win32/api/winuser/nf-winuser-mapwindowpoints) in the Windows SDK.
-The second version of this method allows you to convert the coordinates of a [RECT](/windows/win32/api/windef/ns-windef-rect) structure.
+The second version of this method allows you to convert the coordinates of a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure.
-## CWindow::MessageBox
+## `CWindow::MessageBox`
Displays a message box.
@@ -1649,13 +1643,13 @@ int MessageBox(
### Remarks
-See [MessageBox](/windows/win32/api/winuser/nf-winuser-messagebox) in the Windows SDK.
+See [`MessageBox`](/windows/win32/api/winuser/nf-winuser-messagebox) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#24](../../atl/codesnippet/cpp/cwindow-class_24.cpp)]
-## CWindow::ModifyStyle
+## `CWindow::ModifyStyle`
Modifies the window styles of the `CWindow` object.
@@ -1668,40 +1662,40 @@ BOOL ModifyStyle(
### Parameters
-*dwRemove*
+*`dwRemove`*\
[in] Specifies the window styles to be removed during style modification.
-*dwAdd*
+*`dwAdd`*\
[in] Specifies the window styles to be added during style modification.
-*nFlags*
-[in] Window-positioning flags. For a list of possible values, see the [SetWindowPos](/windows/win32/api/winuser/nf-winuser-setwindowpos) function in the Windows SDK.
+*`nFlags`*\
+[in] Window-positioning flags. For a list of possible values, see the [`SetWindowPos`](/windows/win32/api/winuser/nf-winuser-setwindowpos) function in the Windows SDK.
### Return Value
-TRUE if the window styles are modified; otherwise, FALSE.
+`TRUE` if the window styles are modified; otherwise, `FALSE`.
### Remarks
-Styles to be added or removed can be combined by using the bitwise OR ( | ) operator. See the [CreateWindow](/windows/win32/api/winuser/nf-winuser-createwindoww) function in the Windows SDKfor information about the available window styles.
+Styles to be added or removed can be combined by using the bitwise "or" (`|`) operator. See the [`CreateWindow`](/windows/win32/api/winuser/nf-winuser-createwindoww) function in the Windows SDKfor information about the available window styles.
-If *nFlags* is nonzero, `ModifyStyle` calls the Win32 function `SetWindowPos`, and redraws the window by combining *nFlags* with the following four flags:
+If *`nFlags`* is nonzero, `ModifyStyle` calls the Win32 function `SetWindowPos`, and redraws the window by combining *`nFlags`* with the following four flags:
-- SWP_NOSIZE Retains the current size.
+- `SWP_NOSIZE` Retains the current size.
-- SWP_NOMOVE Retains the current position.
+- `SWP_NOMOVE` Retains the current position.
-- SWP_NOZORDER Retains the current Z order.
+- `SWP_NOZORDER` Retains the current Z order.
-- SWP_NOACTIVATE Does not activate the window.
+- `SWP_NOACTIVATE` Doesn't activate the window.
-To modify a window's extended styles, call [ModifyStyleEx](#modifystyleex).
+To modify a window's extended styles, call [`ModifyStyleEx`](#modifystyleex).
### Example
[!code-cpp[NVC_ATL_Windowing#25](../../atl/codesnippet/cpp/cwindow-class_25.cpp)]
-## CWindow::ModifyStyleEx
+## `CWindow::ModifyStyleEx`
Modifies the extended window styles of the `CWindow` object.
@@ -1714,40 +1708,40 @@ BOOL ModifyStyleEx(
### Parameters
-*dwRemove*
+*`dwRemove`*\
[in] Specifies the extended styles to be removed during style modification.
-*dwAdd*
+*`dwAdd`*\
[in] Specifies the extended styles to be added during style modification.
-*nFlags*
-[in] Window-positioning flags. For a list of possible values, see the [SetWindowPos](/windows/win32/api/winuser/nf-winuser-setwindowpos) function in the Windows SDK.
+*`nFlags`*\
+[in] Window-positioning flags. For a list of possible values, see the [`SetWindowPos`](/windows/win32/api/winuser/nf-winuser-setwindowpos) function in the Windows SDK.
### Return Value
-TRUE if the extended window styles are modified; otherwise, FALSE.
+`TRUE` if the extended window styles are modified; otherwise, `FALSE`.
### Remarks
-Styles to be added or removed can be combined by using the bitwise OR ( | ) operator. See the [CreateWindowEx](/windows/win32/api/winuser/nf-winuser-createwindowexw) function in the Windows SDKfor information about the available extended styles.
+Styles to be added or removed can be combined by using the bitwise "or" (`|`) operator. See the [`CreateWindowEx`](/windows/win32/api/winuser/nf-winuser-createwindowexw) function in the Windows SDK for information about the available extended styles.
-If *nFlags* is nonzero, `ModifyStyleEx` calls the Win32 function `SetWindowPos`, and redraws the window by combining *nFlags* with the following four flags:
+If *`nFlags`* is nonzero, `ModifyStyleEx` calls the Win32 function `SetWindowPos`, and redraws the window by combining *`nFlags`* with the following four flags:
-- SWP_NOSIZE Retains the current size.
+- `SWP_NOSIZE` Retains the current size.
-- SWP_NOMOVE Retains the current position.
+- `SWP_NOMOVE` Retains the current position.
-- SWP_NOZORDER Retains the current Z order.
+- `SWP_NOZORDER` Retains the current Z order.
-- SWP_NOACTIVATE Does not activate the window.
+- `SWP_NOACTIVATE` Doesn't activate the window.
-To modify windows using regular window styles, call [ModifyStyle](#modifystyle).
+To modify windows using regular window styles, call [`ModifyStyle`](#modifystyle).
### Example
[!code-cpp[NVC_ATL_Windowing#26](../../atl/codesnippet/cpp/cwindow-class_26.cpp)]
-## CWindow::MoveWindow
+## `CWindow::MoveWindow`
Changes the window's size and position.
@@ -1766,11 +1760,11 @@ BOOL MoveWindow(
### Remarks
-For a top-level window object, the x and y parameters are relative to the upper-left corner of the screen. For a child window object, they are relative to the upper-left corner of the parent window's client area.
+For a top-level window object, the `x` and `y` parameters are relative to the upper-left corner of the screen. For a child window object, they're relative to the upper-left corner of the parent window's client area.
-The second version of this method uses a [RECT](/windows/win32/api/windef/ns-windef-rect) structure to determine the window's new position, width, and height.
+The second version of this method uses a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure to determine the window's new position, width, and height.
-## CWindow::NextDlgCtrl
+## `CWindow::NextDlgCtrl`
Sets the keyboard focus to the next control in the dialog box.
@@ -1780,9 +1774,9 @@ void NextDlgCtrl() const throw();
### Remarks
-See [WM_NEXTDLGCTL](/windows/win32/dlgbox/wm-nextdlgctl) in the Windows SDK.
+See [`WM_NEXTDLGCTL`](/windows/win32/dlgbox/wm-nextdlgctl) in the Windows SDK.
-## CWindow::OpenClipboard
+## `CWindow::OpenClipboard`
Opens the Clipboard.
@@ -1792,25 +1786,25 @@ BOOL OpenClipboard() throw();
### Remarks
-See [OpenClipboard](/windows/win32/api/winuser/nf-winuser-openclipboard) in the Windows SDK.
+See [`OpenClipboard`](/windows/win32/api/winuser/nf-winuser-openclipboard) in the Windows SDK.
-## CWindow::operator HWND
+## `CWindow::operator HWND`
-Converts a `CWindow` object to an HWND.
+Converts a `CWindow` object to an `HWND`.
```
operator HWND() const throw();
```
-## CWindow::operator =
+## `CWindow::operator =`
-Assigns an HWND to the `CWindow` object by setting the [m_hWnd](#m_hwnd) member to `hWnd`.
+Assigns an `HWND` to the `CWindow` object by setting the [`m_hWnd`](#m_hwnd) member to `hWnd`.
```
CWindow& operator= (HWND hWnd) throw();
```
-## CWindow::PostMessage
+## `CWindow::PostMessage`
Places a message in the message queue associated with the thread that created the window.
@@ -1823,7 +1817,7 @@ BOOL PostMessage(
### Remarks
-See [PostMessage](/windows/win32/api/winuser/nf-winuser-postmessagew) in the Windows SDK.
+See [`PostMessage`](/windows/win32/api/winuser/nf-winuser-postmessagew) in the Windows SDK.
Returns without waiting for the thread to process the message.
@@ -1831,7 +1825,7 @@ Returns without waiting for the thread to process the message.
[!code-cpp[NVC_ATL_Windowing#27](../../atl/codesnippet/cpp/cwindow-class_27.cpp)]
-## CWindow::PrevDlgCtrl
+## `CWindow::PrevDlgCtrl`
Sets the keyboard focus to the previous control in the dialog box.
@@ -1841,11 +1835,11 @@ void PrevDlgCtrl() const throw();
### Remarks
-See [WM_NEXTDLGCTL](/windows/win32/dlgbox/wm-nextdlgctl) in the Windows SDK.
+See [`WM_NEXTDLGCTL`](/windows/win32/dlgbox/wm-nextdlgctl) in the Windows SDK.
-## CWindow::Print
+## `CWindow::Print`
-Sends a [WM_PRINT](/windows/win32/gdi/wm-print) message to the window to request that it draw itself in the specified device context.
+Sends a [`WM_PRINT`](/windows/win32/gdi/wm-print) message to the window to request that it draw itself in the specified device context.
```cpp
void Print(HDC hDC, DWORD dwFlags) const throw();
@@ -1853,27 +1847,27 @@ void Print(HDC hDC, DWORD dwFlags) const throw();
### Parameters
-*hDC*
+*`hDC`*\
[in] The handle to a device context.
-*dwFlags*
+*`dwFlags`*\
[in] Specifies the drawing options. You can combine one or more of the following flags:
-- PRF_CHECKVISIBLE Draw the window only if it is visible.
+- `PRF_CHECKVISIBLE` Draw the window only if it's visible.
-- PRF_CHILDREN Draw all visible child windows.
+- `PRF_CHILDREN` Draw all visible child windows.
-- PRF_CLIENT Draw the client area of the window.
+- `PRF_CLIENT` Draw the client area of the window.
-- PRF_ERASEBKGND Erase the background before drawing the window.
+- `PRF_ERASEBKGND` Erase the background before drawing the window.
-- PRF_NONCLIENT Draw the non-client area of the window.
+- `PRF_NONCLIENT` Draw the non-client area of the window.
-- PRF_OWNED Draw all owned windows.
+- `PRF_OWNED` Draw all owned windows.
-## CWindow::PrintClient
+## `CWindow::PrintClient`
-Sends a [WM_PRINTCLIENT](/windows/win32/gdi/wm-printclient) message to the window to request that it draw its client area in the specified device context.
+Sends a [`WM_PRINTCLIENT`](/windows/win32/gdi/wm-printclient) message to the window to request that it draw its client area in the specified device context.
```cpp
void PrintClient(HDC hDC, DWORD dwFlags) const throw();
@@ -1881,25 +1875,25 @@ void PrintClient(HDC hDC, DWORD dwFlags) const throw();
### Parameters
-*hDC*
+*`hDC`*\
[in] The handle to a device context.
-*dwFlags*
+*`dwFlags`*\
[in] Specifies drawing options. You can combine one or more of the following flags:
-- PRF_CHECKVISIBLE Draw the window only if it is visible.
+- `PRF_CHECKVISIBLE` Draw the window only if it's visible.
-- PRF_CHILDREN Draw all visible child windows.
+- `PRF_CHILDREN` Draw all visible child windows.
-- PRF_CLIENT Draw the client area of the window.
+- `PRF_CLIENT` Draw the client area of the window.
-- PRF_ERASEBKGND Erase the background before drawing the window.
+- `PRF_ERASEBKGND` Erase the background before drawing the window.
-- PRF_NONCLIENT Draw the non-client area of the window.
+- `PRF_NONCLIENT` Draw the non-client area of the window.
-- PRF_OWNED Draw all owned windows.
+- `PRF_OWNED` Draw all owned windows.
-## CWindow::rcDefault
+## `CWindow::rcDefault`
Contains default window dimensions.
@@ -1907,7 +1901,7 @@ Contains default window dimensions.
static RECT rcDefault;
```
-## CWindow::RedrawWindow
+## `CWindow::RedrawWindow`
Updates a specified rectangle or region in the client area.
@@ -1922,13 +1916,13 @@ throw()
### Remarks
-See [RedrawWindow](/windows/win32/api/winuser/nf-winuser-redrawwindow) in the Windows SDK.
+See [`RedrawWindow`](/windows/win32/api/winuser/nf-winuser-redrawwindow) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#28](../../atl/codesnippet/cpp/cwindow-class_28.cpp)]
-## CWindow::ReleaseDC
+## `CWindow::ReleaseDC`
Releases a device context.
@@ -1938,13 +1932,13 @@ int ReleaseDC(HDC hDC);
### Remarks
-See [ReleaseDC](/windows/win32/api/winuser/nf-winuser-releasedc) in the Windows SDK.
+See [`ReleaseDC`](/windows/win32/api/winuser/nf-winuser-releasedc) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#9](../../atl/codesnippet/cpp/cwindow-class_9.cpp)]
-## CWindow::ResizeClient
+## `CWindow::ResizeClient`
Resizes the window to the specified client area size.
@@ -1957,16 +1951,16 @@ BOOL ResizeClient(
### Parameters
-*nWidth*
+*`nWidth`*\
New width of the window in pixels.
-*nHeight*
+*`nHeight`*\
New height of the window in pixels.
-*bRedraw*
-A flag indicating whether to redraw changes. Default is FALSE, indicating the window does not redraw changes.
+*`bRedraw`*\
+A flag indicating whether to redraw changes. Default is `FALSE`, indicating the window doesn't redraw changes.
-## CWindow::ScreenToClient
+## `CWindow::ScreenToClient`
Converts screen coordinates to client coordinates.
@@ -1977,11 +1971,11 @@ BOOL ScreenToClient(LPRECT lpRect) const throw();
### Remarks
-See [ScreenToClient](/windows/win32/api/winuser/nf-winuser-screentoclient) in the Windows SDK.
+See [`ScreenToClient`](/windows/win32/api/winuser/nf-winuser-screentoclient) in the Windows SDK.
-The second version of this method allows you to convert the coordinates of a [RECT](/windows/win32/api/windef/ns-windef-rect) structure.
+The second version of this method allows you to convert the coordinates of a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure.
-## CWindow::ScrollWindow
+## `CWindow::ScrollWindow`
Scrolls the specified client area.
@@ -1995,9 +1989,9 @@ BOOL ScrollWindow(
### Remarks
-See [ScrollWindow](/windows/win32/api/winuser/nf-winuser-scrollwindow) in the Windows SDK.
+See [`ScrollWindow`](/windows/win32/api/winuser/nf-winuser-scrollwindow) in the Windows SDK.
-## CWindow::ScrollWindowEx
+## `CWindow::ScrollWindowEx`
Scrolls the specified client area with additional features.
@@ -2014,9 +2008,9 @@ int ScrollWindowEx(
### Remarks
-See [ScrollWindowEx](/windows/win32/api/winuser/nf-winuser-scrollwindowex) in the Windows SDK.
+See [`ScrollWindowEx`](/windows/win32/api/winuser/nf-winuser-scrollwindowex) in the Windows SDK.
-## CWindow::SendDlgItemMessage
+## `CWindow::SendDlgItemMessage`
Sends a message to a control.
@@ -2030,11 +2024,11 @@ LRESULT SendDlgItemMessage(
### Remarks
-See [SendDlgItemMessage](/windows/win32/api/winuser/nf-winuser-senddlgitemmessagew) in the Windows SDK.
+See [`SendDlgItemMessage`](/windows/win32/api/winuser/nf-winuser-senddlgitemmessagew) in the Windows SDK.
-## CWindow::SendMessage
+## `CWindow::SendMessage`
-Sends a message to the window and does not return until the window procedure has processed the message.
+Sends a message to the window and doesn't return until the window procedure has processed the message.
```
LRESULT SendMessage(
@@ -2051,13 +2045,13 @@ static LRESULT SendMessage(
### Remarks
-See [SendMessage](/windows/win32/api/winuser/nf-winuser-sendmessage) in the Windows SDK.
+See [`SendMessage`](/windows/win32/api/winuser/nf-winuser-sendmessage) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#29](../../atl/codesnippet/cpp/cwindow-class_29.cpp)]
-## CWindow::SendMessageToDescendants
+## `CWindow::SendMessageToDescendants`
Sends the specified message to all immediate children of the `CWindow` object.
@@ -2071,23 +2065,23 @@ void SendMessageToDescendants(
### Parameters
-*message*
+*`message`*\
[in] The message to be sent.
-*wParam*
+*`wParam`*\
[in] Additional message-specific information.
-*lParam*
+*`lParam`*\
[in] Additional message-specific information.
-*bDeep*
-[in] If TRUE (the default value), the message will be sent to all descendant windows; otherwise, it will be sent only to the immediate child windows.
+*`bDeep`*\
+[in] If `TRUE` (the default value), the message will be sent to all descendant windows; otherwise, it will be sent only to the immediate child windows.
### Remarks
-If *bDeep* is TRUE, the message is additionally sent to all other descendant windows.
+If *`bDeep`* is `TRUE`, the message is additionally sent to all other descendant windows.
-## CWindow::SendNotifyMessage
+## `CWindow::SendNotifyMessage`
Sends a message to the window.
@@ -2100,11 +2094,11 @@ BOOL SendNotifyMessage(
### Remarks
-See [SendNotifyMessage](/windows/win32/api/winuser/nf-winuser-sendnotifymessagew) in the Windows SDK.
+See [`SendNotifyMessage`](/windows/win32/api/winuser/nf-winuser-sendnotifymessagew) in the Windows SDK.
-If the window was created by the calling thread, `SendNotifyMessage` does not return until the window procedure has processed the message. Otherwise, it returns immediately.
+If the window was created by the calling thread, `SendNotifyMessage` doesn't return until the window procedure has processed the message. Otherwise, it returns immediately.
-## CWindow::SetActiveWindow
+## `CWindow::SetActiveWindow`
Activates the window.
@@ -2114,13 +2108,13 @@ HWND SetActiveWindow() throw();
### Remarks
-See [SetActiveWindow](/windows/win32/api/winuser/nf-winuser-setactivewindow) in the Windows SDK.
+See [`SetActiveWindow`](/windows/win32/api/winuser/nf-winuser-setactivewindow) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#30](../../atl/codesnippet/cpp/cwindow-class_30.cpp)]
-## CWindow::SetCapture
+## `CWindow::SetCapture`
Sends all subsequent mouse input to the window.
@@ -2130,9 +2124,9 @@ HWND SetCapture() throw();
### Remarks
-See [SetCapture](/windows/win32/api/winuser/nf-winuser-setcapture) in the Windows SDK.
+See [`SetCapture`](/windows/win32/api/winuser/nf-winuser-setcapture) in the Windows SDK.
-## CWindow::SetClipboardViewer
+## `CWindow::SetClipboardViewer`
Adds the window to the Clipboard viewer chain.
@@ -2142,9 +2136,9 @@ HWND SetClipboardViewer() throw();
### Remarks
-See [SetClipboardViewer](/windows/win32/api/winuser/nf-winuser-setclipboardviewer) in the Windows SDK.
+See [`SetClipboardViewer`](/windows/win32/api/winuser/nf-winuser-setclipboardviewer) in the Windows SDK.
-## CWindow::SetDlgCtrlID
+## `CWindow::SetDlgCtrlID`
Sets the identifier of the window to the specified value.
@@ -2154,14 +2148,14 @@ int SetDlgCtrlID(int nID) throw();
### Parameters
-*nID*
+*`nID`*\
[in] The new value to set for the window's identifier.
### Return Value
If successful, the previous identifier of the window; otherwise 0.
-## CWindow::SetDlgItemInt
+## `CWindow::SetDlgItemInt`
Changes a control's text to the string representation of an integer value.
@@ -2174,9 +2168,9 @@ BOOL SetDlgItemInt(
### Remarks
-See [SetDlgItemInt](/windows/win32/api/winuser/nf-winuser-setdlgitemint) in the Windows SDK.
+See [`SetDlgItemInt`](/windows/win32/api/winuser/nf-winuser-setdlgitemint) in the Windows SDK.
-## CWindow::SetDlgItemText
+## `CWindow::SetDlgItemText`
Changes a control's text.
@@ -2186,9 +2180,9 @@ BOOL SetDlgItemText(int nID, LPCTSTR lpszString) throw();
### Remarks
-See [SetDlgItemText](/windows/win32/api/winuser/nf-winuser-setdlgitemtextw) in the Windows SDK.
+See [`SetDlgItemText`](/windows/win32/api/winuser/nf-winuser-setdlgitemtextw) in the Windows SDK.
-## CWindow::SetFocus
+## `CWindow::SetFocus`
Sets the input focus to the window.
@@ -2198,15 +2192,15 @@ HWND SetFocus() throw();
### Remarks
-See [SetFocus](/windows/win32/api/winuser/nf-winuser-setfocus) in the Windows SDK.
+See [`SetFocus`](/windows/win32/api/winuser/nf-winuser-setfocus) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#31](../../atl/codesnippet/cpp/cwindow-class_31.cpp)]
-## CWindow::SetFont
+## `CWindow::SetFont`
-Changes the window's current font by sending a [WM_SETFONT](/windows/win32/winmsg/wm-setfont) message to the window.
+Changes the window's current font by sending a [`WM_SETFONT`](/windows/win32/winmsg/wm-setfont) message to the window.
```cpp
void SetFont(HFONT hFont, BOOL bRedraw = TRUE) throw();
@@ -2214,15 +2208,15 @@ void SetFont(HFONT hFont, BOOL bRedraw = TRUE) throw();
### Parameters
-*hFont*
+*`hFont`*\
[in] The handle to the new font.
-*bRedraw*
-[in] If TRUE (the default value), the window is redrawn. Otherwise, it is not.
+*`bRedraw`*\
+[in] If `TRUE` (the default value), the window is redrawn. Otherwise, it isn't.
-## CWindow::SetHotKey
+## `CWindow::SetHotKey`
-Associates a hot key with the window by sending a WM_SETHOTKEY message.
+Associates a hot key with the window by sending a `WM_SETHOTKEY` message.
```
int SetHotKey(WORD wVirtualKeyCode, WORD wModifiers) throw();
@@ -2230,19 +2224,19 @@ int SetHotKey(WORD wVirtualKeyCode, WORD wModifiers) throw();
### Parameters
-*wVirtualKeyCode*
-[in] The virtual key code of the hot key. For a list of standard virtual key codes, see Winuser.h.
+*`wVirtualKeyCode`*\
+[in] The virtual key code of the hot key. For a list of standard virtual key codes, see `Winuser.h`.
-*wModifiers*
-[in] The modifiers of the hot key. For a list of possible values, see WM_SETHOTKEY in the Windows SDK.
+*`wModifiers`*\
+[in] The modifiers of the hot key. For a list of possible values, see `WM_SETHOTKEY` in the Windows SDK.
### Return Value
-For a list of possible return values, see [WM_SETHOTKEY](/windows/win32/inputdev/wm-sethotkey) in the Windows SDK.
+For a list of possible return values, see [`WM_SETHOTKEY`](/windows/win32/inputdev/wm-sethotkey) in the Windows SDK.
-## CWindow::SetIcon
+## `CWindow::SetIcon`
-Sets the window's large or small icon to the icon identified by *hIcon*.
+Sets the window's large or small icon to the icon identified by *`hIcon`*.
```
HICON SetIcon(HICON hIcon, BOOL bBigIcon = TRUE) throw();
@@ -2250,11 +2244,11 @@ HICON SetIcon(HICON hIcon, BOOL bBigIcon = TRUE) throw();
### Parameters
-*hIcon*
+*`hIcon`*\
[in] The handle to a new icon.
-*bBigIcon*
-[in] If TRUE (the default value), the method sets a large icon. Otherwise, it sets a small icon.
+*`bBigIcon`*\
+[in] If `TRUE` (the default value), the method sets a large icon. Otherwise, it sets a small icon.
### Return Value
@@ -2262,9 +2256,9 @@ The handle to the previous icon.
### Remarks
-`SetIcon` sends a [WM_SETICON](/windows/win32/winmsg/wm-seticon) message to the window.
+`SetIcon` sends a [`WM_SETICON`](/windows/win32/winmsg/wm-seticon) message to the window.
-## CWindow::SetMenu
+## `CWindow::SetMenu`
Changes the window's current menu.
@@ -2274,9 +2268,9 @@ BOOL SetMenu(HMENU hMenu) throw();
### Remarks
-See [SetMenu](/windows/win32/api/winuser/nf-winuser-setmenu) in the Windows SDK.
+See [`SetMenu`](/windows/win32/api/winuser/nf-winuser-setmenu) in the Windows SDK.
-## CWindow::SetParent
+## `CWindow::SetParent`
Changes the parent window.
@@ -2286,15 +2280,15 @@ HWND SetParent(HWND hWndNewParent) throw();
### Remarks
-See [SetParent](/windows/win32/api/winuser/nf-winuser-setparent) in the Windows SDK.
+See [`SetParent`](/windows/win32/api/winuser/nf-winuser-setparent) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#32](../../atl/codesnippet/cpp/cwindow-class_32.cpp)]
-## CWindow::SetRedraw
+## `CWindow::SetRedraw`
-Sets or clears the redraw flag by sending a [WM_SETREDRAW](/windows/win32/gdi/wm-setredraw) message to the window.
+Sets or clears the redraw flag by sending a [`WM_SETREDRAW`](/windows/win32/gdi/wm-setredraw) message to the window.
```cpp
void SetRedraw(BOOL bRedraw = TRUE) throw();
@@ -2302,8 +2296,8 @@ void SetRedraw(BOOL bRedraw = TRUE) throw();
### Parameters
-*bRedraw*
-[in] Specifies the state of the redraw flag. If TRUE (the default value), the redraw flag is set; if FALSE, the flag is cleared.
+*`bRedraw`*\
+[in] Specifies the state of the redraw flag. If `TRUE` (the default value), the redraw flag is set; if `FALSE`, the flag is cleared.
### Remarks
@@ -2313,7 +2307,7 @@ Call `SetRedraw` to allow changes to be redrawn or to prevent changes from being
[!code-cpp[NVC_ATL_Windowing#33](../../atl/codesnippet/cpp/cwindow-class_33.cpp)]
-## CWindow::SetScrollInfo
+## `CWindow::SetScrollInfo`
Sets the parameters of a scroll bar.
@@ -2326,9 +2320,9 @@ int SetScrollInfo(
### Remarks
-See [SetScrollInfo](/windows/win32/api/winuser/nf-winuser-setscrollinfo) in the Windows SDK.
+See [`SetScrollInfo`](/windows/win32/api/winuser/nf-winuser-setscrollinfo) in the Windows SDK.
-## CWindow::SetScrollPos
+## `CWindow::SetScrollPos`
Changes the position of the scroll box.
@@ -2341,9 +2335,9 @@ int SetScrollPos(
### Remarks
-See [SetScrollPos](/windows/win32/api/winuser/nf-winuser-setscrollpos) in the Windows SDK.
+See [`SetScrollPos`](/windows/win32/api/winuser/nf-winuser-setscrollpos) in the Windows SDK.
-## CWindow::SetScrollRange
+## `CWindow::SetScrollRange`
Changes the scroll bar range.
@@ -2357,9 +2351,9 @@ BOOL SetScrollRange(
### Remarks
-See [SetScrollRange](/windows/win32/api/winuser/nf-winuser-setscrollrange) in the Windows SDK.
+See [`SetScrollRange`](/windows/win32/api/winuser/nf-winuser-setscrollrange) in the Windows SDK.
-## CWindow::SetTimer
+## `CWindow::SetTimer`
Creates a timer event.
@@ -2372,9 +2366,9 @@ UINT SetTimer(
### Remarks
-See [SetTimer](/windows/win32/api/winuser/nf-winuser-settimer) in the Windows SDK.
+See [`SetTimer`](/windows/win32/api/winuser/nf-winuser-settimer) in the Windows SDK.
-## CWindow::SetWindowContextHelpId
+## `CWindow::SetWindowContextHelpId`
Sets the window's help context identifier.
@@ -2384,9 +2378,9 @@ BOOL SetWindowContextHelpId(DWORD dwContextHelpId) throw();
### Remarks
-See [SetWindowContextHelpId](/windows/win32/api/winuser/nf-winuser-setwindowcontexthelpid) in the Windows SDK.
+See [`SetWindowContextHelpId`](/windows/win32/api/winuser/nf-winuser-setwindowcontexthelpid) in the Windows SDK.
-## CWindow::SetWindowLong
+## `CWindow::SetWindowLong`
Sets a 32-bit value at a specified offset into the extra window memory.
@@ -2396,12 +2390,12 @@ LONG SetWindowLong(int nIndex, LONG dwNewLong) throw();
### Remarks
-See [SetWindowLong](/windows/win32/api/winuser/nf-winuser-setwindowlongw) in the Windows SDK.
+See [`SetWindowLong`](/windows/win32/api/winuser/nf-winuser-setwindowlongw) in the Windows SDK.
> [!NOTE]
-> To write code that is compatible with both 32-bit and 64-bit versions of Windows, use [CWindow::SetWindowLongPtr](#setwindowlongptr).
+> To write code that is compatible with both 32-bit and 64-bit versions of Windows, use [`CWindow::SetWindowLongPtr`](#setwindowlongptr).
-## CWindow::SetWindowLongPtr
+## `CWindow::SetWindowLongPtr`
Changes an attribute of the specified window, and also sets a value at the specified offset in the extra window memory.
@@ -2411,11 +2405,11 @@ LONG_PTR SetWindowLongPtr(int nIndex, LONG_PTR dwNewLong) throw();
### Remarks
-See [SetWindowLongPtr](/windows/win32/api/winuser/nf-winuser-setwindowlongptrw) in the Windows SDK.
+See [`SetWindowLongPtr`](/windows/win32/api/winuser/nf-winuser-setwindowlongptrw) in the Windows SDK.
This function supersedes the `CWindow::SetWindowLong` method. To write code that is compatible with both 32-bit and 64-bit versions of Windows, use `CWindow::SetWindowLongPtr`.
-## CWindow::SetWindowPlacement
+## `CWindow::SetWindowPlacement`
Sets the show state and positions.
@@ -2425,9 +2419,9 @@ BOOL SetWindowPlacement(const WINDOWPLACEMENT FAR* lpwndpl);
### Remarks
-See [SetWindowPlacement](/windows/win32/api/winuser/nf-winuser-setwindowplacement) in the Windows SDK.
+See [`SetWindowPlacement`](/windows/win32/api/winuser/nf-winuser-setwindowplacement) in the Windows SDK.
-## CWindow::SetWindowPos
+## `CWindow::SetWindowPos`
Sets the size, position, and Z order.
@@ -2448,11 +2442,11 @@ BOOL SetWindowPos(
### Remarks
-See [SetWindowPos](/windows/win32/api/winuser/nf-winuser-setwindowpos) in the Windows SDK.
+See [`SetWindowPos`](/windows/win32/api/winuser/nf-winuser-setwindowpos) in the Windows SDK.
-The second version of this method uses a [RECT](/windows/win32/api/windef/ns-windef-rect) structure to set the window's new position, width, and height.
+The second version of this method uses a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure to set the window's new position, width, and height.
-## CWindow::SetWindowRgn
+## `CWindow::SetWindowRgn`
Sets the window region of a window.
@@ -2462,9 +2456,9 @@ int SetWindowRgn(HRGN hRgn, BOOL bRedraw = FALSE) throw();
### Remarks
-See [SetWindowRgn](/windows/win32/api/winuser/nf-winuser-setwindowrgn) in the Windows SDK.
+See [`SetWindowRgn`](/windows/win32/api/winuser/nf-winuser-setwindowrgn) in the Windows SDK.
-## CWindow::SetWindowText
+## `CWindow::SetWindowText`
Changes the window's text.
@@ -2474,13 +2468,13 @@ BOOL SetWindowText(LPCTSTR lpszString) throw();
### Remarks
-See [SetWindowText](/windows/win32/api/winuser/nf-winuser-setwindowtextw) in the Windows SDK.
+See [`SetWindowText`](/windows/win32/api/winuser/nf-winuser-setwindowtextw) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#34](../../atl/codesnippet/cpp/cwindow-class_34.cpp)]
-## CWindow::SetWindowWord
+## `CWindow::SetWindowWord`
Sets a 16-bit value at a specified offset into the extra window memory.
@@ -2490,9 +2484,9 @@ WORD SetWindowWord(int nIndex, WORD wNewWord) throw();
### Remarks
-See [SetWindowLong](/windows/win32/api/winuser/nf-winuser-setwindowlongw) in the Windows SDK.
+See [`SetWindowLong`](/windows/win32/api/winuser/nf-winuser-setwindowlongw) in the Windows SDK.
-## CWindow::ShowCaret
+## `CWindow::ShowCaret`
Displays the system caret.
@@ -2502,13 +2496,13 @@ BOOL ShowCaret() throw();
### Remarks
-See [ShowCaret](/windows/win32/api/winuser/nf-winuser-showcaret) in the Windows SDK.
+See [`ShowCaret`](/windows/win32/api/winuser/nf-winuser-showcaret) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#35](../../atl/codesnippet/cpp/cwindow-class_35.cpp)]
-## CWindow::ShowOwnedPopups
+## `CWindow::ShowOwnedPopups`
Shows or hides the pop-up windows owned by the window.
@@ -2518,9 +2512,9 @@ BOOL ShowOwnedPopups(BOOL bShow = TRUE) throw();
### Remarks
-See [ShowOwnedPopups](/windows/win32/api/winuser/nf-winuser-showownedpopups) in the Windows SDK.
+See [`ShowOwnedPopups`](/windows/win32/api/winuser/nf-winuser-showownedpopups) in the Windows SDK.
-## CWindow::ShowScrollBar
+## `CWindow::ShowScrollBar`
Shows or hides a scroll bar.
@@ -2530,9 +2524,9 @@ BOOL ShowScrollBar(UINT nBar, BOOL bShow = TRUE) throw();
### Remarks
-See [ShowScrollBar](/windows/win32/api/winuser/nf-winuser-showscrollbar) in the Windows SDK.
+See [`ShowScrollBar`](/windows/win32/api/winuser/nf-winuser-showscrollbar) in the Windows SDK.
-## CWindow::ShowWindow
+## `CWindow::ShowWindow`
Sets the window's show state.
@@ -2542,13 +2536,13 @@ BOOL ShowWindow(int nCmdShow) throw();
### Remarks
-See [ShowWindow](/windows/win32/api/winuser/nf-winuser-showwindow) in the Windows SDK.
+See [`ShowWindow`](/windows/win32/api/winuser/nf-winuser-showwindow) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#36](../../atl/codesnippet/cpp/cwindow-class_36.cpp)]
-## CWindow::ShowWindowAsync
+## `CWindow::ShowWindowAsync`
Sets the show state of a window created by a different thread.
@@ -2558,9 +2552,9 @@ BOOL ShowWindowAsync(int nCmdShow) throw();
### Remarks
-See [ShowWindowAsync](/windows/win32/api/winuser/nf-winuser-showwindowasync) in the Windows SDK.
+See [`ShowWindowAsync`](/windows/win32/api/winuser/nf-winuser-showwindowasync) in the Windows SDK.
-## CWindow::UpdateWindow
+## `CWindow::UpdateWindow`
Updates the client area.
@@ -2570,13 +2564,13 @@ BOOL UpdateWindow() throw();
### Remarks
-See [UpdateWindow](/windows/win32/api/winuser/nf-winuser-updatewindow) in the Windows SDK.
+See [`UpdateWindow`](/windows/win32/api/winuser/nf-winuser-updatewindow) in the Windows SDK.
### Example
[!code-cpp[NVC_ATL_Windowing#37](../../atl/codesnippet/cpp/cwindow-class_37.cpp)]
-## CWindow::ValidateRect
+## `CWindow::ValidateRect`
Validates the client area within the specified rectangle.
@@ -2586,9 +2580,9 @@ BOOL ValidateRect(LPCRECT lpRect) throw();
### Remarks
-See [ValidateRect](/windows/win32/api/winuser/nf-winuser-validaterect) in the Windows SDK.
+See [`ValidateRect`](/windows/win32/api/winuser/nf-winuser-validaterect) in the Windows SDK.
-## CWindow::ValidateRgn
+## `CWindow::ValidateRgn`
Validates the client area within the specified region.
@@ -2598,9 +2592,9 @@ BOOL ValidateRgn(HRGN hRgn) throw();
### Remarks
-See [ValidateRgn](/windows/win32/api/winuser/nf-winuser-validatergn) in the Windows SDK.
+See [`ValidateRgn`](/windows/win32/api/winuser/nf-winuser-validatergn) in the Windows SDK.
-## CWindow::WinHelp
+## `CWindow::WinHelp`
Starts Windows Help.
@@ -2613,7 +2607,7 @@ BOOL WinHelp(
### Remarks
-See [WinHelp](/windows/win32/api/winuser/nf-winuser-winhelpw) in the Windows SDK.
+See [`WinHelp`](/windows/win32/api/winuser/nf-winuser-winhelpw) in the Windows SDK.
## See also
diff --git a/docs/atl/reference/cwindowimpl-class.md b/docs/atl/reference/cwindowimpl-class.md
index 009802be41..d2041bc669 100644
--- a/docs/atl/reference/cwindowimpl-class.md
+++ b/docs/atl/reference/cwindowimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CWindowImpl Class"
title: "CWindowImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["CWindowImpl", "ATLWIN/ATL::CWindowImpl", "ATLWIN/ATL::CWindowImpl::Create", "ATLWIN/ATL::CWindowImpl::DefWindowProc", "ATLWIN/ATL::CWindowImpl::GetCurrentMessage", "ATLWIN/ATL::CWindowImpl::GetWindowProc", "ATLWIN/ATL::CWindowImpl::OnFinalMessage", "ATLWIN/ATL::CWindowImpl::SubclassWindow", "ATLWIN/ATL::CWindowImpl::UnsubclassWindow", "ATLWIN/ATL::CWindowImpl::GetWndClassInfo", "ATLWIN/ATL::CWindowImpl::WindowProc", "ATLWIN/ATL::CWindowImpl::m_pfnSuperWindowProc"]
@@ -40,7 +41,7 @@ A [traits class](../../atl/understanding-window-traits.md) that defines styles f
### CWindowImplBaseT Methods
-|||
+|Name|Description|
|-|-|
|[DefWindowProc](#defwindowproc)|Provides default message processing.|
|[GetCurrentMessage](#getcurrentmessage)|Returns the current message.|
@@ -51,14 +52,14 @@ A [traits class](../../atl/understanding-window-traits.md) that defines styles f
### Static Methods
-|||
+|Name|Description|
|-|-|
|[GetWndClassInfo](#getwndclassinfo)|Returns a static instance of [CWndClassInfo](../../atl/reference/cwndclassinfo-class.md), which manages the window class information.|
|[WindowProc](#windowproc)|Processes messages sent to the window.|
### Data Members
-|||
+|Name|Description|
|-|-|
|[m_pfnSuperWindowProc](#m_pfnsuperwindowproc)|Points to the window class's original window procedure.|
@@ -275,7 +276,7 @@ virtual void OnFinalMessage(HWND hWnd);
### Remarks
-The default implementation of `OnFinalMessage` does nothing, but you can override this function to handle cleanup before destroying a window. If you want to automatically delete your object upon the window destruction, you can call **delete this;** in this function.
+The default implementation of `OnFinalMessage` does nothing, but you can override this function to handle cleanup before destroying a window. If you want to automatically delete your object upon the window destruction, you can call `delete this;` in this function.
## CWindowImpl::SubclassWindow
diff --git a/docs/atl/reference/cwintraits-class.md b/docs/atl/reference/cwintraits-class.md
index edf9eab9a4..e7d7b65eab 100644
--- a/docs/atl/reference/cwintraits-class.md
+++ b/docs/atl/reference/cwintraits-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CWinTraits Class"
title: "CWinTraits Class"
ms.date: "11/04/2016"
f1_keywords: ["CWinTraits", "ATLWIN/ATL::CWinTraits", "ATLWIN/ATL::CWinTraits::GetWndExStyle", "ATLWIN/ATL::CWinTraits::GetWndStyle"]
diff --git a/docs/atl/reference/cwintraitsor-class.md b/docs/atl/reference/cwintraitsor-class.md
index a705b20e6e..fbc54c0034 100644
--- a/docs/atl/reference/cwintraitsor-class.md
+++ b/docs/atl/reference/cwintraitsor-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CWinTraitsOR Class"
title: "CWinTraitsOR Class"
ms.date: "11/04/2016"
f1_keywords: ["CWinTraitsOR", "ATLWIN/ATL::CWinTraitsOR", "ATLWIN/ATL::CWinTraitsOR::GetWndExStyle", "ATLWIN/ATL::CWinTraitsOR::GetWndStyle"]
diff --git a/docs/atl/reference/cwndclassinfo-class.md b/docs/atl/reference/cwndclassinfo-class.md
index ad78e3059c..0ac4762455 100644
--- a/docs/atl/reference/cwndclassinfo-class.md
+++ b/docs/atl/reference/cwndclassinfo-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CWndClassInfo Class"
title: "CWndClassInfo Class"
ms.date: "11/04/2016"
f1_keywords: ["CWndClassInfo", "ATLWIN/ATL::CWndClassInfo", "ATLWIN/ATL::Register", "ATLWIN/ATL::m_atom", "ATLWIN/ATL::m_bSystemCursor", "ATLWIN/ATL::m_lpszCursorID", "ATLWIN/ATL::m_lpszOrigName", "ATLWIN/ATL::m_szAutoName", "ATLWIN/ATL::m_wc", "ATLWIN/ATL::pWndProc"]
@@ -22,13 +23,13 @@ class CWndClassInfo
### Public Methods
-|||
+|Name|Description|
|-|-|
|[Register](#register)|Registers the window class.|
### Data Members
-|||
+|Name|Description|
|-|-|
|[m_atom](#m_atom)|Uniquely identifies the registered window class.|
|[m_bSystemCursor](#m_bsystemcursor)|Specifies whether the cursor resource refers to a system cursor or to a cursor contained in a module resource.|
diff --git a/docs/atl/reference/cworkerthread-class.md b/docs/atl/reference/cworkerthread-class.md
index bcda16799c..a0171833ba 100644
--- a/docs/atl/reference/cworkerthread-class.md
+++ b/docs/atl/reference/cworkerthread-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: CWorkerThread Class"
title: "CWorkerThread Class"
ms.date: "11/04/2016"
f1_keywords: ["CWorkerThread", "ATLUTIL/ATL::CWorkerThread", "ATLUTIL/ATL::CWorkerThread::CWorkerThread", "ATLUTIL/ATL::CWorkerThread::AddHandle", "ATLUTIL/ATL::CWorkerThread::AddTimer", "ATLUTIL/ATL::CWorkerThread::GetThreadHandle", "ATLUTIL/ATL::CWorkerThread::GetThreadId", "ATLUTIL/ATL::CWorkerThread::Initialize", "ATLUTIL/ATL::CWorkerThread::RemoveHandle", "ATLUTIL/ATL::CWorkerThread::Shutdown"]
diff --git a/docs/atl/reference/debugging-and-error-reporting-global-functions.md b/docs/atl/reference/debugging-and-error-reporting-global-functions.md
index 1ef7f2aa0a..defba9ea3c 100644
--- a/docs/atl/reference/debugging-and-error-reporting-global-functions.md
+++ b/docs/atl/reference/debugging-and-error-reporting-global-functions.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Debugging and Error Reporting Global Functions"
title: "Debugging and Error Reporting Global Functions"
ms.date: "11/04/2016"
f1_keywords: ["atlcomcli/ATL::AtlHresultFromLastError", "atlcom/ATL::AtlReportError", "atldef/ATL::AtlThrow"]
@@ -9,7 +10,7 @@ ms.assetid: 11339c02-98cd-428d-b3b9-7deeb155a6a3
These functions provide useful debugging and trace facilities.
-|||
+|Name|Description|
|-|-|
|[AtlHresultFromLastError](debugging-and-error-reporting-global-functions.md#atlhresultfromlasterror)|Returns a `GetLastError` error code in the form of an HRESULT.|
|[AtlHresultFromWin32](debugging-and-error-reporting-global-functions.md#atlhresultfromwin32)|Converts a Win32 error code into an HRESULT.|
@@ -185,7 +186,7 @@ For ATL projects, it is possible to provide your own implementation of this func
[!code-cpp[NVC_ATL_Windowing#95](../../atl/codesnippet/cpp/debugging-and-error-reporting-global-functions_2.h)]
-## Requirements
+### Requirements
**Header:** atldef.h
@@ -207,7 +208,7 @@ If _ATL_NO_EXCEPTIONS is not defined in an ATL project, the function throws a [C
If _ATL_NO_EXCEPTIONS is defined, the function causes an assertion failure instead of throwing an exception.
-## Requirements
+### Requirements
**Header:** atldef.h
diff --git a/docs/atl/reference/debugging-and-error-reporting-macros.md b/docs/atl/reference/debugging-and-error-reporting-macros.md
index a117a291ae..463ef4c007 100644
--- a/docs/atl/reference/debugging-and-error-reporting-macros.md
+++ b/docs/atl/reference/debugging-and-error-reporting-macros.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: Debugging and Error Reporting Macros"
title: "Debugging and Error Reporting Macros"
ms.date: "05/06/2019"
-f1_keywords: ["atldef/ATL::_ATL_DEBUG_INTERFACES", "atldef/ATL::_ATL_DEBUG_QI", "atldef/ATL::ATLASSERT", "afx/ATL::ATLENSURE", "atltrace/ATL::ATLTRACENOTIMPL", "atltrace/ATL::ATLTRACE"]
+f1_keywords: ["atldef/ATL::_ATL_DEBUG_INTERFACES", "atldef/ATL::_ATL_DEBUG_QI", "atldef/ATL::ATLASSERT", "afx/ATL::ATLENSURE", "atltrace/ATL::ATLTRACENOTIMPL", "atltrace/ATL::ATLTRACE", "ATLDEF/_ATL_DEBUG_INTERFACES", "ATLDEF/_ATL_DEBUG_QI", "ATLDEF/ATLASSERT", "AFX/ATLENSURE", "ATLTRACE/ATLTRACENOTIMPL", "ATLTRACE/ATLTRACE", "ATLDEF/ATLSTATIC_ASSERT"]
helpviewer_keywords: ["macros, error reporting"]
ms.assetid: 4da9b87f-ec5c-4a32-ab93-637780909b9d
---
@@ -9,7 +10,7 @@ ms.assetid: 4da9b87f-ec5c-4a32-ab93-637780909b9d
These macros provide useful debugging and trace facilities.
-|||
+|Name|Description|
|-|-|
|[_ATL_DEBUG_INTERFACES](#_atl_debug_interfaces)|Writes, to the output window, any interface leaks that are detected when `_Module.Term` is called.|
|[_ATL_DEBUG_QI](#_atl_debug_qi)|Writes all calls to `QueryInterface` to the output window.|
@@ -81,7 +82,7 @@ Expression (including pointers) that evaluates to nonzero or 0.
In debug builds, ATLASSERT evaluates *booleanExpression* and generates a debug report when the result is false.
-## Requirements
+### Requirements
**Header:** atldef.h
@@ -118,7 +119,7 @@ The difference between ATLENSURE and ATLASSERT is that ATLENSURE throws an excep
[!code-cpp[NVC_ATL_Utilities#108](../../atl/codesnippet/cpp/debugging-and-error-reporting-macros_1.cpp)]
-## Requirements
+### Requirements
**Header:** afx.h
@@ -143,7 +144,7 @@ In release builds, simply returns E_NOTIMPL.
[!code-cpp[NVC_ATL_Utilities#127](../../atl/codesnippet/cpp/debugging-and-error-reporting-macros_2.cpp)]
-## Requirements
+### Requirements
**Header:** atltrace.h
diff --git a/docs/atl/reference/default-atl-project-configurations.md b/docs/atl/reference/default-atl-project-configurations.md
index 64322e635f..0b8caec7af 100644
--- a/docs/atl/reference/default-atl-project-configurations.md
+++ b/docs/atl/reference/default-atl-project-configurations.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Default ATL Project Configurations"
title: "Default ATL Project Configurations"
ms.date: "10/20/2017"
helpviewer_keywords: ["ATL projects, default configurations"]
diff --git a/docs/atl/reference/device-context-global-functions.md b/docs/atl/reference/device-context-global-functions.md
index eccdceccbe..7ef43f0431 100644
--- a/docs/atl/reference/device-context-global-functions.md
+++ b/docs/atl/reference/device-context-global-functions.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Device Context Global Functions"
title: "Device Context Global Functions"
ms.date: "11/04/2016"
f1_keywords: ["atlwin/ATL::AtlCreateTargetDC"]
@@ -8,7 +9,7 @@ ms.assetid: 08ec28f6-daff-4882-9544-e8a4639d05c4
This function creates a device context for a given device.
-|||
+|Name|Description|
|-|-|
|[AtlCreateTargetDC](#atlcreatetargetdc)|Creates a device context.|
diff --git a/docs/atl/reference/event-handling-global-functions.md b/docs/atl/reference/event-handling-global-functions.md
index 45dbc01812..69c6f619b6 100644
--- a/docs/atl/reference/event-handling-global-functions.md
+++ b/docs/atl/reference/event-handling-global-functions.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Event Handling Global Functions"
title: "Event Handling Global Functions"
ms.date: "11/04/2016"
f1_keywords: ["atlbase/ATL::AtlWaitWithMessageLoop"]
@@ -12,7 +13,7 @@ This function provides an event handler.
> [!IMPORTANT]
> The function listed in the following table cannot be used in applications that execute in the Windows Runtime.
-|||
+|Name|Description|
|-|-|
|[AtlWaitWithMessageLoop](#atlwaitwithmessageloop)|Waits for an object to be signaled, meanwhile dispatching window messages as needed.|
diff --git a/docs/atl/reference/exception-handling-macros.md b/docs/atl/reference/exception-handling-macros.md
index 83bda37e74..44f9993452 100644
--- a/docs/atl/reference/exception-handling-macros.md
+++ b/docs/atl/reference/exception-handling-macros.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: Exception Handling Macros"
title: "Exception Handling Macros"
ms.date: "11/04/2016"
-f1_keywords: ["atldef/ATL::_ATLCATCH", "atldef/ATL::_ATLCATCHALL", "atldef/ATL::_ATLTRY"]
+f1_keywords: ["atldef/ATL::_ATLCATCH", "atldef/ATL::_ATLCATCHALL", "atldef/ATL::_ATLTRY", "ATLDEF/_ATLCATCH", "ATLDEF/_ATLCATCHALL", "ATLDEF/_ATLTRY"]
helpviewer_keywords: ["exception handling, macros", "C++ exception handling, macros"]
ms.assetid: a8385d34-3fb0-4006-a42a-de045cacf0f4
---
@@ -9,7 +10,7 @@ ms.assetid: a8385d34-3fb0-4006-a42a-de045cacf0f4
These macros provide support for exception handling.
-|||
+|Name|Description|
|-|-|
|[_ATLCATCH](#_atlcatch)|Statement(s) to handle errors occurring in the associated `_ATLTRY`.|
|[_ATLCATCHALL](#_atlcatchall)|Statement(s) to handle errors occurring in the associated `_ATLTRY`.|
diff --git a/docs/atl/reference/iatlautothreadmodule-class.md b/docs/atl/reference/iatlautothreadmodule-class.md
index 37ebd8f254..42df620330 100644
--- a/docs/atl/reference/iatlautothreadmodule-class.md
+++ b/docs/atl/reference/iatlautothreadmodule-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IAtlAutoThreadModule Class"
title: "IAtlAutoThreadModule Class"
ms.date: "11/04/2016"
f1_keywords: ["IAtlAutoThreadModule", "atlbase/ATL::IAtlAutoThreadModule"]
diff --git a/docs/atl/reference/iatlmemmgr-class.md b/docs/atl/reference/iatlmemmgr-class.md
index 7dac87c9fa..46acd30174 100644
--- a/docs/atl/reference/iatlmemmgr-class.md
+++ b/docs/atl/reference/iatlmemmgr-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IAtlMemMgr Class"
title: "IAtlMemMgr Class"
ms.date: "11/04/2016"
f1_keywords: ["IAtlMemMgr", "ATLMEM/ATL::IAtlMemMgr", "ATLMEM/ATL::Allocate", "ATLMEM/ATL::Free", "ATLMEM/ATL::GetSize", "ATLMEM/ATL::Reallocate"]
@@ -19,7 +20,7 @@ __interface __declspec(uuid("654F7EF5-CFDF-4df9-A450-6C6A13C622C0")) IAtlMemMgr
### Methods
-|||
+|Name|Description|
|-|-|
|[Allocate](#allocate)|Call this method to allocate a block of memory.|
|[Free](#free)|Call this method to free a block of memory.|
@@ -922,7 +923,7 @@ Calling this method is equivalent to calling [IAxWinHostWindowLic::CreateControl
### Example
-See [Hosting ActiveX Controls Using ATL AXHost](../../atl/hosting-activex-controls-using-atl-axhost.md) for a sample that uses `IAxWinHostWindowLic::CreateControlLic`.
+See [Hosting ActiveX Controls Using ATL AXHost](../../atl/atl-control-containment-faq.yml#hosting-activex-controls-using-atl-axhost) for a sample that uses `IAxWinHostWindowLic::CreateControlLic`.
## IAxWinHostWindowLic::CreateControlLicEx
@@ -950,7 +951,7 @@ See [IAxWinHostWindow::CreateControlEx](#createcontrolex) for a description of t
### Example
-See [Hosting ActiveX Controls Using ATL AXHost](../../atl/hosting-activex-controls-using-atl-axhost.md) for a sample that uses `IAxWinHostWindowLic::CreateControlLicEx`.
+See [Hosting ActiveX Controls Using ATL AXHost](../../atl/atl-control-containment-faq.yml#hosting-activex-controls-using-atl-axhost) for a sample that uses `IAxWinHostWindowLic::CreateControlLicEx`.
## See also
diff --git a/docs/atl/reference/iaxwinambientdispatch-interface.md b/docs/atl/reference/iaxwinambientdispatch-interface.md
index 675d1e3905..f1799cf5b2 100644
--- a/docs/atl/reference/iaxwinambientdispatch-interface.md
+++ b/docs/atl/reference/iaxwinambientdispatch-interface.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IAxWinAmbientDispatch Interface"
title: "IAxWinAmbientDispatch Interface"
ms.date: "11/04/2016"
f1_keywords: ["IAxWinAmbientDispatch", "ATLIFACE/ATL::IAxWinAmbientDispatch", "ATLIFACE/ATL::get_AllowContextMenu", "ATLIFACE/ATL::get_AllowShowUI", "ATLIFACE/ATL::get_AllowWindowlessActivation", "ATLIFACE/ATL::get_BackColor", "ATLIFACE/ATL::get_DisplayAsDefault", "ATLIFACE/ATL::get_DocHostDoubleClickFlags", "ATLIFACE/ATL::get_DocHostFlags", "ATLIFACE/ATL::get_Font", "ATLIFACE/ATL::get_ForeColor", "ATLIFACE/ATL::get_LocaleID", "ATLIFACE/ATL::get_MessageReflect", "ATLIFACE/ATL::get_OptionKeyPath", "ATLIFACE/ATL::get_ShowGrabHandles", "ATLIFACE/ATL::get_ShowHatching", "ATLIFACE/ATL::get_UserMode", "ATLIFACE/ATL::put_AllowContextMenu", "ATLIFACE/ATL::put_AllowShowUI", "ATLIFACE/ATL::put_AllowWindowlessActivation", "ATLIFACE/ATL::put_BackColor", "ATLIFACE/ATL::put_DisplayAsDefault", "ATLIFACE/ATL::put_DocHostDoubleClickFlags", "ATLIFACE/ATL::put_DocHostFlags", "ATLIFACE/ATL::put_Font", "ATLIFACE/ATL::put_ForeColor", "ATLIFACE/ATL::put_LocaleID", "ATLIFACE/ATL::put_MessageReflect", "ATLIFACE/ATL::put_OptionKeyPath", "ATLIFACE/ATL::put_UserMode"]
@@ -22,7 +23,7 @@ interface IAxWinAmbientDispatch : IDispatch
### Methods
-|||
+|Name|Description|
|-|-|
|[get_AllowContextMenu](#get_allowcontextmenu)|The `AllowContextMenu` property specifies whether the hosted control is allowed to display its own context menu.|
|[get_AllowShowUI](#get_allowshowui)|The `AllowShowUI` property specifies whether the hosted control is allowed to display its own user interface.|
@@ -61,7 +62,7 @@ This interface is exposed by ATL's ActiveX control hosting objects. Call the met
If you are linking to ATL90.dll, **AXHost** will load the type information from the typelib in the DLL.
-See [Hosting ActiveX Controls Using ATL AXHost](../../atl/hosting-activex-controls-using-atl-axhost.md) for more details.
+See [Hosting ActiveX Controls Using ATL AXHost](../../atl/atl-control-containment-faq.yml#hosting-activex-controls-using-atl-axhost) for more details.
## Requirements
diff --git a/docs/atl/reference/iaxwinambientdispatchex-interface.md b/docs/atl/reference/iaxwinambientdispatchex-interface.md
index 245a0dbf34..4df19f4e98 100644
--- a/docs/atl/reference/iaxwinambientdispatchex-interface.md
+++ b/docs/atl/reference/iaxwinambientdispatchex-interface.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IAxWinAmbientDispatchEx Interface"
title: "IAxWinAmbientDispatchEx Interface"
ms.date: "11/04/2016"
f1_keywords: ["IAxWinAmbientDispatchEx", "ATLIFACE/ATL::IAxWinAmbientDispatchEx", "ATLIFACE/ATL::SetAmbientDispatch"]
@@ -22,7 +23,7 @@ MIDL_INTERFACE("B2D0778B - AC99 - 4c58 - A5C8 - E7724E5316B5") IAxWinAmbientDisp
### Methods
-|||
+|Name|Description|
|-|-|
|[SetAmbientDispatch](#setambientdispatch)|This method is called to supplement the default ambient property interface with a user-defined interface.|
@@ -36,7 +37,7 @@ This interface is exposed by ATL's ActiveX control hosting objects. Derived from
If you are linking to ATL90.dll, **AXHost** will load the type information from the type library in the DLL.
-See [Hosting ActiveX Controls Using ATL AXHost](../../atl/hosting-activex-controls-using-atl-axhost.md) for more details.
+See [Hosting ActiveX Controls Using ATL AXHost](../../atl/atl-control-containment-faq.yml#hosting-activex-controls-using-atl-axhost) for more details.
## Requirements
diff --git a/docs/atl/reference/iaxwinhostwindow-interface.md b/docs/atl/reference/iaxwinhostwindow-interface.md
index 9268326bc4..38ea65043d 100644
--- a/docs/atl/reference/iaxwinhostwindow-interface.md
+++ b/docs/atl/reference/iaxwinhostwindow-interface.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IAxWinHostWindow Interface"
title: "IAxWinHostWindow Interface"
ms.date: "11/04/2016"
f1_keywords: ["IAxWinHostWindow", "ATLIFACE/ATL::IAxWinHostWindow", "ATLIFACE/ATL::AttachControl", "ATLIFACE/ATL::CreateControl", "ATLIFACE/ATL::CreateControlEx", "ATLIFACE/ATL::QueryControl", "ATLIFACE/ATL::SetExternalDispatch", "ATLIFACE/ATL::SetExternalUIHandler"]
@@ -22,7 +23,7 @@ interface IAxWinHostWindow : IUnknown
### Methods
-|||
+|Name|Description|
|-|-|
|[AttachControl](#attachcontrol)|Attaches an existing control to the host object.|
|[CreateControl](#createcontrol)|Creates a control and attaches it to the host object.|
diff --git a/docs/atl/reference/iaxwinhostwindowlic-interface.md b/docs/atl/reference/iaxwinhostwindowlic-interface.md
index 0424951ff6..e2d65671f2 100644
--- a/docs/atl/reference/iaxwinhostwindowlic-interface.md
+++ b/docs/atl/reference/iaxwinhostwindowlic-interface.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IAxWinHostWindowLic Interface"
title: "IAxWinHostWindowLic Interface"
ms.date: "11/04/2016"
f1_keywords: ["IAxWinHostWindowLic", "ATLIFACE/ATL::IAxWinHostWindowLic", "ATLIFACE/ATL::CreateControlLic", "ATLIFACE/ATL::CreateControlLicEx"]
@@ -19,7 +20,7 @@ interface IAxWinHostWindowLic : IAxWinHostWindow
### Methods
-|||
+|Name|Description|
|-|-|
|[CreateControlLic](#createcontrollic)|Creates a licensed control and attaches it to the host object.|
|[CreateControlLicEx](#createcontrollicex)|Creates a licensed control, attaches it to the host object, and optionally sets up an event handler.|
@@ -28,7 +29,7 @@ interface IAxWinHostWindowLic : IAxWinHostWindow
`IAxWinHostWindowLic` inherits from [IAxWinHostWindow](../../atl/reference/iaxwinhostwindow-interface.md) and adds methods that support the creation of licensed controls.
-See [Hosting ActiveX Controls Using ATL AXHost](../../atl/hosting-activex-controls-using-atl-axhost.md) for a sample that uses the members of this interface.
+See [Hosting ActiveX Controls Using ATL AXHost](../../atl/atl-control-containment-faq.yml#hosting-activex-controls-using-atl-axhost) for a sample that uses the members of this interface.
## Requirements
@@ -64,7 +65,7 @@ Calling this method is equivalent to calling [IAxWinHostWindowLic::CreateControl
### Example
-See [Hosting ActiveX Controls Using ATL AXHost](../../atl/hosting-activex-controls-using-atl-axhost.md) for a sample that uses `IAxWinHostWindowLic::CreateControlLic`.
+See [Hosting ActiveX Controls Using ATL AXHost](../../atl/atl-control-containment-faq.yml#hosting-activex-controls-using-atl-axhost) for a sample that uses `IAxWinHostWindowLic::CreateControlLic`.
## IAxWinHostWindowLic::CreateControlLicEx
@@ -92,4 +93,4 @@ See [IAxWinHostWindow::CreateControlEx](../../atl/reference/iaxwinhostwindow-int
### Example
-See [Hosting ActiveX Controls Using ATL AXHost](../../atl/hosting-activex-controls-using-atl-axhost.md) for a sample that uses `IAxWinHostWindowLic::CreateControlLicEx`.
+See [Hosting ActiveX Controls Using ATL AXHost](../../atl/atl-control-containment-faq.yml#hosting-activex-controls-using-atl-axhost) for a sample that uses `IAxWinHostWindowLic::CreateControlLicEx`.
diff --git a/docs/atl/reference/icollectiononstlimpl-class.md b/docs/atl/reference/icollectiononstlimpl-class.md
index 8bca109cb6..58c7584c39 100644
--- a/docs/atl/reference/icollectiononstlimpl-class.md
+++ b/docs/atl/reference/icollectiononstlimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ICollectionOnSTLImpl Class"
title: "ICollectionOnSTLImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["ICollectionOnSTLImpl", "ATLCOM/ATL::ICollectionOnSTLImpl", "ATLCOM/ATL::ICollectionOnSTLImpl::get__NewEnum", "ATLCOM/ATL::ICollectionOnSTLImpl::getcount", "ATLCOM/ATL::ICollectionOnSTLImpl::get_Item", "ATLCOM/ATL::ICollectionOnSTLImpl::m_coll"]
diff --git a/docs/atl/reference/iconnectionpointcontainerimpl-class.md b/docs/atl/reference/iconnectionpointcontainerimpl-class.md
index c52fe4e64e..fd6e2362ee 100644
--- a/docs/atl/reference/iconnectionpointcontainerimpl-class.md
+++ b/docs/atl/reference/iconnectionpointcontainerimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IConnectionPointContainerImpl Class"
title: "IConnectionPointContainerImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IConnectionPointContainerImpl", "ATLCOM/ATL::IConnectionPointContainerImpl", "ATLCOM/ATL::IConnectionPointContainerImpl::EnumConnectionPoints", "ATLCOM/ATL::IConnectionPointContainerImpl::FindConnectionPoint"]
diff --git a/docs/atl/reference/iconnectionpointimpl-class.md b/docs/atl/reference/iconnectionpointimpl-class.md
index 59b68171d9..2b51b7bc46 100644
--- a/docs/atl/reference/iconnectionpointimpl-class.md
+++ b/docs/atl/reference/iconnectionpointimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IConnectionPointImpl Class"
title: "IConnectionPointImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IConnectionPointImpl", "ATLCOM/ATL::IConnectionPointImpl", "ATLCOM/ATL::IConnectionPointImpl::Advise", "ATLCOM/ATL::IConnectionPointImpl::EnumConnections", "ATLCOM/ATL::IConnectionPointImpl::GetConnectionInterface", "ATLCOM/ATL::IConnectionPointImpl::GetConnectionPointContainer", "ATLCOM/ATL::IConnectionPointImpl::Unadvise", "ATLCOM/ATL::IConnectionPointImpl::m_vec"]
diff --git a/docs/atl/reference/idataobjectimpl-class.md b/docs/atl/reference/idataobjectimpl-class.md
index a3b57a3d14..3ebc3c4402 100644
--- a/docs/atl/reference/idataobjectimpl-class.md
+++ b/docs/atl/reference/idataobjectimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IDataObjectImpl Class"
title: "IDataObjectImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IDataObjectImpl", "ATLCTL/ATL::IDataObjectImpl", "ATLCTL/ATL::IDataObjectImpl::DAdvise", "ATLCTL/ATL::IDataObjectImpl::DUnadvise", "ATLCTL/ATL::IDataObjectImpl::EnumDAdvise", "ATLCTL/ATL::IDataObjectImpl::EnumFormatEtc", "ATLCTL/ATL::IDataObjectImpl::FireDataChange", "ATLCTL/ATL::IDataObjectImpl::GetCanonicalFormatEtc", "ATLCTL/ATL::IDataObjectImpl::GetData", "ATLCTL/ATL::IDataObjectImpl::GetDataHere", "ATLCTL/ATL::IDataObjectImpl::QueryGetData", "ATLCTL/ATL::IDataObjectImpl::SetData"]
diff --git a/docs/atl/reference/idispatchimpl-class.md b/docs/atl/reference/idispatchimpl-class.md
index 5fd65880b4..e44623c762 100644
--- a/docs/atl/reference/idispatchimpl-class.md
+++ b/docs/atl/reference/idispatchimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IDispatchImpl Class"
title: "IDispatchImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IDispatchImpl", "ATLCOM/ATL::IDispatchImpl", "ATLCOM/ATL::IDispatchImpl::IDispatchImpl", "ATLCOM/ATL::IDispatchImpl::GetIDsOfNames", "ATLCOM/ATL::IDispatchImpl::GetTypeInfo", "ATLCOM/ATL::IDispatchImpl::GetTypeInfoCount", "ATLCOM/ATL::IDispatchImpl::Invoke"]
diff --git a/docs/atl/reference/idispeventimpl-class.md b/docs/atl/reference/idispeventimpl-class.md
index 2e30973f95..ef54c3c7b5 100644
--- a/docs/atl/reference/idispeventimpl-class.md
+++ b/docs/atl/reference/idispeventimpl-class.md
@@ -1,11 +1,11 @@
---
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.
@@ -14,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
@@ -53,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
@@ -77,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
@@ -96,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,
@@ -118,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,
@@ -149,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);
@@ -188,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
@@ -200,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;
```
@@ -224,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/idispeventsimpleimpl-class.md b/docs/atl/reference/idispeventsimpleimpl-class.md
index 22386ac001..c76ceee129 100644
--- a/docs/atl/reference/idispeventsimpleimpl-class.md
+++ b/docs/atl/reference/idispeventsimpleimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IDispEventSimpleImpl Class"
title: "IDispEventSimpleImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IDispEventSimpleImpl", "ATLCOM/ATL::IDispEventSimpleImpl", "ATLCOM/ATL::IDispEventSimpleImpl::Advise", "ATLCOM/ATL::IDispEventSimpleImpl::DispEventAdvise", "ATLCOM/ATL::IDispEventSimpleImpl::DispEventUnadvise", "ATLCOM/ATL::IDispEventSimpleImpl::GetIDsOfNames", "ATLCOM/ATL::IDispEventSimpleImpl::GetTypeInfo", "ATLCOM/ATL::IDispEventSimpleImpl::GetTypeInfoCount", "ATLCOM/ATL::IDispEventSimpleImpl::Invoke", "ATLCOM/ATL::IDispEventSimpleImpl::Unadvise"]
diff --git a/docs/atl/reference/idochostuihandlerdispatch-interface.md b/docs/atl/reference/idochostuihandlerdispatch-interface.md
index d644040fc1..d748d3e3df 100644
--- a/docs/atl/reference/idochostuihandlerdispatch-interface.md
+++ b/docs/atl/reference/idochostuihandlerdispatch-interface.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IDocHostUIHandlerDispatch Interface"
title: "IDocHostUIHandlerDispatch Interface"
ms.date: "07/02/2019"
f1_keywords: ["IDocHostUIHandlerDispatch", "atlbase/ATL::IDocHostUIHandlerDispatch"]
@@ -25,7 +26,7 @@ interface IDocHostUIHandlerDispatch : IDispatch
> [!NOTE]
> The links in the following table are to the INet SDK reference topics for the members of the [IDocUIHostHandler](/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa753260\(v=vs.85\)) interface. `IDocHostUIHandlerDispatch` has the same functionality as `IDocUIHostHandler`, with the difference being that `IDocHostUIHandlerDispatch` is a dispinterface whereas `IDocUIHostHandler` is a custom interface.
-|||
+|Name|Description|
|-|-|
|[EnableModeless](/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa753253\(v=vs.85\))|Called from MSHTML implementation of [IOleInPlaceActiveObject::EnableModeless](/windows/win32/api/oleidl/nf-oleidl-ioleinplaceactiveobject-enablemodeless). Also called when MSHTML displays modal UI.|
|[FilterDataObject](/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa753254\(v=vs.85\))|Called on the host by MSHTML to allow the host to replace MSHTML's data object.|
diff --git a/docs/atl/reference/ienumonstlimpl-class.md b/docs/atl/reference/ienumonstlimpl-class.md
index 7dd99ea06b..c8c694372a 100644
--- a/docs/atl/reference/ienumonstlimpl-class.md
+++ b/docs/atl/reference/ienumonstlimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IEnumOnSTLImpl Class"
title: "IEnumOnSTLImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IEnumOnSTLImpl", "ATLCOM/ATL::IEnumOnSTLImpl", "ATLCOM/ATL::IEnumOnSTLImpl::Clone", "ATLCOM/ATL::IEnumOnSTLImpl::Init", "ATLCOM/ATL::IEnumOnSTLImpl::Next", "ATLCOM/ATL::IEnumOnSTLImpl::Reset", "ATLCOM/ATL::IEnumOnSTLImpl::Skip", "ATLCOM/ATL::IEnumOnSTLImpl::m_iter", "ATLCOM/ATL::IEnumOnSTLImpl::m_pcollection", "ATLCOM/ATL::IEnumOnSTLImpl::m_spUnk"]
diff --git a/docs/atl/reference/interfaces-atl-control-wizard.md b/docs/atl/reference/interfaces-atl-control-wizard.md
index e7e4a350cf..97794e03f9 100644
--- a/docs/atl/reference/interfaces-atl-control-wizard.md
+++ b/docs/atl/reference/interfaces-atl-control-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Interfaces, ATL Control Wizard"
title: "Interfaces, ATL Control Wizard"
ms.date: "11/04/2016"
f1_keywords: ["vc.codewiz.class.atl.control.interfaces"]
diff --git a/docs/atl/reference/iobjectsafetyimpl-class.md b/docs/atl/reference/iobjectsafetyimpl-class.md
index 8d42815b40..dee092995f 100644
--- a/docs/atl/reference/iobjectsafetyimpl-class.md
+++ b/docs/atl/reference/iobjectsafetyimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IObjectSafetyImpl Class"
title: "IObjectSafetyImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IObjectSafetyImpl", "ATLCTL/ATL::IObjectSafetyImpl", "ATLCTL/ATL::IObjectSafetyImpl::GetInterfaceSafetyOptions", "ATLCTL/ATL::IObjectSafetyImpl::SetInterfaceSafetyOptions", "ATLCTL/ATL::IObjectSafetyImpl::m_dwCurrentSafety"]
diff --git a/docs/atl/reference/iobjectwithsiteimpl-class.md b/docs/atl/reference/iobjectwithsiteimpl-class.md
index eac5b95656..5ae9a4b8d7 100644
--- a/docs/atl/reference/iobjectwithsiteimpl-class.md
+++ b/docs/atl/reference/iobjectwithsiteimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IObjectWithSiteImpl Class"
title: "IObjectWithSiteImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IObjectWithSiteImpl", "ATLCOM/ATL::IObjectWithSiteImpl", "ATLCOM/ATL::IObjectWithSiteImpl::GetSite", "ATLCOM/ATL::IObjectWithSiteImpl::SetChildSite", "ATLCOM/ATL::IObjectWithSiteImpl::SetSite", "ATLCOM/ATL::IObjectWithSiteImpl::m_spUnkSite"]
diff --git a/docs/atl/reference/iolecontrolimpl-class.md b/docs/atl/reference/iolecontrolimpl-class.md
index a9fe4c7585..6c3430e9ce 100644
--- a/docs/atl/reference/iolecontrolimpl-class.md
+++ b/docs/atl/reference/iolecontrolimpl-class.md
@@ -1,9 +1,9 @@
---
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
@@ -21,7 +21,7 @@ class IOleControlImpl
#### Parameters
-*T*
+*T*\
Your class, derived from `IOleControlImpl`.
## Members
@@ -75,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
@@ -115,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/ioleinplaceactiveobjectimpl-class.md b/docs/atl/reference/ioleinplaceactiveobjectimpl-class.md
index 136cf6f050..64fcdcd25b 100644
--- a/docs/atl/reference/ioleinplaceactiveobjectimpl-class.md
+++ b/docs/atl/reference/ioleinplaceactiveobjectimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IOleInPlaceActiveObjectImpl Class"
title: "IOleInPlaceActiveObjectImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IOleInPlaceActiveObjectImpl", "ATLCTL/ATL::IOleInPlaceActiveObjectImpl", "ATLCTL/ATL::IOleInPlaceActiveObjectImpl::ContextSensitiveHelp", "ATLCTL/ATL::IOleInPlaceActiveObjectImpl::EnableModeless", "ATLCTL/ATL::IOleInPlaceActiveObjectImpl::GetWindow", "ATLCTL/ATL::IOleInPlaceActiveObjectImpl::OnDocWindowActivate", "ATLCTL/ATL::IOleInPlaceActiveObjectImpl::OnFrameWindowActivate", "ATLCTL/ATL::IOleInPlaceActiveObjectImpl::ResizeBorder", "ATLCTL/ATL::IOleInPlaceActiveObjectImpl::TranslateAccelerator"]
diff --git a/docs/atl/reference/ioleinplaceobjectwindowlessimpl-class.md b/docs/atl/reference/ioleinplaceobjectwindowlessimpl-class.md
index b265d237ea..d34f0d80b9 100644
--- a/docs/atl/reference/ioleinplaceobjectwindowlessimpl-class.md
+++ b/docs/atl/reference/ioleinplaceobjectwindowlessimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IOleInPlaceObjectWindowlessImpl Class"
title: "IOleInPlaceObjectWindowlessImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IOleInPlaceObjectWindowlessImpl", "ATLCTL/ATL::IOleInPlaceObjectWindowlessImpl", "ATLCTL/ATL::IOleInPlaceObjectWindowlessImpl::ContextSensitiveHelp", "ATLCTL/ATL::IOleInPlaceObjectWindowlessImpl::GetDropTarget", "ATLCTL/ATL::IOleInPlaceObjectWindowlessImpl::GetWindow", "ATLCTL/ATL::IOleInPlaceObjectWindowlessImpl::InPlaceDeactivate", "ATLCTL/ATL::IOleInPlaceObjectWindowlessImpl::OnWindowMessage", "ATLCTL/ATL::IOleInPlaceObjectWindowlessImpl::ReactivateAndUndo", "ATLCTL/ATL::IOleInPlaceObjectWindowlessImpl::SetObjectRects", "ATLCTL/ATL::IOleInPlaceObjectWindowlessImpl::UIDeactivate"]
diff --git a/docs/atl/reference/ioleobjectimpl-class.md b/docs/atl/reference/ioleobjectimpl-class.md
index f8c25ab5c3..888f9c0db9 100644
--- a/docs/atl/reference/ioleobjectimpl-class.md
+++ b/docs/atl/reference/ioleobjectimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IOleObjectImpl Class"
title: "IOleObjectImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IOleObjectImpl", "ATLCTL/ATL::IOleObjectImpl", "ATLCTL/ATL::IOleObjectImpl::Advise", "ATLCTL/ATL::IOleObjectImpl::Close", "ATLCTL/ATL::IOleObjectImpl::DoVerb", "ATLCTL/ATL::IOleObjectImpl::DoVerbDiscardUndo", "ATLCTL/ATL::IOleObjectImpl::DoVerbHide", "ATLCTL/ATL::IOleObjectImpl::DoVerbInPlaceActivate", "ATLCTL/ATL::IOleObjectImpl::DoVerbOpen", "ATLCTL/ATL::IOleObjectImpl::DoVerbPrimary", "ATLCTL/ATL::IOleObjectImpl::DoVerbShow", "ATLCTL/ATL::IOleObjectImpl::DoVerbUIActivate", "ATLCTL/ATL::IOleObjectImpl::EnumAdvise", "ATLCTL/ATL::IOleObjectImpl::EnumVerbs", "ATLCTL/ATL::IOleObjectImpl::GetClientSite", "ATLCTL/ATL::IOleObjectImpl::GetClipboardData", "ATLCTL/ATL::IOleObjectImpl::GetExtent", "ATLCTL/ATL::IOleObjectImpl::GetMiscStatus", "ATLCTL/ATL::IOleObjectImpl::GetMoniker", "ATLCTL/ATL::IOleObjectImpl::GetUserClassID", "ATLCTL/ATL::IOleObjectImpl::GetUserType", "ATLCTL/ATL::IOleObjectImpl::InitFromData", "ATLCTL/ATL::IOleObjectImpl::IsUpToDate", "ATLCTL/ATL::IOleObjectImpl::OnPostVerbDiscardUndo", "ATLCTL/ATL::IOleObjectImpl::OnPostVerbHide", "ATLCTL/ATL::IOleObjectImpl::OnPostVerbInPlaceActivate", "ATLCTL/ATL::IOleObjectImpl::OnPostVerbOpen", "ATLCTL/ATL::IOleObjectImpl::OnPostVerbShow", "ATLCTL/ATL::IOleObjectImpl::OnPostVerbUIActivate", "ATLCTL/ATL::IOleObjectImpl::OnPreVerbDiscardUndo", "ATLCTL/ATL::IOleObjectImpl::OnPreVerbHide", "ATLCTL/ATL::IOleObjectImpl::OnPreVerbInPlaceActivate", "ATLCTL/ATL::IOleObjectImpl::OnPreVerbOpen", "ATLCTL/ATL::IOleObjectImpl::OnPreVerbShow", "ATLCTL/ATL::IOleObjectImpl::OnPreVerbUIActivate", "ATLCTL/ATL::IOleObjectImpl::SetClientSite", "ATLCTL/ATL::IOleObjectImpl::SetColorScheme", "ATLCTL/ATL::IOleObjectImpl::SetExtent", "ATLCTL/ATL::IOleObjectImpl::SetHostNames", "ATLCTL/ATL::IOleObjectImpl::SetMoniker", "ATLCTL/ATL::IOleObjectImpl::Unadvise", "ATLCTL/ATL::IOleObjectImpl::Update"]
diff --git a/docs/atl/reference/iperpropertybrowsingimpl-class.md b/docs/atl/reference/iperpropertybrowsingimpl-class.md
index d2a0ca55e2..c5f0e2678e 100644
--- a/docs/atl/reference/iperpropertybrowsingimpl-class.md
+++ b/docs/atl/reference/iperpropertybrowsingimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IPerPropertyBrowsingImpl Class"
title: "IPerPropertyBrowsingImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IPerPropertyBrowsingImpl", "ATLCTL/ATL::IPerPropertyBrowsingImpl", "ATLCTL/ATL::IPerPropertyBrowsingImpl::GetDisplayString", "ATLCTL/ATL::IPerPropertyBrowsingImpl::GetPredefinedStrings", "ATLCTL/ATL::IPerPropertyBrowsingImpl::GetPredefinedValue", "ATLCTL/ATL::IPerPropertyBrowsingImpl::MapPropertyToPage"]
@@ -15,7 +16,6 @@ This class implements `IUnknown` and allows a client to access the information i
## Syntax
```
-
template
class ATL_NO_VTABLE IPerPropertyBrowsingImpl :
public IPerPropertyBrowsing
diff --git a/docs/atl/reference/ipersistpropertybagimpl-class.md b/docs/atl/reference/ipersistpropertybagimpl-class.md
index 38f496cc68..b9029c339d 100644
--- a/docs/atl/reference/ipersistpropertybagimpl-class.md
+++ b/docs/atl/reference/ipersistpropertybagimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IPersistPropertyBagImpl Class"
title: "IPersistPropertyBagImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IPersistPropertyBagImpl", "ATLCOM/ATL::IPersistPropertyBagImpl", "ATLCOM/ATL::IPersistPropertyBagImpl::GetClassID", "ATLCOM/ATL::IPersistPropertyBagImpl::InitNew", "ATLCOM/ATL::IPersistPropertyBagImpl::Load", "ATLCOM/ATL::IPersistPropertyBagImpl::Save"]
diff --git a/docs/atl/reference/ipersiststorageimpl-class.md b/docs/atl/reference/ipersiststorageimpl-class.md
index 33b8a69e34..a5396bee53 100644
--- a/docs/atl/reference/ipersiststorageimpl-class.md
+++ b/docs/atl/reference/ipersiststorageimpl-class.md
@@ -1,9 +1,9 @@
---
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
@@ -21,7 +21,7 @@ class ATL_NO_VTABLE IPersistStorageImpl : public IPersistStorage
#### Parameters
-*T*
+*T*\
Your class, derived from `IPersistStorageImpl`.
## Members
@@ -96,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
@@ -110,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
@@ -124,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
@@ -138,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
@@ -154,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/atl/reference/ipersiststreaminitimpl-class.md b/docs/atl/reference/ipersiststreaminitimpl-class.md
index 2dc0fb2983..3eab5ba63c 100644
--- a/docs/atl/reference/ipersiststreaminitimpl-class.md
+++ b/docs/atl/reference/ipersiststreaminitimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IPersistStreamInitImpl Class"
title: "IPersistStreamInitImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IPersistStreamInitImpl", "ATLCOM/ATL::IPersistStreamInitImpl", "ATLCOM/ATL::IPersistStreamInitImpl::GetClassID", "ATLCOM/ATL::IPersistStreamInitImpl::GetSizeMax", "ATLCOM/ATL::IPersistStreamInitImpl::InitNew", "ATLCOM/ATL::IPersistStreamInitImpl::IsDirty", "ATLCOM/ATL::IPersistStreamInitImpl::Load", "ATLCOM/ATL::IPersistStreamInitImpl::Save"]
diff --git a/docs/atl/reference/ipointerinactiveimpl-class.md b/docs/atl/reference/ipointerinactiveimpl-class.md
index e3e0e0d70a..7118949124 100644
--- a/docs/atl/reference/ipointerinactiveimpl-class.md
+++ b/docs/atl/reference/ipointerinactiveimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IPointerInactiveImpl Class"
title: "IPointerInactiveImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IPointerInactiveImpl", "ATLCTL/ATL::IPointerInactiveImpl", "ATLCTL/ATL::IPointerInactiveImpl::GetActivationPolicy", "ATLCTL/ATL::IPointerInactiveImpl::OnInactiveMouseMove", "ATLCTL/ATL::IPointerInactiveImpl::OnInactiveSetCursor"]
diff --git a/docs/atl/reference/ipropertynotifysinkcp-class.md b/docs/atl/reference/ipropertynotifysinkcp-class.md
index fca5d29f3c..b02d41d33b 100644
--- a/docs/atl/reference/ipropertynotifysinkcp-class.md
+++ b/docs/atl/reference/ipropertynotifysinkcp-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IPropertyNotifySinkCP Class"
title: "IPropertyNotifySinkCP Class"
ms.date: "11/04/2016"
f1_keywords: ["IPropertyNotifySinkCP", "atlctl/ATL::IPropertyNotifySinkCP"]
diff --git a/docs/atl/reference/ipropertypage2impl-class.md b/docs/atl/reference/ipropertypage2impl-class.md
index c2d124dea4..f39eac4e87 100644
--- a/docs/atl/reference/ipropertypage2impl-class.md
+++ b/docs/atl/reference/ipropertypage2impl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IPropertyPage2Impl Class"
title: "IPropertyPage2Impl Class"
ms.date: "11/04/2016"
f1_keywords: ["IPropertyPage2Impl", "ATLCTL/ATL::IPropertyPage2Impl", "ATLCTL/ATL::IPropertyPage2Impl::EditProperty"]
diff --git a/docs/atl/reference/ipropertypageimpl-class.md b/docs/atl/reference/ipropertypageimpl-class.md
index 2d14ddcbf4..8b217ed0d0 100644
--- a/docs/atl/reference/ipropertypageimpl-class.md
+++ b/docs/atl/reference/ipropertypageimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IPropertyPageImpl Class"
title: "IPropertyPageImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IPropertyPageImpl", "ATLCTL/ATL::IPropertyPageImpl", "ATLCTL/ATL::IPropertyPageImpl::IPropertyPageImpl", "ATLCTL/ATL::IPropertyPageImpl::Activate", "ATLCTL/ATL::IPropertyPageImpl::Apply", "ATLCTL/ATL::IPropertyPageImpl::Deactivate", "ATLCTL/ATL::IPropertyPageImpl::GetPageInfo", "ATLCTL/ATL::IPropertyPageImpl::Help", "ATLCTL/ATL::IPropertyPageImpl::IsPageDirty", "ATLCTL/ATL::IPropertyPageImpl::Move", "ATLCTL/ATL::IPropertyPageImpl::SetDirty", "ATLCTL/ATL::IPropertyPageImpl::SetObjects", "ATLCTL/ATL::IPropertyPageImpl::SetPageSite", "ATLCTL/ATL::IPropertyPageImpl::Show", "ATLCTL/ATL::IPropertyPageImpl::TranslateAccelerator", "ATLCTL/ATL::IPropertyPageImpl::m_bDirty", "ATLCTL/ATL::IPropertyPageImpl::m_dwDocString", "ATLCTL/ATL::IPropertyPageImpl::m_dwHelpContext", "ATLCTL/ATL::IPropertyPageImpl::m_dwHelpFile", "ATLCTL/ATL::IPropertyPageImpl::m_dwTitle", "ATLCTL/ATL::IPropertyPageImpl::m_nObjects", "ATLCTL/ATL::IPropertyPageImpl::m_pPageSite", "ATLCTL/ATL::IPropertyPageImpl::m_ppUnk", "ATLCTL/ATL::IPropertyPageImpl::m_size"]
diff --git a/docs/atl/reference/iprovideclassinfo2impl-class.md b/docs/atl/reference/iprovideclassinfo2impl-class.md
index 7122229b23..c700c6a280 100644
--- a/docs/atl/reference/iprovideclassinfo2impl-class.md
+++ b/docs/atl/reference/iprovideclassinfo2impl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IProvideClassInfo2Impl Class"
title: "IProvideClassInfo2Impl Class"
ms.date: "11/04/2016"
f1_keywords: ["IProvideClassInfo2Impl", "ATLCOM/ATL::IProvideClassInfo2Impl", "ATLCOM/ATL::IProvideClassInfo2Impl::IProvideClassInfo2Impl", "ATLCOM/ATL::IProvideClassInfo2Impl::GetClassInfo", "ATLCOM/ATL::IProvideClassInfo2Impl::GetGUID", "ATLCOM/ATL::IProvideClassInfo2Impl::_tih"]
diff --git a/docs/atl/reference/iquickactivateimpl-class.md b/docs/atl/reference/iquickactivateimpl-class.md
index 115c36eff0..55d408fead 100644
--- a/docs/atl/reference/iquickactivateimpl-class.md
+++ b/docs/atl/reference/iquickactivateimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IQuickActivateImpl Class"
title: "IQuickActivateImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IQuickActivateImpl", "ATLCTL/ATL::IQuickActivateImpl", "ATLCTL/ATL::IQuickActivateImpl::GetContentExtent", "ATLCTL/ATL::IQuickActivateImpl::QuickActivate", "ATLCTL/ATL::IQuickActivateImpl::SetContentExtent"]
diff --git a/docs/atl/reference/iregistrar-class.md b/docs/atl/reference/iregistrar-class.md
index 83f3b4b91f..9c3ca2a980 100644
--- a/docs/atl/reference/iregistrar-class.md
+++ b/docs/atl/reference/iregistrar-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IRegistrar Interface"
title: "IRegistrar Interface"
ms.date: "02/01/2017"
f1_keywords: ["IRegistrar", "ATLIFASE/ATL::IRegistrar", "ATLIFASE/ATL::IRegistrar::ResourceRegisterSz", "ATLIFASE/ATL::IRegistrar::ResourceUnregisterSz", "ATLIFASE/ATL::IRegistrar::FileRegister", "ATLIFASE/ATL::IRegistrar::FileUnregister", "ATLIFASE/ATL::IRegistrar::StringRegister", "ATLIFASE/ATL::IRegistrar::StringUnregister", "ATLIFASE/ATL::IRegistrar::ResourceRegister", "ATLIFASE/ATL::IRegistrar::ResourceUnregister"]
diff --git a/docs/atl/reference/irunnableobjectimpl-class.md b/docs/atl/reference/irunnableobjectimpl-class.md
index ca64379666..77b26a5072 100644
--- a/docs/atl/reference/irunnableobjectimpl-class.md
+++ b/docs/atl/reference/irunnableobjectimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IRunnableObjectImpl Class"
title: "IRunnableObjectImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IRunnableObjectImpl", "ATLCTL/ATL::IRunnableObjectImpl", "ATLCTL/ATL::IRunnableObjectImpl::GetRunningClass", "ATLCTL/ATL::IRunnableObjectImpl::IsRunning", "ATLCTL/ATL::IRunnableObjectImpl::LockRunning", "ATLCTL/ATL::IRunnableObjectImpl::Run", "ATLCTL/ATL::IRunnableObjectImpl::SetContainedObject"]
diff --git a/docs/atl/reference/iserviceproviderimpl-class.md b/docs/atl/reference/iserviceproviderimpl-class.md
index 15de7e9570..6cd8822fdd 100644
--- a/docs/atl/reference/iserviceproviderimpl-class.md
+++ b/docs/atl/reference/iserviceproviderimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IServiceProviderImpl Class"
title: "IServiceProviderImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IServiceProviderImpl", "ATLCOM/ATL::IServiceProviderImpl", "ATLCOM/ATL::IServiceProviderImpl::QueryService"]
diff --git a/docs/atl/reference/ispecifypropertypagesimpl-class.md b/docs/atl/reference/ispecifypropertypagesimpl-class.md
index fbfe5e168b..ae7b448193 100644
--- a/docs/atl/reference/ispecifypropertypagesimpl-class.md
+++ b/docs/atl/reference/ispecifypropertypagesimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ISpecifyPropertyPagesImpl Class"
title: "ISpecifyPropertyPagesImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["ISpecifyPropertyPagesImpl", "ATLCOM/ATL::ISpecifyPropertyPagesImpl", "ATLCOM/ATL::ISpecifyPropertyPagesImpl::GetPages"]
diff --git a/docs/atl/reference/isupporterrorinfoimpl-class.md b/docs/atl/reference/isupporterrorinfoimpl-class.md
index c3be5df313..b9146cc6cf 100644
--- a/docs/atl/reference/isupporterrorinfoimpl-class.md
+++ b/docs/atl/reference/isupporterrorinfoimpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: ISupportErrorInfoImpl Class"
title: "ISupportErrorInfoImpl Class"
ms.date: "06/13/2019"
f1_keywords: ["ISupportErrorInfoImpl", "ATLCOM/ATL::ISupportErrorInfoImpl", "ATLCOM/ATL::ISupportErrorInfoImpl::InterfaceSupportsErrorInfo"]
diff --git a/docs/atl/reference/ithreadpoolconfig-interface.md b/docs/atl/reference/ithreadpoolconfig-interface.md
index 4a7fbb4fed..3a3411e136 100644
--- a/docs/atl/reference/ithreadpoolconfig-interface.md
+++ b/docs/atl/reference/ithreadpoolconfig-interface.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IThreadPoolConfig Interface"
title: "IThreadPoolConfig Interface"
ms.date: "11/04/2016"
f1_keywords: ["IThreadPoolConfig", "ATLUTIL/ATL::IThreadPoolConfig", "ATLUTIL/ATL::GetSize", "ATLUTIL/ATL::GetTimeout", "ATLUTIL/ATL::SetSize", "ATLUTIL/ATL::SetTimeout"]
@@ -23,7 +24,7 @@ __interface
### Methods
-|||
+|Name|Description|
|-|-|
|[GetSize](#getsize)|Call this method to get the number of threads in the pool.|
|[GetTimeout](#gettimeout)|Call this method to get the maximum time in milliseconds that the thread pool will wait for a thread to shut down.|
diff --git a/docs/atl/reference/iviewobjecteximpl-class.md b/docs/atl/reference/iviewobjecteximpl-class.md
index 03c0489e4f..ad03e3ac10 100644
--- a/docs/atl/reference/iviewobjecteximpl-class.md
+++ b/docs/atl/reference/iviewobjecteximpl-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IViewObjectExImpl Class"
title: "IViewObjectExImpl Class"
ms.date: "11/04/2016"
f1_keywords: ["IViewObjectExImpl", "ATLCTL/ATL::IViewObjectExImpl", "ATLCTL/ATL::IViewObjectExImpl::Draw", "ATLCTL/ATL::IViewObjectExImpl::Freeze", "ATLCTL/ATL::IViewObjectExImpl::GetAdvise", "ATLCTL/ATL::IViewObjectExImpl::GetColorSet", "ATLCTL/ATL::IViewObjectExImpl::GetExtent", "ATLCTL/ATL::IViewObjectExImpl::GetNaturalExtent", "ATLCTL/ATL::IViewObjectExImpl::GetRect", "ATLCTL/ATL::IViewObjectExImpl::GetViewStatus", "ATLCTL/ATL::IViewObjectExImpl::QueryHitPoint", "ATLCTL/ATL::IViewObjectExImpl::QueryHitRect", "ATLCTL/ATL::IViewObjectExImpl::SetAdvise", "ATLCTL/ATL::IViewObjectExImpl::Unfreeze"]
diff --git a/docs/atl/reference/iworkerthreadclient-interface.md b/docs/atl/reference/iworkerthreadclient-interface.md
index 0f62e3e588..c962eb0cdf 100644
--- a/docs/atl/reference/iworkerthreadclient-interface.md
+++ b/docs/atl/reference/iworkerthreadclient-interface.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: IWorkerThreadClient Interface"
title: "IWorkerThreadClient Interface"
ms.date: "11/04/2016"
f1_keywords: ["IWorkerThreadClient", "ATLUTIL/ATL::IWorkerThreadClient", "ATLUTIL/ATL::CloseHandle", "ATLUTIL/ATL::Execute"]
@@ -22,7 +23,7 @@ __interface IWorkerThreadClient
### Methods
-|||
+|Name|Description|
|-|-|
|[CloseHandle](#closehandle)|Implement this method to close the handle associated with this object.|
|[Execute](#execute)|Implement this method to execute code when the handle associated with this object becomes signaled.|
diff --git a/docs/atl/reference/making-an-atl-object-noncreatable.md b/docs/atl/reference/making-an-atl-object-noncreatable.md
index 9a9ed6e890..6a14432332 100644
--- a/docs/atl/reference/making-an-atl-object-noncreatable.md
+++ b/docs/atl/reference/making-an-atl-object-noncreatable.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Making an ATL Object Noncreatable"
title: "Making an ATL Object Noncreatable"
ms.date: "11/04/2016"
f1_keywords: ["vc.appwiz.ATL.objects"]
@@ -13,7 +14,7 @@ You can change the attributes of an ATL-based COM object so that a client cannot
1. Remove the [OBJECT_ENTRY_AUTO](object-map-macros.md#object_entry_auto) for the object. If you want the object to be noncreatable but the control to be registered, replace OBJECT_ENTRY_AUTO with [OBJECT_ENTRY_NON_CREATEABLE_EX_AUTO](object-map-macros.md#object_entry_non_createable_ex_auto).
-1. Add the [noncreatable](../../windows/noncreatable.md) attribute to the coclass in the .idl file. For example:
+1. Add the [noncreatable](../../windows/attributes/noncreatable.md) attribute to the coclass in the .idl file. For example:
```
[uuid(A1992E3D-3CF0-11D0-826F-00A0C90F2851),
diff --git a/docs/atl/reference/marshaling-global-functions.md b/docs/atl/reference/marshaling-global-functions.md
index a17e79d3c5..74ec8bf714 100644
--- a/docs/atl/reference/marshaling-global-functions.md
+++ b/docs/atl/reference/marshaling-global-functions.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Marshaling Global Functions"
title: "Marshaling Global Functions"
ms.date: "11/04/2016"
f1_keywords: ["atlbase/ATL::AtlFreeMarshalStream", "atlbase/ATL::AtlMarshalPtrInProc", "atlbase/ATL::AtlUnmarshalPtr"]
@@ -11,7 +12,7 @@ These functions provide support for marshaling and converting marshaling data in
> [!IMPORTANT]
> The functions listed in the following table cannot be used in applications that execute in the Windows Runtime.
-|||
+|Name|Description|
|-|-|
|[AtlFreeMarshalStream](#atlfreemarshalstream)|Releases the marshal data and the `IStream` pointer.|
|[AtlMarshalPtrInProc](#atlmarshalptrinproc)|Creates a new stream object and marshals the specified interface pointer.|
diff --git a/docs/atl/reference/message-map-macros-atl.md b/docs/atl/reference/message-map-macros-atl.md
index e4f7107677..99775caee5 100644
--- a/docs/atl/reference/message-map-macros-atl.md
+++ b/docs/atl/reference/message-map-macros-atl.md
@@ -1,14 +1,15 @@
---
+description: "Learn more about: Message Map Macros (ATL)"
title: "Message Map Macros (ATL)"
ms.date: "11/04/2016"
-f1_keywords: ["atlwin/ATL::ALT_MSG_MAP", "atlwin/ATL::BEGIN_MSG_MAP", "atlwin/ATL::CHAIN_MSG_MAP_ALT", "atlwin/ATL::CHAIN_MSG_MAP_ALT_MEMBER", "atlwin/ATL::CHAIN_MSG_MAP", "atlwin/ATL::CHAIN_MSG_MAP_DYNAMIC", "atlwin/ATL::CHAIN_MSG_MAP_MEMBER", "atlwin/ATL::COMMAND_CODE_HANDLER", "atlwin/ATL::COMMAND_HANDLER", "atlwin/ATL::COMMAND_ID_HANDLER", "atlwin/ATL::COMMAND_RANGE_CODE_HANDLER", "atlwin/ATL::COMMAND_RANGE_HANDLER", "atlwin/ATL::DECLARE_EMPTY_MSG_MAP", "atlwin/ATL::DEFAULT_REFLECTION_HANDLER", "atlwin/ATL::END_MSG_MAP", "atlwin/ATL::FORWARD_NOTIFICATIONS", "atlwin/ATL::MESSAGE_HANDLER", "atlwin/ATL::MESSAGE_RANGE_HANDLER", "atlwin/ATL::NOTIFY_CODE_HANDLER", "atlwin/ATL::NOTIFY_HANDLER", "atlwin/ATL::NOTIFY_ID_HANDLER", "atlwin/ATL::NOTIFY_RANGE_CODE_HANDLER", "atlwin/ATL::NOTIFY_RANGE_HANDLER", "atlwin/ATL::REFLECT_NOTIFICATIONS", "atlwin/ATL::REFLECTED_COMMAND_CODE_HANDLER", "atlwin/ATL::REFLECTED_COMMAND_HANDLER", "atlwin/ATL::REFLECTED_COMMAND_ID_HANDLER", "atlwin/ATL::REFLECTED_COMMAND_RANGE_CODE_HANDLER", "atlwin/ATL::REFLECTED_COMMAND_RANGE_HANDLER", "atlwin/ATL::REFLECTED_NOTIFY_CODE_HANDLER", "atlwin/ATL::REFLECTED_NOTIFY_HANDLER", "atlwin/ATL::REFLECTED_NOTIFY_ID_HANDLER", "atlwin/ATL::REFLECTED_NOTIFY_RANGE_CODE_HANDLER", "atlwin/ATL::REFLECTED_NOTIFY_RANGE_HANDLER"]
+f1_keywords: ["atlwin/ATL::ALT_MSG_MAP", "atlwin/ATL::BEGIN_MSG_MAP", "atlwin/ATL::CHAIN_MSG_MAP_ALT", "atlwin/ATL::CHAIN_MSG_MAP_ALT_MEMBER", "atlwin/ATL::CHAIN_MSG_MAP", "atlwin/ATL::CHAIN_MSG_MAP_DYNAMIC", "atlwin/ATL::CHAIN_MSG_MAP_MEMBER", "atlwin/ATL::COMMAND_CODE_HANDLER", "atlwin/ATL::COMMAND_HANDLER", "atlwin/ATL::COMMAND_ID_HANDLER", "atlwin/ATL::COMMAND_RANGE_CODE_HANDLER", "atlwin/ATL::COMMAND_RANGE_HANDLER", "atlwin/ATL::DECLARE_EMPTY_MSG_MAP", "atlwin/ATL::DEFAULT_REFLECTION_HANDLER", "atlwin/ATL::END_MSG_MAP", "atlwin/ATL::FORWARD_NOTIFICATIONS", "atlwin/ATL::MESSAGE_HANDLER", "atlwin/ATL::MESSAGE_RANGE_HANDLER", "atlwin/ATL::NOTIFY_CODE_HANDLER", "atlwin/ATL::NOTIFY_HANDLER", "atlwin/ATL::NOTIFY_ID_HANDLER", "atlwin/ATL::NOTIFY_RANGE_CODE_HANDLER", "atlwin/ATL::NOTIFY_RANGE_HANDLER", "atlwin/ATL::REFLECT_NOTIFICATIONS", "atlwin/ATL::REFLECTED_COMMAND_CODE_HANDLER", "atlwin/ATL::REFLECTED_COMMAND_HANDLER", "atlwin/ATL::REFLECTED_COMMAND_ID_HANDLER", "atlwin/ATL::REFLECTED_COMMAND_RANGE_CODE_HANDLER", "atlwin/ATL::REFLECTED_COMMAND_RANGE_HANDLER", "atlwin/ATL::REFLECTED_NOTIFY_CODE_HANDLER", "atlwin/ATL::REFLECTED_NOTIFY_HANDLER", "atlwin/ATL::REFLECTED_NOTIFY_ID_HANDLER", "atlwin/ATL::REFLECTED_NOTIFY_RANGE_CODE_HANDLER", "atlwin/ATL::REFLECTED_NOTIFY_RANGE_HANDLER", "ATLWIN/ALT_MSG_MAP", "ATLWIN/BEGIN_MSG_MAP", "ATLWIN/CHAIN_MSG_MAP_ALT", "ATLWIN/CHAIN_MSG_MAP_ALT_MEMBER", "ATLWIN/CHAIN_MSG_MAP", "ATLWIN/CHAIN_MSG_MAP_DYNAMIC", "ATLWIN/CHAIN_MSG_MAP_MEMBER", "ATLWIN/COMMAND_CODE_HANDLER", "ATLWIN/COMMAND_HANDLER", "ATLWIN/COMMAND_ID_HANDLER", "ATLWIN/COMMAND_RANGE_CODE_HANDLER", "ATLWIN/COMMAND_RANGE_HANDLER", "ATLWIN/DECLARE_EMPTY_MSG_MAP", "ATLWIN/DEFAULT_REFLECTION_HANDLER", "ATLWIN/END_MSG_MAP", "ATLWIN/FORWARD_NOTIFICATIONS", "ATLWIN/MESSAGE_HANDLER", "ATLWIN/MESSAGE_RANGE_HANDLER", "ATLWIN/NOTIFY_CODE_HANDLER", "ATLWIN/NOTIFY_HANDLER", "ATLWIN/NOTIFY_ID_HANDLER", "ATLWIN/NOTIFY_RANGE_CODE_HANDLER", "ATLWIN/NOTIFY_RANGE_HANDLER", "ATLWIN/REFLECT_NOTIFICATIONS", "ATLWIN/REFLECTED_COMMAND_CODE_HANDLER", "ATLWIN/REFLECTED_COMMAND_HANDLER", "ATLWIN/REFLECTED_COMMAND_ID_HANDLER", "ATLWIN/REFLECTED_COMMAND_RANGE_CODE_HANDLER", "ATLWIN/REFLECTED_COMMAND_RANGE_HANDLER", "ATLWIN/REFLECTED_NOTIFY_CODE_HANDLER", "ATLWIN/REFLECTED_NOTIFY_HANDLER", "ATLWIN/REFLECTED_NOTIFY_ID_HANDLER", "ATLWIN/REFLECTED_NOTIFY_RANGE_CODE_HANDLER", "ATLWIN/REFLECTED_NOTIFY_RANGE_HANDLER"]
ms.assetid: eefdd546-8934-4a30-b263-9c06a8addcbd
---
# Message Map Macros (ATL)
These macros define message maps and entries.
-|||
+|Name|Description|
|-|-|
|[ALT_MSG_MAP](#alt_msg_map)|Marks the beginning of an alternate message map.|
|[BEGIN_MSG_MAP](#begin_msg_map)|Marks the beginning of the default message map.|
diff --git a/docs/atl/reference/mfc-support-in-atl-projects.md b/docs/atl/reference/mfc-support-in-atl-projects.md
index 0decb093af..c02e7ad566 100644
--- a/docs/atl/reference/mfc-support-in-atl-projects.md
+++ b/docs/atl/reference/mfc-support-in-atl-projects.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: MFC Support in ATL Projects"
title: "MFC Support in ATL Projects"
ms.date: "11/04/2016"
f1_keywords: ["vc.atl.addmfc"]
diff --git a/docs/atl/reference/object-map-macros.md b/docs/atl/reference/object-map-macros.md
index 2b38419a08..e0d53e8236 100644
--- a/docs/atl/reference/object-map-macros.md
+++ b/docs/atl/reference/object-map-macros.md
@@ -1,14 +1,15 @@
---
+description: "Learn more about: Object Map Macros"
title: "Object Map Macros"
ms.date: "11/04/2016"
-f1_keywords: ["atlcom/ATL::DECLARE_OBJECT_DESCRIPTION", "atlcom/ATL::OBJECT_ENTRY_AUTO", "atlcom/ATL::OBJECT_ENTRY_NON_CREATEABLE_EX_AUTO"]
+f1_keywords: ["atlcom/ATL::DECLARE_OBJECT_DESCRIPTION", "atlcom/ATL::OBJECT_ENTRY_AUTO", "atlcom/ATL::OBJECT_ENTRY_NON_CREATEABLE_EX_AUTO", "ATLCOM/DECLARE_OBJECT_DESCRIPTION", "ATLCOM/OBJECT_ENTRY_AUTO", "ATLCOM/OBJECT_ENTRY_NON_CREATEABLE_EX_AUTO"]
ms.assetid: 680087f4-9894-41dd-a79c-6f337e1f13c1
---
# Object Map Macros
These macros define object maps and entries.
-|||
+|Name|Description|
|-|-|
|[DECLARE_OBJECT_DESCRIPTION](#declare_object_description)|Allows you to specify a class object's text description, which will be entered into the object map.|
|[OBJECT_ENTRY_AUTO](#object_entry_auto)|Enters an ATL object into the object map, updates the registry, and creates an instance of the object.|
diff --git a/docs/atl/reference/object-status-macros.md b/docs/atl/reference/object-status-macros.md
index 747fc8c5e7..06a9bdb39f 100644
--- a/docs/atl/reference/object-status-macros.md
+++ b/docs/atl/reference/object-status-macros.md
@@ -1,14 +1,15 @@
---
+description: "Learn more about: Object Status Macros"
title: "Object Status Macros"
ms.date: "11/04/2016"
-f1_keywords: ["atlcom/ATL::DECLARE_OLEMISC_STATUS"]
+f1_keywords: ["atlcom/ATL::DECLARE_OLEMISC_STATUS", "ATLCOM/DECLARE_OLEMISC_STATUS"]
ms.assetid: 727dbef2-a342-4157-9d64-a421805d9747
---
# Object Status Macros
This macro sets flags belonging to ActiveX controls.
-|||
+|Name|Description|
|-|-|
|[DECLARE_OLEMISC_STATUS](#declare_olemisc_status)|Used in ATL ActiveX controls to set the OLEMISC flags.|
diff --git a/docs/atl/reference/options-atl-active-server-page-component-wizard.md b/docs/atl/reference/options-atl-active-server-page-component-wizard.md
index 8c07553336..ee4d74799f 100644
--- a/docs/atl/reference/options-atl-active-server-page-component-wizard.md
+++ b/docs/atl/reference/options-atl-active-server-page-component-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Options, ATL Active Server Page Component Wizard"
title: "Options, ATL Active Server Page Component Wizard"
ms.date: "11/04/2016"
f1_keywords: ["vc.codewiz.class.atl.asp.options"]
diff --git a/docs/atl/reference/options-atl-control-wizard.md b/docs/atl/reference/options-atl-control-wizard.md
index 0bd2bf052c..b6ec7ec9d0 100644
--- a/docs/atl/reference/options-atl-control-wizard.md
+++ b/docs/atl/reference/options-atl-control-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Options, ATL Control Wizard"
title: "Options, ATL Control Wizard"
ms.date: "11/04/2016"
f1_keywords: ["vc.codewiz.class.atl.control.options"]
@@ -65,7 +66,7 @@ The type of interface this control exposes to the container.
- **Custom**: Creates an interface that exposes methods directly through a VTBL.
- If you select **Custom**, then you can specify that the control is **Automation compatible**. If you select **Automation compatible**, then the wizard adds the [oleautomation](../../windows/oleautomation.md) attribute to the interface in the IDL, and the interface can be marshaled by the universal marshaler in oleaut32.dll. See [Marshaling Details](/windows/win32/com/marshaling-details) in the Windows SDK for more information.
+ If you select **Custom**, then you can specify that the control is **Automation compatible**. If you select **Automation compatible**, then the wizard adds the [oleautomation](../../windows/attributes/oleautomation.md) attribute to the interface in the IDL, and the interface can be marshaled by the universal marshaler in oleaut32.dll. See [Marshaling Details](/windows/win32/com/marshaling-details) in the Windows SDK for more information.
Additionally, if you select **Automation compatible**, then all parameters for all methods in the control must be VARIANT compatible.
diff --git a/docs/atl/reference/options-atl-property-page-wizard.md b/docs/atl/reference/options-atl-property-page-wizard.md
index b7e6b78888..a49caf9d07 100644
--- a/docs/atl/reference/options-atl-property-page-wizard.md
+++ b/docs/atl/reference/options-atl-property-page-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Options, ATL Property Page Wizard"
title: "Options, ATL Property Page Wizard"
ms.date: "05/09/2019"
f1_keywords: ["vc.codewiz.class.atl.ppg.options"]
@@ -7,13 +8,13 @@ ms.assetid: a7107779-b2ea-4f99-b84b-7f3e0c504bc8
---
# Options, ATL Property Page Wizard
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
The ATL Property Page wizard is not available in Visual Studio 2019 and later.
::: moniker-end
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
Use this page of the wizard to define the threading model and aggregation level of property page you are creating.
diff --git a/docs/atl/reference/options-atl-simple-object-wizard.md b/docs/atl/reference/options-atl-simple-object-wizard.md
index 3222728a0a..a15ab0eccc 100644
--- a/docs/atl/reference/options-atl-simple-object-wizard.md
+++ b/docs/atl/reference/options-atl-simple-object-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Options, ATL Simple Object Wizard"
title: "Options, ATL Simple Object Wizard"
ms.date: "11/04/2016"
f1_keywords: ["vc.codewiz.class.atl.simple.options"]
diff --git a/docs/atl/reference/pixel-himetric-conversion-global-functions.md b/docs/atl/reference/pixel-himetric-conversion-global-functions.md
index ceb40d325c..3e1c7e9264 100644
--- a/docs/atl/reference/pixel-himetric-conversion-global-functions.md
+++ b/docs/atl/reference/pixel-himetric-conversion-global-functions.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Pixel/HIMETRIC Conversion Global Functions"
title: "Pixel-HIMETRIC Conversion Global Functions"
ms.date: "11/04/2016"
f1_keywords: ["atlwin/ATL::AtlHiMetricToPixel", "atlwin/ATL::AtlPixelToHiMetric"]
@@ -11,7 +12,7 @@ These functions provide support for converting to and from pixel and HIMETRIC un
> [!IMPORTANT]
> The functions listed in the following table cannot be used in applications that execute in the Windows Runtime.
-|||
+|Name|Description|
|-|-|
|[AtlHiMetricToPixel](#atlhimetrictopixel)|Converts HIMETRIC units (each unit is 0.01 millimeter) to pixels.|
|[AtlPixelToHiMetric](#atlpixeltohimetric)|Converts pixels to HIMETRIC units (each unit is 0.01 millimeter).|
diff --git a/docs/atl/reference/property-map-macros.md b/docs/atl/reference/property-map-macros.md
index 14c4ca020a..c0e785543d 100644
--- a/docs/atl/reference/property-map-macros.md
+++ b/docs/atl/reference/property-map-macros.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: Property Map Macros"
title: "Property Map Macros"
ms.date: "11/04/2016"
-f1_keywords: ["atlcom/ATL::BEGIN_PROP_MAP", "atlcom/ATL::PROP_DATA_ENTRY", "atlcom/ATL::PROP_ENTRY_TYPE", "atlcom/ATL::PROP_ENTRY_TYPE_EX", "atlcom/ATL::PROP_PAGE", "atlcom/ATL::END_PROP_MAP"]
+f1_keywords: ["atlcom/ATL::BEGIN_PROP_MAP", "atlcom/ATL::PROP_DATA_ENTRY", "atlcom/ATL::PROP_ENTRY_TYPE", "atlcom/ATL::PROP_ENTRY_TYPE_EX", "atlcom/ATL::PROP_PAGE", "atlcom/ATL::END_PROP_MAP", "ATLCOM/BEGIN_PROP_MAP", "ATLCOM/PROP_DATA_ENTRY", "ATLCOM/PROP_ENTRY_TYPE", "ATLCOM/PROP_ENTRY_TYPE_EX", "ATLCOM/PROP_PAGE", "ATLCOM/END_PROP_MAP"]
helpviewer_keywords: ["property maps"]
ms.assetid: 128bc742-2b98-4b97-a243-684dbb83db77
---
@@ -9,7 +10,7 @@ ms.assetid: 128bc742-2b98-4b97-a243-684dbb83db77
These macros define property maps and entries.
-|||
+|Name|Description|
|-|-|
|[BEGIN_PROP_MAP](#begin_prop_map)|Marks the beginning of the ATL property map.|
|[PROP_DATA_ENTRY](#prop_data_entry)|Indicates the extent, or dimensions, of an ActiveX control.|
@@ -77,7 +78,7 @@ When you create an ActiveX control, the wizard inserts this macro after the prop
In the following example, the extent of the object (`m_sizeExtent`) is being persisted.
[!code-cpp[NVC_ATL_Windowing#131](../../atl/codesnippet/cpp/property-map-macros_2.h)]
-
+
[!code-cpp[NVC_ATL_Windowing#132](../../atl/codesnippet/cpp/property-map-macros_3.h)]
## PROP_ENTRY_TYPE
diff --git a/docs/atl/reference/registry-and-typelib-global-functions.md b/docs/atl/reference/registry-and-typelib-global-functions.md
index 027528f43a..c97812f48d 100644
--- a/docs/atl/reference/registry-and-typelib-global-functions.md
+++ b/docs/atl/reference/registry-and-typelib-global-functions.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Registry and TypeLib Global Functions"
title: "Registry and TypeLib Global Functions"
ms.date: "03/27/2019"
f1_keywords: ["atlbase/ATL::AtlGetPerUserRegistration", "afxpriv/ATL::AfxRegCreateKey", "afxpriv/ATL::AfxRegDeleteKey", "atlbase/ATL::AtlRegisterTypeLib", "afxpriv/ATL::AfxRegOpenKey", "afxpriv/ATL::AfxRegOpenKeyEx", "afxdisp/ATL::AfxUnregisterPreviewHandler", "atlbase/ATL::AtlSetPerUserRegistration", "atlbase/ATL::AtlUnRegisterTypeLib", "atlbase/ATL::AtlLoadTypeLib", "atlbase/ATL::AtlUpdateRegistryFromResourceD", "atlbase/ATL::RegistryDataExchange"]
@@ -12,7 +13,7 @@ These functions provide support for loading and registering a type library.
> [!IMPORTANT]
> The functions listed in the following tables cannot be used in applications that execute in the Windows Runtime.
-|||
+|Name|Description|
|-|-|
|[AfxRegCreateKey](#afxregcreatekey)|Creates the specified registry key.|
|[AfxRegDeleteKey](#afxregdeletekey)|Deletes the specified registry key.|
@@ -28,7 +29,7 @@ These functions provide support for loading and registering a type library.
These functions control which node in the registry the program uses to store information.
-|||
+|Name|Description|
|-|-|
|[AtlGetPerUserRegistration](#atlgetperuserregistration)|Retrieves whether the application redirects registry access to the **HKEY_CURRENT_USER** ( **HKCU**) node.|
|[AtlSetPerUserRegistration](#atlsetperuserregistration)|Sets whether the application redirects registry access to the **HKEY_CURRENT_USER** ( **HKCU**) node.|
diff --git a/docs/atl/reference/registry-data-exchange-macros.md b/docs/atl/reference/registry-data-exchange-macros.md
index 0feb314576..98857707a3 100644
--- a/docs/atl/reference/registry-data-exchange-macros.md
+++ b/docs/atl/reference/registry-data-exchange-macros.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: Registry Data Exchange Macros"
title: "Registry Data Exchange Macros"
ms.date: "11/04/2016"
-f1_keywords: ["atlplus/ATL::BEGIN_RDX_MAP", "atlplus/ATL::END_RDX_MAP", "atlplus/ATL::RDX_BINARY", "atlplus/ATL::RDX_CSTRING_TEXT", "atlplus/ATL::RDX_DWORD", "atlplus/ATL::RDX_TEXT"]
+f1_keywords: ["atlplus/ATL::BEGIN_RDX_MAP", "atlplus/ATL::END_RDX_MAP", "atlplus/ATL::RDX_BINARY", "atlplus/ATL::RDX_CSTRING_TEXT", "atlplus/ATL::RDX_DWORD", "atlplus/ATL::RDX_TEXT", "ATLPLUS/BEGIN_RDX_MAP", "ATLPLUS/END_RDX_MAP", "ATLPLUS/RDX_BINARY", "ATLPLUS/RDX_CSTRING_TEXT", "ATLPLUS/RDX_DWORD", "ATLPLUS/RDX_TEXT"]
helpviewer_keywords: ["RegistryDataExchange function, macros"]
ms.assetid: c1bc5e79-2307-43d2-9d10-3a62ffadf473
---
@@ -9,7 +10,7 @@ ms.assetid: c1bc5e79-2307-43d2-9d10-3a62ffadf473
These macros perform Registry Data Exchange operations.
-|||
+|Name|Description|
|-|-|
|[BEGIN_RDX_MAP](#begin_rdx_map)|Marks the beginning of the Registry Data Exchange map.|
|[END_RDX_MAP](#end_rdx_map)|Marks the end of the Registry Data Exchange map.|
diff --git a/docs/atl/reference/registry-macros.md b/docs/atl/reference/registry-macros.md
index bd7e75e03f..f18617f0fe 100644
--- a/docs/atl/reference/registry-macros.md
+++ b/docs/atl/reference/registry-macros.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: Registry Macros"
title: "Registry Macros"
ms.date: "08/19/2019"
-f1_keywords: ["atlcom/ATL::_ATL_STATIC_REGISTRY", "atlcom/ATL::DECLARE_LIBID", "atlcom/ATL::DECLARE_NO_REGISTRY", "atlcom/ATL::DECLARE_REGISTRY", "atlcom/ATL::DECLARE_REGISTRY_APPID_RESOURCEID", "atlcom/ATL::DECLARE_REGISTRY_RESOURCE", "atlcom/ATL::DECLARE_REGISTRY_RESOURCEID"]
+f1_keywords: ["ATLBASE/_ATL_STATIC_REGISTRY", "ATLBASE/DECLARE_LIBID", "ATLBASE/DECLARE_NO_REGISTRY", "ATLBASE/DECLARE_REGISTRY", "ATLBASE/DECLARE_REGISTRY_APPID_RESOURCEID", "ATLBASE/DECLARE_REGISTRY_RESOURCE", "ATLBASE/DECLARE_REGISTRY_RESOURCEID", "_ATL_STATIC_REGISTRY", "DECLARE_LIBID", "DECLARE_NO_REGISTRY", "DECLARE_REGISTRY", "DECLARE_REGISTRY_APPID_RESOURCEID", "DECLARE_REGISTRY_RESOURCE", "DECLARE_REGISTRY_RESOURCEID"]
helpviewer_keywords: ["registry, ATL macros"]
ms.assetid: 3ee041da-c63b-42a4-89cf-2a4b2a6f81ae
---
@@ -9,7 +10,7 @@ ms.assetid: 3ee041da-c63b-42a4-89cf-2a4b2a6f81ae
These macros define useful type library and registry facilities.
-|||
+|Name|Description|
|-|-|
|[_ATL_STATIC_REGISTRY](#_atl_static_registry)|Indicates that you want the registration code for your object to be in the object to avoid a dependency on ATL.DLL.|
|[DECLARE_LIBID](#declare_libid)|Provides a way for ATL to obtain the *libid* of the type library.|
diff --git a/docs/atl/reference/security-global-functions.md b/docs/atl/reference/security-global-functions.md
index 224a2ea150..e42bcb30f7 100644
--- a/docs/atl/reference/security-global-functions.md
+++ b/docs/atl/reference/security-global-functions.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Security Global Functions"
title: "Security Global Functions"
ms.date: "11/04/2016"
f1_keywords: ["atlsecurity/ATL::AtlGetDacl", "atlsecurity/ATL::AtlSetDacl", "atlsecurity/ATL::AtlGetGroupSid", "atlsecurity/ATL::AtlSetGroupSid", "atlsecurity/ATL::AtlGetOwnerSid", "atlsecurity/ATL::AtlSetOwnerSid", "atlsecurity/ATL::AtlGetSacl", "atlsecurity/ATL::AtlSetSacl", "atlsecurity/ATL::AtlGetSecurityDescriptor"]
@@ -12,7 +13,7 @@ These functions provide support for modifying SID and ACL objects.
> [!IMPORTANT]
> The functions listed in the following table cannot be used in applications that execute in the Windows Runtime.
-|||
+|Name|Description|
|-|-|
|[AtlGetDacl](#atlgetdacl)|Call this function to retrieve the discretionary access-control list (DACL) information of a specified object.|
|[AtlSetDacl](#atlsetdacl)|Call this function to set the discretionary access-control list (DACL) information of a specified object.|
diff --git a/docs/atl/reference/security-identifier-global-functions.md b/docs/atl/reference/security-identifier-global-functions.md
index d7b26e8c56..d429e27b2a 100644
--- a/docs/atl/reference/security-identifier-global-functions.md
+++ b/docs/atl/reference/security-identifier-global-functions.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Security Identifier Global Functions"
title: "Security Identifier Global Functions"
ms.date: "11/04/2016"
f1_keywords: ["atlsecurity/ATL::Sids::AccountOps", "atlsecurity/ATL::Sids::Admins", "atlsecurity/ATL::Sids::AnonymousLogon", "atlsecurity/ATL::Sids::AuthenticatedUser", "atlsecurity/ATL::Sids::BackupOps", "atlsecurity/ATL::Sids::Batch", "atlsecurity/ATL::Sids::CreatorGroup", "atlsecurity/ATL::Sids::CreatorGroupServer", "atlsecurity/ATL::Sids::CreatorOwner", "atlsecurity/ATL::Sids::CreatorOwnerServer", "atlsecurity/ATL::Sids::Dialup", "atlsecurity/ATL::Sids::Guests", "atlsecurity/ATL::Sids::Interactive", "atlsecurity/ATL::Sids::Local", "atlsecurity/ATL::Sids::Network", "atlsecurity/ATL::Sids::NetworkService", "atlsecurity/ATL::Sids::Null", "atlsecurity/ATL::Sids::PowerUsers", "atlsecurity/ATL::Sids::PrintOps", "atlsecurity/ATL::Sids::Proxy", "atlsecurity/ATL::Sids::RasServers", "atlsecurity/ATL::Sids::Replicator", "atlsecurity/ATL::Sids::RestrictedCode", "atlsecurity/ATL::Sids::Self", "atlsecurity/ATL::Sids::ServerLogon", "atlsecurity/ATL::Sids::Service", "atlsecurity/ATL::Sids::System", "atlsecurity/ATL::Sids::SystemOps", "atlsecurity/ATL::Sids::TerminalServer", "atlsecurity/ATL::Sids::Users", "atlsecurity/ATL::Sids::World"]
@@ -12,7 +13,7 @@ These functions return common well-known SID objects.
> [!IMPORTANT]
> The functions listed in the following table cannot be used in applications that execute in the Windows Runtime.
-|||
+|Name|Description|
|-|-|
|[Sids::AccountOps](#accountops)|Returns the DOMAIN_ALIAS_RID_ACCOUNT_OPS SID.|
|[Sids::Admins](#admins)|Returns the DOMAIN_ALIAS_RID_ADMINS SID.|
diff --git a/docs/atl/reference/server-registration-global-functions.md b/docs/atl/reference/server-registration-global-functions.md
index c2c4f4f7cb..4277c7c13a 100644
--- a/docs/atl/reference/server-registration-global-functions.md
+++ b/docs/atl/reference/server-registration-global-functions.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Server Registration Global Functions"
title: "Server Registration Global Functions"
ms.date: "11/04/2016"
f1_keywords: ["atlbase/ATL::AtlComModuleRegisterServer", "atlbase/ATL::AtlComModuleUnregisterServer", "atlbase/ATL::AtlComModuleRegisterClassObjects", "atlbase/ATL::AtlComModuleRevokeClassObjects", "atlbase/ATL::AtlComModuleGetClassObject"]
@@ -11,7 +12,7 @@ These functions provide support for registering and unregistering server objects
> [!IMPORTANT]
> The functions listed in the following table cannot be used in applications that execute in the Windows Runtime.
-|||
+|Name|Description|
|-|-|
|[AtlComModuleRegisterServer](#atlcommoduleregisterserver)|This function is called to register every object in the object map.|
|[AtlComModuleUnregisterServer](#atlcommoduleunregisterserver)|This function is called to unregister every object in the object map.|
diff --git a/docs/atl/reference/service-map-macros.md b/docs/atl/reference/service-map-macros.md
index ff1a1b275b..b42010306a 100644
--- a/docs/atl/reference/service-map-macros.md
+++ b/docs/atl/reference/service-map-macros.md
@@ -1,14 +1,15 @@
---
+description: "Learn more about: Service Map Macros"
title: "Service Map Macros"
ms.date: "11/04/2016"
-f1_keywords: ["atlcom/ATL::BEGIN_SERVICE_MAP", "atlcom/ATL::END_SERVICE_MAP", "atlcom/ATL::SERVICE_ENTRY", "atlcom/ATL::SERVICE_ENTRY_CHAIN"]
+f1_keywords: ["atlcom/ATL::BEGIN_SERVICE_MAP", "atlcom/ATL::END_SERVICE_MAP", "atlcom/ATL::SERVICE_ENTRY", "atlcom/ATL::SERVICE_ENTRY_CHAIN", "ATLCOM/BEGIN_SERVICE_MAP", "ATLCOM/END_SERVICE_MAP", "ATLCOM/SERVICE_ENTRY", "ATLCOM/SERVICE_ENTRY_CHAIN"]
ms.assetid: ca02a125-454a-4cf6-aac2-1c5585025ed4
---
# Service Map Macros
These macros define service maps and entries.
-|||
+|Name|Description|
|-|-|
|[BEGIN_SERVICE_MAP](#begin_service_map)|Marks the beginning of an ATL service map.|
|[END_SERVICE_MAP](#end_service_map)|Marks the end of an ATL service map.|
@@ -114,7 +115,7 @@ STDMETHOD(QueryService)(
### Return Value
-The returned HRESULT value is one of the following:
+The returned HRESULT is one of the following values:
|Return value|Meaning|
|------------------|-------------|
@@ -122,23 +123,23 @@ The returned HRESULT value is one of the following:
|E_INVALIDARG|One or more of the arguments is invalid.|
|E_OUTOFMEMORY|Memory is insufficient to create the service.|
|E_UNEXPECTED|An unknown error occurred.|
-|E_NOINTERFACE|The requested interface is not part of this service, or the service is unknown.|
+|E_NOINTERFACE|The requested interface isn't part of this service, or the service is unknown.|
### Remarks
-`QueryService` returns an indirect pointer to the requested interface in the specified service. The caller is responsible for releasing this pointer when it is no longer required.
+`QueryService` returns an indirect pointer to the requested interface in the specified service. The caller is responsible for releasing this pointer when it's no longer required.
When you call `QueryService`, you pass both a service identifier (*guidService*) and an interface identifier (*riid*). The *guidService* specifies the service to which you want access, and the *riid* identifies an interface that is part of the service. In return, you receive an indirect pointer to the interface.
-The object that implements the interface might also implement interfaces that are part of other services. Consider the following:
+The object that implements the interface might also implement interfaces that are part of other services. Consider the following possibilities:
- Some of these interfaces might be optional. Not all interfaces defined in the service description are necessarily present on every implementation of the service or on every returned object.
-- Unlike calls to `QueryInterface`, passing a different service identifier does not necessarily mean that a different Component Object Model (COM) object is returned.
+- Unlike calls to `QueryInterface`, passing a different service identifier doesn't necessarily mean that a different Component Object Model (COM) object is returned.
-- The returned object might have additional interfaces that are not part of the definition of the service.
+- The returned object might have other interfaces that aren't part of the definition of the service.
-Two different services, such as SID_SMyService and SID_SYourService, can both specify the use of the same interface, even though the implementation of the interface might have nothing in common between the two services. This works, because a call to `QueryService` (SID_SMyService, IID_IDispatch) can return a different object than `QueryService` (SID_SYourService, IID_IDispatch). Object identity is not assumed when you specify a different service identifier.
+Two different services, such as SID_SMyService and SID_SYourService, can both specify the use of the same interface, even though the implementation of the interface might have nothing in common between the two services. This approach works, because a call to `QueryService` (SID_SMyService, IID_IDispatch) can return a different object than `QueryService` (SID_SYourService, IID_IDispatch). Object identity isn't assumed when you specify a different service identifier.
## See also
diff --git a/docs/atl/reference/snap-in-object-macros.md b/docs/atl/reference/snap-in-object-macros.md
index da4c402131..380f4cf116 100644
--- a/docs/atl/reference/snap-in-object-macros.md
+++ b/docs/atl/reference/snap-in-object-macros.md
@@ -1,14 +1,15 @@
---
+description: "Learn more about: Snap-In Object Macros"
title: "Snap-In Object Macros"
ms.date: "11/04/2016"
-f1_keywords: ["atlsnap/ATL::BEGIN_EXTENSION_SNAPIN_NODEINFO_MAP", "atlsnap/ATL::BEGIN_SNAPINTOOLBARID_MAP", "atlsnap/ATL::END_EXTENSION_SNAPIN_NODEINFO_MAP", "atlsnap/ATL::END_SNAPINTOOLBARID_MAP", "atlsnap/ATL::EXTENSION_SNAPIN_DATACLASS", "atlsnap/ATL::EXTENSION_SNAPIN_NODEINFO_ENTRY", "atlsnap/ATL::SNAPINMENUID", "atlsnap/ATL::SNAPINTOOLBARID_ENTRY"]
+f1_keywords: ["atlsnap/ATL::BEGIN_EXTENSION_SNAPIN_NODEINFO_MAP", "atlsnap/ATL::BEGIN_SNAPINTOOLBARID_MAP", "atlsnap/ATL::END_EXTENSION_SNAPIN_NODEINFO_MAP", "atlsnap/ATL::END_SNAPINTOOLBARID_MAP", "atlsnap/ATL::EXTENSION_SNAPIN_DATACLASS", "atlsnap/ATL::EXTENSION_SNAPIN_NODEINFO_ENTRY", "atlsnap/ATL::SNAPINMENUID", "atlsnap/ATL::SNAPINTOOLBARID_ENTRY", "ATLSNAP/BEGIN_EXTENSION_SNAPIN_NODEINFO_MAP", "ATLSNAP/BEGIN_SNAPINTOOLBARID_MAP", "ATLSNAP/END_EXTENSION_SNAPIN_NODEINFO_MAP", "ATLSNAP/END_SNAPINTOOLBARID_MAP", "ATLSNAP/EXTENSION_SNAPIN_DATACLASS", "ATLSNAP/EXTENSION_SNAPIN_NODEINFO_ENTRY", "ATLSNAP/SNAPINMENUID", "ATLSNAP/SNAPINTOOLBARID_ENTRY"]
ms.assetid: 4e9850c0-e395-4929-86c9-584a81828053
---
# Snap-In Object Macros
These macros provide support for snap-in extensions.
-|||
+|Name|Description|
|-|-|
|[BEGIN_EXTENSION_SNAPIN_NODEINFO_MAP](#begin_extension_snapin_nodeinfo_map)|Marks the beginning of the snap-in extension data class map for a Snap-In object.|
|[BEGIN_SNAPINTOOLBARID_MAP](#begin_snapintoolbarid_map)|Marks the beginning of the toolbar map for a Snap-In object.|
diff --git a/docs/atl/reference/specifying-compiler-optimization-for-an-atl-project.md b/docs/atl/reference/specifying-compiler-optimization-for-an-atl-project.md
index df89855534..c59923486a 100644
--- a/docs/atl/reference/specifying-compiler-optimization-for-an-atl-project.md
+++ b/docs/atl/reference/specifying-compiler-optimization-for-an-atl-project.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Specifying Compiler Optimization for an ATL Project"
title: "Specifying Compiler Optimization for an ATL Project"
ms.date: "08/19/2019"
f1_keywords: ["vc.appwiz.ATL.optimization", "vc.appwiz.ATL.vtable"]
diff --git a/docs/atl/reference/stock-properties-atl-control-wizard.md b/docs/atl/reference/stock-properties-atl-control-wizard.md
index 1235f787e2..d71b29f1d2 100644
--- a/docs/atl/reference/stock-properties-atl-control-wizard.md
+++ b/docs/atl/reference/stock-properties-atl-control-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Stock Properties, ATL Control Wizard"
title: "Stock Properties, ATL Control Wizard"
ms.date: "11/04/2016"
f1_keywords: ["vc.codewiz.class.atl.control.stockprops"]
diff --git a/docs/atl/reference/string-conversion-macros.md b/docs/atl/reference/string-conversion-macros.md
index 40eaf4e9fa..9b67e45e5f 100644
--- a/docs/atl/reference/string-conversion-macros.md
+++ b/docs/atl/reference/string-conversion-macros.md
@@ -1,7 +1,8 @@
---
+description: "Learn more about: String Conversion Macros"
title: "String Conversion Macros"
ms.date: "11/04/2016"
-f1_keywords: ["atlconv/ATL::DEVMODEA2W", "atlconv/ATL::TEXTMETRICA2W", "atlconv/ATL::DEVMODEOLE2T", "atlconv/ATL::TEXTMETRICOLE2T", "atlconv/ATL::DEVMODET2OLE", "atlconv/ATL::TEXTMETRICT2OLE", "atlconv/ATL::DEVMODEW2A", "atlconv/ATL::TEXTMETRICW2A"]
+f1_keywords: ["atlconv/ATL::DEVMODEA2W", "atlconv/ATL::TEXTMETRICA2W", "atlconv/ATL::DEVMODEOLE2T", "atlconv/ATL::TEXTMETRICOLE2T", "atlconv/ATL::DEVMODET2OLE", "atlconv/ATL::TEXTMETRICT2OLE", "atlconv/ATL::DEVMODEW2A", "atlconv/ATL::TEXTMETRICW2A", "ATLCONV/DEVMODEA2W", "ATLCONV/TEXTMETRICA2W", "ATLCONV/DEVMODEOLE2T", "ATLCONV/TEXTMETRICOLE2T", "ATLCONV/DEVMODET2OLE", "ATLCONV/TEXTMETRICT2OLE", "ATLCONV/DEVMODEW2A", "ATLCONV/TEXTMETRICW2A"]
ms.assetid: 2ff7c0b6-2bde-45fe-897f-6128e18e0c27
---
# String Conversion Macros
@@ -49,7 +50,7 @@ The behavior of the `DEVMODE` and `TEXTMETRIC` string conversion macros depends
The following table lists the `DEVMODE` and `TEXTMETRIC` string conversion macros.
-|||
+|`DEVMODE` macro|`TEXTMETRIC` macro|
|-|-|
|DEVMODEA2W|TEXTMETRICA2W|
|DEVMODEOLE2T|TEXTMETRICOLE2T|
diff --git a/docs/atl/reference/strings-atl-property-page-wizard.md b/docs/atl/reference/strings-atl-property-page-wizard.md
index e07a54bf07..af7682dd9f 100644
--- a/docs/atl/reference/strings-atl-property-page-wizard.md
+++ b/docs/atl/reference/strings-atl-property-page-wizard.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Strings, ATL Property Page Wizard"
title: "Strings, ATL Property Page Wizard"
ms.date: "05/09/2019"
f1_keywords: ["vc.codewiz.class.atl.ppg.strings"]
@@ -7,13 +8,13 @@ ms.assetid: 00547db6-911f-49eb-92e1-2ba67079d4df
---
# Strings, ATL Property Page Wizard
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
The ATL Property Page wizard is not available in Visual Studio 2019 and later.
::: moniker-end
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
Provides the text associated with the property page.
diff --git a/docs/atl/reference/u-menuorid-class.md b/docs/atl/reference/u-menuorid-class.md
index 51872d7499..cd2b60ec3e 100644
--- a/docs/atl/reference/u-menuorid-class.md
+++ b/docs/atl/reference/u-menuorid-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: _U_MENUorID Class"
title: "_U_MENUorID Class"
ms.date: "11/04/2016"
f1_keywords: ["ATL._U_MENUorID", "ATL::_U_MENUorID", "_U_MENUorID"]
diff --git a/docs/atl/reference/u-rect-class.md b/docs/atl/reference/u-rect-class.md
index e0e7d19ae1..515c8add35 100644
--- a/docs/atl/reference/u-rect-class.md
+++ b/docs/atl/reference/u-rect-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: _U_RECT Class"
title: "_U_RECT Class"
ms.date: "11/04/2016"
f1_keywords: ["ATL::_U_RECT", "_U_RECT", "ATL._U_RECT"]
diff --git a/docs/atl/reference/u-stringorid-class.md b/docs/atl/reference/u-stringorid-class.md
index c8d49c7fea..d7148ff89c 100644
--- a/docs/atl/reference/u-stringorid-class.md
+++ b/docs/atl/reference/u-stringorid-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: _U_STRINGorID Class"
title: "_U_STRINGorID Class"
ms.date: "11/04/2016"
f1_keywords: ["ATL._U_STRINGorID", "ATL::_U_STRINGorID", "_U_STRINGorID"]
diff --git a/docs/atl/reference/win32threadtraits-class.md b/docs/atl/reference/win32threadtraits-class.md
index 6fc1b8e7e5..2d4f1fa008 100644
--- a/docs/atl/reference/win32threadtraits-class.md
+++ b/docs/atl/reference/win32threadtraits-class.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Win32ThreadTraits Class"
title: "Win32ThreadTraits Class"
ms.date: "11/04/2016"
f1_keywords: ["Win32ThreadTraits", "ATLBASE/ATL::Win32ThreadTraits", "ATLBASE/ATL::Win32ThreadTraits::CreateThread"]
diff --git a/docs/atl/reference/window-class-macros.md b/docs/atl/reference/window-class-macros.md
index ae41f9c880..4804e4b723 100644
--- a/docs/atl/reference/window-class-macros.md
+++ b/docs/atl/reference/window-class-macros.md
@@ -1,14 +1,15 @@
---
+description: "Learn more about: Window Class Macros"
title: "Window Class Macros"
ms.date: "11/04/2016"
-f1_keywords: ["atlwin/ATL::DECLARE_WND_CLASS", "atlwin/ATL::DECLARE_WND_SUPERCLASS", "atlwin/ATL::DECLARE_WND_CLASS_EX"]
+f1_keywords: ["atlwin/ATL::DECLARE_WND_CLASS", "atlwin/ATL::DECLARE_WND_SUPERCLASS", "atlwin/ATL::DECLARE_WND_CLASS_EX", "ATLWIN/DECLARE_WND_CLASS", "ATLWIN/DECLARE_WND_SUPERCLASS", "ATLWIN/DECLARE_WND_CLASS_EX"]
ms.assetid: ce18681a-2bab-4453-9895-0f3ea47c2b24
---
# Window Class Macros
These macros define window class utilities.
-|||
+|Name|Description|
|-|-|
|[DECLARE_WND_CLASS](#declare_wnd_class)|Allows you to specify the name of a new window class.|
|[DECLARE_WND_CLASS2](#declare_wnd_class2)|(Visual Studio 2017) Allows you to specify the name of a new window class and the enclosing class whose window procedure the new class will use.|
diff --git a/docs/atl/reference/windows-messages-macros.md b/docs/atl/reference/windows-messages-macros.md
index fba9a9e238..0675305320 100644
--- a/docs/atl/reference/windows-messages-macros.md
+++ b/docs/atl/reference/windows-messages-macros.md
@@ -1,14 +1,15 @@
---
+description: "Learn more about: Windows Messages Macros"
title: "Windows Messages Macros"
ms.date: "11/04/2016"
-f1_keywords: ["atlbase/ATL::WM_FORWARDMSG"]
+f1_keywords: ["atlbase/ATL::WM_FORWARDMSG", "ATLBASE/WM_FORWARDMSG"]
ms.assetid: 63abd22c-372d-4148-bb04-c605950ae64f
---
# Windows Messages Macros
This macro forwards window messages.
-|||
+|Name|Description|
|-|-|
|[WM_FORWARDMSG](#wm_forwardmsg)|Use to forward a message received by a window to another window for processing.|
diff --git a/docs/atl/reference/winmodule-global-functions.md b/docs/atl/reference/winmodule-global-functions.md
index 486b2c4956..c0708a6a56 100644
--- a/docs/atl/reference/winmodule-global-functions.md
+++ b/docs/atl/reference/winmodule-global-functions.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: WinModule Global Functions"
title: "WinModule Global Functions"
ms.date: "11/04/2016"
f1_keywords: ["atlbase/ATL::AtlWinModuleAddCreateWndData", "atlbase/ATL::AtlWinModuleExtractCreateWndData"]
@@ -11,7 +12,7 @@ These functions provide support for `_AtlCreateWndData` structure operations.
> [!IMPORTANT]
> The functions listed in the following table cannot be used in applications that execute in the Windows Runtime.
-|||
+|Name|Description|
|-|-|
|[AtlWinModuleAddCreateWndData](#atlwinmoduleaddcreatewnddata)|This function is used to initialize and add an `_AtlCreateWndData` structure.|
|[AtlWinModuleExtractCreateWndData](#atlwinmoduleextractcreatewnddata)|Call this function to extract an existing `_AtlCreateWndData` structure.|
diff --git a/docs/atl/reference/worker-archetype.md b/docs/atl/reference/worker-archetype.md
index 1816a938bb..e4a36e9702 100644
--- a/docs/atl/reference/worker-archetype.md
+++ b/docs/atl/reference/worker-archetype.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Worker Archetype"
title: "Worker Archetype"
ms.date: "11/04/2016"
helpviewer_keywords: ["Worker archetype"]
diff --git a/docs/atl/registry-entries.md b/docs/atl/registry-entries.md
index 4e3acd7bd7..30fd629939 100644
--- a/docs/atl/registry-entries.md
+++ b/docs/atl/registry-entries.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Registry Entries"
title: "Registry Entries (ATL)"
ms.date: "11/04/2016"
helpviewer_keywords: ["registry, ATL services entries", "registry, application IDs"]
diff --git a/docs/atl/registry-scripting-examples.md b/docs/atl/registry-scripting-examples.md
index 45df174dd8..605b92f0df 100644
--- a/docs/atl/registry-scripting-examples.md
+++ b/docs/atl/registry-scripting-examples.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Registry Scripting Examples"
title: "Registry Scripting Examples"
ms.date: "11/04/2016"
helpviewer_keywords: ["scripting, examples", "registrar scripts [ATL]", "scripts, Registrar scripts", "registry, Registrar"]
diff --git a/docs/atl/registry-support-classes.md b/docs/atl/registry-support-classes.md
index 01cd2b9871..1aafad7ccf 100644
--- a/docs/atl/registry-support-classes.md
+++ b/docs/atl/registry-support-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Registry Support Classes"
title: "Registry Support Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/running-objects-classes.md b/docs/atl/running-objects-classes.md
index b1f477ba07..8d7c92b99f 100644
--- a/docs/atl/running-objects-classes.md
+++ b/docs/atl/running-objects-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Running Objects Classes"
title: "Running Objects Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/running-the-program-as-a-local-server.md b/docs/atl/running-the-program-as-a-local-server.md
index 602d0fec3f..647555b455 100644
--- a/docs/atl/running-the-program-as-a-local-server.md
+++ b/docs/atl/running-the-program-as-a-local-server.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Running the Program as a Local Server"
title: "Running the Program as a Local Server"
ms.date: "11/04/2016"
helpviewer_keywords: ["debugging [ATL], running services as local server", "ATL services, running as local servers"]
ms.assetid: eb9701e6-e2a8-4666-897f-0c893aec8ac7
+ms.topic: concept-article
---
# Running the Program as a Local Server
diff --git a/docs/atl/scope-of-atl.md b/docs/atl/scope-of-atl.md
index d85c1b650b..bf84207f3b 100644
--- a/docs/atl/scope-of-atl.md
+++ b/docs/atl/scope-of-atl.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Scope of ATL"
title: "Scope of ATL"
ms.date: "11/04/2016"
helpviewer_keywords: ["ATL, scope"]
diff --git a/docs/atl/security-classes.md b/docs/atl/security-classes.md
index 84f3579dbe..c4d3e1acab 100644
--- a/docs/atl/security-classes.md
+++ b/docs/atl/security-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Security Classes"
title: "Security Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/service-provider-support-classes.md b/docs/atl/service-provider-support-classes.md
index 9037a30d31..9cce29b4cd 100644
--- a/docs/atl/service-provider-support-classes.md
+++ b/docs/atl/service-provider-support-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Service Provider Support Classes"
title: "Service Provider Support Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/setting-up-a-static-link-to-the-registrar-code-cpp-only.md b/docs/atl/setting-up-a-static-link-to-the-registrar-code-cpp-only.md
index 35f9eddb4c..e5797ef152 100644
--- a/docs/atl/setting-up-a-static-link-to-the-registrar-code-cpp-only.md
+++ b/docs/atl/setting-up-a-static-link-to-the-registrar-code-cpp-only.md
@@ -1,21 +1,23 @@
---
-title: "Setting Up a Static Link to the Registrar Code (C++ Only)"
-ms.date: "11/04/2016"
+title: "Setting up a static link to the Registrar code (C++ only)"
+description: "How to statically link C++ code to the ATL Registrar code."
+ms.date: 09/03/2020
helpviewer_keywords: ["statically linking to ATL Registrar code", "linking [C++], to ATL Registrar code"]
ms.assetid: 835f5885-87a6-48fa-91e6-60988ee65538
+ms.topic: how-to
---
-# Setting Up a Static Link to the Registrar Code (C++ Only)
+# Setting up a static link to the Registrar code (C++ Only)
C++ clients can create a static link to the Registrar's code. Static linking of the Registrar's parser adds approximately 5K to a release build.
-The simplest way to set up static linking assumes you have specified [DECLARE_REGISTRY_RESOURCEID](reference/registry-macros.md#declare_registry_resourceid) in your object's declaration. (This is the default specification used by the ATL.)
+The simplest way to set up static linking assumes you have specified [`DECLARE_REGISTRY_RESOURCEID`](reference/registry-macros.md#declare_registry_resourceid) in your object's declaration. (It's the default specification used by the ATL.)
-## To create a static link using DECLARE_REGISTRY_RESOURCEID
+## To create a static link using `DECLARE_REGISTRY_RESOURCEID`
-1. Specify [/D](../build/reference/d-preprocessor-definitions.md) **\_ATL\_STATIC\_REGISTRY** instead of **/D \_ATL\_DLL**.
+1. Specify **`/D _ATL_STATIC_REGISTRY`** instead of **`/D _ATL_DLL`** on the CL command line. For more information, see [`/D`](../build/reference/d-preprocessor-definitions.md).
1. Recompile.
## See also
-[Registry Component (Registrar)](../atl/atl-registry-component-registrar.md)
+[Registry component (Registrar)](../atl/atl-registry-component-registrar.md)
diff --git a/docs/atl/site-information-classes.md b/docs/atl/site-information-classes.md
index fa7840d93f..4ece835b06 100644
--- a/docs/atl/site-information-classes.md
+++ b/docs/atl/site-information-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Site Information Classes"
title: "Site Information Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/specifying-property-pages.md b/docs/atl/specifying-property-pages.md
index 3df3001f5b..0213211d07 100644
--- a/docs/atl/specifying-property-pages.md
+++ b/docs/atl/specifying-property-pages.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Specifying Property Pages"
title: "Specifying Property Pages (ATL)"
ms.date: "11/04/2016"
helpviewer_keywords: ["ISpecifyPropertyPages method", "property pages, specifying"]
ms.assetid: ee8678cf-c708-49ab-b0ad-fc2db31f1ac3
+ms.topic: how-to
---
# Specifying Property Pages
diff --git a/docs/atl/specifying-the-threading-model-for-a-project-atl.md b/docs/atl/specifying-the-threading-model-for-a-project-atl.md
index bdb9317d5f..f9d9ebeb3a 100644
--- a/docs/atl/specifying-the-threading-model-for-a-project-atl.md
+++ b/docs/atl/specifying-the-threading-model-for-a-project-atl.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Specifying the Threading Model for a Project (ATL)"
title: "Specifying the Threading Model for a Project (ATL)"
ms.date: "11/04/2016"
helpviewer_keywords: ["_ATL_FREE_THREADED macro", "_ATL_APARTMENT_THREADED macro", "ATL, multithreading", "threading [ATL], models", "_ATL_SINGLE_THREADED macro"]
ms.assetid: 6b571078-521c-4f3e-9f08-482aa235a822
+ms.topic: concept-article
---
# Specifying the Threading Model for a Project (ATL)
diff --git a/docs/atl/string-and-text-classes.md b/docs/atl/string-and-text-classes.md
index af4b89ae1a..3810a64d0d 100644
--- a/docs/atl/string-and-text-classes.md
+++ b/docs/atl/string-and-text-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: String and Text Classes"
title: "ATL String and Text Classes"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/supporting-idispatch-and-ierrorinfo.md b/docs/atl/supporting-idispatch-and-ierrorinfo.md
index cdfa14334c..97c4908435 100644
--- a/docs/atl/supporting-idispatch-and-ierrorinfo.md
+++ b/docs/atl/supporting-idispatch-and-ierrorinfo.md
@@ -1,14 +1,16 @@
---
+description: "Learn more about: Supporting IDispatch and IErrorInfo"
title: "Supporting IDispatch and IErrorInfo"
ms.date: "11/04/2016"
helpviewer_keywords: ["ISupportErrorInfoImpl method", "IErrorInfo class suppor in ATL", "IDispatchImpl class", "IDispatch class support in ATL"]
ms.assetid: 7db2220f-319d-4ce9-9382-d340019f14f7
+ms.topic: concept-article
---
# Supporting IDispatch and IErrorInfo
You can use the template class [IDispatchImpl](../atl/reference/idispatchimpl-class.md) to provide a default implementation of the `IDispatch Interface` portion of any dual interfaces on your object.
-If your object uses the `IErrorInfo` interface to report errors back to the client, then your object must support the `ISupportErrorInfo Interface` interface. The template class [ISupportErrorInfoImpl](../atl/reference/isupporterrorinfoimpl-class.md) provides an easy way to implement this if you only have a single interface that generates errors on your object.
+If your object uses the `IErrorInfo` interface to report errors back to the client, then your object must support the `ISupportErrorInfo` interface. The template class [ISupportErrorInfoImpl](../atl/reference/isupporterrorinfoimpl-class.md) provides an easy way to implement this if you only have a single interface that generates errors on your object.
## See also
diff --git a/docs/atl/supporting-idispeventimpl.md b/docs/atl/supporting-idispeventimpl.md
index 9cfd0be136..261ffa445c 100644
--- a/docs/atl/supporting-idispeventimpl.md
+++ b/docs/atl/supporting-idispeventimpl.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Supporting IDispEventImpl"
title: "Supporting IDispEventImpl"
ms.date: "11/04/2016"
helpviewer_keywords: ["event sink maps, declaring", "IDispEventImpl class, advising and unadvising", "SINK_ENTRY macro", "type libraries, importing", "ATL, IDispEventImpl support in COM objects", "BEGIN_SINK_MAP macro", "IDispEventImpl class, declaring"]
ms.assetid: b957f930-6a5b-4598-8e4d-8027759957e7
+ms.topic: concept-article
---
# Supporting IDispEventImpl
diff --git a/docs/atl/tear-off-interfaces-classes.md b/docs/atl/tear-off-interfaces-classes.md
index e0adec34a6..0f6c3667bd 100644
--- a/docs/atl/tear-off-interfaces-classes.md
+++ b/docs/atl/tear-off-interfaces-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Tear-Off Interfaces Classes"
title: "Tear-Off Interfaces Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/testing-the-atl-dhtml-control.md b/docs/atl/testing-the-atl-dhtml-control.md
index d741733813..1d223e24d1 100644
--- a/docs/atl/testing-the-atl-dhtml-control.md
+++ b/docs/atl/testing-the-atl-dhtml-control.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Testing the ATL DHTML Control"
title: "Testing the ATL DHTML Control"
ms.date: "11/04/2016"
helpviewer_keywords: ["HTML controls, testing", "testing controls", "DHTML controls", "DHTML controls, testing"]
ms.assetid: 0e4b4358-80ce-4505-8b06-ef4f30b1d1f0
+ms.topic: how-to
---
# Testing the ATL DHTML Control
diff --git a/docs/atl/testing-the-modified-atl-dhtml-control.md b/docs/atl/testing-the-modified-atl-dhtml-control.md
index 9d07ec8af8..fe0809b88b 100644
--- a/docs/atl/testing-the-modified-atl-dhtml-control.md
+++ b/docs/atl/testing-the-modified-atl-dhtml-control.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Testing the Modified ATL DHTML Control"
title: "Testing the Modified ATL DHTML Control"
ms.date: "11/06/2018"
helpviewer_keywords: ["HTML controls, testing", "testing controls", "DHTML controls, testing"]
ms.assetid: 42316118-9433-410f-9d8a-0efcc1eff824
+ms.topic: how-to
---
# Testing the Modified ATL DHTML Control
diff --git a/docs/atl/thread-pooling-classes.md b/docs/atl/thread-pooling-classes.md
index 6c5e2a0e5c..ff62fdc9f8 100644
--- a/docs/atl/thread-pooling-classes.md
+++ b/docs/atl/thread-pooling-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Thread Pooling Classes"
title: "Thread Pooling Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/threading-models-and-critical-sections-classes.md b/docs/atl/threading-models-and-critical-sections-classes.md
index 0fd1793ad8..1bc26034ca 100644
--- a/docs/atl/threading-models-and-critical-sections-classes.md
+++ b/docs/atl/threading-models-and-critical-sections-classes.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Threading Models and Critical Sections Classes"
title: "Threading Models and Critical Sections Classes (ATL)"
ms.date: "11/04/2016"
helpviewer_keywords: ["ATL, critical sections", "ATL, multithreading", "threading [ATL], models", "critical sections"]
ms.assetid: 759f05ef-6285-4be6-a2cc-78572dd75146
+ms.topic: concept-article
---
# Threading Models and Critical Sections Classes
diff --git a/docs/atl/toc.yml b/docs/atl/toc.yml
index 1ab642aac9..931fbffd52 100644
--- a/docs/atl/toc.yml
+++ b/docs/atl/toc.yml
@@ -1,3 +1,4 @@
+items:
- name: Active Template Library (ATL)
href: atl-com-desktop-components.md
- name: Active Template Library (ATL) concepts
@@ -98,7 +99,7 @@
- name: Building and testing the ATL project
href: building-and-testing-the-atl-project.md
- name: ATL control containment FAQ
- href: atl-control-containment-faq.md
+ href: atl-control-containment-faq.yml
- name: ATL COM property pages
expanded: false
items:
diff --git a/docs/atl/ui-support-classes.md b/docs/atl/ui-support-classes.md
index 1b3fe37840..8e5f56f4c4 100644
--- a/docs/atl/ui-support-classes.md
+++ b/docs/atl/ui-support-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: UI Support Classes"
title: "UI Support Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/understanding-backus-naur-form-bnf-syntax.md b/docs/atl/understanding-backus-naur-form-bnf-syntax.md
index 83542d927e..7e5295bf9e 100644
--- a/docs/atl/understanding-backus-naur-form-bnf-syntax.md
+++ b/docs/atl/understanding-backus-naur-form-bnf-syntax.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Understanding Backus-Naur form (BNF) syntax"
title: "ATL Registrar and Backus-Naur form (BNF) syntax"
ms.date: "05/14/2019"
helpviewer_keywords: ["BNF notation", "Backus-Naur form (BNF) syntax"]
ms.assetid: 994bbef0-9077-4aa8-bdfe-b7e830af9acc
+ms.topic: concept-article
---
# Understanding Backus-Naur form (BNF) syntax
diff --git a/docs/atl/understanding-parse-trees.md b/docs/atl/understanding-parse-trees.md
index 72eb3d3756..a0eea7d823 100644
--- a/docs/atl/understanding-parse-trees.md
+++ b/docs/atl/understanding-parse-trees.md
@@ -1,43 +1,50 @@
---
+description: "Learn more about: Understanding parse trees"
title: "ATL Registrar and Parse Trees"
-ms.date: "11/04/2016"
+ms.date: 04/15/2021
helpviewer_keywords: ["parse trees"]
-ms.assetid: 668ce2dd-a1c3-4ca0-8135-b25267cb6a85
+ms.topic: concept-article
---
-# Understanding Parse Trees
+# Understanding parse trees
You can define one or more parse trees in your registrar script, where each parse tree has the following form:
-> \{\}+
+> \{\}+
where:
-> \ ::= HKEY_CLASSES_ROOT | HKEY_CURRENT_USER |\
-> HKEY_LOCAL_MACHINE | HKEY_USERS |\
-> HKEY_PERFORMANCE_DATA | HKEY_DYN_DATA |\
-> HKEY_CURRENT_CONFIG | HKCR | HKCU |\
-> HKLM | HKU | HKPD | HKDD | HKCC
-
-> \ ::= \ | \
-
-> \ ::= [**ForceRemove** | **NoRemove** | **val**]\ [\][{\}]
-
-> \ ::= **Delete**\
-
-> \ ::= **'**\+**'**
-
-> \ ::= *any character not NULL, i.e. ASCII 0*
-
-> \ ::= \\
-
-> \ ::= **s** | **d**
-
-> \ ::= **'**\**'**
+> *\* ::=\
+> **`HKEY_CLASSES_ROOT`** | **`HKEY_CURRENT_USER`** |\
+> **`HKEY_LOCAL_MACHINE`** | **`HKEY_USERS`** |\
+> **`HKEY_PERFORMANCE_DATA`** | **`HKEY_DYN_DATA`** |\
+> **`HKEY_CURRENT_CONFIG`** | **`HKCR`** | **`HKCU`** |\
+> **`HKLM`** | **`HKU`** | **`HKPD`** | **`HKDD`** | **`HKCC`**
+>
+> *\* ::=\
+> *\* | *\*
+>
+> *\* ::=\
+> \[**`ForceRemove`** | **`NoRemove`** | **`val`**] *\* \[*\*] \[ **`{`** *\* **`}`** ]
+>
+> *\* ::=\
+> **`Delete`** *\*
+>
+> *\* ::=\
+> **`'`***\*+**`'`**
+>
+> *\* ::=\
+> any non-null character.
+>
+> *\* ::=\
+> *\* *\*
+>
+> *\* ::=\
+> **`s`** | **`d`**
> [!NOTE]
-> `HKEY_CLASSES_ROOT` and `HKCR` are equivalent; `HKEY_CURRENT_USER` and `HKCU` are equivalent; and so on.
+> **`HKEY_CLASSES_ROOT`** and **`HKCR`** are equivalent; **`HKEY_CURRENT_USER`** and **`HKCU`** are equivalent; and so on.
-A parse tree can add multiple keys and subkeys to the \. In doing so, it keeps a subkey's handle open until the parser has completed parsing all of its subkeys. This approach is more efficient than operating on a single key at a time, as seen in the following example:
+A parse tree can add multiple keys and subkeys to the \. The Registrar keeps each subkey handle open until the parser has completed parsing all of its subkeys. It's more efficient than operating on a single key at a time. Here's an example:
```rgs
HKEY_CLASSES_ROOT
@@ -52,8 +59,8 @@ HKEY_CLASSES_ROOT
}
```
-Here, the Registrar initially opens (creates) `HKEY_CLASSES_ROOT\MyVeryOwnKey`. It then sees that `MyVeryOwnKey` has a subkey. Rather than close the key to `MyVeryOwnKey`, the Registrar retains the handle and opens (creates) `HasASubKey` using this parent handle. (The system registry can be slower when no parent handle is open.) Thus, opening `HKEY_CLASSES_ROOT\MyVeryOwnKey` and then opening `HasASubKey` with `MyVeryOwnKey` as the parent is faster than opening `MyVeryOwnKey`, closing `MyVeryOwnKey`, and then opening `MyVeryOwnKey\HasASubKey`.
+Here, the Registrar initially opens (creates) `HKEY_CLASSES_ROOT\MyVeryOwnKey`. It then sees that `MyVeryOwnKey` has a subkey. Rather than close the key to `MyVeryOwnKey`, the Registrar keeps the handle and opens (creates) `HasASubKey` using this parent handle. (The system registry can be slower when no parent handle is open.) So, opening `HKEY_CLASSES_ROOT\MyVeryOwnKey` and then opening `HasASubKey` with `MyVeryOwnKey` as the parent is faster than opening `MyVeryOwnKey`, closing `MyVeryOwnKey`, and then opening `MyVeryOwnKey\HasASubKey`.
## See also
-[Creating Registrar Scripts](../atl/creating-registrar-scripts.md)
+[Creating registrar scripts](../atl/creating-registrar-scripts.md)
diff --git a/docs/atl/understanding-window-traits.md b/docs/atl/understanding-window-traits.md
index b8f66b059f..df7884f862 100644
--- a/docs/atl/understanding-window-traits.md
+++ b/docs/atl/understanding-window-traits.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Understanding Window Traits"
title: "ATL Window Traits"
ms.date: "11/04/2016"
helpviewer_keywords: ["window traits"]
ms.assetid: c90cf850-9e91-49da-9cf3-ad4efb30347d
+ms.topic: concept-article
---
# Understanding Window Traits
diff --git a/docs/atl/using-a-template-library.md b/docs/atl/using-a-template-library.md
index 130105f647..11bd456ff9 100644
--- a/docs/atl/using-a-template-library.md
+++ b/docs/atl/using-a-template-library.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Using a Template Library"
title: "Using a Template Library (ATL)"
ms.date: "11/04/2016"
helpviewer_keywords: ["template libraries"]
ms.assetid: 5e80ec6e-a61c-41ce-b34b-9a6252c46265
+ms.topic: concept-article
---
# Using a Template Library
diff --git a/docs/atl/using-a-window.md b/docs/atl/using-a-window.md
index d8bb3d149a..69488133ae 100644
--- a/docs/atl/using-a-window.md
+++ b/docs/atl/using-a-window.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Using a Window"
title: "Using a Window (ATL)"
ms.date: "11/04/2016"
helpviewer_keywords: ["ATL, windows", "CWindow class, about CWindow class", "windows [C++], ATL"]
ms.assetid: b3b9cc8e-4287-486b-b080-38852bc2943a
+ms.topic: concept-article
---
# Using a Window
diff --git a/docs/atl/using-contained-windows.md b/docs/atl/using-contained-windows.md
index a6aea75c7c..82894f8eea 100644
--- a/docs/atl/using-contained-windows.md
+++ b/docs/atl/using-contained-windows.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Using Contained Windows"
title: "Using Contained Windows"
ms.date: "11/04/2016"
helpviewer_keywords: ["ATL, windows", "windows [C++], ATL", "contained windows in ATL"]
ms.assetid: 7b3d79e5-b569-413f-9b98-df4f14efbe2b
+ms.topic: concept-article
---
# Using Contained Windows
diff --git a/docs/atl/using-idispeventimpl.md b/docs/atl/using-idispeventimpl.md
index 54874f2ce6..9e9c1537f2 100644
--- a/docs/atl/using-idispeventimpl.md
+++ b/docs/atl/using-idispeventimpl.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Using IDispEventImpl"
title: "Using IDispEventImpl (ATL)"
ms.date: "08/19/2019"
helpviewer_keywords: ["IDispEventImpl class, using"]
ms.assetid: 82d53b61-9d0d-45c5-aff9-2fafa468a9ca
+ms.topic: how-to
---
# Using IDispEventImpl
diff --git a/docs/atl/using-idispeventsimpleimpl.md b/docs/atl/using-idispeventsimpleimpl.md
index 6f3da59f91..3f50230f72 100644
--- a/docs/atl/using-idispeventsimpleimpl.md
+++ b/docs/atl/using-idispeventsimpleimpl.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Using IDispEventSimpleImpl"
title: "Using IDispEventSimpleImpl (ATL)"
ms.date: "08/19/2019"
helpviewer_keywords: ["IDispEventSimpleImpl class, using"]
ms.assetid: 8640ad1a-4bd0-40a5-b5e4-7322685d7aab
+ms.topic: concept-article
---
# Using IDispEventSimpleImpl
diff --git a/docs/atl/using-replaceable-parameters-the-registrar-s-preprocessor.md b/docs/atl/using-replaceable-parameters-the-registrar-s-preprocessor.md
index ee17e71728..5541235e12 100644
--- a/docs/atl/using-replaceable-parameters-the-registrar-s-preprocessor.md
+++ b/docs/atl/using-replaceable-parameters-the-registrar-s-preprocessor.md
@@ -1,10 +1,12 @@
---
+description: "Learn more about: Using Replaceable Parameters (The Registrar's Preprocessor)"
title: "Using Replaceable Parameters (ATL Registrar)"
ms.date: "11/04/2016"
helpviewer_keywords: ["%MODULE%"]
ms.assetid: 0b376994-84a6-4967-8d97-8c01dfc94efe
+ms.topic: concept-article
---
-# Using Replaceable Parameters (The Registrar's Preprocessor)
+# Using Replaceable Parameters (The Registrar's Preprocessor)
Replaceable parameters allow a Registrar's client to specify run-time data. To do this, the Registrar maintains a replacement map into which it enters the values associated with the replaceable parameters in your script. The Registrar makes these entries at run time.
diff --git a/docs/atl/using-task-manager.md b/docs/atl/using-task-manager.md
index b906d19341..31747f6282 100644
--- a/docs/atl/using-task-manager.md
+++ b/docs/atl/using-task-manager.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Using Task Manager"
title: "Using Task Manager"
ms.date: "11/04/2016"
helpviewer_keywords: ["Task Manager", "breakpoints, Task Manager", "debugging [ATL], using Task Manager"]
ms.assetid: 773fccd5-308d-42c2-a17f-60ae94989062
+ms.topic: how-to
---
# Using Task Manager
diff --git a/docs/atl/utility-classes.md b/docs/atl/utility-classes.md
index e8669292ec..df1f437594 100644
--- a/docs/atl/utility-classes.md
+++ b/docs/atl/utility-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Utility Classes"
title: "Utility Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
diff --git a/docs/atl/windows-support-classes.md b/docs/atl/windows-support-classes.md
index 95965da43e..caa906a9fb 100644
--- a/docs/atl/windows-support-classes.md
+++ b/docs/atl/windows-support-classes.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Windows Support Classes"
title: "Windows Support Classes (ATL)"
ms.date: "11/04/2016"
ms.topic: "reference"
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 38959ff564..fccaa5d7f9 100644
--- a/docs/build-insights/get-started-with-cpp-build-insights.md
+++ b/docs/build-insights/get-started-with-cpp-build-insights.md
@@ -3,17 +3,19 @@ title: "Get started with C++ Build Insights"
description: "A high-level overview of C++ Build Insights."
ms.date: "11/03/2019"
helpviewer_keywords: ["C++ Build Insights", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.custom: intro-get-started
+ms.topic: how-to
---
# Get started with C++ Build Insights
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
-The C++ Build Insights tools are available in Visual Studio 2019. To see the documentation for that version, set the Visual Studio **Version** selector control for this article to Visual Studio 2019. It's found at the top of the table of contents on this page.
+The C++ Build Insights tools are available in Visual Studio 2019 and later. To see the documentation for that version, set the Visual Studio **Version** selector control for this article to Visual Studio 2019 or later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range="vs-2019"
+::: 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)?
@@ -21,16 +23,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)\
@@ -40,12 +42,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/)
+[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/index.yml b/docs/build-insights/index.yml
index 2cef8570c4..876c27600a 100644
--- a/docs/build-insights/index.yml
+++ b/docs/build-insights/index.yml
@@ -3,12 +3,13 @@ title: C++ Build Insights | Automate build tool chain analysis # < 60 chars
summary: Use C++ Build Insights for real-time and automated build analysis and optimization. # < 160 chars
metadata:
- title: C++ Build Insights # Required; page title displayed in search results. Include the brand. < 60 chars.
+ title: C++ Build Insights
description: Learn how to use C++ Build Insights to analyze and optimize your builds.
ms.topic: landing-page
- author: corob-msft
- ms.author: corob
+ author: tylermsft
+ ms.author: twhitney
ms.date: 05/26/2020
+ ms.custom: intro-landing-hub
# linkListType: architecture | concept | deploy | download | get-started | how-to-guide | learn | overview | quickstart | reference | tutorial | video | whats-new
@@ -24,6 +25,10 @@ landingContent:
url: get-started-with-cpp-build-insights.md
- linkListType: tutorial
links:
+ - text: Build Insights function view
+ url: tutorials/build-insights-function-view.md
+ - text: Build Insights included files view
+ url: tutorials/build-insights-included-files-view.md
- text: vcperf and Windows Performance Analyzer
url: tutorials/vcperf-and-wpa.md
- text: Windows Performance Analyzer basics
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/cl-pass-data-struct.md b/docs/build-insights/reference/sdk/c-event-data-types/cl-pass-data-struct.md
index d81e9ae3b9..60655fba34 100644
--- a/docs/build-insights/reference/sdk/c-event-data-types/cl-pass-data-struct.md
+++ b/docs/build-insights/reference/sdk/c-event-data-types/cl-pass-data-struct.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "CL_PASS_D
---
# CL_PASS_DATA structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `CL_PASS_DATA` structure describes a compilation pass.
@@ -29,7 +29,7 @@ typedef struct CL_PASS_DATA_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `TranslationUnitPassCode` | A code identifying the compilation pass being executed. For more information, see [TRANSLATION_UNIT_PASS_CODE](translation-unit-pass-code-enum.md). |
| `InputSourcePath` | The C or C++ source file on which this compilation pass is being executed. |
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/event-collection-data-struct.md b/docs/build-insights/reference/sdk/c-event-data-types/event-collection-data-struct.md
index 99bc684daf..b3301f97a3 100644
--- a/docs/build-insights/reference/sdk/c-event-data-types/event-collection-data-struct.md
+++ b/docs/build-insights/reference/sdk/c-event-data-types/event-collection-data-struct.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "EVENT_COL
---
# EVENT_COLLECTION_DATA structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `EVENT_COLLECTION_DATA` structure describes an array of [EVENT_DATA](event-data-struct.md) elements.
@@ -28,7 +28,7 @@ typedef struct EVENT_COLLECTION_DATA_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `Count` | The number of `EVENT_DATA` elements in the array. |
| `Elements` | Pointer to the first `EVENT_DATA` element in the array. |
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/event-data-struct.md b/docs/build-insights/reference/sdk/c-event-data-types/event-data-struct.md
index 0b1dd4ac48..734b468058 100644
--- a/docs/build-insights/reference/sdk/c-event-data-types/event-data-struct.md
+++ b/docs/build-insights/reference/sdk/c-event-data-types/event-data-struct.md
@@ -1,19 +1,21 @@
---
-title: "EVENT_DATA structure"
-description: "The C++ Build Insights SDK EVENT_DATA structure reference."
-ms.date: "02/12/2020"
+title: "C++ Build Insights SDK EVENT_DATA structure"
+description: "The C++ Build Insights SDK EVENT_DATA structure reference. The EVENT_DATA structure describes an event received from an analysis or relogging session."
+ms.date: "04/27/2022"
+ms.topic: language-reference
+ms.custom: kr2b-contr-experiment
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "EVENT_DATA", "throughput analysis", "build time analysis", "vcperf.exe"]
---
# EVENT_DATA structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
-The `EVENT_DATA` structure describes an event received from an analysis or relogging session. These sessions are started by calling the [Analyze](../functions/analyze.md), [AnalyzeA](../functions/analyze-a.md), [AnalyzeW](../functions/analyze-w.md), [Relog](../functions/relog.md), [RelogA](../functions/relog-a.md), or [RelogW](../functions/relog-w.md) functions.
+The `EVENT_DATA` structure describes an event from an analysis or relogging session. The [Analyze](../functions/analyze.md), [AnalyzeA](../functions/analyze-a.md), [AnalyzeW](../functions/analyze-w.md), [Relog](../functions/relog.md), [RelogA](../functions/relog-a.md), or [RelogW](../functions/relog-w.md) functions start these sessions.
## Syntax
@@ -46,19 +48,19 @@ typedef struct EVENT_DATA_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `EventId` | A number that identifies the event. For a list of event identifiers, see [EVENT_ID](event-id-enum.md). |
| `EventInstanceId` | A number that uniquely identifies the current event inside a trace. This value doesn't change when analyzing or relogging the same trace multiple times. Use this field to identify the same event in multiple analysis or relogging passes over the same trace. |
| `TickFrequency` | The number of ticks per second to use when evaluating a duration measured in ticks. |
-| `StartTimestamp` | When the event is an *Activity*, this field is set to a tick value captured at the time the activity started. If this event is a *Simple Event*, this field is set to a tick value captured at the time the event occurred. |
-| `StopTimestamp` | When the event is an *Activity*, this field is set to a tick value captured at the time the activity stopped. If the stop event hasn't yet been received for this activity, this field is set to zero. If this event is a *Simple Event*, this field is set to zero. |
-| `ExclusiveDurationTicks` | If this event is an *Activity*, this field is set to the number of ticks that occurred directly in this activity. The number of ticks that occurred in a child activity are excluded. This field is set to zero for *Simple Events*. |
-| `CPUTicks` | If this event is an *Activity*, this field is set to the number of CPU ticks that occurred during this activity. A CPU tick is different from a regular tick. CPU ticks are only counted when the CPU is executing code in an activity. CPU ticks aren't counted when the thread associated with the activity is sleeping. This field is set to zero for *Simple Events*. |
-| `ExclusiveCPUTicks` | This field has the same meaning as `CPUTicks`, except that it doesn't include CPU ticks that occurred in children activities. This field is set to zero for *Simple Events*. |
-| `WallClockTimeResponsibilityTicks` | If this event is an *Activity*, this field is set to a tick count that represents this activity's contribution to overall wall-clock time. A wall-clock time responsibility tick is different from a regular tick. Wall-clock time responsibility ticks take into account parallelism between activities. For example, two parallel activities may have a duration of 50 ticks and the same start and stop time. In this case, both will be assigned a wall-clock time responsibility of 25 ticks. This field is set to zero for *Simple Events*. |
-| `ExclusiveWallClockTimeResponsibilityTicks` | This field has the same meaning as `WallClockTimeResponsibilityTicks`, except that it doesn't include the wall-clock time responsibility ticks of children activities. This field is set to zero for *Simple Events*. |
-| `Data` | Points to additional data stored in the event. The type of data pointed to is different, depending on the `EventId` field. |
+| `StartTimestamp` | When the event is an *Activity*, this field is the tick value captured at the time the activity started. If this event is a *Simple Event*, this field is a tick value captured at the time the event occurred. |
+| `StopTimestamp` | When the event is an *Activity*, this field is the tick value captured at the time the activity stopped. If the stop event hasn't yet been received for this activity, this field is zero. If this event is a *Simple Event*, this field is zero. |
+| `ExclusiveDurationTicks` | If this event is an *Activity*, this field is the number of ticks that occurred directly in this activity. The number of ticks that occurred in a child activity are excluded. This field is zero for *Simple Events*. |
+| `CPUTicks` | If this event is an *Activity*, this field is the number of CPU ticks that occurred during this activity. A CPU tick is different from a regular tick. CPU ticks are only counted when the CPU is executing code in an activity. CPU ticks aren't counted when the thread associated with the activity is sleeping. This field is zero for *Simple Events*. |
+| `ExclusiveCPUTicks` | This field has the same meaning as `CPUTicks`, except that it doesn't include CPU ticks that occurred in children activities. This field is zero for *Simple Events*. |
+| `WallClockTimeResponsibilityTicks` | If this event is an *Activity*, this field is a tick count that represents this activity's contribution to overall wall-clock time. A wall-clock time responsibility tick is different from a regular tick. Wall-clock time responsibility ticks take into account parallelism between activities. For example, two parallel activities may have a duration of 50 ticks and the same start and stop time. In this case, both will be assigned a wall-clock time responsibility of 25 ticks. This field is zero for *Simple Events*. |
+| `ExclusiveWallClockTimeResponsibilityTicks` | This field has the same meaning as `WallClockTimeResponsibilityTicks`, except that it doesn't include the wall-clock time responsibility ticks of children activities. This field is zero for *Simple Events*. |
+| `Data` | Points to other data stored in the event. The type of data pointed to is different, depending on the `EventId` field. |
| `ProcessId` | The identifier for the process in which the event occurred. |
| `ThreadId` | The identifier for the thread in which the event occurred. |
| `ProcessorIndex` | The zero-indexed CPU number on which the event occurred. |
@@ -67,9 +69,13 @@ typedef struct EVENT_DATA_TAG
## Remarks
-Many fields in `EVENT_DATA` contain tick counts. C++ Build Insights uses Window's performance counter as a source of ticks. A tick count must be used with the `TickFrequency` field to convert it into an appropriate time unit such as seconds. See the example below for performing this conversion. `EVENT_DATA` doesn't contain a field for the regular tick count of an activity. To obtain this value, subtract `StartTimestamp` from `StopTimestamp`. `EVENT_DATA` is a structure that's meant to be used by C API users. For C++ API users, classes like [Event](../cpp-event-data-types/event.md) do time conversions automatically.
+Many fields in `EVENT_DATA` contain tick counts. C++ Build Insights uses the Windows performance counter as a source of ticks. A tick count must be used with the `TickFrequency` field to convert it into an appropriate time unit such as seconds. See the [tick conversion example](#tick-conversion-example), below.
-The value of the `EVENT_DATA` `Data` field depends on the value of its `EventId` field. The value of `Data` is described in the table below. Some entity identifiers may be missing from the table below. In this case, the `Data` field is set to **`nullptr`** or zero.
+`EVENT_DATA` doesn't contain a field for the regular tick count of an activity. To obtain this value, subtract `StartTimestamp` from `StopTimestamp`.
+
+`EVENT_DATA` is a structure that's meant to be used by C API users. For C++ API users, classes like [Event](../cpp-event-data-types/event.md) do time conversions automatically.
+
+The value of the `EVENT_DATA` `Data` field depends on the value of its `EventId` field. The value of `Data` is described in the table below. Some entity identifiers may be missing from the table below. In this case, the `Data` field is set to `nullptr` or zero.
| `EventId` value | Type pointed to by `Data` |
|--|--|
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/event-id-enum.md b/docs/build-insights/reference/sdk/c-event-data-types/event-id-enum.md
index 859e6b7f2c..496af5fae9 100644
--- a/docs/build-insights/reference/sdk/c-event-data-types/event-id-enum.md
+++ b/docs/build-insights/reference/sdk/c-event-data-types/event-id-enum.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "EVENT_ID"
---
# EVENT_ID enum
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `EVENT_ID` enum.
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/file-data-struct.md b/docs/build-insights/reference/sdk/c-event-data-types/file-data-struct.md
index caca2391e6..6ee47af9c3 100644
--- a/docs/build-insights/reference/sdk/c-event-data-types/file-data-struct.md
+++ b/docs/build-insights/reference/sdk/c-event-data-types/file-data-struct.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "FILE_DATA
---
# FILE_DATA structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `FILE_DATA` structure describes a file input or output.
@@ -28,7 +28,7 @@ typedef struct FILE_DATA_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `Path` | The file's absolute path |
| `TypeCode` | A code describing the type of the file. For more information, see [FILE_TYPE_CODE](file-type-code-enum.md). |
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/file-type-code-enum.md b/docs/build-insights/reference/sdk/c-event-data-types/file-type-code-enum.md
index 5e7bc2fbda..1b1626e9f7 100644
--- a/docs/build-insights/reference/sdk/c-event-data-types/file-type-code-enum.md
+++ b/docs/build-insights/reference/sdk/c-event-data-types/file-type-code-enum.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "FILE_TYPE
---
# FILE_TYPE_CODE enum
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `FILE_TYPE_CODE` enum describes the type of a file.
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/front-end-file-data-struct.md b/docs/build-insights/reference/sdk/c-event-data-types/front-end-file-data-struct.md
index c119f5c41b..b4c5f345c3 100644
--- a/docs/build-insights/reference/sdk/c-event-data-types/front-end-file-data-struct.md
+++ b/docs/build-insights/reference/sdk/c-event-data-types/front-end-file-data-struct.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "FRONT_END
---
# FRONT_END_FILE_DATA structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `FRONT_END_FILE_DATA` structure describes the processing of a file by the compiler front end.
@@ -27,7 +27,7 @@ typedef struct FRONT_END_FILE_DATA_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `Path` | The file's absolute path, encoded in UTF-8. |
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/function-data-struct.md b/docs/build-insights/reference/sdk/c-event-data-types/function-data-struct.md
index df13ee2769..f4bbfea723 100644
--- a/docs/build-insights/reference/sdk/c-event-data-types/function-data-struct.md
+++ b/docs/build-insights/reference/sdk/c-event-data-types/function-data-struct.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "FUNCTION_
---
# FUNCTION_DATA structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `FUNCTION_DATA` structure describes a function.
@@ -27,7 +27,7 @@ typedef struct FUNCTION_DATA_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `Name` | The function's name, encoded in UTF-8. |
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/function-force-inlinee-data-struct.md b/docs/build-insights/reference/sdk/c-event-data-types/function-force-inlinee-data-struct.md
index 839a8de000..122800678c 100644
--- a/docs/build-insights/reference/sdk/c-event-data-types/function-force-inlinee-data-struct.md
+++ b/docs/build-insights/reference/sdk/c-event-data-types/function-force-inlinee-data-struct.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "FUNCTION_
---
# FUNCTION_FORCE_INLINEE_DATA structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `FUNCTION_FORCE_INLINEE_DATA` structure describes a force-inlined function.
@@ -28,7 +28,7 @@ typedef struct FUNCTION_FORCE_INLINEE_DATA_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `Name` | The function's name, encoded in UTF-8. |
| `Size` | The function's size, as a number of intermediate instructions. |
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/invocation-data-struct.md b/docs/build-insights/reference/sdk/c-event-data-types/invocation-data-struct.md
index b45846849e..2a188c9c00 100644
--- a/docs/build-insights/reference/sdk/c-event-data-types/invocation-data-struct.md
+++ b/docs/build-insights/reference/sdk/c-event-data-types/invocation-data-struct.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "INVOCATIO
---
# INVOCATION_DATA structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `INVOCATION_DATA` structure describes a compiler or linker invocation.
@@ -33,7 +33,7 @@ typedef struct INVOCATION_DATA_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `MSVCToolCode` | A code that identifies the invocation's type. For more information, see [MSVC_TOOL_CODE](msvc-tool-code-enum.md). |
| `ToolVersion` | An object that stores the invoked tool's version as a group of integral values. |
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/invocation-version-data-struct.md b/docs/build-insights/reference/sdk/c-event-data-types/invocation-version-data-struct.md
index 2b6cfbfe5d..29407ee025 100644
--- a/docs/build-insights/reference/sdk/c-event-data-types/invocation-version-data-struct.md
+++ b/docs/build-insights/reference/sdk/c-event-data-types/invocation-version-data-struct.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "INVOCATIO
---
# INVOCATION_VERSION_DATA structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `INVOCATION_VERSION_DATA` structure describes a version number as a group of integral values.
@@ -30,7 +30,7 @@ typedef struct INVOCATION_VERSION_DATA_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `VersionMajor` | The version's major number. |
| `VersionMinor` | The version's minor number. |
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/msvc-tool-code-enum.md b/docs/build-insights/reference/sdk/c-event-data-types/msvc-tool-code-enum.md
index 16d502e42e..c0c00c4d11 100644
--- a/docs/build-insights/reference/sdk/c-event-data-types/msvc-tool-code-enum.md
+++ b/docs/build-insights/reference/sdk/c-event-data-types/msvc-tool-code-enum.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "MSVC_TOOL
---
# MSVC_TOOL_CODE enum
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `MSVC_TOOL_CODE` enum.
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/name-value-pair-data-struct.md b/docs/build-insights/reference/sdk/c-event-data-types/name-value-pair-data-struct.md
index de13d49ca3..f748ff97c1 100644
--- a/docs/build-insights/reference/sdk/c-event-data-types/name-value-pair-data-struct.md
+++ b/docs/build-insights/reference/sdk/c-event-data-types/name-value-pair-data-struct.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "NAME_VALU
---
# NAME_VALUE_PAIR_DATA structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `NAME_VALUE_PAIR_DATA` structure describes a name and value pair.
@@ -27,7 +27,7 @@ typedef struct NAME_VALUE_PAIR_DATA_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `Name` | The name. |
| `Value` | The value. |
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/symbol-name-data-struct.md b/docs/build-insights/reference/sdk/c-event-data-types/symbol-name-data-struct.md
index 4a1c3b99cf..933167d616 100644
--- a/docs/build-insights/reference/sdk/c-event-data-types/symbol-name-data-struct.md
+++ b/docs/build-insights/reference/sdk/c-event-data-types/symbol-name-data-struct.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "SYMBOL_NA
---
# SYMBOL_NAME_DATA structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `SYMBOL_NAME_DATA` structure describes a compiler front-end symbol.
@@ -28,7 +28,7 @@ typedef struct SYMBOL_NAME_DATA_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `Key` | The symbol's key. This value is unique within the trace being analyzed. |
| `Name` | The symbol's name. |
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/template-instantiation-data-struct.md b/docs/build-insights/reference/sdk/c-event-data-types/template-instantiation-data-struct.md
index e8d89a8ec5..a2056df0d0 100644
--- a/docs/build-insights/reference/sdk/c-event-data-types/template-instantiation-data-struct.md
+++ b/docs/build-insights/reference/sdk/c-event-data-types/template-instantiation-data-struct.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "TEMPLATE_
---
# TEMPLATE_INSTANTIATION_DATA structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `TEMPLATE_INSTANTIATION_DATA` structure describes a template instantiation.
@@ -29,7 +29,7 @@ typedef struct TEMPLATE_INSTANTIATION_DATA_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `SpecializationSymbolKey` | The key for the template specialization's type. This value is unique within the trace being analyzed. |
| `PrimaryTemplateSymbolKey` | The key for the primary template type that was specialized. This value is unique within the trace being analyzed. |
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/template-instantiation-kind-code-enum.md b/docs/build-insights/reference/sdk/c-event-data-types/template-instantiation-kind-code-enum.md
index b1aaa00ad6..f258401a81 100644
--- a/docs/build-insights/reference/sdk/c-event-data-types/template-instantiation-kind-code-enum.md
+++ b/docs/build-insights/reference/sdk/c-event-data-types/template-instantiation-kind-code-enum.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "TEMPLATE_
---
# TEMPLATE_INSTANTIATION_KIND_CODE enum
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `TEMPLATE_INSTANTIATION_KIND_CODE` enum.
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/trace-info-data-struct.md b/docs/build-insights/reference/sdk/c-event-data-types/trace-info-data-struct.md
index 4092ed2331..e5ab1bc130 100644
--- a/docs/build-insights/reference/sdk/c-event-data-types/trace-info-data-struct.md
+++ b/docs/build-insights/reference/sdk/c-event-data-types/trace-info-data-struct.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "TRACE_INF
---
# TRACE_INFO_DATA structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `TRACE_INFO_DATA` structure describes a trace being analyzed or relogged.
@@ -30,7 +30,7 @@ typedef struct TRACE_INFO_DATA_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `LogicalProcessorCount` | The number of logical processors on the machine where the trace was collected. |
| `TickFrequency` | The number of ticks per second to use when evaluating a duration measured in ticks. |
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/translation-unit-pass-code-enum.md b/docs/build-insights/reference/sdk/c-event-data-types/translation-unit-pass-code-enum.md
index ce4e09ab1f..b309165509 100644
--- a/docs/build-insights/reference/sdk/c-event-data-types/translation-unit-pass-code-enum.md
+++ b/docs/build-insights/reference/sdk/c-event-data-types/translation-unit-pass-code-enum.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "TRANSLATI
---
# TRANSLATION_UNIT_PASS_CODE enum
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `TRANSLATION_UNIT_PASS_CODE` enum.
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/translation-unit-type-data.md b/docs/build-insights/reference/sdk/c-event-data-types/translation-unit-type-data.md
new file mode 100644
index 0000000000..6d7821bfa3
--- /dev/null
+++ b/docs/build-insights/reference/sdk/c-event-data-types/translation-unit-type-data.md
@@ -0,0 +1,38 @@
+---
+title: "TRANSLATION_UNIT_TYPE_DATA enum"
+description: "The C++ Build Insights SDK TRANSLATION_UNIT_TYPE_DATA enum reference."
+ms.date: "06/10/2021"
+helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "TRANSLATION_UNIT_TYPE_DATA", "throughput analysis", "build time analysis", "vcperf.exe"]
+---
+# TRANSLATION_UNIT_TYPE_DATA enum
+
+::: moniker range="<=msvc-140"
+
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
+
+::: moniker-end
+::: moniker range=">=msvc-150"
+
+The `TRANSLATION_UNIT_TYPE_DATA` structure describes the type of the translation unit in the compiler front end pass.
+
+## Syntax
+
+```cpp
+typedef struct TRANSLATION_UNIT_TYPE_DATA_TAG
+{
+ int TranslationUnitType;
+
+} TRANSLATION_UNIT_TYPE_DATA;
+```
+
+## Members
+
+| Name | Description |
+|--|--|
+| `TranslationUnitType` | The type of this translation unit (either modules, header unit, or precompiled header). |
+
+## Remarks
+
+Used by the C SDK functions.
+
+::: moniker-end
diff --git a/docs/build-insights/reference/sdk/c-event-data-types/translation-unit-type.md b/docs/build-insights/reference/sdk/c-event-data-types/translation-unit-type.md
new file mode 100644
index 0000000000..1ee8e38e00
--- /dev/null
+++ b/docs/build-insights/reference/sdk/c-event-data-types/translation-unit-type.md
@@ -0,0 +1,30 @@
+---
+title: "TRANSLATION_UNIT_TYPE enum"
+description: "The C++ Build Insights SDK TRANSLATION_UNIT_TYPE enum reference."
+ms.date: "06/10/2021"
+helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "TRANSLATION_UNIT_TYPE", "throughput analysis", "build time analysis", "vcperf.exe"]
+---
+# TRANSLATION_UNIT_TYPE enum
+
+::: moniker range="<=msvc-140"
+
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
+
+::: moniker-end
+::: moniker range=">=msvc-150"
+
+The `TRANSLATION_UNIT_TYPE` enum.
+
+## Members
+
+| Name | Value | Description |
+|--|--|--|
+| `TRANSLATION_UNIT_TYPE_MODULE` | 0 (0x00000000) | The type of this translation unit is a module interface. |
+| `TRANSLATION_UNIT_TYPE_HEADER_UNIT` | 1 (0x00000001) | The type of this translation unit is a header unit. |
+| `TRANSLATION_UNIT_TYPE_PRECOMPILED_HEADER` | 2 (0x00000002) | The type of this translation unit is a precompiled header (PCH). |
+
+## Remarks
+
+Used by the C SDK functions.
+
+::: moniker-end
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/activity.md b/docs/build-insights/reference/sdk/cpp-event-data-types/activity.md
index 2228c58ab1..fbf985fe5d 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/activity.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/activity.md
@@ -1,17 +1,20 @@
---
-title: "Activity class"
-description: "The C++ Build Insights SDK Activity class reference."
-ms.date: "02/12/2020"
+title: "Activity class - C++ Build Insights SDK"
+description: "The C++ Build Insights SDK Activity class reference. Use the Activity class to match any activity event."
+ms.date: "06/16/2022"
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Activity", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: reference
+ms.custom: kr2b-contr-experiment
---
+
# Activity class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `Activity` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match any activity event. Refer to [event table](../event-table.md) to see all events that can be matched by the `Activity` class.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/back-end-pass.md b/docs/build-insights/reference/sdk/cpp-event-data-types/back-end-pass.md
index 48cc2703f5..076d93d4d9 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/back-end-pass.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/back-end-pass.md
@@ -1,17 +1,20 @@
---
-title: "BackEndPass class"
-description: "The C++ Build Insights SDK BackEndPass class reference."
-ms.date: "02/12/2020"
+title: "BackEndPass class - C++ Build Insights SDK"
+description: "The C++ Build Insights SDK BackEndPass class reference. Use the BackEndPass class to match a BACK_END_PASS event."
+ms.date: "06/16/2022"
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "BackEndPass", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: reference
+ms.custom: kr2b-contr-experiment
---
+
# BackEndPass class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `BackEndPass` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [BACK_END_PASS](../event-table.md#back-end-pass) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/bottom-up.md b/docs/build-insights/reference/sdk/cpp-event-data-types/bottom-up.md
index 254f514049..125c2478e5 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/bottom-up.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/bottom-up.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "BottomUp"
---
# BottomUp class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `BottomUp` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [BOTTOM_UP](../event-table.md#bottom-up) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/c1-dll.md b/docs/build-insights/reference/sdk/cpp-event-data-types/c1-dll.md
index 26af4ff995..3982034e86 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/c1-dll.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/c1-dll.md
@@ -1,17 +1,20 @@
---
-title: "C1DLL class"
-description: "The C++ Build Insights SDK C1DLL class reference."
-ms.date: "02/12/2020"
+title: "C1DLL class - C++ Build Insights SDK"
+description: "The C++ Build Insights SDK C1DLL class reference. Use the C1DLL class to match a C1_DLL event."
+ms.date: "06/16/2022"
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "C1DLL", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: reference
+ms.custom: kr2b-contr-experiment
---
+
# C1DLL class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `C1DLL` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [C1_DLL](../event-table.md#c1-dll) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/c2-dll.md b/docs/build-insights/reference/sdk/cpp-event-data-types/c2-dll.md
index f3621085f6..677326609c 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/c2-dll.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/c2-dll.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "C2DLL", "
---
# C2DLL class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `C2DLL` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [C2_DLL](../event-table.md#c2-dll) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/code-generation.md b/docs/build-insights/reference/sdk/cpp-event-data-types/code-generation.md
index 6865a89684..0ae7671e26 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/code-generation.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/code-generation.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "CodeGener
---
# CodeGeneration class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `CodeGeneration` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [CODE_GENERATION](../event-table.md#code-generation) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/command-line.md b/docs/build-insights/reference/sdk/cpp-event-data-types/command-line.md
index 697ac070ab..9fcaa9a69f 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/command-line.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/command-line.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "CommandLi
---
# CommandLine class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `CommandLine` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [COMMAND_LINE](../event-table.md#command-line) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/compiler-pass.md b/docs/build-insights/reference/sdk/cpp-event-data-types/compiler-pass.md
index 4b8a3dccb9..5fc55fa2ab 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/compiler-pass.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/compiler-pass.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "CompilerP
---
# CompilerPass class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `CompilerPass` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [BACK_END_PASS](../event-table.md#back-end-pass) or [FRONT_END_PASS](../event-table.md#front-end-pass) event.
@@ -47,7 +47,7 @@ Along with the inherited members from its [Activity](activity.md) base class, th
#### PassCode
-|||
+|Value|Description|
|-|-|
|FRONT_END|The front-end pass.|
|BACK_END|The back-end pass.|
@@ -56,7 +56,7 @@ Along with the inherited members from its [Activity](activity.md) base class, th
[InputSourcePath](#input-source-path)\
[OutputObjectPath](#output-object-path)\
-[PassCode](#pass-code)\
+[PassCode](#pass-code)
## CompilerPass
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/compiler.md b/docs/build-insights/reference/sdk/cpp-event-data-types/compiler.md
index b8ccf34851..12cc382a39 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/compiler.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/compiler.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Compiler"
---
# Compiler class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `Compiler` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [COMPILER](../event-table.md#compiler) event.
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 bd49c48810..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
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Environme
---
# EnvironmentVariable class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `EnvironmentVariable` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match an [ENVIRONMENT_VARIABLE](../event-table.md#environment-variable) event.
@@ -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 ce82594208..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
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "EventGrou
---
# EventGroup class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `EventGroup` class template is the base class for all group capture classes.
@@ -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 fee4a549ba..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
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "EventStac
---
# EventStack class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `EventStack` class is a collection of [Event](event.md) objects. All events received from the C++ Build Insights SDK come in the form of an `EventStack` object. The last entry in this stack is the event currently being processed. The entries that precede the last entry are the parent hierarchy of the current event. For more information on the event model used in C++ Build Insights, see [event table](../event-table.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 e885746d9f..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
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Event", "
---
# Event class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `Event` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match any event.
@@ -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/executable-image-output.md b/docs/build-insights/reference/sdk/cpp-event-data-types/executable-image-output.md
index 04e76fbba9..850aea985c 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/executable-image-output.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/executable-image-output.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Executabl
---
# ExecutableImageOutput class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `ExecutableImageOutput` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match an [EXECUTABLE_IMAGE_OUTPUT](../event-table.md#executable-image-output) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/exp-output.md b/docs/build-insights/reference/sdk/cpp-event-data-types/exp-output.md
index 3232656a5f..179919e9a5 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/exp-output.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/exp-output.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "ExpOutput
---
# ExpOutput class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `ExpOutput` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match an [EXP_OUTPUT](../event-table.md#exp-output) event.
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 e4acd598a6..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
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "FileInput
---
# FileInput class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `FileInput` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [FILE_INPUT](../event-table.md#file-input) event.
@@ -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 a22f2896db..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
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "FileOutpu
---
# FileOutput class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `FileOutput` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match an [EXECUTABLE_IMAGE_OUTPUT](../event-table.md#executable-image-output), [EXP_OUTPUT](../event-table.md#exp-output), [IMP_LIB_OUTPUT](../event-table.md#imp-lib-output), [LIB_OUTPUT](../event-table.md#lib-output), or [OBJ_OUTPUT](../event-table.md#obj-output) event.
@@ -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 ceaa8e2df3..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
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "ForceInli
---
# ForceInlinee class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `ForceInlinee` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [FORCE_INLINEE](../event-table.md#force-inlinee) event.
@@ -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/front-end-file-group.md b/docs/build-insights/reference/sdk/cpp-event-data-types/front-end-file-group.md
index 6cc5dfbdc9..d6a370160f 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/front-end-file-group.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/front-end-file-group.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "FrontEndF
---
# FrontEndFileGroup class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `FrontEndFileGroup` class is used with the [MatchEventStack](../functions/match-event-stack.md) and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match groups of [FRONT_END_FILE](../event-table.md#front-end-file) events.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/front-end-file.md b/docs/build-insights/reference/sdk/cpp-event-data-types/front-end-file.md
index ff67d7c8ba..6cf0901f5e 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/front-end-file.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/front-end-file.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "FrontEndF
---
# FrontEndFile class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `FrontEndFile` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [FRONT_END_FILE](../event-table.md#front-end-file) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/front-end-pass.md b/docs/build-insights/reference/sdk/cpp-event-data-types/front-end-pass.md
index 8589cd4af0..8d61fc735d 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/front-end-pass.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/front-end-pass.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "FrontEndP
---
# FrontEndPass class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `FrontEndPass` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [FRONT_END_PASS](../event-table.md#front-end-pass) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/function.md b/docs/build-insights/reference/sdk/cpp-event-data-types/function.md
index ee77403a8e..bc81e6fbcf 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/function.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/function.md
@@ -1,17 +1,19 @@
---
-title: "Function class"
-description: "The C++ Build Insights SDK Function class reference."
-ms.date: "02/12/2020"
+title: "C++ Build Insights SDK Function class"
+description: "The C++ Build Insights SDK Function class reference. Use the Function class to match a FUNCTION event."
+ms.date: "04/27/2022"
+ms.topic: language-reference
+ms.custom: kr2b-contr-experiment
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Function", "throughput analysis", "build time analysis", "vcperf.exe"]
---
# Function class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `Function` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [FUNCTION](../event-table.md#function) event.
@@ -29,7 +31,7 @@ public:
## Members
-Along with the inherited members from its [Activity](activity.md) base class, the `Function` class contains the following members:
+Along with the inherited members from the [Activity](activity.md) base class, the `Function` class contains the following members:
### Constructors
@@ -39,7 +41,7 @@ Along with the inherited members from its [Activity](activity.md) base class, th
[Name](#name)
-## Function
+## Function
```cpp
Function(const RawEvent& event);
@@ -50,7 +52,7 @@ Function(const RawEvent& event);
*event*\
A [FUNCTION](../event-table.md#function) event.
-## Name
+## Name
```cpp
const char* Name() const;
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/header-unit.md b/docs/build-insights/reference/sdk/cpp-event-data-types/header-unit.md
new file mode 100644
index 0000000000..d94130ba30
--- /dev/null
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/header-unit.md
@@ -0,0 +1,51 @@
+---
+title: "HeaderUnit class"
+description: "The C++ Build Insights SDK HeaderUnit class reference."
+ms.date: "06/08/2021"
+helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "HeaderUnit", "throughput analysis", "build time analysis", "vcperf.exe"]
+---
+# HeaderUnit class
+
+::: moniker range="<=msvc-140"
+
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
+
+::: moniker-end
+::: moniker range=">=msvc-150"
+
+The `HeaderUnit` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [HEADER_UNIT](../event-table.md#header-unit) event.
+
+## Syntax
+
+```cpp
+class HeaderUnit : public TranslationUnitType
+{
+public:
+ HeaderUnit(const RawEvent& event);
+};
+```
+
+## Members
+
+Along with the inherited members from its [TranslationUnitType](translation-unit-type.md) base class, the `HeaderUnit` class contains the following members:
+
+### Constructors
+
+[HeaderUnit](#header-unit)
+
+### Functions
+
+None
+
+## HeaderUnit
+
+```cpp
+HeaderUnit(const RawEvent& event);
+```
+
+### Parameters
+
+*event*\
+A [HEADER_UNIT](../event-table.md#header-unit) event.
+
+::: moniker-end
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/imp-lib-output.md b/docs/build-insights/reference/sdk/cpp-event-data-types/imp-lib-output.md
index 6425648dfd..88b5bcdbed 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/imp-lib-output.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/imp-lib-output.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "ImpLibOut
---
# ImpLibOutput class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `ImpLibOutput` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match an [IMP_LIB_OUTPUT](../event-table.md#imp-lib-output) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/invocation-group.md b/docs/build-insights/reference/sdk/cpp-event-data-types/invocation-group.md
index 9d9160d2ab..6fdae35fd4 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/invocation-group.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/invocation-group.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Invocatio
---
# InvocationGroup class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `InvocationGroup` class is used with the [MatchEventStack](../functions/match-event-stack.md) and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match groups containing a mix of [COMPILER](../event-table.md#compiler) and [LINKER](../event-table.md#linker) events.
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 3ffe65241d..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
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Invocatio
---
# Invocation class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `Invocation` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [COMPILER](../event-table.md#compiler) or [LINKER](../event-table.md#linker) event.
@@ -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/lib-output.md b/docs/build-insights/reference/sdk/cpp-event-data-types/lib-output.md
index 91be1b3136..aec337bdb0 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/lib-output.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/lib-output.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "LibOutput
---
# LibOutput class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `LibOutput` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [LIB_OUTPUT](../event-table.md#lib-output) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/linker-group.md b/docs/build-insights/reference/sdk/cpp-event-data-types/linker-group.md
index 7277f6fc05..ee1feada4d 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/linker-group.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/linker-group.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "LinkerGro
---
# LinkerGroup class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `LinkerGroup` class is used with the [MatchEventStack](../functions/match-event-stack.md) and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match groups of [LINKER](../event-table.md#linker) events.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/linker-pass.md b/docs/build-insights/reference/sdk/cpp-event-data-types/linker-pass.md
index 611d3a6cc8..d0219af45b 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/linker-pass.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/linker-pass.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "LinkerPas
---
# LinkerPass class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `LinkerPass` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [PASS1](../event-table.md#pass1) or [PASS2](../event-table.md#pass2) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/linker.md b/docs/build-insights/reference/sdk/cpp-event-data-types/linker.md
index d543294763..4275f822e4 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/linker.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/linker.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Linker",
---
# Linker class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `Linker` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [LINKER](../event-table.md#linker) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/ltcg.md b/docs/build-insights/reference/sdk/cpp-event-data-types/ltcg.md
index 29a78797bc..8895f29552 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/ltcg.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/ltcg.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "LTCG", "t
---
# LTCG class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `LTCG` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [LTCG](../event-table.md#ltcg) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/module.md b/docs/build-insights/reference/sdk/cpp-event-data-types/module.md
new file mode 100644
index 0000000000..cbefd56200
--- /dev/null
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/module.md
@@ -0,0 +1,51 @@
+---
+title: "Module class"
+description: "The C++ Build Insights SDK Module class reference."
+ms.date: "06/08/2021"
+helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Module", "throughput analysis", "build time analysis", "vcperf.exe"]
+---
+# Module class
+
+::: moniker range="<=msvc-140"
+
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
+
+::: moniker-end
+::: moniker range=">=msvc-150"
+
+The `Module` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [MODULE](../event-table.md#module) event.
+
+## Syntax
+
+```cpp
+class Module : public TranslationUnitType
+{
+public:
+ Module(const RawEvent& event);
+};
+```
+
+## Members
+
+Along with the inherited members from its [TranslationUnitType](translation-unit-type.md) base class, the `Module` class contains the following members:
+
+### Constructors
+
+[Module](#module)
+
+### Functions
+
+None
+
+## Module
+
+```cpp
+Module(const RawEvent& event);
+```
+
+### Parameters
+
+*event*\
+A [MODULE](../event-table.md#module) event.
+
+::: moniker-end
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/obj-output.md b/docs/build-insights/reference/sdk/cpp-event-data-types/obj-output.md
index 81290caa45..45c53b88f9 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/obj-output.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/obj-output.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "ObjOutput
---
# ObjOutput class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `ObjOutput` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match an [OBJ_OUTPUT](../event-table.md#obj-output) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/opt-icf.md b/docs/build-insights/reference/sdk/cpp-event-data-types/opt-icf.md
index 15c719eca9..dd1818a3aa 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/opt-icf.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/opt-icf.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "OptICF",
---
# OptICF class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `OptICF` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match an [OPT_ICF](../event-table.md#opt-icf) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/opt-lbr.md b/docs/build-insights/reference/sdk/cpp-event-data-types/opt-lbr.md
index 9605cfee53..f4df6a6cdc 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/opt-lbr.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/opt-lbr.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "OptLBR",
---
# OptLBR class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `OptLBR` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match an [OPT_LBR](../event-table.md#opt-lbr) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/opt-ref.md b/docs/build-insights/reference/sdk/cpp-event-data-types/opt-ref.md
index 82466c9e50..6b6b402ccd 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/opt-ref.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/opt-ref.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "OptRef",
---
# OptRef class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `OptRef` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match an [OPT_REF](../event-table.md#opt-ref) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/pass1.md b/docs/build-insights/reference/sdk/cpp-event-data-types/pass1.md
index c0ee2832d1..6063aeef27 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/pass1.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/pass1.md
@@ -1,17 +1,19 @@
---
-title: "Pass1 class"
-description: "The C++ Build Insights SDK Pass1 class reference."
-ms.date: "02/12/2020"
+title: "C++ Build Insights SDK Pass1 class"
+description: "The C++ Build Insights SDK Pass1 class reference. Use the Pass1 class to match a PASS1 event"
+ms.date: "04/27/2022"
+ms.topic: language-reference
+ms.custom: kr2b-contr-experiment
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Pass1", "throughput analysis", "build time analysis", "vcperf.exe"]
---
# Pass1 class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `Pass1` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [PASS1](../event-table.md#pass1) event.
@@ -27,13 +29,13 @@ public:
## Members
-Along with the inherited members from its [LinkerPass](linker-pass.md) base class, the `Pass1` class contains the following members:
+Along with the inherited members from the [LinkerPass](linker-pass.md) base class, the `Pass1` class contains the following members:
### Constructors
[Pass1](#pass1)
-## Pass1
+## Pass1
```cpp
Pass1(const RawEvent& event);
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/pass2.md b/docs/build-insights/reference/sdk/cpp-event-data-types/pass2.md
index b4ebda5ad3..c99c01f596 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/pass2.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/pass2.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Pass2", "
---
# Pass2 class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `Pass2` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [PASS2](../event-table.md#pass2) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/pre-ltcg-opt-ref.md b/docs/build-insights/reference/sdk/cpp-event-data-types/pre-ltcg-opt-ref.md
index 343a7173e0..61bae8e818 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/pre-ltcg-opt-ref.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/pre-ltcg-opt-ref.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "PreLTCGOp
---
# PreLTCGOptRef class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `PreLTCGOptRef` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [PRE_LTCG_OPT_REF](../event-table.md#pre-ltcg-opt-ref) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/precompiled-header.md b/docs/build-insights/reference/sdk/cpp-event-data-types/precompiled-header.md
new file mode 100644
index 0000000000..d2dcf369bd
--- /dev/null
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/precompiled-header.md
@@ -0,0 +1,51 @@
+---
+title: "PrecompiledHeader class"
+description: "The C++ Build Insights SDK PrecompiledHeader class reference."
+ms.date: "06/08/2021"
+helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "PrecompiledHeader", "throughput analysis", "build time analysis", "vcperf.exe"]
+---
+# PrecompiledHeader class
+
+::: moniker range="<=msvc-140"
+
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
+
+::: moniker-end
+::: moniker range=">=msvc-150"
+
+The `PrecompiledHeader` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [PRECOMPILED_HEADER](../event-table.md#precompiled-header) event.
+
+## Syntax
+
+```cpp
+class PrecompiledHeader : public TranslationUnitType
+{
+public:
+ PrecompiledHeader(const RawEvent& event);
+};
+```
+
+## Members
+
+Along with the inherited members from its [TranslationUnitType](translation-unit-type.md) base class, the `PrecompiledHeader` class contains the following members:
+
+### Constructors
+
+[PrecompiledHeader](#precompiled-header)
+
+### Functions
+
+None
+
+## PrecompiledHeader
+
+```cpp
+PrecompiledHeader(const RawEvent& event);
+```
+
+### Parameters
+
+*event*\
+A [PRECOMPILED_HEADER](../event-table.md#precompiled-header) event.
+
+::: moniker-end
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 bea4ac1ce0..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
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "RawEvent"
---
# RawEvent class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `RawEvent` class is used to represent a general event in an [EventStack](event-stack.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/simple-event.md b/docs/build-insights/reference/sdk/cpp-event-data-types/simple-event.md
index d899c134d7..b811c0bab2 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/simple-event.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/simple-event.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "SimpleEve
---
# SimpleEvent class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `SimpleEvent` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match any simple event. Refer to the [event table](../event-table.md) to see all events that can be matched by the `SimpleEvent` class.
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 c34a07fb2d..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
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "SymbolNam
---
# SymbolName class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `SymbolName` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [SYMBOL_NAME](../event-table.md#symbol-name) event.
@@ -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-group.md b/docs/build-insights/reference/sdk/cpp-event-data-types/template-instantiation-group.md
index c798819e6d..1af54668f6 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/template-instantiation-group.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/template-instantiation-group.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "TemplateI
---
# TemplateInstantiationGroup class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `TemplateInstantiationGroup` class is used with the [MatchEventStack](../functions/match-event-stack.md) and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match groups of [TEMPLATE_INSTANTIATION](../event-table.md#template-instantiation) events.
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 127789c274..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
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "TemplateI
---
# TemplateInstantiation class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `TemplateInstantiation` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [TEMPLATE_INSTANTIATION](../event-table.md#template-instantiation) event.
@@ -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/thread.md b/docs/build-insights/reference/sdk/cpp-event-data-types/thread.md
index c361ed90f7..1e850cafb6 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/thread.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/thread.md
@@ -3,15 +3,16 @@ title: "Thread class"
description: "The C++ Build Insights SDK Thread class reference."
ms.date: "02/12/2020"
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Thread", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: reference
---
# Thread class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `Thread` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [THREAD](../event-table.md#thread) event.
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/top-down.md b/docs/build-insights/reference/sdk/cpp-event-data-types/top-down.md
index 6d74855a9d..ecf52e8165 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/top-down.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/top-down.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "TopDown",
---
# TopDown class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `TopDown` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [TOP_DOWN](../event-table.md#top-down) event.
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 a318fe02d2..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
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "TraceInfo
---
# TraceInfo class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `TraceInfo` class is used to access useful properties about a trace being analyzed or relogged.
@@ -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/cpp-event-data-types/translation-unit-type.md b/docs/build-insights/reference/sdk/cpp-event-data-types/translation-unit-type.md
new file mode 100644
index 0000000000..985dc0d3d4
--- /dev/null
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/translation-unit-type.md
@@ -0,0 +1,70 @@
+---
+title: "TranslationUnitType class"
+description: "The C++ Build Insights SDK TranslationUnitType class reference."
+ms.date: "06/08/2021"
+helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "TranslationUnitType", "throughput analysis", "build time analysis", "vcperf.exe"]
+---
+# TranslationUnitType class
+
+::: moniker range="<=msvc-140"
+
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
+
+::: moniker-end
+::: moniker range=">=msvc-150"
+
+The `TranslationUnitType` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [TRANSLATION_UNIT_TYPE](../event-table.md#translation-unit-type) event.
+
+## Syntax
+
+```cpp
+class TranslationUnitType : public SimpleEvent
+{
+public:
+ enum class Type
+ {
+ MODULE = TRANSLATION_UNIT_TYPE_MODULE,
+ HEADER_UNIT = TRANSLATION_UNIT_TYPE_HEADER_UNIT,
+ PCH = TRANSLATION_UNIT_TYPE_PRECOMPILED_HEADER
+ };
+
+ TranslationUnitType(const RawEvent& event);
+
+ Type Type() const;
+};
+```
+
+## Members
+
+Along with the inherited members from its [SimpleEvent](simple-event.md) base class, the `TranslationUnitType` class contains the following members:
+
+### Constructors
+
+[TranslationUnitType](#translation-unit-type)
+
+### Functions
+
+[Type](#type)
+
+## Type
+
+```cpp
+Type Type() const;
+```
+
+### Return Value
+
+The type of the translation unit: either MODULE, HEADER_UNIT, or PCH.
+
+## TranslationUnitType
+
+```cpp
+TranslationUnitType(const RawEvent& event);
+```
+
+### Parameters
+
+*event*\
+A [TRANSLATION_UNIT_TYPE](../event-table.md#translation-unit-type) event.
+
+::: moniker-end
diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/whole-program-analysis.md b/docs/build-insights/reference/sdk/cpp-event-data-types/whole-program-analysis.md
index ce51f2fd3f..1afce1de2b 100644
--- a/docs/build-insights/reference/sdk/cpp-event-data-types/whole-program-analysis.md
+++ b/docs/build-insights/reference/sdk/cpp-event-data-types/whole-program-analysis.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "WholeProg
---
# WholeProgramAnalysis class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `WholeProgramAnalysis` class is used with the [MatchEvent](../functions/match-event.md), [MatchEventInMemberFunction](../functions/match-event-in-member-function.md), [MatchEventStack](../functions/match-event-stack.md), and [MatchEventStackInMemberFunction](../functions/match-event-stack-in-member-function.md) functions. Use it to match a [WHOLE_PROGRAM_ANALYSIS](../event-table.md#whole-program-analysis) event.
diff --git a/docs/build-insights/reference/sdk/event-table.md b/docs/build-insights/reference/sdk/event-table.md
index 0b1f7110db..2a2993364f 100644
--- a/docs/build-insights/reference/sdk/event-table.md
+++ b/docs/build-insights/reference/sdk/event-table.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Events",
---
# C++ Build Insights SDK: event table
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
## Compiler events
@@ -28,7 +28,10 @@ The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. To s
[C1_DLL](#c1-dll)\
[FRONT_END_FILE](#front-end-file)\
[TEMPLATE_INSTANTIATION](#template-instantiation)\
-[SYMBOL_NAME](#symbol-name)
+[SYMBOL_NAME](#symbol-name)\
+[MODULE](#module)\
+[HEADER_UNIT](#header-unit)\
+[PRECOMPILED_HEADER](#precompiled-header)
## Compiler back-end events
@@ -143,7 +146,7 @@ The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. To s
| | Description | Occurs when the compiler front end starts and stops processing a file. This event is recursive. Recursion happens when the front end is parsing included files. |
| FRONT_END_PASS | Type | Activity |
| | Parents | [COMPILER](#compiler) |
-| | Children | [C1_DLL](#c1-dll) |
+| | Children | [C1_DLL](#c1-dll)
[MODULE](#module)
[HEADER_UNIT](#header-unit)
[PRECOMPILED_HEADER](#precompiled-header) |
| | Properties | - Absolute path to input source file
- Absolute path to output object file |
| | Capture classes | [Activity](cpp-event-data-types/activity.md)
[CompilerPass](cpp-event-data-types/compiler-pass.md)
[FrontEndPass](cpp-event-data-types/front-end-pass.md) |
| | Description | Occurs at the start and stop of the compiler front-end pass. This pass is responsible for parsing C/C++ source code and converting it into intermediate language. |
@@ -153,6 +156,12 @@ The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. To s
| | Properties | - Name of the function |
| | Capture classes | [Activity](cpp-event-data-types/activity.md)
[Function](cpp-event-data-types/function.md) |
| | Description | Occurs when starting and ending generating the code for a function. |
+| HEADER_UNIT | Type | Activity |
+| | Parents | [FRONT_END_PASS](#front-end-pass) |
+| | Children | None |
+| | Properties | None |
+| | Capture classes | [SimpleEvent](cpp-event-data-types/simple-event.md)
[TranslationUnitType](cpp-event-data-types/translation-unit-type.md)
[HeaderUnit](cpp-event-data-types/header-unit.md) |
+| | Description | Occurs at the start of the front-end pass and represents that a header unit translation unit is being processed. |
| IMP_LIB_OUTPUT | Type | Simple Event |
| | Parents | [LINKER](#linker) |
| | Children | None |
@@ -177,6 +186,12 @@ The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. To s
| | Properties | None |
| | Capture classes | [Activity](cpp-event-data-types/activity.md)
[LTCG](cpp-event-data-types/ltcg.md) |
| | Description | Occurs at the start and stop of link-time code generation. |
+| MODULE | Type | Activity |
+| | Parents | [FRONT_END_PASS](#front-end-pass) |
+| | Children | None |
+| | Properties | None |
+| | Capture classes | [SimpleEvent](cpp-event-data-types/simple-event.md)
[TranslationUnitType](cpp-event-data-types/translation-unit-type.md)
[Module](cpp-event-data-types/module.md) |
+| | Description | Occurs at the start of the front-end pass and represents that a module translation unit is being processed. |
| OBJ_OUTPUT | Type | Simple Event |
| | Parents | [COMPILER](#compiler) |
| | Children | None |
@@ -213,6 +228,12 @@ The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. To s
| | Properties | None |
| | Capture classes | [Activity](cpp-event-data-types/activity.md)
[Pass2](cpp-event-data-types/pass2.md) |
| | Description | Occurs at the start and stop of the linker's pass 2. |
+| PRECOMPILED_HEADER | Type | Activity |
+| | Parents | [FRONT_END_PASS](#front-end-pass) |
+| | Children | None |
+| | Properties | None |
+| | Capture classes | [SimpleEvent](cpp-event-data-types/simple-event.md)
[TranslationUnitType](cpp-event-data-types/translation-unit-type.md)
[PrecompiledHeader](cpp-event-data-types/precompiled-header.md) |
+| | Description | Occurs at the start of the front-end pass and represents that a precompiled header (PCH) translation unit is being processed. |
| PRE_LTCG_OPT_REF | Type | Activity |
| | Parents | [PASS1](#pass1) |
| | Children | None |
@@ -243,6 +264,12 @@ The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. To s
| | Properties | None |
| | Capture classes | [Activity](cpp-event-data-types/activity.md)
[TopDown](cpp-event-data-types/top-down.md) |
| | Description | Occurs at the start and stop of the whole program analysis' top-down pass. |
+| TRANSLATION_UNIT_TYPE | Type | Activity |
+| | Parents | [FRONT_END_PASS](#front-end-pass) |
+| | Children | [MODULE](#module)
[HEADER_UNIT](#header-unit)
[PRECOMPILED_HEADER](#precompiled-header) |
+| | Properties | - The type of translation unit. |
+| | Capture classes | [SimpleEvent](cpp-event-data-types/simple-event.md)
[TranslationUnitType](cpp-event-data-types/translation-unit-type.md) |
+| | Description | Occurs at the start of the front-end pass. The type identifies whether this pass is processing a module, header unit, or precompiled header. |
| WHOLE_PROGRAM_ANALYSIS | Type | Activity |
| | Parents | [C2_DLL](#c2-dll) |
| | Children | [BOTTOM_UP](#bottom-up)
[TOP_DOWN](#top-down) |
diff --git a/docs/build-insights/reference/sdk/functions/analyze-a.md b/docs/build-insights/reference/sdk/functions/analyze-a.md
index 48792d7a97..2f690eaa29 100644
--- a/docs/build-insights/reference/sdk/functions/analyze-a.md
+++ b/docs/build-insights/reference/sdk/functions/analyze-a.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "AnalyzeA"
---
# AnalyzeA
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `AnalyzeA` function is used to analyze MSVC events read from an input Event Tracing for Windows (ETW) trace.
diff --git a/docs/build-insights/reference/sdk/functions/analyze-w.md b/docs/build-insights/reference/sdk/functions/analyze-w.md
index 538a227021..f7dc804272 100644
--- a/docs/build-insights/reference/sdk/functions/analyze-w.md
+++ b/docs/build-insights/reference/sdk/functions/analyze-w.md
@@ -1,17 +1,20 @@
---
-title: "AnalyzeW"
-description: "The C++ Build Insights SDK AnalyzeW function reference."
-ms.date: "02/12/2020"
+title: "AnalyzeW - C++ Build Insights SDK"
+description: "The C++ Build Insights SDK AnalyzeW function reference. Use the AnalyzeW function to analyze MSVC events read from an input Event Tracing for Windows trace."
+ms.date: "06/16/2022"
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "AnalyzeW", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: reference
+ms.custom: kr2b-contr-experiment
---
-# AnalyzeW
-::: moniker range="<=vs-2015"
+# AnalyzeW function
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+::: moniker range="<=msvc-140"
+
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `AnalyzeW` function is used to analyze MSVC events read from an input Event Tracing for Windows (ETW) trace.
diff --git a/docs/build-insights/reference/sdk/functions/analyze.md b/docs/build-insights/reference/sdk/functions/analyze.md
index 2332b75847..32e5bd369c 100644
--- a/docs/build-insights/reference/sdk/functions/analyze.md
+++ b/docs/build-insights/reference/sdk/functions/analyze.md
@@ -1,17 +1,20 @@
---
-title: "Analyze"
-description: "The C++ Build Insights SDK Analyze function reference."
-ms.date: "02/12/2020"
+title: "Analyze - C++ Build Insights SDK"
+description: "The C++ Build Insights SDK Analyze function reference. Use the Analyze function to analyze an Event Tracing for Windows trace from MSVC while tracing a build."
+ms.date: "06/16/2022"
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Analyze", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: reference
+ms.custom: kr2b-contr-experiment
---
-# Analyze
-::: moniker range="<=vs-2015"
+# Analyze function
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+::: moniker range="<=msvc-140"
+
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `Analyze` function is used to analyze an Event Tracing for Windows (ETW) trace obtained from MSVC while tracing a C++ build. The events in the ETW trace are forwarded sequentially to an analyzer group provided by the caller. This function supports multi-pass analyses that allow forwarding the event stream to the analyzer group multiple times in a row.
diff --git a/docs/build-insights/reference/sdk/functions/inject-event.md b/docs/build-insights/reference/sdk/functions/inject-event.md
index 1d2476b888..e642578856 100644
--- a/docs/build-insights/reference/sdk/functions/inject-event.md
+++ b/docs/build-insights/reference/sdk/functions/inject-event.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "InjectEve
---
# InjectEvent
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `InjectEvent` function is called within a relogger implementing the [IRelogger](../other-types/irelogger-class.md) interface. It's used to write an Event Tracing for Windows (ETW) event in the output trace file of a relogging session.
diff --git a/docs/build-insights/reference/sdk/functions/make-dynamic-analyzer-group.md b/docs/build-insights/reference/sdk/functions/make-dynamic-analyzer-group.md
index 4fae4da0ec..0f67ad4504 100644
--- a/docs/build-insights/reference/sdk/functions/make-dynamic-analyzer-group.md
+++ b/docs/build-insights/reference/sdk/functions/make-dynamic-analyzer-group.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "MakeDynam
---
# MakeDynamicAnalyzerGroup
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `MakeDynamicAnalyzerGroup` function is used to create a dynamic analyzer group. Members of an analyzer group receive events one by one from left to right, until all events in a trace get analyzed.
diff --git a/docs/build-insights/reference/sdk/functions/make-dynamic-relogger-group.md b/docs/build-insights/reference/sdk/functions/make-dynamic-relogger-group.md
index 4844d75956..97ea2529d9 100644
--- a/docs/build-insights/reference/sdk/functions/make-dynamic-relogger-group.md
+++ b/docs/build-insights/reference/sdk/functions/make-dynamic-relogger-group.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "MakeDynam
---
# MakeDynamicReloggerGroup
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `MakeDynamicReloggerGroup` function is used to create a dynamic relogger group. Members of a relogger group receive events one by one from left to right until all events in a trace have been processed.
diff --git a/docs/build-insights/reference/sdk/functions/make-static-analyzer-group.md b/docs/build-insights/reference/sdk/functions/make-static-analyzer-group.md
index 7eaf918c02..e6aac87710 100644
--- a/docs/build-insights/reference/sdk/functions/make-static-analyzer-group.md
+++ b/docs/build-insights/reference/sdk/functions/make-static-analyzer-group.md
@@ -1,19 +1,21 @@
---
-title: "MakeStaticAnalyzerGroup"
-description: "The C++ Build Insights SDK MakeStaticAnalyzerGroup function reference."
-ms.date: "02/12/2020"
+title: "C++ Build Insights SDK MakeStaticAnalyzerGroup"
+description: "The C++ Build Insights SDK MakeStaticAnalyzerGroup function reference. Use this function to create a static analyzer group for functions like Analyze or Relog."
+ms.date: "04/27/2022"
+ms.topic: language-reference
+ms.custom: kr2b-contr-experiment
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "MakeStaticAnalyzerGroup", "throughput analysis", "build time analysis", "vcperf.exe"]
---
# MakeStaticAnalyzerGroup
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
-The `MakeStaticAnalyzerGroup` function is used to create a static analyzer group that can be passed to functions such as [`Analyze`](analyze.md) or [`Relog`](relog.md). Members of an analyzer group receive events one by one from left to right, until all events in a trace get analyzed.
+The `MakeStaticAnalyzerGroup` function creates a static analyzer group that you can pass to functions such as [`Analyze`](analyze.md) or [`Relog`](relog.md). Members of an analyzer group receive events one by one from left to right, until all events in a trace are analyzed.
## Syntax
@@ -32,10 +34,12 @@ A parameter pack of [`IAnalyzer`](../other-types/ianalyzer-class.md) pointers in
### Return Value
-A static analyzer group. Use the **`auto`** keyword to capture the return value.
+A static analyzer group. Use the `auto` keyword to capture the return value.
## Remarks
-Unlike dynamic analyzer groups, the members of a static analyzer group must be known at compile time. Additionally, a static analyzer group contains [`IAnalyzer`](../other-types/ianalyzer-class.md) pointers that don't have polymorphic behavior. When using a static analyzer group to analyze an Event Tracing for Windows (ETW) trace, calls to the `IAnalyzer` interface always resolve to the object directly pointed to by the analyzer group member. This loss of flexibility comes with a possibility of faster event processing times. If the members of an analyzer group can't be known at compile time, or if you require polymorphic behavior on your `IAnalyzer` pointers, consider using a dynamic analyzer group. To use a dynamic analyzer group, call [`MakeDynamicAnalyzerGroup`](make-static-analyzer-group.md) instead.
+Unlike dynamic analyzer groups, the members of a static analyzer group must be known at compile time. Also, a static analyzer group contains [`IAnalyzer`](../other-types/ianalyzer-class.md) pointers that don't have polymorphic behavior. When a static analyzer group analyzes an Event Tracing for Windows (ETW) trace, calls to the `IAnalyzer` interface always resolve to the object directly pointed to by the analyzer group member. This loss of flexibility comes with a possibility of faster event processing.
+
+If the members of an analyzer group can't be known at compile time, or if you require polymorphic behavior on your `IAnalyzer` pointers, consider using a dynamic analyzer group. To use a dynamic analyzer group, call [`MakeDynamicAnalyzerGroup`](make-static-analyzer-group.md) instead.
::: moniker-end
diff --git a/docs/build-insights/reference/sdk/functions/make-static-relogger-group.md b/docs/build-insights/reference/sdk/functions/make-static-relogger-group.md
index 708d174f07..1ea522b7e8 100644
--- a/docs/build-insights/reference/sdk/functions/make-static-relogger-group.md
+++ b/docs/build-insights/reference/sdk/functions/make-static-relogger-group.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "MakeStati
---
# MakeStaticReloggerGroup
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `MakeStaticReloggerGroup` function is used to create a static relogger group that can be passed to functions such as [Relog](relog.md). Members of a relogger group receive events one by one from left to right until all events in a trace have been processed.
diff --git a/docs/build-insights/reference/sdk/functions/match-event-in-member-function.md b/docs/build-insights/reference/sdk/functions/match-event-in-member-function.md
index bf035b126d..d0817f3dc9 100644
--- a/docs/build-insights/reference/sdk/functions/match-event-in-member-function.md
+++ b/docs/build-insights/reference/sdk/functions/match-event-in-member-function.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "MatchEven
---
# MatchEventInMemberFunction
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `MatchEventInMemberFunction` function is used to match an event against the type described by the first parameter of a member function. The matched event is forwarded to the member function for further processing.
diff --git a/docs/build-insights/reference/sdk/functions/match-event-stack-in-member-function.md b/docs/build-insights/reference/sdk/functions/match-event-stack-in-member-function.md
index 519f15322c..2237139e8f 100644
--- a/docs/build-insights/reference/sdk/functions/match-event-stack-in-member-function.md
+++ b/docs/build-insights/reference/sdk/functions/match-event-stack-in-member-function.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "MatchEven
---
# MatchEventStackInMemberFunction
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `MatchEventStackInMemberFunction` function is used to match an event stack against a specific event hierarchy, described by the parameter list of a member function. Matched hierarchies are forwarded to the member function for further processing. To learn more about events, event stacks, and hierarchies, see [event table](../event-table.md).
diff --git a/docs/build-insights/reference/sdk/functions/match-event-stack.md b/docs/build-insights/reference/sdk/functions/match-event-stack.md
index 681528e2b8..55a15df0fa 100644
--- a/docs/build-insights/reference/sdk/functions/match-event-stack.md
+++ b/docs/build-insights/reference/sdk/functions/match-event-stack.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "MatchEven
---
# MatchEventStack
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `MatchEventStack` function is used to match an event stack against a specific event hierarchy. Matched hierarchies are forwarded to a handler for further processing. To learn more about events, event stacks, and hierarchies, see [event table](../event-table.md).
diff --git a/docs/build-insights/reference/sdk/functions/match-event.md b/docs/build-insights/reference/sdk/functions/match-event.md
index 284cc332f0..e392c3184d 100644
--- a/docs/build-insights/reference/sdk/functions/match-event.md
+++ b/docs/build-insights/reference/sdk/functions/match-event.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "MatchEven
---
# MatchEvent
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `MatchEvent` function is used to match an event against a list of event types. If the event matches a type in the list, it's forwarded to a handler for further processing.
diff --git a/docs/build-insights/reference/sdk/functions/relog-a.md b/docs/build-insights/reference/sdk/functions/relog-a.md
index a3b9ed1b4f..36ec0048ec 100644
--- a/docs/build-insights/reference/sdk/functions/relog-a.md
+++ b/docs/build-insights/reference/sdk/functions/relog-a.md
@@ -1,17 +1,17 @@
---
title: "RelogA"
description: "The C++ Build Insights SDK RelogA function reference."
-ms.date: "02/12/2020"
+ms.date: 02/12/2020
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "RelogA", "throughput analysis", "build time analysis", "vcperf.exe"]
---
-# RelogA
+# `RelogA`
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `RelogA` function is used to read MSVC events from an Event Tracing for Windows (ETW) trace and write them into a new, modified ETW trace.
@@ -26,17 +26,17 @@ enum RESULT_CODE RelogA(
### Parameters
-*inputLogFile*\
+*`inputLogFile`*\
The input ETW trace that you wish to read events from.
-*outputLogFile*\
+*`outputLogFile`*\
The file in which to write the new events.
-*relogDescriptor*\
-Pointer to a [RELOG_DESCRIPTOR](../other-types/relog-descriptor-struct.md) object. Use this object to configure the relogging session.
+*`relogDescriptor`*\
+Pointer to a [`RELOG_DESCRIPTOR`](../other-types/relog-descriptor-struct.md) object. Use this object to configure the relogging session.
### Return Value
-A result code from the [RESULT_CODE](../other-types/result-code-enum.md) enum.
+A result code from the [`RESULT_CODE`](../other-types/result-code-enum.md) enum.
::: moniker-end
diff --git a/docs/build-insights/reference/sdk/functions/relog-w.md b/docs/build-insights/reference/sdk/functions/relog-w.md
index afb54b5054..d042d6ce85 100644
--- a/docs/build-insights/reference/sdk/functions/relog-w.md
+++ b/docs/build-insights/reference/sdk/functions/relog-w.md
@@ -1,17 +1,17 @@
---
title: "RelogW"
description: "The C++ Build Insights SDK RelogW function reference."
-ms.date: "02/12/2020"
+ms.date: 02/12/2020
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "RelogW", "throughput analysis", "build time analysis", "vcperf.exe"]
---
-# RelogW
+# `RelogW`
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `RelogW` function is used to read MSVC events from an input Event Tracing for Windows (ETW) trace and write them into a new, modified ETW trace.
@@ -26,17 +26,17 @@ enum RESULT_CODE RelogW(
### Parameters
-*inputLogFile*\
+*`inputLogFile`*\
The input ETW trace that you wish to read events from.
-*outputLogFile*\
+*`outputLogFile`*\
The file in which to write the new events.
-*relogDescriptor*\
-Pointer to a [RELOG_DESCRIPTOR](../other-types/relog-descriptor-struct.md) object. Use this object to configure the relogging session.
+*`relogDescriptor`*\
+Pointer to a [`RELOG_DESCRIPTOR`](../other-types/relog-descriptor-struct.md) object. Use this object to configure the relogging session.
### Return Value
-A result code from the [RESULT_CODE](../other-types/result-code-enum.md) enum.
+A result code from the [`RESULT_CODE`](../other-types/result-code-enum.md) enum.
::: moniker-end
diff --git a/docs/build-insights/reference/sdk/functions/relog.md b/docs/build-insights/reference/sdk/functions/relog.md
index 2b5f0883de..4bf0bb1dce 100644
--- a/docs/build-insights/reference/sdk/functions/relog.md
+++ b/docs/build-insights/reference/sdk/functions/relog.md
@@ -1,17 +1,17 @@
---
title: "Relog"
description: "The C++ Build Insights SDK Relog function reference."
-ms.date: "02/12/2020"
+ms.date: 02/12/2020
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Relog", "throughput analysis", "build time analysis", "vcperf.exe"]
---
-# Relog
+# `Relog`
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `Relog` function is used to read MSVC events from an Event Tracing for Windows (ETW) trace and write them into a new, modified ETW trace.
@@ -41,40 +41,44 @@ RESULT_CODE Relog(
StaticReloggerGroup reloggerGroup);
```
-### Parameters
+### Template parameters
+
+*`TAnalyzerGroupMembers`*\
+This template parameter pack is always deduced.
-*TAnalyzerGroupMembers*\
-This parameter is always deduced.
+*`TReloggerGroupMembers`*\
+This template parameter pack is always deduced.
-*TReloggerGroupMembers*\
-This parameter is always deduced.
+### Parameters
-*inputLogFile*\
+*`inputLogFile`*\
The input ETW trace that you wish to read events from.
-*outputLogFile*\
+*`outputLogFile`*\
The file in which to write the new events.
-*numberOfAnalysisPasses*\
+*`numberOfAnalysisPasses`*\
The number of analysis passes to run on the input trace. The trace gets passed through the provided analyzer group once per analysis pass.
-*systemEventsRetentionFlags*\
-A bitmask that specifies which system ETW events to keep in the relogged trace. For more information, see [RELOG_RETENTION_SYSTEM_EVENT_FLAGS](../other-types/relog-retention-system-event-flags-constants.md).
+*`systemEventsRetentionFlags`*\
+A bitmask that specifies which system ETW events to keep in the relogged trace. For more information, see [`RELOG_RETENTION_SYSTEM_EVENT_FLAGS`](../other-types/relog-retention-system-event-flags-constants.md).
-*analyzerGroup*\
-The analyzer group used for the analysis phase of the relogging session. Call [MakeStaticAnalyzerGroup](make-static-analyzer-group.md) to create an analyzer group. To use a dynamic analyzer group obtained from [MakeDynamicAnalyzerGroup](make-dynamic-analyzer-group.md), first encapsulate it inside a static analyzer group by passing its address to `MakeStaticAnalyzerGroup`.
+*`analyzerGroup`*\
+The analyzer group used for the analysis phase of the relogging session. Call [`MakeStaticAnalyzerGroup`](make-static-analyzer-group.md) to create an analyzer group. To use a dynamic analyzer group obtained from [`MakeDynamicAnalyzerGroup`](make-dynamic-analyzer-group.md), first encapsulate it inside a static analyzer group by passing its address to `MakeStaticAnalyzerGroup`.
-*reloggerGroup*\
-The relogger group that relogs events into the trace file specified in *outputLogFile*. Call [MakeStaticReloggerGroup](make-static-relogger-group.md) to create a relogger group. To use a dynamic relogger group obtained from [MakeDynamicReloggerGroup](make-dynamic-relogger-group.md), first encapsulate it inside a static relogger group by passing its address to `MakeStaticReloggerGroup`.
+*`reloggerGroup`*\
+The relogger group that relogs events into the trace file specified in *`outputLogFile`*. Call [`MakeStaticReloggerGroup`](make-static-relogger-group.md) to create a relogger group. To use a dynamic relogger group obtained from [`MakeDynamicReloggerGroup`](make-dynamic-relogger-group.md), first encapsulate it inside a static relogger group by passing its address to `MakeStaticReloggerGroup`.
### Return Value
-A result code from the [RESULT_CODE](../other-types/result-code-enum.md) enum.
+A result code from the [`RESULT_CODE`](../other-types/result-code-enum.md) enum.
+
+### Remarks
-### Remark
+The input trace is passed through the analyzer group *`numberOfAnalysisPasses`* times. There's no similar option for relogging passes. The trace is passed trough the relogger group only once, after all analysis passes are complete.
-The input trace is passed through the analyzer group *numberOfAnalysisPasses* times. There's no similar option for relogging passes. The trace is passed trough the relogger group only once, after all analysis passes are complete.
+The relogging of system events like CPU samples from within a relogger class isn't supported. Use the *`systemEventsRetentionFlags`* parameter to decide which system events to keep in the output trace.
-The relogging of system events like CPU samples from within a relogger class isn't supported. Use the *systemEventsRetentionFlags* parameter to decide which system events to keep in the output trace.
+The `relog` function depends on the COM API. You must call [`CoInitialize`](/windows/win32/api/objbase/nf-objbase-coinitialize) before you call `relog`. Call [`CoUninitialize`](/windows/win32/api/combaseapi/nf-combaseapi-couninitialize) once `relog` has finished. If you call `relog` without a call to `CoInitialize` first, you'll get error code 9 (`RESULT_CODE_FAILURE_START_RELOGGER`).
::: moniker-end
diff --git a/docs/build-insights/reference/sdk/functions/start-tracing-session-a.md b/docs/build-insights/reference/sdk/functions/start-tracing-session-a.md
index cb781563dc..117dcf7e3b 100644
--- a/docs/build-insights/reference/sdk/functions/start-tracing-session-a.md
+++ b/docs/build-insights/reference/sdk/functions/start-tracing-session-a.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "StartTrac
---
# StartTracingSessionA
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `StartTracingSessionA` function starts a tracing session. Executables calling this function must have administrator privileges.
diff --git a/docs/build-insights/reference/sdk/functions/start-tracing-session-w.md b/docs/build-insights/reference/sdk/functions/start-tracing-session-w.md
index 5af29356fe..cac3ec1202 100644
--- a/docs/build-insights/reference/sdk/functions/start-tracing-session-w.md
+++ b/docs/build-insights/reference/sdk/functions/start-tracing-session-w.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "StartTrac
---
# StartTracingSessionW
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `StartTracingSessionW` function starts a tracing session. Executables calling this function must have administrator privileges.
diff --git a/docs/build-insights/reference/sdk/functions/start-tracing-session.md b/docs/build-insights/reference/sdk/functions/start-tracing-session.md
index cf0a0e627a..78270e8aa0 100644
--- a/docs/build-insights/reference/sdk/functions/start-tracing-session.md
+++ b/docs/build-insights/reference/sdk/functions/start-tracing-session.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "StartTrac
---
# StartTracingSession
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `StartTracingSession` function starts a tracing session. Executables calling this function must have administrator privileges.
diff --git a/docs/build-insights/reference/sdk/functions/stop-and-analyze-tracing-session-a.md b/docs/build-insights/reference/sdk/functions/stop-and-analyze-tracing-session-a.md
index e1b5d7df4e..34d8cff662 100644
--- a/docs/build-insights/reference/sdk/functions/stop-and-analyze-tracing-session-a.md
+++ b/docs/build-insights/reference/sdk/functions/stop-and-analyze-tracing-session-a.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "StopAndAn
---
# StopAndAnalyzeTracingSessionA
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `StopAndAnalyzeTracingSessionA` function stops an ongoing tracing session and saves the resulting trace in a temporary file. An analysis session is then immediately started using the temporary file as an input. Executables calling this function must have administrator privileges.
diff --git a/docs/build-insights/reference/sdk/functions/stop-and-analyze-tracing-session-w.md b/docs/build-insights/reference/sdk/functions/stop-and-analyze-tracing-session-w.md
index 3ec51b605d..3018e6ca94 100644
--- a/docs/build-insights/reference/sdk/functions/stop-and-analyze-tracing-session-w.md
+++ b/docs/build-insights/reference/sdk/functions/stop-and-analyze-tracing-session-w.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "StopAndAn
---
# StopAndAnalyzeTracingSessionW
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `StopAndAnalyzeTracingSessionW` function stops an ongoing tracing session and saves the resulting trace in a temporary file. An analysis session is then immediately started using the temporary file as an input. Executables calling this function must have administrator privileges.
diff --git a/docs/build-insights/reference/sdk/functions/stop-and-analyze-tracing-session.md b/docs/build-insights/reference/sdk/functions/stop-and-analyze-tracing-session.md
index ea1a0f2a4a..fafece4a2d 100644
--- a/docs/build-insights/reference/sdk/functions/stop-and-analyze-tracing-session.md
+++ b/docs/build-insights/reference/sdk/functions/stop-and-analyze-tracing-session.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "StopAndAn
---
# StopAndAnalyzeTracingSession
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `StopAndAnalyzeTracingSession` function stops an ongoing tracing session and saves the resulting trace in a temporary file. An analysis session is then immediately started using the temporary file as an input. Executables calling this function must have administrator privileges.
diff --git a/docs/build-insights/reference/sdk/functions/stop-and-relog-tracing-session-a.md b/docs/build-insights/reference/sdk/functions/stop-and-relog-tracing-session-a.md
index 819dbaaf5b..408010651c 100644
--- a/docs/build-insights/reference/sdk/functions/stop-and-relog-tracing-session-a.md
+++ b/docs/build-insights/reference/sdk/functions/stop-and-relog-tracing-session-a.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "StopAndRe
---
# StopAndRelogTracingSessionA
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `StopAndRelogTracingSessionA` function stops an ongoing tracing session and saves the resulting trace in a temporary file. A relogging session is then immediately started using the temporary file as an input. The final relogged trace produced by the relogging session is saved in a file specified by the caller. Executables calling this function must have administrator privileges.
diff --git a/docs/build-insights/reference/sdk/functions/stop-and-relog-tracing-session-w.md b/docs/build-insights/reference/sdk/functions/stop-and-relog-tracing-session-w.md
index 5159ed8685..307e96dc1b 100644
--- a/docs/build-insights/reference/sdk/functions/stop-and-relog-tracing-session-w.md
+++ b/docs/build-insights/reference/sdk/functions/stop-and-relog-tracing-session-w.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "StopAndRe
---
# StopAndRelogTracingSessionW
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `StopAndRelogTracingSessionW` function stops an ongoing tracing session and saves the resulting trace in a temporary file. A relogging session is then immediately started using the temporary file as an input. The final relogged trace produced by the relogging session is saved in a file specified by the caller. Executables calling this function must have administrator privileges.
diff --git a/docs/build-insights/reference/sdk/functions/stop-and-relog-tracing-session.md b/docs/build-insights/reference/sdk/functions/stop-and-relog-tracing-session.md
index fac4cef9c0..b89dc7f62f 100644
--- a/docs/build-insights/reference/sdk/functions/stop-and-relog-tracing-session.md
+++ b/docs/build-insights/reference/sdk/functions/stop-and-relog-tracing-session.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "StopAndRe
---
# StopAndRelogTracingSession
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `StopAndRelogTracingSession` function stops an ongoing tracing session and saves the resulting trace in a temporary file. A relogging session is then immediately started using the temporary file as an input. The final relogged trace produced by the relogging session is saved in a file specified by the caller. Executables calling this function must have administrator privileges.
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 181fa7d358..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
@@ -6,14 +6,14 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "StopTraci
---
# StopTracingSessionA
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: 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 75cbb4407f..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
@@ -6,14 +6,14 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "StopTraci
---
# StopTracingSessionW
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: 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 0fa48098c5..9e52425ed8 100644
--- a/docs/build-insights/reference/sdk/functions/stop-tracing-session.md
+++ b/docs/build-insights/reference/sdk/functions/stop-tracing-session.md
@@ -1,19 +1,23 @@
---
-title: "StopTracingSession"
-description: "The C++ Build Insights SDK StopTracingSession function reference."
-ms.date: "02/12/2020"
+title: "C++ Build Insights SDK StopTracingSession"
+description: "The C++ Build Insights SDK StopTracingSession function reference. StopTracingSession stops an ongoing tracing session and produces a raw trace file."
+ms.date: "04/27/2022"
+ms.topic: language-reference
+ms.custom: kr2b-contr-experiment
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "StopTracingSession", "throughput analysis", "build time analysis", "vcperf.exe"]
---
# StopTracingSession
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
-The `StopTracingSession` 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 a relogging session. Executables calling `StopTracingSession` must have administrator privileges.
+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`.
## Syntax
@@ -24,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);
```
@@ -32,10 +36,10 @@ inline RESULT_CODE StopTracingSession(
### Parameters
*sessionName*\
-The name of the tracing session to stop. Use the same session name as the one passed to [StartTracingSession](start-tracing-session.md), [StartTracingSessionA](start-tracing-session-a.md), or [StartTracingSessionW](start-tracing-session-w.md).
+The name of the tracing session to stop. Use the same session name as used for [StartTracingSession](start-tracing-session.md), [StartTracingSessionA](start-tracing-session-a.md), or [StartTracingSessionW](start-tracing-session-w.md).
*outputLogFile*\
-Path to the final output log file where the raw trace should be saved.
+Full path of the final output log file to save the raw trace.
*statistics*\
Pointer to a [TRACING_SESSION_STATISTICS](../other-types/tracing-session-statistics-struct.md) object. `StopTracingSession` writes trace collection statistics in this object before returning.
diff --git a/docs/build-insights/reference/sdk/other-types/analysis-callbacks-struct.md b/docs/build-insights/reference/sdk/other-types/analysis-callbacks-struct.md
index 580787ba55..348969f6fd 100644
--- a/docs/build-insights/reference/sdk/other-types/analysis-callbacks-struct.md
+++ b/docs/build-insights/reference/sdk/other-types/analysis-callbacks-struct.md
@@ -3,15 +3,16 @@ title: "ANALYSIS_CALLBACKS structure"
description: "The C++ Build Insights SDK ANALYSIS_CALLBACKS structure reference."
ms.date: "02/12/2020"
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "ANALYSIS_CALLBACKS", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: reference
---
# ANALYSIS_CALLBACKS structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `ANALYSIS_CALLBACKS` structure is used when initializing an [ANALYSIS_DESCRIPTOR](analysis-descriptor-struct.md) or [RELOG_DESCRIPTOR](relog-descriptor-struct.md) object. It specifies which functions to call during the analysis or relogging of an Event Tracing for Windows (ETW) trace.
@@ -33,7 +34,7 @@ typedef struct ANALYSIS_CALLBACKS_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `OnStartActivity` | Called to process an activity start event. |
| `OnStopActivity` | Called to process an activity stop event. |
diff --git a/docs/build-insights/reference/sdk/other-types/analysis-control-enum-class.md b/docs/build-insights/reference/sdk/other-types/analysis-control-enum-class.md
index ab76cc0912..b3426f035e 100644
--- a/docs/build-insights/reference/sdk/other-types/analysis-control-enum-class.md
+++ b/docs/build-insights/reference/sdk/other-types/analysis-control-enum-class.md
@@ -6,18 +6,18 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "AnalysisC
---
# AnalysisControl enum class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `AnalysisControl` enum class is used control the flow of an analysis or relogging session. Return an `AnalysisControl` code from an [IAnalyzer](ianalyzer-class.md) or [IRelogger](irelogger-class.md) member function to control what should happen next.
## Members
-| | |
+| Name | Description |
|--|--|
| `BLOCK` | Prevents the current event from propagating further in the analyzer or relogger group. |
| `CANCEL` | Cancel the current analysis or relogging session. |
diff --git a/docs/build-insights/reference/sdk/other-types/analysis-descriptor-struct.md b/docs/build-insights/reference/sdk/other-types/analysis-descriptor-struct.md
index d19ec5e7ea..d18e384ca2 100644
--- a/docs/build-insights/reference/sdk/other-types/analysis-descriptor-struct.md
+++ b/docs/build-insights/reference/sdk/other-types/analysis-descriptor-struct.md
@@ -3,15 +3,16 @@ title: "ANALYSIS_DESCRIPTOR structure"
description: "The C++ Build Insights SDK ANALYSIS_DESCRIPTOR structure reference."
ms.date: "02/12/2020"
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "ANALYSIS_DESCRIPTOR", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: reference
---
# ANALYSIS_DESCRIPTOR structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `ANALYSIS_DESCRIPTOR` structure is used with the [AnalyzeA](../functions/analyze-a.md) and [AnalyzeW](../functions/analyze-w.md) functions. It describes how an Event Tracing for Windows (ETW) trace should be analyzed.
@@ -28,7 +29,7 @@ typedef struct ANALYSIS_DESCRIPTOR_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `NumberOfPasses` | The number of analysis passes that should be done over the ETW trace. |
| `Callbacks` | An [ANALYSIS_CALLBACKS](analysis-callbacks-struct.md) object that specifies which functions to call during the analysis session. |
diff --git a/docs/build-insights/reference/sdk/other-types/callback-code-enum.md b/docs/build-insights/reference/sdk/other-types/callback-code-enum.md
index e90da86ef6..85cbc687ae 100644
--- a/docs/build-insights/reference/sdk/other-types/callback-code-enum.md
+++ b/docs/build-insights/reference/sdk/other-types/callback-code-enum.md
@@ -3,15 +3,16 @@ title: "CALLBACK_CODE enum"
description: "The C++ Build Insights SDK CALLBACK_CODE enum reference."
ms.date: "02/12/2020"
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "CALLBACK_CODE", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: reference
---
# CALLBACK_CODE enum
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `CALLBACK_CODE` enum is used control the flow of an analysis or relogging session. Return a CALLBACK_CODE value from the functions in [ANALYSIS_CALLBACKS](analysis-callbacks-struct.md) or [RELOG_CALLBACKS](relog-callbacks-struct.md) to control what should happen next.
diff --git a/docs/build-insights/reference/sdk/other-types/ianalyzer-class.md b/docs/build-insights/reference/sdk/other-types/ianalyzer-class.md
index 5cd7188323..b08d6a4ab3 100644
--- a/docs/build-insights/reference/sdk/other-types/ianalyzer-class.md
+++ b/docs/build-insights/reference/sdk/other-types/ianalyzer-class.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "IAnalyzer
---
# IAnalyzer class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `IAnalyzer` class provides an interface for analyzing an Event Tracing for Windows (ETW) trace. It's used with the [MakeDynamicAnalyzerGroup](../functions/make-dynamic-analyzer-group.md), [MakeDynamicReloggerGroup](../functions/make-dynamic-relogger-group.md), [MakeStaticAnalyzerGroup](../functions/make-dynamic-analyzer-group.md), and [MakeStaticReloggerGroup](../functions/make-static-analyzer-group.md) functions. Use `IAnalyzer` as a base class to create your own analyzer that can be part of an analyzer or relogger group.
diff --git a/docs/build-insights/reference/sdk/other-types/irelogger-class.md b/docs/build-insights/reference/sdk/other-types/irelogger-class.md
index e0c5ef81ac..8fedb9fc5b 100644
--- a/docs/build-insights/reference/sdk/other-types/irelogger-class.md
+++ b/docs/build-insights/reference/sdk/other-types/irelogger-class.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "IRelogger
---
# IRelogger class
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `IRelogger` class provides an interface for relogging an Event Tracing for Windows (ETW) trace. It's used with the [MakeDynamicReloggerGroup](../functions/make-dynamic-relogger-group.md) and [MakeStaticReloggerGroup](../functions/make-static-analyzer-group.md) functions. Use `IRelogger` as a base class to create your own relogger that can be part of a relogger group.
diff --git a/docs/build-insights/reference/sdk/other-types/on-analysis-event-func-typedef.md b/docs/build-insights/reference/sdk/other-types/on-analysis-event-func-typedef.md
index c3708135ec..d063b48e89 100644
--- a/docs/build-insights/reference/sdk/other-types/on-analysis-event-func-typedef.md
+++ b/docs/build-insights/reference/sdk/other-types/on-analysis-event-func-typedef.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "OnAnalysi
---
# OnAnalysisEventFunc typedef
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `OnAnalysisEventFunc` typedef is one of the function signatures used in the [ANALYSIS_CALLBACKS](analysis-callbacks-struct.md) structure.
diff --git a/docs/build-insights/reference/sdk/other-types/on-begin-end-pass-func-typedef.md b/docs/build-insights/reference/sdk/other-types/on-begin-end-pass-func-typedef.md
index 404c6b463c..505cc21c6e 100644
--- a/docs/build-insights/reference/sdk/other-types/on-begin-end-pass-func-typedef.md
+++ b/docs/build-insights/reference/sdk/other-types/on-begin-end-pass-func-typedef.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "OnBeginEn
---
# OnBeginEndPassFunc typedef
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `OnBeginEndPassFunc` typedef is one of the function signatures used in the [ANALYSIS_CALLBACKS](analysis-callbacks-struct.md) and [RELOG_CALLBACKS](relog-callbacks-struct.md) structures.
@@ -24,7 +24,7 @@ typedef enum CALLBACK_CODE (BUILD_INSIGHTS_API *OnBeginEndPassFunc)(
## Members
-| | |
+| Name | Description |
|--|--|
| `callbackContext` | |
diff --git a/docs/build-insights/reference/sdk/other-types/on-relog-event-func-typedef.md b/docs/build-insights/reference/sdk/other-types/on-relog-event-func-typedef.md
index 8a92188365..af1d88f1ff 100644
--- a/docs/build-insights/reference/sdk/other-types/on-relog-event-func-typedef.md
+++ b/docs/build-insights/reference/sdk/other-types/on-relog-event-func-typedef.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "OnRelogEv
---
# OnRelogEventFunc typedef
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `OnRelogEventFunc` typedef is one of the function signatures used in the [RELOG_CALLBACKS](relog-callbacks-struct.md) structure.
diff --git a/docs/build-insights/reference/sdk/other-types/on-trace-info-func-typedef.md b/docs/build-insights/reference/sdk/other-types/on-trace-info-func-typedef.md
index cdf30ba897..9d90ce108a 100644
--- a/docs/build-insights/reference/sdk/other-types/on-trace-info-func-typedef.md
+++ b/docs/build-insights/reference/sdk/other-types/on-trace-info-func-typedef.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "OnTraceIn
---
# OnTraceInfoFunc typedef
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `OnTraceInfoFunc` typedef is one of the function signatures used in the [ANALYSIS_CALLBACKS](analysis-callbacks-struct.md) and [RELOG_CALLBACKS](relog-callbacks-struct.md) structures.
diff --git a/docs/build-insights/reference/sdk/other-types/relog-callbacks-struct.md b/docs/build-insights/reference/sdk/other-types/relog-callbacks-struct.md
index 0c7af68bde..d3173d03ac 100644
--- a/docs/build-insights/reference/sdk/other-types/relog-callbacks-struct.md
+++ b/docs/build-insights/reference/sdk/other-types/relog-callbacks-struct.md
@@ -3,15 +3,16 @@ title: "RELOG_CALLBACKS structure"
description: "The C++ Build Insights SDK RELOG_CALLBACKS structure reference."
ms.date: "02/12/2020"
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "RELOG_CALLBACKS", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: reference
---
# RELOG_CALLBACKS structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `RELOG_CALLBACKS` structure is used when initializing a [RELOG_DESCRIPTOR](relog-descriptor-struct.md) object. It specifies which functions to call during the relogging of an Event Tracing for Windows (ETW) trace.
@@ -33,7 +34,7 @@ typedef struct RELOG_CALLBACKS_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `OnStartActivity` | Called to process an activity start event. |
| `OnStopActivity` | Called to process an activity stop event. |
diff --git a/docs/build-insights/reference/sdk/other-types/relog-descriptor-struct.md b/docs/build-insights/reference/sdk/other-types/relog-descriptor-struct.md
index f86ffb6544..36fa65c767 100644
--- a/docs/build-insights/reference/sdk/other-types/relog-descriptor-struct.md
+++ b/docs/build-insights/reference/sdk/other-types/relog-descriptor-struct.md
@@ -3,15 +3,16 @@ title: "RELOG_DESCRIPTOR structure"
description: "The C++ Build Insights SDK RELOG_DESCRIPTOR structure reference."
ms.date: "02/12/2020"
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "RELOG_DESCRIPTOR", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: reference
---
# RELOG_DESCRIPTOR structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `RELOG_DESCRIPTOR` structure is used with the [RelogA](../functions/relog-a.md) and [RelogW](../functions/relog-w.md) functions. It describes how an Event Tracing for Windows (ETW) trace should be relogged.
@@ -31,7 +32,7 @@ typedef struct RELOG_DESCRIPTOR_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `NumberOfAnalysisPasses` | The number of analysis passes that should be done over the ETW trace during the relogging session's analysis phase. |
| `AnalysisCallbacks` | An [ANALYSIS_CALLBACKS](analysis-callbacks-struct.md) object that specifies which functions to call during the relogging session's analysis phase. |
diff --git a/docs/build-insights/reference/sdk/other-types/relog-retention-system-event-flags-constants.md b/docs/build-insights/reference/sdk/other-types/relog-retention-system-event-flags-constants.md
index d82fbe7c8c..c82f194f46 100644
--- a/docs/build-insights/reference/sdk/other-types/relog-retention-system-event-flags-constants.md
+++ b/docs/build-insights/reference/sdk/other-types/relog-retention-system-event-flags-constants.md
@@ -3,15 +3,16 @@ title: "RELOG_RETENTION_SYSTEM_EVENT_FLAGS constants"
description: "The C++ Build Insights SDK RELOG_RETENTION_SYSTEM_EVENT_FLAGS constants reference."
ms.date: "02/12/2020"
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "RELOG_RETENTION_SYSTEM_EVENT_FLAGS", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: reference
---
# RELOG_RETENTION_SYSTEM_EVENT_FLAGS constants
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `RELOG_RETENTION_SYSTEM_EVENT_FLAGS` constants are used to describe which system events to keep in a relogged trace. Use them to initialize the [RELOG_DESCRIPTOR](relog-descriptor-struct.md) structure's `SystemEventsRetentionFlags` field.
@@ -27,7 +28,7 @@ static const unsigned long long
## Members
-| | |
+| Name | Description |
|--|--|
| `RELOG_RETENTION_SYSTEM_EVENT_FLAGS_CPU_SAMPLES` | Keep CPU sample system events in a relogged trace. |
| `RELOG_RETENTION_SYSTEM_EVENT_FLAGS_ALL` | Keep all system events in a relogged trace. |
diff --git a/docs/build-insights/reference/sdk/other-types/result-code-enum.md b/docs/build-insights/reference/sdk/other-types/result-code-enum.md
index 2d3669397e..d6ac44cca2 100644
--- a/docs/build-insights/reference/sdk/other-types/result-code-enum.md
+++ b/docs/build-insights/reference/sdk/other-types/result-code-enum.md
@@ -3,15 +3,16 @@ title: "RESULT_CODE enum"
description: "The C++ Build Insights SDK RESULT_CODE enum reference."
ms.date: "02/12/2020"
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "RESULT_CODE", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: reference
---
# RESULT_CODE enum
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `RESULT_CODE` enum describes success and failure conditions.
diff --git a/docs/build-insights/reference/sdk/other-types/tracing-session-msvc-event-flags-constants.md b/docs/build-insights/reference/sdk/other-types/tracing-session-msvc-event-flags-constants.md
index 4a3902fb57..5bc47f3b43 100644
--- a/docs/build-insights/reference/sdk/other-types/tracing-session-msvc-event-flags-constants.md
+++ b/docs/build-insights/reference/sdk/other-types/tracing-session-msvc-event-flags-constants.md
@@ -3,15 +3,16 @@ title: "TRACING_SESSION_MSVC_EVENT_FLAGS constants"
description: "The C++ Build Insights SDK TRACING_SESSION_MSVC_EVENT_FLAGS constants reference."
ms.date: "02/12/2020"
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "TRACING_SESSION_MSVC_EVENT_FLAGS", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: reference
---
# TRACING_SESSION_MSVC_EVENT_FLAGS constants
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `TRACING_SESSION_MSVC_EVENT_FLAGS` constants are used to describe which MSVC events to collect during a trace. Use them to initialize the [TRACING_SESSION_OPTIONS](tracing-session-options-struct.md) structure's `MsvcEventFlags` field.
diff --git a/docs/build-insights/reference/sdk/other-types/tracing-session-options-struct.md b/docs/build-insights/reference/sdk/other-types/tracing-session-options-struct.md
index db299cb318..f087e51bf3 100644
--- a/docs/build-insights/reference/sdk/other-types/tracing-session-options-struct.md
+++ b/docs/build-insights/reference/sdk/other-types/tracing-session-options-struct.md
@@ -1,17 +1,18 @@
---
title: "TRACING_SESSION_OPTIONS structure"
-description: "The C++ Build Insights SDK TRACING_SESSION_OPTIONS structure reference."
+description: "Learn about the C++ Build Insights SDK TRACING_SESSION_OPTIONS structure reference."
ms.date: "02/12/2020"
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "TRACING_SESSION_OPTIONS", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: reference
---
# TRACING_SESSION_OPTIONS structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `TRACING_SESSION_OPTIONS` structure is used when initializing an [ANALYSIS_DESCRIPTOR](analysis-descriptor-struct.md) or [RELOG_DESCRIPTOR](relog-descriptor-struct.md) structure. It describes which events to capture during the collection of a trace.
@@ -28,7 +29,7 @@ typedef struct TRACING_SESSION_OPTIONS_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `SystemEventFlags` | A bitmask describing the system events to capture. For more information, see [TRACING_SESSION_SYSTEM_EVENT_FLAGS](tracing-session-system-event-flags-constants.md). |
| `MsvcEventFlags` | A bitmask describing the MSVC events to capture. For more information, see [TRACING_SESSION_MSVC_EVENT_FLAGS](tracing-session-msvc-event-flags-constants.md). |
diff --git a/docs/build-insights/reference/sdk/other-types/tracing-session-statistics-struct.md b/docs/build-insights/reference/sdk/other-types/tracing-session-statistics-struct.md
index 03e1ca20cb..80b32daa9d 100644
--- a/docs/build-insights/reference/sdk/other-types/tracing-session-statistics-struct.md
+++ b/docs/build-insights/reference/sdk/other-types/tracing-session-statistics-struct.md
@@ -1,17 +1,18 @@
---
title: "TRACING_SESSION_STATISTICS structure"
-description: "The C++ Build Insights SDK TRACING_SESSION_OPTIONS structure reference."
+description: "Learn about the C++ Build Insights SDK TRACING_SESSION_STATISTICS structure reference."
ms.date: "02/12/2020"
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "TRACING_SESSION_STATISTICS", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: reference
---
# TRACING_SESSION_STATISTICS structure
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `TRACING_SESSION_STATISTICS` structure describes statistics on a trace that was collected. Its fields are set when stopping a tracing session.
@@ -30,7 +31,7 @@ typedef struct TRACING_SESSION_STATISTICS_TAG
## Members
-| | |
+| Name | Description |
|--|--|
| `MSVCEventsLost` | The number of MSVC events that were dropped. |
| `MSVCBuffersLost` | The number of MSVC event buffers that were dropped. |
diff --git a/docs/build-insights/reference/sdk/other-types/tracing-session-system-event-flags-constants.md b/docs/build-insights/reference/sdk/other-types/tracing-session-system-event-flags-constants.md
index a8f2f78265..129d27038f 100644
--- a/docs/build-insights/reference/sdk/other-types/tracing-session-system-event-flags-constants.md
+++ b/docs/build-insights/reference/sdk/other-types/tracing-session-system-event-flags-constants.md
@@ -3,15 +3,16 @@ title: "TRACING_SESSION_SYSTEM_EVENT_FLAGS constants"
description: "The C++ Build Insights SDK TRACING_SESSION_SYSTEM_EVENT_FLAGS constants reference."
ms.date: "02/12/2020"
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "TRACING_SESSION_SYSTEM_EVENT_FLAGS", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: reference
---
# TRACING_SESSION_SYSTEM_EVENT_FLAGS constants
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The `TRACING_SESSION_SYSTEM_EVENT_FLAGS` constants are used to describe which system events to collect during a trace. Use them to initialize the [TRACING_SESSION_OPTIONS](tracing-session-options-struct.md) structure's `SystemEventFlags` field.
diff --git a/docs/build-insights/reference/sdk/overview.md b/docs/build-insights/reference/sdk/overview.md
index bb9f1f7f00..483b547d4f 100644
--- a/docs/build-insights/reference/sdk/overview.md
+++ b/docs/build-insights/reference/sdk/overview.md
@@ -6,12 +6,12 @@ helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Analyzing
---
# C++ Build Insights SDK
-::: moniker range="<=vs-2015"
+::: moniker range="<=msvc-140"
-The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. 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.
+The C++ Build Insights SDK is compatible with 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
The C++ Build Insights SDK is a collection of APIs that allow you to create personalized tools on top of the C++ Build Insights platform. This page provides a high-level overview to help you get started.
@@ -135,7 +135,7 @@ int main()
| Functionality | C++ API | C API | Notes |
|--|--|--|--|
| Matching and filtering events | [MatchEventStackInMemberFunction](functions/match-event-stack-in-member-function.md)
[MatchEventStack](functions/match-event-stack.md)
[MatchEventInMemberFunction](functions/match-event-in-member-function.md)
[MatchEvent](functions/match-event.md) | | The C++ API offers functions that make it easy to extract the events you care about from your traces. With the C API, this filtering must be done by hand. |
-| Event data types | [Activity](cpp-event-data-types/activity.md)
[BackEndPass](cpp-event-data-types/back-end-pass.md)
[BottomUp](cpp-event-data-types/bottom-up.md)
[C1DLL](cpp-event-data-types/c1-dll.md)
[C2DLL](cpp-event-data-types/c2-dll.md)
[CodeGeneration](cpp-event-data-types/code-generation.md)
[CommandLine](cpp-event-data-types/command-line.md)
[Compiler](cpp-event-data-types/compiler.md)
[CompilerPass](cpp-event-data-types/compiler-pass.md)
[EnvironmentVariable](cpp-event-data-types/environment-variable.md)
[Event](cpp-event-data-types/event.md)
[EventGroup](cpp-event-data-types/event-group.md)
[EventStack](cpp-event-data-types/event-stack.md)
[ExecutableImageOutput](cpp-event-data-types/executable-image-output.md)
[ExpOutput](cpp-event-data-types/exp-output.md)
[FileInput](cpp-event-data-types/file-input.md)
[FileOutput](cpp-event-data-types/file-output.md)
[ForceInlinee](cpp-event-data-types/force-inlinee.md)
[FrontEndFile](cpp-event-data-types/front-end-file.md)
[FrontEndFileGroup](cpp-event-data-types/front-end-file-group.md)
[FrontEndPass](cpp-event-data-types/front-end-pass.md)
[Function](cpp-event-data-types/function.md)
[ImpLibOutput](cpp-event-data-types/imp-lib-output.md)
[Invocation](cpp-event-data-types/invocation.md)
[InvocationGroup](cpp-event-data-types/invocation-group.md)
[LibOutput](cpp-event-data-types/lib-output.md)
[Linker](cpp-event-data-types/linker.md)
[LinkerGroup](cpp-event-data-types/linker-group.md)
[LinkerPass](cpp-event-data-types/linker-pass.md)
[LTCG](cpp-event-data-types/ltcg.md)
[ObjOutput](cpp-event-data-types/obj-output.md)
[OptICF](cpp-event-data-types/opt-icf.md)
[OptLBR](cpp-event-data-types/opt-lbr.md)
[OptRef](cpp-event-data-types/opt-ref.md)
[Pass1](cpp-event-data-types/pass1.md)
[Pass2](cpp-event-data-types/pass2.md)
[PreLTCGOptRef](cpp-event-data-types/pre-ltcg-opt-ref.md)
[SimpleEvent](cpp-event-data-types/simple-event.md)
[SymbolName](cpp-event-data-types/symbol-name.md)
[TemplateInstantiation](cpp-event-data-types/template-instantiation.md)
[TemplateInstantiationGroup](cpp-event-data-types/template-instantiation-group.md)
[Thread](cpp-event-data-types/thread.md)
[TopDown](cpp-event-data-types/top-down.md)
[TraceInfo](cpp-event-data-types/trace-info.md)
[WholeProgramAnalysis](cpp-event-data-types/whole-program-analysis.md) | [CL_PASS_DATA](c-event-data-types/cl-pass-data-struct.md)
[EVENT_COLLECTION_DATA](c-event-data-types/event-collection-data-struct.md)
[EVENT_DATA](c-event-data-types/event-data-struct.md)
[EVENT_ID](c-event-data-types/event-id-enum.md)
[FILE_DATA](c-event-data-types/file-data-struct.md)
[FILE_TYPE_CODE](c-event-data-types/file-type-code-enum.md)
[FRONT_END_FILE_DATA](c-event-data-types/front-end-file-data-struct.md)
[FUNCTION_DATA](c-event-data-types/function-data-struct.md)
[FUNCTION_FORCE_INLINEE_DATA](c-event-data-types/function-force-inlinee-data-struct.md)
[INVOCATION_DATA](c-event-data-types/invocation-data-struct.md)
[INVOCATION_VERSION_DATA](c-event-data-types/invocation-version-data-struct.md)
[MSVC_TOOL_CODE](c-event-data-types/msvc-tool-code-enum.md)
[NAME_VALUE_PAIR_DATA](c-event-data-types/name-value-pair-data-struct.md)
[SYMBOL_NAME_DATA](c-event-data-types/symbol-name-data-struct.md)
[TEMPLATE_INSTANTIATION_DATA](c-event-data-types/template-instantiation-data-struct.md)
[TEMPLATE_INSTANTIATION_KIND_CODE](c-event-data-types/template-instantiation-kind-code-enum.md)
[TRACE_INFO_DATA](c-event-data-types/trace-info-data-struct.md)
[TRANSLATION_UNIT_PASS_CODE](c-event-data-types/translation-unit-pass-code-enum.md) | |
+| Event data types | [Activity](cpp-event-data-types/activity.md)
[BackEndPass](cpp-event-data-types/back-end-pass.md)
[BottomUp](cpp-event-data-types/bottom-up.md)
[C1DLL](cpp-event-data-types/c1-dll.md)
[C2DLL](cpp-event-data-types/c2-dll.md)
[CodeGeneration](cpp-event-data-types/code-generation.md)
[CommandLine](cpp-event-data-types/command-line.md)
[Compiler](cpp-event-data-types/compiler.md)
[CompilerPass](cpp-event-data-types/compiler-pass.md)
[EnvironmentVariable](cpp-event-data-types/environment-variable.md)
[Event](cpp-event-data-types/event.md)
[EventGroup](cpp-event-data-types/event-group.md)
[EventStack](cpp-event-data-types/event-stack.md)
[ExecutableImageOutput](cpp-event-data-types/executable-image-output.md)
[ExpOutput](cpp-event-data-types/exp-output.md)
[FileInput](cpp-event-data-types/file-input.md)
[FileOutput](cpp-event-data-types/file-output.md)
[ForceInlinee](cpp-event-data-types/force-inlinee.md)
[FrontEndFile](cpp-event-data-types/front-end-file.md)
[FrontEndFileGroup](cpp-event-data-types/front-end-file-group.md)
[FrontEndPass](cpp-event-data-types/front-end-pass.md)
[Function](cpp-event-data-types/function.md)
[HeaderUnit](cpp-event-data-types/header-unit.md)
[ImpLibOutput](cpp-event-data-types/imp-lib-output.md)
[Invocation](cpp-event-data-types/invocation.md)
[InvocationGroup](cpp-event-data-types/invocation-group.md)
[LibOutput](cpp-event-data-types/lib-output.md)
[Linker](cpp-event-data-types/linker.md)
[LinkerGroup](cpp-event-data-types/linker-group.md)
[LinkerPass](cpp-event-data-types/linker-pass.md)
[LTCG](cpp-event-data-types/ltcg.md)
[Module](cpp-event-data-types/module.md)
[ObjOutput](cpp-event-data-types/obj-output.md)
[OptICF](cpp-event-data-types/opt-icf.md)
[OptLBR](cpp-event-data-types/opt-lbr.md)
[OptRef](cpp-event-data-types/opt-ref.md)
[Pass1](cpp-event-data-types/pass1.md)
[Pass2](cpp-event-data-types/pass2.md)
[PrecompiledHeader](cpp-event-data-types/precompiled-header.md)
[PreLTCGOptRef](cpp-event-data-types/pre-ltcg-opt-ref.md)
[SimpleEvent](cpp-event-data-types/simple-event.md)
[SymbolName](cpp-event-data-types/symbol-name.md)
[TemplateInstantiation](cpp-event-data-types/template-instantiation.md)
[TemplateInstantiationGroup](cpp-event-data-types/template-instantiation-group.md)
[Thread](cpp-event-data-types/thread.md)
[TopDown](cpp-event-data-types/top-down.md)
[TraceInfo](cpp-event-data-types/trace-info.md)
[TranslationUnitType](cpp-event-data-types/translation-unit-type.md)
[WholeProgramAnalysis](cpp-event-data-types/whole-program-analysis.md) | [CL_PASS_DATA](c-event-data-types/cl-pass-data-struct.md)
[EVENT_COLLECTION_DATA](c-event-data-types/event-collection-data-struct.md)
[EVENT_DATA](c-event-data-types/event-data-struct.md)
[EVENT_ID](c-event-data-types/event-id-enum.md)
[FILE_DATA](c-event-data-types/file-data-struct.md)
[FILE_TYPE_CODE](c-event-data-types/file-type-code-enum.md)
[FRONT_END_FILE_DATA](c-event-data-types/front-end-file-data-struct.md)
[FUNCTION_DATA](c-event-data-types/function-data-struct.md)
[FUNCTION_FORCE_INLINEE_DATA](c-event-data-types/function-force-inlinee-data-struct.md)
[INVOCATION_DATA](c-event-data-types/invocation-data-struct.md)
[INVOCATION_VERSION_DATA](c-event-data-types/invocation-version-data-struct.md)
[MSVC_TOOL_CODE](c-event-data-types/msvc-tool-code-enum.md)
[NAME_VALUE_PAIR_DATA](c-event-data-types/name-value-pair-data-struct.md)
[SYMBOL_NAME_DATA](c-event-data-types/symbol-name-data-struct.md)
[TEMPLATE_INSTANTIATION_DATA](c-event-data-types/template-instantiation-data-struct.md)
[TEMPLATE_INSTANTIATION_KIND_CODE](c-event-data-types/template-instantiation-kind-code-enum.md)
[TRACE_INFO_DATA](c-event-data-types/trace-info-data-struct.md)
[TRANSLATION_UNIT_PASS_CODE](c-event-data-types/translation-unit-pass-code-enum.md)
[TRANSLATION_UNIT_TYPE](c-event-data-types/translation-unit-type.md)
[TRANSLATION_UNIT_TYPE_DATA](c-event-data-types/translation-unit-type-data.md) | |
### Activities and simple events
@@ -186,7 +186,7 @@ Whenever the C++ Build Insights SDK gives you an event, it comes in the form of
The C++ Build Insights SDK gives you every event in a trace, but most of the time you only care about a subset of them. In some cases, you may only care about a subset of *event stacks*. The SDK provides facilities to help you quickly extract the events or event stack you need, and reject the ones you don't. It's done through these matching functions:
-| | |
+| Function | Description |
|--|--|
| [MatchEvent](functions/match-event.md) | Keep an event if it matches one of the specified types. Forward matched events to a lambda or other callable type. The event's parent hierarchy isn't considered by this function. |
| [MatchEventInMemberFunction](functions/match-event-in-member-function.md) | Keep an event if it matches the type specified in a member function's parameter. Forward matched events to the member function. The event's parent hierarchy isn't considered by this function. |
diff --git a/docs/build-insights/reference/vcperf-commands.md b/docs/build-insights/reference/vcperf-commands.md
index 8fdce294f5..ed8342bf1b 100644
--- a/docs/build-insights/reference/vcperf-commands.md
+++ b/docs/build-insights/reference/vcperf-commands.md
@@ -6,39 +6,40 @@ helpviewer_keywords: ["C++ Build Insights", "throughput analysis", "build time a
---
# Reference: vcperf commands
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
-The C++ Build Insights tools are available in Visual Studio 2019. To see the documentation for that version, set the Visual Studio **Version** selector control for this article to Visual Studio 2019. It's found at the top of the table of contents on this page.
+The C++ Build Insights tools are available starting in Visual Studio 2019 and later. To see the documentation for that version, set the Visual Studio **Version** selector control for this article to Visual Studio 2019 or later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
-This article lists and describes the commands available in *vcperf.exe*, and how to use them.
+This article lists and describes the commands available in *`vcperf.exe`*, and how to use them.
## Commands to start and stop traces
-*IMPORTANT: the following commands all require administrative privileges.*
+> [!IMPORTANT]
+> Unless you specify `/noadmin`, the following commands require administrative privileges.
| Option | Arguments and description |
|------------------|---------------------------|
-| `/start` | `[/nocpusampling]` `` |
-| | Tells *vcperf.exe* to start a trace under the given session name. There can only be one active session at a time on a given machine.
If the `/nocpusampling` option is specified, *vcperf.exe* doesn't collect CPU samples. It prevents the use of the CPU Usage (Sampled) view in Windows Performance Analyzer, but makes the collected traces smaller.
Once tracing is started, *vcperf.exe* returns immediately. Events are collected system-wide for all processes running on the machine. That means that you don't need to build your project from the same command prompt as the one you used to run *vcperf.exe*. For example, you can build your project from Visual Studio. |
-| `/stop` | `` `` |
-| | Stops the trace identified by the given session name. Runs a post-processing step on the trace to generate a file viewable in Windows Performance Analyzer (WPA). For the best viewing experience, use a version of WPA that includes the C++ Build Insights add-in. For more information, see [Get started with C++ Build Insights](/cpp/build-insights/get-started-with-cpp-build-insights). The `` parameter specifies where to save the output file. |
-| `/stopnoanalyze` | `` `` |
-| | Stops the trace identified by the given session name and writes the raw, unprocessed data in the specified output file. The resulting file isn't meant to be viewed in WPA.
The post-processing step involved in the `/stop` command can sometimes be lengthy. You can use the `/stopnoanalyze` command to delay this post-processing step. Use the `/analyze` command when you're ready to produce a file viewable in Windows Performance Analyzer. |
+| `/start` | [`/noadmin`] [`/nocpusampling`] [`/level1` \| `/level2` \| `/level3`] `` |
+| | Starts a trace under the given session name.
The `/noadmin` option runs *vcperf.exe* without admin privileges, and it ignores the `/nocpusampling` option. When you run vcperf without admin privileges, there can be more than one active session on a given machine.
The `/nocpusampling` option specifies *vcperf.exe* doesn't collect CPU samples. It prevents the use of the CPU Usage (Sampled) view in Windows Performance Analyzer, but makes the collected traces smaller.
The `/level1`, `/level2`, or `/level3` options specify which MSVC events to collect, in increasing level of information. Level 3 includes all events. Level 2 includes all events except template instantiation events. Level 1 includes all events except template instantiation, function, and file events. If unspecified, `/level2` is selected by default.
Once *vcperf.exe* starts the trace, it returns immediately. The trace collects events system-wide for all processes running on the machine. That means that you don't need to build your project in the same command prompt window as the one you use to run *vcperf.exe*. For example, you can build your project in Visual Studio. |
+| `/stop` | (1) [`/templates`] ` `
(2) [`/templates`] ` /timetrace ` |
+| | Stops the trace identified by the given session name. Runs a post-processing step on the trace to generate a file specified by the `` parameter.
The `/templates` option includes template instantiation events in the file.
(1) Generates a file viewable in Windows Performance Analyzer (WPA). The output file requires a `.etl` extension.
(2) Generates a file viewable in the Microsoft Edge trace viewer (`edge://tracing`). The output file requires a `.json` extension. |
+| `/stopnoanalyze` | ` ` |
+| | Stops the trace identified by the given session name and writes the raw, unprocessed data in the specified output file. The resulting file isn't meant for viewing in WPA.
The post-processing step involved in the `/stop` command can sometimes be lengthy. You can use the `/stopnoanalyze` command to delay this post-processing step. Use the `/analyze` command when you're ready to produce a file viewable in Windows Performance Analyzer or the Microsoft Edge trace viewer. |
## Miscellaneous commands
| Option | Arguments and description |
|------------|---------------------------|
-| `/analyze` | ` ` |
-| | Accepts a raw trace file produced by the `/stopnoanalyze` command. Runs a post-processing step on this trace to generate a file viewable in Windows Performance Analyzer. For the best viewing experience, use a version of WPA that includes the C++ Build Insights add-in. For more information, see [Get started with C++ Build Insights](/cpp/build-insights/get-started-with-cpp-build-insights). |
+| `/analyze` | (1) [`/templates`] ` `
(2) [`/templates`] ` /timetrace ` |
+| | Accepts a raw trace file produced by the `/stopnoanalyze` command. Runs a post-processing step on this trace to generate the file specified by the `` parameter.
The `/templates` option includes template instantiation events in the file.
(1) Generates a file viewable in Windows Performance Analyzer (WPA). The output file requires a `.etl` extension.
(2) Generates a file viewable in the Microsoft Edge trace viewer (`edge://tracing`). The output file requires a `.json` extension. |
## See also
-[Get started with C++ Build Insights](/cpp/build-insights/get-started-with-cpp-build-insights)\
-[Tutorial: Windows Performance Analyzer basics](/cpp/build-insights/tutorials/wpa-basics)\
+[Get started with C++ Build Insights](../get-started-with-cpp-build-insights.md)\
+[Tutorial: Windows Performance Analyzer basics](../tutorials/wpa-basics.md)\
[Reference: Windows Performance Analyzer views](wpa-views.md)\
[Windows Performance Analyzer](/windows-hardware/test/wpt/windows-performance-analyzer)
diff --git a/docs/build-insights/reference/wpa-views.md b/docs/build-insights/reference/wpa-views.md
index bc30bb4ae5..a7c5391f5c 100644
--- a/docs/build-insights/reference/wpa-views.md
+++ b/docs/build-insights/reference/wpa-views.md
@@ -6,19 +6,19 @@ helpviewer_keywords: ["C++ Build Insights", "throughput analysis", "build time a
---
# Reference: Windows Performance Analyzer views
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
-The C++ Build Insights tools are available in Visual Studio 2019. To see the documentation for this version, set the Visual Studio **Version** selector control for this article to Visual Studio 2019. It's found at the top of the table of contents on this page.
+The C++ Build Insights tools are available in Visual Studio 2019 and later. To see the documentation for this version, set the Visual Studio **Version** selector control for this article to Visual Studio 2019 or later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
This article provides details on each of the C++ Build Insights views available in Windows Performance Analyzer (WPA). Use this page to find:
- data column descriptions; and
- available presets for each view, including their intended use and preferred viewing mode.
-If you're new to WPA, we recommend that you first familiarize yourself with the [basics of WPA for C++ Build Insights](/cpp/build-insights/tutorials/wpa-basics).
+If you're new to WPA, we recommend that you first familiarize yourself with the [basics of WPA for C++ Build Insights](../tutorials/wpa-basics.md).
## Build Explorer
@@ -120,9 +120,9 @@ The Functions view is used to identify functions with an excessively long code g
## See also
-[Get started with C++ Build Insights](/cpp/build-insights/get-started-with-cpp-build-insights)\
+[Get started with C++ Build Insights](../get-started-with-cpp-build-insights.md)\
[Reference: vcperf commands](vcperf-commands.md)\
-[Tutorial: Windows Performance Analyzer basics](/cpp/build-insights/tutorials/wpa-basics)\
+[Tutorial: Windows Performance Analyzer basics](../tutorials/wpa-basics.md)\
[Windows Performance Analyzer](/windows-hardware/test/wpt/windows-performance-analyzer)
::: moniker-end
diff --git a/docs/build-insights/toc.yml b/docs/build-insights/toc.yml
index f571b06818..d5f07030b9 100644
--- a/docs/build-insights/toc.yml
+++ b/docs/build-insights/toc.yml
@@ -1,3 +1,4 @@
+items:
- name: "C++ Build Insights"
href: ../build-insights/index.yml
- name: "Get started with C++ Build Insights"
@@ -5,6 +6,14 @@
- name: "Tutorials"
expanded: true
items:
+ - name: "Troubleshoot function inlining impact on build time"
+ href: ../build-insights/tutorials/build-insights-function-view.md
+ - name: "Troubleshoot template instantiation impact on build time"
+ href: ../build-insights/tutorials/build-insights-template-view.md
+ - 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"
@@ -123,6 +132,8 @@
href: ../build-insights/reference/sdk/cpp-event-data-types/front-end-pass.md
- name: "Function"
href: ../build-insights/reference/sdk/cpp-event-data-types/function.md
+ - name: "HeaderUnit"
+ href: ../build-insights/reference/sdk/cpp-event-data-types/header-unit.md
- name: "ImpLibOutput"
href: ../build-insights/reference/sdk/cpp-event-data-types/imp-lib-output.md
- name: "Invocation"
@@ -139,6 +150,8 @@
href: ../build-insights/reference/sdk/cpp-event-data-types/linker-pass.md
- name: "LTCG"
href: ../build-insights/reference/sdk/cpp-event-data-types/ltcg.md
+ - name: "Module"
+ href: ../build-insights/reference/sdk/cpp-event-data-types/module.md
- name: "ObjOutput"
href: ../build-insights/reference/sdk/cpp-event-data-types/obj-output.md
- name: "OptICF"
@@ -151,6 +164,8 @@
href: ../build-insights/reference/sdk/cpp-event-data-types/pass1.md
- name: "Pass2"
href: ../build-insights/reference/sdk/cpp-event-data-types/pass2.md
+ - name: "PrecompiledHeader"
+ href: ../build-insights/reference/sdk/cpp-event-data-types/precompiled-header.md
- name: "PreLTCGOptRef"
href: ../build-insights/reference/sdk/cpp-event-data-types/pre-ltcg-opt-ref.md
- name: "RawEvent"
@@ -169,6 +184,8 @@
href: ../build-insights/reference/sdk/cpp-event-data-types/top-down.md
- name: "TraceInfo"
href: ../build-insights/reference/sdk/cpp-event-data-types/trace-info.md
+ - name: "TranslationUnitType"
+ href: ../build-insights/reference/sdk/cpp-event-data-types/translation-unit-type.md
- name: "WholeProgramAnalysis"
href: ../build-insights/reference/sdk/cpp-event-data-types/whole-program-analysis.md
- name: "Event data types (C)"
@@ -209,6 +226,10 @@
href: ../build-insights/reference/sdk/c-event-data-types/trace-info-data-struct.md
- name: "TRANSLATION_UNIT_PASS_CODE"
href: ../build-insights/reference/sdk/c-event-data-types/translation-unit-pass-code-enum.md
+ - name: "TRANSLATION_UNIT_TYPE"
+ href: ../build-insights/reference/sdk/c-event-data-types/translation-unit-type.md
+ - name: "TRANSLATION_UNIT_TYPE_DATA"
+ href: ../build-insights/reference/sdk/c-event-data-types/translation-unit-type-data.md
- name: "Other types"
items:
- name: "ANALYSIS_CALLBACKS"
diff --git a/docs/build-insights/tutorials/build-insights-function-view.md b/docs/build-insights/tutorials/build-insights-function-view.md
new file mode 100644
index 0000000000..bd0ccd9e31
--- /dev/null
+++ b/docs/build-insights/tutorials/build-insights-function-view.md
@@ -0,0 +1,152 @@
+---
+title: "Troubleshoot function inlining impact 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"]
+ms.topic: troubleshooting-general
+---
+# Troubleshoot function inlining impact on build time
+
+Use Build Insights **Functions** view to troubleshoot the impact of function inlining on build time in your C++ projects.
+
+## Prerequisites
+
+- Visual Studio 2022 17.8 or greater.
+- C++ Build Insights is enabled by default if you install either the Desktop development with C++ workload or the Game development with C++ workload.
+
+:::image type="complex" source="./media/installer-desktop-cpp-build-insights.png" alt-text="Screenshot of the Visual Studio Installer with the Desktop development with C++ workload selected.":::
+The list of installed components is shown. C++ Build Insights is highlighted and is selected which means it's installed.
+:::image-end:::
+
+:::image type="complex" source="./media/installer-gamedev-cpp-build-insights.png" alt-text="Screenshot of the Visual Studio Installer with the Game development with C++ workload selected.":::
+The list of installed components is shown. C++ Build Insights is highlighted and is selected which means it's installed.
+:::image-end:::
+
+## Overview
+
+Build Insights, now integrated into Visual Studio, helps you optimize your build times--especially for large projects like AAA games. Build Insights provides analytics such as **Functions** view, which helps diagnose expensive code generation during build time. It displays the time it takes to generate code for each function, and shows the impact of [`__forceinline`](../../cpp/inline-functions-cpp.md#inline-__inline-and-__forceinline).
+
+The `__forceinline` directive tells the compiler to inline a function regardless of its size or complexity. Inlining a function can improve runtime performance by reducing the overhead of calling the function. The tradeoff is that it can increase the size of the binary and impact your build times.
+
+For optimized builds, the time spent generating code contributes significantly to the total build time. In general, C++ function optimization happens quickly. In exceptional cases, some functions can become large enough and complex enough to put pressure on the optimizer and noticeably slow down your builds.
+
+In this article, learn how to use the Build Insights **Functions** view to find inlining bottlenecks in your build.
+
+## Set build options
+
+To measure the results of `__forceinline`, use a **Release** build because debug builds don't inline `__forceinline` since debug builds use the [`/Ob0`](../../build/reference/ob-inline-function-expansion.md) compiler switch, which disables that optimization. Set the build for **Release** and **x64**:
+
+1. In the **Solution Configurations** dropdown, choose **Release**.
+1. In the **Solution Platforms** dropdown, choose **x64**.
+
+:::image type="content" source="./media/build-options-release.png" alt-text="Screenshot of the Solution Configuration dropdown set to Release, and the Solution Platform dropdown set to x64.":::
+
+Set the optimization level to maximum optimizations:
+
+1. In the **Solution Explorer**, right-click the project name and select **Properties**.
+1. In the project properties, navigate to **C/C++** > **Optimization**.
+1. Set the **Optimization** dropdown to **Maximum Optimization (Favor Speed) ([`/O2`](../../build/reference/ob-inline-function-expansion.md))**.
+
+ :::image type="content" source="./media/max-optimization-setting.png" alt-text="Screenshot of the project property pages dialog. The settings are open to Configuration Properties > C/C++ > Optimization. The Optimization dropdown is set to Maximum Optimization (Favor Speed) (/O2).":::
+
+1. Click **OK** to close the dialog.
+
+## Run Build Insights
+
+On a project of your choosing, and using the **Release** 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.
+
+:::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.":::
+
+When the build finishes, an Event Trace Log (ETL) file opens. It's saved in the folder pointed to by the Windows `TEMP` environment variable. The generated name is based on the collection time.
+
+## Function view
+
+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 doesn'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.
+:::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 **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.
+
+You can sort the list by clicking on the **Time** column to see which functions are taking the most time to compile. A 'fire' icon indicates that cost of generating that function is high and is worth investigating. Excessive use of `__forceinline` functions can significantly slow compilation.
+
+You can search for a specific function by using the **Filter Functions** box. If a function's code generation time is too small, it doesn't appear in the **Functions** View.
+
+## Improve build time by adjusting function inlining
+
+In this example, the `performPhysicsCalculations` function is taking the most time to compile.
+
+:::image type="complex" source="./media/functions-view-before-fix.png" alt-text="Screenshot of the Build Insights Functions view.":::
+In the Function Name column, performPhysicsCalculations() is highlighted and marked with a fire icon.
+:::image-end:::
+
+By selecting the chevron before that function, and then sorting the **Forceinline Size** column from highest to lowest, we see the biggest contributors to the problem.
+
+:::image type="complex" source="./media/functions-view-expanded.png" alt-text="Screenshot of the Build Insights Functions view with an expanded function.":::
+performPhysicsCalculations() is expanded and shows a long list of functions that were inlined inside it. There are multiple instances of functions such as complexOperation(), recursiveHelper(), and sin() shown. The Forceinline Size column shows that complexOperation() is the largest inlined function at 315 instructions. recursiveHelper() has 119 instructions. Sin() has 75 instructions, but there are many more instances of it than the other functions.
+:::image-end:::
+
+There are some larger inlined functions, such as `Vector2D::complexOperation()` and `Vector2D::recursiveHelper()` that are contributing to the problem. But there are many more instances (not all shown here) of `Vector2d::sin(float)`, `Vector2d::cos(float)`, `Vector2D::power(float,int)`, and `Vector2D::factorial(int)`. When you add those up, the total number of generated instructions quickly exceeds the few larger generated functions.
+
+Looking at those functions in the source code, we see that execution time is going to be spent inside loops. For example, here's the code for `factorial()`:
+
+```cpp
+static __forceinline T factorial(int n)
+{
+ T result = 1;
+ for (int i = 1; i <= n; ++i) {
+ for (int j = 0; j < i; ++j) {
+ result *= (i - j) / (T)(j + 1);
+ }
+ }
+ return result;
+}
+```
+
+Perhaps the overall cost of calling this function is insignificant compared to the cost of the function itself. Making a function inline is most beneficial when the time it takes to call the function (pushing arguments on the stack, jumping to the function, popping return arguments, and returning from the function) is roughly similar to the time it takes to execute the function, and when the function is called a lot. When that's not the case, there may be diminishing returns on making it inline. We can try removing the `__forceinline` directive from it to see if it helps the build time. The code for `power`, `sin()`, and `cos()` is similar in that the code consists of a loop that executes many times. We can try removing the `__forceinline` directive from those functions as well.
+
+We rerun Build Insights from the main menu by choosing **Build** > **Run Build Insights on Selection** > **Rebuild**. You can also right-click a project in the solution explorer and choose **Run Build Insights** > **Rebuild**. We choose **Rebuild** instead of **Build** to measure the build time for the entire project, as before, and not for just the few files may be dirty right now.
+
+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.
+:::image-end:::
+
+The Diagnostics Session time is the overall time it took do the build plus any overhead for gathering the Build Insights data.
+
+The next step would be to profile the application to see if the performance of the application is negatively impacted by the change. If it is, we can selectively add `__forceinline` back as needed.
+
+## Navigate to the source code
+
+Double-click, right-click, or press **Enter** while on a file in the **Functions** view to open the source code for that file.
+
+:::image type="content" source="./media/functions-view-goto-file.png" alt-text="Screenshot of a right-click on a file in the Functions view. The menu option Go To Source File is highlighted.":::
+
+## Tips
+
+- Use **File** > **Save As** to save the ETL file to a more permanent location to keep a record of the build time information. You can then compare it to future builds to see how your changes are improving things.
+- If you close the Build Insights window, reopen it by finding the `.etl` file in your temporary folder. The `TEMP` Windows environment variable provides the path of your temporary files folder.
+- To dig into the Build Insights data with Windows Performance Analyzer (WPA), click the **Open in WPA** button in the bottom right of the ETL window.
+- Drag columns to change the order of the columns. For instance, you may prefer moving the **Time** column to be the first column. You can hide columns by right-clicking on the column header and deselecting the columns you don't want to see.
+- The **Functions** view provides a filter box to find a function that you're interested in. It does partial matches on the name you provide.
+- If you forget how to interpret what the **Functions** view is trying to show you, hover over the tab to see a tooltip that describes the view. If you hover over the **Functions** tab, the tooltip says: "View that shows statistics for functions where the children nodes are force-inlined functions."
+
+## Troubleshooting
+
+- If the Build Insights window doesn't appear, do a rebuild instead of a build. The Build Insights window doesn't appear if nothing actually builds; which may be the case if no files changed since the last build.
+- If the Functions view doesn't show any functions, you may not be building with the right optimization settings. Ensure that you're building Release with full optimizations, as described in [Set build options](#set-build-options). Also, if a function's code generation time is too small, it doesn't appear in the list.
+
+## 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)\
+[Troubleshoot header file impact on build time](build-insights-included-files-view.md)\
+[Functions View for Build Insights in Visual Studio 2022 17.8](https://devblogs.microsoft.com/cppblog/functions-view-for-build-insights-in-visual-studio-2022-17-8/)\
+[Tutorial: vcperf and Windows Performance Analyzer](vcperf-and-wpa.md)\
+[Improving code generation time with C++ Build Insights](https://devblogs.microsoft.com/cppblog/improving-code-generation-time-with-cpp-build-insights)
diff --git a/docs/build-insights/tutorials/build-insights-included-files-view.md b/docs/build-insights/tutorials/build-insights-included-files-view.md
new file mode 100644
index 0000000000..0b68665351
--- /dev/null
+++ b/docs/build-insights/tutorials/build-insights-included-files-view.md
@@ -0,0 +1,189 @@
+---
+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"]
+ms.topic: how-to
+---
+# 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.
+
+## Prerequisites
+
+- Visual Studio 2022 17.8 or greater.
+- C++ Build Insights is enabled by default if you install either the Desktop development with C++ workload using the Visual Studio installer:
+
+:::image type="complex" source="./media/installer-desktop-cpp-build-insights.png" alt-text="Screenshot of the Visual Studio Installer with the Desktop development with C++ workload selected.":::
+The list of installed components is shown. C++ Build Insights is highlighted and is selected which means it's installed.
+:::image-end:::
+
+Or the Game development with C++ workload:
+
+:::image type="complex" source="./media/installer-gamedev-cpp-build-insights.png" alt-text="Screenshot of the Visual Studio Installer with the Game development with C++ workload selected.":::
+The list of installed components is shown. C++ Build Insights is highlighted and is selected which means it's installed.
+:::image-end:::
+
+## Overview
+
+Build Insights, now integrated into Visual Studio, helps you optimize your build times--especially for large projects like triple-A games. When a large header file is parsed, and especially when it's repeatedly parsed, there's an impact on build time.
+
+Build Insights provides analytics in the **Included Files** view, which helps diagnose the impact of parsing `#include` files in your project. It displays the time it takes to parse each header file and a view of the relationships between header files.
+
+In this article, learn how to use the Build Insights **Included Files** and **Include Tree** views to identify the most expensive header files to parse and how to optimize build time by creating a precompiled header file.
+
+## Set build options
+
+Before gathering Build Insights data, set the build options for the type of build you want to measure. For example, if you're concerned about your x64 debug build time, set the build for **Debug** and **x64**:
+
+- In the **Solution Configurations** dropdown, choose **Debug**.
+- In the **Solution Platforms** dropdown, choose **x64**.
+
+ :::image type="complex" source="./media/build-options-debug.png" alt-text="Screenshot of the Solution Configuration dropdowns.":::
+ The Solution Configuration dropdown is shown. It has options for Debug, Release, and Configuration manager. The Solution Platform dropdown is set to x64.
+ :::image-end:::
+
+## 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 \** > **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.":::
+
+When the build finishes, an Event Trace Log (ETL) file opens. It's saved in the folder pointed to by the Windows `TEMP` environment variable. The generated name is based on the collection time.
+
+## Included Files view
+
+The trace file shows the build time--which for this example was 16.404 seconds. The **Diagnostics Session** is the overall time taken to run the Build Insights session. Choose the **Included Files** tab.
+
+This view shows the time spent processing `#include` files.
+
+:::image type="complex" source="./media/included-files-before-fix.png" alt-text="Screenshot of the included files view.":::
+In the file path column, several files with a fire icon are highlighted because they take over 10% of the build time to parse. winrtHeaders.h is the biggest one at 8.581 seconds or 52.3% of the 16.404-second build time.
+:::image-end:::
+
+In the **File Path** column, some files have a fire icon next to them to indicate that they take up 10% or more of the build time.
+
+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 it takes to parse files based on their use of parallel threads. For example, if two different threads are parsing two different files simultaneously within a one-second period, each file's WCTR is recorded as 0.5 seconds. This reflects each file'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 file has on the overall build time in environments where multiple compilation activities occur simultaneously.
+
+The **Parse Count** column shows how many time the header file was parsed.
+
+The first header file highlighted in this list is `winrtHeaders.h` It takes 8.581 seconds of the overall 16.404-second build time, or 52.3% of the build time. The next most expensive is `Windows.UI.Xaml.Interop.h`, and then `Windows.Xaml.h`.
+
+To see which file includes `winrtHeaders.h`, click the chevron next to it. The **Parse Count** column can be helpful by pointing out how many times a header file is included by other files. Perhaps a header file is included multiple times, which could be a sign that it's a good candidate for a precompiled header file or refactoring.
+
+The **Translation Unit** column shows which file was being processed when the included file was processed. In this example, `winrtHeaders.h` was included while `Grapher.cpp` was compiled:
+
+:::image type="complex" source="./media/included-files-translation-unit.png" alt-text="Screenshot of the Included Files view.":::
+An example ETL file showing the includes files for a sample project. In the file path column, winrtHeaders.h is selected and expanded. It takes 8.219 seconds to build which is 50.1% of the build time. Its child node is Grapher.cpp, which is also listed as the translation unit."
+:::image-end:::
+
+The translation unit column can help disambiguate which file was being compiled in cases where a header file is included many times and you want to find out where that happens the most.
+
+We know that `winrtHeaders.h` is expensive to parse, but we can learn more.
+
+## Include Tree view
+
+In this view, the children nodes are the files included by the parent node. This can help you understand the relationships between header files and identify opportunities to reduce the number of times a header file is parsed.
+
+Select the **Include Tree** tab in the ETL file to see the Include Tree view:
+
+:::image type="complex" source="./media/include-tree-view.png" alt-text="Screenshot of the Include Tree view.":::
+Shows the include tree for a project. In the file path column, each file that includes other files is listed, along with how many files it includes and the time to parse it.
+:::image-end:::
+
+In this view, the **File Path** column shows each file that includes other files. The **Include Count** lists how many files this header file includes. The time to parse this file is listed, and when expanded, lists the time to parse each individual header file that this header file includes.
+
+Earlier, we saw that parsing `winrtHeaders.h` is time consuming. In the **Filter Files** text box, if we enter `winrtHeaders.h`, we can filter the view to only the entries that contain `winrtHeaders.h` in the name. Clicking the chevron next to `winrtHeaders.h` shows which files it includes:
+
+:::image type="complex" source="./media/include-tree-view-expanded.png" alt-text="Screenshot of the expanded Include Tree view.":::
+The file path column lists each file that includes other files, along with how many files it includes and the time it took to parse it. winrtHeaders.h is selected and expanded to show the files it includes. Windows.UI.Xaml.Interop.h is one of those files and is expanded to show Windows.UI.Xaml.Interop.h that is expanded to show the header files it includes.
+:::image-end:::
+
+We see that `winrtHeaders.h` includes `Windows.UI.Xaml.Interop.h`. Remember from the **Included Files** view that this was also time consuming to parse. Click the chevron next to `Windows.UI.Xaml.Interop.h` to see that it includes `Windows.UI.Xaml.h`, which includes 21 other header files, two of which are also on the hot list.
+
+Having identified some of the most expensive header files to parse, and seeing that `winrtHeaders.h` is responsible for bringing them in, suggests that we can use a precompiled header to make including `winrtHeaders.h` faster.
+
+## Improve build time with precompiled headers
+
+Because we know from the **Included Files** view that `winrtHeaders.h` is time consuming to parse, and because we know from the **Include Tree** view that `winrtHeaders.h` includes several other header files that are time consuming to parse, we build a [Precompiled header file](../../build/creating-precompiled-header-files.md) (PCH) to speed that up by only parsing them once into a PCH.
+
+We add a `pch.h` to include `winrtHeaders.h`, which would look like this:
+
+```cpp
+#ifndef CALC_PCH
+#define CALC_PCH
+
+#include
+
+#endif // CALC_PCH
+```
+
+PCH files must be compiled before they can be used, so we add a file to the project, arbitrarily named `pch.cpp`, that includes `pch.h`. It contains one line:
+
+```cpp
+#include "pch.h"
+```
+
+Then we set our project to use the PCH. That's done in project properties via **C/C++** > **Precompiled Headers** and setting **Precompiled Header** to **Use (/Yu)** and **Precompiled Header File** to **pch.h**.
+
+:::image type="complex" source="./media/precompiled-header-settings.png" alt-text="Screenshot of the project properties dialog with the Precompiled Headers settings open.":::
+Precompiled Header is set to: Use (/Yu). The Precompiled Header File is set to pch.h.
+:::image-end:::
+
+To use the PCH, we include it as the first line in the source files that use `winrtHeaders.h`. It must come before any other include files. Or, for simplicity, we could modify the project properties to include `pch.h` at the beginning of every file in the solution by setting the project property: **C/C++** > **Advanced** > **Forced Include File** to `pch.h`:
+
+:::image type="complex" source="./media/precompiled-header-settings-force-include.png" alt-text="Screenshot of the project properties dialog with the Advanced settings open.":::
+Forced Include File is set to pch.h.
+:::image-end:::
+
+Since the PCH includes `winrtHeaders.h`, we could remove `winrtHeaders.h` from all the files that currently include it. It's not strictly necessary because the compiler realizes that `winrtHeaders.h` is already included and doesn't parse it again. Some developers prefer to keep the `#include` in the source file for clarity, or in case the PCH is likely to be refactored and may not include that header file anymore.
+
+## Test the changes
+
+We first clean the project to make sure we're comparing building the same files as before. To clean just one project, right-click the project in the **Solution Explorer** and choose **Project only** > **Clean only \**.
+
+Because this project now uses a precompiled header (PCH), we don't want to measure the time spent building the PCH because that only happens once. We do this by loading the `pch.cpp` file and choosing **Ctrl+F7** to build just that file. We could also compile this file by right-clicking `pch.cpp` in the Solution Explorer and choosing `Compile`.
+
+Now we rerun Build Insights in the **Solution Explorer** by right-clicking the project and choosing **Project Only** > **Run Build Insights on Build**. You can also right-click a project in the solution explorer and choose **Run Build Insights** > **Build**. We don't want **Rebuild** this time because that will rebuild the PCH, which we don't want to measure. We cleaned the project earlier, which means that a normal build compiles all the project files we want to measure.
+
+When the ETL files appear, we see that build time went from 16.404 seconds to 6.615 seconds. Put `winrtHeaders.h` into the filter box and nothing appears. This is because the time spent parsing it is now negligible since it's being pulled in by the precompiled header.
+
+:::image type="content" source="./media/included-files-after-fix.png" alt-text="Screenshot of the Include Tree pane in the trace file. winrtHeaders is no longer listed.":::
+
+This example uses precompiled headers because they're a common solution before C++20. However, starting with C++20, there are other, faster, less brittle, ways to include header files--such as header units and modules. For more information, see [Compare header units, modules, and precompiled headers](../../build/compare-inclusion-methods.md).
+
+## Navigate between views
+
+There are some navigation features for both the **Included Files** and **Include Tree** views:
+
+- Double-click a file (or press **Enter**) in either the **Included Files** or **Include Tree** to open the source code for that file.
+- Right-click on a header file to find that file in the other view. For example, in the **Included File**s view, right-click on `winrtHeaders.h` and choose **Find in Include Tree** to see it in the **Include Tree** view.
+
+:::image type="content" source="./media/included-files-show-in-include-tree.png" alt-text="Screenshot of a right-click on a file in the Included Files view. The menu option Show in Include Tree View is highlighted.":::
+
+Or, you can right-click a file in the **Include Tree** view to jump to it in the **Included Files** view.
+
+## Tips
+
+- You can **File** > **Save As** the ETL file to a more permanent location to keep a record of the build time. You can then compare it to future builds to see if your changes are improving build time.
+- If you inadvertently close the Build Insights window, reopen it by finding the `.etl` file in your temporary folder. The `TEMP` Windows environment variable provides the path of your temporary files folder.
+- To dig into the Build Insights data with Windows Performance Analyzer (WPA), click the **Open in WPA** button in the bottom right of the ETL window.
+- Drag columns to change the order of the columns. For instance, you may prefer moving the **Time** column to be the first column. You can hide columns by right-clicking on the column header and deselecting the columns you don't want to see.
+- 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).
+
+## Troubleshooting
+
+- If the Build Insights window doesn't appear, do a rebuild instead of a build. The Build Insights window doesn't appear if nothing actually builds; which may be the case if no files changed since the last build.
+- If a header file you're interested in doesn't appear in the **Included Files** or **Include Tree** views, it either didn't build or its build time isn't significant enough to be listed.
+
+## 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)\
+[Troubleshoot function inlining on build time](build-insights-function-view.md)\
+[vcperf and Windows Performance Analyzer](vcperf-and-wpa.md)
diff --git a/docs/build-insights/tutorials/build-insights-template-view.md b/docs/build-insights/tutorials/build-insights-template-view.md
new file mode 100644
index 0000000000..47382cff0b
--- /dev/null
+++ b/docs/build-insights/tutorials/build-insights-template-view.md
@@ -0,0 +1,235 @@
+---
+title: "Troubleshoot template instantiation impact on build time"
+description: "Tutorial for how to use Build Insights template view to analyze and optimize the impact of template instantiations on build time in your C++ projects."
+ms.date: 07/17/2025
+helpviewer_keywords: ["C++ Build Insights", "template instantiation analysis", "build time analysis"]
+ms.topic: troubleshooting-general
+ai-usage: ai-assisted
+---
+
+# Troubleshoot template instantiation impact on build time
+
+Use the Build Insights **Templates** view to see how template instantiation affects C++ build time. It's especially helpful for projects that use lots of templates, like those with template metaprogramming or large generic libraries.
+
+The **Templates** view works like the Build Insights [Functions view](build-insights-function-view.md).
+
+## Prerequisites
+
+- Visual Studio 2022 version 17.10 or later.
+- The **C++ Build Insights** component must be installed. Either the Desktop development with C++ workload or the Game development with C++ workload includes it. To check if it's installed, follow these steps:
+ 1. Open the Visual Studio Installer.
+ 1. Select **Modify** to change your Visual Studio installation.
+ 1. On the **Individual components** tab, search for and select **C++ Build Insights**, then select **Close** to finish installing the component.
+ :::image type="content" source="./media/installer-build-insights.png" alt-text="Screenshot of the Visual Studio Installer. The search box contains C++ Build Insights. The item C++ Build Insights is visible and selected.":::
+
+## Overview
+
+Build Insights, integrated into Visual Studio, helps you optimize your build times--especially for large projects like AAA games. Build Insights provides analytics such as the **Templates** view, which shows the time it takes to instantiate each template and which template instantiations add the most to your build time.
+
+In general, C++ template instantiation happens quickly. In rare cases, some template instantiations can noticeably slow down your build.
+
+In this article, you create a project that shows how template instantiation affects build time, run Build Insights to analyze the impact, and use those insights to make the build faster.
+
+## Create a test project
+
+1. Open Visual Studio and create a new **C++ Console App** project. Name it `TemplateAnalysis`.
+1. Create a header file named `Templates.h`, then replace its contents with the following code:
+
+ ```cpp
+ #pragma once
+
+ #include
+ #include
+
+ template struct S1 {};
+ template using type = std::vector>;
+
+ template struct S2 {};
+
+ template struct S3 {};
+
+ template
+ struct S3>
+ {
+ using type = S2)...>;
+ };
+
+ inline size_t LargeValue()
+ {
+ return sizeof(S3>);
+ }
+
+ inline size_t SmallValue()
+ {
+ return sizeof(S1<5>);
+ }
+ ```
+
+1. Create a source file named `LargeValue.cpp`, then replace its contents with the following code:
+
+ ```cpp
+ #include "Templates.h"
+
+ size_t GetLargeValue()
+ {
+ return LargeValue();
+ }
+ ```
+
+1. Replace the contents of the `TemplateAnalysis.cpp` file with the following code:
+
+ ```cpp
+ #include "Templates.h"
+
+ extern size_t GetLargeValue();
+
+ size_t GetSmallValue()
+ {
+ return SmallValue();
+ }
+
+ int main()
+ {
+ size_t largeValue = GetLargeValue();
+ size_t smallValue = GetSmallValue();
+ return 0;
+ }
+ ```
+
+## Enable build time data collection
+
+Template instantiation time collection is off by default to minimize build overhead. To turn it on:
+
+1. In Visual Studio, go to **Tools** > **Options**.
+1. In the **Options** dialog, expand **Build Insights** in the left navigation.
+1. Select **Collect Template Instantiation**.
+1. To choose where to save the report, select **Store Build Insights reports in this directory** and enter a directory. By default, it's saved in the folder pointed to by the Windows `TEMP` environment variable.
+1. Select **OK**.
+
+:::image type="content" source="./media/tools-options-build-insights.png" alt-text="Screenshot of the project property pages dialog. The settings are open to Build Insights > Trace Collection. The Collect Template Instantiation checkbox is selected.":::
+
+> [!NOTE]
+> Collecting template instantiation times increases build time due to the extra data collected. Only enable it when you want to analyze template instantiation bottlenecks.
+
+## Run Build Insights to get template instantiation data
+
+From the main menu, select **Build** > **Run Build Insights on Solution** > **Rebuild**. You can also right-click a project in Solution Explorer and select **Run Build Insights** > **Rebuild**. Choose **Rebuild** instead of **Build** to measure the build time for the entire project.
+
+:::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.":::
+
+When the build finishes, an Event Trace Log (ETL) file opens. The file name is based on the collection time.
+
+## Use Templates view to optimize build time
+
+The **Templates** view lists the template instantiations that contributed significantly to build time. The columns provide information about:
+
+- **Time [sec, %]** shows how long it takes to instantiate each template 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 template instantiations based on their use of parallel compiler threads.
+- **Specialization Name** shows each template instantiation, including the template arguments used. This helps you find which template specializations are most expensive.
+- **Translation Unit** shows the source files where each template instantiation happens. Different files can cause the same template instantiation if they include the same header with the template definition.
+- **Instantiation File Name** shows where the template is defined.
+
+:::image type="complex" source="./media/templates-view-before-fix.png" alt-text="Screenshot of the Build Insights Templates view showing expensive template instantiations." lightbox="./media/templates-view-before-fix.png":::
+The Templates view shows two template instantiations of struct S3 taking most (79.448 percent) of the build time. The Translation Unit column shows that both LargeValue.cpp and TemplateAnalysis.cpp are affected. The build time is 4.966 seconds.
+:::image-end:::
+
+- Sort by **Time** to find the templates that take the longest to instantiate.
+- Expand a template to see its instantiations and where they happened.
+- Use the search box to focus on specific templates.
+
+### Understanding Templates view results
+
+To interpret the **Templates** view results:
+
+- **Empty view**: If nothing shows up in the **Templates** view, template instantiations don't dominate your build time. That's good news because your templates aren't a build bottleneck.
+- **Duplicate instantiations**: If the same template instantiation appears multiple times across different translation units, different source files are causing the same expensive instantiation. This is often the biggest optimization opportunity.
+- **Threshold filtering**: The view only shows instantiations whose contribution exceeds a certain threshold, so you can focus on the most impactful ones and avoid noise from trivial instantiations.
+- **Time aggregation**: The time shown is the total time spent on that specific template instantiation, including any nested instantiations.
+
+## Improve build time by optimizing template instantiations
+
+In the example, two template instantiations of `S3` take 79 percent of the build time. The **Translation Unit** column shows that both `LargeValue.cpp` and `TemplateAnalysis.cpp` cause this template instantiation.
+
+The **Instantiation File Name** and the **Specialization Name** are the same for both entries, which means one expensive template instantiation that affects both source files. That's why the time for each of the two template instantiations is roughly equal. Including `Templates.h` in both source files causes one template instantiation to add significant time to the build.
+
+From the **Specialization Name** column, the expensive instantiation is `S3>`, which is instantiated in this code in `Templates.h`:
+
+```cpp
+inline size_t LargeValue()
+{
+ return sizeof(S3>);
+}
+```
+
+There are three main ways to decrease the cost of template instantiations.
+
+### Remove unused templates
+
+Check if the expensive template is used. If it isn't, the easiest solution is to remove the function or template. In the example, `LargeValue()` is used in `LargeValue.cpp`, so you can't remove it.
+
+Consider removing include directives that bring in unnecessary template instantiations. It's easy to forget to remove header files when you aren't using them, and unused includes can significantly affect build time.
+
+### Move template instantiations to source files
+
+In this example, rely on the third approach: move the definition that causes the expensive template instantiation to a source file.
+
+Because `LargeValue.cpp` is the only source file that calls `LargeValue()`, move the definition to `LargeValue.cpp`. This change prevents the template instantiation from happening in every file that includes `Templates.h`. Remove the current definition of `LargeValue()` from `Templates.h` and replace it with a declaration:
+
+```cpp
+size_t LargeValue();
+```
+
+Inside `LargeValue.cpp` add the definition:
+
+```cpp
+size_t LargeValue()
+{
+ return sizeof(S3>);
+}
+```
+
+Rebuild the project and run Build Insights again from the main menu. Select **Build** > **Run Build Insights on Selection** > **Rebuild**.
+
+The build time decreases. While the template instantiation of `S3` still contributes to the build time, including only necessary template instantiations cuts the build time nearly in half. The count of `S3` instantiations is now one instead of two.
+
+:::image type="complex" source="./media/templates-view-after-fix.png" alt-text="Screenshot of the Build Insights Templates view after optimization. The view shows reduced template instantiation time." lightbox="./media/templates-view-after-fix.png":::
+The Templates view now shows only one instantiation of S3 instead of two, and the total build time is significantly less at 3.152 seconds.
+:::image-end:::
+
+This technique works well for larger projects. If multiple files include `Templates.h`, each file adds the instantiation time of `LargeValue()` to the total build time. By moving the definition of `LargeValue()` to a dedicated source file, you minimize build time.
+
+### Optimize the template implementation
+
+Other optimization techniques include:
+
+- Use simpler template patterns
+- Use `if constexpr` instead of Substitution Failure Is Not An Error (SFINAE) when possible
+- Avoid recursive template instantiation patterns that lead to exponential growth
+
+For more advanced template optimization techniques, see [Build Throughput Series: More Efficient Template Metaprogramming](https://devblogs.microsoft.com/cppblog/build-throughput-series-more-efficient-template-metaprogramming/), which provides detailed examples of reducing template instantiation overhead.
+
+## Tips
+
+- Use **File** > **Save As** to save the ETL file to a more permanent location to keep a record of the build time information. You can then compare it to future builds to see how your changes are improving things.
+- If you close the Build Insights window, reopen it by finding the *dateandtime*.etl file either where you specified it should be saved, or in your temporary folder. The `TEMP` Windows environment variable provides the path of your temporary files folder.
+- Drag columns to change the order of the columns. For example, you might want to move the **Wall Time Responsibility** column to the first column. You can add or hide columns by right-clicking the column header and selecting or deselecting the columns you want.
+- The **Templates** view has a filter box to help you find a specific template instantiation. It does partial matches on the name you provide.
+
+## Troubleshooting
+
+**Templates view is empty**: This can mean:
+
+- Your build time isn't dominated by template instantiations.
+- Template data collection isn't enabled. To turn it on, see [Enable build time data collection](#enable-build-time-data-collection).
+- Do a rebuild instead of a build. The Build Insights window doesn't appear if nothing builds, which can be the case if no files changed since the last build.
+- Make sure you're using Visual Studio 2022 17.10 or later, and that the C++ Build Insights component is installed.
+
+**Build is much slower with Templates view enabled:** This is expected because of the extra data collection. Turn off template instantiation collection when you don't need it. For more information, see [Enable build time data collection](#enable-build-time-data-collection).
+
+## See also
+
+- [Build Insights tips and tricks](build-insights-tips.md)
+- [#include cleanup in Visual Studio](https://devblogs.microsoft.com/cppblog/include-cleanup-in-visual-studio)
+- [Troubleshoot header file impact on build time](build-insights-included-files-view.md)
+- [Troubleshoot function inlining on build time](build-insights-function-view.md)
+- [Build Insights now available in Visual Studio 2022](https://devblogs.microsoft.com/cppblog/build-insights-now-available-in-visual-studio-2022)
+- [Build throughput series: More efficient template metaprogramming](https://devblogs.microsoft.com/cppblog/build-throughput-series-more-efficient-template-metaprogramming)
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-rebuild-project.png b/docs/build-insights/tutorials/media/build-insights-rebuild-project.png
new file mode 100644
index 0000000000..fcd96f050e
Binary files /dev/null and b/docs/build-insights/tutorials/media/build-insights-rebuild-project.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-insights/tutorials/media/build-options-debug.png b/docs/build-insights/tutorials/media/build-options-debug.png
new file mode 100644
index 0000000000..156abb7646
Binary files /dev/null and b/docs/build-insights/tutorials/media/build-options-debug.png differ
diff --git a/docs/build-insights/tutorials/media/build-options-release.png b/docs/build-insights/tutorials/media/build-options-release.png
new file mode 100644
index 0000000000..2fe4589daf
Binary files /dev/null and b/docs/build-insights/tutorials/media/build-options-release.png differ
diff --git a/docs/build-insights/tutorials/media/functions-view-after-fix.png b/docs/build-insights/tutorials/media/functions-view-after-fix.png
new file mode 100644
index 0000000000..9df70ef0b9
Binary files /dev/null and b/docs/build-insights/tutorials/media/functions-view-after-fix.png differ
diff --git a/docs/build-insights/tutorials/media/functions-view-before-fix.png b/docs/build-insights/tutorials/media/functions-view-before-fix.png
new file mode 100644
index 0000000000..109d81e391
Binary files /dev/null and b/docs/build-insights/tutorials/media/functions-view-before-fix.png differ
diff --git a/docs/build-insights/tutorials/media/functions-view-expanded.png b/docs/build-insights/tutorials/media/functions-view-expanded.png
new file mode 100644
index 0000000000..9f0483a4cf
Binary files /dev/null and b/docs/build-insights/tutorials/media/functions-view-expanded.png differ
diff --git a/docs/build-insights/tutorials/media/functions-view-goto-file.png b/docs/build-insights/tutorials/media/functions-view-goto-file.png
new file mode 100644
index 0000000000..378c335781
Binary files /dev/null and b/docs/build-insights/tutorials/media/functions-view-goto-file.png differ
diff --git a/docs/build-insights/tutorials/media/include-tree-view-expanded.png b/docs/build-insights/tutorials/media/include-tree-view-expanded.png
new file mode 100644
index 0000000000..d011bb41ee
Binary files /dev/null and b/docs/build-insights/tutorials/media/include-tree-view-expanded.png differ
diff --git a/docs/build-insights/tutorials/media/include-tree-view.png b/docs/build-insights/tutorials/media/include-tree-view.png
new file mode 100644
index 0000000000..629ad3f125
Binary files /dev/null and b/docs/build-insights/tutorials/media/include-tree-view.png differ
diff --git a/docs/build-insights/tutorials/media/included-files-after-fix.png b/docs/build-insights/tutorials/media/included-files-after-fix.png
new file mode 100644
index 0000000000..42691ef4b6
Binary files /dev/null and b/docs/build-insights/tutorials/media/included-files-after-fix.png differ
diff --git a/docs/build-insights/tutorials/media/included-files-before-fix.png b/docs/build-insights/tutorials/media/included-files-before-fix.png
new file mode 100644
index 0000000000..e4eee66cf0
Binary files /dev/null and b/docs/build-insights/tutorials/media/included-files-before-fix.png differ
diff --git a/docs/build-insights/tutorials/media/included-files-show-in-include-tree.png b/docs/build-insights/tutorials/media/included-files-show-in-include-tree.png
new file mode 100644
index 0000000000..75df957eb5
Binary files /dev/null and b/docs/build-insights/tutorials/media/included-files-show-in-include-tree.png differ
diff --git a/docs/build-insights/tutorials/media/included-files-translation-unit.png b/docs/build-insights/tutorials/media/included-files-translation-unit.png
new file mode 100644
index 0000000000..65ad65bcaa
Binary files /dev/null and b/docs/build-insights/tutorials/media/included-files-translation-unit.png differ
diff --git a/docs/build-insights/tutorials/media/installer-build-insights.png b/docs/build-insights/tutorials/media/installer-build-insights.png
new file mode 100644
index 0000000000..55e1ec52cf
Binary files /dev/null and b/docs/build-insights/tutorials/media/installer-build-insights.png differ
diff --git a/docs/build-insights/tutorials/media/installer-desktop-cpp-build-insights.png b/docs/build-insights/tutorials/media/installer-desktop-cpp-build-insights.png
new file mode 100644
index 0000000000..152ce06514
Binary files /dev/null and b/docs/build-insights/tutorials/media/installer-desktop-cpp-build-insights.png differ
diff --git a/docs/build-insights/tutorials/media/installer-gamedev-cpp-build-insights.png b/docs/build-insights/tutorials/media/installer-gamedev-cpp-build-insights.png
new file mode 100644
index 0000000000..3eaa8c2df1
Binary files /dev/null and b/docs/build-insights/tutorials/media/installer-gamedev-cpp-build-insights.png differ
diff --git a/docs/build-insights/tutorials/media/max-optimization-setting.png b/docs/build-insights/tutorials/media/max-optimization-setting.png
new file mode 100644
index 0000000000..78510f0af3
Binary files /dev/null and b/docs/build-insights/tutorials/media/max-optimization-setting.png differ
diff --git a/docs/build-insights/tutorials/media/precompiled-header-settings-force-include.png b/docs/build-insights/tutorials/media/precompiled-header-settings-force-include.png
new file mode 100644
index 0000000000..f53b2faf6a
Binary files /dev/null and b/docs/build-insights/tutorials/media/precompiled-header-settings-force-include.png differ
diff --git a/docs/build-insights/tutorials/media/precompiled-header-settings.png b/docs/build-insights/tutorials/media/precompiled-header-settings.png
new file mode 100644
index 0000000000..4198430bce
Binary files /dev/null and b/docs/build-insights/tutorials/media/precompiled-header-settings.png differ
diff --git a/docs/build-insights/tutorials/media/templates-view-after-fix.png b/docs/build-insights/tutorials/media/templates-view-after-fix.png
new file mode 100644
index 0000000000..7acc1cf276
Binary files /dev/null and b/docs/build-insights/tutorials/media/templates-view-after-fix.png differ
diff --git a/docs/build-insights/tutorials/media/templates-view-before-fix.png b/docs/build-insights/tutorials/media/templates-view-before-fix.png
new file mode 100644
index 0000000000..22bd3ba5fd
Binary files /dev/null and b/docs/build-insights/tutorials/media/templates-view-before-fix.png differ
diff --git a/docs/build-insights/tutorials/media/tools-options-build-insights.png b/docs/build-insights/tutorials/media/tools-options-build-insights.png
new file mode 100644
index 0000000000..b0317d247d
Binary files /dev/null and b/docs/build-insights/tutorials/media/tools-options-build-insights.png differ
diff --git a/docs/build-insights/tutorials/vcperf-and-wpa.md b/docs/build-insights/tutorials/vcperf-and-wpa.md
index e70895a2ff..0b8b278a8a 100644
--- a/docs/build-insights/tutorials/vcperf-and-wpa.md
+++ b/docs/build-insights/tutorials/vcperf-and-wpa.md
@@ -3,49 +3,51 @@ title: "Tutorial: vcperf and Windows Performance Analyzer"
description: "Tutorial on how to use vcperf and WPA for analyzing C++ build traces."
ms.date: "11/03/2019"
helpviewer_keywords: ["C++ Build Insights", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: tutorial
---
# Tutorial: vcperf and Windows Performance Analyzer
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
-The C++ Build Insights tools are available in Visual Studio 2019. To see the documentation for this version, set the Visual Studio **Version** selector control for this article to Visual Studio 2019. It's found at the top of the table of contents on this page.
+The C++ Build Insights tools are available in Visual Studio 2019 and later. To see the documentation for this version, set the Visual Studio **Version** selector control for this article to Visual Studio 2019 or later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
-In this tutorial, you'll learn how to use *vcperf.exe* to collect a trace of your C++ build. You'll also learn how to view this trace in Windows Performance Analyzer.
+In this tutorial, you'll learn how to use *`vcperf.exe`* to collect a trace of your C++ build. You'll also learn how to view this trace in Windows Performance Analyzer.
## Step 1: Install and configure Windows Performance Analyzer
WPA is a trace viewer available in the Windows Assessment and Deployment Kit (ADK). It's a separate utility that's not part of the components you can install with the Visual Studio installer.
-A version of WPA that supports C++ Build Insights is currently only available in the Windows ADK Insider Preview. To access this preview, you must sign up for the [Windows Insider program](https://insider.windows.com). You don't need to install the Windows 10 Insider Preview operating system to obtain the Windows ADK preview. You only need to register your Microsoft account with the Windows Insider Program.
+A version of WPA that supports C++ Build Insights is only available in versions of the Windows ADK numbered 10.1.19041.0 or later.
### To download and install WPA
NOTE: Windows 8 or above is required for installing the Windows Performance Analyzer.
-1. Browse to the Windows ADK [download page](https://docs.microsoft.com/windows-hardware/get-started/adk-install).
+1. Browse to the Windows ADK [download page](/windows-hardware/get-started/adk-install).
1. Download and install the latest version of the Windows ADK.
1. When prompted for the features that you want to install, select the **Windows Performance Toolkit**. You may select other features if you wish, but they're not required to install WPA.
- 
+ 
### To configure WPA
Viewing C++ Build Insights traces in WPA requires a special add-in. Follow these steps to install it:
1. Obtain the add-in by downloading one of the components below. You don't need to get both. Choose the one that you find most convenient.
- 1. [Visual Studio 2019 version 16.6 and above](https://visualstudio.microsoft.com/downloads/), or,
- 1. [C++ Build Insights NuGet package](https://www.nuget.org/packages/Microsoft.Cpp.BuildInsights/).
+ - Visual Studio 2019 version 16.6 and above. For the latest version, see [Visual Studio Downloads](https://visualstudio.microsoft.com/downloads/).
+ - [C++ Build Insights NuGet package](https://www.nuget.org/packages/Microsoft.Cpp.BuildInsights/).
1. Copy the `perf_msvcbuildinsights.dll` file into your WPA installation directory.
- 1. In Visual Studio 2019 version 16.6 and above, this file is located here: `C:\Program Files (x86)\Microsoft Visual Studio\2019\{Edition}\VC\Tools\MSVC\{Version}\bin\Host{Architecture}\{Architecture}`.
+ 1. In Visual Studio 2019 version 16.6 and above, this file is located here: `C:\Program Files (x86)\Microsoft Visual Studio\{Year}\{Edition}\VC\Tools\MSVC\{Version}\bin\Host{Architecture}\{Architecture}`.
1. In the C++ Build Insights NuGet package, this file is located here: `wpa\{Architecture}`.
1. In the paths above, replace the variables surrounded by curly brackets as follows:
- 1. `{Edition}` is your Visual Studio 2019 edition such as Community, Professional, or Enterprise.
+ 1. `{Year}` is your Visual Studio product year, such as 2019 or 2022.
+ 1. `{Edition}` is your Visual Studio edition such as Community, Professional, or Enterprise.
1. `{Version}` is your MSVC version. Choose the highest one available.
1. `{Architecture}`: choose `x64` if you have a 64-bit version of Windows. Otherwise, choose `x86`.
1. The WPA installation directory is typically: `C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit`.
@@ -56,7 +58,7 @@ Viewing C++ Build Insights traces in WPA requires a special add-in. Follow these
To view C++ Build Insights data, first collect it into a trace file by following these steps:
-1. Open an **x64** or **x86 Native Tools Command Prompt for VS 2019** in administrator mode. (Right-click the Start menu item and choose **More** > **Run as administrator**.)
+1. Open an **x64** or **x86 Native Tools Command Prompt for VS** in administrator mode. (Right-click the Start menu item and choose **More** > **Run as administrator**.)
1. Choose **x64** if you have a 64-bit version of Windows. Otherwise, choose **x86**.
1. In the command prompt window, enter this command:
@@ -75,7 +77,7 @@ To view C++ Build Insights data, first collect it into a trace file by following
Here's what a typical *vcperf.exe* command sequence looks like in a developer command prompt window:
-
+
### Important notes about vcperf.exe
@@ -104,7 +106,7 @@ Launch WPA and open the trace you just collected. WPA should recognize it as a C
If you can't see these views, double-check that WPA is configured correctly, as described in [Step 1](#configuration-steps). You can view your build data by dragging the views into the empty Analysis window on the right, as shown here:
-
+
Other views are available in the Graph Explorer panel. Drag them into the Analysis window when you're interested in the information they contain. A useful one is the CPU (Sampled) view, which shows CPU utilization throughout your build.
@@ -113,10 +115,10 @@ Other views are available in the Graph Explorer panel. Drag them into the Analys
[Tutorial: Windows Performance Analyzer basics](wpa-basics.md)\
Learn about common WPA operations that can help you analyze your build traces.
-[Reference: vcperf commands](/cpp/build-insights/reference/vcperf-commands)\
+[Reference: vcperf commands](../reference/vcperf-commands.md)\
The *vcperf.exe* command reference lists all the available command options.
-[Reference: Windows Performance Analyzer views](/cpp/build-insights/reference/wpa-views)\
+[Reference: Windows Performance Analyzer views](../reference/wpa-views.md)\
Refer to this article for details about the C++ Build Insights views in WPA.
[Windows Performance Analyzer](/windows-hardware/test/wpt/windows-performance-analyzer)\
diff --git a/docs/build-insights/tutorials/wpa-basics.md b/docs/build-insights/tutorials/wpa-basics.md
index ad7bf03e37..35ad6fe727 100644
--- a/docs/build-insights/tutorials/wpa-basics.md
+++ b/docs/build-insights/tutorials/wpa-basics.md
@@ -3,15 +3,16 @@ title: "Tutorial: Windows Performance Analyzer basics"
description: "Tutorial on how to complete basic operations in Windows Performance Analyzer."
ms.date: "11/03/2019"
helpviewer_keywords: ["C++ Build Insights", "throughput analysis", "build time analysis", "vcperf.exe"]
+ms.topic: tutorial
---
# Tutorial: Windows Performance Analyzer basics
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
-The C++ Build Insights tools are available in Visual Studio 2019. To see the documentation for this version, set the Visual Studio **Version** selector control for this article to Visual Studio 2019. It's found at the top of the table of contents on this page.
+The C++ Build Insights tools are available in Visual Studio 2019 and later. To see the documentation for this version, set the Visual Studio **Version** selector control for this article to Visual Studio 2019 or later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
Using C++ Build Insights effectively requires some knowledge of Windows Performance Analyzer (WPA). This article helps you become familiar with common WPA operations. For more information on how to use WPA, see the [Windows Performance Analyzer](/windows-hardware/test/wpt/windows-performance-analyzer) documentation.
@@ -36,7 +37,7 @@ Most C++ Build Insights WPA views have multiple presets for you to choose from.
Some build traces are so large it's hard to make out the details. To zoom in on an area that interests you, right-click on the graph and select **Zoom**. You can always go back to the previous setting by choosing **Undo Zoom**. This image shows an example of using a selection and the **Zoom** command to zoom in on a section of the graph:
-
+
## Group by different columns
@@ -44,13 +45,13 @@ You can customize the way your trace is displayed. Click on the gear icon at the
This image shows an example bar graph of a link invocation. We use the gear icon to open the Build Explorer View Editor dialog. Then we drag the Component and Name column entries above the yellow line. The configuration is changed to increase the level of detail, and to see what actually happened inside the linker:
-
+
## See also
[Tutorial: vcperf and Windows Performance Analyzer](vcperf-and-wpa.md)\
-[Reference: vcperf commands](/cpp/build-insights/reference/vcperf-commands)\
-[Reference: Windows Performance Analyzer views](/cpp/build-insights/reference/wpa-views)\
+[Reference: vcperf commands](../reference/vcperf-commands.md)\
+[Reference: Windows Performance Analyzer views](../reference/wpa-views.md)\
[Windows Performance Analyzer](/windows-hardware/test/wpt/windows-performance-analyzer)
::: moniker-end
diff --git a/docs/build/active-technology-and-dlls.md b/docs/build/active-technology-and-dlls.md
index 7d40107beb..9361cb0c6d 100644
--- a/docs/build/active-technology-and-dlls.md
+++ b/docs/build/active-technology-and-dlls.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Active Technology and DLLs"
title: "Active Technology and DLLs"
ms.date: "11/04/2016"
helpviewer_keywords: ["in-process server DLLs", "Automation [C++], DLLs", "DLLs [C++], Active Technology", "Active technology [C++]", "MFC DLLs [C++], Active Technology"]
diff --git a/docs/build/adding-references-in-visual-cpp-projects.md b/docs/build/adding-references-in-visual-cpp-projects.md
index 45d42bae87..41de401156 100644
--- a/docs/build/adding-references-in-visual-cpp-projects.md
+++ b/docs/build/adding-references-in-visual-cpp-projects.md
@@ -1,55 +1,60 @@
---
+description: "Learn more about: Consuming libraries and components"
title: "Consuming libraries and components in C++ projects"
-ms.date: "12/10/2018"
+ms.date: 12/18/2020
f1_keywords: ["VC.Project.References"]
helpviewer_keywords: ["Add References Dialog Box (C++)", ".NET Framework (C++), Add References Dialog Box"]
-ms.assetid: 12b8f571-0f21-40b3-9404-5318a57e9cb5
+ms.topic: how-to
---
# Consuming libraries and components
-Often, a C++ project needs to call functions or access data in a binary file such as static library (.lib files), DLL, Windows Runtime component, COM component, or .NET assembly. In these cases, you have to configure the project so that it can find that binary at build time. The specific steps depend on the type of your project, the type of the binary, and whether the binary is being built in the same solution as your project.
+C++ projects often need to call functions or access data in a binary file such as static library (LIB files), DLL, Windows Runtime component, COM component, or .NET assembly. In these cases, you have to configure the project so that it can find that binary at build time. The specific steps depend on the type of your project, the type of the binary, and whether the binary gets built in the same solution as your project.
## Consuming libraries downloaded via vcpkg
-To consume a library that you have downloaded by using the **vcpkg** package manager, you can ignore the instructions below. See [vcpkg: A C++ package manager for Windows, Linux and MacOS](vcpkg.md#integrate-with-visual-studio-windows) for more information.
+To consume a library that you have downloaded by using the **vcpkg** package manager, you can ignore the instructions below. For more information, see:
+- [vcpkg in CMake projects](/vcpkg/users/buildsystems/cmake-integration)
+- [Install and use packages with CMake in Visual Studio](/vcpkg/get_started/get-started-vs)
+- [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)
## Consuming static libraries
-If your static library project is being built in the same solution:
+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 will start 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 is not part of the solution:
+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 where the .lib file is located in **Library Paths** and add the path to the library header file(s) in **Include Directories**.
-3. In the **Linker > Input** property page, add the name of the .lib file to **Additional Dependencies**.
+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
-If the DLL is being built as part of the same solution as the application, follow the same steps as for a static library.
+If the DLL gets built as part of the same solution as the application, follow the same steps as for a static library.
-If the DLL is not part of the application solution, you need the DLL file, the header(s) with prototypes for the exported functions and classes, and a .lib file that provides the necessary linking information.
+If the DLL isn't part of the application solution, you need: the DLL file, the header(s) with prototypes for the exported functions and classes, and a LIB file that provides the necessary linking information.
-1. Copy the DLL to the output folder of your project, or to another folder in the standard Windows search path for DLLs. See [Dynamic-Link Library Search Order](/windows/win32/dlls/dynamic-link-library-search-order).
-2. Follow steps 1-3 for static libraries to provide the paths to the headers and .lib file.
+1. Copy the DLL to the output folder of your project, or to another folder in the standard Windows search path for DLLs. For more information, see [Dynamic-Link Library Search Order](/windows/win32/dlls/dynamic-link-library-search-order).
+2. Follow steps 1-3 for static libraries to provide the paths to the headers and LIB file.
## COM objects
-If your native C++ application needs to consume a COM object, and that object is *registered*, then all you have to do is call CoCreateInstance and pass in the CLSID of the object. The system will find it in the Windows Registry and load it. A C++/CLI project can consume a COM object in the same way, or by adding a reference to it from the **Add References > COM** list and consuming it through its [Runtime callable wrapper](/dotnet/framework/interop/runtime-callable-wrapper).
+If your native C++ application needs to consume a COM object, and that object is *registered*, then all you have to do is call CoCreateInstance and pass in the CLSID of the object. The system will find it in the Windows Registry and load it. A C++/CLI project can consume a COM object in the same way. Or, it can consume it by adding a reference to it from the **Add References > COM** list and consuming it through its [Runtime callable wrapper](/dotnet/framework/interop/runtime-callable-wrapper).
## .NET assemblies and Windows Runtime Components
-In UWP or C++/CLI projects, you consume .NET assemblies or Windows Runtime Components by adding a *reference* to the assembly or component. Under the **References** node in a UWP or C++/CLI project, you see references to commonly-used components. Right-click on the **References** node in **Solution Explorer** to bring up the **Reference Manager** and browse through additional components that are known to the system. Click the **Browse** button to navigate to any folder where a custom component is located. Because .NET assemblies and Windows Runtime components contain built-in type information, you can view their methods and classes by right-clicking and choosing **View in Object Browser**.
+In UWP or C++/CLI projects, you consume .NET assemblies or Windows Runtime Components by adding a *reference* to the assembly or component. Under the **References** node in a UWP or C++/CLI project, you see references to commonly used components. Right-click on the **References** node in **Solution Explorer** to bring up the **Reference Manager** and browse through the components available on the system. Choose the **Browse** button to navigate to any folder that contains a custom component. Because .NET assemblies and Windows Runtime components contain built-in type information, you can view their methods and classes by right-clicking and choosing **View in Object Browser**.
## Reference properties
-Each kind of reference has properties. You can view the properties by selecting the reference in Solution Explorer and pressing **Alt + Enter**, or else right-clicking and choosing **Properties**. Some properties are read-only and some can be modified. However, typically you don't have to manually modify these properties.
+Each kind of reference has properties. You can view the properties by selecting the reference in Solution Explorer and pressing **Alt + Enter**, or else right-clicking and choosing **Properties**. Some properties are read-only and some are modifiable. However, typically you don't have to manually modify these properties.
### ActiveX reference properties
-ActiveX reference properties are available only for references to COM components. These properties are displayed only when a COM component is selected in the **References** pane. The properties cannot be modified.
+ActiveX reference properties are available only for references to COM components. These properties get displayed only when you select a COM component in the **References** pane. The properties aren't modifiable.
- **Control Full Path**
@@ -69,11 +74,11 @@ ActiveX reference properties are available only for references to COM components
- **Wrapper Tool**
- Displays the tool that is used to build the interop assembly from the referenced COM library or ActiveX control.
+ Displays the tool that's used to build the interop assembly from the referenced COM library or ActiveX control.
### Assembly reference properties (C++/CLI)
-Assembly reference properties are available only for references to .NET Framework assemblies in C++/CLI projects. These properties are displayed only when a .NET Framework assembly is selected in the **References** pane. The properties cannot be modified.
+Assembly reference properties are available only for references to .NET Framework assemblies in C++/CLI projects. These properties get displayed only when you select a .NET Framework assembly in the **References** pane. The properties aren't modifiable.
- **Relative Path**
@@ -93,27 +98,27 @@ The following properties are available on various kinds of references. They enab
- **Reference Assembly Output**
- Specifies that this assembly is used in the build process. If **`true`**, the assembly is used on the compiler command line during the build.
+ Specifies that this assembly gets used in the build process. If **`true`**, the assembly gets used on the compiler command line during the build.
### Project-to-project reference properties
-The following properties define a *project-to-project reference* from the project that is selected in the **References** pane to another project in the same solution. For more information, see [Managing references in a project](/visualstudio/ide/managing-references-in-a-project).
+The following properties define a *project-to-project reference* from the project that's selected in the **References** pane to another project in the same solution. For more information, see [Managing references in a project](/visualstudio/ide/managing-references-in-a-project).
- **Link Library Dependencies**
- When this property is **True**, the project system links into the dependent project the .lib files that are produced by the independent project. Typically, you will specify **True**.
+ When this property is **True**, the project system links the LIB files that the independent project produces into the dependent project. Typically, you'll specify **True**.
- **Project Identifier**
- Uniquely identifies the independent project. The property value is an internal system GUID that cannot be modified.
+ Uniquely identifies the independent project. The property value is an internal system GUID that isn't modifiable.
- **Use Library Dependency Inputs**
- When this property is **False**, the project system will not link into the dependent project the .obj files for the library produced by the independent project. Consequently, this value disables incremental linking. Typically, you will specify **False** because building the application can take a long time if there are many independent projects.
+ When this property is **False**, the project system won't link the OBJ files for the library that the independent project produces into the dependent project. That's why this value disables incremental linking. Typically, you'll specify **False** because building the application can take a long time if there are many independent projects.
### Read-only reference properties (COM & .NET)
-The following properties are found on COM and .NET assembly references, and cannot be modified.
+The following properties exist on COM and .NET assembly references, and aren't modifiable.
- **Assembly Name**
@@ -133,7 +138,7 @@ The following properties are found on COM and .NET assembly references, and cann
- **Identity**
- For the .NET Frameworkassemblies, displays the full path. For COM components, displays the GUID.
+ For the .NET Framework assemblies, displays the full path. For COM components, displays the GUID.
- **Label**
@@ -145,11 +150,11 @@ The following properties are found on COM and .NET assembly references, and cann
- **Public Key Token**
- Displays the public key token that is used to identify the referenced assembly.
+ Displays the public key token used to identify the referenced assembly.
- **Strong Name**
- **`true`** if the referenced assembly has a strong name. A strong named assembly is uniquely versioned.
+ **`true`** if the referenced assembly has a strong name. A strong named assembly has a unique version.
- **Version**
@@ -157,5 +162,5 @@ The following properties are found on COM and .NET assembly references, and cann
## 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/arm-exception-handling.md b/docs/build/arm-exception-handling.md
index 04bfb762ac..b7cc353313 100644
--- a/docs/build/arm-exception-handling.md
+++ b/docs/build/arm-exception-handling.md
@@ -1,33 +1,34 @@
---
title: "ARM Exception Handling"
-ms.date: "07/11/2018"
-ms.assetid: fe0e615f-c033-4ad5-97f4-ff96af45b201
+description: "Learn more about: ARM Exception Handling"
+ms.date: 12/15/2021
+ms.topic: concept-article
---
# ARM Exception Handling
-Windows on ARM uses the same structured exception handling mechanism for asynchronous hardware-generated exceptions and synchronous software-generated exceptions. Language-specific exception handlers are built on top of Windows structured exception handling by using language helper functions. This document describes exception handling in Windows on ARM, and the language helpers used by code that's generated by the Microsoft ARM assembler and the MSVC compiler.
+Windows on ARM uses the same structured exception-handling mechanism for asynchronous hardware-generated exceptions and synchronous software-generated exceptions. Language-specific exception handlers are built on top of Windows structured exception handling by using language helper functions. This document describes exception handling in Windows on ARM, and the language helpers both the Microsoft ARM assembler and the MSVC compiler generate.
## ARM Exception Handling
-Windows on ARM uses *unwind codes* to control stack unwinding during [structured exception handling](/windows/win32/debug/structured-exception-handling) (SEH). Unwind codes are a sequence of bytes stored in the .xdata section of the executable image. They describe the operation of function prologue and epilogue code in an abstract way, so that the effects of a function's prologue can be undone in preparation for unwinding to the caller's stack frame.
+Windows on ARM uses *unwind codes* to control stack unwinding during [structured exception handling](/windows/win32/debug/structured-exception-handling) (SEH). Unwind codes are a sequence of bytes stored in the `.xdata` section of the executable image. These codes describe the operation of function prologue and epilogue code in an abstract way. The handler uses them to undo the function prologue's effects when it unwinds to the caller's stack frame.
-The ARM EABI (embedded application binary interface) specifies an exception unwinding model that uses unwind codes, but it's not sufficient for SEH unwinding in Windows, which must handle asynchronous cases where the processor is in the middle of the prologue or epilogue of a function. Windows also separates unwinding control into function-level unwinding and language-specific scope unwinding, which is unified in the ARM EABI. For these reasons, Windows on ARM specifies more details for the unwinding data and procedure.
+The ARM EABI (embedded application binary interface) specifies a model for exception unwinding that uses unwind codes. The model isn't sufficient for SEH unwinding in Windows. It must handle asynchronous cases where the processor is in the middle of the prologue or epilogue of a function. Windows also separates unwinding control into function-level unwinding and language-specific scope unwinding, which is unified in the ARM EABI. For these reasons, Windows on ARM specifies more details for the unwinding data and procedure.
### Assumptions
-Executable images for Windows on ARM use the Portable Executable (PE) format. For more information, see [Microsoft PE and COFF Specification](https://go.microsoft.com/fwlink/p/?linkid=84140). Exception handling information is stored in the .pdata and .xdata sections of the image.
+Executable images for Windows on ARM use the Portable Executable (PE) format. For more information, see [PE Format](/windows/win32/debug/pe-format). Exception handling information is stored in the `.pdata` and `.xdata` sections of the image.
The exception handling mechanism makes certain assumptions about code that follows the ABI for Windows on ARM:
-- When an exception occurs within the body of a function, it does not matter whether the prologue's operations are undone, or the epilogue's operations are performed in a forward manner. Both should produce identical results.
+- When an exception occurs within the body of a function, the handler could undo the prologue's operations, or do the epilogue's operations in a forward manner. Both should produce identical results.
-- Prologues and epilogues tend to mirror each other. This can be used to reduce the size of the metadata needed to describe unwinding.
+- Prologues and epilogues tend to mirror each other. This feature can be used to reduce the size of the metadata needed to describe unwinding.
-- Functions tend to be relatively small. Several optimizations rely on this for efficient packing of data.
+- Functions tend to be relatively small. Several optimizations rely on this observation for efficient packing of data.
- If a condition is placed on an epilogue, it applies equally to each instruction in the epilogue.
-- If the stack pointer (SP) is saved in another register in the prologue, that register must remain unchanged throughout the function, so that the original SP may be recovered at any time.
+- If the prologue saves the stack pointer (SP) in another register, that register must remain unchanged throughout the function, so the original SP may be recovered at any time.
- Unless the SP is saved in another register, all manipulation of it must occur strictly within the prologue and epilogue.
@@ -45,133 +46,133 @@ The exception handling mechanism makes certain assumptions about code that follo
- Parse one of a few well-defined frame types.
-### .pdata Records
+### `.pdata` Records
-The .pdata records in a PE-format image are an ordered array of fixed-length items that describe every stack-manipulating function. Leaf functions, which are functions that do not call other functions, don't require .pdata records when they don't manipulate the stack. (That is, they don't require any local storage and don't have to save or restore non-volatile registers.). Records for these functions can be omitted from the .pdata section to save space. An unwind operation from one of these functions can just copy the return address from the Link Register (LR) to the program counter (PC) to move up to the caller.
+The `.pdata` records in a PE-format image are an ordered array of fixed-length items that describe every stack-manipulating function. Leaf functions (functions that don't call other functions) don't require `.pdata` records when they don't manipulate the stack. (That is, they don't require any local storage and don't have to save or restore non-volatile registers.). Records for these functions can be omitted from the `.pdata` section to save space. An unwind operation from one of these functions can just copy the return address from the Link Register (LR) to the program counter (PC) to move up to the caller.
-Every .pdata record for ARM is 8 bytes long. The general format of a record places the relative virtual address (RVA) of the function start in the first 32-bit word, followed by a second word that contains either a pointer to a variable-length .xdata block, or a packed word that describes a canonical function unwinding sequence, as shown in this table:
+Every `.pdata` record for ARM is 8 bytes long. The general format of a record places the relative virtual address (RVA) of the function start in the first 32-bit word, followed by a second word that contains either a pointer to a variable-length `.xdata` block, or a packed word that describes a canonical function unwinding sequence, as shown in this table:
|Word Offset|Bits|Purpose|
|-----------------|----------|-------------|
-|0|0-31|*Function Start RVA* is the 32-bit RVA of the start of the function. If the function contains thumb code, the low bit of this address must be set.|
-|1|0-1|*Flag* is a 2-bit field that indicates how to interpret the remaining 30 bits of the second .pdata word. If *Flag* is 0, then the remaining bits form an *Exception Information RVA* (with the low two bits implicitly 0). If *Flag* is non-zero, then the remaining bits form a *Packed Unwind Data* structure.|
-|1|2-31|*Exception Information RVA* or *Packed Unwind Data*.
*Exception Information RVA* is the address of the variable-length exception information structure, stored in the .xdata section. This data must be 4-byte aligned.
*Packed Unwind Data* is a compressed description of the operations required to unwind from a function, assuming a canonical form. In this case, no .xdata record is required.|
+|0|0-31|*`Function Start RVA`* is the 32-bit RVA of the start of the function. If the function contains thumb code, the low bit of this address must be set.|
+|1|0-1|*`Flag`* is a 2-bit field that indicates how to interpret the remaining 30 bits of the second `.pdata` word. If *`Flag`* is 0, then the remaining bits form an *Exception Information RVA* (with the low two bits implicitly 0). If *`Flag`* is non-zero, then the remaining bits form a *Packed Unwind Data* structure.|
+|1|2-31|*Exception Information RVA* or *Packed Unwind Data*.
*Exception Information RVA* is the address of the variable-length exception information structure, stored in the `.xdata` section. This data must be 4-byte aligned.
*Packed Unwind Data* is a compressed description of the operations required to unwind from a function, assuming a canonical form. In this case, no `.xdata` record is required.|
### Packed Unwind Data
-For functions whose prologues and epilogues follow the canonical form described below, packed unwind data can be used. This eliminates the need for an .xdata record and significantly reduces the space required to provide unwind data. The canonical prologues and epilogues are designed to meet the common requirements of a simple function that does not require an exception handler, and performs its setup and teardown operations in a standard order.
+For functions whose prologues and epilogues follow the canonical form described below, packed unwind data can be used. It eliminates the need for an `.xdata` record and significantly reduces the space required to provide the unwind data. The canonical prologues and epilogues are designed to meet the common requirements of a simple function that doesn't require an exception handler, and performs its setup and teardown operations in a standard order.
-This table shows the format of a .pdata record that has packed unwind data:
+This table shows the format of a `.pdata` record that has packed unwind data:
-|Word Offset|Bits|Purpose|
-|-----------------|----------|-------------|
-|0|0-31|*Function Start RVA* is the 32-bit RVA of the start of the function. If the function contains thumb code, the low bit of this address must be set.|
-|1|0-1|*Flag* is a 2-bit field that has these meanings:
- 00 = packed unwind data not used; remaining bits point to .xdata record.
- 01 = packed unwind data.
- 10 = packed unwind data where the function is assumed to have no prologue. This is useful for describing function fragments that are discontiguous with the start of the function.
- 11 = reserved.|
-|1|2-12|*Function Length* is an 11-bit field that provides the length of the entire function in bytes divided by 2. If the function is larger than 4K bytes, a full .xdata record must be used instead.|
-|1|13-14|*Ret* is a 2-bit field that indicates how the function returns:
- 00 = return via pop {pc} (the *L* flag bit must be set to 1 in this case).
- 01 = return by using a 16-bit branch.
- 10 = return by using a 32-bit branch.
- 11 = no epilogue at all. This is useful for describing a discontiguous function fragment that may only contain a prologue, but whose epilogue is elsewhere.|
-|1|15|*H* is a 1-bit flag that indicates whether the function "homes" the integer parameter registers (r0-r3) by pushing them at the start of the function, and deallocates the 16 bytes of stack before returning. (0 = does not home registers, 1 = homes registers.)|
-|1|16-18|*Reg* is a 3-bit field that indicates the index of the last saved non-volatile register. If the *R* bit is 0, then only integer registers are being saved, and are assumed to be in the range of r4-rN, where N is equal to 4 + *Reg*. If the *R* bit is 1, then only floating-point registers are being saved, and are assumed to be in the range of d8-dN, where N is equal to 8 + *Reg*. The special combination of *R* = 1 and *Reg* = 7 indicates that no registers are saved.|
-|1|19|*R* is a 1-bit flag that indicates whether the saved non-volatile registers are integer registers (0) or floating-point registers (1). If *R* is set to 1 and the *Reg* field is set to 7, no non-volatile registers were pushed.|
-|1|20|*L* is a 1-bit flag that indicates whether the function saves/restores LR, along with other registers indicated by the *Reg* field. (0 = does not save/restore, 1 = does save/restore.)|
-|1|21|*C* is a 1-bit flag that indicates whether the function includes extra instructions to set up a frame chain for fast stack walking (1) or not (0). If this bit is set, r11 is implicitly added to the list of integer non-volatile registers saved. (See restrictions below if the *C* flag is used.)|
-|1|22-31|*Stack Adjust* is a 10-bit field that indicates the number of bytes of stack that are allocated for this function, divided by 4. However, only values between 0x000-0x3F3 can be directly encoded. Functions that allocate more than 4044 bytes of stack must use a full .xdata record. If the *Stack Adjust* field is 0x3F4 or larger, then the low 4 bits have special meaning:
- Bits 0-1 indicate the number of words of stack adjustment (1-4) minus 1.
- Bit 2 is set to 1 if the prologue combined this adjustment into its push operation.
- Bit 3 is set to 1 if the epilogue combined this adjustment into its pop operation.|
+| Word Offset | Bits | Purpose |
+|--|--|--|
+| 0 | 0-31 | *`Function Start RVA`* is the 32-bit RVA of the start of the function. If the function contains thumb code, the low bit of this address must be set. |
+| 1 | 0-1 | *`Flag`* is a 2-bit field that has these meanings:
- 00 = packed unwind data not used; remaining bits point to `.xdata` record.
- 01 = packed unwind data.
- 10 = packed unwind data where the function is assumed to have no prologue. This is useful for describing function fragments that are discontiguous with the start of the function.
- 11 = reserved. |
+| 1 | 2-12 | *`Function Length`* is an 11-bit field that provides the length of the entire function in bytes divided by 2. If the function is larger than 4K bytes, a full `.xdata` record must be used instead. |
+| 1 | 13-14 | *`Ret`* is a 2-bit field that indicates how the function returns:
- 00 = return via pop {pc} (the *`L`* flag bit must be set to 1 in this case).
- 01 = return by using a 16-bit branch.
- 10 = return by using a 32-bit branch.
- 11 = no epilogue at all. This is useful for describing a discontiguous function fragment that may only contain a prologue, but whose epilogue is elsewhere. |
+| 1 | 15 | *`H`* is a 1-bit flag that indicates whether the function "homes" the integer parameter registers (r0-r3) by pushing them at the start of the function, and deallocates the 16 bytes of stack before returning. (0 = doesn't home registers, 1 = homes registers.) |
+| 1 | 16-18 | *`Reg`* is a 3-bit field that indicates the index of the last saved non-volatile register. If the *`R`* bit is 0, then only integer registers are being saved, and are assumed to be in the range of r4-rN, where N is equal to 4 + *`Reg`*. If the *`R`* bit is 1, then only floating-point registers are being saved, and are assumed to be in the range of d8-dN, where N is equal to 8 + *`Reg`*. The special combination of *`R`* = 1 and *`Reg`* = 7 indicates that no registers are saved. |
+| 1 | 19 | *`R`* is a 1-bit flag that indicates whether the saved non-volatile registers are integer registers (0) or floating-point registers (1). If *`R`* is set to 1 and the *`Reg`* field is set to 7, no non-volatile registers were pushed. |
+| 1 | 20 | *`L`* is a 1-bit flag that indicates whether the function saves/restores LR, along with other registers indicated by the *`Reg`* field. (0 = doesn't save/restore, 1 = does save/restore.) |
+| 1 | 21 | *`C`* is a 1-bit flag that indicates whether the function includes extra instructions to set up a frame chain for fast stack walking (1) or not (0). If this bit is set, r11 is implicitly added to the list of integer non-volatile registers saved. (See restrictions below if the *`C`* flag is used.) |
+| 1 | 22-31 | *`Stack Adjust`* is a 10-bit field that indicates the number of bytes of stack that are allocated for this function, divided by 4. However, only values between 0x000-0x3F3 can be directly encoded. Functions that allocate more than 4044 bytes of stack must use a full `.xdata` record. If the *`Stack Adjust`* field is 0x3F4 or larger, then the low 4 bits have special meaning:
- Bits 0-1 indicate the number of words of stack adjustment (1-4) minus 1.
- Bit 2 is set to 1 if the prologue combined this adjustment into its push operation.
- Bit 3 is set to 1 if the epilogue combined this adjustment into its pop operation. |
Due to possible redundancies in the encodings above, these restrictions apply:
-- If the *C* flag is set to 1:
+- If the *`C`* flag is set to 1:
- - The *L* flag must also be set to 1, because frame chaining required both r11 and LR.
+ - The *`L`* flag must also be set to 1, because frame chaining requires both r11 and LR.
- - r11 must not be included in the set of registers described by *Reg*. That is, if r4-r11 are pushed, *Reg* should only describe r4-r10, because the *C* flag implies r11.
+ - r11 must not be included in the set of registers described by *`Reg`*. That is, if r4-r11 are pushed, *`Reg`* should only describe r4-r10, because the *`C`* flag implies r11.
-- If the *Ret* field is set to 0, the *L* flag must be set to 1.
+- If the *`Ret`* field is set to 0, the *`L`* flag must be set to 1.
Violating these restrictions causes an unsupported sequence.
-For purposes of the discussion below, two pseudo-flags are derived from *Stack Adjust*:
+For purposes of the discussion below, two pseudo-flags are derived from *`Stack Adjust`*:
-- *PF* or "prologue folding" indicates that *Stack Adjust* is 0x3F4 or larger and bit 2 is set.
+- *`PF`* or "prologue folding" indicates that *`Stack Adjust`* is 0x3F4 or larger and bit 2 is set.
-- *EF* or "epilogue folding" indicates that *Stack Adjust* is 0x3F4 or larger and bit 3 is set.
+- *`EF`* or "epilogue folding" indicates that *`Stack Adjust`* is 0x3F4 or larger and bit 3 is set.
Prologues for canonical functions may have up to 5 instructions (notice that 3a and 3b are mutually exclusive):
-|Instruction|Opcode is assumed present if:|Size|Opcode|Unwind Codes|
-|-----------------|-----------------------------------|----------|------------|------------------|
-|1|*H*==1|16|`push {r0-r3}`|04|
-|2|*C*==1 or *L*==1 or *R*==0 or PF==1|16/32|`push {registers}`|80-BF/D0-DF/EC-ED|
-|3a|*C*==1 and (*L*==0 and *R*==1 and PF==0)|16|`mov r11,sp`|C0-CF/FB|
-|3b|*C*==1 and (*L*==1 or *R*==0 or PF==1)|32|`add r11,sp,#xx`|FC|
-|4|*R*==1 and *Reg* != 7|32|`vpush {d8-dE}`|E0-E7|
-|5|*Stack Adjust* != 0 and PF==0|16/32|`sub sp,sp,#xx`|00-7F/E8-EB|
+| Instruction | Opcode is assumed present if: | Size | Opcode | Unwind Codes |
+|--|--|--|--|--|
+| 1 | *`H`*==1 | 16 | `push {r0-r3}` | 04 |
+| 2 | *`C`*==1 or *`L`*==1 or *`R`*==0 or *`PF`*==1 | 16/32 | `push {registers}` | 80-BF/D0-DF/EC-ED |
+| 3a | *`C`*==1 and (*`R`*==1 and *`PF`*==0) | 16 | `mov r11,sp` | FB |
+| 3b | *`C`*==1 and (*`R`*==0 or *`PF`*==1) | 32 | `add r11,sp,#xx` | FC |
+| 4 | *`R`*==1 and *`Reg`* != 7 | 32 | `vpush {d8-dE}` | E0-E7 |
+| 5 | *`Stack Adjust`* != 0 and *`PF`*==0 | 16/32 | `sub sp,sp,#xx` | 00-7F/E8-EB |
-Instruction 1 is always present if the *H* bit is set to 1.
+Instruction 1 is always present if the *`H`* bit is set to 1.
-To set up the frame chaining, either instruction 3a or 3b is present if the *C* bit is set. It is a 16-bit `mov` if no registers other than r11 and LR are pushed; otherwise, it is a 32-bit `add`.
+To set up the frame chaining, either instruction 3a or 3b is present if the *`C`* bit is set. It is a 16-bit `mov` if no registers other than r11 and LR are pushed; otherwise, it is a 32-bit `add`.
If a non-folded adjustment is specified, instruction 5 is the explicit stack adjustment.
-Instructions 2 and 4 are set based on whether a push is required. This table summarizes which registers are saved based on the *C*, *L*, *R*, and *PF* fields. In all cases, *N* is equal to *Reg* + 4, *E* is equal to *Reg* + 8, and *S* is equal to (~*Stack Adjust*) & 3.
-
-|C|L|R|PF|Integer Registers Pushed|VFP Registers pushed|
-|-------|-------|-------|--------|------------------------------|--------------------------|
-|0|0|0|0|r4-r*N*|none|
-|0|0|0|1|r*S*-r*N*|none|
-|0|0|1|0|none|d8-d*E*|
-|0|0|1|1|r*S*-r3|d8-d*E*|
-|0|1|0|0|r4-r*N*, LR|none|
-|0|1|0|1|r*S*-r*N*, LR|none|
-|0|1|1|0|LR|d8-d*E*|
-|0|1|1|1|r*S*-r3, LR|d8-d*E*|
-|1|0|0|0|r4-r*N*, r11|none|
-|1|0|0|1|r*S*-r*N*, r11|none|
-|1|0|1|0|r11|d8-d*E*|
-|1|0|1|1|r*S*-r3, r11|d8-d*E*|
-|1|1|0|0|r4-r*N*, r11, LR|none|
-|1|1|0|1|r*S*-r*N*, r11, LR|none|
-|1|1|1|0|r11, LR|d8-d*E*|
-|1|1|1|1|r*S*-r3, r11, LR|d8-d*E*|
+Instructions 2 and 4 are set based on whether a push is required. This table summarizes which registers are saved based on the *`C`*, *`L`*, *`R`*, and *`PF`* fields. In all cases, *`N`* is equal to *`Reg`* + 4, *`E`* is equal to *`Reg`* + 8, and *`S`* is equal to (~*`Stack Adjust`*) & 3.
+
+| C | L | R | PF | Integer Registers Pushed | VFP Registers pushed |
+|--|--|--|--|--|--|
+| 0 | 0 | 0 | 0 | r4 - r*`N`* | none |
+| 0 | 0 | 0 | 1 | r*`S`* - r*`N`* | none |
+| 0 | 0 | 1 | 0 | none | d8 - d*`E`* |
+| 0 | 0 | 1 | 1 | r*`S`* - r3 | d8 - d*`E`* |
+| 0 | 1 | 0 | 0 | r4 - r*`N`*, LR | none |
+| 0 | 1 | 0 | 1 | r*`S`* - r*`N`*, LR | none |
+| 0 | 1 | 1 | 0 | LR | d8 - d*`E`* |
+| 0 | 1 | 1 | 1 | r*`S`* - r3, LR | d8 - d*`E`* |
+| 1 | 0 | 0 | 0 | (invalid encoding) | (invalid encoding) |
+| 1 | 0 | 0 | 1 | (invalid encoding) | (invalid encoding) |
+| 1 | 0 | 1 | 0 | (invalid encoding) | (invalid encoding) |
+| 1 | 0 | 1 | 1 | (invalid encoding) | (invalid encoding) |
+| 1 | 1 | 0 | 0 | r4 - r*`N`*, r11, LR | none |
+| 1 | 1 | 0 | 1 | r*`S`* - r*`N`*, r11, LR | none |
+| 1 | 1 | 1 | 0 | r11, LR | d8 - d*`E`* |
+| 1 | 1 | 1 | 1 | r*`S`* - r3, r11, LR | d8 - d*`E`* |
The epilogues for canonical functions follow a similar form, but in reverse and with some additional options. The epilogue may be up to 5 instructions long, and its form is strictly dictated by the form of the prologue.
-|Instruction|Opcode is assumed present if:|Size|Opcode|
-|-----------------|-----------------------------------|----------|------------|
-|6|*Stack Adjust*!=0 and *EF*==0|16/32|`add sp,sp,#xx`|
-|7|*R*==1 and *Reg*!=7|32|`vpop {d8-dE}`|
-|8|*C*==1 or (*L*==1 and *H*==0) or *R*==0 or *EF*==1|16/32|`pop {registers}`|
-|9a|*H*==1 and *L*==0|16|`add sp,sp,#0x10`|
-|9b|*H*==1 and *L*==1|32|`ldr pc,[sp],#0x14`|
-|10a|*Ret*==1|16|`bx reg`|
-|10b|*Ret*==2|32|`b address`|
+| Instruction | Opcode is assumed present if: | Size | Opcode |
+|--|--|--|--|
+| 6 | *`Stack Adjust`*!=0 and *`EF`*==0 | 16/32 | `add sp,sp,#xx` |
+| 7 | *`R`*==1 and *`Reg`*!=7 | 32 | `vpop {d8-dE}` |
+| 8 | *`C`*==1 or (*`L`*==1 and (*`H`*==0 or *`Ret`* !=0)) or *`R`*==0 or *`EF`*==1 | 16/32 | `pop {registers}` |
+| 9a | *`H`*==1 and (*`L`*==0 or *`Ret`*!=0) | 16 | `add sp,sp,#0x10` |
+| 9b | *`H`*==1 and *`L`*==1 and *`Ret`*==0 | 32 | `ldr pc,[sp],#0x14` |
+| 10a | *`Ret`*==1 | 16 | `bx reg` |
+| 10b | *`Ret`*==2 | 32 | `b address` |
-Instruction 6 is the explicit stack adjustment if a non-folded adjustment is specified. Because *PF* is independent of *EF*, it is possible to have instruction 5 present without instruction 6, or vice-versa.
+Instruction 6 is the explicit stack adjustment if a non-folded adjustment is specified. Because *`PF`* is independent of *`EF`*, it is possible to have instruction 5 present without instruction 6, or vice-versa.
-Instructions 7 and 8 use the same logic as the prologue to determine which registers are restored from the stack, but with these two changes: first, *EF* is used in place of *PF*; second, if *Ret* = 0, then LR is replaced with PC in the register list and the epilogue ends immediately.
+Instructions 7 and 8 use the same logic as the prologue to determine which registers are restored from the stack, but with these three changes: first, *`EF`* is used in place of *`PF`*; second, if *`Ret`* = 0 and *`H`* = 0, then LR is replaced with PC in the register list and the epilogue ends immediately; third, if *`Ret`* = 0 and *`H`* = 1, then LR is omitted from the register list and popped by instruction 9b.
-If *H* is set, then either instruction 9a or 9b is present. Instruction 9a is used when *L* is 0, to indicate that the LR is not on the stack. In this case, the stack is manually adjusted and *Ret* must be 1 or 2 to specify an explicit return. Instruction 9b is used when *L* is 1, to indicate an early end to the epilogue, and to return and adjust the stack at the same time.
+If *`H`* is set, then either instruction 9a or 9b is present. Instruction 9a is used when *`Ret`* is nonzero, which also implies the presence of either 10a or 10b. If L=1, then LR was popped as part of instruction 8. Instruction 9b is used when *`L`* is 1 and *`Ret`* is zero, to indicate an early end to the epilogue, and to return and adjust the stack at the same time.
-If the epilogue has not already ended, then either instruction 10a or 10b is present, to indicate a 16-bit or 32-bit branch, based on the value of *Ret*.
+If the epilogue hasn't already ended, then either instruction 10a or 10b is present, to indicate a 16-bit or 32-bit branch, based on the value of *`Ret`*.
-### .xdata Records
+### `.xdata` Records
-When the packed unwind format is insufficient to describe the unwinding of a function, a variable-length .xdata record must be created. The address of this record is stored in the second word of the .pdata record. The format of the .xdata is a packed variable-length set of words that has four sections:
+When the packed unwind format is insufficient to describe the unwinding of a function, a variable-length `.xdata` record must be created. The address of this record is stored in the second word of the `.pdata` record. The format of the `.xdata` is a packed variable-length set of words that has four sections:
-1. A 1 or 2-word header that describes the overall size of the .xdata structure and provides key function data. The second word is only present if the *Epilogue Count* and *Code Words* fields are both set to 0. The fields are broken out in this table:
+1. A 1 or 2-word header that describes the overall size of the `.xdata` structure and provides key function data. The second word is only present if the *Epilogue Count* and *Code Words* fields are both set to 0. The fields are broken out in this table:
|Word|Bits|Purpose|
|----------|----------|-------------|
- |0|0-17|*Function Length* is an 18-bit field that indicates the total length of the function in bytes, divided by 2. If a function is larger than 512 KB, then multiple .pdata and .xdata records must be used to describe the function. For details, see the Large Functions section in this document.|
- |0|18-19|*Vers* is a 2-bit field that describes the version of the remaining xdata. Only version 0 is currently defined; values of 1-3 are reserved.|
+ |0|0-17|*`Function Length`* is an 18-bit field that indicates the total length of the function in bytes, divided by 2. If a function is larger than 512 KB, then multiple `.pdata` and `.xdata` records must be used to describe the function. For details, see the Large Functions section in this document.|
+ |0|18-19|*Vers* is a 2-bit field that describes the version of the remaining`.xdata`. Only version 0 is currently defined; values of 1-3 are reserved.|
|0|20|*X* is a 1-bit field that indicates the presence (1) or absence (0) of exception data.|
- |0|21|*E* is a 1-bit field that indicates that information that describes a single epilogue is packed into the header (1) rather than requiring additional scope words later (0).|
- |0|22|*F* is a 1-bit field that indicates that this record describes a function fragment (1) or a full function (0). A fragment implies that there is no prologue and that all prologue processing should be ignored.|
- |0|23-27|*Epilogue Count* is a 5-bit field that has two meanings, depending on the state of the *E* bit:
- If *E* is 0, this field is a count of the total number of exception scopes described in section 3. If more than 31 scopes exist in the function, then this field and the *Code Words* field must both be set to 0 to indicate that an extension word is required.
- If *E* is 1, this field specifies the index of the first unwind code that describes the only epilogue.|
+ |0|21|*`E`* is a 1-bit field that indicates that information that describes a single epilogue is packed into the header (1) rather than requiring additional scope words later (0).|
+ |0|22|*F* is a 1-bit field that indicates that this record describes a function fragment (1) or a full function (0). A fragment implies that there's no prologue and that all prologue processing should be ignored.|
+ |0|23-27|*Epilogue Count* is a 5-bit field that has two meanings, depending on the state of the *`E`* bit:
- If *`E`* is 0, this field is a count of the total number of epilogue scopes described in section 2. If more than 31 scopes exist in the function, then this field and the *Code Words* field must both be set to 0 to indicate that an extension word is required.
- If *`E`* is 1, this field specifies the index of the first unwind code that describes the only epilogue.|
|0|28-31|*Code Words* is a 4-bit field that specifies the number of 32-bit words required to contain all of the unwind codes in section 4. If more than 15 words are required for more than 63 unwind code bytes, this field and the *Epilogue Count* field must both be set to 0 to indicate that an extension word is required.|
|1|0-15|*Extended Epilogue Count* is a 16-bit field that provides more space for encoding an unusually large number of epilogues. The extension word that contains this field is only present if the *Epilogue Count* and *Code Words* fields in the first header word are both set to 0.|
|1|16-23|*Extended Code Words* is an 8-bit field that provides more space for encoding an unusually large number of unwind code words. The extension word that contains this field is only present if the *Epilogue Count* and *Code Words* fields in the first header word are both set to 0.|
|1|24-31|Reserved|
-1. After the exception data (if the *E* bit in the header was set to 0) is a list of information about epilogue scopes, which are packed one to a word and stored in order of increasing starting offset. Each scope contains these fields:
+1. After the exception data (if the *`E`* bit in the header was set to 0) is a list of information about epilogue scopes, which are packed one to a word and stored in order of increasing starting offset. Each scope contains these fields:
|Bits|Purpose|
|----------|-------------|
@@ -184,13 +185,13 @@ When the packed unwind format is insufficient to describe the unwinding of a fun
1. If the *X* field in the header is 1, the unwind code bytes are followed by the exception handler information. This consists of one *Exception Handler RVA* that contains the address of the exception handler, followed immediately by the (variable-length) amount of data required by the exception handler.
-The .xdata record is designed so that it is possible to fetch the first 8 bytes and compute the full size of the record, not including the length of the variable-sized exception data that follows. This code snippet computes the record size:
+The `.xdata` record is designed so that it is possible to fetch the first 8 bytes and compute the full size of the record, not including the length of the variable-sized exception data that follows. This code snippet computes the record size:
```cpp
-ULONG ComputeXdataSize(PULONG *Xdata)
+ULONG ComputeXdataSize(PULONG Xdata)
{
- ULONG EpilogueScopes;
ULONG Size;
+ ULONG EpilogueScopes;
ULONG UnwindWords;
if ((Xdata[0] >> 23) != 0) {
@@ -206,15 +207,18 @@ ULONG ComputeXdataSize(PULONG *Xdata)
if (!(Xdata[0] & (1 << 21))) {
Size += 4 * EpilogueScopes;
}
+
Size += 4 * UnwindWords;
+
if (Xdata[0] & (1 << 20)) {
- Size += 4;
+ Size += 4; // Exception handler RVA
}
+
return Size;
}
```
-Although the prologue and each epilogue has an index into the unwind codes, the table is shared between them. It is not uncommon that they can all share the same unwind codes. We recommend that compiler writers optimize for this case, because the largest index that can be specified is 255, and that limits the total number of unwind codes possible for a particular function.
+Although the prologue and each epilogue has an index into the unwind codes, the table is shared between them. It's not uncommon that they can all share the same unwind codes. We recommend that compiler writers optimize for this case, because the largest index that can be specified is 255, and that limits the total number of unwind codes possible for a particular function.
### Unwind Codes
@@ -230,32 +234,32 @@ If exceptions were guaranteed to only ever occur within a function body, and nev
The following table shows the mapping from unwind codes to opcodes. The most common codes are just one byte, while less common ones require two, three, or even four bytes. Each code is stored from most significant byte to least significant byte. The unwind code structure differs from the encoding described in the ARM EABI, because these unwind codes are designed to have a one-to-one mapping to the opcodes in the prologue and epilogue to allow for unwinding of partially executed prologues and epilogues.
-|Byte 1|Byte 2|Byte 3|Byte 4|Opsize|Explanation|
-|------------|------------|------------|------------|------------|-----------------|
-|00-7F||||16|`add sp,sp,#X`
where X is (Code & 0x7F) \* 4|
-|80-BF|00-FF|||32|`pop {r0-r12, lr}`
where LR is popped if Code & 0x2000 and r0-r12 are popped if the corresponding bit is set in Code & 0x1FFF|
-|C0-CF||||16|`mov sp,rX`
where X is Code & 0x0F|
-|D0-D7||||16|`pop {r4-rX,lr}`
where X is (Code & 0x03) + 4 and LR is popped if Code & 0x04|
-|D8-DF||||32|`pop {r4-rX,lr}`
where X is (Code & 0x03) + 8 and LR is popped if Code & 0x04|
-|E0-E7||||32|`vpop {d8-dX}`
where X is (Code & 0x07) + 8|
-|E8-EB|00-FF|||32|`addw sp,sp,#X`
where X is (Code & 0x03FF) \* 4|
-|EC-ED|00-FF|||16|`pop {r0-r7,lr}`
where LR is popped if Code & 0x0100 and r0-r7 are popped if the corresponding bit is set in Code & 0x00FF|
-|EE|00-0F|||16|Microsoft-specific|
-|EE|10-FF|||16|Available|
-|EF|00-0F|||32|`ldr lr,[sp],#X`
where X is (Code & 0x000F) \* 4|
-|EF|10-FF|||32|Available|
-|F0-F4||||-|Available|
-|F5|00-FF|||32|`vpop {dS-dE}`
where S is (Code & 0x00F0) >> 4 and E is Code & 0x000F|
-|F6|00-FF|||32|`vpop {dS-dE}`
where S is ((Code & 0x00F0) >> 4) + 16 and E is (Code & 0x000F) + 16|
-|F7|00-FF|00-FF||16|`add sp,sp,#X`
where X is (Code & 0x00FFFF) \* 4|
-|F8|00-FF|00-FF|00-FF|16|`add sp,sp,#X`
where X is (Code & 0x00FFFFFF) \* 4|
-|F9|00-FF|00-FF||32|`add sp,sp,#X`
where X is (Code & 0x00FFFF) \* 4|
-|FA|00-FF|00-FF|00-FF|32|`add sp,sp,#X`
where X is (Code & 0x00FFFFFF) \* 4|
-|FB||||16|nop (16-bit)|
-|FC||||32|nop (32-bit)|
-|FD||||16|end + 16-bit nop in epilogue|
-|FE||||32|end + 32-bit nop in epilogue|
-|FF||||-|end|
+| Byte 1 | Byte 2 | Byte 3 | Byte 4 | Opsize | Explanation |
+|--|--|--|--|--|--|
+| 00-7F | | | | 16 | `add sp,sp,#X`
where X is (Code & 0x7F) \* 4 |
+| 80-BF | 00-FF | | | 32 | `pop {r0-r12, lr}`
where LR is popped if Code & 0x2000 and r0-r12 are popped if the corresponding bit is set in Code & 0x1FFF |
+| C0-CF | | | | 16 | `mov sp,rX`
where X is Code & 0x0F |
+| D0-D7 | | | | 16 | `pop {r4-rX,lr}`
where X is (Code & 0x03) + 4 and LR is popped if Code & 0x04 |
+| D8-DF | | | | 32 | `pop {r4-rX,lr}`
where X is (Code & 0x03) + 8 and LR is popped if Code & 0x04 |
+| E0-E7 | | | | 32 | `vpop {d8-dX}`
where X is (Code & 0x07) + 8 |
+| E8-EB | 00-FF | | | 32 | `addw sp,sp,#X`
where X is (Code & 0x03FF) \* 4 |
+| EC-ED | 00-FF | | | 16 | `pop {r0-r7,lr}`
where LR is popped if Code & 0x0100 and r0-r7 are popped if the corresponding bit is set in Code & 0x00FF |
+| EE | 00-0F | | | 16 | Microsoft-specific |
+| EE | 10-FF | | | 16 | Available |
+| EF | 00-0F | | | 32 | `ldr lr,[sp],#X`
where X is (Code & 0x000F) \* 4 |
+| EF | 10-FF | | | 32 | Available |
+| F0-F4 | | | | - | Available |
+| F5 | 00-FF | | | 32 | `vpop {dS-dE}`
where S is (Code & 0x00F0) >> 4 and E is Code & 0x000F |
+| F6 | 00-FF | | | 32 | `vpop {dS-dE}`
where S is ((Code & 0x00F0) >> 4) + 16 and E is (Code & 0x000F) + 16 |
+| F7 | 00-FF | 00-FF | | 16 | `add sp,sp,#X`
where X is (Code & 0x00FFFF) \* 4 |
+| F8 | 00-FF | 00-FF | 00-FF | 16 | `add sp,sp,#X`
where X is (Code & 0x00FFFFFF) \* 4 |
+| F9 | 00-FF | 00-FF | | 32 | `add sp,sp,#X`
where X is (Code & 0x00FFFF) \* 4 |
+| FA | 00-FF | 00-FF | 00-FF | 32 | `add sp,sp,#X`
where X is (Code & 0x00FFFFFF) \* 4 |
+| FB | | | | 16 | nop (16-bit) |
+| FC | | | | 32 | nop (32-bit) |
+| FD | | | | 16 | end + 16-bit nop in epilogue |
+| FE | | | | 32 | end + 32-bit nop in epilogue |
+| FF | | | | - | end |
This shows the range of hexadecimal values for each byte in an unwind code *Code*, along with the opcode size *Opsize* and the corresponding original instruction interpretation. Empty cells indicate shorter unwind codes. In instructions that have large values covering multiple bytes, the most significant bits are stored first. The *Opsize* field shows the implicit opcode size associated with each Thumb-2 operation. The apparent duplicate entries in the table with different encodings are used to distinguish between different opcode sizes.
@@ -296,7 +300,7 @@ In the example, if an exception occurs while the function body between the prolo
Similar logic works in reverse for the prologue. If unwinding from offset 0 in the prologue, nothing has to be executed. If unwinding from one instruction in, the unwind sequence should start one unwind code from the end because prologue unwind codes are stored in reverse order. In the general case, if unwinding from instruction *n* in the prologue, unwinding should start executing at *n* unwind codes from the end of the list of codes.
-Prologue and epilogue unwind codes do not always match exactly. In that case, the unwind code array may have to contain several sequences of codes. To determine the offset to begin processing codes, use this logic:
+Prologue and epilogue unwind codes don't always match exactly. In that case, the unwind code array may have to contain several sequences of codes. To determine the offset to begin processing codes, use this logic:
1. If unwinding from within the body of the function, begin executing unwind codes at index 0 and continue until an end opcode is reached.
@@ -304,41 +308,41 @@ Prologue and epilogue unwind codes do not always match exactly. In that case, th
3. If unwinding from within the prologue, start from index 0 in the unwind codes. Calculate the length of the prologue code from the sequence, and then calculate how many bytes the PC is from the end of the prologue. Skip forward through the unwind codes until all of the unexecuted instructions are accounted for. Execute the unwind sequence starting at that point.
-The unwind codes for the prologue must always be the first in the array. They are also the codes used to unwind in the general case of unwinding from within the body. Any epilogue-specific code sequences should follow immediately after the prologue code sequence.
+The unwind codes for the prologue must always be the first in the array. they're also the codes used to unwind in the general case of unwinding from within the body. Any epilogue-specific code sequences should follow immediately after the prologue code sequence.
### Function Fragments
-For code optimization, it may be useful to split a function into discontiguous parts. When this is done, each function fragment requires its own separate .pdata—and possibly .xdata—record.
+For code optimization, it may be useful to split a function into discontiguous parts. When this is done, each function fragment requires its own separate `.pdata`—and possibly `.xdata`—record.
Assuming that the function prologue is at the beginning of the function and can't be split, there are four function fragment cases:
- Prologue only; all epilogues in other fragments.
-- Prologue and one or more epilogues; additional epilogues in other fragments.
+- Prologue and one or more epilogues; more epilogues in other fragments.
- No prologue or epilogues; prologue and one or more epilogues in other fragments.
-- Epilogues only; prologue and possibly additional epilogues in other fragments.
+- Epilogues only; prologue and possibly more epilogues in other fragments.
-In the first case, only the prologue must be described. This can be done in compact .pdata form by describing the prologue normally and specifying a *Ret* value of 3 to indicate no epilogue. In the full .xdata form, this can be done by providing the prologue unwind codes at index 0 as usual, and specifying an epilogue count of 0.
+In the first case, only the prologue must be described. This can be done in compact `.pdata` form by describing the prologue normally and specifying a *`Ret`* value of 3 to indicate no epilogue. In the full `.xdata` form, this can be done by providing the prologue unwind codes at index 0 as usual, and specifying an epilogue count of 0.
-The second case is just like a normal function. If there's only one epilogue in the fragment, and it is at the end of the fragment, then a compact .pdata record can be used. Otherwise, a full .xdata record must be used. Keep in mind that the offsets specified for the epilogue start are relative to the start of the fragment, not the original start of the function.
+The second case is just like a normal function. If there's only one epilogue in the fragment, and it is at the end of the fragment, then a compact `.pdata` record can be used. Otherwise, a full `.xdata` record must be used. Keep in mind that the offsets specified for the epilogue start are relative to the start of the fragment, not the original start of the function.
-The third and fourth cases are variants of the first and second cases, respectively, except they don't contain a prologue. In these situations, it is assumed that there is code before the start of the epilogue and it is considered part of the body of the function, which would normally be unwound by undoing the effects of the prologue. These cases must therefore be encoded with a pseudo-prologue, which describes how to unwind from within the body, but which is treated as 0-length when determining whether to perform a partial unwind at the start of the fragment. Alternatively, this pseudo-prologue may be described by using the same unwind codes as the epilogue because they presumably perform equivalent operations.
+The third and fourth cases are variants of the first and second cases, respectively, except they don't contain a prologue. In these situations, it is assumed that there's code before the start of the epilogue and it is considered part of the body of the function, which would normally be unwound by undoing the effects of the prologue. These cases must therefore be encoded with a pseudo-prologue, which describes how to unwind from within the body, but which is treated as 0-length when determining whether to perform a partial unwind at the start of the fragment. Alternatively, this pseudo-prologue may be described by using the same unwind codes as the epilogue because they presumably perform equivalent operations.
-In the third and fourth cases, the presence of a pseudo-prologue is specified either by setting the *Flag* field of the compact .pdata record to 2, or by setting the *F* flag in the .xdata header to 1. In either case, the check for a partial prologue unwind is ignored, and all non-epilogue unwinds are considered to be full.
+In the third and fourth cases, the presence of a pseudo-prologue is specified either by setting the *`Flag`* field of the compact `.pdata` record to 2, or by setting the *F* flag in the `.xdata` header to 1. In either case, the check for a partial prologue unwind is ignored, and all non-epilogue unwinds are considered to be full.
#### Large Functions
-Fragments can be used to describe functions larger than the 512 KB limit imposed by the bit fields in the .xdata header. To describe a very large function, just break it into fragments smaller than 512 KB. Each fragment should be adjusted so that it does not split an epilogue into multiple pieces.
+Fragments can be used to describe functions larger than the 512 KB limit imposed by the bit fields in the `.xdata` header. To describe a larger function, just break it into fragments smaller than 512 KB. Each fragment should be adjusted so it doesn't split an epilogue into multiple pieces.
-Only the first fragment of the function contains a prologue; all other fragments are marked as having no prologue. Depending on the number of epilogues, each fragment may contain zero or more epilogues. Keep in mind that each epilogue scope in a fragment specifies its starting offset relative to the start of the fragment, not the start of the function.
+Only the first fragment of the function contains a prologue. All other fragments are marked as having no prologue. Depending on the number of epilogues, each fragment may contain zero or more epilogues. Keep in mind that each epilogue scope in a fragment specifies its starting offset relative to the start of the fragment, not the start of the function.
-If a fragment has no prologue and no epilogue, it still requires its own .pdata—and possibly .xdata—record to describe how to unwind from within the body of the function.
+If a fragment has no prologue and no epilogue, it still requires its own `.pdata`—and possibly `.xdata`—record to describe how to unwind from within the body of the function.
#### Shrink-wrapping
-A more complex special case of function fragments is *shrink-wrapping*, a technique for deferring register saves from the start of the function to later in the function, to optimize for simple cases that don't require register saving. This can be described as an outer region that allocates the stack space but saves a minimal set of registers, and an inner region that saves and restores additional registers.
+A more complex special case of function fragments is called *shrink-wrapping*. It's a technique for deferring register saves from the start of the function to later in the function. It optimizes for simple cases that don't require register saving. This case has two parts: there's an outer region that allocates the stack space but saves a minimal set of registers, and an inner region that saves and restores other registers.
```asm
ShrinkWrappedFunction
@@ -354,19 +358,19 @@ ShrinkWrappedFunction
pop {r4, pc} ; C:
```
-Shrink-wrapped functions are typically expected to pre-allocate the space for the extra register saves in the regular prologue, and then perform the register saves by using `str` or `stm` instead of `push`. This keeps all stack-pointer manipulation in the function's original prologue.
+Shrink-wrapped functions are typically expected to pre-allocate the space for the extra register saves in the regular prologue, and then save the registers by using `str` or `stm` instead of `push`. This action keeps all stack-pointer manipulation in the function's original prologue.
-The example shrink-wrapped function must be broken into three regions, which are marked as A, B, and C in the comments. The first A region covers the start of the function through the end of the additional non-volatile saves. A .pdata or .xdata record must be constructed to describe this fragment as having a prologue and no epilogues.
+The example shrink-wrapped function must be broken into three regions, which are marked as `A`, `B`, and `C` in the comments. The first `A` region covers the start of the function through the end of the additional non-volatile saves. A `.pdata` or `.xdata` record must be constructed to describe this fragment as having a prologue and no epilogues.
-The middle B region gets its own .pdata or .xdata record that describes a fragment that has no prologue and no epilogue. However, the unwind codes for this region must still be present because it's considered a function body. The codes must describe a composite prologue that represents both the original registers saved in the region-A prologue and the additional registers saved before entering region B, as if they were produced by one sequence of operations.
+The middle `B` region gets its own `.pdata` or `.xdata` record that describes a fragment that has no prologue and no epilogue. However, the unwind codes for this region must still be present because it's considered a function body. The codes must describe a composite prologue that represents both the original registers saved in the region `A` prologue and the extra registers saved before entering region `B`, as if they were produced by one sequence of operations.
-The register saves for region B can't be considered as an "inner prologue" because the composite prologue described for region B must describe both the region-A prologue and the additional registers saved. If fragment B were described as having a prologue, the unwind codes would also imply the size of that prologue, and there is no way to describe the composite prologue in a way that maps one-to-one with the opcodes that only save the additional registers.
+The register saves for region `B` can't be considered as an "inner prologue" because the composite prologue described for region `B` must describe both the region `A` prologue and the additional registers saved. If fragment `B` had a prologue, the unwind codes would also imply the size of that prologue, and there's no way to describe the composite prologue in a way that maps one-to-one with the opcodes that only save the additional registers.
-The additional register saves must be considered part of region A, because until they are complete, the composite prologue does not accurately describe the state of the stack.
+The extra register saves must be considered part of region `A`, because until they're complete, the composite prologue doesn't accurately describe the state of the stack.
-The last C region gets its own .pdata or .xdata record, describing a fragment that has no prologue but does have an epilogue.
+The last `C` region gets its own `.pdata` or `.xdata` record, describing a fragment that has no prologue but does have an epilogue.
-An alternative approach can also work if the stack manipulation done before entering region B can be reduced to one instruction:
+An alternative approach can also work if the stack manipulation done before entering region `B` can be reduced to one instruction:
```asm
ShrinkWrappedFunction
@@ -380,25 +384,25 @@ ShrinkWrappedFunction
pop {r4, pc} ; C: restore non-volatile registers
```
-The key here is that on each instruction boundary, the stack is fully consistent with the unwind codes for the region. If an unwind occurs before the inner push in this example, it is considered part of region A, and only the region A prologue is unwound. If the unwind occurs after the inner push, it is considered part of region B, which has no prologue, but has unwind codes that describe both the inner push and the original prologue from region A. Similar logic holds for the inner pop.
+The key insight is that on each instruction boundary, the stack is fully consistent with the unwind codes for the region. If an unwind occurs before the inner push in this example, it's considered part of region `A`. Only the region `A` prologue is unwound. If the unwind occurs after the inner push, it's considered part of region `B`, which has no prologue. However, it has unwind codes that describe both the inner push and the original prologue from region `A`. Similar logic holds for the inner pop.
### Encoding Optimizations
-Due to the richness of the unwind codes and the ability to leverage compact and expanded forms of data, there are many opportunities to optimize the encoding to further reduce space. With aggressive use of these techniques, the net overhead of describing functions and fragments by using unwind codes can be quite minimal.
+The richness of the unwind codes, and the ability to make use of compact and expanded forms of data, provide many opportunities to optimize the encoding to further reduce space. With aggressive use of these techniques, the net overhead of describing functions and fragments by using unwind codes can be minimized.
-The most important optimization is to be careful not to confuse prologue/epilogue boundaries for unwinding purposes with logical prologue/epilogue boundaries from a compiler perspective. The unwinding boundaries can be shrunk and made tighter to improve efficiency. For example, a prologue may contain code after the stack setup to perform additional verification checks. But once all the stack manipulation is complete, there is no need to encode further operations, and anything beyond that can be removed from the unwinding prologue.
+The most important optimization idea: Don't confuse prologue and epilogue boundaries for unwinding purposes with logical prologue and epilogue boundaries from a compiler perspective. The unwinding boundaries can be shrunk and made tighter to improve efficiency. For example, a prologue may contain code after the stack setup to do verification checks. But once all the stack manipulation is complete, there's no need to encode further operations, and anything beyond that can be removed from the unwinding prologue.
-This same rule applies to the function length. If there is data—for example, a literal pool—that follows an epilogue in a function, it should not be included as part of the function length. By shrinking the function to just the code that is part of the function, the chances are much greater that the epilogue will be at the very end and a compact. pdata record can be used.
+This same rule applies to the function length. If there's data (such as a literal pool) that follows an epilogue in a function, it shouldn't be included as part of the function length. By shrinking the function to just the code that's part of the function, the chances are much greater that the epilogue is at the very end and a compact `.pdata` record can be used.
-In a prologue, once the stack pointer is saved to another register, there is typically no need to record any further opcodes. To unwind the function, the first thing that's done is to recover SP from the saved register, and so further operations do not have any impact on the unwind.
+In a prologue, once the stack pointer is saved to another register, there's typically no need to record any further opcodes. To unwind the function, the first thing that's done is to recover SP from the saved register. Further operations don't have any effect on the unwind.
-Single-instruction epilogues do not have to be encoded at all, either as scopes or as unwind codes. If an unwind takes place before that instruction is executed, then it can be assumed to be from within the body of the function, and just executing the prologue unwind codes is sufficient. If the unwind takes place after the single instruction is executed, then by definition it takes place in another region.
+Single-instruction epilogues don't have to be encoded at all, either as scopes or as unwind codes. If an unwind takes place before that instruction is executed, then it's safe to assume it's from within the body of the function. Just executing the prologue unwind codes is sufficient. When the unwind takes place after the single instruction is executed, then by definition it takes place in another region.
-Multi-instruction epilogues do not have to encode the first instruction of the epilogue, for the same reason as the previous point: if the unwind takes place before that instruction executes, a full prologue unwind is sufficient. If the unwind takes place after that instruction, then only the subsequent operations have to be considered.
+Multi-instruction epilogues don't have to encode the first instruction of the epilogue, for the same reason as the previous point: if the unwind takes place before that instruction executes, a full prologue unwind is sufficient. If the unwind takes place after that instruction, then only the later operations have to be considered.
-Unwind code re-use should be aggressive. The index specified by each epilogue scope points to an arbitrary starting point in the array of unwind codes. It does not have to point to the start of a previous sequence; it can point in the middle. The best approach here is to generate the desired code sequence and then scan for an exact byte match in the already-encoded pool of sequences and use any perfect match as a starting point for re-use.
+Unwind code reuse should be aggressive. The index each epilogue scope specifies points to an arbitrary starting point in the array of unwind codes. It doesn't have to point to the start of a previous sequence; it can point in the middle. The best approach is to generate the unwind code sequence. Then, scan for an exact byte match in the already-encoded pool of sequences. Use any perfect match as a starting point for reuse.
-If, after single-instruction epilogues are ignored, there are no remaining epilogues, consider using a compact .pdata form; it becomes much more likely in the absence of an epilogue.
+After single-instruction epilogues are ignored, if there are no remaining epilogues, consider using a compact `.pdata` form; it becomes much more likely in the absence of an epilogue.
## Examples
@@ -414,29 +418,29 @@ Epilogue:
00453658: 4770 bx lr
```
-.pdata (fixed, 2 words):
+`.pdata` (fixed, 2 words):
- Word 0
- - *Function Start RVA* = 0x000535F8 (= 0x004535F8-0x00400000)
+ - *`Function Start RVA`* = 0x000535F8 (= 0x004535F8-0x00400000)
- Word 1
- - *Flag* = 1, indicating canonical prologue and epilogue formats
+ - *`Flag`* = 1, indicating canonical prologue and epilogue formats
- - *Function Length* = 0x31 (= 0x62/2)
+ - *`Function Length`* = 0x31 (= 0x62/2)
- - *Ret* = 1, indicating a 16-bit branch return
+ - *`Ret`* = 1, indicating a 16-bit branch return
- - *H* = 0, indicating the parameters were not homed
+ - *`H`* = 0, indicating the parameters weren't homed
- - *R*=0 and *Reg* = 1, indicating push/pop of r4-r5
+ - *`R`* = 0 and *`Reg`* = 1, indicating push/pop of r4-r5
- - *L* = 0, indicating no LR save/restore
+ - *`L`* = 0, indicating no LR save/restore
- - *C* = 0, indicating no frame chaining
+ - *`C`* = 0, indicating no frame chaining
- - *Stack Adjust* = 0, indicating no stack adjustment
+ - *`Stack Adjust`* = 0, indicating no stack adjustment
### Example 2: Nested Function with Local Allocation
@@ -449,29 +453,29 @@ Epilogue:
00453414: BDF0 pop {r4-r7, pc}
```
-.pdata (fixed, 2 words):
+`.pdata` (fixed, 2 words):
- Word 0
- - *Function Start RVA* = 0x000533AC (= 0x004533AC -0x00400000)
+ - *`Function Start RVA`* = 0x000533AC (= 0x004533AC -0x00400000)
- Word 1
- - *Flag* = 1, indicating canonical prologue and epilogue formats
+ - *`Flag`* = 1, indicating canonical prologue and epilogue formats
- - *Function Length* = 0x35 (= 0x6A/2)
+ - *`Function Length`* = 0x35 (= 0x6A/2)
- - *Ret* = 0, indicating a pop {pc} return
+ - *`Ret`* = 0, indicating a pop {pc} return
- - *H* = 0, indicating the parameters were not homed
+ - *`H`* = 0, indicating the parameters weren't homed
- - *R*=0 and *Reg* = 3, indicating push/pop of r4-r7
+ - *`R`* = 0 and *`Reg`* = 3, indicating push/pop of r4-r7
- - *L* = 1, indicating LR was saved/restored
+ - *`L`* = 1, indicating LR was saved/restored
- - *C* = 0, indicating no frame chaining
+ - *`C`* = 0, indicating no frame chaining
- - *Stack Adjust* = 3 (= 0x0C/4)
+ - *`Stack Adjust`* = 3 (= 0x0C/4)
### Example 3: Nested Variadic Function
@@ -484,29 +488,29 @@ Epilogue:
004539D8: F85D FB14 ldr pc, [sp], #0x14
```
-.pdata (fixed, 2 words):
+`.pdata` (fixed, 2 words):
- Word 0
- - *Function Start RVA* = 0x00053988 (= 0x00453988-0x00400000)
+ - *`Function Start RVA`* = 0x00053988 (= 0x00453988-0x00400000)
- Word 1
- - *Flag* = 1, indicating canonical prologue and epilogue formats
+ - *`Flag`* = 1, indicating canonical prologue and epilogue formats
- - *Function Length* = 0x2A (= 0x54/2)
+ - *`Function Length`* = 0x2A (= 0x54/2)
- - *Ret* = 0, indicating a pop {pc}-style return (in this case an ldr pc,[sp],#0x14 return)
+ - *`Ret`* = 0, indicating a pop {pc}-style return (in this case an `ldr pc,[sp],#0x14` return)
- - *H* = 1, indicating the parameters were homed
+ - *`H`* = 1, indicating the parameters were homed
- - *R*=0 and *Reg* = 2, indicating push/pop of r4-r6
+ - *`R`* = 0 and *`Reg`* = 2, indicating push/pop of r4-r6
- - *L* = 1, indicating LR was saved/restored
+ - *`L`* = 1, indicating LR was saved/restored
- - *C* = 0, indicating no frame chaining
+ - *`C`* = 0, indicating no frame chaining
- - *Stack Adjust* = 0, indicating no stack adjustment
+ - *`Stack Adjust`* = 0, indicating no stack adjustment
### Example 4: Function with Multiple Epilogues
@@ -530,35 +534,35 @@ Epilogues:
00459636: F028 FF0F bl KeBugCheckEx ; end of function
```
-.pdata (fixed, 2 words):
+`.pdata` (fixed, 2 words):
- Word 0
- - *Function Start RVA* = 0x000592F4 (= 0x004592F4-0x00400000)
+ - *`Function Start RVA`* = 0x000592F4 (= 0x004592F4-0x00400000)
- Word 1
- - *Flag* = 0, indicating .xdata record present (required due to multiple epilogues)
+ - *`Flag`* = 0, indicating `.xdata` record present (required for multiple epilogues)
- - *.xdata address* - 0x00400000
+ - *`.xdata` address* - 0x00400000
-.xdata (variable, 6 words):
+`.xdata` (variable, 6 words):
- Word 0
- - *Function Length* = 0x0001A3 (= 0x000346/2)
+ - *`Function Length`* = 0x0001A3 (= 0x000346/2)
- - *Vers* = 0, indicating the first version of xdata
+ - *`Vers`* = 0, indicating the first version of`.xdata`
- - *X* = 0, indicating no exception data
+ - *`X`* = 0, indicating no exception data
- - *E* = 0, indicating a list of epilogue scopes
+ - *`E`* = 0, indicating a list of epilogue scopes
- - *F* = 0, indicating a full function description, including prologue
+ - *`F`* = 0, indicating a full function description, including prologue
- - *Epilogue Count* = 0x04, indicating the 4 total epilogue scopes
+ - *`Epilogue Count`* = 0x04, indicating the 4 total epilogue scopes
- - *Code Words* = 0x01, indicating one 32-bit word of unwind codes
+ - *`Code Words`* = 0x01, indicating one 32-bit word of unwind codes
- Words 1-4, describing 4 epilogue scopes at 4 locations. Each scope has a common set of unwind codes, shared with the prologue, at offset 0x00, and is unconditional, specifying condition 0x0E (always).
@@ -590,35 +594,35 @@ Epilogue:
00485E2A: F7FF BE7D b #0x485B28 ; end of function
```
-.pdata (fixed, 2 words):
+`.pdata` (fixed, 2 words):
- Word 0
- - *Function Start RVA* = 0x00085A20 (= 0x00485A20-0x00400000)
+ - *`Function Start RVA`* = 0x00085A20 (= 0x00485A20-0x00400000)
- Word 1
- - *Flag* = 0, indicating .xdata record present (needed due to multiple epilogues)
+ - *`Flag`* = 0, indicating `.xdata` record present (needed for multiple epilogues)
- - *.xdata address* - 0x00400000
+ - *`.xdata` address* - 0x00400000
-.xdata (variable, 3 words):
+`.xdata` (variable, 3 words):
- Word 0
- - *Function Length* = 0x0001A3 (= 0x000346/2)
+ - *`Function Length`* = 0x0001A3 (= 0x000346/2)
- - *Vers* = 0, indicating the first version of xdata
+ - *`Vers`* = 0, indicating the first version of`.xdata`
- - *X* = 0, indicating no exception data
+ - *`X`* = 0, indicating no exception data
- - *E* = 0, indicating a list of epilogue scopes
+ - *`E`* = 0, indicating a list of epilogue scopes
- - *F* = 0, indicating a full function description, including prologue
+ - *`F`* = 0, indicating a full function description, including prologue
- - *Epilogue Count* = 0x001, indicating the 1 total epilogue scope
+ - *`Epilogue Count`* = 0x001, indicating the 1 total epilogue scope
- - *Code Words* = 0x01, indicating one 32-bit word of unwind codes
+ - *`Code Words`* = 0x01, indicating one 32-bit word of unwind codes
- Word 1: Epilogue scope at offset 0xC6 (= 0x18C/2), starting unwind code index at 0x00, and with a condition of 0x0E (always)
@@ -648,35 +652,35 @@ Epilogue:
00488C70: BD90 pop {r4, r7, pc}
```
-.pdata (fixed, 2 words):
+`.pdata` (fixed, 2 words):
- Word 0
- - *Function Start RVA* = 0x00088C24 (= 0x00488C24-0x00400000)
+ - *`Function Start RVA`* = 0x00088C24 (= 0x00488C24-0x00400000)
- Word 1
- - *Flag* = 0, indicating .xdata record present (needed due to multiple epilogues)
+ - *`Flag`* = 0, indicating `.xdata` record present (needed for multiple epilogues)
- - *.xdata address* - 0x00400000
+ - *`.xdata` address* - 0x00400000
-.xdata (variable, 5 words):
+`.xdata` (variable, 5 words):
- Word 0
- - *Function Length* =0x000027 (= 0x00004E/2)
+ - *`Function Length`* =0x000027 (= 0x00004E/2)
- - *Vers* = 0, indicating the first version of xdata
+ - *`Vers`* = 0, indicating the first version of`.xdata`
- - *X* = 1, indicating exception data present
+ - *`X`* = 1, indicating exception data present
- - *E* = 1, indicating a single epilogue
+ - *`E`* = 1, indicating a single epilogue
- - *F* = 0, indicating a full function description, including prologue
+ - *`F`* = 0, indicating a full function description, including prologue
- - *Epilogue Count* = 0x00, indicating epilogue unwind codes start at offset 0x00
+ - *`Epilogue Count`* = 0x00, indicating epilogue unwind codes start at offset 0x00
- - *Code Words* = 0x02, indicating two 32-bit words of unwind codes
+ - *`Code Words`* = 0x02, indicating two 32-bit words of unwind codes
- Unwind codes, starting at Word 1:
@@ -688,7 +692,7 @@ Epilogue:
- Unwind code 4 = 0xFF: end
-- Word 3 specifies an exception handler = 0x0019A7ED (= 0x0059A7ED - 0x00400000)
+- Word 3 specifies an exception handler = 0x0019A7ED (= 0x0059A7ED - 0x00400000)
- Words 4 and beyond are inlined exception data
@@ -707,29 +711,29 @@ Function:
00488C86: BD00 pop {pc}
```
-.pdata (fixed, 2 words):
+`.pdata` (fixed, 2 words):
- Word 0
- - *Function Start RVA* = 0x00088C72 (= 0x00488C72-0x00400000)
+ - *`Function Start RVA`* = 0x00088C72 (= 0x00488C72-0x00400000)
- Word 1
- - *Flag* = 1, indicating canonical prologue and epilogue formats
+ - *`Flag`* = 1, indicating canonical prologue and epilogue formats
- - *Function Length* = 0x0B (= 0x16/2)
+ - *`Function Length`* = 0x0B (= 0x16/2)
- - *Ret* = 0, indicating a pop {pc} return
+ - *`Ret`* = 0, indicating a pop {pc} return
- - *H* = 0, indicating the parameters were not homed
+ - *`H`* = 0, indicating the parameters weren't homed
- - *R*=0 and *Reg* = 7, indicating no registers were saved/restored
+ - *`R`* = 0 and *`Reg`* = 7, indicating no registers were saved/restored
- - *L* = 1, indicating LR was saved/restored
+ - *`L`* = 1, indicating LR was saved/restored
- - *C* = 0, indicating no frame chaining
+ - *`C`* = 0, indicating no frame chaining
- - *Stack Adjust* = 1, indicating a 1 × 4 byte stack adjustment
+ - *`Stack Adjust`* = 1, indicating a 1 × 4 byte stack adjustment
## See also
diff --git a/docs/build/arm64-exception-handling.md b/docs/build/arm64-exception-handling.md
index eb2a10798b..9bad5d2883 100644
--- a/docs/build/arm64-exception-handling.md
+++ b/docs/build/arm64-exception-handling.md
@@ -1,55 +1,55 @@
---
title: "ARM64 exception handling"
description: Describes the exception handling conventions and data used by windows on ARM64.
-ms.date: "11/19/2018"
+ms.date: 01/13/2023
---
# ARM64 exception handling
-Windows on ARM64 uses the same structured exception handling mechanism for asynchronous hardware-generated exceptions and synchronous software-generated exceptions. Language-specific exception handlers are built on top of Windows structured exception handling by using language helper functions. This document describes exception handling in Windows on ARM64, and the language helpers used by code that's generated by the Microsoft ARM assembler and the MSVC compiler.
+Windows on ARM64 uses the same structured exception handling mechanism for asynchronous hardware-generated exceptions and synchronous software-generated exceptions. Language-specific exception handlers are built on top of Windows structured exception handling by using language helper functions. This document describes exception handling in Windows on ARM64. It illustrates the language helpers used by code that's generated by the Microsoft ARM assembler and the MSVC compiler.
## Goals and motivation
The exception unwinding data conventions, and this description, are intended to:
-1. Provide enough description to allow unwinding without code probing in all cases.
+- Provide enough description to allow unwinding without code probing in all cases.
- - Analyzing the code requires the code to be paged in. This prevents unwinding in some circumstances where it's useful (tracing, sampling, debugging).
+ - Analyzing the code requires the code to be paged in. It prevents unwinding in some circumstances where it's useful (tracing, sampling, debugging).
- - Analyzing the code is complex; the compiler must be careful to only generate instructions that the unwinder can decode.
+ - Analyzing the code is complex; the compiler must be careful to only generate instructions that the unwinder can decode.
- - If unwinding can't be fully described through the use of unwind codes, then in some cases it must fall back to instruction decoding. This increases the overall complexity, and ideally should be avoided.
+ - If unwinding can't be fully described by using unwind codes, then in some cases it must fall back to instruction decoding. Instruction decoding increases the overall complexity, and ideally should be avoided.
-1. Support unwinding in mid-prolog and mid-epilog.
+- Support unwinding in mid-prolog and mid-epilog.
- - Unwinding is used in Windows for more than exception handling. It's critical that code can unwind accurately even when in the middle of a prolog or epilog code sequence.
+ - Unwinding is used in Windows for more than exception handling. It's critical that code can unwind accurately even when in the middle of a prolog or epilog code sequence.
-1. Take up a minimal amount of space.
+- Take up a minimal amount of space.
- - The unwind codes must not aggregate to significantly increase the binary size.
+ - The unwind codes must not aggregate to significantly increase the binary size.
- - Since the unwind codes are likely to be locked in memory, a small footprint ensures a minimal overhead for each loaded binary.
+ - Since the unwind codes are likely to be locked in memory, a small footprint ensures a minimal overhead for each loaded binary.
## Assumptions
These assumptions are made in the exception handling description:
-1. Prologs and epilogs tend to mirror each other. By taking advantage of this common trait, the size of the metadata needed to describe unwinding can be greatly reduced. Within the body of the function, it doesn't matter whether the prolog's operations are undone, or the epilog's operations are done in a forward manner. Both should produce identical results.
+- Prologs and epilogs tend to mirror each other. By taking advantage of this common trait, the size of the metadata needed to describe unwinding can be greatly reduced. Within the body of the function, it doesn't matter whether the prolog's operations are undone, or the epilog's operations are done in a forward manner. Both should produce identical results.
-1. Functions tend on the whole to be relatively small. Several optimizations for space rely on this fact to achieve the most efficient packing of data.
+- Functions tend on the whole to be relatively small. Several optimizations for space rely on this fact to achieve the most efficient packing of data.
-1. There's no conditional code in epilogs.
+- There's no conditional code in epilogs.
-1. Dedicated frame pointer register: If the sp is saved in another register (x29) in the prolog, that register remains untouched throughout the function. It means the original sp may be recovered at any time.
+- Dedicated frame pointer register: If the `sp` is saved in another register (`x29`) in the prolog, that register remains untouched throughout the function. It means the original `sp` may be recovered at any time.
-1. Unless the sp is saved in another register, all manipulation of the stack pointer occurs strictly within the prolog and epilog.
+- Unless the `sp` is saved in another register, all manipulation of the stack pointer occurs strictly within the prolog and epilog.
-1. The stack frame layout is organized as described in the next section.
+- The stack frame layout is organized as described in the next section.
## ARM64 stack frame layout
-
+
-For frame chained functions, the fp and lr pair can be saved at any position in the local variable area, depending on optimization considerations. The goal is to maximize the number of locals that can be reached by a single instruction based on the frame pointer (x29) or stack pointer (sp). However, for `alloca` functions, it must be chained, and x29 must point to the bottom of stack. To allow for better register-pair-addressing-mode coverage, nonvolatile register save areas are positioned at the top of the Local area stack. Here are examples that illustrate several of the most efficient prolog sequences. For the sake of clarity and better cache locality, the order of storing callee-saved registers in all canonical prologs is in "growing up" order. `#framesz` below represents the size of entire stack (excluding alloca area). `#localsz` and `#outsz` denote local area size (including the save area for the \ pair) and outgoing parameter size, respectively.
+For frame chained functions, the `fp` and `lr` pair can be saved at any position in the local variable area, depending on optimization considerations. The goal is to maximize the number of locals that can be reached by a single instruction based on the frame pointer (`x29`) or stack pointer (`sp`). However, for `alloca` functions, it must be chained, and `x29` must point to the bottom of stack. To allow for better register-pair-addressing-mode coverage, nonvolatile register save areas are positioned at the top of the Local area stack. Here are examples that illustrate several of the most efficient prolog sequences. For the sake of clarity and better cache locality, the order of storing callee-saved registers in all canonical prologs is in "growing up" order. `#framesz` below represents the size of entire stack (excluding `alloca` area). `#localsz` and `#outsz` denote local area size (including the save area for the `` pair) and outgoing parameter size, respectively.
1. Chained, #localsz \<= 512
@@ -59,7 +59,7 @@ For frame chained functions, the fp and lr pair can be saved at any position in
stp x0,x1,[sp,#32] // home params (optional)
stp x2,x3,[sp,#48]
stp x4,x5,[sp,#64]
- stp x6,x7,[sp,#72]
+ stp x6,x7,[sp,#82]
stp x29,lr,[sp,#-localsz]! // save at bottom of local area
mov x29,sp // x29 points to bottom of local
sub sp,sp,#outsz // (optional for #outsz != 0)
@@ -73,13 +73,13 @@ For frame chained functions, the fp and lr pair can be saved at any position in
stp x0,x1,[sp,#32] // home params (optional)
stp x2,x3,[sp,#48]
stp x4,x5,[sp,#64]
- stp x6,x7,[sp,#72]
+ stp x6,x7,[sp,#82]
sub sp,sp,#(localsz+outsz) // allocate remaining frame
stp x29,lr,[sp,#outsz] // save at bottom of local area
add x29,sp,#outsz // setup x29 points to bottom of local area
```
-1. Unchained, leaf functions (lr unsaved)
+1. Unchained, leaf functions (`lr` unsaved)
```asm
stp x19,x20,[sp,#-80]! // pre-indexed, save in 1st FP/INT reg-pair
@@ -90,9 +90,9 @@ For frame chained functions, the fp and lr pair can be saved at any position in
sub sp,sp,#(framesz-80) // allocate the remaining local area
```
- All locals are accessed based on SP. \ points to the previous frame. For frame size \<= 512, the "sub sp, ..." can be optimized away if the regs saved area is moved to the bottom of stack. The downside is that it's not consistent with other layouts above, and saved regs take part of the range for pair-regs and pre- and post-indexed offset addressing mode.
+ All locals are accessed based on `sp`. `` points to the previous frame. For frame size \<= 512, the `sub sp, ...` can be optimized away if the regs saved area is moved to the bottom of stack. The downside is that it's not consistent with other layouts above. And, saved regs take part of the range for pair-regs and pre- and post-indexed offset addressing mode.
-1. Unchained, non-leaf functions (lr is saved in Int saved area)
+1. Unchained, non-leaf functions (saves `lr` in Int saved area)
```asm
stp x19,x20,[sp,#-80]! // pre-indexed, save in 1st FP/INT reg-pair
@@ -114,7 +114,7 @@ For frame chained functions, the fp and lr pair can be saved at any position in
sub sp,sp,#(framesz-80) // allocate the remaining local area
```
- Only x19 saved:
+ Only `x19` saved:
```asm
sub sp,sp,#16 // reg save area allocation*
@@ -122,9 +122,9 @@ For frame chained functions, the fp and lr pair can be saved at any position in
sub sp,sp,#(framesz-16) // allocate the remaining local area
```
- \* The reg save area allocation isn't folded into the stp because a pre-indexed reg-lr stp can't be represented with the unwind codes.
+ \* The reg save area allocation isn't folded into the `stp` because a pre-indexed reg-lr `stp` can't be represented with the unwind codes.
- All locals are accessed based on SP. \ points to the previous frame.
+ All locals are accessed based on `sp`. `` points to the previous frame.
1. Chained, #framesz \<= 512, #outsz = 0
@@ -135,9 +135,9 @@ For frame chained functions, the fp and lr pair can be saved at any position in
stp d8,d9,[sp,#(framesz-16)] // save FP pair
```
- Compared to the first prolog example above, the advantage here is that all register save instructions are ready to execute after only one stack allocation instruction. That means there's no anti-dependence on sp that prevents instruction level parallelism.
+ Compared to the first prolog example above, this example has an advantage: all register save instructions are ready to execute after only one stack allocation instruction. That means there's no anti-dependence on `sp` that prevents instruction level parallelism.
-1. Chained, frame size > 512 (optional for functions without alloca)
+1. Chained, frame size > 512 (optional for functions without `alloca`)
```asm
stp x29,lr,[sp,#-80]! // pre-indexed, save
@@ -149,7 +149,7 @@ For frame chained functions, the fp and lr pair can be saved at any position in
sub sp,sp,#(framesz-80) // allocate the remaining local area
```
- For optimization purpose, x29 can be put at any position in local area to provide a better coverage for "reg-pair" and pre-/post-indexed offset addressing mode. Locals below frame pointers can be accessed based on SP.
+ For optimization purpose, `x29` can be put at any position in local area to provide a better coverage for "reg-pair" and pre-/post-indexed offset addressing mode. Locals below frame pointers can be accessed based on `sp`.
1. Chained, frame size > 4K, with or without alloca(),
@@ -176,41 +176,41 @@ For frame chained functions, the fp and lr pair can be saved at any position in
## ARM64 exception handling information
-### .pdata records
+### `.pdata` records
-The .pdata records are an ordered array of fixed-length items that describe every stack-manipulating function in a PE binary. The phrase "stack-manipulating" is significant: leaf functions that don't require any local storage, and don't need to save/restore non-volatile registers, do not require a .pdata record. These records should be explicitly omitted to save space. An unwind from one of these functions can get the return address directly from LR to move up to the caller.
+The `.pdata` records are an ordered array of fixed-length items that describe every stack-manipulating function in a PE binary. The phrase "stack-manipulating" is significant: leaf functions that don't require any local storage, and don't need to save/restore non-volatile registers, don't require a `.pdata` record. These records should be explicitly omitted to save space. An unwind from one of these functions can get the return address directly from `lr` to move up to the caller.
-Each .pdata record for ARM64 is 8 bytes in length. The general format of each record places the 32-bit RVA of the function start in the first word, followed by a second word that contains either a pointer to a variable-length .xdata block, or a packed word describing a canonical function unwinding sequence.
+Each `.pdata` record for ARM64 is 8 bytes in length. The general format of each record places the 32-bit RVA of the function start in the first word, followed by a second word that contains either a pointer to a variable-length `.xdata` block, or a packed word describing a canonical function unwinding sequence.
-
+
The fields are as follows:
- **Function Start RVA** is the 32-bit RVA of the start of the function.
-- **Flag** is a 2-bit field that indicates how to interpret the remaining 30 bits of the second .pdata word. If **Flag** is 0, then the remaining bits form an **Exception Information RVA** (with the two lowest bits implicitly 0). If **Flag** is non-zero, then the remaining bits form a **Packed Unwind Data** structure.
+- **Flag** is a 2-bit field that indicates how to interpret the remaining 30 bits of the second `.pdata` word. If **Flag** is 0, then the remaining bits form an **Exception Information RVA** (with the two lowest bits implicitly 0). If **Flag** is non-zero, then the remaining bits form a **Packed Unwind Data** structure.
-- **Exception Information RVA** is the address of the variable-length exception information structure, stored in the .xdata section. This data must be 4-byte aligned.
+- **Exception Information RVA** is the address of the variable-length exception information structure, stored in the `.xdata` section. This data must be 4-byte aligned.
-- **Packed Unwind Data** is a compressed description of the operations needed to unwind from a function, assuming a canonical form. In this case, no .xdata record is required.
+- **Packed Unwind Data** is a compressed description of the operations needed to unwind from a function, assuming a canonical form. In this case, no `.xdata` record is required.
-### .xdata records
+### `.xdata` records
-When the packed unwind format is insufficient to describe the unwinding of a function, a variable-length .xdata record must be created. The address of this record is stored in the second word of the .pdata record. The format of the .xdata is a packed variable-length set of words:
+When the packed unwind format is insufficient to describe the unwinding of a function, a variable-length `.xdata` record must be created. The address of this record is stored in the second word of the `.pdata` record. The format of the `.xdata` is a packed variable-length set of words:
-
+
This data is broken into four sections:
-1. A 1 or 2-word header describing the overall size of the structure and providing key function data. The second word is only present if both the **Epilog Count** and **Code Words** fields are set to 0. The header has these bit fields:
+1. A 1-word or 2-word header describing the overall size of the structure and providing key function data. The second word is only present if both the **Epilog Count** and **Code Words** fields are set to 0. The header has these bit fields:
- a. **Function Length** is an 18-bit field. It indicates the total length of the function in bytes, divided by 4. If a function is larger than 1M, then multiple .pdata and .xdata records must be used to describe the function. For more information, see the [Large functions](#large-functions) section.
+ a. **Function Length** is an 18-bit field. It indicates the total length of the function in bytes, divided by 4. If a function is larger than 1M, then multiple `.pdata` and `.xdata` records must be used to describe the function. For more information, see the [Large functions](#large-functions) section.
- b. **Vers** is a 2-bit field. It describes the version of the remaining .xdata. Currently, only version 0 is defined, so values of 1-3 aren't permitted.
+ b. **Vers** is a 2-bit field. It describes the version of the remaining `.xdata`. Currently, only version 0 is defined, so values of 1-3 aren't permitted.
c. **X** is a 1-bit field. It indicates the presence (1) or absence (0) of exception data.
- d. **E** is a 1-bit field. It indicates that information describing a single epilog is packed into the header (1) rather than requiring additional scope words later (0).
+ d. **E** is a 1-bit field. It indicates that information describing a single epilog is packed into the header (1) rather than requiring more scope words later (0).
e. **Epilog Count** is a 5-bit field that has two meanings, depending on the state of **E** bit:
@@ -218,11 +218,11 @@ This data is broken into four sections:
2. If **E** is 1, then this field specifies the index of the first unwind code that describes the one and only epilog.
- f. **Code Words** is a 5-bit field that specifies the number of 32-bit words needed to contain all of the unwind codes in section 3. If more than 31 words are required (that is, if there are more than 124 unwind code bytes), then this field must be 0 to indicate that an extension word is required.
+ f. **Code Words** is a 5-bit field that specifies the number of 32-bit words needed to contain all of the unwind codes in section 3. If more than 31 words (that is, 124 unwind codes) are required, then this field must be 0 to indicate that an extension word is required.
g. **Extended Epilog Count** and **Extended Code Words** are 16-bit and 8-bit fields, respectively. They provide more space for encoding an unusually large number of epilogs, or an unusually large number of unwind code words. The extension word that contains these fields is only present if both the **Epilog Count** and **Code Words** fields in the first header word are 0.
-1. If **Epilog Count** isn't zero, a list of information about epilog scopes, packed one to a word, comes after the header and optional extended header. They're stored in order of increasing starting offset. Each scope contains the following bits:
+1. If the count of epilogs isn't zero, a list of information about epilog scopes, packed one to a word, comes after the header and optional extended header. They're stored in order of increasing starting offset. Each scope contains the following bits:
a. **Epilog Start Offset** is an 18-bit field that has the offset in bytes, divided by 4, of the epilog relative to the start of the function.
@@ -230,158 +230,184 @@ This data is broken into four sections:
c. **Epilog Start Index** is a 10-bit field (2 more bits than **Extended Code Words**). It indicates the byte index of the first unwind code that describes this epilog.
-1. After the list of epilog scopes comes an array of bytes that contain unwind codes, described in detail in a later section. This array is padded at the end to the nearest full word boundary. Unwind codes are written to this array. They start with the one closest to the body of the function, and move towards the edges of the function. The bytes for each unwind code are stored in big-endian order so they can be fetched directly, starting with the most significant byte first, which identifies the operation and the length of the rest of the code.
+1. After the list of epilog scopes comes an array of bytes that contain unwind codes, described in detail in a later section. This array is padded at the end to the nearest full word boundary. Unwind codes are written to this array. They start with the one closest to the body of the function, and move towards the edges of the function. The bytes for each unwind code are stored in big-endian order so the most significant byte gets fetched first, which identifies the operation and the length of the rest of the code.
1. Finally, after the unwind code bytes, if the **X** bit in the header was set to 1, comes the exception handler information. It consists of a single **Exception Handler RVA** that provides the address of the exception handler itself. It's followed immediately by a variable-length amount of data required by the exception handler.
-The .xdata record is designed so it's possible to fetch the first 8 bytes, and use them to compute the full size of the record, minus the length of the variable-sized exception data that follows. The following code snippet computes the record size:
+The `.xdata` record is designed so it's possible to fetch the first 8 bytes, and use them to compute the full size of the record, minus the length of the variable-sized exception data that follows. The following code snippet computes the record size:
```cpp
-ULONG ComputeXdataSize(PULONG *Xdata)
+ULONG ComputeXdataSize(PULONG Xdata)
{
- ULONG EpilogScopes;
ULONG Size;
+ ULONG EpilogScopes;
ULONG UnwindWords;
- if ((Xdata[0] >> 27) != 0) {
+ if ((Xdata[0] >> 22) != 0) {
Size = 4;
EpilogScopes = (Xdata[0] >> 22) & 0x1f;
- UnwindWords = (Xdata[0] >> 27) & 0x0f;
+ UnwindWords = (Xdata[0] >> 27) & 0x1f;
} else {
Size = 8;
EpilogScopes = Xdata[1] & 0xffff;
UnwindWords = (Xdata[1] >> 16) & 0xff;
}
- Size += 4 * EpilogScopes;
+ if (!(Xdata[0] & (1 << 21))) {
+ Size += 4 * EpilogScopes;
+ }
+
Size += 4 * UnwindWords;
+
if (Xdata[0] & (1 << 20)) {
- Size += 4; // exception handler RVA
+ Size += 4; // Exception handler RVA
}
+
return Size;
}
```
-Although the prolog and each epilog has its own index into the unwind codes, the table is shared between them. It's entirely possible (and not altogether uncommon) that they can all share the same codes. (For an example, see Example 2 in the [Examples](#examples) section.) Compiler writers should optimize for this case, in particular, because the largest index that can be specified is 255, which limits the total number of unwind codes for a particular function.
+Although the prolog and each epilog has its own index into the unwind codes, the table is shared between them. It's entirely possible (and not altogether uncommon) that they can all share the same codes. (For an example, see Example 2 in the [Examples](#examples) section.) Compiler writers should optimize for this case in particular. It's because the largest index that can be specified is 255, which limits the total number of unwind codes for a particular function.
### Unwind codes
-The array of unwind codes is pool of sequences that describe exactly how to undo the effects of the prolog, stored in the same order the operations need to be undone. The unwind codes can be thought of as a small instruction set, encoded as a string of bytes. When execution is complete, the return address to the calling function is in the lr register. And, all non-volatile registers are restored to their values at the time the function was called.
+The array of unwind codes is a pool of sequences that describe exactly how to undo the effects of the prolog. They're stored in the same order the operations need to be undone. The unwind codes can be thought of as a small instruction set, encoded as a string of bytes. When execution is complete, the return address to the calling function is in the `lr` register. And, all non-volatile registers are restored to their values at the time the function was called.
If exceptions were guaranteed to only ever occur within a function body, and never within a prolog or any epilog, then only a single sequence would be necessary. However, the Windows unwinding model requires that code can unwind from within a partially executed prolog or epilog. To meet this requirement, the unwind codes have been carefully designed so they unambiguously map 1:1 to each relevant opcode in the prolog and epilog. This design has several implications:
-1. By counting the number of unwind codes, it's possible to compute the length of the prolog and epilog.
-
-1. By counting the number of instructions past the start of an epilog scope, it's possible to skip the equivalent number of unwind codes. Then we can execute the rest of a sequence to complete the partially executed unwind done by the epilog.
-
-1. By counting the number of instructions before the end of the prolog, it's possible to skip the equivalent number of unwind codes. Then we can execute the rest of the sequence to undo only those parts of the prolog that have completed execution.
-
-The unwind codes are encoded according to the table below. All unwind codes are a single/double byte, except the one that allocates a huge stack. Totally there are 21 unwind code. Each unwind code maps exactly one instruction in the prolog/epilog, to allow for unwinding of partially executed prologs and epilogs.
-
-|Unwind code|Bits and interpretation|
-|-|-|
-|`alloc_s`|000xxxxx: allocate small stack with size \< 512 (2^5 * 16).|
-|`save_r19r20_x`| 001zzzzz: save \ pair at `[sp-#Z*8]!`, pre-indexed offset >= -248 |
-|`save_fplr`| 01zzzzzz: save \ pair at `[sp+#Z*8]`, offset \<= 504. |
-|`save_fplr_x`| 10zzzzzz: save \ pair at `[sp-(#Z+1)*8]!`, pre-indexed offset >= -512 |
-|`alloc_m`| 11000xxx'xxxxxxxx: allocate large stack with size \< 16k (2^11 * 16). |
-|`save_regp`| 110010xx'xxzzzzzz: save x(19+#X) pair at `[sp+#Z*8]`, offset \<= 504 |
-|`save_regp_x`| 110011xx'xxzzzzzz: save pair x(19+#X) at `[sp-(#Z+1)*8]!`, pre-indexed offset >= -512 |
-|`save_reg`| 110100xx'xxzzzzzz: save reg x(19+#X) at `[sp+#Z*8]`, offset \<= 504 |
-|`save_reg_x`| 1101010x'xxxzzzzz: save reg x(19+#X) at `[sp-(#Z+1)*8]!`, pre-indexed offset >= -256 |
-|`save_lrpair`| 1101011x'xxzzzzzz: save pair \ at `[sp+#Z*8]`, offset \<= 504 |
-|`save_fregp`| 1101100x'xxzzzzzz: save pair d(8+#X) at `[sp+#Z*8]`, offset \<= 504 |
-|`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_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 |
-| | 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 |
-| | 11101010: Custom stack for MSFT_OP_CONTEXT |
-| | 11101100: Custom stack for MSFT_OP_CLEAR_UNWOUND_TO_CALL |
-| | 1111xxxx: reserved |
-
-In instructions with large values covering multiple bytes, the most significant bits are stored first. This design makes it possible to find the total size in bytes of the unwind code by looking up only the first byte of the code. Since each unwind code is exactly mapped to an instruction in a prolog or epilog, you can compute the size of the prolog or epilog. You can walk from the start of the sequence to the end, and use a lookup table or similar device to determine how long the corresponding opcode is.
-
-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.
-
-Since the size of regular return and jump instructions are the same, there's no need of a separated `end` unwind code for tail-call scenarios.
-
-`end_c` is designed to handle noncontiguous function fragments for optimization purposes. An `end_c` that indicates the end of unwind codes in the current scope must be followed by another series of unwind code ended with a real `end`. The unwind codes between `end_c` and `end` represent the prolog operations in the parent region ("phantom" prolog). More details and examples are described in the section below.
+- By counting the number of unwind codes, it's possible to compute the length of the prolog and epilog.
+
+- By counting the number of instructions past the start of an epilog scope, it's possible to skip the equivalent number of unwind codes. We can execute the rest of a sequence to complete the partially executed unwind done by the epilog.
+
+- By counting the number of instructions before the end of the prolog, it's possible to skip the equivalent number of unwind codes. We can execute the rest of the sequence to undo only those parts of the prolog that have completed execution.
+
+The unwind codes are encoded according to the table below. All unwind codes are a single/double byte, except the one that allocates a huge stack (`alloc_l`). There are 22 unwind codes in total. Each unwind code maps exactly one instruction in the prolog/epilog, to allow for unwinding of partially executed prologs and epilogs.
+
+| Unwind code | Bits and interpretation |
+|--|--|
+| `alloc_s` | 000xxxxx: allocate small stack with size \< 512 (2^5 * 16). |
+| `save_r19r20_x` | 001zzzzz: save `` pair at `[sp-#Z*8]!`, pre-indexed offset >= -248 |
+| `save_fplr` | 01zzzzzz: save `` pair at `[sp+#Z*8]`, offset \<= 504. |
+| `save_fplr_x` | 10zzzzzz: save `` pair at `[sp-(#Z+1)*8]!`, pre-indexed offset >= -512 |
+| `alloc_m` | 11000xxx'xxxxxxxx: allocate large stack with size \< 32K (2^11 * 16). |
+| `save_regp` | 110010xx'xxzzzzzz: save `x(19+#X)` pair at `[sp+#Z*8]`, offset \<= 504 |
+| `save_regp_x` | 110011xx'xxzzzzzz: save pair `x(19+#X)` at `[sp-(#Z+1)*8]!`, pre-indexed offset >= -512 |
+| `save_reg` | 110100xx'xxzzzzzz: save reg `x(19+#X)` at `[sp+#Z*8]`, offset \<= 504 |
+| `save_reg_x` | 1101010x'xxxzzzzz: save reg `x(19+#X)` at `[sp-(#Z+1)*8]!`, pre-indexed offset >= -256 |
+| `save_lrpair` | 1101011x'xxzzzzzz: save pair `` at `[sp+#Z*8]`, offset \<= 504 |
+| `save_fregp` | 1101100x'xxzzzzzz: save pair `d(8+#X)` at `[sp+#Z*8]`, offset \<= 504 |
+| `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 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` |
+| | 11101010: Custom stack for `MSFT_OP_CONTEXT` |
+| | 11101011: Custom stack for `MSFT_OP_EC_CONTEXT` |
+| | 11101100: Custom stack for `MSFT_OP_CLEAR_UNWOUND_TO_CALL` |
+| | 11101101: reserved |
+| | 11101110: reserved |
+| | 11101111: reserved |
+| | 11110xxx: reserved |
+| | 11111000'yyyyyyyy : reserved |
+| | 11111001'yyyyyyyy'yyyyyyyy : reserved |
+| | 11111010'yyyyyyyy'yyyyyyyy'yyyyyyyy : reserved |
+| | 11111011'yyyyyyyy'yyyyyyyy'yyyyyyyy'yyyyyyyy : reserved |
+| `pac_sign_lr` | 11111100: sign the return address in `lr` with `pacibsp` |
+| | 11111101: reserved |
+| | 11111110: reserved |
+| | 11111111: reserved |
+
+In instructions with large values covering multiple bytes, the most significant bits are stored first. This design makes it possible to find the total size in bytes of the unwind code by looking up only the first byte of the code. Since each unwind code is exactly mapped to an instruction in a prolog or epilog, you can compute the size of the prolog or epilog. Walk from the sequence start to the end, and use a lookup table or similar device to determine the length of the corresponding opcode.
+
+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 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.
+
+`end_c` is designed to handle noncontiguous function fragments for optimization purposes. An `end_c` that indicates the end of unwind codes in the current scope must be followed by another series of unwind codes ending with a real `end`. The unwind codes between `end_c` and `end` represent the prolog operations in the parent region (a "phantom" prolog). More details and examples are described in the section below.
### Packed unwind data
-For functions whose prologs and epilogs follow the canonical form described below, packed unwind data can be used. It eliminates the need for an .xdata record entirely, and significantly reduces the cost of providing unwind data. The canonical prologs and epilogs are designed to meet the common requirements of a simple function: One that doesn't require an exception handler, and which does its setup and teardown operations in a standard order.
+For functions whose prologs and epilogs follow the canonical form described below, packed unwind data can be used. It eliminates the need for an `.xdata` record entirely, and significantly reduces the cost of providing unwind data. The canonical prologs and epilogs are designed to meet the common requirements of a simple function: One that doesn't require an exception handler, and which does its setup and teardown operations in a standard order.
-The format of a .pdata record with packed unwind data looks like this:
+The format of a `.pdata` record with packed unwind data looks like this:
-
+
The fields are as follows:
- **Function Start RVA** is the 32-bit RVA of the start of the function.
- **Flag** is a 2-bit field as described above, with the following meanings:
- - 00 = packed unwind data not used; remaining bits point to an .xdata record
+ - 00 = packed unwind data not used; remaining bits point to an `.xdata` record
- 01 = packed unwind data used with a single prolog and epilog at the beginning and end of the scope
- 10 = packed unwind data used for code without any prolog and epilog. Useful for describing separated function segments
- 11 = reserved.
-- **Function Length** is an 11-bit field providing the length of the entire function in bytes, divided by 4. If the function is larger than 8k, a full .xdata record must be used instead.
-- **Frame Size** is a 9-bit field indicating the number of bytes of stack that is allocated for this function, divided by 16. Functions that allocate greater than (8k-16) bytes of stack must use a full .xdata record. It includes the local variable area, outgoing parameter area, callee-saved Int and FP area, and home parameter area, but excludes the dynamic allocation area.
+- **Function Length** is an 11-bit field providing the length of the entire function in bytes, divided by 4. If the function is larger than 8k, a full `.xdata` record must be used instead.
+- **Frame Size** is a 9-bit field indicating the number of bytes of stack that is allocated for this function, divided by 16. Functions that allocate greater than (8k-16) bytes of stack must use a full `.xdata` record. It includes the local variable area, outgoing parameter area, callee-saved Int and FP area, and home parameter area. It excludes the dynamic allocation area.
- **CR** is a 2-bit flag indicating whether the function includes extra instructions to set up a frame chain and return link:
- - 00 = unchained function, \ pair is not saved in stack.
- - 01 = unchained function, \ is saved in stack
- - 10 = reserved;
- - 11 = chained function, a store/load pair instruction is used in prolog/epilog \
-- **H** is a 1-bit flag indicating whether the function homes the integer parameter registers (x0-x7) by storing them at the very start of the function. (0=does not home registers, 1=homes registers).
+ - 00 = unchained function, `` pair isn't saved in stack
+ - 01 = unchained function, `` is saved in stack
+ - 10 = chained function with a `pacibsp` signed return address
+ - 11 = chained function, a store/load pair instruction is used in prolog/epilog ``
+- **H** is a 1-bit flag indicating whether the function homes the integer parameter registers (x0-x7) by storing them at the very start of the function. (0 = doesn't home registers, 1 = homes registers).
- **RegI** is a 4-bit field indicating the number of non-volatile INT registers (x19-x28) saved in the canonical stack location.
- **RegF** is a 3-bit field indicating the number of non-volatile FP registers (d8-d15) saved in the canonical stack location. (RegF=0: no FP register is saved; RegF>0: RegF+1 FP registers are saved). Packed unwind data can't be used for function that save only one FP register.
-Canonical prologs that fall into categories 1, 2 (without outgoing parameter area), 3 and 4 in section above can be represented by packed unwind format. The epilogs for canonical functions follow a similar form, except **H** has no effect, the `set_fp` instruction is omitted, and the order of steps and the instructions in each step are reversed in the epilog. The algorithm for packed .xdata follows these steps, detailed in the following table:
+Canonical prologs that fall into categories 1, 2 (without outgoing parameter area), 3 and 4 in section above can be represented by packed unwind format. The epilogs for canonical functions follow a similar form, except **H** has no effect, the `set_fp` instruction is omitted, and the order of steps and the instructions in each step are reversed in the epilog. The algorithm for packed `.xdata` follows these steps, detailed in the following table:
Step 0: Pre-compute of the size of each area.
-Step 1: Save Int callee-saved registers.
+Step 1: Sign the return address.
-Step 2: This step is specific for type 4 in early sections. lr is saved at the end of Int area.
+Step 2: Save Int callee-saved registers.
-Step 3: Save FP callee-saved registers.
+Step 3: This step is specific for type 4 in early sections. `lr` is saved at the end of Int area.
-Step 4: Save input arguments in the home parameter area.
+Step 4: Save FP callee-saved registers.
-Step 5: Allocate remaining stack, including local area, \ pair, and outgoing parameter area. 5a corresponds to canonical type 1. 5b and 5c are for canonical type 2. 5d and 5e are for both type 3 and type 4.
+Step 5: Save input arguments in the home parameter area.
-Step #|Flag values|# of instructions|Opcode|Unwind Code
--|-|-|-|-
-0|||`#intsz = RegI * 8;`
`if (CR==01) #intsz += 8; // lr`
`#fpsz = RegF * 8;`
`if(RegF) #fpsz += 8;`
`#savsz=((#intsz+#fpsz+8*8*H)+0xf)&~0xf)`
`#locsz = #famsz - #savsz`|
-1|0 < **RegI** <= 10|RegI / 2 + **RegI** % 2|`stp x19,x20,[sp,#savsz]!`
`stp x21,x22,[sp,#16]`
`...`|`save_regp_x`
`save_regp`
`...`
-2|**CR**==01*|1|`str lr,[sp,#(intsz-8)]`\*|`save_reg`
-3|0 < **RegF** <=7|(RegF + 1) / 2 +
(RegF + 1) % 2)|`stp d8,d9,[sp,#intsz]`\*\*
`stp d10,d11,[sp,#(intsz+16)]`
`...`
`str d(8+RegF),[sp,#(intsz+fpsz-8)]`|`save_fregp`
`...`
`save_freg`
-4|**H** == 1|4|`stp x0,x1,[sp,#(intsz+fpsz)]`
`stp x2,x3,[sp,#(intsz+fpsz+16)]`
`stp x4,x5,[sp,#(intsz+fpsz+32)]`
`stp x6,x7,[sp,#(intsz+fpsz+48)]`|`nop`
`nop`
`nop`
`nop`
-5a|**CR** == 11 && #locsz
<= 512|2|`stp x29,lr,[sp,#-locsz]!`
`mov x29,sp`\*\*\*|`save_fplr_x`
`set_fp`
-5b|**CR** == 11 &&
512 < #locsz <= 4080|3|`sub sp,sp,#locsz`
`stp x29,lr,[sp,0]`
`add x29,sp,0`|`alloc_m`
`save_fplr`
`set_fp`
-5c|**CR** == 11 && #locsz > 4080|4|`sub sp,sp,4080`
`sub sp,sp,#(locsz-4080)`
`stp x29,lr,[sp,0]`
`add x29,sp,0`|`alloc_m`
`alloc_s`/`alloc_m`
`save_fplr`
`set_fp`
-5d|(**CR** == 00 \|\| **CR**==01) &&
#locsz <= 4080|1|`sub sp,sp,#locsz`|`alloc_s`/`alloc_m`
-5e|(**CR** == 00 \|\| **CR**==01) &&
#locsz > 4080|2|`sub sp,sp,4080`
`sub sp,sp,#(locsz-4080)`|`alloc_m`
`alloc_s`/`alloc_m`
+Step 6: Allocate remaining stack, including local area, `` pair, and outgoing parameter area. 6a corresponds to canonical type 1. 6b and 6c are for canonical type 2. 6d and 6e are for both type 3 and type 4.
-\* If **CR** == 01 and **RegI** is an odd number, Step 2 and last save_rep in step 1 are merged into one save_regp.
+| Step # | Flag values | # of instructions | Opcode | Unwind code |
+|--|--|--|--|--|
+| 0 | | | `#intsz = RegI * 8;`
`if (CR==01) #intsz += 8; // lr`
`#fpsz = RegF * 8;`
`if(RegF) #fpsz += 8;`
`#savsz=((#intsz+#fpsz+8*8*H)+0xf)&~0xf)`
`#locsz = #famsz - #savsz` |
+| 1 | **CR** == 10 | 1 | `pacibsp` | `pac_sign_lr` |
+| 2 | 0 < **RegI** <= 10 | **RegI** / 2 +
**RegI** % 2 | `stp x19,x20,[sp,#savsz]!`
`stp x21,x22,[sp,#16]`
`...` | `save_regp_x`
`save_regp`
`...` |
+| 3 | **CR** == 01\* | 1 | `str lr,[sp,#(intsz-8)]`\* | `save_reg` |
+| 4 | 0 < **RegF** <= 7 | (**RegF** + 1) / 2 +
(**RegF** + 1) % 2) | `stp d8,d9,[sp,#intsz]`\*\*
`stp d10,d11,[sp,#(intsz+16)]`
`...`
`str d(8+RegF),[sp,#(intsz+fpsz-8)]` | `save_fregp`
`...`
`save_freg` |
+| 5 | **H** == 1 | 4 | `stp x0,x1,[sp,#(intsz+fpsz)]`
`stp x2,x3,[sp,#(intsz+fpsz+16)]`
`stp x4,x5,[sp,#(intsz+fpsz+32)]`
`stp x6,x7,[sp,#(intsz+fpsz+48)]` | `nop`
`nop`
`nop`
`nop` |
+| 6a | (**CR** == 10 \|\| **CR** == 11) &&
`#locsz` <= 512 | 2 | `stp x29,lr,[sp,#-locsz]!`
`mov x29,sp`\*\*\* | `save_fplr_x`
`set_fp` |
+| 6b | (**CR** == 10 \|\| **CR** == 11) &&
512 < `#locsz` <= 4080 | 3 | `sub sp,sp,#locsz`
`stp x29,lr,[sp,0]`
`add x29,sp,0` | `alloc_m`
`save_fplr`
`set_fp` |
+| 6c | (**CR** == 10 \|\| **CR** == 11) &&
`#locsz` > 4080 | 4 | `sub sp,sp,4080`
`sub sp,sp,#(locsz-4080)`
`stp x29,lr,[sp,0]`
`add x29,sp,0` | `alloc_m`
`alloc_s`/`alloc_m`
`save_fplr`
`set_fp` |
+| 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 **RegI** == **CR** == 0, and **RegF** != 0, the first stp for the floating-point does the predecrement.
+\* 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`.
-\*\*\* No instruction corresponding to `mov x29,sp` is present in the epilog. Packed unwind data can't be used if a function requires restoration of sp from x29.
+\*\* If **RegI** == **CR** == 0, and **RegF** != 0, the first `stp` for the floating-point does the predecrement.
+
+\*\*\* No instruction corresponding to `mov x29,sp` is present in the epilog. Packed unwind data can't be used if a function requires restoration of `sp` from `x29`.
### Unwinding partial prologs and epilogs
-The most common unwinding situation is one where the exception or call occurred in the body of the function, away from the prolog and all epilogs. In this situation, unwinding is straightforward: the unwinder simply begins executing the codes in the unwind array beginning at index 0 and continuing until an end opcode is detected.
+In the most common unwinding situations, the exception or call occurs in the body of the function, away from the prolog and all epilogs. In these situations, unwinding is straightforward: the unwinder simply executes the codes in the unwind array. It begins at index 0 and continues until an `end` opcode is detected.
It's more difficult to correctly unwind in the case where an exception or interrupt occurs while executing a prolog or epilog. In these situations, the stack frame is only partially constructed. The problem is to determine exactly what's been done, to correctly undo it.
@@ -400,19 +426,19 @@ For example, take this prolog and epilog sequence:
0110: ret lr // end
```
-Next to each opcode is the appropriate unwind code describing this operation. You can see how the series of unwind codes for the prolog is an exact mirror image of the unwind codes for the epilog (not counting the final instruction of the epilog). It's a common situation, and it's why we always assume the unwind codes for the prolog are stored in reverse order from the prolog's execution order.
+Next to each opcode is the appropriate unwind code describing this operation. You can see how the series of unwind codes for the prolog is an exact mirror image of the unwind codes for the epilog (not counting the final instruction of the epilog). It's a common situation: It's why we always assume the unwind codes for the prolog are stored in reverse order from the prolog's execution order.
So, for both the prolog and epilog, we're left with a common set of unwind codes:
`set_fp`, `save_regp 0,240`, `save_fregp,0,224`, `save_fplr_x_256`, `end`
-The epilog case is straightforward, since it's in normal order. Starting at offset 0 within the epilog (which starts at offset 0x100 in the function), we'd expect to execute the full unwind sequence, as no cleanup has yet been done. If we find ourselves one instruction in (at offset 2 in the epilog), we can successfully unwind by skipping the first unwind code. We can generalize this situation, and assume a 1:1 mapping between opcodes and unwind codes. Then, to start unwinding from instruction *n* in the epilog, we should skip the first *n* unwind codes, and begin executing from there.
+The epilog case is straightforward, since it's in normal order. Starting at offset 0 within the epilog (which starts at offset 0x100 in the function), we'd expect the full unwind sequence to execute, as no cleanup has yet been done. If we find ourselves one instruction in (at offset 2 in the epilog), we can successfully unwind by skipping the first unwind code. We can generalize this situation, and assume a 1:1 mapping between opcodes and unwind codes. Then, to start unwinding from instruction *n* in the epilog, we should skip the first *n* unwind codes, and begin executing from there.
-It turns out that a similar logic works for the prolog, except in reverse. If we start unwinding from offset 0 in the prolog, we want to execute nothing. If we unwind from offset 2, which is one instruction in, then we want to start executing the unwind sequence one unwind code from the end. (Remember, the codes are stored in reverse order.) And here too, we can generalize: if we start unwinding from instruction n in the prolog, we should start executing n unwind codes from the end of the list of codes.
+It turns out that a similar logic works for the prolog, except in reverse. If we start unwinding from offset 0 in the prolog, we want to execute nothing. If we unwind from offset 2, which is one instruction in, then we want to start executing the unwind sequence one unwind code from the end. (Remember, the codes are stored in reverse order.) And here too, we can generalize: if we start unwinding from instruction *n* in the prolog, we should start executing *n* unwind codes from the end of the list of codes.
-It's not always the case that the prolog and epilog codes match exactly. That's why the unwind array may need to contain several sequences of codes. To determine the offset of where to begin processing codes, use the following logic:
+Prolog and epilog codes don't always match exactly, which is why the unwind array may need to contain several sequences of codes. To determine the offset of where to begin processing codes, use the following logic:
-1. If unwinding from within the body of the function, begin executing unwind codes at index 0 and continue until hitting an "end" opcode.
+1. If unwinding from within the body of the function, begin executing unwind codes at index 0 and continue until hitting an `end` opcode.
1. If unwinding from within an epilog, use the epilog-specific starting index provided with the epilog scope as a starting point. Compute how many bytes the PC in question is from the start of the epilog. Then advance forward through the unwind codes, skipping unwind codes until all of the already-executed instructions are accounted for. Then execute starting at that point.
@@ -422,11 +448,11 @@ These rules mean the unwind codes for the prolog must always be the first in the
### Function fragments
-For code optimization purposes and other reasons, it may be preferable to split a function into separated fragments (also called regions). When split, each resulting function fragment requires its own separate .pdata (and possibly .xdata) record.
+For code optimization purposes and other reasons, it may be preferable to split a function into separated fragments (also called *regions*). When split, each resulting function fragment requires its own separate `.pdata` (and possibly `.xdata`) record.
-For each separated secondary fragment that has its own prolog, it's expected that no stack adjustment is done in its prolog. All stack space required by a secondary region must be pre-allocated by its parent region (or called host region). This keeps stack pointer manipulation strictly in the function's original prolog.
+For each separated secondary fragment that has its own prolog, it's expected that no stack adjustment is done in its prolog. All stack space required by a secondary region must be pre-allocated by its parent region (or called host region). This preallocation keeps stack pointer manipulation strictly in the function's original prolog.
-A typical case of function fragments is "code separation" with that compiler may move a region of code out of its host function. There are three unusual cases that could be resulted by code separation.
+A typical case of function fragments is "code separation", where the compiler may move a region of code out of its host function. There are three unusual cases that could result from code separation.
#### Example
@@ -463,19 +489,19 @@ A typical case of function fragments is "code separation" with that compiler may
1. Prolog only (region 1: all epilogs are in separated regions):
- Only the prolog must be described. This can't be represented in the compact .pdata format. In the full .xdata case, it can be represented by setting Epilog Count = 0. See region 1 in the example above.
+ Only the prolog must be described. This prolog can't be represented in the compact `.pdata` format. In the full `.xdata` case, it can be represented by setting Epilog Count = 0. See region 1 in the example above.
Unwind codes: `set_fp`, `save_regp 0,240`, `save_fplr_x_256`, `end`.
1. Epilogs only (region 2: prolog is in host region)
- It's assumed that by the time control jumping into this region, all prolog codes have been executed. Partial unwind can happen in epilogs the same way as in a normal function. This type of region can't be represented by compact .pdata. In full .xdata record, it can be encoded with a "phantom" prolog, bracketed by an `end_c` and `end` unwind code pair. The leading `end_c` indicates the size of prolog is zero. Epilog start index of the single epilog points to `set_fp`.
+ It's assumed that by the time control jumps into this region, all prolog codes have been executed. Partial unwind can happen in epilogs the same way as in a normal function. This type of region can't be represented by compact `.pdata`. In a full `.xdata` record, it can be encoded with a "phantom" prolog, bracketed by an `end_c` and `end` unwind code pair. The leading `end_c` indicates the size of prolog is zero. Epilog start index of the single epilog points to `set_fp`.
Unwind code for region 2: `end_c`, `set_fp`, `save_regp 0,240`, `save_fplr_x_256`, `end`.
1. No prologs or epilogs (region 3: prologs and all epilogs are in other fragments):
- Compact .pdata format can be applied via setting Flag = 10. With full .xdata record, Epilog Count = 1. Unwind code is the same as the code for region 2 above, but Epilog Start Index also points to `end_c`. Partial unwind will never happen in this region of code.
+ Compact `.pdata` format can be applied via setting Flag = 10. With full `.xdata` record, Epilog Count = 1. Unwind code is the same as the code for region 2 above, but Epilog Start Index also points to `end_c`. Partial unwind will never happen in this region of code.
Another more complicated case of function fragments is "shrink wrapping." The compiler may choose to delay saving some callee-saved registers until outside of the function entry prolog.
@@ -510,17 +536,17 @@ Another more complicated case of function fragments is "shrink wrapping." The co
In the prolog of region 1, stack space is pre-allocated. You can see that region 2 will have the same unwind code even it's moved out of its host function.
-Region 1: `set_fp`, `save_regp 0,240`, `save_fplr_x_256`, `end` with Epilog Start Index points to `set_fp` as usual.
+Region 1: `set_fp`, `save_regp 0,240`, `save_fplr_x_256`, `end`. Epilog Start Index points to `set_fp` as usual.
Region 2: `save_regp 2, 224`, `end_c`, `set_fp`, `save_regp 0,240`, `save_fplr_x_256`, `end`. Epilog Start Index points to first unwind code `save_regp 2, 224`.
### Large functions
-Fragments can be used to describe functions larger than the 1M limit imposed by the bit fields in the .xdata header. To describe a very large function like this, it needs to be broken into fragments smaller than 1M. Each fragment should be adjusted so that it doesn't split an epilog into multiple pieces.
+Fragments can be used to describe functions larger than the 1M limit imposed by the bit fields in the `.xdata` header. To describe an unusually large function like this, it needs to be broken into fragments smaller than 1M. Each fragment should be adjusted so that it doesn't split an epilog into multiple pieces.
Only the first fragment of the function will contain a prolog; all other fragments are marked as having no prolog. Depending on the number of epilogs present, each fragment may contain zero or more epilogs. Keep in mind that each epilog scope in a fragment specifies its starting offset relative to the start of the fragment, not the start of the function.
-If a fragment has no prolog and no epilog, it still requires its own .pdata (and possibly .xdata) record, to describe how to unwind from within the body of the function.
+If a fragment has no prolog and no epilog, it still requires its own `.pdata` (and possibly `.xdata`) record, to describe how to unwind from within the body of the function.
## Examples
@@ -533,7 +559,7 @@ If a fragment has no prolog and no epilog, it still requires its own .pdata (and
sub sp,sp,#0x810 // alloc_m
stp fp,lr,[sp] // save_fplr
mov fp,sp // set_fp
- // end of prolog
+ // end of prolog
...
|$pdata$Foo|
@@ -619,5 +645,5 @@ Epilog Start Index [4] points to the middle of Prolog unwind code (partially reu
## See also
-[Overview of ARM64 ABI conventions](arm64-windows-abi-conventions.md)
-[ARM Exception Handling](arm-exception-handling.md)
+[Overview of ARM64 ABI conventions](arm64-windows-abi-conventions.md)\
+[ARM exception handling](arm-exception-handling.md)
diff --git a/docs/build/arm64-windows-abi-conventions.md b/docs/build/arm64-windows-abi-conventions.md
index e94a4bdb12..db01bfefe2 100644
--- a/docs/build/arm64-windows-abi-conventions.md
+++ b/docs/build/arm64-windows-abi-conventions.md
@@ -1,14 +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](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.subset.swdev.abi/index.html) (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.
@@ -18,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:
@@ -29,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.
@@ -65,16 +67,15 @@ Default layout alignment for globals and statics:
The AArch64 architecture supports 32 integer registers:
-| Register | Volatile? | Role |
+| Register | Volatility | Role |
| - | - | - |
-| x0 | Volatile | Parameter/scratch register 1, result register |
-| x1-x7 | Volatile | Parameter/scratch register 2-8 |
-| x8-x15 | Volatile | Scratch registers |
+| x0-x8 | Volatile | Parameter/Result scratch registers |
+| x9-x15 | Volatile | Scratch registers |
| x16-x17 | Volatile | Intra-procedure-call scratch registers |
-| x18 | Non-volatile | Platform register: in kernel mode, points to KPCR for the current processor; in user mode, points to TEB |
+| 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 | Non-volatile | Link registers |
+| 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,20 +87,19 @@ 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 | Volatile? | Role |
+| Register | Volatility | Role |
| - | - | - |
-| v0 | Volatile | Parameter/scratch register 1, result register |
-| v1-v7 | Volatile | Parameter/scratch registers 2-8 |
-| v8-v15 | Non-volatile | Scratch registers (only the low 64 bits are non-volatile) |
+| v0-v7 | Volatile | Parameter/Result scratch registers |
+| v8-v15 | Both | Low 64 bits are Non-Volatile. High 64 bits are Volatile. |
| v16-v31 | Volatile | Scratch registers |
Each register may be accessed as a full 128-bit value (via v0-v31 or q0-q31). It may be accessed as a 64-bit value (via d0-d31), as a 32-bit value (via s0-s31), as a 16-bit value (via h0-h31), or as an 8-bit value (via b0-b31). Accesses smaller than 128 bits only access the lower bits of the full 128-bit register. They leave the remaining bits untouched unless otherwise specified. (AArch64 is different from AArch32, where the smaller registers were packed on top of the larger registers.)
The floating-point control register (FPCR) has certain requirements on the various bitfields within it:
-| Bits | Meaning | Volatile? | Role |
+| Bits | Meaning | Volatility | Role |
| - | - | - | - |
| 26 | AHP | Non-Volatile | Alternative half-precision control. |
| 25 | DN | Non-Volatile | Default NaN mode control. |
@@ -119,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
@@ -149,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.
@@ -159,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.
@@ -197,19 +201,26 @@ Integral values are returned in x0.
Floating-point values are returned in s0, d0, or v0, as appropriate.
-HFA and HVA values are returned in s0-s3, d0-d3, or v0-v3, 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 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.
-Types returned by value are handled differently depending on whether they have certain properties. Types which have all of these properties,
+Types returned by value are handled differently depending on whether they have certain properties, and whether the function is a non-static member function. Types which have all of these properties,
- they're *aggregate* by the C++14 standard definition, that is, they have no user-provided constructors, no private or protected non-static data members, no base classes, and no virtual functions, and
- they have a trivial copy-assignment operator, and
- they have a trivial destructor,
-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 types greater than 16 bytes, 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:
@@ -217,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
@@ -235,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.
@@ -245,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
new file mode 100644
index 0000000000..9c78bc39f5
--- /dev/null
+++ b/docs/build/arm64ec-windows-abi-conventions.md
@@ -0,0 +1,192 @@
+---
+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
+
+ARM64EC is an application binary interface (ABI) that enables ARM64 binaries to run natively and interoperably with x64 code. Specifically, the ARM64EC ABI follows x64 software conventions including calling convention, stack usage, and data alignment, making ARM64EC and x64 code interoperable. The operating system emulates the x64 portion of the binary. (The EC in ARM64EC stands for *emulation compatible*.)
+
+For more information on the x64 and ARM64 ABIs, see [Overview of x64 ABI conventions](x64-software-conventions.md) and [Overview of ARM64 ABI conventions](arm64-windows-abi-conventions.md).
+
+ARM64EC doesn't solve memory model differences between x64 and ARM based architectures. For more information, see [Common Visual C++ ARM migration issues](common-visual-cpp-arm-migration-issues.md).
+
+## Definitions
+
+- **ARM64** - The code stream for ARM64 processes that contains traditional ARM64 code.
+- **ARM64EC** - The code stream that utilizes a subset of the ARM64 register set to provide interoperability with x64 code.
+
+## Register mapping
+
+x64 processes may have threads running ARM64EC code. So it's always possible to retrieve an x64 register context, ARM64EC uses a subset of the ARM64 core registers that map 1:1 to emulated x64 registers. Importantly, ARM64EC never uses registers outside of this subset, except to read the Thread Environment Block (TEB) address from `x18`.
+
+Native ARM64 processes shouldn't regress in performance when some or many functions are recompiled as ARM64EC. To maintain performance, the ABI follows these principles:
+
+- The ARM64EC register subset includes all registers that are part of the ARM64 function calling convention.
+
+- The ARM64EC calling convention directly maps to the ARM64 calling convention.
+
+Special helper routines like `__chkstk_arm64ec` use custom calling conventions and registers. These registers are also included in the ARM64EC subset of registers.
+
+## Register mapping for integer registers
+
+| ARM64EC register | x64 register | ARM64EC calling convention | ARM64 calling convention | x64 calling convention |
+|--|--|--|--|--|
+| `x0` | `rcx` | volatile | volatile | volatile |
+| `x1` | `rdx` | volatile | volatile | volatile |
+| `x2` | `r8` | volatile | volatile | volatile |
+| `x3` | `r9` | volatile | volatile | volatile |
+| `x4` | `r10` | volatile | volatile | volatile |
+| `x5` | `r11` | volatile | volatile | volatile |
+| `x6` | `mm1` (low 64 bits of x87 `R1` register) | volatile | volatile | volatile |
+| `x7` | `mm2` (low 64 bits of x87 `R2` register) | volatile | volatile | volatile |
+| `x8` | `rax` | volatile | volatile | volatile |
+| `x9` | `mm3` (low 64 bits of x87 `R3` register) | volatile | volatile | volatile |
+| `x10` | `mm4` (low 64 bits of x87 `R4` register) | volatile | volatile | volatile |
+| `x11` | `mm5` (low 64 bits of x87 `R5` register) | volatile | volatile | volatile |
+| `x12` | `mm6` (low 64 bits of x87 `R6` register) | volatile | volatile | volatile |
+| `x13` | N/A | disallowed | volatile | N/A |
+| `x14` | N/A | disallowed | volatile | N/A |
+| `x15` | `mm7` (low 64 bits of x87 `R7` register) | volatile | volatile | volatile |
+| `x16` | High 16 bits of each of the x87 `R0`-`R3` registers | volatile(`xip0`) | volatile(`xip0`) | volatile |
+| `x17` | High 16 bits of each of the x87 `R4`-`R7` registers | volatile(`xip1`) | volatile(`xip1`) | volatile |
+| `x18` | GS.base | fixed(TEB) | fixed(TEB) | fixed(TEB) |
+| `x19` | `r12` | non-volatile | non-volatile | non-volatile |
+| `x20` | `r13` | non-volatile | non-volatile | non-volatile |
+| `x21` | `r14` | non-volatile | non-volatile | non-volatile |
+| `x22` | `r15` | non-volatile | non-volatile | non-volatile |
+| `x23` | N/A | disallowed | non-volatile | N/A |
+| `x24` | N/A | disallowed | non-volatile | N/A |
+| `x25` | `rsi` | non-volatile | non-volatile | non-volatile |
+| `x26` | `rdi` | non-volatile | non-volatile | non-volatile |
+| `x27` | `rbx` | non-volatile | non-volatile | non-volatile |
+| `x28` | N/A | disallowed | disallowed | N/A |
+| `fp` | `rbp` | non-volatile | non-volatile | non-volatile |
+| `lr` | `mm0` (low 64 bits of x87 `R0` register) | both | both | both |
+| `sp` | `rsp` | non-volatile | non-volatile | non-volatile |
+| `pc` | `rip` | instruction pointer | instruction pointer | instruction pointer |
+| `PSTATE` subset: `N`/`Z`/`C`/`V`/`SS` 1, 2 | `RFLAGS` subset: `SF`/`ZF`/`CF`/`OF`/`TF` | volatile | volatile | volatile |
+| N/A | `RFLAGS` subset: `PF`/`AF` | N/A | N/A | volatile |
+| N/A | `RFLAGS` subset: `DF` | N/A | N/A | non-volatile |
+
+1 Avoid directly reading, writing or computing mappings between `PSTATE` and `RFLAGS`. These bits may be used in the future and are subject to change.
+
+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
+
+| ARM64EC register | x64 register | ARM64EC calling convention | ARM64 calling convention | x64 calling convention |
+|--|--|--|--|--|
+| `v0`-`v5` | `xmm0`-`xmm5` | volatile | volatile | volatile |
+| `v6`-`v7` | `xmm6`-`xmm7` | volatile | volatile | non-volatile |
+| `v8`-`v15` | `xmm8`-`xmm15` | volatile 1 | volatile 1 | non-volatile |
+| `v16`-`v31` | `xmm16`-`xmm31` | disallowed | volatile | disallowed (x64 emulator doesn't support AVX-512) |
+| `FPCR` 2 | `MXCSR[15:6]` | non-volatile | non-volatile | non-volatile |
+| `FPSR` 2 | `MXCSR[5:0]` | volatile | volatile | volatile |
+
+1 These ARM64 registers are special in that the lower 64 bits are non-volatile but the upper 64 bits are volatile. From the point of view of an x64 caller, they're effectively volatile because the callee would trash data.
+
+2 Avoid directly reading, writing, or computing mappings of `FPCR` and `FPSR`. These bits may be used in the future and are subject to change.
+
+## Struct packing
+
+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.
+
+The following table describes each special ABI routine and the registers the ABI uses. The routines don't modify the listed preserved registers under the ABI column. No assumptions should be made about unlisted registers. On-disk, the ABI routine pointers are null. At load time, the loader updates the pointers to point to the x64 emulator routines.
+
+| Name | Description | ABI |
+|--|--|--|
+| `__os_arm64x_dispatch_call_no_redirect` | Called by an exit thunk to call an x64 target (either an x64 function or an x64 fast-forward sequence). The routine pushes the ARM64EC return address (in the `LR` register) followed by the address of the instruction that succeeds a `blr x16` instruction that invokes the x64 emulator. It then runs the `blr x16` instruction | return value in `x8` (`rax`) |
+| `__os_arm64x_dispatch_ret` | Called by an entry thunk to return to its x64 caller. It pops the x64 return address from the stack and invokes the x64 emulator to jump to it | N/A |
+| `__os_arm64x_check_call` | Called by ARM64EC code with a pointer to an exit thunk and the indirect ARM64EC target address to execute. The ARM64EC target is considered patchable, and execution always returns to the caller with either the same data it was called with, or with modified data | Arguments:
`x9`: The target address
`x10`: The exit thunk address
`x11`: The fast forward sequence address
Out:
`x9`: If the target function was detoured, it contains the address of the fast forward sequence
`x10`: The exit thunk address
`x11`: If the function was detoured, it contains the exit thunk address. Otherwise, the target address jumped to
Preserved registers: `x0`-`x8`, `x15` (`chkstk`). and `q0`-`q7` |
+| `__os_arm64x_check_icall` | Called by ARM64EC code, with a pointer to an exit thunk, to handle a jump to either a target address that is either x64 or ARM64EC. If the target is x64 and the x64 code hasn't been patched, the routine sets the target address register. It points to the ARM64EC version of the function if one exists. Otherwise, it sets the register to point to the exit thunk that transitions to the x64 target. Then, it returns to the calling ARM64EC code, which then jumps to the address in the register. This routine is a non-optimized version of `__os_arm64x_check_call`, where the target address isn't known at compile time
Used at a call-site of an indirect call | Arguments:
`x9`: The target address
`x10`: The exit thunk address
`x11`: The fast forward sequence address
Out:
`x9`: If the target function was detoured, it contains the address of the fast forward sequence
`x10`: The exit thunk address
`x11`: If the function was detoured, it contains the exit thunk address. Otherwise, the target address jumped to
Preserved registers: `x0`-`x8`, `x15` (`chkstk`), and `q0`-`q7` |
+| `__os_arm64x_check_icall_cfg` | Same as `__os_arm64x_check_icall` but also checks that the specified address is a valid Control Flow Graph indirect call target | Arguments:
`x10`: The address of the exit thunk
`x11`: The address of the target function
Out:
`x9`: If the target is x64, the address to the function. Otherwise, undefined
`x10`: The address of the exit thunk
`x11`: If the target is x64, it contains the address of the exit thunk. Otherwise, the address of the function
Preserved registers: `x0`-`x8`, `x15` (`chkstk`), and `q0`-`q7` |
+| `__os_arm64x_get_x64_information` | Gets the requested part of the live x64 register context | `_Function_class_(ARM64X_GET_X64_INFORMATION) NTSTATUS LdrpGetX64Information(_In_ ULONG Type, _Out_ PVOID Output, _In_ PVOID ExtraInfo)` |
+| `__os_arm64x_set_x64_information` | Sets the requested part of the live x64 register context | `_Function_class_(ARM64X_SET_X64_INFORMATION) NTSTATUS LdrpSetX64Information(_In_ ULONG Type,_In_ PVOID Input, _In_ PVOID ExtraInfo)` |
+| `__os_arm64x_x64_jump` | Used in signature-less adjustor and other thunks that directly forward (`jmp`) a call to another function that can have any signature, deferring the potential application of the right thunk to the real target | Arguments:
`x9`: target to jump to
All parameter registers preserved (forwarded) |
+
+## Thunks
+
+Thunks are the low-level mechanisms to support ARM64EC and x64 functions calling each other. There are two types: *entry thunks* for entering ARM64EC functions and *exit thunks* for calling x64 functions.
+
+### Entry thunk and intrinsic entry thunks: x64 to ARM64EC function call
+
+To support x64 callers when a C/C++ function is compiled as ARM64EC, the toolchain generates a single entry thunk consisting of ARM64EC machine code. Intrinsics have an entry thunk of their own. All other functions share an entry thunk with all functions that have a matching calling convention, parameters, and return type. The content of the thunk depends on the calling convention of the C/C++ function.
+
+In addition to handling parameters and the return address, the thunk bridges the differences in volatility between ARM64EC and x64 vector registers caused by [ARM64EC vector register mapping](#register-mapping-for-vector-registers):
+
+| ARM64EC register | x64 register | ARM64EC calling convention | ARM64 calling convention | x64 calling convention |
+|--|--|--|--|--|
+| `v6`-`v15` | `xmm6`-`xmm15` | volatile, but saved/restored in the entry thunk (x64 to ARM64EC) | volatile or partially volatile upper 64 bits | non-volatile |
+
+The entry thunk performs the following actions:
+
+| Parameter number | Stack usage |
+|--|--|
+| 0-4 | Stores ARM64EC `v6` and `v7` into the caller-allocated home space
Since the callee is ARM64EC, which doesn't have the notion of a home space, the stored values aren't clobbered.
Allocates an extra 128 bytes on the stack and store ARM64EC `v8` through `v15`. |
+| 5-8 | `x4` = 5th parameter from the stack
`x5` = 6th parameter from the stack
`x6` = 7th parameter from the stack
`x7` = 8th parameter from the stack
If the parameter is SIMD, the `v4`-`v7` registers are used instead |
+| 9+ | Allocates `AlignUp(NumParams - 8 , 2) * 8` bytes on the stack. \*
Copies the 9th and remaining parameters to this area |
+
+\* Aligning the value to an even number guarantees that the stack remains aligned to 16 bytes
+
+If the function accepts a 32-bit integer parameter, the thunk is permitted to only push 32 bits instead of the full 64 bits of the parent register.
+
+Next, the thunk uses an ARM64 `bl` instruction to call the ARM64EC function. After the function returns, the thunk:
+
+1. Undoes any stack allocations
+1. Calls the `__os_arm64x_dispatch_ret` emulator helper to pop the x64 return address and resume x64 emulation.
+
+### Exit thunk: ARM64EC to x64 function call
+
+For every call that an ARM64EC C/C++ function makes to potential x64 code, the MSVC toolchain generates an exit thunk. The content of the thunk depends on the parameters of the x64 callee and whether the callee is using the standard calling convention or `__vectorcall`. The compiler obtains this information from a function declaration for the callee.
+
+First, The thunk pushes the return address that's in the ARM64EC `lr` register and a dummy 8-byte value to guarantee that the stack is aligned to 16 bytes. Second, the thunk handles the parameters:
+
+| Parameter number | Stack usage |
+|--|--|
+| 0-4 | Allocates 32 bytes of home space on the stack |
+| 5-8 | Allocates `AlignUp(NumParams - 4, 2) * 8` more bytes higher up on the stack. \*
Copies the 5th and any subsequent parameters from ARM64EC's `x4`-`x7` to this extra space |
+| 9+ | Copies the 9th and remaining parameters to the extra space |
+
+\* Aligning the value to an even number guarantees that the stack remains aligned to 16 bytes.
+
+Third, the thunk calls the `__os_arm64x_dispatch_call_no_redirect` emulator helper to invoke the x64 emulator to run the x64 function. The call must be a `blr x16` instruction (conveniently, `x16` is a volatile register). A `blr x16` instruction is required because the x64 emulator parses this instruction as a hint.
+
+The x64 function usually attempts to return to the emulator helper by using an x64 `ret` instruction. At this point, the x64 emulator detects that it's in ARM64EC code. It then reads the preceding 4-byte hint that happens to be the ARM64 `blr x16` instruction. Since this hint indicates that the return address is in this helper, the emulator jumps directly to this address.
+
+The x64 function is permitted to return to the emulator helper using any branch instruction, including x64 `jmp` and `call`. The emulator handles these scenarios as well.
+
+When the helper then returns to the thunk, the thunk:
+
+1. Undoes any stack allocation
+1. Pops the ARM64EC `lr` register
+1. Executes an ARM64 `ret lr` instruction.
+
+## ARM64EC function name decoration
+
+An ARM64EC function name has a secondary decoration applied after any language-specific decoration. For functions with C linkage (whether compiled as C or by using `extern "C"`), a `#` is prepended to the name. For C++ decorated functions, a `$$h` tag is inserted into the name.
+
+```
+foo => #foo
+?foo@@YAHXZ => ?foo@@$$hYAHXZ
+```
+
+## `__vectorcall`
+
+The ARM64EC toolchain currently doesn't support `__vectorcall`. The compiler emits an error when it detects `__vectorcall` usage with ARM64EC.
+
+## See also
+
+[Understanding ARM64EC ABI and assembly code](/windows/arm/arm64ec-abi)\
+[Common Visual C++ ARM migration issues](common-visual-cpp-arm-migration-issues.md)\
+[Decorated names](./reference/decorated-names.md)
diff --git a/docs/build/automation-in-a-dll.md b/docs/build/automation-in-a-dll.md
index 4fa660617f..14bfcd95d7 100644
--- a/docs/build/automation-in-a-dll.md
+++ b/docs/build/automation-in-a-dll.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Automation in a DLL"
title: "Automation in a DLL"
ms.date: "11/04/2016"
helpviewer_keywords: ["DLLs [C++], Automation", "Automation [C++], DLLs"]
diff --git a/docs/build/building-c-cpp-isolated-applications-and-side-by-side-assemblies.md b/docs/build/building-c-cpp-isolated-applications-and-side-by-side-assemblies.md
index e51803d42c..01183ef989 100644
--- a/docs/build/building-c-cpp-isolated-applications-and-side-by-side-assemblies.md
+++ b/docs/build/building-c-cpp-isolated-applications-and-side-by-side-assemblies.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Building C/C++ Isolated Applications and Side-by-side Assemblies"
title: "Building C/C++ Isolated Applications and Side-by-side Assemblies"
ms.date: "05/06/2019"
helpviewer_keywords: ["isolated applications [C++]", "WinSxS [C++]", "native assembly cache [C++]", "builds [C++], isolated applications", "side-by-side applications [C++]", "builds [C++], side-by-side assemblies"]
ms.assetid: 9465904e-76f7-48bd-bb3f-c55d8f1699b6
+ms.topic: concept-article
---
# Building C/C++ Isolated Applications and Side-by-side Assemblies
diff --git a/docs/build/building-c-cpp-isolated-applications.md b/docs/build/building-c-cpp-isolated-applications.md
index 40d2243d86..8724e842f8 100644
--- a/docs/build/building-c-cpp-isolated-applications.md
+++ b/docs/build/building-c-cpp-isolated-applications.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Building C/C++ Isolated Applications"
title: "Building C/C++ Isolated Applications"
ms.date: "05/06/2019"
helpviewer_keywords: ["isolated applications [C++]"]
ms.assetid: 8a2fe4fa-0489-433e-bfc6-495844d8d73a
+ms.topic: concept-article
---
# Building C/C++ Isolated Applications
diff --git a/docs/build/building-c-cpp-side-by-side-assemblies.md b/docs/build/building-c-cpp-side-by-side-assemblies.md
index 3febae312d..29478d8b6e 100644
--- a/docs/build/building-c-cpp-side-by-side-assemblies.md
+++ b/docs/build/building-c-cpp-side-by-side-assemblies.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Building C/C++ Side-by-side Assemblies"
title: "Building C/C++ Side-by-side Assemblies"
ms.date: "11/04/2016"
helpviewer_keywords: ["side-by-side applications [C++]"]
ms.assetid: 7fa20b16-3737-4f76-a0b5-1dacea19a1e8
+ms.topic: concept-article
---
# Building C/C++ Side-by-side Assemblies
diff --git a/docs/build/building-on-the-command-line.md b/docs/build/building-on-the-command-line.md
index 66b0224dd1..7b4a452f29 100644
--- a/docs/build/building-on-the-command-line.md
+++ b/docs/build/building-on-the-command-line.md
@@ -2,34 +2,50 @@
title: "Use the Microsoft C++ toolset from the command line"
description: "Use the Microsoft C++ (MSVC) compiler toolset from the command line outside of the Visual Studio IDE."
ms.custom: "conceptual"
-ms.date: "04/21/2020"
+ms.date: 04/07/2022
helpviewer_keywords: ["command-line builds [C++]", "compiling source code [C++], command line", "builds [C++], command-line", "command line [C++], building from", "command line [C++], compilers"]
ms.assetid: 7ca9daed-a003-4162-842d-908f79058365
+ms.topic: how-to
---
# Use the Microsoft C++ toolset from the command line
You can build C and C++ applications on the command line by using tools that are included in Visual Studio. The Microsoft C++ (MSVC) compiler toolset is also downloadable as a standalone package. You don't need to install the Visual Studio IDE if you don't plan to use it.
> [!NOTE]
-> This article is about how to set up an environment to use the individual compilers, linkers, librarian, and other basic tools. The native project build system, MSBuild, does not use the environment as described in this article. For more information on how to use MSBuild from the command line, see [MSBuild on the command line - C++](msbuild-visual-cpp.md).
+> This article is about how to set up an environment to use the individual compilers, linkers, librarian, and other basic tools. The native project build system in Visual Studio, based on MSBuild, doesn't use the environment as described in this article. For more information on how to use MSBuild from the command line, see [MSBuild on the command line - C++](msbuild-visual-cpp.md).
## Download and install the tools
-If you've installed Visual Studio and a C++ workload, you have all the command-line tools. For information on how to install C++ and Visual Studio, see [Install C++ support in Visual Studio](vscpp-step-0-installation.md). If you only want the command-line toolset, download the [Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019). When you run the downloaded executable, it updates and runs the Visual Studio Installer. To install only the tools you need for C++ development, select the **C++ build tools** workload. You can select optional libraries and toolsets to include under **Installation details**. To build code by using the Visual Studio 2015 or 2017 toolsets, select the optional MSVC v140 or MSVC v141 build tools. When you're satisfied with your selections, choose **Install**.
+::: moniker range=">=msvc-160"
+
+If you've installed Visual Studio and a C++ workload, you have all the command-line tools. For information on how to install C++ and Visual Studio, see [Install C++ support in Visual Studio](vscpp-step-0-installation.md). If you only want the command-line toolset, download the [Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022). When you run the downloaded executable, it updates and runs the Visual Studio Installer. To install only the tools you need for C++ development, select the **Desktop development with C++** workload. You can select optional libraries and toolsets to include under **Installation details**. To build code by using the Visual Studio 2015, 2017, or 2019 toolsets, select the optional MSVC v140, v141, or v142 build tools. When you're satisfied with your selections, choose **Install**.
+
+::: moniker-end
+::: moniker range="<=msvc-150"
+
+If you've installed Visual Studio and a C++ workload, you have all the command-line tools. For information on how to install C++ and Visual Studio, see [Install C++ support in Visual Studio](vscpp-step-0-installation.md). If you only want the command-line toolset, download the [Build Tools for Visual Studio 2017](https://my.visualstudio.com/Downloads?q=2017). When you run the downloaded executable, it updates and runs the Visual Studio Installer. To install only the tools you need for C++ development, select the **Visual C++ build tools** workload. You can select optional libraries and toolsets to include under **Installation details**. To build code by using the Visual Studio 2015 toolset, select the optional MSVC v140 build tools. When you're satisfied with your selections, choose **Install**.
+
+::: moniker-end
## How to use the command-line tools
-When you choose one of the C++ workloads in the Visual Studio Installer, it installs the Visual Studio *platform toolset*. A platform toolset has all the C and C++ tools for a specific Visual Studio version. The tools include the C/C++ compilers, linkers, assemblers, and other build tools, and matching libraries. You can use all of these tools at the command line. They're also used internally by the Visual Studio IDE. There are separate x86-hosted and x64-hosted compilers and tools to build code for x86, x64, ARM, and ARM64 targets. Each set of tools for a particular host and target build architecture is stored in its own directory.
+When you choose one of the C++ workloads in the Visual Studio Installer, it installs the Visual Studio *platform toolset*. A platform toolset has all the C and C++ tools for a specific Visual Studio version. The tools include the C/C++ compilers, linkers, assemblers, and other build tools, and matching libraries and header files. You can use all of these tools at the command line. They're also used internally by the Visual Studio IDE. There are separate x86-hosted and x64-hosted compilers and tools to build code for x86, x64, ARM, and ARM64 targets. Each set of tools for a particular host and target build architecture is stored in its own directory.
-To work correctly, the tools require several specific environment variables to be set. These variables are used to add the tools to the path, and to set include file, library file, and SDK locations. To make it easy to set these environment variables, the installer creates customized *command files*, or batch files, during installation. You can run one of these command files to set a specific host and target build architecture, Windows SDK version, and platform toolset. For convenience, the installer also creates shortcuts in your Start menu. The shortcuts start developer command prompt windows by using these command files for specific combinations of host and target. These shortcuts ensure all the required environment variables are set and ready to use.
+To work correctly, the tools require several specific environment variables to be set. These variables are used to add the tools to the path, and to set the locations of include files, library files, and SDKs. To make it easy to set these environment variables, the installer creates customized *command files*, or batch files, during installation. You can run one of these command files to set a specific host and target build architecture, Windows SDK version, and platform toolset. For convenience, the installer also creates shortcuts in your Start menu. The shortcuts open developer command prompt windows by using these command files for specific combinations of host and target. These shortcuts ensure all the required environment variables are set and ready to use.
-The required environment variables are specific to your installation and to the build architecture you choose. They also might be changed by product updates or upgrades. That's why we recommend you use an installed command prompt shortcut or command file, instead of setting the environment variables yourself. For more information, see [Set the path and environment variables for command-line builds](setting-the-path-and-environment-variables-for-command-line-builds.md).
+The required environment variables are specific to your installation and to the build architecture you choose. They also might be changed by product updates or upgrades. This variability is one reason why we recommend you use an installed command prompt shortcut or command file, instead of setting the environment variables yourself.
-The toolsets, command files, and shortcuts installed depend on your computer processor and the options you selected during installation. The x86-hosted tools and cross tools that build x86 and x64 code are always installed. If you have 64-bit Windows, the x64-hosted tools and cross tools that build x86 and x64 code are also installed. If you choose the optional C++ Universal Windows Platform tools, then the x86 and x64 tools that build ARM and ARM64 code also get installed. Other workloads may install additional tools.
+The toolsets, command files, and shortcuts installed depend on your computer processor and the options you selected during installation. The x86-hosted tools and cross tools that build x86 and x64 code are always installed. If you have 64-bit Windows, the x64-hosted tools and cross tools that build x86 and x64 code are also installed. If you choose the optional C++ Universal Windows Platform tools, then the x86 and x64 tools that build ARM and ARM64 code also get installed. Other workloads may install these and other tools.
+
+## Path and environment variables for command-line builds
+
+The MSVC command-line tools use the `PATH`, `TMP`, `INCLUDE`, `LIB`, and `LIBPATH` environment variables, and also use other environment variables specific to your installed tools, platforms, and SDKs. Even a simple Visual Studio installation may set twenty or more environment variables. This complexity is why we strongly recommend that you use a [developer command prompt shortcut](#developer_command_prompt_shortcuts) or one of the [customized command files](#developer_command_file_locations). We don't recommend you set these variables in the Windows environment yourself.
+
+To see which environment variables are set by a developer command prompt shortcut, you can use the `SET` command. Open a plain command prompt window and capture the output of the `SET` command for a baseline. Open a developer command prompt window and capture the output of the `SET` command for comparison. Use a diff tool such as the one built into Visual Studio to highlight the environment variables set by the developer command prompt. For more information about the compiler and linker environment variables, see [CL environment variables](reference/cl-environment-variables.md).
## Developer command prompt shortcuts
-The command prompt shortcuts are installed in a version-specific Visual Studio folder in your Start menu. Here's a list of the base command prompt shortcuts and the build architectures they support:
+The command prompt shortcuts are installed in a version-specific Visual Studio folder in your Windows Start menu. Here's a list of the base command prompt shortcuts and the build architectures they support:
- **Developer Command Prompt** - Sets the environment to use 32-bit, x86-native tools to build 32-bit, x86-native code.
- **x86 Native Tools Command Prompt** - Sets the environment to use 32-bit, x86-native tools to build 32-bit, x86-native code.
@@ -37,121 +53,134 @@ The command prompt shortcuts are installed in a version-specific Visual Studio f
- **x86_x64 Cross Tools Command Prompt** - Sets the environment to use 32-bit, x86-native tools to build 64-bit, x64-native code.
- **x64_x86 Cross Tools Command Prompt** - Sets the environment to use 64-bit, x64-native tools to build 32-bit, x86-native code.
-::: moniker range=">= vs-2019"
+::: moniker range=">= msvc-160"
-The Start menu folder and shortcut names vary depending on the installed version of Visual Studio. If you set one, they also depend on the installation **Nickname**. For example, suppose you installed Visual Studio 2019, and you gave it a nickname of *Latest*. The developer command prompt shortcut is named **Developer Command Prompt for VS 2019 (Latest)**, in a folder named **Visual Studio 2019**.
+The Start menu folder and shortcut names vary depending on the installed version of Visual Studio. If you set one, they also depend on the installation **Nickname**. For example, suppose you installed Visual Studio 2022, and you gave it a nickname of *Latest*. The developer command prompt shortcut is named **Developer Command Prompt for VS 2022 (Latest)**, in a folder named **Visual Studio 2022**.
::: moniker-end
-::: moniker range="= vs-2017"
+::: moniker range="msvc-150"
The Start menu folder and shortcut names vary depending on the installed version of Visual Studio. If you set one, they also depend on the installation **Nickname**. For example, suppose you installed Visual Studio 2017, and you gave it a nickname of *Latest*. The developer command prompt shortcut is named **Developer Command Prompt for VS 2017 (Latest)**, in a folder named **Visual Studio 2017**.
::: moniker-end
-::: moniker range="< vs-2017"
+::: moniker range="< msvc-150"
The Start menu folder and shortcut names vary depending on the installed version of Visual Studio. For example, suppose you installed Visual Studio 2015. The developer command prompt shortcut is named **Developer Command Prompt for VS 2015**.
::: moniker-end
+> [!NOTE]
+> Several command-line tools or tool options may require Administrator permission. If you have permission issues when you use them, we recommend that you open the developer command prompt window by using the **Run as Administrator** option. Right-click to open the shortcut menu for the command prompt window, then choose **More**, **Run as administrator**.
+
### To open a developer command prompt window
-1. On the desktop, open the Windows **Start** menu, and then scroll to find and open the folder for your version of Visual Studio, for example, **Visual Studio 2019**.
+1. On the desktop, open the Windows **Start** menu. In Windows 11, choose the **All apps** button to open the list of installed apps. In Windows 10, the list is open to the left. Scroll down the list to find and open the folder (not the app) for your version of Visual Studio, for example, **Visual Studio 2022**.
1. In the folder, choose the **Developer Command Prompt** for your version of Visual Studio. This shortcut starts a developer command prompt window that uses the default build architecture of 32-bit, x86-native tools to build 32-bit, x86-native code. If you prefer a non-default build architecture, choose one of the native or cross tools command prompts to specify the host and target architecture.
For an even faster way to open a developer command prompt, enter *developer command prompt* in the desktop search box. Then choose the result you want.
+> [!NOTE]
+> By default, the current working directory in a developer command prompt is the root of your Visual Studio installation in the Program Files directory. This isn't an appropriate location for your code and projects. Change the current working directory to another location before you create a project. The IDE creates projects in your user directory, typically in *%USERPROFILE%\\source\\repos*.
+
## Developer command file locations
If you prefer to set the build environment in an existing command prompt window, you can use one of the command files created by the installer. We recommend you set the environment in a new command prompt window. We don't recommend you later switch environments in the same command window.
-::: moniker range=">= vs-2019"
+::: moniker range=">= msvc-170"
+
+The command file location depends on the version of Visual Studio you installed, and on choices you made during installation. For Visual Studio 2019, the typical installation location on a 64-bit system is in *`\Program Files\Microsoft Visual Studio\2022\`*. The *``* may be Community, Professional, Enterprise, BuildTools, or another nickname you supplied.
+
+::: moniker-end
+::: moniker range="= msvc-160"
-The command file location depends on the version of Visual Studio you installed, and on choices you made during installation. For Visual Studio 2019, the typical installation location on a 64-bit system is in \\Program Files (x86)\\Microsoft Visual Studio\\2019\\*edition*. *Edition* may be Community, Professional, Enterprise, BuildTools, or another nickname you supplied.
+The command file location depends on the version of Visual Studio you installed, and on choices you made during installation. For Visual Studio 2019, the typical installation location on a 64-bit system is in *`\Program Files (x86)\Microsoft Visual Studio\2019\`*. The *``* may be Community, Professional, Enterprise, BuildTools, or another nickname you supplied.
::: moniker-end
-::: moniker range="= vs-2017"
+::: moniker range="= msvc-150"
-The command file location depends on the version of Visual Studio you installed, and on choices you made during installation. For Visual Studio 2017, the typical installation location on a 64-bit system is in \\Program Files (x86)\\Microsoft Visual Studio\\2017\\*edition*. *Edition* may be Community, Professional, Enterprise, BuildTools, or another nickname you supplied.
+The command file location depends on the version of Visual Studio you installed, and on choices you made during installation. For Visual Studio 2017, the typical installation location on a 64-bit system is in *`\Program Files (x86)\Microsoft Visual Studio\2017\`*. The *``* may be Community, Professional, Enterprise, BuildTools, or another nickname you supplied.
::: moniker-end
-::: moniker range="< vs-2017"
+::: moniker range="< msvc-150"
-The command file location depends on the Visual Studio version, and the installation directory. For Visual Studio 2015, the typical installation location is in \\Program Files (x86)\\Microsoft Visual Studio 14.0.
+The command file location depends on the Visual Studio version, and the installation directory. For Visual Studio 2015, the typical installation location on a 64-bit system is in *`\Program Files (x86)\Microsoft Visual Studio 14.0`*.
::: moniker-end
-The primary developer command prompt command file, VsDevCmd.bat, is located in the Common7\\Tools subdirectory. When no parameters are specified, it sets the environment to use the x86-native tools to build 32-bit x86 code.
+The primary developer command prompt command file, *`VsDevCmd.bat`*, is located in the *`Common7\Tools`* subdirectory. When no parameters are specified, it sets the environment to use the x86-native tools to build 32-bit x86 code.
-::: moniker range=">= vs-2017"
+::: moniker range=">= msvc-150"
More command files are available to set up specific build architectures. The command files available depend on the Visual Studio workloads and options you've installed. In Visual Studio 2017 and Visual Studio 2019, you'll find them in the VC\\Auxiliary\\Build subdirectory.
::: moniker-end
-::: moniker range="< vs-2017"
+::: moniker range="< msvc-150"
More command files are available to set up specific build architectures. The command files available depend on the Visual Studio workloads and options you've installed. In Visual Studio 2015, they're located in the VC, VC\\bin, or VC\\bin\\*architecture* subdirectories, where *architecture* is one of the native or cross-compiler options.
::: moniker-end
-These command files set default parameters and call VsDevCmd.bat to set up the specified build architecture environment. A typical installation may include these command files:
+These command files set default parameters and call *`VsDevCmd.bat`* to set up the specified build architecture environment. A typical installation may include these command files:
-|Command File|Host and Target architectures|
-|---|---|
-|**vcvars32.bat**| Use the 32-bit x86-native tools to build 32-bit x86 code.|
-|**vcvars64.bat**| Use the 64-bit x64-native tools to build 64-bit x64 code.|
-|**vcvarsx86_amd64.bat**| Use the 32-bit x86-native cross tools to build 64-bit x64 code.|
-|**vcvarsamd64_x86.bat**| Use the 64-bit x64-native cross tools to build 32-bit x86 code.|
-|**vcvarsx86_arm.bat**| Use the 32-bit x86-native cross tools to build ARM code.|
-|**vcvarsamd64_arm.bat**| Use the 64-bit x64-native cross tools to build ARM code.|
-|**vcvarsall.bat**| Use parameters to specify the host and target architectures, Windows SDK, and platform choices. For a list of supported options, call by using a **/help** parameter.|
+| Command File | Host and Target architectures |
+|--|--|
+| *`vcvars32.bat`* | Use the 32-bit x86-native tools to build 32-bit x86 code. |
+| *`vcvars64.bat`* | Use the 64-bit x64-native tools to build 64-bit x64 code. |
+| *`vcvarsx86_amd64.bat`* | Use the 32-bit x86-native cross tools to build 64-bit x64 code. |
+| *`vcvarsamd64_x86.bat`* | Use the 64-bit x64-native cross tools to build 32-bit x86 code. |
+| *`vcvarsx86_arm.bat`* | Use the 32-bit x86-native cross tools to build ARM code. |
+| *`vcvarsamd64_arm.bat`* | Use the 64-bit x64-native cross tools to build ARM code. |
+| *`vcvarsx86_arm64.bat`* | Use the 32-bit x86-native cross tools to build ARM64 code. |
+| *`vcvarsamd64_arm64.bat`* | Use the 64-bit x64-native cross tools to build ARM64 code. |
+| *`vcvarsall.bat`* | Use parameters to specify the host and target architectures, Windows SDK, and platform choices. For a list of supported options, call by using a `/help` parameter. |
> [!CAUTION]
-> The vcvarsall.bat file and other Visual Studio command files can vary from computer to computer. Do not replace a missing or damaged vcvarsall.bat file by using a file from another computer. Rerun the Visual Studio installer to replace the missing file.
+> The *`vcvarsall.bat`* file and other Visual Studio command files can vary from computer to computer. Do not replace a missing or damaged *`vcvarsall.bat`* file by using a file from another computer. Rerun the Visual Studio installer to replace the missing file.
>
-> The vcvarsall.bat file also varies from version to version. If the current version of Visual Studio is installed on a computer that also has an earlier version of Visual Studio, do not run vcvarsall.bat or another Visual Studio command file from different versions in the same command prompt window.
+> The *`vcvarsall.bat`* file also varies from version to version. If the current version of Visual Studio is installed on a computer that also has an earlier version of Visual Studio, do not run *`vcvarsall.bat`* or another Visual Studio command file from different versions in the same command prompt window.
## Use the developer tools in an existing command window
-The simplest way to specify a particular build architecture in an existing command window is to use the vcvarsall.bat file. Use vcvarsall.bat to set environment variables to configure the command line for native 32-bit or 64-bit compilation. Arguments let you specify cross-compilation to x86, x64, ARM, or ARM64 processors. You can target Microsoft Store, Universal Windows Platform, or Windows Desktop platforms. You can even specify which Windows SDK to use, and select the platform toolset version.
+The simplest way to specify a particular build architecture in an existing command window is to use the *`vcvarsall.bat`* file. Use *`vcvarsall.bat`* to set environment variables to configure the command line for native 32-bit or 64-bit compilation. Arguments let you specify cross-compilation to x86, x64, ARM, or ARM64 processors. You can target Microsoft Store, Universal Windows Platform, or Windows Desktop platforms. You can even specify which Windows SDK to use, and select the platform toolset version.
-When used with no arguments, vcvarsall.bat configures the environment variables to use the current x86-native compiler for 32-bit Windows Desktop targets. You can add arguments to configure the environment to use any of the native or cross compiler tools. vcvarsall.bat displays an error message if you specify a configuration that's not installed, or not available on your computer.
+When used with no arguments, *`vcvarsall.bat`* configures the environment variables to use the current x86-native compiler for 32-bit Windows Desktop targets. You can add arguments to configure the environment to use any of the native or cross compiler tools. *`vcvarsall.bat`* displays an error message if you specify a configuration that's not installed, or not available on your computer.
-### vcvarsall syntax
+### `vcvarsall` syntax
-> **vcvarsall.bat** [*architecture*] [*platform_type*] [*winsdk_version*] [**-vcvars_ver=**_vcversion_]
+> **`vcvarsall.bat`** [*`architecture`*] [*`platform_type`*] [*`winsdk_version`*] [**`-vcvars_ver=`***`vcversion`*] [*`spectre_mode`*]
-*architecture*
+*`architecture`*
This optional argument specifies the host and target architecture to use. If *architecture* isn't specified, the default build environment is used. These arguments are supported:
-|*architecture*|Compiler|Host computer architecture|Build output (target) architecture|
-|----------------------------|--------------|----------------------------------|-------------------------------|
-|**x86**|x86 32-bit native|x86, x64|x86|
-|**x86\_amd64** or **x86\_x64**|x64 on x86 cross|x86, x64|x64|
-|**x86_arm**|ARM on x86 cross|x86, x64|ARM|
-|**x86_arm64**|ARM64 on x86 cross|x86, x64|ARM64|
-|**amd64** or **x64**|x64 64-bit native|x64|x64|
-|**amd64\_x86** or **x64\_x86**|x86 on x64 cross|x64|x86|
-|**amd64\_arm** or **x64\_arm**|ARM on x64 cross|x64|ARM|
-|**amd64\_arm64** or **x64\_arm64**|ARM64 on x64 cross|x64|ARM64|
+| *`architecture`* | Compiler | Host computer architecture | Build output (target) architecture |
+|--|--|--|--|
+| `x86` | x86 32-bit native | x86, x64 | x86 |
+| `x86_amd64` or `x86_x64` | x64 on x86 cross | x86, x64 | x64 |
+| `x86_arm` | ARM on x86 cross | x86, x64 | ARM |
+| `x86_arm64` | ARM64 on x86 cross | x86, x64 | ARM64 |
+| `amd64` or `x64` | x64 64-bit native | x64 | x64 |
+| `amd64_x86` or `x64_x86` | x86 on x64 cross | x64 | x86 |
+| `amd64_arm` or `x64_arm` | ARM on x64 cross | x64 | ARM |
+| `amd64_arm64` or `x64_arm64` | ARM64 on x64 cross | x64 | ARM64 |
-*platform_type*
-This optional argument allows you to specify **store** or **uwp** as the platform type. By default, the environment is set to build desktop or console apps.
+*`platform_type`*
+This optional argument allows you to specify **`store`** or **`uwp`** as the platform type. By default, the environment is set to build desktop or console apps.
-*winsdk_version*
-Optionally specifies the version of the Windows SDK to use. By default, the latest installed Windows SDK is used. To specify the Windows SDK version, you can use a full Windows 10 SDK number such as **10.0.10240.0**, or specify **8.1** to use the Windows 8.1 SDK.
+*`winsdk_version`*
+Optionally specifies the version of the Windows SDK to use. By default, the latest installed Windows SDK is used. To specify the Windows SDK version, you can use a full Windows SDK number such as **`10.0.10240.0`**, or specify **`8.1`** to use the Windows 8.1 SDK.
-*vcversion*
+*`vcversion`*
Optionally specifies the Visual Studio compiler toolset to use. By default, the environment is set to use the current Visual Studio compiler toolset.
-::: moniker range=">= vs-2019"
+::: moniker range=">= msvc-160"
Use **-vcvars_ver=14.2x.yyyyy** to specify a specific version of the Visual Studio 2019 compiler toolset.
-Use **-vcvars_ver=14.16** to specify the latest version of the Visual Studio 2017 compiler toolset.
+Use **-vcvars_ver=14.29** to specify the latest version of the Visual Studio 2019 compiler toolset.
::: moniker-end
-::: moniker range="= vs-2017"
+::: moniker range="= msvc-150"
Use **-vcvars_ver=14.16** to specify the latest version of the Visual Studio 2017 compiler toolset.
@@ -161,6 +190,9 @@ Use **-vcvars_ver=14.1x.yyyyy** to specify a specific version of the Visual Stud
Use **-vcvars_ver=14.0** to specify the Visual Studio 2015 compiler toolset.
+*`spectre_mode`*\
+Leave this parameter out to use libraries without Spectre mitigations. Use the value **`spectre`** to use libraries with Spectre mitigations.
+
#### To set up the build environment in an existing command prompt window
1. At the command prompt, use the CD command to change to the Visual Studio installation directory. Then, use CD again to change to the subdirectory that contains the configuration-specific command files. For Visual Studio 2019 and Visual Studio 2017, use the *VC\\Auxiliary\\Build* subdirectory. For Visual Studio 2015, use the *VC* subdirectory.
@@ -171,21 +203,21 @@ Use **-vcvars_ver=14.0** to specify the Visual Studio 2015 compiler toolset.
## Create your own command prompt shortcut
-::: moniker range=">= vs-2019"
+::: moniker range=">= msvc-160"
Open the Properties dialog for a developer command prompt shortcut to see the command target used. For example, the target for the **x64 Native Tools Command Prompt for VS 2019** shortcut is something similar to:
`%comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"`
::: moniker-end
-::: moniker range="= vs-2017"
+::: moniker range="= msvc-150"
Open the Properties dialog for a developer command prompt shortcut to see the command target used. For example, the target for the **x64 Native Tools Command Prompt for VS 2017** shortcut is something similar to:
`%comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"`
::: moniker-end
-::: moniker range="< vs-2017"
+::: moniker range="< msvc-150"
Open the Properties dialog for a developer command prompt shortcut to see the command target used. For example, the target for the **VS2015 x64 Native Tools Command Prompt** shortcut is something similar to:
@@ -193,21 +225,21 @@ Open the Properties dialog for a developer command prompt shortcut to see the co
::: moniker-end
-The architecture-specific batch files set the *architecture* parameter and call vcvarsall.bat. You can pass the same options to these batch files as you would pass to vcvarsall.bat, or you can just call vcvarsall.bat directly. To specify parameters for your own command shortcut, add them to the end of the command in double-quotes. For example, here's a shortcut to build ARM code for UWP on a 64-bit platform, using the latest Windows SDK. To use an earlier compiler toolset, specify the version number. Use something like this command target in your shortcut:
+The architecture-specific batch files set the *`architecture`* parameter and call *`vcvarsall.bat`*. You can pass the same options to these batch files as you would pass to *`vcvarsall.bat`*, or you can just call *`vcvarsall.bat`* directly. To specify parameters for your own command shortcut, add them to the end of the command in double-quotes. For example, here's a shortcut to build ARM code for UWP on a 64-bit platform, using the latest Windows SDK. To use an earlier compiler toolset, specify the version number. Use something like this command target in your shortcut:
-::: moniker range=">= vs-2019"
+::: moniker range=">= msvc-160"
-`%comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm uwp -vcvars_ver=14.16`
+`%comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm uwp -vcvars_ver=14.29`
::: moniker-end
-::: moniker range="= vs-2017"
+::: moniker range="= msvc-150"
-`%comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm uwp -vcvars_ver=14.0`
+`%comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm uwp -vcvars_ver=14.19`
::: moniker-end
-::: moniker range="< vs-2017"
+::: moniker range="< msvc-150"
-`%comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 -vcvars_ver=12.0`
+`%comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 -vcvars_ver=14.0`
::: moniker-end
@@ -217,26 +249,32 @@ Adjust the path to reflect your Visual Studio installation directory. The vcvars
To build a C/C++ project at a command prompt, Visual Studio provides these command-line tools:
-[CL](reference/compiling-a-c-cpp-program.md)
+[`CL`](reference/compiling-a-c-cpp-program.md)
Use the compiler (cl.exe) to compile and link source code files into apps, libraries, and DLLs.
-[Link](reference/linking.md)
+[`Link`](reference/linking.md)
Use the linker (link.exe) to link compiled object files and libraries into apps and DLLs.
-[NMAKE](reference/nmake-reference.md)
-Use NMAKE (nmake.exe) on Windows to build C++ projects based on a traditional makefile.
-
-When you build on the command line, the F1 command isn't available for instant help. Instead, you can use a search engine to get information about warnings, errors, and messages. You can also download and use the offline help files. To use the search in [docs.microsoft.com](https://docs.microsoft.com/cpp/), enter your query in the search box at the top of any article.
+When you build on the command line, the F1 command isn't available for instant help. Instead, you can use a search engine to get information about warnings, errors, and messages. You can also download and use the offline help files. To use the search in Microsoft Learn, enter your query in the search box at the top of any article.
## Command-line project management tools
-The Visual Studio IDE uses a native project build system based on MSBuild. You can invoke MSBuild directly, or use the native project system without using the IDE:
+By default, the Visual Studio IDE uses native project build systems based on MSBuild. You can invoke MSBuild directly to build projects without using the IDE. You can also use the `devenv` command to use Visual Studio to build projects and solutions. Visual Studio also supports build systems based on CMake or NMake.
+
+[`MSBuild`](msbuild-visual-cpp.md)\
+Use MSBuild (msbuild.exe) and a project file (.vcxproj) to configure a build and invoke the toolset without loading the Visual Studio IDE. It's equivalent to running the **Build** project or **Build Solution** command in the Visual Studio IDE. MSBuild has advantages over the IDE when you build at the command line. You don't have to install the full IDE on all your build servers and build pipelines. You avoid the extra overhead of the IDE. MSBuild runs in containerized build environments, and supports a [binary logger](https://msbuildlog.com/).
+
+[`DEVENV`](/visualstudio/ide/reference/devenv-command-line-switches)\
+Use DEVENV (devenv.exe) combined with a command-line switch such as **`/Build`** or **`/Clean`** to execute certain build commands without displaying the Visual Studio IDE.
-[MSBuild](msbuild-visual-cpp.md)
-Use MSBuild (msbuild.exe) and a project file (.vcxproj) to configure a build and invoke the toolset indirectly. It's equivalent to running the **Build** project or **Build Solution** command in the Visual Studio IDE. Running MSBuild from the command line is an advanced scenario and not commonly recommended. Starting in Visual Studio version 16.5, MSBuild doesn't use the command-line environment to control the toolset and libraries used.
+[`CMake`](../build/cmake-projects-in-visual-studio.md)\
+CMake (cmake.exe) is a cross-platform, open-source tool for defining build processes that run on multiple platforms. CMake can configure and control native build tools for its supported platforms, such as MSBuild and Make. For more information about CMake, see the [CMake documentation](https://cmake.org/cmake/help/latest/index.html#).
-[DEVENV](/visualstudio/ide/reference/devenv-command-line-switches)
-Use DEVENV (devenv.exe) combined with a command-line switch such as **/Build** or **/Clean** to execute certain build commands without displaying the Visual Studio IDE. In general, DEVENV is preferred over using MSBuild directly, because you can let Visual Studio handle the complexities of MSBuild. Starting in Visual Studio version 16.5, DEVENV does not use the command-line environment to control the toolset and libraries used.
+[`NMAKE`](reference/nmake-reference.md)\
+Use NMAKE (nmake.exe) to build C++ projects by using a traditional makefile.
+
+> [!NOTE]
+> Starting in Visual Studio 2019 version 16.5, MSBuild and DEVENV don't use the command-line environment to control the toolset and libraries used.
## In this section
@@ -254,9 +292,6 @@ Describes how to create and compile a C++/CLI program that uses the .NET Framewo
[Walkthrough: Compiling a C++/CX program on the command line](walkthrough-compiling-a-cpp-cx-program-on-the-command-line.md)
Describes how to create and compile a C++/CX program that uses the Windows Runtime.
-[Set the path and environment variables for command-line builds](setting-the-path-and-environment-variables-for-command-line-builds.md)
-How to set environment variables to use a 32-bit or 64-bit toolset to target x86, x64, ARM, and ARM64 platforms.
-
[NMAKE reference](reference/nmake-reference.md)
Provides links to articles that describe the Microsoft Program Maintenance Utility (NMAKE.EXE).
diff --git a/docs/build/calling-dll-functions-from-visual-basic-applications.md b/docs/build/calling-dll-functions-from-visual-basic-applications.md
index baaf170905..38bcce3a90 100644
--- a/docs/build/calling-dll-functions-from-visual-basic-applications.md
+++ b/docs/build/calling-dll-functions-from-visual-basic-applications.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Calling DLL Functions from Visual Basic Applications"
title: "Calling DLL Functions from Visual Basic Applications"
ms.date: "11/04/2016"
helpviewer_keywords: ["functions [C++], calling DLL functions from Visual Basic", "DLL functions [C++]", "function calls [C++], DLL functions", "DLLs [C++], calling", "calling DLL functions from VB applications [C++]", "__stdcall keyword [C++]", "DLL functions [C++], calling"]
ms.assetid: 282f7fbf-a0f2-4b9f-b277-1982710be56c
+ms.topic: concept-article
---
# Calling DLL Functions from Visual Basic Applications
diff --git a/docs/build/checking-for-memory-overwrites.md b/docs/build/checking-for-memory-overwrites.md
index 62799a88a5..5c8869aca1 100644
--- a/docs/build/checking-for-memory-overwrites.md
+++ b/docs/build/checking-for-memory-overwrites.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Checking for Memory Overwrites"
title: "Checking for Memory Overwrites"
ms.date: "11/04/2016"
helpviewer_keywords: ["memory, overwrites"]
ms.assetid: da7c5d77-a267-415f-a8ab-ee5ce5bfc286
+ms.topic: concept-article
---
# Checking for Memory Overwrites
diff --git a/docs/build/clang-support-cmake.md b/docs/build/clang-support-cmake.md
index 84069fcb8b..157c3259d9 100644
--- a/docs/build/clang-support-cmake.md
+++ b/docs/build/clang-support-cmake.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Clang/LLVM support in Visual Studio CMake projects"
title: "Clang/LLVM support in Visual Studio CMake projects"
ms.date: "07/01/2019"
ms.description: "Configure a CMake project in Visual Studio to use the Clang/LLVM toolchain."
@@ -6,25 +7,37 @@ helpviewer_keywords: ["Clang support for C++ CMake projects"]
---
# Clang/LLVM support in Visual Studio CMake projects
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
-Clang support is available in Visual Studio 2019.
+Clang support is available starting in Visual Studio 2019.
::: moniker-end
-
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
You can use Visual Studio with Clang to edit and debug C++ CMake projects that target Windows or Linux.
-**Windows**: Visual Studio 2019 version 16.1 includes support for editing, building, and debugging with Clang/LLVM in CMake projects targeting Windows.
+**Windows**: Starting in Visual Studio 2019 version 16.1, Visual Studio includes support for editing, building, and debugging with Clang/LLVM in CMake projects targeting Windows.
**Linux**: For Linux CMake projects, no special Visual Studio support is required. You can install Clang using your distro's package manager, and add the appropriate commands in the CMakeLists.txt file.
## Install
+::: moniker-end
+::: moniker range="msvc-160"
+
+For the best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have those, you can install them by opening the Visual Studio Installer and choosing **C++ Clang compiler for Windows** under **Desktop development with C++** optional components. You may prefer to use an existing Clang installation on your machine; if so, choose the **C++ Clang-cl for v142 build tools** or **C++ Clang-cl for v143 build tools** component.
-For best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have those, you can install them by opening the Visual Studio Installer and choosing **C++ Clang compiler for Windows** under **Desktop development with C++** optional components. When using a custom Clang installation, check the **C++ Clang-cl for v142 build tools** component.
+
+
+::: moniker-end
+::: moniker range="msvc-170"
+
+For the best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have those, you can install them by opening the Visual Studio Installer and choosing **C++ Clang compiler for Windows** under **Desktop development with C++** optional components. You may prefer to use an existing Clang installation on your machine; if so, choose the **MSBuild support for LLVM (clang-cl) toolset** component.
+
+
+
+::: moniker-end
+::: moniker range=">=msvc-160"
-
## Create a new configuration
@@ -34,11 +47,11 @@ To add a new Clang configuration to a CMake project:
1. Under **Configurations**, press the **Add Configuration** button:
- 
+ 
1. Choose the desired Clang configuration (note that separate Clang configurations are provided for Windows and Linux), then press **Select**:
- 
+ 
1. To make modifications to this configuration, use the **CMake Settings Editor**. For more information, see [Customize CMake build settings in Visual Studio](customize-cmake-settings.md).
@@ -50,7 +63,7 @@ To modify an existing configuration to use Clang, follow these steps:
1. Under **General** select the **Toolset** dropdown and choose the desired Clang toolset:
- 
+ 
## Custom Clang locations
@@ -61,7 +74,7 @@ By default, Visual Studio looks for Clang in two places:
You can specify another location by setting the **CMAKE_C_COMPILER** and **CMAKE_CXX_COMPILER** CMake variables in **CMake Settings**:
-
+
## Clang compatibility modes
@@ -71,10 +84,10 @@ You can modify these values in **CMake Settings** under **CMake variables and ca
## Edit, build, and debug
-After you have set up a Clang configuration, you can build and debug the project. Visual Studio detects that you are using the Clang compiler and provides IntelliSense, highlighting, navigation, and other editing features. Errors and warnings are displayed in the **Output Window**.
+After you have set up a Clang configuration, you can build and debug the project. Visual Studio detects that you're using the Clang compiler and provides IntelliSense, highlighting, navigation, and other editing features. Errors and warnings are displayed in the **Output Window**.
-When debugging, you can use breakpoints, memory and data visualization, and most other debugging features. Some compiler-dependent features such as Edit and Continue are not available for Clang configurations.
+When debugging, you can use breakpoints, memory and data visualization, and most other debugging features. Some compiler-dependent features such as Edit and Continue aren't available for Clang configurations.
-
+
::: moniker-end
diff --git a/docs/build/clang-support-msbuild.md b/docs/build/clang-support-msbuild.md
index 1a36c26d99..6e44fbb42a 100644
--- a/docs/build/clang-support-msbuild.md
+++ b/docs/build/clang-support-msbuild.md
@@ -1,36 +1,65 @@
---
-title: "Clang/LLVM support in Visual Studio Visual Studio projects"
-ms.date: "06/02/2020"
+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"]
---
# Clang/LLVM support in Visual Studio projects
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
-Clang support for both CMake and MSBuild projects is available in Visual Studio 2019.
+Clang/LLVM support for both CMake and MSBuild projects is available in Visual Studio 2019 and Visual Studio 2022.
::: moniker-end
+::: moniker range=">=msvc-160"
-::: moniker range="vs-2019"
+You can use Visual Studio 2019 version 16.2 and later with Clang/LLVM to edit, build, and debug C++ Visual Studio projects (MSBuild) that target Windows or Linux.
-You can use Visual Studio 2019 version 16.2 with Clang to edit, build, and debug C++ Visual Studio projects (MSBuild) that target Windows or Linux.
+::: moniker-end
+
+::: moniker range="=msvc-160"
+## Install
+For the best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have the tools, you can install them by opening the Visual Studio Installer and choosing **C++ Clang tools for Windows** under **Desktop development with C++** optional components. You may prefer to use an existing Clang installation on your machine; if so, choose **C++ Clang-cl for v142 build tools** or **C++ Clang-cl for v143 build tools**.
+::: moniker-end
+::: moniker range=">=msvc-170"
## Install
-For best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have those, you can install them by opening the Visual Studio Installer and choosing **C++ Clang tools for Windows** under **Desktop development with C++** optional components. If you prefer to use an existing Clang installation on your machine, choose the **C++ Clang-cl for v142 build tools.** optional component. The Microsoft C++ Standard Library currently requires at least Clang 8.0.0; the bundled version of Clang will automatically be updated to stay current with updates in the Microsoft implementation of the Standard Library.
+For the best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have the tools, you can install them by opening the Visual Studio Installer and choosing **C++ Clang tools for Windows** under **Desktop development with C++** optional components. You may prefer to use an existing Clang installation on your machine; if so, choose **MSBuild support for LLVM (clang-cl) toolset**.
+::: moniker-end
-
+::: moniker range=">=msvc-160"
+The Microsoft C++ Standard Library requires at least Clang 8.0.0.
+::: moniker-end
+
+::: moniker range="=msvc-160"
+:::image type="complex" source="media/clang-install-vs2019.png" alt-text="Screenshot of the Visual Studio 2019 installer":::
+The Individual components tab is selected in the installer. C++ Clang Compiler for Windows is selected. C++ Clang-cl for v142 build tools (x64/x86) is also selected.
+:::image-end:::
+
+::: moniker-end
+::: moniker range=">=msvc-170"
+:::image type="complex" source="media/clang-install-vs2022.png" alt-text="Screenshot of the Visual Studio 2022 installer."
+The Individual components tab is selected in the installer. C++ Clang Compiler for Windows is selected. MSBuild support for LLVM (clang-cl) toolset is also selected.
+::: image-end :::
+
+::: moniker-end
+
+::: moniker range=">=msvc-160"
+Later versions of Visual Studio provide newer versions of the Clang toolset. The bundled version of Clang gets updated automatically to stay current with updates in the Microsoft implementation of the Standard Library. For example, Visual Studio 2019 version 16.11 includes Clang v12.
## Configure a Windows project to use Clang tools
To configure a Visual Studio project to use Clang, right-click on the project node in **Solution Explorer** and choose **Properties**. Typically, you should first choose **All configurations** at the top of the dialog. Then, under **General** > **Platform Toolset**, choose **LLVM (clang-cl)** and then **OK**.
-
+:::image type="complex" source="media/llvm-msbuild-prop-page.png" alt-text="Screenshot of the Visual Studio project Property Pages dialog box.":::
+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 are using the Clang tools that are bundled with Visual Studio, no additional 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 and 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 are using a custom Clang installation, you can either modify **Project** > **Properties** > **VC++ DIrectories** > **Configuration Properties** > **Executable Directories** by adding the custom Clang installation root as the first directory there, or change the value of the `LLVMInstallDir` property. See [Set a custom LLVM location](#custom_llvm_location) for more information.
+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).
## Configure a Linux project to use Clang tools
@@ -40,31 +69,54 @@ To configure a Visual Studio Linux project to use Clang:
1. Right-click on the project node in **Solution Explorer** and choose **Properties**.
1. Typically, you should first choose **All configurations** at the top of the dialog.
-1. Under **General** > **Platform Toolset**, choose **WSL_Clang_1_0** if you are using Windows Subsystem for Linux, or **Remote_Clang_1_0** if you are using a remote machine or VM.
+1. Under **General** > **Platform Toolset**, choose **Clang for Windows Subsystem for Linux** if you're using Windows Subsystem for Linux (WSL). Choose **Clang for Remote Linux** if you're using a remote machine or VM.
1. Press **OK**.
-
+:::image type="complex" source="media/clang-msbuild-prop-page.png" alt-text="Screenshot of the Visual Studio 2019 project Property Pages dialog box":::
+The project properties page is open to the Configuration Properties > General page. Platform Toolset is selected and from the list of options, LLVM (clang- c l) is selected."
+:::image-end:::
-On Linux, Visual Studio by default uses the first Clang location that it encounters in the PATH environment property. If you are using a custom Clang installation, then you must change the value of the `LLVMInstallDir` property or else substitute a path under **Project** > **Properties** > **VC++ DIrectories** > **Configuration Properties** > **Executable Directories**. See [Set a custom LLVM location](#custom_llvm_location) for more information.
+On Linux, Visual Studio by default uses the first Clang location that it finds in the PATH environment property. If you're using a custom Clang installation, then either change the value of the `LLVMInstallDir` property or else enter the path under **Project** > **Properties** > **Configuration Properties** > **VC++ DIrectories** > **Executable Directories**. For more information, see [Set a custom LLVM location](#custom_llvm_location).
-## Set a custom LLVM location
+## Set a custom LLVM location and toolset
-You can set a custom path for LLVM for one or more projects by creating a *Directory.build.props* file and adding that file to the root folder of any project. You can add it to the root solution folder to apply it to all projects in the solution. The file should look like this (but substitute your actual path):
+To set a custom path to LLVM and set a custom LLVM toolset version for one or more projects, create a *Directory.build.props* file. Then, add that file to the root folder of any project. You can add it to the root solution folder to apply it to all projects in the solution. The file should look like this example (but use your actual LLVM path and version number):
```xml
- c:\MyLLVMRootDir
+ C:\MyLLVMRootDir
+ 15.0.0
```
-## Set additional properties, edit, build, and debug
+## Set a custom LLVM toolset version in the IDE
+
+Starting in Visual Studio 2019 version 16.9, you can set a custom toolset version for LLVM in Visual Studio. To set this property in a project:
+
+1. Open the project's **Property Pages** dialog box. For more information, see [Set C++ compiler and build properties](./working-with-project-properties.md).
+
+1. Select the **Configuration Properties** > **General** property page.
+
+1. Modify the **Platform Toolset** property to *LLVM (clang-cl)*, if it isn't already set. Choose **Apply** to save your changes.
+
+1. Select the **Configuration Properties** > **Advanced** property page.
+
+1. Modify the **LLVM Toolset Version** property to your preferred version, and then choose **OK** to save your changes.
+
+The **LLVM Toolset Version** property only appears when the LLVM platform toolset is selected.
+
+When you add a `Directory.build.props` file to a project or solution, the settings appear as the default in the project Property Pages dialog. However, changes to these properties in Visual Studio override the settings in the `Directory.build.props` file.
+
+## Set properties, edit, build, and debug
-After you have set up a Clang configuration, right-click again on the project node and choose **Reload project**. You can now build and debug the project using the Clang tools. Visual Studio detects that you are using the Clang compiler and provides IntelliSense, highlighting, navigation, and other editing features. Errors and warnings are displayed in the **Output Window**. The project property pages for a Clang configuration are very similar to those for MSVC, although some compiler-dependent features such as Edit and Continue are not available for Clang configurations. To set a Clang compiler or linker option that is not available in the property pages, you can add it manually in the property pages under **Configuration Properties** > **C/C++ (or Linker)** > **Command Line** > **Additional Options**.
+After you have set up a Clang configuration, right-click again on the project node and choose **Reload project**. You can now build and debug the project using the Clang tools. Visual Studio detects that you're using the Clang compiler and provides IntelliSense, highlighting, navigation, and other editing features. Errors and warnings are displayed in the **Output Window**. The project property pages for a Clang configuration are similar to the ones for MSVC. However, some compiler-dependent features such as Edit and Continue aren't available for Clang configurations. You can set a Clang compiler or linker option that isn't available in the property pages. Add it manually in the property pages under **Configuration Properties** > **C/C++ (or Linker)** > **Command Line** > **Additional Options**.
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");.
+:::image-end:::
::: moniker-end
diff --git a/docs/build/cmake-predefined-configuration-reference.md b/docs/build/cmake-predefined-configuration-reference.md
index ffa7bd878c..d9597573d8 100644
--- a/docs/build/cmake-predefined-configuration-reference.md
+++ b/docs/build/cmake-predefined-configuration-reference.md
@@ -1,20 +1,21 @@
---
+description: "Learn more about: CMake predefined build configurations"
title: "CMake predefined configuration reference"
ms.description: "Visual Studio provides several predefined build configurations for CMake projects on Linux, Windows, ARM, and IoT."
-ms.date: "06/12/2019"
+ms.date: 08/03/2021
helpviewer_keywords: ["CMake redefined configurations"]
---
# CMake predefined build configurations
-::: moniker range="vs-2015"
+::: moniker range="msvc-140"
CMake projects are supported in Visual Studio 2017 and later.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
-In a CMake project, build configurations are stored in a CMakeSettings.json file. When you choose **Manage Configurations** from the build configuration dropdown in the main toolbar, a dialog appears that shows the default CMake configurations available in Visual Studio:
+In a CMake project, build configurations are stored in a *`CMakeSettings.json`* file. When you choose **Manage Configurations** from the build configuration dropdown in the main toolbar, a dialog appears that shows the default CMake configurations available in Visual Studio:
- x86 Debug
- x86 Release
@@ -27,7 +28,7 @@ In a CMake project, build configurations are stored in a CMakeSettings.json file
- MinGW Debug
- MinGW Release
-When you choose a configuration, it is added to the *CMakeSettings.json* file in the project's root folder. You can then use it to build your project. For information about the configuration properties, see [CMakeSettings reference](cmakesettings-reference.md).
+When you choose a configuration, it's added to the *`CMakeSettings.json`* file in the project's root folder. You can then use it to build your project. For information about the configuration properties, see [CMakeSettings reference](cmakesettings-reference.md).
## Linux predefined build configurations:
@@ -59,7 +60,7 @@ When you choose a configuration, it is added to the *CMakeSettings.json* file in
"inheritEnvironments": [
"linux_x64"
]
- }
+}
{
"name": "Linux-Release",
@@ -88,9 +89,8 @@ When you choose a configuration, it is added to the *CMakeSettings.json* file in
"inheritEnvironments": [
"linux_x64"
]
- },
- ```
-
+},
+```
You can use these optional settings for more control:
@@ -347,9 +347,9 @@ These options allow you to run commands on the remote system before and after bu
::: moniker-end
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
-In a CMake project, build configurations are stored in a CMakeSettings.json file. When you choose **Manage Configurations** from the build configuration dropdown in the main toolbar, a dialog appears that shows the default CMake configurations available in Visual Studio:
+In a CMake project, build configurations are stored in a *`CMakeSettings.json`* file. When you choose **Manage Configurations** from the build configuration dropdown in the main toolbar, a dialog appears that shows the default CMake configurations available in Visual Studio:
- x86 Debug
- x86 Clang Debug
@@ -373,7 +373,7 @@ In a CMake project, build configurations are stored in a CMakeSettings.json file
- WSL Clang Release
- Clang
-When you choose a configuration, it is added to the CMakeSettings.json file in the project's root folder. You can then use it to build your project.
+When you choose a configuration, it's added to the *`CMakeSettings.json`* file in the project's root folder. You can then use it to build your project.
```json
{
diff --git a/docs/build/cmake-presets-json-reference.md b/docs/build/cmake-presets-json-reference.md
new file mode 100644
index 0000000000..07b08b79e8
--- /dev/null
+++ b/docs/build/cmake-presets-json-reference.md
@@ -0,0 +1,118 @@
+---
+description: "Schema reference for `CMakePresets.json` and `CMakeUserPresets.json` Microsoft vendor maps"
+title: "CMakeUserPresets.json"
+ms.date: 02/07/2022
+helpviewer_keywords: ["CMake in Visual C++"]
+---
+# `CMakePresets.json` and `CMakeUserPresets.json` Microsoft vendor maps
+
+CMake supports two files, *`CMakePresets.json`* and *`CMakeUserPresets.json`*, that allow users to specify common configure, build, and test options and share them with others.
+
+*`CMakePresets.json`* and *`CMakeUserPresets.json`* can be used to drive CMake in Visual Studio, in Visual Studio Code, in a Continuous Integration (CI) pipeline, and from the command line.
+
+*`CMakePresets.json`* is intended to save project-wide builds, and *`CMakeUserPresets.json`* is intended for developers to save their own local builds. The schema for both files is identical.
+
+*`CMakePresets.json`* and *`CMakeUserPresets.json`* support vendor maps to store vendor-specific information. Microsoft maintains two vendor maps with options specific to Visual Studio and Visual Studio Code. Here we document two Microsoft vendor maps and vendor macros. For more information about the rest of the schema, see the official [CMake documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html). It includes information about Configure Presets, Build Presets, and Test Presets.
+
+For more information about how to use *`CMakePresets.json`* in Visual Studio, see [Configure and build with CMake Presets in Visual Studio](cmake-presets-vs.md)
+
+For more information about how to use *`CMakePresets.json`* in Visual Studio Code, see [Configure and build with CMake Presets in VS Code](https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/cmake-presets.md)
+
+## Visual Studio Settings vendor map
+
+One vendor map with the vendor URI `microsoft.com/VisualStudioSettings/CMake/` is allowed per Configure Preset and contains options specific to CMake integration in Visual Studio and Visual Studio Code. All options in the vendor map apply to Visual Studio. Options that apply to both Visual Studio and Visual Studio Code have been explicitly marked.
+
+All settings in the Visual Studio Settings vendor map are optional and inherited from Configure Presets specified by the `inherits` key. Only options that have been modified are written to the file. The Visual Studio Settings vendor map is supported by both *`CMakePresets.json`* and *`CMakeUserPresets.json`*.
+
+The options in the Visual Studio Settings vendor map don't affect the construction of the CMake or CTest command line. It's so the same *`CMakePresets.json`* file can be used to drive CMake with Visual Studio, Visual Studio Code, and from the command line. The exceptions are the `cacheRoot` and `cmakeGenerateCommand` options. These options are specific to the [Open Existing Cache](https://devblogs.microsoft.com/cppblog/open-existing-cmake-caches-in-visual-studio/) scenario in Visual Studio and can't be reproduced from the command line.
+
+| Setting | Description |
+|--|--|
+| `hostOS` | An array of supported operating systems (OS). Accepted values are `Windows`, `Linux`, and `macOS`.
The value of `hostOS` is used by Visual Studio and Visual Studio Code to hide Configure Presets that don't apply to the OS of the target system and provide a better user experience.
If `hostOS` is unspecified, then Visual Studio and Visual Studio Code will always show all Configure Presets for selection. This field can also be a string, which is equivalent to an array containing one string
This option is supported by both Visual Studio and Visual Studio Code. |
+| `intelliSenseMode` | Specifies the mode used for computing IntelliSense information in Visual Studio with the format `--`.
Accepted values:
`android-clang-arm`
`android-clang-arm64`
`android-clang-x6`
`android-clang-x86`
`ios-clang-ar`
`ios-clang-arm64`
`ios-clang-x6`
`ios-clang-x86`
`linux-gcc-arm`
`linux-gcc-x64`
`linux-gcc-x86`
`windows-clang-arm`
`windows-clang-arm64`
`windows-clang-x64`
`windows-clang-x86`
`windows-msvc-arm`
`windows-msvc-arm64`
`windows-msvc-x64`
`windows-msvc-x86`
If `intelliSenseMode` is unspecified, then Visual Studio uses the IntelliSense mode that matches your specified compilers and target architecture. `intelliSenseMode` is often used to provide improved IntelliSense for cross-compilation.
In Visual Studio 2019, you must explicitly specify a clang IntelliSense mode when building with clang or clang-cl. |
+| `intelliSenseOptions` | A map of extra IntelliSense configuration options.
`useCompilerDefaults`: A `bool` that specifies whether to use the compiler default defines and include paths for IntelliSense. Should only be `false` if the compilers in use don't support gcc-style arguments. Defaults to `true`.
`additionalCompilerArgs`: An array of extra options to control IntelliSense in Visual Studio. This option supports macro expansion. |
+| `enableMicrosoftCodeAnalysis` | A `bool` that enables Microsoft code analysis in Visual Studio when building with `cl` or `clang-cl`. Defaults to `false`. |
+| `codeAnalysisRuleset` | Specifies the ruleset to use when running Microsoft code analysis in Visual Studio. You can use a path to a ruleset file, or the name of a ruleset file installed with Visual Studio. This option supports macro expansion. |
+| `disableExternalAnalysis` | A `bool` that specifies whether code analysis should run on external headers in Visual Studio. |
+| `codeAnalysisExternalRuleset` | Specifies the ruleset to use when running Microsoft code analysis on external header in Visual Studio. You can use a path to a ruleset file, or the name of a ruleset file installed with Visual Studio. This option supports macro expansion. |
+| `enableClangTidyCodeAnalysis` | A bool that enables clang-tidy code analysis in Visual Studio when building with `clang-cl`. Defaults to `false`. |
+| `clangTidyChecks` | A comma-separated list of warnings passed to clang-tidy when running clang-tidy code analysis in Visual Studio. Wildcards are allowed, and the `-` prefix will remove checks. |
+| `cacheRoot` | Specifies the path to a CMake cache. This directory should contain an existing *`CMakeCache.txt`* file. This key is only supported by the Open Existing Cache scenario in Visual Studio. This option supports macro expansion. |
+| `cmakeGenerateCommand` | A command-line tool (specified as a command-line program and arguments, for example, **`gencache.bat debug`**) to generate the CMake cache. This command runs in the shell using the specified environment of the preset when CMake configure is invoked. This key is only supported by the [Open Existing Cache](https://devblogs.microsoft.com/cppblog/open-existing-cmake-caches-in-visual-studio/) scenario in Visual Studio. This option supports macro expansion. |
+
+## Visual Studio Remote Settings vendor map
+
+One vendor map with the vendor URI `microsoft.com/VisualStudioRemoteSettings/CMake/` is allowed per Configure Preset and contains options specific to remote development in Visual Studio. Remote development means you're invoking CMake on a remote SSH connection or WSL. None of the options in the Visual Studio Remote Settings vendor map apply to Visual Studio Code.
+
+All settings in the Visual Studio Remote Settings vendor map are optional and inherited from Configure Presets specified by the `inherits` key. Only options that have been modified are written to the file. The Visual Studio Remote Settings vendor map is supported by both *`CMakePresets.json`* and *`CMakeUserPresets.json`*.
+
+The options in the Visual Studio Settings vendor map don't affect the construction of the CMake or CTest command line. It's so the same *`CMakePresets.json`* file can be used to drive CMake with Visual Studio, Visual Studio Code, and from the command line.
+
+Many of the options in the Visual Studio Remote Settings vendor map are ignored when targeting WSL1. It's because the WSL1 toolset executes all commands locally and relies on Windows drives mounted under the `/mnt` folder to access local source files from WSL1. No source file copy is required. Options that are ignored when targeting WSL1 have been explicitly marked.
+
+| Setting | Description |
+|--|--|
+| `sourceDir` | Path to the directory on the remote system where the project will be copied. Defaults to `$env{HOME}/.vs/$ms{projectDirName}`. This option supports macro expansion.
In remote copy scenarios, the macro `${sourceDir}` evaluates to the project source directory on the remote system and not the project source directory on the Windows machine. Remote copy scenarios include targeting a remote SSH connection. In these cases, the project source directory on the remote system is determined by the value of `sourceDir` in the Visual Studio Remote Settings vendor map. This option is ignored when targeting WSL1. |
+| `copySources` | If `true`, Visual Studio will copy sources from Windows to the remote system. Set to `false` if you manage file synchronization yourself. Defaults to `true`. This option is ignored when targeting WSL1. |
+| `copySourcesOptions` | An object of options related to the source copy from Windows to the remote system. This object is ignored when targeting WSL1.
`copySourcesOptions.exclusionList`: A list of paths to be excluded when copying source files to the remote system. A path can be the name of a file or directory, or a relative path from the root of the copy. Defaults to `[ ".vs", ".git", "out" ]`. This option supports macro expansion.
`copySourcesOptions.method`: The method used to copy source files to the remote system. Accepted values are `rsync` and `sftp`. Defaults to `rsync`.
`copySourcesOptions.concurrentCopies`: The number of concurrent copies used during the synchronization of sources to the remote system. Defaults to `5`.
`copySourcesOptions.outputVerbosity`: The verbosity level of source copy operations to the remote system. Accepted levels are `Normal`, `Verbose`, and `Diagnostic`. Defaults to `Normal`. |
+| `rsyncCommandArgs` | A list of command-line arguments passed to `rsync`. Defaults to `[ "-t", "--delete", "--delete-excluded" ]`. This option supports macro expansion and is ignored when targeting WSL1. |
+| `copyBuildOutput` | Specifies whether to copy build output from the remote system back to Windows. Defaults to `false`. This option is ignored when targeting WSL1. |
+| `copyOptimizations` | An object of options related to source copy optimizations. These options are ignored when targeting WSL1.
`copyOptimizations.maxSmallChange`: The maximum number of files to copy using sftp instead of rsync. Defaults to 10.
`copyOptimizations.useOptimizations`: Specifies the copy optimizations in use. Accepted values are no copy optimizations (`None`), rsync only optimizations (`RsyncOnly`), or rsync and sftp optimizations (`RsyncAndSftp`). Defaults to `RsyncAndSftp`.
`copyOptimizations.rsyncSingleDirectoryCommandArgs`: A list of command-line arguments passed to rsync when copying the contents of a single directory to the remote system. Defaults to `[ "-t", "-d" ]`. This option supports macro expansion. |
+| `copyAdditionalIncludeDirectoriesList` | A list of paths to remote header directories to be copied locally for IntelliSense. This option supports macro expansion. |
+| `copyExcludeDirectoriesList` | A list of paths to remote header directories to not be copied locally for IntelliSense. This option supports macro expansion. |
+| `forceWSL1Toolset` | If `true`, Visual Studio will always use the WSL1 toolset when targeting WSL from Visual Studio. The WSL1 toolset executes all commands locally and relies on Windows drives mounted under the `/mnt` folder to access local source files from WSL. These options may be slower with WSL2. Defaults to `false`.
The WSL1 toolset will always be used in Visual Studio 2019 version 16.10. This option will be relevant once native support for WSL2 is available. |
+
+## Remote pre-build and post-build events
+
+Options for a `remotePrebuildEvent` and `remotePostbuildEvent` have been deprecated with the adoption of *`CMakePresets.json`*.
+
+Encode pre-build, pre-link, and post-build events in your *`CMakeLists.txt`* using [`add_custom_command`](https://cmake.org/cmake/help/latest/command/add_custom_command.html#build-events). It ensures the same behavior when building with Visual Studio and from the command line.
+
+If you need behavior that is specific to Visual Studio, you can add a custom remote task in *`tasks.vs.json`*. To get started, right-click on your root *`CMakeLists.txt`* in the **Solution Explorer** from **Folder View** and select **Configure Tasks**. You can then [add a new remote task](./tasks-vs-json-schema-reference-cpp.md#remote-properties) to your *`tasks.vs.json`* file.
+
+The following remote task creates a directory called test on the remote Linux system:
+
+```json
+{
+ "taskLabel": "mkdir",
+ "appliesTo": "CMakeLists.txt",
+ "type": "remote",
+ "command": "mkdir test",
+ "remoteMachineName": "localhost"
+ }
+```
+
+Right-click on any *`CMakeLists.txt`* and select the **mkdir** option to execute this task.
+
+The value of `remoteMachineName` must match the Host Name of a connection in the **Connection Manager**.
+
+## Microsoft vendor macros
+
+The two Microsoft vendor maps, `Visual Studio Settings` and `Visual Studio Remote Settings`, support all the macros defined by CMake. Our vendor maps support all the macros defined by CMake. For more information, see [cmake-presets Macro Expansion](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#macro-expansion). All macros and environment variables are expanded before being passed to CMake.
+
+Visual Studio supports vendor macros with the prefix `ms`. Microsoft vendor macros can only be used in Microsoft vendor maps. CMake can't use presets that have vendor macros outside of a vendor map.
+
+|Macro |Description |
+|---------|---------|
+|`$ms{projectDirName}`| Evaluates to the name of the open folder in Visual Studio. This macro is used to set the default value of `sourceDir` in remote copy scenarios. This macro is not supported by Visual Studio Code. Use `${sourceDirName}` instead. |
+
+## Environment variables
+
+|Macro |Description |
+|---------|---------|
+| `$env{}`
`$penv{}`| Reference environment variables using this syntax supported by CMake. For more information, see [cmake-presets Macro Expansion](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#macro-expansion). |
+
+## Deprecated macros
+
+A few macros that were supported by *`CMakeSettings.json`* have been deprecated with the adoption of *`CMakePresets.json`*.
+
+Use the macros supported by CMake to construct your file paths. When you use the macros, it ensures that the same *`CMakePresets.json`* file works inside Visual Studio and from the command line.
+
+| Deprecated macro | Recommendation |
+|--|--|
+| `${projectFile}` | `${sourceDir}/CMakeLists.txt` |
+| `${thisFile}` | `${sourceDir}/CMakePresets.json` |
+
+## Accepted shell syntax
+
+Use the `$env{HOME}` syntax to reference `$HOME` when constructing Linux paths in the Microsoft vendor maps.
diff --git a/docs/build/cmake-presets-vs.md b/docs/build/cmake-presets-vs.md
new file mode 100644
index 0000000000..87d3fd7146
--- /dev/null
+++ b/docs/build/cmake-presets-vs.md
@@ -0,0 +1,493 @@
+---
+title: Configure and build with CMake Presets
+description: "Reference for using CMake Presets to configure and build CMake projects."
+ms.date: 06/09/2023
+ms.topic: reference
+ms.custom: sfi-image-nochange
+---
+
+# Configure and build with CMake Presets in Visual Studio
+
+CMake supports two files that allow users to specify common configure, build, and test options and share them with others: *`CMakePresets.json`* and *`CMakeUserPresets.json`*. Use these files to drive CMake in Visual Studio and Visual Studio Code, in a continuous integration (CI) pipeline, and from the command line.
+
+*`CMakePresets.json`* is for saving project-wide builds. *`CMakeUserPresets.json`* is for developers to save their own local builds. Both files are supported in Visual Studio 2019 version 16.10 or later.
+
+This article contains information about *`CMakePresets.json`* integration with Visual Studio. Here are helpful links:
+
+- For more information about the format of *`CMakePresets.json`*, see the official [CMake documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#id1).
+- For more information about the Microsoft vendor maps and macro expansion, see [`CMakePresets.json` and `CMakeUserPresets.json` Microsoft vendor maps](cmake-presets-json-reference.md).
+- For more information about how to use *`CMakePresets.json`* in Visual Studio Code, see [Configure and build with CMake Presets](https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/cmake-presets.md).
+
+We recommend *`CMakePresets.json`* as an alternative to *`CMakeSettings.json`*. Visual Studio never reads from both *`CMakePresets.json`* and *`CMakeSettings.json`* at the same time. To enable or disable *`CMakePresets.json`* integration in Visual Studio, see [Enable `CMakePresets.json` in Visual Studio 2019](#enable-cmakepresets-json-integration).
+
+## Supported CMake and *`CMakePresets.json`* versions
+
+The supported *`CMakePresets.json`* and *`CMakeUserPresets.json`* schema versions depend on your version of Visual Studio:
+- Visual Studio 2019 version 16.10 and later support schema versions 2 and 3.
+- Visual Studio 2022 version 17.4 preview 1 adds support for schema version 4.
+- Visual Studio 2022 version 17.5 preview 1 adds support for schema version 5.
+
+You can update the version by changing the `"version"` field in the root object. For an example and more information, see [`CMakePresets.json` format](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#format).
+
+CMake version 3.20 or later is required when you're invoking CMake with *`CMakePresets.json`* from the command line. However, Visual Studio reads and evaluates *`CMakePresets.json`* and *`CMakeUserPresets.json`* itself and doesn't invoke CMake directly with the `--preset` option. So, CMake version 3.20 or later isn't strictly required when you're building with *`CMakePresets.json`* inside Visual Studio.
+
+We recommend using at least CMake version 3.14 or later.
+
+## Enable *`CMakePresets.json`* integration in Visual Studio
+
+*`CMakePresets.json`* integration isn't enabled by default in Visual Studio. You can enable it in **Tools** > **Options** > **CMake** > **General**:
+
+:::image type="complex" source="./media/enable-cmakepresets-new.png" alt-text="Screenshot showing 'Always use CMakePresets.json' selected.":::
+This screen is reached from the Visual Studio 2022 menu: Tools > Options > CMake > General. The option is under the CMake configure file section.
+:::image-end:::
+
+> [!IMPORTANT]
+> Close and reopen the folder in Visual Studio to activate the integration.
+
+In some older versions of Visual Studio, **Tools** > **Options** > **CMake** > **General** only has a single option to enable *`CMakePresets.json`* integration:
+
+:::image type="content" source="./media/enable-cmakepresets.png" alt-text="Screenshot of an older version of Visual Studio. There is a checkbox labeled 'Use C Make Presets .json to drive CMake configure, build, and test.'":::
+
+The following table indicates when *`CMakePresets.json`* is used instead of *`CMakeSettings.json`* to drive CMake configuration and build in Visual Studio 2022 and Visual Studio 2019 version 16.10 and later. If no configuration file is present, default Configure Presets are used.
+
+In the table, "**Tools** > **Options** enabled" means **Use CMakePresets.json to drive CMake configure, build, and test** is selected in **Tools** > **Options** > **CMake** > **General**.
+
+| Configuration files | Tools > Options disabled | Tools > Options enabled |
+|--|--|--|
+| No configuration file present | *`CMakeSettings.json`* | *`CMakePresets.json`* |
+| *`CMakeSettings.json`* present | *`CMakeSettings.json`* | *`CMakePresets.json`* |
+| *`CMakePresets.json`* present | *`CMakePresets.json`* | *`CMakePresets.json`* |
+| Both configuration files present | *`CMakePresets.json`* | *`CMakePresets.json`* |
+
+## Modify automatic configuration and cache notifications
+
+By default, Visual Studio automatically invokes `configure` each time the active Target System or Configure Preset changes. You can modify this behavior by selecting **Never run configure step automatically** in **Tools** > **Options** > **CMake** > **General**. You can also disable all CMake cache notifications (gold bars) by clearing **Show CMake cache notifications**.
+
+## Default Configure Presets
+
+If no *`CMakePresets.json`* or *`CMakeUserPresets.json`* file exists, or if *`CMakePresets.json`* or *`CMakeUserPresets.json`* is invalid, Visual Studio falls back on the following default Configure Presets:
+
+### Windows example
+
+```json
+{
+ "name": "windows-default",
+ "displayName": "Windows x64 Debug",
+ "description": "Sets Ninja generator, compilers, x64 architecture, build and install directory, debug build type",
+ "generator": "Ninja",
+ "binaryDir": "${sourceDir}/out/build/${presetName}",
+ "architecture": {
+ "value": "x64",
+ "strategy": "external"
+ },
+ "cacheVariables": {
+ "CMAKE_BUILD_TYPE": "Debug",
+ "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}"
+ },
+ "vendor": {
+ "microsoft.com/VisualStudioSettings/CMake/1.0": {
+ "hostOS": [ "Windows" ]
+ }
+ }
+},
+```
+
+### Linux example
+
+```json
+{
+ "name": "linux-default",
+ "displayName": "Linux Debug",
+ "description": "Sets Ninja generator, compilers, build and install directory, debug build type",
+ "generator": "Ninja",
+ "binaryDir": "${sourceDir}/out/build/${presetName}",
+ "cacheVariables": {
+ "CMAKE_BUILD_TYPE": "Debug",
+ "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}"
+ },
+ "vendor": {
+ "microsoft.com/VisualStudioSettings/CMake/1.0": {
+ "hostOS": [ "Linux" ]
+ },
+ "microsoft.com/VisualStudioRemoteSettings/CMake/1.0": {
+ "sourceDir": "$env{HOME}/.vs/$ms{projectDirName}"
+ }
+ }
+}
+```
+
+If you try to open or modify a *`CMakePresets.json`* file that doesn't exist, Visual Studio automatically creates a *`CMakePresets.json`* file with the default Configure Presets at the root of your project.
+
+## Configure and build
+
+On the Visual Studio toolbar, there are dropdowns for the Target Systems, Configure Presets, and Build Presets when *`CMakePresets.json`* integration is enabled:
+
+:::image type="content" source="./media/target-system-dropdown.png" alt-text="Screenshot showing the dropdowns for target system set to Local Machine, configuration set to windows-arm64, and build preset set to default.":::
+
+### Select a Target System
+
+The dropdown list on the left indicates the active *Target System*. It's the system on which CMake is invoked to configure and build the project. This dropdown list includes your local machine, all SSH connections in Connection Manager by host name, and all Windows Subsystem for Linux (WSL) installations that Visual Studio can find:
+
+:::image type="complex" source="./media/target-system-selections.png" alt-text="Screenshot of the Target System dropdown list":::
+The dropdown list contains several entries including Local Machine, an ip address 192.168.0.5, WSL: ubuntu2004, WSL: debian, and Manage Connections.
+:::image-end:::
+
+In the preceding example:
+
+- **192.168.0.5** is a remote Linux system that was added to Connection Manager.
+- **ubuntu2004** and **debian** are WSL installations.
+
+Select **Manage Connections** to open Connection Manager.
+
+### Select a Configure Preset
+
+The dropdown list in the middle indicates the active *Configure Preset*. It's the `configurePreset` value that's used when CMake is invoked to generate the project build system. This dropdown list includes the union of non-hidden Configure Presets defined in *`CMakePresets.json`* and *`CMakeUserPresets.json`*.
+
+Visual Studio uses the value of `hostOS` in the Microsoft Visual Studio Settings vendor map to hide Configure Presets that don't apply to the active Target System. For more information, see the entry for `hostOS` in the table under [Visual Studio Settings vendor map](cmake-presets-json-reference.md#visual-studio-settings-vendor-map).
+
+Select **Manage Configurations** to open the *`CMakePresets.json`* file located at the root of the project. *`CMakePresets.json`* is created if it doesn't already exist.
+
+### Select a Build Preset
+
+The dropdown list on the right indicates the active *Build Preset*. It's the `buildPreset` value that's used when CMake is invoked to build the project. This dropdown list includes the union of non-hidden Build Presets defined in *`CMakePresets.json`* and *`CMakeUserPresets.json`*.
+
+All Build Presets are required to specify an associated `configurePreset` value. Visual Studio hides Build Presets that don't apply to the active Configure Preset. For more information, see the [list of Build Presets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#build-preset).
+
+If there are no Build Presets associated with the active Configure Preset, Visual Studio lists the default Build Preset. The default Build Preset is equivalent to passing `cmake --build` with no other arguments from the command line.
+
+### Configure
+
+Visual Studio automatically tries to configure the project when it detects that the CMake cache is out of date. To manually invoke the configuration, select **Project** > **Configure \** from the main menu. It's the same as running `cmake --preset ` from the command line, where `` is the name of the active Configure Preset.
+
+To disable automatic cache generation, see [Automatic configuration and cache notifications](#modify-automatic-configuration-and-cache-notifications).
+
+### Build
+
+To build the entire project, select **Build** > **Build All** from the main menu. It's the same as running `cmake --build --preset ` from the command line, where `` is the name of the active Build Preset.
+
+To build a single target, switch to **CMake Targets View** in Solution Explorer. Then right-click any target and select **Build** from the shortcut menu.
+
+> [!NOTE]
+> Visual Studio 2019 doesn't support the `buildPresets.targets` option to build a subset of targets specified in *`CMakePresets.json`*.
+
+## Run CTest
+
+*`CMakePresets.json`* supports two menu options in Visual Studio 2019:
+
+- **Test** > **Run CTests** for \ invokes CTest and runs all tests associated with the active Configure Preset and Build Preset, with no other arguments passed to CTest.
+- **Test** > **Run Test Preset** for \ expands to show all Test Presets associated with the active Configure Preset. Selecting a single Test Preset is the same as running `ctest --preset ` from the command line, where `` is the name of the selected Test Preset. This option is unavailable if no Test Presets are defined for the active Configure Preset.
+
+In Visual Studio 2019, Test Explorer isn't integrated with *`CMakePresets.json`*.
+
+## Add new presets
+
+In Visual Studio 2019, all commands and preset templates modify *`CMakePresets.json`*. You can add new user-level presets by directly editing *`CMakeUserPresets.json`*.
+
+Use a forward slash (`/`) for paths in *`CMakePresets.json`* and *`CMakeUserPresets.json`*.
+
+### Add new Configure Presets
+
+To add a new Configure Preset to *`CMakePresets.json`*, from **Solution Explorer**, right-click *`CMakePresets.json`* from **Folder View** and select **Add Configuration** from the shortcut menu. The dialog to select a Configure Preset template appears:
+
+:::image type="content" source="./media/add-configure-preset-to-cmakepresets.png" alt-text="Screenshot of the Add Configure Preset to the JSON file dialog. It contains entries such as Linux Debug, macOS Debug, x64 Debug, and so on.":::
+
+Select the **Windows x64 Debug** template to configure on Windows systems. Select the **Linux Debug** template to configure on WSL and remote Linux systems. For more information about editing *`CMakePresets.json`*, see [Edit presets](#edit-presets).
+
+The selected template is added to *`CMakePresets.json`* if it exists. Otherwise, the template is copied into a new *`CMakePresets.json`* file.
+
+### Add new Build Presets and Test Presets
+
+Visual Studio 2019 doesn't offer templates for new Build Presets and Test Presets. You can add Build Presets and Test Presets by directly editing *`CMakePresets.json`*. For more information, see the [list of Build Presets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#build-preset), the [list of Test Presets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#test-preset), or [an example `CMakePresets.json` file](#example-cmakepresetsjson-file).
+
+## Edit presets
+
+The official [CMake documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#id1) is the best resource for editing Configure Presets, Build Presets, and Test Presets. The following information is a subset of the CMake documentation that's especially relevant to Visual Studio developers.
+
+### Select your compilers
+
+You can set C and C++ compilers by using `cacheVariables.CMAKE_C_COMPILER` and `cacheVariables.CMAKE_CXX_COMPILER` in a Configure Preset. It's equivalent to passing `-D CMAKE_C_COMPILER=` and `-D CMAKE_CXX_COMPILER=` to CMake from the command line. For more information, see [`CMAKE__COMPILER`](https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER.html#cmake-lang-compiler).
+
+Use the following examples to build with `cl.exe` and `clang-cl.exe` from Visual Studio. The C++ Clang tools for Windows components must be installed for you to build with `clang-cl`.
+
+Build with `cl.exe`:
+
+```json
+"cacheVariables": {
+ "CMAKE_BUILD_TYPE": "Debug",
+ "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
+ "CMAKE_C_COMPILER": "cl",
+ "CMAKE_CXX_COMPILER": "cl"
+},
+```
+
+Build with `clang`:
+
+```json
+"cacheVariables": {
+ "CMAKE_BUILD_TYPE": "Debug",
+ "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
+ "CMAKE_C_COMPILER": "clang-cl",
+ "CMAKE_CXX_COMPILER": "clang-cl"
+},
+
+"vendor": {
+ "microsoft.com/VisualStudioSettings/CMake/1.0": {
+ "intelliSenseMode": "windows-clang-x64"
+ }
+}
+```
+
+If you use either `Visual Studio 16 2019` or `Visual Studio 17 2022` as your generator, you can use the `toolset` Configure Preset to specify the `ClangCL` toolset:
+
+```json
+"cacheVariables": {
+ "CMAKE_BUILD_TYPE": "Debug",
+ "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
+},
+
+"toolset": "ClangCL",
+
+"vendor": {
+ "microsoft.com/VisualStudioSettings/CMake/1.0": {
+ "intelliSenseMode": "windows-clang-x64"
+ }
+}
+```
+
+For more information on generators that support the `toolset` specification, see [`CMAKE_GENERATOR_TOOLSET`](https://cmake.org/cmake/help/latest/variable/CMAKE_GENERATOR_TOOLSET.html) in the CMake documentation.
+
+> [!IMPORTANT]
+> In Visual Studio 2019, you must explicitly specify a Clang IntelliSense mode when you're building with `clang` or `clang-cl`.
+
+To reproduce these builds outside Visual Studio, see [Run CMake from the command line or a CI pipeline](#run-cmake-from-the-command-line-or-a-ci-pipeline).
+
+To build on Linux or without the Visual C++ toolset, specify the name of a compiler on your `PATH` instance, or an environment variable that evaluates to the full path of a compiler. Full paths are discouraged so that the file can remain shareable. A preset that builds with GCC version 8 might look like this:
+
+```json
+"cacheVariables": {
+ "CMAKE_BUILD_TYPE": "Debug",
+ "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
+ "CMAKE_C_COMPILER": "gcc-8",
+ "CMAKE_CXX_COMPILER": "g++-8"
+},
+```
+
+You can also set compilers with a CMake toolchain file. Toolchain files can be set with `cacheVariables.CMAKE_TOOLCHAIN_FILE`, which is equivalent to passing `-D CMAKE_TOOLCHAIN_FILE=` to CMake from the command line. A CMake toolchain file is most often used for cross-compilation. For more information about authoring CMake toolchain files, see [CMake toolchains](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html).
+
+### Select your generator
+
+The Windows and Linux Configure Preset templates both specify Ninja as the default generator. Other common generators are the [Visual Studio Generators](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html?highlight=visual%20studio%20generators#visual-studio-generators) on Windows and Unix Makefiles on Linux and macOS. You can specify a new generator with the `generator` option in a Configure Preset. It's equivalent to passing `-G` to CMake from the command line.
+
+Set `architecture.strategy` and `toolset.strategy` to `set` when you're building with a Visual Studio Generator. For more information, see [CMake generators](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html#:~:text=A%20CMake%20Generator%20is%20responsible%20for%20writing%20the,what%20native%20build%20system%20is%20to%20be%20used).
+
+### Select your configuration type
+
+You can set the configuration type (`Debug` or `Release`) for single configuration generators by using `cacheVariables.CMAKE_BUILD_TYPE`. It's equivalent to passing `-D CMAKE_BUILD_TYPE=` to CMake from the command line. For more information, see [`CMAKE_BUILD_TYPE`](https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html).
+
+### Select your target and host architecture when building with the Visual C++ toolset
+
+You can set the target architecture (x64, Win32, ARM64, or ARM) by using `architecture.value`. It's equivalent to passing `-A` to CMake from the command line. For more information, see [Platform Selection](https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2016%202019.html#platform-selection).
+
+> [!NOTE]
+> Currently, Visual Studio Generators expect the Win32 syntax and command-line generators (like Ninja) expect the x86 syntax when you're building for x86.
+
+You can set the host architecture (x64 or x86) and toolset by using `toolset.value`. It's equivalent to passing `-T` to CMake from the command line. For more information, see [Toolset Selection](https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2016%202019.html#toolset-selection).
+
+The `architecture.strategy` and `toolset.strategy` values tell CMake how to handle the architecture and toolset fields. `set` means CMake sets the respective value, and `external` means CMake won't set the respective value.
+
+We recommend using `set` with IDE generators like the Visual Studio Generator. Use `external` with command-line generators like Ninja. These values allow vendors like Visual Studio to supply the required environment before CMake is invoked. For more information about the architecture and toolset fields, see the [list of Configure Presets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#configure-preset).
+
+If you don't want to source an environment, you can set `architecture.strategy` to `external` and `architecture.value` to `unspecified`. You might find it useful not to source an environment for any one of these reasons:
+
+- You use a toolset other than MSVC.
+- You use a custom toolchain, such as in embedded scenarios.
+- You don't need a specific environment to build.
+
+For a full list of IDE generators that support the architecture field, see [`CMAKE_GENERATOR_PLATFORM`](https://cmake.org/cmake/help/latest/variable/CMAKE_GENERATOR_PLATFORM.html). For a full list of IDE generators that support the toolset field, see [`CMAKE_GENERATOR_TOOLSET`](https://cmake.org/cmake/help/latest/variable/CMAKE_GENERATOR_TOOLSET.html).
+
+Use the following examples to target ARM64 with the Ninja generator, or to target Win32 (x86) with the Visual Studio 16 2019 generator:
+
+```json
+"generator": "Ninja",
+"architecture": {
+ "strategy": "external",
+ "value": "arm64"
+},
+
+"generator": "Visual Studio 16 2019",
+"architecture": {
+ "strategy": "set",
+ "value": "Win32"
+},
+```
+
+### Set and reference environment variables
+
+You can set environment variables by using the environment map. Environment variables are inherited through the `inherits` field, but you can override them as you like.
+
+A preset's environment is the union of its own environment and the environment from all its parents. If multiple `inherits` presets provide conflicting values for the same variable, the earlier preset in the `inherits` list is preferred. You can unset a variable inherited from another preset by setting it to `null`.
+
+Environment variables set in a Configure Preset also automatically flow through to associated Build Presets and Test Presets, unless `inheritConfigureEnvironment` is set to `false`. For more information, see the [list of Configure Presets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#configure-preset).
+
+You can reference environment variables by using the `$env{}` and `$penv{}` syntax. For more information, see [Macro Expansion](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#macro-expansion).
+
+### Configure IntelliSense for a cross-compiler
+
+By default, Visual Studio uses the IntelliSense mode that matches your specified toolset and target architecture. If you're cross-compiling, you might need to manually specify the correct IntelliSense mode by using the `intelliSenseMode` option in the Visual Studio Settings vendor map. For more information, see the entry for `intelliSenseMode` in the table under [Visual Studio Settings vendor map](cmake-presets-json-reference.md#visual-studio-settings-vendor-map).
+
+## Configure and build on a remote system or the Windows Subsystem for Linux
+
+With *`CMakePresets.json`* support in Visual Studio, you can easily configure and build your project on Windows, WSL, and remote systems. The steps to [configure and build](#configure-and-build) your project on Windows, a remote system, or WSL are the same. However, a few behaviors are specific to remote development.
+
+### `${sourceDir}` behavior in remote copy scenarios
+
+In local scenarios (including WSL1), `${sourceDir}` evaluates to the path to the project source directory that's open in Visual Studio. In remote copy scenarios, `${sourceDir}` evaluates to the path to the project source directory on the Target System and not the project source directory on the local machine.
+
+The value of `sourceDir` in the Visual Studio Remote Settings vendor map determines the project source directory on the Target System (defaults to `$env{HOME}/.vs/$ms{projectDirName}`). For more information, see the entry for `sourceDir` in the table under [Visual Studio Settings vendor map](cmake-presets-json-reference.md#visual-studio-settings-vendor-map).
+
+### Local folder for remote output
+
+Remote copy scenarios require a local directory to copy some remote files like CMake File API response files or build files if `copyBuildOutput` in the Visual Studio Remote Settings vendor map is set to `true`. These files are automatically copied to `/out//build/${presetName}`.
+
+### Invoking the same Configure Preset on Windows and WSL1
+
+You'll see an error if you try to use the same Configure Preset on Windows and WSL1. Windows and WSL1 both use the Windows file system, so CMake will try to use the same output directory (`binaryDir`) for both the Windows and WSL1 build trees.
+
+If you want to use the same Configure Preset with both Windows and the WSL1 toolset, create a second Configure Preset that inherits from the original preset and specifies a new `binaryDir` value. In the following example, `windows-preset` can be used on Windows and `base-preset` can be used on WSL1:
+
+```json
+{
+ "name": "windows-preset",
+ "inherits": "base-preset",
+ "binaryDir": "${sourceDir}/out/build/${presetName}",
+ "vendor": {
+ "microsoft.com/VisualStudioSettings/CMake/1.0": {
+ "hostOS": "Windows"
+ }
+ }
+}
+```
+
+> [!NOTE]
+> In Visual Studio 2019, only the WSL1 toolset is supported. You'll see this behavior any time you invoke `configure` on both Windows and WSL.
+
+## Enable vcpkg integration
+
+Vcpkg helps you manage C and C++ libraries on Windows, Linux, and macOS. A vcpkg toolchain file (`vcpkg.cmake`) must be passed to CMake to enable vcpkg integration. For more information, see the [vcpkg documentation](https://github.com/microsoft/vcpkg#vcpkg-overview).
+
+Visual Studio no longer passes your vcpkg toolchain file to CMake automatically when *`CMakePresets.json`* integration is enabled. This change eliminates Visual Studio-specific behavior and ensures that you can reproduce your build from the command line.
+
+Instead, set the path to `vcpkg.cmake` by using the `VCPKG_ROOT` environment variable in *`CMakePresets.json`*:
+
+```json
+"cacheVariables": {
+ "CMAKE_TOOLCHAIN_FILE": {
+ "value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
+ "type": "FILEPATH"
+ }
+ },
+```
+
+`VCPKG_ROOT` should be set to the root of your vcpkg installation. For more information, see [vcpkg environment variables](/vcpkg/users/config-environment).
+
+If you're already using a CMake toolchain file and want to enable vcpkg integration, see [Using multiple toolchain files](/vcpkg/users/buildsystems/cmake-integration#using-multiple-toolchain-files). Follow those instructions to use an external toolchain file with a project by using vcpkg.
+
+## Variable substitution in *`launch.vs.json`* and *`tasks.vs.json`*
+
+*`CMakePresets.json`* supports variable substitution in *`launch.vs.json`* and *`tasks.vs.json`*. Here are some considerations:
+
+- Environment variables set in the active Configure Preset automatically flow through to *`launch.vs.json`* and *`tasks.vs.json`* configurations. You can unset individual environment variables in *`launch.vs.json`* and *`tasks.vs.json`* by setting them to `null`. The following example sets the variable `DEBUG_LOGGING_LEVEL` to `null` in *`launch.vs.json`*: `"env": { "DEBUG_LOGGING_LEVEL": null }`.
+
+- Key values set in the active Configure Preset are available for consumption in *`launch.vs.json`* and *`tasks.vs.json`* with the syntax `${cmake.}`. For example, use `${cmake.binaryDir}` to reference the output directory of the active Configure Preset.
+
+- Individual environment variables set in the environment map of the active Configure Preset are available for consumption in *`launch.vs.json`* and *`tasks.vs.json`* through the syntax `${env.}`.
+
+Update your *`launch.vs.json`* and *`task.vs.json`* files to reference *`CMakePresets.json`* syntax instead of *`CMakeSettings.json`* syntax. Macros that reference the old *`CMakeSettings.json`* syntax when *`CMakePresets.json`* is the active configuration file are slated for deprecation in a future release. For example, reference the output directory of the active Configure Preset with `${cmake.binaryDir}` instead of `${cmake.buildRoot}`, because *`CMakePresets.json`* uses the `binaryDir` syntax.
+
+## Troubleshoot
+
+If things aren't working as expected, you can try a few troubleshooting steps.
+
+If either *`CMakePresets.json`* or *`CMakeUserPresets.json`* is invalid, Visual Studio will fall back on its default behavior and show only the default Configure Presets. Visual Studio IntelliSense can help you catch many of these JSON errors, but it won't know if you're referencing a preset with `inherits` or `configurePreset` by the wrong name.
+
+To check if your preset files are valid, run `cmake --list-presets` from the command line at the root of your project directory. (CMake 3.20 or later is required.) If either file is invalid, you'll see the following error:
+
+```cmd
+CMake Error: Could not read presets from
+C:/Users//source/repos/: JSON parse error
+```
+
+Other troubleshooting steps include:
+
+- Delete the cache and reconfigure the project (**CMake: Delete Cache** and **Project** > **Configure \**).
+- Close and reopen the folder in Visual Studio (**File** > **Close Folder**).
+- Delete the `.vs` folder at the root your project.
+
+If you've identified a problem, the best way to report it is by selecting the **Send Feedback** button in the upper-right corner of Visual Studio.
+
+## Enable logging for remote connections
+
+You can enable logging for remote connections if you're having trouble connecting or copying files to a remote system. For more information, see [Logging for remote connections](../linux/connect-to-your-remote-linux-computer.md#logging-for-remote-connections).
+
+## Enable AddressSanitizer for Windows and Linux
+
+Visual Studio supports AddressSanitizer (ASAN), a C and C++ runtime memory error detector, for both Windows and Linux development. The `addressSanitizerEnabled` option in *`CMakeSettings.json`* enables AddressSanitizer. *`CMakePresets.json`* doesn't support this behavior.
+
+Instead, enable and disable AddressSanitizer by setting the required compiler and linker flags yourself. Setting them removes Visual Studio-specific behavior and ensures that the same *`CMakePresets.json`* file can reproduce your build from the command line.
+
+You can add the following sample to *`CMakeLists.txt`* to enable or disable AddressSanitizer for a target:
+
+```cmd
+option(ASAN_ENABLED "Build this target with AddressSanitizer" ON)
+
+if(ASAN_ENABLED)
+ if(MSVC)
+ target_compile_options( PUBLIC /fsanitize=address)
+ else()
+ target_compile_options( PUBLIC -fsanitize=address )
+ target_link_options( PUBLIC -fsanitize=address)
+ endif()
+endif()
+```
+
+The `` part lists other compilation flags, like `"-fno-omit-frame-pointer"`. For more information about AddressSanitizer for Linux, see [Using AddressSanitizer](https://github.com/google/sanitizers/wiki/AddressSanitizer#using-addresssanitizer). For more information about using AddressSanitizer with MSVC, see [Use AddressSanitizer from a developer command prompt](../sanitizers/asan.md#command-prompt).
+
+Pass runtime flags to AddressSanitizer by using the `ASAN_OPTIONS` field in *`launch.vs.json`*. `ASAN_OPTIONS` defaults to `detect_leaks=0` when no other runtime options are specified because LeakSanitizer isn't supported in Visual Studio.
+
+## Run CMake from the command line or a CI pipeline
+
+You can use the same *`CMakePresets.json`* and *`CMakeUserPresets.json`* files to invoke CMake in Visual Studio and from the command line. The [CMake](https://cmake.org/cmake/help/latest/manual/cmake.1.html) and [CTest](https://cmake.org/cmake/help/latest/manual/ctest.1.html) documentation are the best resources for invoking CMake and CTest with `--preset`. CMake version 3.20 or later is required.
+
+### Sourcing the environment when building with command-line generators on Windows
+
+It's up to the user to configure the environment before CMake is invoked in building with a command-line generator. If you're building with Ninja and the Visual C++ toolset on Windows, set the environment before CMake is called to generate the build system. You can do it by calling *`vcvarsall.bat`* with the `architecture` argument. The `architecture` argument specifies the host and target architecture to use. For more information, see [`vcvarsall` syntax](./building-on-the-command-line.md#vcvarsall-syntax). If you build on Linux or on Windows with a Visual Studio Generator, you don't need to take this step.
+
+It's the same step that Visual Studio takes for you when the IDE invokes CMake. Visual Studio parses the active Configure Preset for the host and target architecture specified by `toolset` and `architecture`. Visual Studio then sources the specified environment from *`vcvarsall.bat`*. When you build from the Windows command line with Ninja, you'll need to take this step yourself.
+
+*`vcvarsall.bat`* is installed with the Build Tools for Visual Studio. By default, *`vcvarsall.bat`* is installed in `C:\Program Files (x86)\Microsoft Visual Studio\2019\\VC\Auxiliary\Build`. You can add *`vcvarsall.bat`* to `PATH` if you use the command-line workflow often.
+
+### Example command-line workflow
+
+You can use the following commands to configure and build a CMake project that uses Ninja to target ARM64 with x64 build tools. CMake version 3.20 or later is required. Run these commands from the directory where your *`CMakePresets.json`* file is located:
+
+```cmd
+/path/to/vcvarsall.bat x64_arm64
+cmake --list-presets=all .
+cmake --preset
+cmake --build --preset
+```
+
+## Example *`CMakePresets.json`* file
+
+The *`CMakePresets.json`* file in [box2d-lite](https://github.com/esweet431/box2d-lite/blob/vs-launch/CMakePresets.json) contains examples of Configure Presets, Build Presets, and Test Presets. For more information about this example, see the presentation [An Introduction to CMakePresets.json](/events/cpp-pure-virtual-cpp-2021/an-introduction-to-cmakepresetsjson). You can see another example in the [DirectXTK](https://github.com/microsoft/DirectXTK/blob/main/CMakePresets.json) project, which shows many build targets in its `configurePresets` section.
+
+## Next steps
+
+Learn more about configuring and debugging CMake projects in Visual Studio:
+
+> [!div class="nextstepaction"]
+> [CMake Projects in Visual Studio](cmake-projects-in-visual-studio.md)\
+> [Customize CMake build settings](customize-cmake-settings.md)\
+> [Configure CMake debugging sessions](configure-cmake-debugging-sessions.md)\
+> [CMake predefined configuration reference](cmake-predefined-configuration-reference.md)
+>
diff --git a/docs/build/cmake-projects-in-visual-studio.md b/docs/build/cmake-projects-in-visual-studio.md
index c763a87c1d..b56efcce7e 100644
--- a/docs/build/cmake-projects-in-visual-studio.md
+++ b/docs/build/cmake-projects-in-visual-studio.md
@@ -1,266 +1,403 @@
---
title: "CMake projects in Visual Studio"
-description: "How to create and build C++ projects using CMake in Visual Studio."
-ms.date: "01/08/2020"
-helpviewer_keywords: ["CMake in Visual C++"]
-ms.assetid: 444d50df-215e-4d31-933a-b41841f186f8
+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"]
+ms.custom: sfi-image-nochange
---
# CMake projects in Visual Studio
-CMake is a cross-platform, open-source tool for defining build processes that run on multiple platforms. This article assumes you're familiar with CMake. You can learn more about it at [Build, Test and Package Your Software With CMake](https://cmake.org/).
+[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="vs-2019"
+::: moniker range=">=msvc-160"
-The **C++ CMake tools for Windows** component uses the [Open Folder](open-folder-projects-cpp.md) feature to consume CMake project files (such as *CMakeLists.txt*) directly for the purposes of IntelliSense and browsing. Both Ninja and Visual Studio generators are supported. If you use a Visual Studio generator, it generates a temporary project file and passes it to msbuild.exe. However, the project is never loaded for IntelliSense or browsing purposes. You can also import an existing CMake cache.
+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. For more information, see [Cross-platform CMake projects](../linux/cmake-linux-project.md).
+**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-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:::
For more information, see [Install the C++ Linux workload in Visual Studio](../linux/download-install-and-setup-the-linux-development-workload.md).
-## IDE Integration
+## IDE integration
+
+When you **open a folder** containing a *`CMakeLists.txt`* file, the following things happen.
-When you choose **File > Open > Folder** to open a folder containing a *CMakeLists.txt* file, the following things happen:
+:::image type="complex" source="media/start-window.png" alt-text="Screenshot of the first dialog that opens when Visual Studio is started.":::
+The dialog offers these options: clone a repository, open a project or solution, open a local folder, or create a new project. Open a local folder is called out in the screenshot.
+:::image-end:::
- Visual Studio adds **CMake** items to the **Project** menu, with commands for viewing and editing CMake scripts.
-- **Solution Explorer** displays the folder structure and files.
+- The **Solution Explorer** displays the folder structure and files.
-- Visual Studio runs cmake.exe and generates the CMake cache file (*CMakeCache.txt*) for the default (x64 Debug) configuration. The CMake command line is displayed in the **Output Window**, along with additional output from CMake.
+- Visual Studio runs CMake and generates the CMake cache file (*`CMakeCache.txt`*) for the default configuration. The CMake command line is displayed in the **Output Window**, along with other output from CMake.
- 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.
+> [!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'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:
-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-view2.png" alt-text="Screenshot of the Solution Explorer Views window. The folder view is open. The C Make Targets View option is highlighted.":::
-
+Choose the **Show All Files** button at the top of **Solution Explorer** to see all the CMake-generated output in the *`out/build/`* folders.
-Click the **Show All Files** button at the top of **Solution Explorer** to see all the CMake-generated output in the *out/build/\* folders.
+Use the *`CMakeLists.txt`* file in each project folder just as you would in any CMake project. You can specify source files, find libraries, set compiler and linker options, and specify other build system-related information. For more information on CMake language services provided by Visual Studio, see [Editing CMakeLists.txt files](#editing-cmakeliststxt-files).
-Visual Studio uses a configuration file called **CMakeSettings.json**. This file lets you define and store multiple build configurations, and conveniently switch between them in the IDE. A *configuration* is a Visual Studio construct that encapsulates settings that are specific to a given build type. The settings are used to configure the default command-line options that Visual Studio passes to cmake.exe. You can also specify additional CMake options here, and define any additional variables you like. All options are written to the CMake cache either as internal or external variables. In Visual Studio 2019, the **CMake Settings Editor** provides a convenient way to edit your settings. For more information, see [Customize CMake settings](customize-cmake-settings.md).
+Visual Studio uses a CMake configuration file to drive CMake cache generation and build. For more information, see [Configuring CMake projects](#configuring-cmake-projects) and [Building CMake projects](#building-cmake-projects).
-One setting, `intelliSenseMode` isn't passed to CMake, but is used only by Visual Studio.
+To pass arguments to an executable at debug time, you can use another file called *`launch.vs.json`*. For more information on debugging cross-platform CMake projects in Visual Studio, see [Debugging CMake projects](#debugging-cmake-projects).
-Use the **CMakeLists.txt** file in each project folder just as you would in any CMake project. You can specify source files, find libraries, set compiler and linker options, and specify other build system-related information.
+Most Visual Studio and C++ language features are supported by CMake projects in Visual Studio. Examples include:
-To pass arguments to an executable at debug time, you can use another file called **launch.vs.json**. In some scenarios, Visual Studio automatically generates these files. You can edit them manually, or even create the file yourself.
+- [Edit and Continue for CMake projects](#edit-and-continue-for-cmake-projects)
+- [Incredibuild integration for CMake projects](https://devblogs.microsoft.com/cppblog/seamlessly-accelerate-cmake-projects-in-visual-studio-with-incredibuild/)
+- [AddressSanitizer support for CMake projects](cmake-presets-vs.md#enable-addresssanitizer-for-windows-and-linux)
+- [Clang/LLVM support](https://devblogs.microsoft.com/cppblog/clang-llvm-support-in-visual-studio/)
> [!NOTE]
-> For other kinds of Open Folder projects, two additional JSON files are used: **CppProperties.json** and **tasks.vs.json**. Neither of these are 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.
-## Open an existing cache
+## Configuring CMake projects
-When you open an existing CMake cache file (*CMakeCache.txt*), Visual Studio doesn't try to manage your cache and build tree for you. Your custom or preferred tools have complete control over how CMake configures your project. To open an existing cache in Visual Studio, choose **File > Open > CMake**. Then, navigate to an existing *CMakeCache.txt* file.
+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).
-You can add an existing CMake cache to an open project. It's done the same way you'd add a new configuration. For more information, see our blog post on [opening an existing cache in Visual Studio](https://devblogs.microsoft.com/cppblog/open-existing-cmake-caches-in-visual-studio/).
+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 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 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.
+
+You can also open an existing CMake cache in Visual Studio. For more information, see [Open an existing cache](#open-an-existing-cache).
+
+### Customize configuration feedback and notifications
+
+By default, most configuration messages are suppressed unless there's an error. To see all messages, select **Tools** > **Options** > **CMake** > **Enable verbose CMake diagnostic output**.
+
+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:
+
+- **View CMakeCache.txt** opens the *`CMakeCache.txt`* file from the build directory 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 you clean the cache, see [Customize CMake settings](customize-cmake-settings.md) or [Configure and build with CMake Presets](cmake-presets-vs.md).
+
+- **Delete Cache and Reconfigure** deletes the build directory and reconfigures from a clean cache.
+
+- **Configure Cache** forces the generate step to run even if Visual Studio considers the environment up to date.
## Building CMake projects
-To build a CMake project, you have these choices:
+The CMake build step builds an already generated project binary tree. It's equivalent to invoking `cmake --build` from the command line. For more information on the CMake build step, see the [CMake documentation](https://cmake.org/cmake/help/latest/manual/cmake.1.html#build-a-project).
-1. In the General toolbar, find the **Configurations** dropdown. It probably shows "x64-Debug" by default. Select the preferred configuration and press **F5**, or click the **Run** (green triangle) button on the toolbar. The project automatically builds first, just like a Visual Studio solution.
+To build a CMake project, you have these choices:
-1. Right click on *CMakeLists.txt* 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. In the toolbar, find the **Startup Item** dropdown. Select the preferred target and press **F5**, or choose the **Run** button on the toolbar. The project automatically builds first, just like a Visual Studio solution.
-1. From the main menu, select **Build > Build All** (**F7** or **Ctrl+Shift+B**). Make sure that a CMake target is already selected in the **Startup Item** dropdown in the **General** toolbar.
+1. Right-click on CMake target with **CMake Targets View** active in the **Solution Explorer** and select **Build** from the context menu.
-
+1. From the main menu, select **Build > Build All**. Make sure that a CMake target is already selected in the **Startup Item** dropdown in the toolbar.
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":::
+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.
+### Edit build settings
+
+Visual Studio uses a CMake configuration file to drive CMake builds. CMake configuration files encapsulate build options like native build tool switches and environment variables. If *`CMakePresets.json`* is your active configuration file, see [Configure and build with CMake Presets](cmake-presets-vs.md#configure-and-build). If *`CMakeSettings.json`* is your active configuration file, see [Customize CMake build settings](customize-cmake-settings.md). *`CMakePresets.json`* is available in Visual Studio 2019 version 16.10 or later and is the recommended CMake configuration file.
## 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. Choose the target that you want to run. (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.
+:::image-end:::
-The **Run** or **F5** commands first build the project if changes have been made since the previous build. Changes to *CMakeSettings.json* cause the CMake cache to be regenerated.
+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. For more information, 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
+### Just My Code for CMake projects
-When you build for Windows using the MSVC compiler, CMake projects have support for Just My Code debugging. To change the Just My Code setting, go to **Tools** > **Options** > **Debugging** > **General**.
+When you build for Windows using the MSVC compiler, CMake projects have support for Just My Code debugging. To change the Just My Code setting, go to **Tools** > **Options** > **Debugging** > **General**. For more information on Just My Code debugging, see [Debug only user code with Just My Code](/visualstudio/debugger/just-my-code).
-## Vcpkg integration
+### Edit and Continue for CMake projects
-If you have installed [vcpkg](vcpkg.md), CMake projects opened in Visual Studio automatically integrate the vcpkg toolchain file. That means no additional configuration is required to use vcpkg with your CMake projects. This support works for both local vcpkg installations and vcpkg installations on remote systems that you're targeting. This behavior is disabled automatically when you specify any other toolchain in your CMake Settings configuration.
+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.
-## Customize configuration feedback
+```
+if(MSVC)
+ target_compile_options( PUBLIC "/ZI")
+ target_link_options( PUBLIC "/INCREMENTAL")
+endif()
+```
-By default, most configuration messages are suppressed unless there's an error. You can see all messages by enabling this feature in **Tools** > **Options** > **CMake**.
+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
-## Editing CMakeLists.txt files
+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)
-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/attach-to-process.png" alt-text="Screenshot of the Attach to Process menu in Visual Studio.":::
+The following options are available on the dialog: Connection type (set to SSH), the connection target (set to demo@ 172. 20. 60. 6), and a list of available processes you can attach to."
+:::image-end:::
- 
+## CMake partial activation
-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*.
+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:
-## CMake configure step
+| 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 are ignored. |
-When you make significant changes 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.
+You can reach *`CMakeWorkspaceSettings.json`* through the **Project** > **CMake Workspace Settings** menu command at any time, even if CMake functionality is currently disabled.
-## Troubleshooting CMake cache errors
+## Open an existing cache
-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:
+When you open an existing CMake cache file (*`CMakeCache.txt`*), Visual Studio doesn't try to manage your cache and build tree for you. Your custom or preferred tools have complete control over how CMake configures your project.
-- **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).)
+You can add an existing CMake cache to an open project. It's done the same way you'd add a new configuration. For more information, see our blog post on [opening an existing cache in Visual Studio](https://devblogs.microsoft.com/cppblog/open-existing-cmake-caches-in-visual-studio/).
-- **Open Cache Folder** opens an Explorer window to the build root folder.
+> [!NOTE]
+> The default existing cache experience relies on `cmake-server`, which was removed from CMake in version 3.20. To continue using existing cache functionality in Visual Studio 2019 version 16.10 and later, take one of these steps:
+>
+> - Manually install CMake version 3.19 or lower. Then, set the `cmakeExecutable` property in your existing cache configuration to use that version of CMake.
+> - In your existing cache configuration, set the `cacheGenerationCommand` property to let Visual Studio request the necessary CMake file-based API files. For more information on that property, see [CMakeSettings.json reference](cmakesettings-reference.md#configurations).
+> - Use a query file to request the CMake file-based API files when generating your cache before it's opened in Visual Studio. For query file instructions, see the next section, [Advanced CMake cache troubleshooting](#advanced).
-- **Clean Cache** deletes the build root folder so that the next CMake configure step starts from a clean cache.
+### Advanced CMake cache troubleshooting
-- **Generate Cache** forces the generate step to run even if Visual Studio considers the environment up to date.
+Visual Studio uses the CMake [file-based API](https://cmake.org/cmake/help/latest/manual/cmake-file-api.7.html) (in versions 3.14 and later) to populate the editor with information specific to your project structure. For more information, see the C++ team blog post on [multi-root workspaces and file-based API](https://devblogs.microsoft.com/cppblog/visual-studio-code-cmake-tools-extension-multi-root-workspaces-and-file-based-api/).
-Automatic cache generation can be disabled in the **Tools > Options > CMake > General** dialog.
+Before generating the CMake cache, your custom or preferred tools might need to create a query file named *`.cmake/api/v1/query/client-MicrosoftVS/query.json`* in your build output folder (the folder that contains *`CMakeCache.txt`*). The query file should contain this content:
+
+```json
+{"requests":[{"kind":"cache","version":2},{"kind":"cmakeFiles","version":1},{"kind":"codemodel","version":2}]}
+```
+
+When your custom or preferred tools generate your cache, CMake places files under *`.cmake/api/v1/response`* that Visual Studio uses to populate the editor with information specific to your project structure.
+
+## Editing *`CMakeLists.txt`* files
+
+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."
+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:::
+
+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`*.
+
+:::image type="complex" source="media/cmake-cmakelists-error.png" alt-text="Screenshot of a C Make error in the Visual Studio error list.":::
+A C Make error message on line 3 of CMakeLists.txt is highlighted. The details are that C Make couldn't find a package configuration file provided by sqlite3. C Make looked for it in CMAKE_MODULE_PATH but couldn't find it. The suggestion is to add the installation prefix 'sqlite3' to CMAKE_PREFIX_PATH or set sqlite3_DIR to a directory containing sqlite3Config.cmake and/or sqlitet3-config.cmake.
+:::image-end:::
+
+### Language services for CMake
+
+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.
+:::image-end:::
+
+### CMake project manipulation
+
+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.
+:::image-end:::
+
+## IntelliSense for CMake projects
+
+By default, Visual Studio uses the IntelliSense mode that matches the compiler and target architecture specified by the active CMake configuration.
+
+If *`CMakePresets.json`* is your active CMake configuration file, then you can specify IntelliSense options using `intelliSenseMode` and `intelliSenseOptions` in the Visual Studio Settings vendor map. For more information, see the [Visual Studio Settings vendor map reference](cmake-presets-json-reference.md#visual-studio-settings-vendor-map).
+
+If *`CMakeSettings.json`* is your active CMake configuration file, then you can specify IntelliSense options using `intelliSenseMode` in *`CMakeSettings.json`*. For more information, see the [`CMakeSettings.json` reference](cmakesettings-reference.md).
+
+### Configure IntelliSense with CMake toolchain files
+
+In Visual Studio 2019 version 16.9 and later, Visual Studio automatically configures IntelliSense in CMake projects based on CMake variables when you use a CMake toolchain file. For more information, see [Configure IntelliSense with CMake Toolchain Files](https://devblogs.microsoft.com/cppblog/configure-intellisense-with-cmake-toolchain-files-in-visual-studio-2019-16-9-preview-2/).
+
+## Vcpkg integration
+
+CMake projects opened in Visual Studio integrate with vcpkg, a cross-platform C/C++ dependency manager. Before using vcpkg with Visual Studio, you must run `vcpkg integrate install`. For instructions and more information about vcpkg, see:
+
+- [Install and use packages with CMake in Visual Studio](/vcpkg/get_started/get-started-vs)
+- [vcpkg in CMake projects](/vcpkg/users/buildsystems/cmake-integration)
+
+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 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 you have installed CMake from the Visual Studio Installer, you can run it from the command line by following these steps:
+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 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 (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.
-1. Run CMake to build/configure your app.
+1. Run CMake to build or configure your app.
::: moniker-end
-::: moniker range="vs-2017"
+::: moniker range="msvc-150"
-Visual Studio 2017 has rich support for CMake, including [cross-platform CMake projects](../linux/cmake-linux-project.md). The **Visual C++ Tools for CMake** component uses the **Open Folder** feature to enable the IDE to consume CMake project files (such as *CMakeLists.txt*) directly for the purposes of IntelliSense and browsing. Both Ninja and Visual Studio generators are supported. If you use a Visual Studio generator, it generates a temporary project file and passes it to msbuild.exe. However, the project is never loaded for IntelliSense or browsing purposes. You also can import an existing CMake cache.
+Visual Studio 2017 has rich support for CMake, including [cross-platform CMake projects](../linux/cmake-linux-project.md). The **Visual C++ Tools for CMake** component uses the **Open Folder** feature to enable the IDE to consume CMake project files (such as *`CMakeLists.txt`*) directly for the purposes of IntelliSense and browsing. Both Ninja and Visual Studio generators are supported. If you use a Visual Studio generator, it generates a temporary project file and passes it to MSBuild. However, the project is never loaded for IntelliSense or browsing purposes. You also can import an existing CMake cache.
## Installation
**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 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).
## IDE integration
-When you choose **File > Open > Folder** to open a folder containing a *CMakeLists.txt* file, the following things happen:
+When you choose **File > Open > Folder** to open a folder containing a *`CMakeLists.txt`* file, the following happens:
- Visual Studio adds a **CMake** menu item to the main menu, with commands for viewing and editing CMake scripts.
- **Solution Explorer** displays the folder structure and files.
-- Visual Studio runs CMake.exe and optionally generates the CMake cache for the default *configuration*, which is x86 Debug. The CMake command line is displayed in the **Output Window**, along with additional output from CMake.
+- Visual Studio runs CMake and optionally generates the CMake cache for the default *configuration*, which is x86 Debug. The CMake command line is displayed in the **Output Window**, along with other output from CMake.
- 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 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.exe. *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.
+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.
-If you need to pass arguments to an executable at debug time, you can use another file called **launch.vs.json**. In some scenarios, Visual Studio automatically generates these files. You can edit them manually, or even create the file yourself.
+If you need to pass arguments to an executable at debug time, you can use another file called *`launch.vs.json`*. In some scenarios, Visual Studio automatically generates these files. You can edit them manually, or even create the file yourself.
> [!NOTE]
-> For other kinds of Open Folder projects, two additional JSON files are used: **CppProperties.json** and **tasks.vs.json**. Neither of these are relevant for CMake projects.
+> For other kinds of Open Folder projects, two additional JSON files are used: *`CppProperties.json`* and *`tasks.vs.json`*. Neither of these are relevant for CMake projects.
## 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.
+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.
### To import an existing cache
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 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 click **OK**. The **Import CMake Project from Cache** wizard appears:
+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 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 click 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 the *CMakeLists.txt* 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. 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 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.":::
+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.
+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 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.
-You can customize a CMake debugging session by setting properties in the **launch.vs.json** file. For more information, 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. For more information, see [Configure CMake debugging sessions](configure-cmake-debugging-sessions.md).
-## Editing CMakeLists.txt files
+## Editing *`CMakeLists.txt`* files
-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/).
+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 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*.
+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`*.
- 
+ :::image type="complex" source="media/cmake-cmakelists-error.png" alt-text="Screenshot of a C Make error in the Visual Studio error list.":::
+ A C Make error message on line 3 of CMakeLists.txt is highlighted. The details are that C Make can't find a package configuration file provided by sqlite3. C Make looked for it in CMAKE_MODULE_PATH but couldn't find it. The suggestion is to add the installation prefix 'sqlite3' to CMAKE_PREFIX_PATH or set sqlite3_DIR to a directory containing sqlite3Config.cmake and/or sqlitet3-config.cmake.
+ :::image-end:::
## 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 may 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 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.
+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.
## Troubleshooting CMake cache errors
-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:
+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.
@@ -274,33 +411,35 @@ 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 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 (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 [Building on the Command Line](building-on-the-command-line.md).
1. Switch to your output folder.
-1. Run CMake to build/configure your app.
+1. Run CMake to build or configure your app.
::: moniker-end
-::: moniker range="vs-2015"
+::: moniker range="msvc-140"
In Visual Studio 2015, Visual Studio users can use a [CMake generator](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html) to generate MSBuild project files, which the IDE then consumes for IntelliSense, browsing, and compilation.
::: 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)
+## 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
new file mode 100644
index 0000000000..41645840b3
--- /dev/null
+++ b/docs/build/cmake-remote-debugging.md
@@ -0,0 +1,186 @@
+---
+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
+---
+
+# Tutorial: Debug a CMake project on a remote Windows machine
+
+This tutorial uses Visual Studio C++ on Windows to create and build a CMake project that you can deploy and debug on a remote Windows machine. The tutorial is specific to Windows ARM64, but the steps can be generalized for other architectures.
+
+In Visual Studio, the default debugging experience for ARM64 is remote debugging an ARM64 Windows machine. Configure your debug settings as shown in this tutorial. Otherwise, when you try to debug an ARM64 CMake project, you'll get an error that Visual Studio can't find the remote machine.
+
+In this tutorial, you'll learn how to:
+
+> [!div class="checklist"]
+>
+> * create a CMake project
+> * configure a CMake project to build for ARM64
+> * configure a CMake project to run on a remote ARM64 Windows machine
+> * debug a CMake project running on a remote ARM64 Windows machine
+
+## Prerequisites
+
+### On the host machine
+
+To set up Visual Studio for cross-platform C++ development, install the build tools for the target architecture. For this tutorial, install the ARM64 build tools by doing these steps:
+
+1. Run the Visual Studio Installer. If you haven't installed Visual Studio yet, see [Install Visual Studio](/visualstudio/install/install-visual-studio)
+1. On the Visual Studio Installer home screen, choose **Modify**.
+1. From the choices at the top, choose **Individual components**.
+1. Scroll down to the **Compilers, build tools, and runtimes** section.
+1. Ensure that the following are selected:
+ - **C++ CMake tools for Windows**
+ - **MSVC v142 - VS 2019 C++ ARM64 build tools (Latest)** It's important that you choose the `ARM64` build tools and not the `ARM` build tools (look for the 64) and that you choose the version that goes with `VS 2019`.
+1. Select **Modify** to install the tools.
+
+### On the remote machine
+
+1. Install the remote tools on the remote machine. For this tutorial, install the ARM64 tools by following the instructions in [Download and Install the remote tools](/visualstudio/debugger/remote-debugging-cpp#download-and-install-the-remote-tools).
+1. Start and configure the remote debugger on the remote machine. For this tutorial, do so by following the directions in [set up the remote debugger](/visualstudio/debugger/remote-debugging-cpp#BKMK_setup) on the remote Windows machine.
+
+## Create a CMake project
+
+On the Windows host machine:
+
+1. Run Visual Studio
+1. From the main menu, select **File** > **New** > **Project**.
+1. Select **CMake Project** > **Next**
+1. Give the project a name and choose a location. Then select **Create**.
+
+Give Visual Studio a few moments to create the project and populate the **Solution Explorer**.
+
+## Configure for ARM64
+
+To target an ARM64 Windows machine, you need to build using ARM64 build tools.
+
+Select the Visual Studio **Configuration** dropdown and select **Manage Configurations**.
+
+
+
+Add a new configuration by selecting **Add a new configuration** (the green **+** button).\
+In the **CMakeSettings** dialog that appears, select **arm64-debug**, and then choose **Select**:
+
+
+
+This command adds a debug configuration named `arm64-Debug` to your *`CmakeSettings.json`* file. This configuration name is a unique, friendly name that makes it easier for you to identify these settings in the **Configuration** dropdown.
+
+The **Toolset** dropdown is set to **msvc_arm64_x64**. Your settings should now look like this:
+
+
+
+> [!Note]
+> In the **Toolset** dropdown, **msvc_arm64** selects 32-bit host tools to cross-compile to ARM64, whereas **msvc_arm64 x64** selects 64-bit host tools to cross-compile to ARM64, which is what you'll do in this tutorial. For more information about the available toolset environments, see [Pre-defined environments](cppproperties-schema-reference.md#pre-defined-environments).
+
+Save the *`CMakeSettings.json`* file. In the configuration dropdown, select **arm64-debug**. (It may take a moment after saving the *`CMakeSettings.json`* file for it to appear in the list):
+
+
+
+## Add a debug configuration file
+
+Next, add configuration information that tells Visual Studio where to find your remote machine, along with other configuration details.
+
+Change the **Solution Explorer** view to targets view by selecting the **Switch Views** button:
+
+
+
+Then, in the **Solution Explorer**, double-click **CMake Targets View** to see the project.
+
+Open the project folder (in this example, **CMakeProject3 Project**), and then right-click the executable and select **Add Debug Configuration**:
+
+
+
+This command creates a *`launch.vs.json`* file in your project. Open it and change the following entries to enable remote debugging:
+
+- `projectTarget`: this value is set for you if you added the debug configuration file from the **Solution Explorer** targets view per the instructions above.
+- `remoteMachineName`: set to the IP address of the remote ARM64 machine, or its machine name.
+
+For more information about *`launch.vs.json`* settings, see [`launch.vs.json` schema reference](launch-vs-schema-reference-cpp.md).
+
+> [!Note]
+> If you're using the folder view instead of the targets view in **Solution Explorer**, right-click the *`CMakeLists.txt`* file and select **Add Debug Configuration**. This experience differs from adding the debug configuration from the targets view in the following ways:
+>
+> - You'll be asked to select a debugger (select **C/C++ Remote Windows Debug**).
+> - Visual Studio will provide less configuration template information in the *`launch.vs.json`* file so you'll need to add it yourself. You'll need to provide the `remoteMachineName` and `projectTarget` entries. When you add the configuration from the targets view, you only need to specify `remoteMachineName`.
+> - For the `projectTarget` setting value, check the startup item dropdown to get the unique name of your target, for example, in this tutorial it is *`CMakeProject3.exe`*'.
+
+## Start the remote debugger monitor on the remote Windows machine
+
+Before you run your CMake project, ensure that the Visual Studio 2019 remote debugger is running on the remote Windows machine. You may need to change the remote debugger options depending on your authentication situation.
+
+For example, on the remote machine, from the Visual Studio Remote Debugger menu bar, select **Tools** > **Options**. Set the **authentication mode** to match how your environment is set up:
+
+
+
+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
+{
+ "version": "0.2.1",
+ "defaults": {},
+ "configurations": [
+ {
+ "type": "remoteWindows",
+ "authenticationType": "none"
+ "name": "CMakeLists.txt",
+ "project": "CMakeLists.txt",
+ "projectTarget": "CMakeProject3.exe",
+ "remoteMachineName": "",
+ "cwd": "${debugInfo.defaultWorkingDirectory}",
+ "program": "${debugInfo.fullTargetPath}",
+ "deploy": [],
+ "args": [],
+ "env": {}
+ },
+ {
+ "type": "default",
+ "project": "CMakeLists.txt",
+ "projectTarget": "CMakeProject3.exe",
+ "name": "CMakeProject3.exe"
+ }
+ ]
+}
+```
+
+## Debug the app
+
+On the host machine, in the Visual Studio **Solution Explorer**, open the CPP file for your CMake project. If you're still in **CMake Targets View**, you'll need to open the **(executable)** node to see it.
+
+The default CPP file is a simple hello world console app. Set a breakpoint on `return 0;`.
+
+On the Visual Studio toolbar, use the **Startup Item** dropdown to select the name you specified for `"name"` in your *`launch.vs.json`* file:
+
+
+
+To start debugging, on the Visual Studio toolbar choose **Debug** > **Start Debugging** (or press **F5**).
+
+If it doesn't start, ensure that the following are set correctly in the *`launch.vs.json`* file:
+
+- `"remoteMachineName"` should be set to the IP address, or the machine name, of the remote ARM64 Windows machine.
+- `"name"` should match the selection in the Visual Studio startup item dropdown.
+- `"projectTarget"` should match the name of the CMake target you want to debug.
+- `"type"` should be `"remoteWindows"`
+- If the authentication type on the remote debugger is set to **No Authentication**, you should have `"authenticationType": "none"` set in the *`launch.vs.json`* file.
+- If you're using Windows authentication, sign in when prompted using an account recognized by the remote machine.
+
+After the project builds, the app should appear on the remote ARM64 Windows machine:
+
+
+
+Visual Studio on the host machine should be stopped at the breakpoint for `return 0;`.
+
+## What you learned
+
+In this tutorial, you created a CMake project, configured it to build for Windows on ARM64, and debugged it on a remote ARM64 Windows machine.
+
+## Next steps
+
+Learn more about configuring and debugging CMake projects in Visual Studio:
+
+> [!div class="nextstepaction"]
+> [CMake Projects in Visual Studio](cmake-projects-in-visual-studio.md)\
+> [Customize CMake build settings](customize-cmake-settings.md)\
+> [Configure CMake debugging sessions](configure-cmake-debugging-sessions.md)\
+> [CMake predefined configuration reference](cmake-predefined-configuration-reference.md)\
+> [`launch.vs.json` schema reference](launch-vs-schema-reference-cpp.md)
diff --git a/docs/build/cmakesettings-reference.md b/docs/build/cmakesettings-reference.md
index 7b0a50f01e..e9a6acdb8f 100644
--- a/docs/build/cmakesettings-reference.md
+++ b/docs/build/cmakesettings-reference.md
@@ -1,127 +1,128 @@
---
+description: "Learn more about: CMakeSettings.json schema reference"
title: "CMakeSettings.json schema reference"
ms.date: "11/22/2019"
helpviewer_keywords: ["CMake in Visual C++"]
ms.assetid: 444d50df-215e-4d31-933a-b41841f186f8
---
-# CMakeSettings.json schema reference
+# `CMakeSettings.json` schema reference
-::: moniker range="vs-2015"
+::: moniker range="msvc-140"
CMake projects are supported in Visual Studio 2017 and later.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
-The **CMakeSettings.json** file contains information that Visual Studio uses for IntelliSense and to construct the command-line arguments that it passes to cmake.exe for a specified *configuration* and compiler *environment*. A configuration specifies properties that apply to a specific platform and build-type, for example, `x86-Debug` or `Linux-Release`. Each configuration specifies an environment, which encapsulates information about the compiler toolset, for example MSVC, GCC, or Clang. CMake uses the command-line arguments to regenerate the root *CMakeCache.txt* file and other project files for the project. The values can be overridden in the *CMakeLists.txt* files.
+The *`CMakeSettings.json`* file contains information that Visual Studio uses for IntelliSense and to construct the command-line arguments that it passes to CMake for a specified configuration and compiler environment. A *configuration* specifies properties that apply to a specific platform and build-type, for example, `x86-Debug` or `Linux-Release`. Each configuration specifies an *environment*, which encapsulates information about the compiler toolset, for example MSVC, GCC, or Clang. CMake uses the command-line arguments to regenerate the root *`CMakeCache.txt`* file and other project files for the project. The values can be overridden in the *`CMakeLists.txt`* files.
-You can add or remove configurations in the IDE and then edit them directly in the JSON file or use the **CMake Settings editor** (Visual Studio 2019 and later). You can switch between the configurations easily in the IDE to generate the various project files. See [Customize CMake build settings in Visual Studio](customize-cmake-settings.md) for more information.
+You can add or remove configurations in the IDE and then edit them directly in the JSON file or use the **CMake Settings editor** (Visual Studio 2019 and later). You can switch between the configurations easily in the IDE to generate the various project files. For more information, see [Customize CMake build settings in Visual Studio](customize-cmake-settings.md).
## Configurations
-The `configurations` array contains all the configurations for a CMake project. See [CMake predefined configuration reference](cmake-predefined-configuration-reference.md) for more information about the pre-defined configurations. You can add any number of pre-defined or custom configurations to the file.
+The `configurations` array contains all the configurations for a CMake project. For more information about the pre-defined configurations, see [CMake predefined configuration reference](cmake-predefined-configuration-reference.md). You can add any number of pre-defined or custom configurations to the file.
A `configuration` has these properties:
-- `addressSanitizerEnabled`: if **`true`** compiles the program with Address Sanitizer (Experimental on Windows). On Linux, compile with -fno-omit-frame-pointer and compiler optimization level -Os or -Oo for best results.
-- `addressSanitizerRuntimeFlags`: runtime flags passed to AddressSanitizer via the ASAN_OPTIONS environment variable. Format: flag1=value:flag2=value2.
-- `buildCommandArgs`: specifies native build switches passed to CMake after --build --. For example, passing -v when using the Ninja generator forces Ninja to output command lines. See [Ninja command line arguments](#ninja) for more information on Ninja commands.
-- `buildRoot`: specifies the directory in which CMake generates build scripts for the chosen generator. Maps to **-DCMAKE_BINARY_DIR** switch and specifies where *CMakeCache.txt* will be created. If the folder does not exist, it is created. Supported macros include `${workspaceRoot}`, `${workspaceHash}`, `${projectFile}`, `${projectDir}`, `${thisFile}`, `${thisFileDir}`, `${name}`, `${generator}`, `${env.VARIABLE}`.
-- `cacheGenerationCommand`: specifies a command line tool and arguments, for example *gencache.bat debug* to generate the cache. The command is run from the shell in the specified environment for the configuration when the user explicitly requests regeneration, or a CMakeLists.txt or CMakeSettings.json file is modified.
-- `cacheRoot`: specifies the path to a CMake cache. This directory should contain an existing *CMakeCache.txt* file.
-- `clangTidyChecks`: comma-separated list of warnings that will be passed to clang-tidy; wildcards are allowed and '-' prefix will remove checks.
-- `cmakeCommandArgs`: specifies additional command-line options passed to CMake when invoked to generate the project files.
-- `cmakeToolchain`: specifies the toolchain file. This is passed to CMake using -DCMAKE_TOOLCHAIN_FILE."
-- `codeAnalysisRuleset`: specifies the ruleset to use when running code analysis. This can be a full path or the file name of a ruleset file installed by Visual Studio.
-- `configurationType`: specifies the build type configuration for the selected generator. May be one of:
-
- - Debug
- - Release
- - MinSizeRel
- - RelWithDebInfo
+- `addressSanitizerEnabled`: If **`true`**, compiles the program using [AddressSanitizer](../sanitizers/asan.md). On Linux, compile with `-fno-omit-frame-pointer` and compiler optimization level `-Os` or `-Oo` for best results.
+- `addressSanitizerRuntimeFlags`: The runtime flags passed to [AddressSanitizer](../sanitizers/asan.md) in the `ASAN_OPTIONS` environment variable. Format: flag1=value:flag2=value2.
+- `buildCommandArgs`: Specifies native build switches passed to CMake after `--build --`. For example, passing `-v` when using the Ninja generator forces Ninja to output command lines. For more information on Ninja commands, see [Ninja command line arguments](#ninja).
+- `buildRoot`: Specifies the directory in which CMake generates build scripts for the chosen generator. Maps to **`-DCMAKE_BINARY_DIR`** switch and specifies where *`CMakeCache.txt`* is created. If the folder doesn't exist, it's created. Supported macros include `${workspaceRoot}`, `${workspaceHash}`, `${projectFile}`, `${projectDir}`, `${thisFile}`, `${thisFileDir}`, `${name}`, `${generator}`, `${env.VARIABLE}`.
+- `cacheGenerationCommand`: Specifies a command-line tool and arguments, for example **`gencache.bat debug`** to generate the cache. The command is run from the shell in the specified environment for the configuration when the user explicitly requests regeneration, or a *`CMakeLists.txt`* or *`CMakeSettings.json`* file is modified.
+- `cacheRoot`: Specifies the path to a CMake cache. This directory should contain an existing *`CMakeCache.txt`* file.
+- `clangTidyChecks`: comma-separated list of warnings that's passed to clang-tidy; wildcards are allowed and a '-' prefix removes checks.
+- `cmakeCommandArgs`: Specifies any extra command-line options to pass to CMake when invoked to generate the project files.
+- `cmakeToolchain`: Specifies the toolchain file. It's passed to CMake using `-DCMAKE_TOOLCHAIN_FILE`.
+- `codeAnalysisRuleset`: Specifies the ruleset to use when running code analysis. You can use a full path or the filename of a ruleset file installed by Visual Studio.
+- `configurationType`: Specifies the build type configuration for the selected generator. May be one of:
+
+ - `Debug`
+ - `Release`
+ - `MinSizeRel`
+ - `RelWithDebInfo`
-- `ctestCommandArgs`: specifies additional command-line options passed to CTest when running the tests."
-- `description`: description of this configuration that will appear in menus.
-- `enableClangTidyCodeAnalysis`: use Clang-Tidy for code analysis.
-- `enableMicrosoftCodeAnalysis`: use Microsoft code analysis tools for code analysis.
-- `generator`: specifies CMake generator to use for this configuration. May be one of:
+- `ctestCommandArgs`: Specifies any extra command-line options to pass to CTest when running the tests.
+- `description`: The description of this configuration that appears in menus.
+- `enableClangTidyCodeAnalysis`: Use Clang-Tidy for code analysis.
+- `enableMicrosoftCodeAnalysis`: Use Microsoft code analysis tools for code analysis.
+- `generator`: Specifies the CMake generator to use for this configuration. May be one of:
**Visual Studio 2019 only:**
- - Visual Studio 16 2019
- - Visual Studio 16 2019 Win64
- - Visual Studio 16 2019 ARM
+ - `Visual Studio 16 2019`
+ - `Visual Studio 16 2019 Win64`
+ - `Visual Studio 16 2019 ARM`
**Visual Studio 2017 and later:**
- - Visual Studio 15 2017
- - Visual Studio 15 2017 Win64
- - Visual Studio 15 2017 ARM
- - Visual Studio 14 2015
- - Visual Studio 14 2015 Win64
- - Visual Studio 14 2015 ARM
- - Unix Makefiles
- - Ninja
-
-Because Ninja is designed for fast build speeds instead of flexibility and function, it is set as the default. However, some CMake projects may be unable to correctly build using Ninja. If this occurs, you can instruct CMake to generate Visual Studio projects instead.
-
-To specify a Visual Studio generator in Visual Studio 2017, open the settings editor from the main menu by choosing **CMake | Change CMake Settings**. Delete "Ninja" and type "V". This activates IntelliSense, which enables you to choose the generator you want.
-
-To specify a Visual Studio generator in Visual Studio 2019, right-click on the *CMakeLists.txt* file in **Solution Explorer** and choose **CMake Settings for project** > **Show Advanced Settings** > **CMake Generator**.
-
-When the active configuration specifies a Visual Studio generator, by default MSBuild.exe is invoked with `-m -v:minimal` arguments. To customize the build, inside the *CMakeSettings.json* file, you can specify additional [MSBuild command line arguments](../build/reference/msbuild-visual-cpp-overview.md) to be passed to the build system via the `buildCommandArgs` property:
-
- ```json
- "buildCommandArgs": "-m:8 -v:minimal -p:PreferredToolArchitecture=x64"
- ```
-
-- `installRoot`: specifies the directory in which CMake generates install targets for the chosen generator. Supported macros include `${workspaceRoot}`, `${workspaceHash}`, `${projectFile}`, `${projectDir}`, `${thisFile}`, `${thisFileDir}`, `${name}`, `${generator}`, `${env.VARIABLE}`.
-- `inheritEnvironments`: specifies one or more compiler environments that this configuration depends on. May be any custom environment or one of the predefined environments. For more information, see [Environments](#environments).
-- `intelliSenseMode`: specifies the mode used for computing intellisense information". May be one of:
-
- - windows-msvc-x86
- - windows-msvc-x64
- - windows-msvc-arm
- - windows-msvc-arm64
- - android-clang-x86
- - android-clang-x64
- - android-clang-arm
- - android-clang-arm64
- - ios-clang-x86
- - ios-clang-x64
- - ios-clang-arm
- - ios-clang-arm64
- - windows-clang-x86
- - windows-clang-x64
- - windows-clang-arm
- - windows-clang-arm64
- - linux-gcc-x86
- - linux-gcc-x64
- - linux-gcc-arm"
-
-- `name`: names the configuration. See [CMake predefined configuration reference](cmake-predefined-configuration-reference.md) for more information about the pre-defined configurations.
+ - `Visual Studio 15 2017`
+ - `Visual Studio 15 2017 Win64`
+ - `Visual Studio 15 2017 ARM`
+ - `Visual Studio 14 2015`
+ - `Visual Studio 14 2015 Win64`
+ - `Visual Studio 14 2015 ARM`
+ - `Unix Makefiles`
+ - `Ninja`
+
+Because Ninja is designed for fast build speeds instead of flexibility and function, it's set as the default. However, some CMake projects may be unable to correctly build using Ninja. If a build failure occurs, you can instruct CMake to generate Visual Studio projects instead.
+
+To specify a Visual Studio generator in Visual Studio 2017, open the settings editor from the main menu by choosing **CMake | Change CMake Settings**. Delete "Ninja" and enter "V". This change activates IntelliSense, which lets you choose the generator you want.
+
+To specify a Visual Studio generator in Visual Studio 2019, right-click on the *`CMakeLists.txt`* file in **Solution Explorer** and choose **CMake Settings for project** > **Show Advanced Settings** > **CMake Generator**.
+
+By default, when the active configuration specifies a Visual Studio generator, it invokes MSBuild with `-m -v:minimal` arguments. To customize the build, use the `buildCommandArgs` property inside the *`CMakeSettings.json`* file. Here, you can specify [MSBuild command line arguments](../build/reference/msbuild-visual-cpp-overview.md) to pass to the build system:
+
+```json
+"buildCommandArgs": "-m:8 -v:minimal -p:PreferredToolArchitecture=x64"
+```
+
+- `installRoot`: Specifies the directory in which CMake generates install targets for the chosen generator. Supported macros include `${workspaceRoot}`, `${workspaceHash}`, `${projectFile}`, `${projectDir}`, `${thisFile}`, `${thisFileDir}`, `${name}`, `${generator}`, `${env.VARIABLE}`.
+- `inheritEnvironments`: Specifies one or more compiler environments that this configuration depends on. May be any custom environment or one of the predefined environments. For more information, see [Environments](#environments).
+- `intelliSenseMode`: Specifies the mode used for computing intellisense information". The value may be one of:
+
+ - `windows-msvc-x86`
+ - `windows-msvc-x64`
+ - `windows-msvc-arm`
+ - `windows-msvc-arm64`
+ - `android-clang-x86`
+ - `android-clang-x64`
+ - `android-clang-arm`
+ - `android-clang-arm64`
+ - `ios-clang-x86`
+ - `ios-clang-x64`
+ - `ios-clang-arm`
+ - `ios-clang-arm64`
+ - `windows-clang-x86`
+ - `windows-clang-x64`
+ - `windows-clang-arm`
+ - `windows-clang-arm64`
+ - `linux-gcc-x86`
+ - `linux-gcc-x64`
+ - `linux-gcc-arm`
+
+- `name`: names the configuration. For more information about the pre-defined configurations, see [CMake predefined configuration reference](cmake-predefined-configuration-reference.md).
- `wslPath`: the path to the launcher of an instance of Windows Subsystem for Linux.
-### Additional settings for CMake Linux projects
+### Settings for CMake Linux projects
-- `remoteMachineName`: specifies the name of the remote Linux machine that hosts CMake, builds, and the debugger. Use the Connection Manager for adding new Linux machines. Supported macros include `${defaultRemoteMachineName}`.
-- `remoteCopySourcesOutputVerbosity`: specifies the verbosity level of the source copying operation to the remote machine. May be one of ""Normal", "Verbose", or "Diagnostic".
-- `remoteCopySourcesConcurrentCopies`: specifies the number of concurrent copies used during the synchronization of the sources to the remote machine (sftp only).
-- `remoteCopySourcesMethod`: specifies the method to copy files to the remote machine. May be "rsync" or "sftp".
-- `remoteCMakeListsRoot`: specifies the directory on the remote machine that contains the CMake project. Supported macros include `${workspaceRoot}`, `${workspaceHash}`, `${projectFile}`, `${projectDir}`, `${thisFile}`, `${thisFileDir}`, `${name}`, `${generator}`, `${env.VARIABLE}`.
-- `remoteBuildRoot`: specifies the directory on the remote machine in which CMake generates build scripts for the chosen generator. Supported macros include `${workspaceRoot}`, `${workspaceHash}`, `${projectFile}`, `${projectDir}`, `${thisFile}`, `${thisFileDir}`, `${name}`, `${generator}`, `${env.VARIABLE}`.
-- `remoteInstallRoot`: specifies the directory on the remote machine in which CMake generates install targets for the chosen generator. Supported macros include `${workspaceRoot}`, `${workspaceHash}`, `${projectFile}`, `${projectDir}`, `${thisFile}`, `${thisFileDir}`, `${name}`, `${generator}`, and `${env.VARIABLE}` where `VARIABLE` is an environment variable that has been defined at the system, user, or session level.
+- `remoteMachineName`: Specifies the name of the remote Linux machine that hosts CMake, builds, and the debugger. Use the Connection Manager for adding new Linux machines. Supported macros include `${defaultRemoteMachineName}`.
+- `remoteCopySourcesOutputVerbosity`: Specifies the verbosity level of the source copying operation to the remote machine. May be one of `Normal`, `Verbose`, or `Diagnostic`.
+- `remoteCopySourcesConcurrentCopies`: Specifies the concurrent copies to use during synchronization of the sources to the remote machine (sftp only).
+- `remoteCopySourcesMethod`: Specifies the method to copy files to the remote machine. May be `rsync` or `sftp`.
+- `remoteCMakeListsRoot`: Specifies the directory on the remote machine that contains the CMake project. Supported macros include `${workspaceRoot}`, `${workspaceHash}`, `${projectFile}`, `${projectDir}`, `${thisFile}`, `${thisFileDir}`, `${name}`, `${generator}`, and `${env.VARIABLE}`.
+- `remoteBuildRoot`: Specifies the directory on the remote machine in which CMake generates build scripts for the chosen generator. Supported macros include `${workspaceRoot}`, `${workspaceHash}`, `${projectFile}`, `${projectDir}`, `${thisFile}`, `${thisFileDir}`, `${name}`, `${generator}`, `${env.VARIABLE}`.
+- `remoteInstallRoot`: Specifies the directory on the remote machine in which CMake generates install targets for the chosen generator. Supported macros include `${workspaceRoot}`, `${workspaceHash}`, `${projectFile}`, `${projectDir}`, `${thisFile}`, `${thisFileDir}`, `${name}`, `${generator}`, and `${env.VARIABLE}`, where `VARIABLE` is an environment variable that's been defined at the system, user, or session level.
- `remoteCopySources`: A `boolean` that specifies whether Visual Studio should copy source files to the remote machine. The default is true. Set to false if you manage file synchronization yourself.
- `remoteCopyBuildOutput`: A `boolean` that specifies whether to copy the build outputs from the remote system.
- `remoteCopyAdditionalIncludeDirectories`: Additional include directories to be copied from the remote machine to support IntelliSense. Format as "/path1;/path2...".
- `remoteCopyExcludeDirectories`: Include directories NOT to copy from the remote machine. Format as "/path1;/path2...".
- `remoteCopyUseCompilerDefaults`: Specifies whether to use the compiler's default defines and include paths for IntelliSense. Should only be false if the compilers in use to not support gcc-style arguments.
-- `rsyncCommandArgs`: specifies a set of additional command-line options passed to rsync.
-- `remoteCopySourcesExclusionList`: A `array` that specifies a list of paths to be excluded when copying source files`: a path can be the name of a file/directory, or a path relative to root of the copy. Wildcards \\\"*\\\" and \\\"?\\\" can be used for glob pattern matching.
-- `cmakeExecutable`: specifies the full path to the CMake program executable, including the file name and extension.
-- `remotePreGenerateCommand`: specifies the command to run before running CMake to parse the *CMakeLists.txt* file.
-- `remotePrebuildCommand`: specifies the command to run on the remote machine before building.
-- `remotePostbuildCommand`: specifies the command to run on the remote machine after building.
-- `variables`: contains a name-value pair of CMake variables that will get passed as **-D** *_name_=_value_* to CMake. If your CMake project build instructions specify the addition of any variables directly to the *CMakeCache.txt* file, it is recommended that you add them here instead. The following example shows how to specify the name-value pairs for the 14.14.26428 MSVC toolset:
+- `rsyncCommandArgs`: Specifies a set of command-line options passed to rsync.
+- `remoteCopySourcesExclusionList`: An `array` that specifies a list of paths to be excluded when copying source files: a path can be the name of a file/directory, or a relative path from the root of the copy. Wildcards `*` and `?` can be used for glob pattern matching.
+- `cmakeExecutable`: Specifies the full path to the CMake program executable, including the file name and extension.
+- `remotePreGenerateCommand`: Specifies the command to run before running CMake to parse the *`CMakeLists.txt`* file.
+- `remotePrebuildCommand`: Specifies the command to run on the remote machine before building.
+- `remotePostbuildCommand`: Specifies the command to run on the remote machine after building.
+- `variables`: Contains a name-value pair of CMake variables that get passed as **`-D name=value`** to CMake. If your CMake project build instructions specify the addition of any variables directly to the *`CMakeCache.txt`* file, we recommend you add them here instead. This example shows how to specify the name-value pairs to use the 14.14.26428 MSVC toolset:
```json
"variables": [
@@ -138,46 +139,48 @@ When the active configuration specifies a Visual Studio generator, by default MS
]
```
-Note that if you do not define the `"type"`, the `"STRING"` type will be assumed by default.
+If you don't define the `"type"`, the `"STRING"` type is assumed by default.
- `remoteCopyOptimizations`: **Visual Studio 2019 version 16.5 or later** properties for controlling source copy to the remote target. Optimizations are enabled by default. Includes `remoteCopyUseOptimizations`, `rsyncSingleDirectoryCommandArgs`, and `remoteCopySourcesMaxSmallChange`.
## Environments
-An *environment* encapsulates the environment variables that are set in the process that Visual Studio uses to invoke cmake.exe. For MSVC projects, the variables are those that are set in a [developer command prompt](building-on-the-command-line.md) for a specific platform. For example, the `msvc_x64_x64` environment is the same as running the **Developer Command Prompt for VS 2017** or **Developer Command Prompt for VS 2019** with the **-arch=amd64 -host_arch=amd64** arguments. You can use the `env.{}` syntax in *CMakeSettings.json* to reference the individual environment variables, for example to construct paths to folders. The following predefined environments are provided:
+An *environment* encapsulates the environment variables set in the process that Visual Studio uses to invoke CMake. For MSVC projects, it captures the variables set in a [developer command prompt](building-on-the-command-line.md) for a specific platform. For example, the `msvc_x64_x64` environment is the same as running the **Developer Command Prompt for VS {version}** with the **-arch=amd64 -host_arch=amd64** arguments. You can use the `env.{}` syntax in *`CMakeSettings.json`* to reference the individual environment variables, for example to construct paths to folders. The following predefined environments are provided:
-- linux_arm: Target ARM Linux remotely.
-- linux_x64: Target x64 Linux remotely.
-- linux_x86: Target x86 Linux remotely.
-- msvc_arm: Target ARM Windows with the MSVC compiler.
-- msvc_arm_x64: Target ARM Windows with the 64-bit MSVC compiler.
-- msvc_arm64: Target ARM64 Windows with the MSVC compiler.
-- msvc_arm64_x64: Target ARM64 Windows with the 64-bit MSVC compiler.
-- msvc_x64: Target x64 Windows with the MSVC compiler.
-- msvc_x64_x64: Target x64 Windows with the 64-bit MSVC compiler.
-- msvc_x86: Target x86 Windows with the MSVC compiler.
-- msvc_x86_x64: Target x86 Windows with the 64-bit MSVC compiler.
+- `linux_arm`: Target ARM Linux remotely.
+- `linux_x64`: Target x64 Linux remotely.
+- `linux_x86`: Target x86 Linux remotely.
+- `msvc_arm`: Target ARM Windows with the MSVC compiler.
+- `msvc_arm_x64`: Target ARM Windows with the 64-bit MSVC compiler.
+- `msvc_arm64`: Target ARM64 Windows with the MSVC compiler.
+- `msvc_arm64_x64`: Target ARM64 Windows with the 64-bit MSVC compiler.
+- `msvc_arm64ec`: Target ARM64EC Windows with the MSVC compiler.
+- `msvc_arm64ec_x64`: Target ARM64EC Windows with the 64-bit MSVC compiler.
+- `msvc_x64`: Target x64 Windows with the MSVC compiler.
+- `msvc_x64_x64`: Target x64 Windows with the 64-bit MSVC compiler.
+- `msvc_x86`: Target x86 Windows with the MSVC compiler.
+- `msvc_x86_x64`: Target x86 Windows with the 64-bit MSVC compiler.
-### Accessing environment variables from CMakeLists.txt
+### Accessing environment variables from *`CMakeLists.txt`*
-From a CMakeLists.txt file, all environment variables are referenced by the syntax `$ENV{variable_name}`. To see the available variables for an environment, open the corresponding command prompt and type `SET`. Some of the information in environment variables is also available through CMake system introspection variables, but you may find it more convenient to use the environment variable. For example, the MSVC compiler version or Windows SDK version are easily retrieved through the environment variables.
+From a *`CMakeLists.txt`* file, all environment variables are referenced by the syntax `$ENV{variable_name}`. To see the available variables for an environment, open the corresponding command prompt and type `SET`. Some of the information in environment variables is also available through CMake system introspection variables, but you may find it more convenient to use the environment variable. For example, you can easily retrieve the MSVC compiler version or Windows SDK version through the environment variables.
### Custom environment variables
-In `CMakeSettings.json`, you can define custom environment variables globally or per-configuration in the `environments` array. A custom environment is a convenient way to group a set of properties that you can use in place of a predefined environment, or to extend or modify a predefined environment. Each item in the `environments` array consists of:
+In *`CMakeSettings.json`*, you can define custom environment variables globally or per-configuration in the `environments` array. A custom environment is a convenient way to group a set of properties. You can use it in place of a predefined environment, or to extend or modify a predefined environment. Each item in the `environments` array consists of:
-- `namespace`: names the environment so that its variables can be referenced from a configuration in the form `namespace.variable`. The default environment object is called `env` and is populated with certain system environment variables including `%USERPROFILE%`.
-- `environment`: uniquely identifies this group of variables. Allows the group to be inherited later in an `inheritEnvironments` entry.
+- `namespace`: Names the environment so that its variables can be referenced from a configuration in the form `namespace.variable`. The default environment object is called `env` and is populated with certain system environment variables including `%USERPROFILE%`.
+- `environment`: Uniquely identifies this group of variables. Allows the group to be inherited later in an `inheritEnvironments` entry.
- `groupPriority`: An integer that specifies the priority of these variables when evaluating them. Higher number items are evaluated first.
-- `inheritEnvironments`: An array of values that specify the set of environments that are inherited by this group. This feature enables you to inherit default environments and create custom environment variables that are passed to CMake.exe when it runs.
+- `inheritEnvironments`: An array of values that specify the set of environments that are inherited by this group. This feature lets you inherit default environments and create custom environment variables to pass to CMake when it runs.
-**Visual Studio 2019 version 16.4 and later:** Debug targets are automatically launched with the environment you specify in *CMakeSettings.json*. You can override or add environment variables on a per-target or per-task basis in [launch.vs.json](launch-vs-schema-reference-cpp.md) and [tasks.vs.json](tasks-vs-json-schema-reference-cpp.md).
+**Visual Studio 2019 version 16.4 and later:** Debug targets are automatically launched with the environment you specify in *`CMakeSettings.json`*. You can override or add environment variables on a per-target or per-task basis in [`launch.vs.json`](launch-vs-schema-reference-cpp.md) and [`tasks.vs.json`](tasks-vs-json-schema-reference-cpp.md).
-The following example defines one global variable, **BuildDir**, which is inherited in both the x86-Debug and x64-Debug configurations. Each configuration uses the variable to specify the value for the **buildRoot** property for that configuration. Note also how each configuration uses the **inheritEnvironments** property to specify a variable that applies only to that configuration.
+The following example defines one global variable, `BuildDir`, which is inherited in both the x86-Debug and x64-Debug configurations. Each configuration uses the variable to specify the value for the `buildRoot` property for that configuration. Note also how each configuration uses the `inheritEnvironments` property to specify a variable that applies only to that configuration.
```json
{
- // The "environments" property is an array of key value pairs of the form
+ // The "environments" property is an array of key-value pairs of the form
// { "EnvVar1": "Value1", "EnvVar2": "Value2" }
"environments": [
{
@@ -224,7 +227,7 @@ In the next example, the x86-Debug configuration defines its own value for the *
{
// Replace the global property entirely.
"BuildDir": "D:\\custom-builddir"
- // This environment does not specify a namespace, hence by default "env" will be assumed.
+ // This environment does not specify a namespace, hence by default "env" is assumed.
// "namespace" : "name" would require that this variable be referenced with "${name.BuildDir}".
}
],
@@ -251,21 +254,22 @@ In the next example, the x86-Debug configuration defines its own value for the *
## Macros
-The following macros can be used in *CMakeSettings.json*:
+The following macros can be used in *`CMakeSettings.json`*:
- `${workspaceRoot}` – the full path of the workspace folder
- `${workspaceHash}` – hash of workspace location; useful for creating a unique identifier for the current workspace (for example, to use in folder paths)
-- `${projectFile}` – the full path of the root CMakeLists.txt file
-- `${projectDir}` – the full path of the folder of the root CMakeLists.txt file
-- `${thisFile}` – the full path of the `CMakeSettings.json` file
+- `${projectFile}` – the full path of the root *`CMakeLists.txt`* file
+- `${projectDir}` – the full path of the folder containing the root *`CMakeLists.txt`* file
+- `${projectDirName}` – the name of the folder containing the root *`CMakeLists.txt`* file
+- `${thisFile}` – the full path of the *`CMakeSettings.json`* file
- `${name}` – the name of the configuration
- `${generator}` – the name of the CMake generator used in this configuration
-All references to macros and environment variables in *CMakeSettings.json* are expanded before being passed to the cmake.exe command line.
+All references to macros and environment variables in *`CMakeSettings.json`* are expanded before being passed to the CMake command line.
-## Ninja command line arguments
+## Ninja command-line arguments
-If targets are unspecified, builds the 'default' target.
+If targets are unspecified, Ninja builds the 'default' target.
```cmd
C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise>ninja -?
@@ -273,18 +277,18 @@ ninja: invalid option -- `-?'
usage: ninja [options] [targets...]
```
-|Option|Description|
-|--------------|------------|
-| --version | print ninja version ("1.7.1")|
-| -C DIR | change to DIR before doing anything else|
-| -f FILE | specify input build file (default=build.ninja)|
-| -j N | run N jobs in parallel (default=14, derived from CPUs available)|
-| -k N | keep going until N jobs fail (default=1)|
-| -l N | do not start new jobs if the load average is greater than N|
-| -n | dry run (don't run commands but act like they succeeded)|
-| -v | show all command lines while building|
-| -d MODE | enable debugging (use -d list to list modes)|
-| -t TOOL | run a subtool (use -t list to list subtools). terminates top-level options; further flags are passed to the tool|
-| -w FLAG | adjust warnings (use -w list to list warnings)|
+| Option | Description |
+|--|--|
+| `--version` | Print ninja version ("1.7.1") |
+| `-C DIR` | Change to DIR before doing anything else |
+| `-f FILE` | Specify input build file (default=*`build.ninja`*) |
+| `-j N` | Run `N` jobs in parallel (default=14, derived from CPUs available) |
+| `-k N` | Keep going until `N` jobs fail (default=1) |
+| `-l N` | Don't start new jobs if the load average is greater than `N` |
+| `-n` | Dry run (don't run commands but act like they succeeded) |
+| `-v` | Show all command lines while building |
+| `-d MODE` | Enable debugging (use `-d list` to list modes) |
+| `-t TOOL` | Run a subtool (use `-t list` to list subtools). Ends any top-level options; further flags are passed to the tool |
+| `-w FLAG` | Adjust warnings (use `-w list` to list warnings) |
::: moniker-end
diff --git a/docs/build/common-problems-when-creating-a-release-build.md b/docs/build/common-problems-when-creating-a-release-build.md
index 0329179c05..b0c6111231 100644
--- a/docs/build/common-problems-when-creating-a-release-build.md
+++ b/docs/build/common-problems-when-creating-a-release-build.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Common Problems When Creating a Release Build"
title: "Common Problems When Creating a Release Build"
ms.date: "11/04/2016"
helpviewer_keywords: ["unexpected code generation", "debugging [MFC], release builds", "release builds, troubleshooting", "stray pointers", "debug builds, difference from release builds", "MFC [C++], release builds", "heap layout problems", "pointers, stray", "release builds, building applications", "debug memory allocator", "optimization [C++], compiler", "projects [C++], debug configuration", "troubleshooting release builds", "memory [C++], overwrites"]
diff --git a/docs/build/common-visual-cpp-64-bit-migration-issues.md b/docs/build/common-visual-cpp-64-bit-migration-issues.md
index b14cd0b55f..531a59ee62 100644
--- a/docs/build/common-visual-cpp-64-bit-migration-issues.md
+++ b/docs/build/common-visual-cpp-64-bit-migration-issues.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Common Visual C++ 64-bit Migration Issues"
title: "Common Visual C++ 64-bit Migration Issues"
ms.date: "05/06/2019"
helpviewer_keywords: ["64-bit programming [C++], migration", "64-bit compiler [C++], migration", "porting 32-bit code to 64-bit code", "migration [C++], 64-bit code issues", "32-bit code porting [C++]", "64-bit applications [C++]", "64-bit compiler [C++], porting 32-bit code", "Win64 [C++]"]
diff --git a/docs/build/common-visual-cpp-arm-migration-issues.md b/docs/build/common-visual-cpp-arm-migration-issues.md
index c5bca9c4b0..36035c044b 100644
--- a/docs/build/common-visual-cpp-arm-migration-issues.md
+++ b/docs/build/common-visual-cpp-arm-migration-issues.md
@@ -1,28 +1,31 @@
---
+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
@@ -40,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.
@@ -68,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;
@@ -82,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, 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 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 and x64 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 and x64 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/compare-inclusion-methods.md b/docs/build/compare-inclusion-methods.md
new file mode 100644
index 0000000000..8c16032aee
--- /dev/null
+++ b/docs/build/compare-inclusion-methods.md
@@ -0,0 +1,43 @@
+---
+description: "Learn about the different ways to include library headers in C++: header files vs modules vs header units vs precompiled headers."
+title: "Compare header units, modules, and precompiled headers"
+ms.date: 11/30/2022
+f1_keywords: ["#include", "header file", "header unit", "module", "named module", "PCH", "precompiled header file", "IFC"]
+helpviewer_keywords: ["headers, C++ library", "libraries, Standard C++", "C++ Standard Library, headers", "STL", "Standard template library, headers", "precompiled header files, creating", "PCH files, creating", "import", "header unit", "ifc", "modules [C++]", "named modules [C++]", "import standard library (STL) using named modules"]
+---
+# Compare header units, modules, and precompiled headers
+
+Historically, you'd include the standard library with a directive like `#include `. However, it's expensive to include header files because they're reprocessed by every source file that includes them.
+
+Precompiled headers (PCH) were introduced to speed compilation by translating them once and reusing the result. But precompiled headers can be difficult to maintain.
+
+In C++20, modules were introduced as a significant improvement on header files and precompiled headers.
+
+Header units were introduced in C++20 as a way to temporarily bridge the gap between header files and modules. They provide some of the speed and robustness benefits of modules, while you migrate your code to use modules.
+
+Then, the C++23 standard library introduced support for importing the standard library as named modules. This is the fastest and most robust way to consume the standard library.
+
+To help you sort out the different options, this article compares the traditional `#include` method against precompiled headers, header units, and importing named modules.
+
+The following table is arranged by compiler processing speed and robustness, with `#include` being the slowest and least robust, and `import` being the fastest and most robust.
+
+| Method | Summary |
+|---|---|
+| `#include` | One disadvantage is that they expose macros and internal implementation. Internal implementation is often exposed as functions and types that start with an underscore. That's a convention to indicate that something is part of the internal implementation and shouldn't be used.
Header files are fragile because the order of #includes can modify behavior or break code and are affected by macro definitions.
Header files slow compilation. Particularly when multiple files include the same file because then the header file is reprocessed multiple times. |
+| [Precompiled header](../build/creating-precompiled-header-files.md) | A precompiled header (PCH) improves compile time by creating a compiler memory snapshot of a set of header files. This is an improvement on repeatedly rebuilding header files.
PCH files have restrictions that make them difficult to maintain.
PCH files are faster than `#include` but slower than `import`.|
+| [Header units](../build/walkthrough-header-units.md) | This is a new feature in C++20 that allows you to import 'well-behaved' header files as modules.
Header units are faster than `#include`, and are easier to maintain, significantly smaller, and also faster than pre-compiled header files (PCH).
Header units are an 'in-between' step meant to help transition to named modules in cases where you rely on macros defined in header files, since named modules don't expose macros.
Header units are slower than importing a named module.
Header units aren't affected by macro defines unless they're specified on the command line when the header unit is built--making them more robust than header files.
Header units expose the macros and internal implementation defined in them just as header file do, which named modules don't.
As a rough approximation of file size, a 250-megabyte PCH file might be represented by an 80-megabyte header unit file. |
+| [Modules](../cpp/modules-cpp.md) | This is the fastest and most robust way to import functionality.
Support for importing modules was introduced in C++20. The C++23 standard library introduces the two named modules described in this topic.
When you import `std`, you get the standard names such as `std::vector`, `std::cout`, but no extensions, no internal helpers such as `_Sort_unchecked`, and no macros.
The order of imports doesn't matter because there are no macro or other side-effects.
As a rough approximation of file size, a 250-megabyte PCH file might be represented by an 80-megabyte header unit file, which might be represented by a 25-megabyte module.
Named modules are faster because when a named module is compiled into an `.ifc` file and an `.obj` file, the compiler emits a structured representation of the source code that can be loaded quickly when the module is imported. The compiler can do some work (like name resolution) before emitting the `.ifc` file because of how named modules are order-independent and macro-independent--so this work doesn't have to be done when the module is imported. In contrast, when a header file is consumed with `#include`, its contents must be preprocessed and compiled again and again in every translation unit.
Precompiled headers, which are compiler memory snapshots, can mitigate those costs, but not as well as named modules. |
+
+If you can use C++20 features and the C++23 standard library in your app, use named modules.
+
+If you can use C++20 features but want to transition over time to modules, use header units in the interim.
+
+If you can't use C++20 features, use `#include` and consider precompiled headers.
+
+## See also
+
+[Precompiled header files](creating-precompiled-header-files.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: Import STL libraries as header units](walkthrough-import-stl-header-units.md#approach1)\
+[Walkthrough: Build and import header units in your Visual C++ projects](walkthrough-header-units.md)
\ No newline at end of file
diff --git a/docs/build/concepts-of-isolated-applications-and-side-by-side-assemblies.md b/docs/build/concepts-of-isolated-applications-and-side-by-side-assemblies.md
index e82cd390a4..ef50625ae8 100644
--- a/docs/build/concepts-of-isolated-applications-and-side-by-side-assemblies.md
+++ b/docs/build/concepts-of-isolated-applications-and-side-by-side-assemblies.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Concepts of Isolated Applications and Side-by-side Assemblies"
title: "Concepts of Isolated Applications and Side-by-side Assemblies"
ms.date: "05/06/2019"
helpviewer_keywords: ["side-by-side assemblies [C++]", "isolated assemblies [C++]"]
ms.assetid: 945a885f-cb3e-4c8a-a0b9-2c2e3e02cc50
+ms.topic: concept-article
---
# Concepts of Isolated Applications and Side-by-side Assemblies
diff --git a/docs/build/configure-cmake-debugging-sessions.md b/docs/build/configure-cmake-debugging-sessions.md
index 309ae2bf46..a16c9e0f9b 100644
--- a/docs/build/configure-cmake-debugging-sessions.md
+++ b/docs/build/configure-cmake-debugging-sessions.md
@@ -1,44 +1,59 @@
---
title: "Configure CMake debugging sessions in Visual Studio"
description: "Describes how to use Visual Studio to configure CMake debugger settings."
-ms.date: "04/02/2020"
+ms.date: 10/26/2023
helpviewer_keywords: ["CMake debugging"]
+ms.topic: how-to
---
# Configure CMake debugging sessions
-::: moniker range="vs-2015"
+::: moniker range="msvc-140"
-Native CMake support is available 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.
+Native CMake support is available 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 later. It's found at the top of the table of contents on this page.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
-All executable CMake targets are shown in the **Startup Item** dropdown in the **General** toolbar. Select one to start a debugging session and launch the debugger.
+All executable CMake targets are shown in the **Startup Item** dropdown in the toolbar. Select one to start a debugging session and launch the debugger.
-
+:::image type="complex" source="media/new-dropdowns.png" alt-text="Screenshot of the CMake startup items dropdown.":::
+The dropdown provides a list of debug targets to choose from. The selected item appears as a play button followed by the name of the selected debug target to run. In this example, the selected debug target is Hello World .exe.
+:::image-end:::
You can also start a debug session from Solution Explorer. First, switch to **CMake Targets View** in the **Solution Explorer** window.
-
+:::image type="complex" source="media/switch-to-targets-view.png" alt-text="Screenshot of the CMake Targets View menu.":::
+The solution explorer is shown. A right-click on an item in the Folder View has opened a menu that shows options such as Open, Open with, Compare with, and so on. The Switch to Targets View menu item is highlighted.
+:::image-end:::
Then, right-click on an executable and select **Debug**. This command automatically starts debugging the selected target based on your active configuration.
+:::image type="complex" source="media/debug-targets-view.png" alt-text="Screenshot of the CMake Targets View debug option menu.":::
+A right-click on a target in the CMake Targets view has opened a menu with options such as Set as Startup item, Build, Clean All, and so on. The Debug menu option is highlighted.
+:::image-end:::
+
+Starting in Visual Studio 2022 Version 17.6, you can also start a debugging session on your CMakeLists.txt file. To do so, just set a breakpoint in your CMakeLists.txt file and run **Configure Project with CMake Debugger** from the **Project** dropdown.
+
+:::image type="complex" source="media/cmake-debugger-entry.png" alt-text="Screenshot of the CMake Debugger dropdown.":::
+The Project dropdown is shown. The menu option to Configure Project with CMake debugger is highlighted.
+:::image-end:::
+
## Customize debugger settings
You can customize the debugger settings for any executable CMake target in your project. They're found in a configuration file called *launch.vs.json*, located in a *`.vs`* folder in your project root. A launch configuration file is useful in most debugging scenarios, because you can configure and save your debugging setup details. There are three entry points to this file:
- **Debug Menu:** Select **Debug > Debug and Launch Settings for ${activeDebugTarget}** from the main menu to customize the debug configuration specific to your active debug target. If you don't have a debug target selected, this option is grayed out.
-
+
- **Targets View:** Navigate to **Targets View** in Solution Explorer. Then, right-click on a debug target and select **Add Debug Configuration** to customize the debug configuration specific to the selected target.
-
+
- **Root CMakeLists.txt:** Right-click on a root *CMakeLists.txt* and select **Add Debug Configuration** to open the **Select a Debugger** dialog box. The dialog allows you to add *any* type of debug configuration, but you must manually specify the CMake target to invoke via the `projectTarget` property.
-
+
You can edit the *launch.vs.json* file to create debug configurations for any number of CMake targets. When you save the file, Visual Studio creates an entry for each new configuration in the **Startup Item** dropdown.
@@ -49,7 +64,6 @@ To reference any key in a *CMakeSettings.json* file, prepend `cmake.` to it in *
```json
{
"version": "0.2.1",
- "defaults": {},
"configurations": [
{
"type": "default",
@@ -106,9 +120,14 @@ In Visual Studio 2019 version 16.6, we added a new debug configuration of `type:
#### Additional options allowed with the `gdbserver` configuration (16.7 or later)
- `program`: Defaults to `"${debugInfo.fullTargetPath}"`. The Unix path to the application to debug. Only required if different than the target executable in the build or deploy location.
+
+ > [!TIP]
+ > Deploy is not yet supported for local cross-compilation scenarios. If you are cross-compiling on Windows (for example, using a cross-compiler on Windows to build a Linux ARM executable) then you'll need to manually copy the binary to the location specified by `program` on the remote ARM machine before debugging.
+
- `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.
@@ -218,7 +237,7 @@ You can configure the `cppdbg` configuration to debug using `gdbserver`. You can
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
## See also
diff --git a/docs/build/configuring-programs-for-64-bit-visual-cpp.md b/docs/build/configuring-programs-for-64-bit-visual-cpp.md
index 3513524fc3..e922af4027 100644
--- a/docs/build/configuring-programs-for-64-bit-visual-cpp.md
+++ b/docs/build/configuring-programs-for-64-bit-visual-cpp.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Configure C++ projects for 64-bit, x64 targets"
title: "Configure C++ projects for 64-bit, x64 targets"
ms.date: "11/04/2016"
helpviewer_keywords: ["64-bit compiler [C++], options", "64-bit compiler [C++]", "64-bit programming [C++], about 64-bit programming", "programming [C++], 64-bit"]
diff --git a/docs/build/configuring-programs-for-arm-processors-visual-cpp.md b/docs/build/configuring-programs-for-arm-processors-visual-cpp.md
index 037276498c..fc99baa1b2 100644
--- a/docs/build/configuring-programs-for-arm-processors-visual-cpp.md
+++ b/docs/build/configuring-programs-for-arm-processors-visual-cpp.md
@@ -1,7 +1,7 @@
---
+description: "Learn more about: Configure C++ projects for ARM processors"
title: "Configure C++ projects for ARM processors"
ms.date: "07/11/2018"
-ms.assetid: 3d95f221-656a-480d-9651-9ad263895747
---
# Configure C++ projects for ARM processors
@@ -16,7 +16,7 @@ Describes the application binary interface used by Windows on ARM for register u
Describes the application binary interface used by Windows on ARM64 for register usage, calling conventions and exception handling.
[Common MSVC ARM migration issues](common-visual-cpp-arm-migration-issues.md)\
-Describes C++ code elements that are commonly assumed to be portable across architectures, but which produce different results for ARM than for x86 and x64.
+Describes C++ code elements that are commonly assumed to be portable across architectures, but that produce different results for ARM than for x86 and x64.
[ARM exception handling](arm-exception-handling.md)\
Describes the encoding scheme for stack unwinding during structured exception handling in Windows on ARM.
@@ -26,8 +26,14 @@ Describes the encoding scheme for stack unwinding during structured exception ha
## Related Sections
+[Get started with Arm64EC](/windows/arm/arm64ec-build)\
+Describes how to get started building your app or project using [Arm64EC](/windows/arm/arm64ec).
+
+[How to: Configure projects to target platforms](/visualstudio/ide/how-to-configure-projects-to-target-platforms)\
+Describes how to set up your build to target different processor architectures, including Arm64.
+
[ARM intrinsics](../intrinsics/arm-intrinsics.md)\
Describes compiler intrinsics for processors that use the ARM architecture.
-[ARM64 intrinsics](../intrinsics/arm-intrinsics.md)\
+[ARM64 intrinsics](../intrinsics/arm64-intrinsics.md)\
Describes compiler intrinsics for processors that use the ARM64 architecture.
diff --git a/docs/build/configuring-programs-for-windows-xp.md b/docs/build/configuring-programs-for-windows-xp.md
index f05d4cb56d..629e6b7230 100644
--- a/docs/build/configuring-programs-for-windows-xp.md
+++ b/docs/build/configuring-programs-for-windows-xp.md
@@ -1,28 +1,29 @@
---
title: "Configuring Programs for Windows XP"
description: "How to install and use the C++ Windows XP toolsets in Visual Studio."
-ms.date: "03/16/2020"
+ms.date: 09/17/2021
ms.assetid: 1e4487b3-d815-4123-878b-5718b22f0fd5
+ms.topic: how-to
---
# Configuring Programs for Windows XP
Visual Studio supports multiple platform toolsets. That means it's possible to target operating systems and runtime libraries that aren't supported by the default toolset. For example, by switching the platform toolset, you can use the Visual Studio 2017 C++ compiler to create apps that target Windows XP and Windows Server 2003. You can also use older platform toolsets to maintain binary-compatible legacy code and still take advantage of the latest features of the Visual Studio IDE.
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
-The v142 toolset supplied in Visual Studio 2019 doesn't include support for creating code for Windows XP. Support for Windows XP development by using the Visual Studio 2017 v141_xp toolset is available as an individual component option in the Visual Studio Installer.
+The toolset supplied in Visual Studio 2019 and later doesn't include support for creating code for Windows XP. Support for Windows XP development is available by using the Visual Studio 2017 v141_xp toolset. You can install the v141_xp toolset as an individual component option in the Visual Studio Installer.
::: moniker-end
## Install the Windows XP platform toolset
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
To get the Visual Studio 2017 platform toolset and components to target Windows XP and Windows Server 2003, run the Visual Studio Installer. When you initially install Visual Studio or when you modify an existing installation, make sure the **Desktop development with C++** workload is selected. In the list of optional components for this workload, choose **Windows XP support for C++**, and then choose **Install** or **Modify**.
::: moniker-end
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
To get the v141_xp platform toolset and components to target Windows XP and Windows Server 2003, run the Visual Studio Installer. When you initially install Visual Studio, or when you modify an existing installation, make sure the **Desktop development with C++** workload is selected. In the **Individual components** tab, under **Compilers, build tools, and runtimes**, choose **C++ Windows XP Support for VS 2017 (v141) tools \[Deprecated]**, and then choose **Install** or **Modify**.
@@ -36,11 +37,23 @@ The Windows XP platform toolset that's included in Visual Studio is a version of
1. In **Solution Explorer**, open the shortcut menu for your project, and then choose **Properties**.
-1. In the **Property Pages** dialog box for the project, select **Configuration Properties** > **General**. Set the **Platform Toolset** property to your preferred Windows XP toolset. For example, choose **Visual Studio 2017 - Windows XP (v141_xp)** to create code for Windows XP and Windows Server 2003 by using the Microsoft C++ compiler in Visual Studio 2017.
+1. In the **Property Pages** dialog box for the project, set the **Configuration** dropdown to **All configurations**.
+
+1. Select the **Configuration Properties** > **General** property page. Set the **Platform Toolset** property to your preferred Windows XP toolset. For example, choose **Visual Studio 2017 - Windows XP (v141_xp)** to create code for Windows XP and Windows Server 2003 by using the Microsoft C++ compiler from Visual Studio 2017.
### C++ runtime support
-Along with the Windows XP platform toolset, several libraries include runtime support for Windows XP and Windows Server 2003. These libraries are: the C Runtime Library (CRT), C++ Standard Library, Active Template Library (ATL), Concurrency Runtime Library (ConCRT), Parallel Patterns Library (PPL), Microsoft Foundation Class Library (MFC), and C++ AMP (C++ Accelerated Massive Programming) library. For these operating systems, the minimum supported versions are: Windows XP Service Pack 3 (SP3) for x86, Windows XP Service Pack 2 (SP2) for x64, and Windows Server 2003 Service Pack 2 (SP2) for both x86 and x64.
+Along with the Windows XP platform toolset, several libraries include runtime support for Windows XP and Windows Server 2003:
+
+- Universal C Runtime Library (UCRT)
+- C++ Standard Library
+- Active Template Library (ATL)
+- Concurrency Runtime Library (ConcRT)
+- Parallel Patterns Library (PPL)
+- Microsoft Foundation Class Library (MFC)
+- C++ AMP (C++ Accelerated Massive Programming) library.
+
+The minimum supported versions of these operating systems are: Windows XP Service Pack 3 (SP3) for x86, Windows XP Service Pack 2 (SP2) for x64, and Windows Server 2003 Service Pack 2 (SP2) for both x86 and x64.
These libraries are supported by the platform toolsets installed by Visual Studio, depending on the target:
@@ -49,7 +62,7 @@ These libraries are supported by the platform toolsets installed by Visual Studi
|CRT|X|X|X|
|C++ Standard Library|X|X|X|
|ATL|X|X|X|
-|ConCRT/PPL|X|X|X|
+|ConcRT/PPL|X|X|X|
|MFC|X||X|
|C++ AMP|X|X||
@@ -58,24 +71,33 @@ These libraries are supported by the platform toolsets installed by Visual Studi
### Differences between the toolsets
-Because of differences in platform and library support, the development experience for apps that use a Windows XP platform toolset isn't as complete as for apps that use the default Visual Studio platform toolset.
+Because of differences in platform and library support, the development experience for apps that use a Windows XP platform toolset isn't as complete as for apps that use the default platform toolset.
- **C++ language features**
- Only C++ language features implemented in Visual Studio 2012 are supported in apps that use the v110\_xp platform toolset. Only C++ language features implemented in Visual Studio 2013 are supported in apps that use the v120\_xp platform toolset. Only C++ language features implemented in Visual Studio 2015 are supported in apps that use the v140\_xp platform toolset. Only C++ language features implemented in Visual Studio 2017 are supported in apps that use the v141\_xp platform toolset. Visual Studio uses the corresponding compiler when it builds using the older platform toolsets. Use the most recent Windows XP platform toolset to take advantage of additional C++ language features implemented in that version of the compiler.
+ Only C++ language features implemented in Visual Studio 2017 are supported in apps that use the v141\_xp platform toolset. Only C++ language features implemented in Visual Studio 2015 are supported in apps that use the v140\_xp platform toolset. Visual Studio uses the corresponding compiler when it builds using the older platform toolsets. Use the most recent Windows XP platform toolset to take advantage of the latest C++ language features implemented in that version of the compiler. For more information about language feature support by compiler version, see [Microsoft C/C++ language conformance](../overview/visual-cpp-language-conformance.md).
- **Remote debugging**
- Remote Tools for Visual Studio doesn't support remote debugging on Windows XP or Windows Server 2003. To debug an app locally or remotely on Windows XP or Windows Server 2003, use a debugger from an older version of Visual Studio. It's similar to debugging an app on Windows Vista, which is a runtime target of the platform toolset, but not a remote debugging target.
+ Remote debugging on Windows XP or Windows Server 2003 isn't supported by Remote Tools for Visual Studio. To debug an app locally or remotely on Windows XP or Windows Server 2003, use a debugger from an older version of Visual Studio. It's similar to debugging an app on Windows Vista: Vista is a *runtime* target of the platform toolset, but not a *remote debugging* target.
- **Static analysis**
- The Windows XP platform toolsets don't support static analysis because the SAL annotations for the Windows 7 SDK and the runtime libraries are incompatible. You can still perform static analysis on an app that supports Windows XP or Windows Server 2003. Temporarily switch the solution to target the default platform toolset for the analysis, and then switch back to the Windows XP platform toolset to build the app.
+ The Windows XP platform toolsets don't support static analysis. The SAL annotations for the Windows 7 SDK and the runtime libraries are incompatible. You can still run static analysis on an app that supports Windows XP or Windows Server 2003. Temporarily switch the solution to target the default platform toolset for the analysis, and then switch back to the Windows XP platform toolset to build the app.
- **Debugging of DirectX graphics**
- Because the Graphics Debugger doesn't support the Direct3D 9 API, it can't be used to debug apps that use Direct3D on Windows XP or Windows Server 2003. However, if the app implements an alternative renderer based on Direct3D 10 or Direct3D 11 APIs, you can use the Graphics Debugger to diagnose problems.
+ The Graphics Debugger doesn't support the Direct3D 9 API. It can't be used to debug apps that use Direct3D on Windows XP or Windows Server 2003. However, if the app implements an alternative renderer based on Direct3D 10 or Direct3D 11 APIs, you can use the Graphics Debugger to diagnose problems.
- **Building HLSL**
- The Windows XP toolset doesn't compile HLSL source code files by default. To compile HLSL files, download and install the June 2010 DirectX SDK, and then set the project's VC directories to include it. For more information, see the "DirectX SDK Does Not Register Include/Library Paths with Visual Studio 2010" section of the [June 2010 DirectX SDK download page](https://www.microsoft.com/download/details.aspx?displaylang=en&id=6812).
+ The Windows XP toolset doesn't compile HLSL source code files by default. To compile HLSL files, download and install the June 2010 DirectX SDK, and then set the project's VC directories to include it. For more information, see the "DirectX SDK Does Not Register Include/Library Paths with Visual Studio 2010" section of the [June 2010 DirectX SDK download page](https://web.archive.org/web/20161026183606/https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=6812) (Archived link).
+
+## Windows XP deployment
+
+> [!IMPORTANT]
+> Because it lacks support for SHA-256 code signing certificates, runtime library support for Windows XP is no longer available in the [latest Visual C++ Redistributable](../windows/latest-supported-vc-redist.md) for Visual Studio 2015, 2017, 2019, and 2022. The last Redistributable to support Windows XP shipped in Visual Studio 2019 version 16.7. Use a Redistributable that has a file version starting with **14.27**. If your Windows XP apps are deployed with or updated to a later version of the redistributable, the apps won't run.
+
+If you're using a version of Visual Studio later than Visual Studio 2019 version 16.7, the redistributable files won't work on Windows XP. To get a copy of the redistributable files that support Windows XP, you'll need a Visual Studio account. Use the account you use to sign in to Visual Studio. Or, you can create an account for free at [my.visualstudio.com](https://my.visualstudio.com). The redistributable file is available in the Downloads section, as [Visual C++ Redistributable for Visual Studio 2019 - Version 16.7](https://my.visualstudio.com/Downloads?q=Redistributable%20for%20Visual%20Studio%202019%20Version%2016.7). To download the files, select the platform and language you need, and then choose the Download button.
+
+You can use central deployment or local deployment to install runtime library support for your Windows XP app. For more information, see [Walkthrough: Deploying a Visual C++ Application By Using the Visual C++ Redistributable Package](../windows/deploying-visual-cpp-application-by-using-the-vcpp-redistributable-package.md).
diff --git a/docs/build/cppproperties-schema-reference.md b/docs/build/cppproperties-schema-reference.md
index 6923b4d97e..cafd37a1e7 100644
--- a/docs/build/cppproperties-schema-reference.md
+++ b/docs/build/cppproperties-schema-reference.md
@@ -1,86 +1,87 @@
---
+description: "Learn more about: CppProperties.json reference"
title: "CppProperties.json reference"
-ms.date: "08/09/2019"
+ms.date: 09/19/2022
helpviewer_keywords: ["CppProperties.json file [C++]"]
---
-# CppProperties.json reference
+# `CppProperties.json` reference
-Open Folder projects that don't use CMake can store project configuration settings for IntelliSense in a *CppProperties.json* file. (CMake projects use a [CMakeSettings.json](customize-cmake-settings.md) file.) A configuration consists of name/value pairs and defines #include paths, compiler switches, and other parameters. See [Open Folder projects for C++](open-folder-projects-cpp.md) for more information about how to add configurations in an Open Folder project. The following sections summarize the various settings. For a complete description of the schema, navigate to *CppProperties_schema.json*, whose full path is given at the top of the code editor when *CppProperties.json* is open.
+Open Folder projects that don't use CMake can store project configuration settings for IntelliSense in a *`CppProperties.json`* file. (CMake projects use a [`CMakeSettings.json`](customize-cmake-settings.md) file.) A configuration consists of name/value pairs and defines #include paths, compiler switches, and other parameters. For more information about how to add configurations in an Open Folder project, see [Open Folder projects for C++](open-folder-projects-cpp.md). The following sections summarize the various settings. For a complete description of the schema, navigate to *CppProperties_schema.json*, whose full path is given at the top of the code editor when *`CppProperties.json`* is open.
## Configuration properties
A configuration may have any of the following properties:
-|||
-|-|-|
-|`inheritEnvironments`| Specifies which environments apply to this configuration.|
-|`name`|The configuration name that will appear in the C++ configuration dropdown|
-|`includePath`|A comma-separated list of folders that should be specified in the include path (maps to /I for most compilers)|
-|`defines`|The list of macros that should be defined (maps to /D for most compilers)|
-|`compilerSwitches`|One or more additional switches that can influence IntelliSense behavior|
-|`forcedInclude`|Header to be automatically included in every compilation unit (maps to /FI for MSVC or -include for clang)|
-|`undefines`|The list of macros to be undefined (maps to /U for MSVC)|
-|`intelliSenseMode`|The IntelliSense engine to be used. You can specify one of the predefined architecture-specific variants for MSVC, gcc, or Clang.|
-|`environments`|User-defined sets of variables that behave like environment variables in a command prompt and are accessed with the ${env.\} macro.|
+| Name | Description |
+|--|--|
+| `inheritEnvironments` | Specifies which environments apply to this configuration. |
+| `name` | The configuration name that will appear in the C++ configuration dropdown |
+| `includePath` | A comma-separated list of folders that should be specified in the include path (maps to `/I` for most compilers) |
+| `defines` | The list of macros that should be defined (maps to `/D` for most compilers) |
+| `compilerSwitches` | One or more additional switches that can influence IntelliSense behavior |
+| `forcedInclude` | Header to be automatically included in every compilation unit (maps to `/FI` for MSVC or `-include` for clang) |
+| `undefines` | The list of macros to be undefined (maps to `/U` for MSVC) |
+| `intelliSenseMode` | The IntelliSense engine to be used. You can specify one of the predefined architecture-specific variants for MSVC, gcc, or Clang. |
+| `environments` | User-defined sets of variables that behave like environment variables in a command prompt and are accessed with the `${env.VARIABLE}` macro. |
### intelliSenseMode values
The code editor shows the available options when you start to type:
-
-
-These are the supported values:
-
-- windows-msvc-x86
-- windows-msvc-x64
-- windows-msvc-arm
-- windows-msvc-arm64
-- android-clang-x86
-- android-clang-x64
-- android-clang-arm
-- android-clang-arm64
-- ios-clang-x86
-- ios-clang-x64
-- ios-clang-arm
-- ios-clang-arm64
-- windows-clang-x86
-- windows-clang-x64
-- windows-clang-arm
-- windows-clang-arm64
-- linux-gcc-x86
-- linux-gcc-x64
-- linux-gcc-arm
+
+
+This list shows the supported values:
+
+- `windows-msvc-x86`
+- `windows-msvc-x64`
+- `windows-msvc-arm`
+- `windows-msvc-arm64`
+- `android-clang-x86`
+- `android-clang-x64`
+- `android-clang-arm`
+- `android-clang-arm64`
+- `ios-clang-x86`
+- `ios-clang-x64`
+- `ios-clang-arm`
+- `ios-clang-arm64`
+- `windows-clang-x86`
+- `windows-clang-x64`
+- `windows-clang-arm`
+- `windows-clang-arm64`
+- `linux-gcc-x86`
+- `linux-gcc-x64`
+- `linux-gcc-arm`
Note: The values `msvc-x86` and `msvc-x64` are supported for legacy reasons only. Use the `windows-msvc-*` variants instead.
## Pre-defined Environments
-Visual Studio provides the following predefined environments for Microsoft C++ which map to the corresponding Developer Command Prompt. When you inherit one of these environments, you can refer to any of the environment variables by using the global property `env` with this macro syntax: ${env.\}.
+Visual Studio provides the following predefined environments for Microsoft C++ which map to the corresponding Developer Command Prompt. When you inherit one of these environments, you can refer to any of the environment variables by using the global property `env` with this macro syntax: `${env.VARIABLE}`.
-|Variable Name|Description|
-|-----------|-----------------|
-|vsdev|The default Visual Studio environment|
-|msvc_x86|Compile for x86 using x86 tools|
-|msvc_x64|Compile for AMD64 using 64-bit tools|
-|msvc_arm|Compile for ARM using x86 tools|
-|msvc_arm64|Compile for ARM64 using x86 tools|
-|msvc_x86_x64|Compile for AMD64 using x86 tools|
-|msvc_arm_x64|Compile for ARM using 64-bit tools|
-|msvc_arm64_x64|Compile for ARM64 using 64-bit tools|
+| Variable Name | Description |
+|--|--|
+| `vsdev` | The default Visual Studio environment |
+| `msvc_x86` | Compile for x86 using x86 tools |
+| `msvc_x64` | Compile for AMD64 using 64-bit tools |
+| `msvc_arm` | Compile for ARM using x86 tools |
+| `msvc_arm64` | Compile for ARM64 using x86 tools |
+| `msvc_x86_x64` | Compile for AMD64 using x86 tools |
+| `msvc_arm_x64` | Compile for ARM using 64-bit tools |
+| `msvc_arm64_x64` | Compile for ARM64 using 64-bit tools |
When the Linux workload is installed, the following environments are available for remotely targeting Linux and WSL:
-|Variable Name|Description|
-|-----------|-----------------|
-|linux_x86|Target x86 Linux remotely|
-|linux_x64|Target x64 Linux remotely|
-|linux_arm|Target ARM Linux remotely|
+| Variable Name | Description |
+|--|--|
+| `linux_x86` | Target x86 Linux remotely |
+| `linux_x64` | Target x64 Linux remotely |
+| `linux_arm` | Target ARM Linux remotely |
## User-defined environments
-You can optionally use the `environments` property to define sets of variables in *CppProperties.json* either globally or per-configuration. These variables behave like environment variables in the context of an Open Folder project and can be accessed with the ${env.\} syntax from *tasks.vs.json* and *launch.vs.json* after they are defined here. However, they are not necessarily set as actual environment variables in any command prompt that Visual Studio uses internally.
+You can optionally use the `environments` property to define sets of variables in *`CppProperties.json`* either globally or per-configuration. These variables behave like environment variables in the context of an Open Folder project. You can access them with the `${env.VARIABLE}` syntax from *`tasks.vs.json`* and *`launch.vs.json`* after they're defined here. However, they aren't necessarily set as actual environment variables in any command prompt that Visual Studio uses internally.
-**Visual Studio 2019 version 16.4 and later:** Configuration-specific variables defined in *CppProperties.json* are automatically picked up by debug targets and tasks without the need to set `inheritEnvironments`. Debug targets are launched automatically with the environment you specify in *CppProperties.json*.
+**Visual Studio 2019 version 16.4 and later:** Configuration-specific variables defined in *`CppProperties.json`* are automatically picked up by debug targets and tasks without the need to set `inheritEnvironments`. Debug targets are launched automatically with the environment you specify in *`CppProperties.json`*.
**Visual Studio 2019 version 16.3 and earlier:** When you consume an environment, then you have to specify it in the `inheritsEnvironments` property even if the environment is defined as part of the same configuration; the `environment` property specifies the name of the environment. The following example shows a sample configuration for enabling IntelliSense for GCC in an MSYS2 installation. Note how the configuration both defines and inherits the `mingw_64` environment, and how the `includePath` property can access the `INCLUDE` variable.
@@ -112,21 +113,21 @@ You can optionally use the `environments` property to define sets of variables i
]
```
-When you define an **environments** property inside a configuration, it overrides any global variables of the same name.
+When you define an `"environments"` property inside a configuration, it overrides any global variables that have the same names.
## Built-in macros
-You have access to the following built-in macros inside *CppProperties.json*:
+You have access to the following built-in macros inside *`CppProperties.json`*:
-|||
-|-|-|
-|`${workspaceRoot}`| The full path to the workspace folder|
-|`${projectRoot}`| The full path to the folder where *CppProperties.json* is placed|
-|`${env.vsInstallDir}`| The full path to the folder where the running instance of Visual Studio is installed|
+| Macro | Description |
+|--|--|
+| `${workspaceRoot}` | The full path to the workspace folder |
+| `${projectRoot}` | The full path to the folder where *`CppProperties.json`* is placed |
+| `${env.vsInstallDir}` | The full path to the folder where the running instance of Visual Studio is installed |
### Example
-If your project has an include folder and also includes *windows.h* and other common headers from the Windows SDK, you may want to update your *CppProperties.json* configuration file with the following includes:
+If your project has an include folder and also includes `*windows.h`* and other common headers from the Windows SDK, you may want to update your *`CppProperties.json`* configuration file with the following includes:
```json
{
@@ -135,28 +136,28 @@ If your project has an include folder and also includes *windows.h* and other co
"name": "Windows",
"includePath": [
// local include folder
- "${workspaceRoot}\include",
+ "${workspaceRoot}\\include",
// Windows SDK and CRT headers
- "${env.WindowsSdkDir}\include\${env.WindowsSDKVersion}\ucrt",
- "${env.NETFXSDKDir}\include\um",
- "${env.WindowsSdkDir}\include\${env.WindowsSDKVersion}\um",
- "${env.WindowsSdkDir}\include\${env.WindowsSDKVersion}\shared",
- "${env.VCToolsInstallDir}\include"
+ "${env.WindowsSdkDir}\\include\\${env.WindowsSDKVersion}\\ucrt",
+ "${env.NETFXSDKDir}\\include\\um",
+ "${env.WindowsSdkDir}\\include\\${env.WindowsSDKVersion}\\um",
+ "${env.WindowsSdkDir}\\include\\${env.WindowsSDKVersion}\\shared",
+ "${env.VCToolsInstallDir}\\include"
]
}
]
}
```
-> [!Note]
-> `%WindowsSdkDir%` and `%VCToolsInstallDir%` are not set as global environment variables so make sure you start devenv.exe from a Developer Command Prompt that defines these variables. (Type "developer" in the Windows Start Menu.)
+> [!NOTE]
+> `%WindowsSdkDir%` and `%VCToolsInstallDir%` are not set as global environment variables. Make sure you start *`devenv.exe`* from a Developer Command Prompt that defines these variables. (Type "developer" in the Windows Start Menu to find a Developer Command Prompt shortcut.)
## Troubleshoot IntelliSense errors
-If you are not seeing the IntelliSense that you expect, you can troubleshoot by going to **Tools** > **Options** > **Text Editor** > **C/C++** > **Advanced** and setting **Enable Logging** to **`true`**. To start with, try setting **Logging Level** to 5, and **Logging Filters** to 8.
+If you aren't seeing the IntelliSense that you expect, you can troubleshoot by going to **Tools** > **Options** > **Text Editor** > **C/C++** > **Advanced** and setting **Enable Logging** to **`true`**. To start with, try setting **Logging Level** to 5, and **Logging Filters** to 8.
-
+
-Output is piped to the **Output Window** and is visible when you choose **Show Output From: Visual C++ Log**. The output contains, among other things, the list of actual include paths that IntelliSense is trying to use. If the paths do not match the ones in *CppProperties.json*, try closing the folder and deleting the *.vs* sub-folder which contains cached browsing data.
+Output is piped to the **Output Window** and is visible when you choose **Show Output From: Visual C++ Log**. The output contains, among other things, the list of actual include paths that IntelliSense is trying to use. If the paths don't match the ones in *`CppProperties.json`*, try closing the folder and deleting the *`.vs`* subfolder that contains cached browsing data.
-To troubleshoot IntelliSense errors caused by missing include paths, open the **Error List** and filter its output to "IntelliSense only" and error code E1696 "cannot open source file ...".
+To troubleshoot IntelliSense errors caused by missing include paths, open the **Error List** tab, and then filter its output to "IntelliSense only" and error code E1696 "cannot open source file ...".
diff --git a/docs/build/create-reusable-property-configurations.md b/docs/build/create-reusable-property-configurations.md
index e446aec45e..52af28e0f4 100644
--- a/docs/build/create-reusable-property-configurations.md
+++ b/docs/build/create-reusable-property-configurations.md
@@ -1,44 +1,46 @@
---
+description: "Learn more about: Share or reuse Visual Studio project settings"
title: "Share or reuse Visual Studio project settings - C++"
-ms.date: "07/17/2019"
+ms.date: 02/07/2022
helpviewer_keywords: ["project properties [C++], reusable"]
+ms.topic: how-to
---
# Share or reuse Visual Studio project settings
-To create a custom group of settings that you can share with others or reuse in multiple projects, use **Property Manager** to create a *property sheet* (.props file) to store the settings for each kind of project that you want to be able to reuse or share with others. Using property sheets are far less error-prone than other ways of creating "global" settings.
+To create a custom group of settings that you can share with others or reuse in multiple projects, use **Property Manager** to create a *property sheet* (a *`.props`* file) to store the settings for each kind of project that you want to be able to reuse or share with others. Using property sheets are far less error-prone than other ways of creating "global" settings.
> [!IMPORTANT]
-> **.user files and why they are problematic**
+> **The problem with *`*.user`* files**
>
-> Past versions of Visual Studio used global property sheets that had a .user file name extension and were located in the \\AppData\Local\Microsoft\MSBuild\v4.0\ folder. We no longer recommend these files because they set properties for project configurations on a per-user, per-computer basis. Such "global" settings can interfere with builds, especially when you are targeting more than one platform on your build computer. For example, if you have both an MFC project and Windows Phone project, the .user properties would be invalid for one of them. Reusable property sheets are more flexible and more robust.
+> Past versions of Visual Studio used global property sheets that had a *`.user`* file name extension and were located in the *`\\AppData\Local\Microsoft\MSBuild\v4.0\`* folder. We no longer recommend these files because they set properties for project configurations on a per-user, per-computer basis. Such "global" settings can interfere with builds, especially when you are targeting more than one platform on your build computer. For example, if you have both an MFC project and Windows Phone project, the *`.user`* properties would be invalid for one of them. Reusable property sheets are more flexible and more robust.
>
-> Although .user files are still installed by Visual Studio and participate in property inheritance, they are empty by default. The best practice is to delete the reference to them in **Property Manager** to ensure that your projects operate independently of any per-user, per-computer settings This is important to ensure correct behavior in a SCC (source code control) environment.
+> Although *`.user`* files are still installed by Visual Studio and participate in property inheritance, they're empty by default. The best practice is to delete any reference to them in **Property Manager** to ensure that your projects operate independently of any per-user, per-computer settings. This practice is important to ensure correct behavior in a SCC (source code control) environment.
To display **Property Manager**, on the menu bar, choose **View** > **Property Manager** or **View** > **Other Windows** > **Property Manager**, depending on your settings.
-If you have a common, frequently used set of properties that you want to apply to multiple projects, you can use **Property Manager** to capture them in a reusable *property sheet* file, which by convention has a .props file name extension. You can apply the sheet (or sheets) to new projects so that you don't have to set its properties from scratch.
+If you want to apply a common, frequently used set of properties to multiple projects, you can use **Property Manager** to capture them in a reusable *property sheet* file, which by convention has a *`.props`* file name extension. You can apply the sheet (or sheets) to new projects so you don't have to set those properties from scratch.
-
+
-Under each configuration node, you see nodes for each property sheet that applies to that configuration. The system adds property sheets that set values based on options you choose in the app wizard when you create the project. Right-click any node and choose Properties to see the properties that apply to that node. All the property sheets are imported automatically into the project's "master" property sheet (ms.cpp.props) and are evaluated in the order they appear in Property Manager. You can move them to change the evaluation order. Property sheets that are evaluated later will override the values in previously-evaluated sheets. See [Project property inheritance](project-property-inheritance.md) for more information about the order of evaluation in the .vcxproj file, the .props and .targets files, environment variables and the command line.
+Under each configuration node, you see nodes for each property sheet that applies to that configuration. The system adds property sheets that set common values based on options you choose in the app wizard when you create the project. Right-click any node and choose Properties to see the properties that apply to that node. All the property sheets are imported automatically into the project's primary property sheet (*`ms.cpp.props`*) and are evaluated in the order they appear in Property Manager. You can move them to change the evaluation order. Property sheets that are evaluated later override the values in previously evaluated sheets. For more information about the order of evaluation in the *`.vcxproj`* file, the *`.props`* and *`.targets`* files, environment variables, and the command line, see [Project property inheritance](project-property-inheritance.md).
If you choose **Add New Project Property Sheet** and then select, for example, the MyProps.props property sheet, a property page dialog box appears. Notice that it applies to the MyProps property sheet; any changes you make are written to the sheet, not to the project file (.vcxproj).
-Properties in a property sheet are overridden if the same property is set directly in the .vcxproj file.
+Properties in a property sheet are overridden if the same property is set directly in the *`.vcxproj`* file.
You can import a property sheet as often as required. Multiple projects in a solution can inherit settings from the same property sheet, and a project can have multiple sheets. A property sheet itself can inherit settings from another property sheet.
-You can also create one property sheet for multiple configurations. To do this, create a property sheet for each configuration, open the shortcut menu for one of them, choose **Add Existing Property Sheet**, and then add the other sheets. However, if you use one common property sheet, be aware that when you set a property, it gets set for all configurations that the sheet applies to, and that the IDE doesn't show which projects or other property sheets are inheriting from a given property sheet.
+You can also create a common property sheet for multiple configurations. To create a property sheet for each configuration, open the shortcut menu for one of them, choose **Add Existing Property Sheet**, and then add the other sheets. However, if you use a common property sheet, properties you set for all configurations that the sheet applies to. The IDE doesn't show which projects or other property sheets inherit from a given property sheet.
-In large solutions that will have many projects, it can be useful to create a property sheet at the solution level. When you add a project to the solution, use **Property Manager** to add that property sheet to the project. If required at the project level, you can add a new property sheet to set project-specific values.
+In large solutions that have many projects, it can be useful to create a common property sheet for all the projects in the solution. Create the property sheet as usual. Use **Property Manager** to add that property sheet to each project in the solution. If necessary at the project level, you can add another property sheet to set project-specific values.
> [!IMPORTANT]
-> A .props file by default does not participate in source control because it isn't created as a project item. You can manually add the file as a solution item if you want to include it in source control.
+> A *`.props`* file by default does not participate in source control because it isn't created as a project item. You can manually add the file as a solution item if you want to include it in source control.
#### To create a property sheet
1. On the menu bar, choose **View** > **Property Manager** or **View** > **Other Windows** > **Property Manager**. The **Property Manager** opens.
-2. To define the scope of the property sheet, select the item to which it applies. This can be a particular configuration, or another property sheet. Open the shortcut menu for this item and then choose **Add New Project Property Sheet**. Specify a name and location.
+2. To define the scope of the property sheet, select the item to which it applies. This item can be a particular configuration, or another property sheet. Open the shortcut menu for this item and then choose **Add New Project Property Sheet**. Specify a name and location.
3. In **Property Manager**, open the new property sheet and then set the properties you want to include.
diff --git a/docs/build/creating-a-resource-only-dll.md b/docs/build/creating-a-resource-only-dll.md
index 9d5f601d3b..664e45250d 100644
--- a/docs/build/creating-a-resource-only-dll.md
+++ b/docs/build/creating-a-resource-only-dll.md
@@ -5,6 +5,7 @@ ms.date: "01/27/2020"
helpviewer_keywords: ["resource-only DLLs [C++], creating", "DLLs [C++], creating"]
ms.assetid: e6b1d4da-7275-467f-a58c-a0a8a5835199
no-loc: [noentry]
+ms.topic: how-to
---
# Creating a resource-only DLL
@@ -14,7 +15,7 @@ A resource-only DLL is a DLL that contains nothing but resources, such as icons,
To create a resource-only DLL, you create a new Windows DLL (non-MFC) project, and add your resources to the project:
-::: moniker range="vs-2015"
+::: moniker range="msvc-140"
1. Select **Win32 Project** in the **New Project** dialog box. Enter the project and solution names, and choose **OK**.
@@ -29,7 +30,7 @@ To create a resource-only DLL, you create a new Windows DLL (non-MFC) project, a
1. Build the DLL.
::: moniker-end
-::: moniker range=">=vs-2017"
+::: moniker range=">=msvc-150"
1. Select **Windows Desktop Wizard** in the **New Project** dialog box and choose **Next**. In the **Configure your new project** page, enter the project and solution names, and choose **Create**.
diff --git a/docs/build/creating-and-managing-visual-cpp-projects.md b/docs/build/creating-and-managing-visual-cpp-projects.md
index c07f3c6709..2441a8b327 100644
--- a/docs/build/creating-and-managing-visual-cpp-projects.md
+++ b/docs/build/creating-and-managing-visual-cpp-projects.md
@@ -1,79 +1,92 @@
---
-title: "Visual Studio Projects - C++"
-ms.date: "10/25/2019"
-helpviewer_keywords: ["ATL projects, creating", "Visual Studio C++ projects, creating", "projects [C++], creating", "Visual Studio C++ projects", "ATL projects"]
-ms.assetid: 11003cd8-9046-4630-a189-a32bf3b88047
+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 project based on 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. 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 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).
+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.
-## Create a project
+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).
-::: moniker range="vs-2019"
+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).
-You can create C++ projects by choosing **File** > **New** > **Project**, then setting the **Language** to C++. In the results list you see a list of project templates which you can filter by setting the **Platform** or **Project Type** and by typing keywords into the search box.
+## Create a Visual Studio C++ project
- 
+::: moniker range=">=msvc-160"
-::: moniker-end
+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.
-::: moniker range="vs-2017"
+ :::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.":::
-You can create C++ projects by choosing **File** > **New** > **Project**, then choosing Visual C++ in the left pane. In the center pane you see a list of project templates:
+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
-For more information about all the default project templates that are 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).
+::: moniker range="msvc-150"
-After you create a project, it appears in the [Solution Explorer](/visualstudio/ide/solutions-and-projects-in-visual-studio) window:
+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:
-When you create a new project, a solution file (.sln) is also created. You can add additional projects to the solution by right-clicking on it in **Solution Explorer**. The solution file is used to coordinate build dependencies when you have multiple related projects but doesn't do much more than that. All the compiler options are set at the project level.
+ :::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.":::
-## Add items
+::: moniker-end
-Add source code files, icons, or any other items to your project by right-clicking on the project in **Solution Explorer** and choosing **Add > New** or **Add > Existing**.
+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).
-## Add third party libraries
+You can create your own project templates. For more information, see [Create project templates](/visualstudio/ide/how-to-create-project-templates).
-To add third-party libraries, use the [vcpkg](vcpkg.md) package manager. Run the Visual Studio integration step to set up the paths to that library when you reference it from any Visual Studio project.
+After you create a project, it appears in the [Solution Explorer](/visualstudio/ide/solutions-and-projects-in-visual-studio) window:
+
+:::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**.
-## Set compiler options and other build properties
+The solution file coordinates build dependencies when you have multiple related projects. Compiler options are set at the project level.
-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).
+## Add code, icons, and other assets to a project
+
+Add source code files, icons, or any other items to your project by right-clicking on the project in **Solution Explorer** and choosing **Add > New** or **Add > Existing**.
-## Compile and run
+## Add third-party libraries to 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).
+Over 900 C++ open source libraries are available via the [vcpkg](/vcpkg/) package manager. Run the Visual Studio integration step to set up the paths to that library when you reference it from any Visual Studio project.
-A new project compiles without errors. When adding your own code, you may occasionally introduce an error or trigger a warning. An error prevents the build from completing; a warning does not. All errors and warnings will appear both in the Output Window and in the Error List when you build the project.
+For more information about consuming a library that you have downloaded by using the **vcpkg** package manager, see:
+- [vcpkg in CMake projects](/vcpkg/users/buildsystems/cmake-integration)
+- [Install and use packages with CMake in Visual Studio](/vcpkg/get_started/get-started-vs)
+- [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)
- 
+There are also commercial third-party libraries that you can install. Follow their installation instructions.
-In the Error List, you can press **F1** on a highlighted error to go to its documentation topic.
+## Set compiler options and build properties
-## In This Section
+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).
-[Set C++ compiler and build properties in Visual Studio](working-with-project-properties.md)
-How to use Property Pages and Property Sheets to specify your project settings.
+## Compile and run a project
-[Reference libraries and components at build time](adding-references-in-visual-cpp-projects.md)
-How to include libs, DLLs, COM and .NET components in a project.
+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).
-[Organize Project Output Files](how-to-organize-project-output-files-for-builds.md)
-How to customize the location of the executable files created in the build process.
+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.
-[Custom Build Steps and Build Events](understanding-custom-build-steps-and-build-events.md)
-How to add any arbitrary command to the build process at specified points.
+:::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.":::
-[Create a project from existing code](how-to-create-a-cpp-project-from-existing-code.md)
-How to create a new Visual Studio project from a loose collection of source files.
+In the **Error List**, you can press **F1** on the highlighted error to go to its documentation topic.
-## See also
+## Related content
-[Projects and build systems](projects-and-build-systems-cpp.md)
-[Microsoft C++ Porting and Upgrading 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 909c2ecb47..2b0f1f5ebe 100644
--- a/docs/build/creating-precompiled-header-files.md
+++ b/docs/build/creating-precompiled-header-files.md
@@ -1,154 +1,189 @@
---
title: "Precompiled Header Files"
-ms.date: "10/24/2019"
+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"]
-ms.assetid: e2cdb404-a517-4189-9771-c869c660cb1b
---
-# Precompiled Header Files
+# Precompiled header files
-When you create a new project in Visual Studio, a *precompiled header file* named *pch.h* is added to the project. (In Visual Studio 2017 and earlier, the file was called *stdafx.h*.) The purpose of the file is to speed up the build process. Any stable header files, for example Standard Library headers such as ``, should be included here. The precompiled header is compiled only when it, or any files it includes, are modified. If you only make changes in your project source code, the build will skip compilation for the precompiled header.
+When you create a new project in Visual Studio, a *precompiled header file* named *`pch.h`* is added to the project. (In Visual Studio 2017 and earlier, the file was called *`stdafx.h`*.) The purpose of the file is to speed up the build process. Any stable header files, for example Standard Library headers such as ``, should be included here. The precompiled header is compiled only when it, or any files it includes, are modified. If you only make changes in your project source code, the build will skip compilation for the precompiled header.
-The compiler options for precompiled headers are [/Y](reference/y-precompiled-headers.md). In the project property pages, the options are located under **Configuration Properties > C/C++ > Precompiled Headers**. You can choose to not use precompiled headers, and you can specify the header file name and the name and path of the output file.
+The compiler options for precompiled headers are [`/Y`](reference/y-precompiled-headers.md). In the project property pages, the options are located under **Configuration Properties** > **C/C++** > **Precompiled Headers**. You can choose to not use precompiled headers, and you can specify the header file name and the name and path of the output file.
## Custom precompiled code
-For large projects that take significant time to build, you may want to consider creating custom precompiled files. The Microsoft C and C++ compilers provide options for precompiling any C or C++ code, including inline code. Using this performance feature, you can compile a stable body of code, store the compiled state of the code in a file, and, during subsequent compilations, combine the precompiled code with code that is still under development. Each subsequent compilation is faster because the stable code does not need to be recompiled.
+For large projects that take significant time to build, you may want to consider creating custom precompiled files. The Microsoft C and C++ compilers provide options for precompiling any C or C++ code, including inline code. Using this performance feature, you can compile a stable body of code, store the compiled state of the code in a file, and, during subsequent compilations, combine the precompiled code with code that's still under development. Each later compilation is faster because the stable code doesn't need to be recompiled.
-## When to Precompile Source Code
+## When to precompile source code
Precompiled code is useful during the development cycle to reduce compilation time, especially if:
- You always use a large body of code that changes infrequently.
-- Your program comprises multiple modules, all of which use a standard set of include files and the same compilation options. In this case, all include files can be precompiled into one precompiled header.
+- Your program comprises multiple modules, all of which use a standard set of include files and the same compilation options. In this case, all include files can be precompiled into one precompiled header. For more information about newer ways to handle include files, see [Compare header units, modules, and precompiled headers](compare-inclusion-methods.md).
-The first compilation — the one that creates the precompiled header (PCH) file — takes a bit longer than subsequent compilations. Subsequent compilations can proceed more quickly by including the precompiled code.
+The first compilation (the one that creates the precompiled header file) takes a bit longer than subsequent compilations. Subsequent compilations can proceed more quickly by including the precompiled code.
-You can precompile both C and C++ programs. In C++ programming, it is common practice to separate class interface information into header files. These header files can later be included in programs that use the class. By precompiling these headers, you can reduce the time a program takes to compile.
+You can precompile both C and C++ programs. In C++ programming, it's common practice to separate class interface information into header files. These header files can later be included in programs that use the class. By precompiling these headers, you can reduce the time a program takes to compile.
> [!NOTE]
-> Although you can use only one precompiled header (.pch) file per source file, you can use multiple .pch files in a project.
+> Although you can use only one precompiled header (*`.pch`*) file per source file, you can use multiple *`.pch`* files in a project.
-## Two Choices for Precompiling Code
+## Two choices for precompiling code
-You can precompile any C or C++ code; you are not limited to precompiling only header files.
+You can precompile any C or C++ code; you're not limited to precompiling only header files.
-Precompiling requires planning, but it offers significantly faster compilations if you precompile source code other than simple header files.
+Precompiling requires planning, but it offers much faster compilations if you precompile source code other than simple header files.
-Precompile code when you know that your source files use common sets of header files but don't include them in the same order, or when you want to include source code in your precompilation.
+Precompile code when you know that your source files use common sets of header files, or when you want to include source code in your precompilation.
-The precompiled-header options are [/Yc (Create Precompiled Header File)](reference/yc-create-precompiled-header-file.md) and [/Yu (Use Precompiled Header File)](reference/yu-use-precompiled-header-file.md). Use **/Yc** to create a precompiled header. When used with the optional [hdrstop](../preprocessor/hdrstop.md) pragma, **/Yc** lets you precompile both header files and source code. Select **/Yu** to use an existing precompiled header in the existing compilation. You can also use **/Fp** with the **/Yc** and **/Yu** options to provide an alternative name for the precompiled header.
+The precompiled-header options are [`/Yc` (Create Precompiled Header File)](reference/yc-create-precompiled-header-file.md) and [`/Yu` (Use Precompiled Header File)](reference/yu-use-precompiled-header-file.md). Use **`/Yc`** to create a precompiled header. When used with the optional [`hdrstop`](../preprocessor/hdrstop.md) pragma, **`/Yc`** lets you precompile both header files and source code. Select **`/Yu`** to use an existing precompiled header in the existing compilation. You can also use **`/Fp`** with the **`/Yc`** and **`/Yu`** options to provide an alternative name for the precompiled header.
-The compiler option reference topics for **/Yu** and **/Yc** discuss how to access this functionality in the development environment.
+The compiler option reference articles for **`/Yu`** and **`/Yc`** discuss how to access this functionality in the development environment.
-## Precompiled Header Consistency Rules
+## Precompiled header consistency rules
-Because PCH files contain information about the machine environment as well as memory address information about the program, you should only use a PCH file on the machine where it was created.
+Because PCH files contain information about the machine environment and memory address information about the program, you should only use a PCH file on the machine where it was created.
-## Consistency Rules for Per-File Use of Precompiled Headers
+## Consistency rules for per-file use of precompiled headers
-The [/Yu](reference/yu-use-precompiled-header-file.md) compiler option lets you specify which PCH file to use.
+The [`/Yu`](reference/yu-use-precompiled-header-file.md) compiler option lets you specify which PCH file to use.
-When you use a PCH file, the compiler assumes the same compilation environment — one that uses consistent compiler options, pragmas, and so on — that was in effect when you created the PCH file, unless you specify otherwise. If the compiler detects an inconsistency, it issues a warning and identifies the inconsistency where possible. Such warnings do not necessarily indicate a problem with the PCH file; they simply warn you of possible conflicts. Consistency requirements for PCH files are described in the following sections.
+When you use a PCH file, the compiler assumes the same compilation environment that was in effect when you created the PCH file, unless you specify otherwise. The compilation environment includes the compiler options, pragmas, and so on. If the compiler detects an inconsistency, it issues a warning and identifies the inconsistency where possible. Such warnings don't necessarily indicate a problem with the PCH file; they simply warn you of possible conflicts. Consistency requirements for PCH files are described in the following sections.
-### Compiler Option Consistency
+### Compiler option consistency
The following compiler options can trigger an inconsistency warning when using a PCH file:
-- Macros created using the Preprocessor (/D) option must be the same between the compilation that created the PCH file and the current compilation. The state of defined constants is not checked, but unpredictable results can occur if these change.
+- Macros created using the Preprocessor (**`/D`**) option must be the same between the compilation that created the PCH file and the current compilation. The state of defined constants isn't checked, but unpredictable results can occur if these macros change.
-- PCH files do not work with the /E and /EP options.
+- PCH files don't work with the **`/E`** and **`/EP`** options.
-- PCH files must be created using either the Generate Browse Info (/FR) option or the Exclude Local Variables (/Fr) option before subsequent compilations that use the PCH file can use these options.
+- PCH files must be created using either the Generate Browse Info (**`/FR`**) option or the Exclude Local Variables (**`/Fr`**) option before subsequent compilations that use the PCH file can use these options.
-### C 7.0-Compatible (/Z7)
+### C 7.0-compatible (`/Z7`)
-If this option is in effect when the PCH file is created, subsequent compilations that use the PCH file can use the debugging information.
+If this option is in effect when the PCH file is created, later compilations that use the PCH file can use the debugging information.
-If the C 7.0-Compatible (/Z7) option is not in effect when the PCH file is created, subsequent compilations that use the PCH file and /Z7 trigger a warning. The debugging information is placed in the current .obj file, and local symbols defined in the PCH file are not available to the debugger.
+If the C 7.0-Compatible (**`/Z7`**) option isn't in effect when the PCH file is created, later compilations that use the PCH file and **`/Z7`** trigger a warning. The debugging information is placed in the current *`.obj`* file, and local symbols defined in the PCH file aren't available to the debugger.
-### Include Path Consistency
+### Include path consistency
-A PCH file does not contain information about the include path that was in effect when it was created. When you use a PCH file, the compiler always uses the include path specified in the current compilation.
+A PCH file doesn't contain information about the header include path that was in effect when it was created. When you use a PCH file, the compiler always uses the header include path specified in the current compilation.
-### Source File Consistency
+### Source file consistency
-When you specify the Use Precompiled Header File (/Yu) option, the compiler ignores all preprocessor directives (including pragmas) that appear in the source code that will be precompiled. The compilation specified by such preprocessor directives must be the same as the compilation used for the Create Precompiled Header File (/Yc) option.
+When you specify the Use Precompiled Header File (**`/Yu`**) option, the compiler ignores all preprocessor directives (including pragmas) that appear in the source code that will be precompiled. The compilation specified by such preprocessor directives must be the same as the compilation used for the Create Precompiled Header File (**`/Yc`**) option.
-### Pragma Consistency
+### Pragma consistency
-Pragmas processed during the creation of a PCH file usually affect the file with which the PCH file is subsequently used. The `comment` and `message` pragmas do not affect the remainder of the compilation.
+Pragmas processed during the creation of a PCH file usually affect the file with which the PCH file is later used. The `comment` and `message` pragmas don't affect the remainder of the compilation.
-These pragmas affect only the code within the PCH file; they do not affect code that subsequently uses the PCH file:
+These pragmas affect only the code within the PCH file; they don't affect code that later uses the PCH file:
-||||
-|-|-|-|
-|`comment`|`page`|`subtitle`|
-|`linesize`|`pagesize`|`title`|
-|`message`|`skip`||
+:::row:::
+ :::column span="":::
+ `comment`\
+ `linesize`
+ :::column-end:::
+ :::column span="":::
+ `message`\
+ `page`
+ :::column-end:::
+ :::column span="":::
+ `pagesize`\
+ `skip`
+ :::column-end:::
+ :::column span="":::
+ `subtitle`\
+ `title`
+ :::column-end:::
+:::row-end:::
These pragmas are retained as part of a precompiled header, and affect the remainder of a compilation that uses the precompiled header:
-||||
-|-|-|-|
-|`alloc_text`|`include_alias`|`pack`|
-|`auto_inline`|`init_seg`|`pointers_to_members`|
-|`check_stack`|`inline_depth`|`setlocale`|
-|`code_seg`|`inline_recursion`|`vtordisp`|
-|`data_seg`|`intrinsic`|`warning`|
-|`function`|`optimize`||
-
-## Consistency Rules for /Yc and /Yu
-
-When you use a precompiled header created using /Yc or /Yu, the compiler compares the current compilation environment to the one that existed when you created the PCH file. Be sure to specify an environment consistent with the previous one (using consistent compiler options, pragmas, and so on) for the current compilation. If the compiler detects an inconsistency, it issues a warning and identifies the inconsistency where possible. Such warnings don't necessarily indicate a problem with the PCH file; they simply warn you of possible conflicts. The following sections explain the consistency requirements for precompiled headers.
-
-### Compiler Option Consistency
+:::row:::
+ :::column span="":::
+ `alloc_text`\
+ `auto_inline`\
+ `check_stack`\
+ `code_seg`\
+ `data_seg`
+ :::column-end:::
+ :::column span="":::
+ `function`\
+ `include_alias`\
+ `init_seg`\
+ `inline_depth`
+ :::column-end:::
+ :::column span="":::
+ `inline_recursion`\
+ `intrinsic`\
+ `optimize`\
+ `pack`
+ :::column-end:::
+ :::column span="":::
+ `pointers_to_members`\
+ `setlocale`\
+ `vtordisp`\
+ `warning`
+ :::column-end:::
+:::row-end:::
+
+## Consistency rules for /Yc and /Yu
+
+When you use a precompiled header created using **`/Yc`** or **`/Yu`**, the compiler compares the current compilation environment to the one that existed when you created the PCH file. Be sure to specify an environment consistent with the previous one (using consistent compiler options, pragmas, and so on) for the current compilation. If the compiler detects an inconsistency, it issues a warning and identifies the inconsistency where possible. Such warnings don't necessarily indicate a problem with the PCH file; they simply warn you of possible conflicts. The following sections explain the consistency requirements for precompiled headers.
+
+### Compiler option consistency
This table lists compiler options that might trigger an inconsistency warning when using a precompiled header:
-|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 is not checked, but 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 do not 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 cannot 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. If these options differ, a warning message results.|
-|/Zi|Generate complete debugging information|If this option is in effect when the precompiled header is created, subsequent compilations that use the precompilation can use that debugging information. If /Zi is not in effect when the precompiled header is created, subsequent compilations that use the precompilation and the /Zi option trigger a warning. The debugging information is placed in the current object file, and local symbols defined in the precompiled header are not available to the debugger.|
+| 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. |
+| **`/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. |
+| **`/Zi`** | Generate complete debugging information | If this option is in effect when the precompiled header is created, subsequent compilations that use the precompilation can use that debugging information. If **`/Zi`** isn't in effect when the precompiled header is created, subsequent compilations that use the precompilation and the **`/Zi`** option trigger a warning. The debugging information is placed in the current object file, and local symbols defined in the precompiled header aren't available to the debugger. |
> [!NOTE]
> The precompiled header facility is intended for use only in C and C++ source files.
-## Using Precompiled Headers in a Project
+## Using precompiled headers in a project
Previous sections present an overview of precompiled headers: /Yc and /Yu, the /Fp option, and the [hdrstop](../preprocessor/hdrstop.md) pragma. This section describes a method for using the manual precompiled-header options in a project; it ends with an example makefile and the code that it manages.
-For another approach to using the manual precompiled-header options in a project, study one of the makefiles located in the MFC\SRC directory that is created during the default setup of Visual Studio. These makefiles take a similar approach to the one presented in this section but make greater use of Microsoft Program Maintenance Utility (NMAKE) macros, and offer greater control of the build process.
+For another approach to using the manual precompiled-header options in a project, study one of the makefiles located in the *`MFC\SRC`* directory that's created during the default setup of Visual Studio. These makefiles take a similar approach to the one presented in this section. They make greater use of Microsoft Program Maintenance Utility (NMAKE) macros, and offer greater control of the build process.
-## PCH Files in the Build Process
+## PCH files in the build process
-The code base of a software project is usually contained in multiple C or C++ source files, object files, libraries, and header files. Typically, a makefile coordinates the combination of these elements into an executable file. The following figure shows the structure of a makefile that uses a precompiled header file. The NMAKE macro names and the file names in this diagram are consistent with those in the example code found in [Sample Makefile for PCH](#sample-makefile-for-pch) and [Example Code for PCH](#example-code-for-pch).
+The code base of a software project is often contained in multiple C or C++ source files, object files, libraries, and header files. Typically, a makefile coordinates the combination of these elements into an executable file. The following figure shows the structure of a makefile that uses a precompiled header file. The NMAKE macro names and the file names in this diagram are consistent with the example code found in [Sample makefile for PCH](#sample-makefile-for-pch) and [Example code for PCH](#example-code-for-pch).
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.
-
-Structure of a Makefile That Uses a Precompiled Header File
+Structure of a makefile that uses a precompiled header file:
-Beginning at the top of the diagram, both STABLEHDRS and BOUNDRY are NMAKE macros in which you list files not likely to need recompilation. These files are compiled by the command string
+:::image type="complex" source="media/vc30ow1.gif" alt-text="Diagram showing example inputs and outputs of a makefile that uses a precompiled header file.":::
+The diagram shows `$(STABLEHDRS)` and `$(BOUNDRY)` feeding into CL /c /W3 /Yc$(BOUNDRY) applib.cpp myapp.cpp. The output of that is $(STABLE.PCH). Then, applib.cpp and $(UNSTABLEHDRS) and $(STABLE.PCH) feed into CL /c /w3 /Yu $(BOUNDRY) applib.cpp, which produces applib.obj. myapp.cpp, $(UNSTABLEHDR), and $(STABLE.PCH) feed into CL /c /w3 /Yu $(BOUNDRY) myapp.cpp, which produces myapp.obj. Finally, applib.obj and myapp.obj are combined by LINK /NOD ONERROR:NOEXE $(OBJS), myapp, NUL, $(LIBS), NUL to produce myapp.exe.
+:::image-end:::
+
+Beginning at the top of the diagram, both `STABLEHDRS` and `BOUNDRY` are NMAKE macros in which you list files not likely to need recompilation. These files are compiled by the command string
`CL /c /W3 /Yc$(BOUNDRY) applib.cpp myapp.cpp`
-only if the precompiled header file (STABLE.pch) does not exist or if you make changes to the files listed in the two macros. In either case, the precompiled header file will contain code only from the files listed in the STABLEHDRS macro. List the last file you want precompiled in the BOUNDRY macro.
+only if the precompiled header file (*`STABLE.pch`*) doesn't exist or if you make changes to the files listed in the two macros. In either case, the precompiled header file will contain code only from the files listed in the `STABLEHDRS` macro. List the last file you want precompiled in the `BOUNDRY` macro.
-The files you list in these macros can be either header files or C or C++ source files. (A single PCH file cannot be used with both C and C++ modules.) Note that you can use the **hdrstop** macro to stop precompilation at some point within the BOUNDRY file. See [hdrstop](../preprocessor/hdrstop.md) for more information.
+The files you list in these macros can be either header files or C or C++ source files. (A single PCH file can't be used with both C and C++ sources.) You can use the **`hdrstop`** macro to stop precompilation at some point within the `BOUNDRY` file. For more information, see [`hdrstop`](../preprocessor/hdrstop.md).
-Continuing down the diagram, APPLIB.obj represents the support code used in your final application. It is created from APPLIB.cpp, the files listed in the UNSTABLEHDRS macro, and precompiled code from the precompiled header.
+Next in the diagram, *`APPLIB.obj`* represents the support code used in your final application. It's created from *`APPLIB.cpp`*, the files listed in the `UNSTABLEHDRS` macro, and precompiled code from the precompiled header.
-MYAPP.obj represents your final application. It is created from MYAPP.cpp, the files listed in the UNSTABLEHDRS macro, and precompiled code from the precompiled header.
+*`MYAPP.obj`* represents your final application. It's created from *`MYAPP.cpp`*, the files listed in the `UNSTABLEHDRS` macro, and precompiled code from the precompiled header.
-Finally, the executable file (MYAPP.EXE) is created by linking the files listed in the OBJS macro (APPLIB.obj and MYAPP.obj).
+Finally, the executable file (*`MYAPP.EXE`*) is created by linking the files listed in the `OBJS` macro (*`APPLIB.obj`* and *`MYAPP.obj`*).
-## Sample Makefile for PCH
+## Sample makefile for PCH
-The following makefile uses macros and an !IF, !ELSE, !ENDIF flow-of-control command structure to simplify its adaptation to your project.
+The following makefile uses macros and an `!IF`, `!ELSE`, `!ENDIF` flow-of-control command structure to simplify its adaptation to your project.
```NMAKE
# Makefile : Illustrates the effective use of precompiled
@@ -194,26 +229,28 @@ stable.pch : $(STABLEHDRS)
$(CPP) $(CLFLAGS) /Yc$(BOUNDRY) applib.cpp myapp.cpp
```
-Aside from the STABLEHDRS, BOUNDRY, and UNSTABLEHDRS macros shown in the figure "Structure of a Makefile That Uses a Precompiled Header File" in [PCH Files in the Build Process](#pch-files-in-the-build-process), this makefile provides a CLFLAGS macro and a LINKFLAGS macro. You must use these macros to list compiler and linker options that apply whether you build a debug or final version of the application's executable file. There is also a LIBS macro where you list the libraries your project requires.
+Aside from the `STABLEHDRS`, `BOUNDRY`, and `UNSTABLEHDRS` macros shown in the figure "Structure of a Makefile That Uses a Precompiled Header File" in [PCH files in the build process](#pch-files-in-the-build-process), this makefile provides a `CLFLAGS` macro and a `LINKFLAGS` macro. You must use these macros to list compiler and linker options that apply whether you build a debug or final version of the application's executable file. There's also a `LIBS` macro where you list the libraries your project requires.
-The makefile also uses !IF, !ELSE, !ENDIF to detect whether you define a DEBUG symbol on the NMAKE command line:
+The makefile also uses `!IF`, `!ELSE`, `!ENDIF` to detect whether you define a `DEBUG` symbol on the NMAKE command line:
```NMAKE
NMAKE DEBUG=[1|0]
```
-This feature makes it possible for you to use the same makefile during development and for the final versions of your program — use DEBUG=0 for the final versions. The following command lines are equivalent:
+This feature makes it possible for you to use the same makefile during development and for the final versions of your program. Use `DEBUG=0` for the final versions. The following command lines are equivalent:
```NMAKE
NMAKE
NMAKE DEBUG=0
```
-For more information on makefiles, see [NMAKE Reference](reference/nmake-reference.md). Also see [MSVC Compiler Options](reference/compiler-options.md) and the [MSVC Linker Options](reference/linker-options.md).
+For more information on makefiles, see [NMAKE reference](reference/nmake-reference.md). Also see [MSVC compiler options](reference/compiler-options.md) and the [MSVC linker options](reference/linker-options.md).
+
+## Example code for PCH
-## Example Code for PCH
+The following source files are used in the makefile described in [PCH files in the build process](#pch-files-in-the-build-process) and [Sample makefile for PCH](#sample-makefile-for-pch). The comments contain important information.
-The following source files are used in the makefile described in [PCH Files in the Build Process](#pch-files-in-the-build-process) and [Sample Makefile for PCH](#sample-makefile-for-pch). Note that the comments contain important information.
+Source file `ANOTHER.H`:
```cpp
// ANOTHER.H : Contains the interface to code that is not
@@ -221,11 +258,13 @@ The following source files are used in the makefile described in [PCH Files in t
//
#ifndef __ANOTHER_H
#define __ANOTHER_H
-#include
+#include
void savemoretime( void );
#endif // __ANOTHER_H
```
+Source file `STABLE.H`:
+
```cpp
// STABLE.H : Contains the interface to code that is not likely
// to change. List code that is likely to change
@@ -233,11 +272,13 @@ void savemoretime( void );
//
#ifndef __STABLE_H
#define __STABLE_H
-#include
+#include
void savetime( void );
#endif // __STABLE_H
```
+Source file `UNSTABLE.H`:
+
```cpp
// UNSTABLE.H : Contains the interface to code that is
// likely to change. As the code in a header
@@ -247,19 +288,21 @@ void savetime( void );
//
#ifndef __UNSTABLE_H
#define __UNSTABLE_H
-#include
+#include
void notstable( void );
#endif // __UNSTABLE_H
```
+Source file `APPLIB.CPP`:
+
```cpp
// APPLIB.CPP : This file contains the code that implements
// 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
@@ -277,6 +320,8 @@ void notstable( void )
}
```
+Source file `MYAPP.CPP`:
+
```cpp
// MYAPP.CPP : Sample application
// All precompiled code other than the file listed
@@ -285,9 +330,9 @@ void notstable( void )
// 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();
@@ -298,5 +343,10 @@ int main( void )
## See also
-[C/C++ Building Reference](reference/c-cpp-building-reference.md)
-[MSVC Compiler Options](reference/compiler-options.md)
+[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)\
+[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)\
+[Walkthrough: Import STL libraries as header units](walkthrough-import-stl-header-units.md#approach1)
diff --git a/docs/build/customize-cmake-settings.md b/docs/build/customize-cmake-settings.md
index e64b3efb06..6b56804360 100644
--- a/docs/build/customize-cmake-settings.md
+++ b/docs/build/customize-cmake-settings.md
@@ -1,25 +1,31 @@
---
+description: "Learn more about: Customize CMake build settings"
title: "Customize CMake build settings in Visual Studio"
-ms.date: "08/20/2019"
+ms.date: 12/15/2021
helpviewer_keywords: ["CMake build settings"]
+ms.topic: how-to
---
# Customize CMake build settings
-::: moniker range="vs-2019"
+::: moniker range=">=msvc-160"
-In Visual Studio 2019 and later, you can add configurations and customize their settings by using the **CMake settings editor**. The editor is intended to be a simpler alternative to manually editing the *CMakeSettings.json* file, but if you prefer to edit the file directly, you can click the **Edit JSON** link in the upper right of the editor.
+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).
-To open the editor, click on the **Configuration** drop-down in the main toolbar and choose **Manage Configurations**.
+If you maintain projects that use a *`CMakeSettings.json`* file for CMake build configuration, Visual Studio 2019 and later versions provide a **CMake settings editor**. The editor lets you add CMake configurations and customize their settings easily. It's intended to be a simpler alternative to manually editing the *`CMakeSettings.json`* file. However, if you prefer to edit the file directly, you can select the **Edit JSON** link in the upper right of the editor.
-
+To open the CMake settings editor, select the **Configuration** drop-down in the main toolbar and choose **Manage Configurations**.
+
+
Now you see the **Settings Editor** with the installed configurations on the left.
-
+:::image type="complex" source="media/cmake-settings-editor.png" alt-text="Screenshot of the CMake settings editor.":::
+The left pane shows the installed configurations (x86-Debug). The right pane shows the settings for the selected configuration. The settings include the configuration name, configuration type (set to Debug), toolset (set to msvc_x86), CMake toolchain file (empty), build root (contains ${env:USERPROFILE}\CMakeBuilds\${workspaceHash}\build\${name}), CMake command arguments (empty), and build command arguments (-v).
+:::image-end:::
-Visual Studio provides one `x64-Debug` configuration by default. You can add additional configurations by clicking the green plus sign. The settings that you see in the editor might vary depending on which configuration is selected.
+Visual Studio provides one `x64-Debug` configuration by default. You can add more configurations by choosing the green plus sign. The settings that you see in the editor might vary depending on which configuration is selected.
-The options that you choose in the editor are written to a file called *CMakeSettings.json*. This file provides command-line arguments and environment variables that are passed to CMake when you build the projects. Visual Studio never modifies *CMakeLists.txt* automatically; by using *CMakeSettings.json* you can customize the build through Visual Studio while leaving the CMake project files untouched so that others on your team can consume them with whatever tools they're using.
+The options that you choose in the editor are written to a file called *`CMakeSettings.json`*. This file provides command-line arguments and environment variables that are passed to CMake when you build the projects. Visual Studio never modifies *`CMakeLists.txt`* automatically; by using *`CMakeSettings.json`* you can customize the build through Visual Studio while leaving the CMake project files untouched so that others on your team can consume them with whatever tools they're using.
## CMake General Settings
@@ -31,19 +37,19 @@ Corresponds to the **name** setting. This name appears in the C++ configuration
### Configuration type
-Corresponds to the **configurationType** setting. Defines the build configuration type for the selected generator. Currently supported values are "Debug", "MinSizeRel", "Release", and "RelWithDebInfo". It maps to [CMAKE_BUILD_TYPE](https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html).
+Corresponds to the **configurationType** setting. Defines the build configuration type for the selected generator. Currently supported values are Debug, MinSizeRel, Release, and RelWithDebInfo. It maps to [`CMAKE_BUILD_TYPE`](https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html).
### Toolset
-Corresponds to the **inheritedEnvironments** setting. Defines the compiler environment that's used to build the selected configuration. Supported values depend on the type of configuration. To create a custom environment, choose the **Edit JSON** link in the upper right corner of the Settings editor, and edit the *CMakeSettings.json* file directly.
+Corresponds to the **inheritedEnvironments** setting. Defines the compiler environment that's used to build the selected configuration. Supported values depend on the type of configuration. To create a custom environment, choose the **Edit JSON** link in the upper right corner of the Settings editor, and edit the *`CMakeSettings.json`* file directly.
### 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
-Corresponds to **buildRoot**. Maps to [CMAKE_BINARY_DIR](https://cmake.org/cmake/help/v3.15/variable/CMAKE_BINARY_DIR.html), and specifies where to create the CMake cache. The specified folder is created if it doesn't exist.
+Corresponds to **buildRoot**. Maps to [`CMAKE_BINARY_DIR`](https://cmake.org/cmake/help/v3.15/variable/CMAKE_BINARY_DIR.html), and specifies where to create the CMake cache. The specified folder is created if it doesn't exist.
## Command arguments
@@ -51,35 +57,35 @@ The following settings are available under the **Command arguments** heading:
### CMake command arguments
-Corresponds to **cmakeCommandArgs**. Specifies any additional [command line options](https://cmake.org/cmake/help/latest/manual/cmake.1.html) passed to CMake.exe.
+Corresponds to **cmakeCommandArgs**. Specifies any more [command-line options](https://cmake.org/cmake/help/latest/manual/cmake.1.html) passed to CMake.
### Build command arguments
-Corresponds to **buildCommandArgs**. Specifies additional switches to pass to the underlying build system. For example, passing `-v` when using the Ninja generator forces Ninja to output command lines.
+Corresponds to **buildCommandArgs**. Specifies more switches to pass to the underlying build system. For example, passing `-v` when using the Ninja generator forces Ninja to output command lines.
### CTest command arguments
-Corresponds to **ctestCommandArgs**. Specifies additional [command line options](https://cmake.org/cmake/help/v3.15/manual/ctest.1.html) to pass to CTest when running tests.
+Corresponds to **ctestCommandArgs**. Specifies more [command-line options](https://cmake.org/cmake/help/v3.15/manual/ctest.1.html) to pass to CTest when running tests.
## General settings for remote builds
For configurations such as Linux that use remote builds, the following settings are also available:
-### rsync command arguments
+### `rsync` command arguments
-Additional command line options passed to [rsync](https://download.samba.org/pub/rsync/rsync.html), a fast and 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
-These settings enable you to set CMake variables and save them in *CMakeSettings.json*. They're passed to CMake at build time, and override whatever values are in the *CMakeLists.txt* file. You can use this section in the same way that you might use the CMakeGUI to view a list of all the CMake variables available to edit. Click the **Save and generate cache** button to view a list of all CMake variables available to edit, including advanced variables (per the CMakeGUI). You can filter the list by variable name.
+These settings enable you to set CMake variables and save them in *`CMakeSettings.json`*. They're passed to CMake at build time, and override whatever values are in the *`CMakeLists.txt`* file. You can use this section in the same way that you might use the CMakeGUI to view a list of all the CMake variables available to edit. Choose the **Save and generate cache** button to view a list of all CMake variables available to edit, including advanced variables (per the CMakeGUI). You can filter the list by variable name.
-Corresponds to **variables**. Contains a name-value pair of CMake variables passed as **-D** *_name_=_value_* to CMake. If your CMake project build instructions specify the addition of any variables directly to the CMake cache file, we recommend you add them here instead.
+Corresponds to **variables**. Contains a name-value pair of CMake variables passed as **`-D name=value`** to CMake. If your CMake project build instructions specify the addition of any variables directly to the CMake cache file, we recommend you add them here instead.
## Advanced settings
### CMake generator
-Corresponds to **generator**. Maps to the CMake **-G** switch, and specifies the [CMake generator](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html) to use. This property can also be used as a macro, `${generator}`, when composing other property values. Visual Studio currently supports the following CMake generators:
+Corresponds to **generator**. Maps to the CMake **`-G`** switch, and specifies the [CMake generator](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html) to use. This property can also be used as a macro, `${generator}`, when composing other property values. Visual Studio currently supports the following CMake generators:
- "Ninja"
- "Unix Makefiles"
@@ -93,15 +99,15 @@ Corresponds to **generator**. Maps to the CMake **-G** switch, and specifies the
- "Visual Studio 14 2015 Win64"
- "Visual Studio 14 2015 ARM"
-Because Ninja is designed for fast build speeds instead of flexibility and function, it's set as the default. However, some CMake projects may be unable to correctly build using Ninja. If that occurs, you can instruct CMake to generate a Visual Studio project instead.
+Because Ninja is designed for fast build speeds instead of flexibility and function, it's set as the default. However, some CMake projects might be unable to correctly build using Ninja. If that occurs, you can instruct CMake to generate a Visual Studio project instead.
### IntelliSense mode
-The IntelliSense mode used by the IntelliSense engine. If no mode is selected then Visual Studio will inherit from the specified toolset.
+The IntelliSense mode used by the IntelliSense engine. If no mode is selected, Visual Studio inherits the mode from the specified toolset.
### Install directory
-The directory in which CMake installs targets. Maps to [CMAKE_INSTALL_PREFIX](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html).
+The directory in which CMake installs targets. Maps to [`CMAKE_INSTALL_PREFIX`](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html).
### CMake executable
@@ -111,11 +117,11 @@ For configurations such as Linux that use remote builds, the following settings
### Remote CMakeLists.txt root
-The directory on the remote machine that contains the root *CMakeLists.txt* file.
+The directory on the remote machine that contains the root *`CMakeLists.txt`* file.
### Remote install root
-The directory on the remote machine in which CMake installs targets. Maps to [CMAKE_INSTALL_PREFIX](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html).
+The directory on the remote machine in which CMake installs targets. Maps to [`CMAKE_INSTALL_PREFIX`](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html).
### Remote copy sources
@@ -123,7 +129,7 @@ Specifies whether to copy source files to the remote machine, and lets you speci
## Directly edit CMakeSettings.json
-You can also directly edit *CMakeSettings.json* to create custom configurations. The **Settings Editor** has an **Edit JSON** button in the upper right that opens the file for editing.
+You can also directly edit *`CMakeSettings.json`* to create custom configurations. The **Settings Editor** has an **Edit JSON** button in the upper right that opens the file for editing.
The following example shows a sample configuration, which you can use as a starting point:
@@ -141,9 +147,9 @@ The following example shows a sample configuration, which you can use as a start
},
```
-JSON IntelliSense helps you edit the *CMakeSettings.json* file:
+JSON IntelliSense helps you edit the *`CMakeSettings.json`* file:
- 
+ 
The JSON editor also informs you when you choose incompatible settings.
@@ -151,25 +157,25 @@ For more information about each of the properties in the file, see [CMakeSetting
::: moniker-end
-::: moniker range="<=vs-2017"
+::: moniker range="<=msvc-150"
-Visual Studio 2017 provides several CMake configurations that define how CMake.exe is invoked to create the CMake cache for a given project. To add a new configuration, click the configuration drop-down in the toolbar and choose **Manage Configurations**:
+Visual Studio 2017 provides several CMake configurations that define how CMake is invoked to create the CMake cache for a given project. To add a new configuration, select the configuration drop-down in the toolbar and choose **Manage Configurations**:
- 
+ 
You can choose from the list of predefined configurations:
- 
+ 
-The first time you select a configuration, Visual Studio creates a *CMakeSettings.json* file in your project's root folder. This file is used to re-create the CMake cache file, for example after a **Clean** operation.
+The first time you select a configuration, Visual Studio creates a *`CMakeSettings.json`* file in your project's root folder. This file is used to re-create the CMake cache file, for example after a **Clean** operation.
-To add an additional configuration, right click *CMakeSettings.json* and choose **Add Configuration**.
+To add another configuration, right-click *`CMakeSettings.json`* and choose **Add Configuration**.
- 
+ 
-You can also edit the file using the **CMake Settings Editor**. Right-click on *CMakeSettings.json* in **Solution Explorer** and choose **Edit CMake Settings**. Or, select **Manage Configurations** from the configuration drop-down at the top of the editor window.
+You can also edit the file using the **CMake Settings Editor**. Right-click on *`CMakeSettings.json`* in **Solution Explorer** and choose **Edit CMake Settings**. Or, select **Manage Configurations** from the configuration drop-down at the top of the editor window.
-You can also directly edit *CMakeSettings.json* to create custom configurations. The following example shows a sample configuration, which you can use as a starting point:
+You can also directly edit *`CMakeSettings.json`* to create custom configurations. The following example shows a sample configuration, which you can use as a starting point:
```json
{
@@ -185,11 +191,13 @@ You can also directly edit *CMakeSettings.json* to create custom configurations.
},
```
-JSON IntelliSense helps you edit the *CMakeSettings.json* file:
-
- 
+JSON IntelliSense helps you edit the *`CMakeSettings.json`* file:
-For more information about each of the properties in the file, see [CMakeSettings.json schema reference](cmakesettings-reference.md).
+ :::image type="complex" source="media/cmake-json-intellisense.png" alt-text="Screenshot of the CMake JSON IntelliSense pop-up in the editor.":::
+ The JSON IntelliSense pop-up for "configurations" shows buildCommandArgs, buildRoot, cmakeCommandArgs, configurationType, among several others.
+ :::image-end:::
+
+For more information about each of the properties in the file, see [`CMakeSettings.json` schema reference](cmakesettings-reference.md).
::: moniker-end
diff --git a/docs/build/determining-which-exporting-method-to-use.md b/docs/build/determining-which-exporting-method-to-use.md
index 304fcd5946..58d6c4432c 100644
--- a/docs/build/determining-which-exporting-method-to-use.md
+++ b/docs/build/determining-which-exporting-method-to-use.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Determine Which Exporting Method to Use"
title: "Determine Which Exporting Method to Use"
ms.date: "11/04/2016"
helpviewer_keywords: ["__declspec(dllexport) keyword [C++]", "exporting DLLs [C++], method comparison", "def files [C++], exporting from DLLs", ".def files [C++], exporting from DLLs"]
diff --git a/docs/build/dll-frequently-asked-questions.md b/docs/build/dll-frequently-asked-questions.md
deleted file mode 100644
index ba40fe2699..0000000000
--- a/docs/build/dll-frequently-asked-questions.md
+++ /dev/null
@@ -1,59 +0,0 @@
----
-title: "MFC DLL Frequently Asked Questions"
-ms.date: "05/06/2019"
-helpviewer_keywords: ["troubleshooting [C++], DLLs", "DLLs [C++], frequently asked questions", "FAQs [C++], DLLs"]
-ms.assetid: 09dd068e-fc33-414e-82f7-289c70680256
----
-# DLL Frequently Asked Questions
-
-Following are some frequently asked questions (FAQ) about DLLs.
-
-- [Can an MFC DLL create multiple threads?](#mfc_multithreaded_1)
-
-- [Can a multithreaded application access an MFC DLL in different threads?](#mfc_multithreaded_2)
-
-- [Are there any MFC classes or functions that cannot be used in an MFC DLL?](#mfc_prohibited_classes)
-
-- [What optimization techniques should I use to improve the client application's performance when loading?](#mfc_optimization)
-
-- [There's a memory leak in my regular MFC DLL, but my code looks fine. How can I find the memory leak?](#memory_leak)
-
-## Can an MFC DLL create multiple threads?
-
-Except during initialization, an MFC DLL can safely create multiple threads as long as it uses the Win32 thread local storage (TLS) functions such as **TlsAlloc** to allocate thread local storage. However, if an MFC DLL uses **`__declspec(thread)`** to allocate thread local storage, the client application must be implicitly linked to the DLL. If the client application explicitly links to the DLL, the call to **LoadLibrary** will not successfully load the DLL. For more information about thread-local variables in DLLs, see [thread](../cpp/thread.md).
-
-An MFC DLL that creates a new MFC thread during startup will stop responding when it is loaded by an application. This includes whenever a thread is created by calling `AfxBeginThread` or `CWinThread::CreateThread` inside:
-
-- The `InitInstance` of a `CWinApp`-derived object in a regular MFC DLL.
-
-- A supplied `DllMain` or **RawDllMain** function in a regular MFC DLL.
-
-- A supplied `DllMain` or **RawDllMain** function in an MFC extension DLL.
-
-## Can a multithreaded application access an MFC DLL in different threads?
-
-Multithreaded applications can access regular MFC DLLs that dynamically link to MFC and MFC extension DLLs from different threads. An application can access regular MFC DLLs that statically link to MFC from multiple threads created in the application.
-
-## Are there any MFC classes or functions that cannot be used in an MFC DLL?
-
-Extension DLLs use the `CWinApp`-derived class of the client application. They must not have their own `CWinApp`-derived class.
-
-Regular MFC DLLs must have a `CWinApp`-derived class and a single object of that application class, as does an MFC application. Unlike the `CWinApp` object of an application, the `CWinApp` object of the DLL does not have a main message pump.
-
-Note that because the `CWinApp::Run` mechanism does not apply to a DLL, the application owns the main message pump. If the DLL opens modeless dialog boxes or has a main frame window of its own, the application's main message pump must call a routine exported by the DLL, which in turn calls the `CWinApp::PreTranslateMessage` member function of the DLL's application object.
-
-## What optimization techniques should I use to improve the client application's performance when loading?
-
-If your DLL is a regular MFC DLL that is statically linked to MFC, changing it to a regular MFC DLL that is dynamically linked to MFC reduces the file size.
-
-If the DLL has a large number of exported functions, use a .def file to export the functions (instead of using **`__declspec(dllexport)`**) and use the .def file [NONAME attribute](exporting-functions-from-a-dll-by-ordinal-rather-than-by-name.md) on each exported function. The NONAME attribute causes only the ordinal value and not the function name to be stored in the DLL's export table, which reduces the file size.
-
-DLLs that are implicitly linked to an application are loaded when the application loads. To improve the performance when loading, try dividing the DLL into different DLLs. Put all the functions that the calling application needs immediately after loading into one DLL and have the calling application implicitly link to that DLL. Put the other functions that the calling application does not need right away into another DLL and have the application explicitly link to that DLL. For more information, see [Link an executable to a DLL](linking-an-executable-to-a-dll.md#determining-which-linking-method-to-use).
-
-## There's a memory leak in my regular MFC DLL, but my code looks fine. How can I find the memory leak?
-
-One possible cause of the memory leak is that MFC creates temporary objects that are used inside message handler functions. In MFC applications, these temporary objects are automatically cleaned up in the `CWinApp::OnIdle()` function that is called in between processing messages. However, in MFC dynamic-link libraries (DLLs), the `OnIdle()` function is not automatically called. As a result, temporary objects are not automatically cleaned up. To clean up temporary objects, the DLL must explicitly call `OnIdle(1)` periodically.
-
-## See also
-
-[Create C/C++ DLLs in Visual Studio](dlls-in-visual-cpp.md)
diff --git a/docs/build/dll-frequently-asked-questions.yml b/docs/build/dll-frequently-asked-questions.yml
new file mode 100644
index 0000000000..d35f75948d
--- /dev/null
+++ b/docs/build/dll-frequently-asked-questions.yml
@@ -0,0 +1,60 @@
+### YamlMime:FAQ
+metadata:
+ description: "Learn more about: DLL frequently asked questions"
+ title: "MFC DLL frequently asked questions"
+ ms.date: "05/06/2019"
+ helpviewer_keywords: ["troubleshooting [C++], DLLs", "DLLs [C++], frequently asked questions", "FAQs [C++], DLLs"]
+ ms.assetid: 09dd068e-fc33-414e-82f7-289c70680256
+ ms.topic: faq
+title: DLL frequently asked questions
+summary: |
+
+sections:
+ - name: Ignored
+ questions:
+ - question: |
+ Can an MFC DLL create multiple threads?
+ answer: |
+ Except during initialization, an MFC DLL can safely create multiple threads as long as it uses the Win32 thread local storage (TLS) functions such as **TlsAlloc** to allocate thread local storage. However, if an MFC DLL uses **`__declspec(thread)`** to allocate thread local storage, the client application must be implicitly linked to the DLL. If the client application explicitly links to the DLL, the call to **LoadLibrary** will not successfully load the DLL. For more information about thread-local variables in DLLs, see [thread](../cpp/thread.md).
+
+ An MFC DLL that creates a new MFC thread during startup will stop responding when it is loaded by an application. This includes whenever a thread is created by calling `AfxBeginThread` or `CWinThread::CreateThread` inside:
+
+ - The `InitInstance` of a `CWinApp`-derived object in a regular MFC DLL.
+
+ - A supplied `DllMain` or **RawDllMain** function in a regular MFC DLL.
+
+ - A supplied `DllMain` or **RawDllMain** function in an MFC extension DLL.
+
+ - question: |
+ Can a multithreaded application access an MFC DLL in different threads?
+ answer: |
+ Multithreaded applications can access regular MFC DLLs that dynamically link to MFC and MFC extension DLLs from different threads. An application can access regular MFC DLLs that statically link to MFC from multiple threads created in the application.
+
+ - question: |
+ Are there any MFC classes or functions that cannot be used in an MFC DLL?
+ answer: |
+ Extension DLLs use the `CWinApp`-derived class of the client application. They must not have their own `CWinApp`-derived class.
+
+ Regular MFC DLLs must have a `CWinApp`-derived class and a single object of that application class, as does an MFC application. Unlike the `CWinApp` object of an application, the `CWinApp` object of the DLL does not have a main message pump.
+
+ Note that because the `CWinApp::Run` mechanism does not apply to a DLL, the application owns the main message pump. If the DLL opens modeless dialog boxes or has a main frame window of its own, the application's main message pump must call a routine exported by the DLL, which in turn calls the `CWinApp::PreTranslateMessage` member function of the DLL's application object.
+
+ - question: |
+ What optimization techniques should I use to improve the client application's performance when loading?
+ answer: |
+ If your DLL is a regular MFC DLL that is statically linked to MFC, changing it to a regular MFC DLL that is dynamically linked to MFC reduces the file size.
+
+ If the DLL has a large number of exported functions, use a .def file to export the functions (instead of using **`__declspec(dllexport)`**) and use the .def file [NONAME attribute](exporting-functions-from-a-dll-by-ordinal-rather-than-by-name.md) on each exported function. The NONAME attribute causes only the ordinal value and not the function name to be stored in the DLL's export table, which reduces the file size.
+
+ DLLs that are implicitly linked to an application are loaded when the application loads. To improve the performance when loading, try dividing the DLL into different DLLs. Put all the functions that the calling application needs immediately after loading into one DLL and have the calling application implicitly link to that DLL. Put the other functions that the calling application does not need right away into another DLL and have the application explicitly link to that DLL. For more information, see [Link an executable to a DLL](linking-an-executable-to-a-dll.md#determining-which-linking-method-to-use).
+
+ - question: |
+ There's a memory leak in my regular MFC DLL, but my code looks fine. How can I find the memory leak?
+ answer: |
+ One possible cause of the memory leak is that MFC creates temporary objects that are used inside message handler functions. In MFC applications, these temporary objects are automatically cleaned up in the `CWinApp::OnIdle()` function that is called in between processing messages. However, in MFC dynamic-link libraries (DLLs), the `OnIdle()` function is not automatically called. As a result, temporary objects are not automatically cleaned up. To clean up temporary objects, the DLL must explicitly call `OnIdle(1)` periodically.
+
+additionalContent: |
+
+ ## See also
+
+ [Create C/C++ DLLs in Visual Studio](dlls-in-visual-cpp.md)
diff --git a/docs/build/dlls-in-visual-cpp.md b/docs/build/dlls-in-visual-cpp.md
index 99b9239f5e..a1974a8268 100644
--- a/docs/build/dlls-in-visual-cpp.md
+++ b/docs/build/dlls-in-visual-cpp.md
@@ -59,7 +59,7 @@ Describes how to create and use a DLL using Visual Studio.
[Kinds of DLLs](kinds-of-dlls.md)\
Provides information about the different kinds of DLLs that can be built.
-[DLL frequently asked questions](dll-frequently-asked-questions.md)\
+[DLL frequently asked questions](dll-frequently-asked-questions.yml)\
Provides answers to frequently asked questions about DLLs.
[Link an executable to a DLL](linking-an-executable-to-a-dll.md)\
diff --git a/docs/build/environment-variables-for-profile-guided-optimizations.md b/docs/build/environment-variables-for-profile-guided-optimizations.md
index 65e83d9b80..9677b3b138 100644
--- a/docs/build/environment-variables-for-profile-guided-optimizations.md
+++ b/docs/build/environment-variables-for-profile-guided-optimizations.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: Environment Variables for Profile-Guided Optimizations"
title: "Environment Variables for Profile-Guided Optimizations"
ms.date: "03/14/2018"
helpviewer_keywords: ["profile-guided optimizations, environment variables"]
diff --git a/docs/build/exception-handling-x64.md b/docs/build/exception-handling-x64.md
index 237921aee2..41a6e29b6e 100644
--- a/docs/build/exception-handling-x64.md
+++ b/docs/build/exception-handling-x64.md
@@ -1,5 +1,6 @@
---
title: "x64 exception handling"
+description: "Overview of Microsoft C++ exception handling conventions on x64."
ms.date: "10/14/2019"
helpviewer_keywords: ["C++ exception handling, x64", "exception handling, x64"]
ms.assetid: 41fecd2d-3717-4643-b21c-65dcd2f18c93
@@ -16,7 +17,7 @@ Several data structures are required for exception handling and debugging suppor
Table-based exception handling requires a table entry for all functions that allocate stack space or call another function (for example, nonleaf functions). Function table entries have the format:
-|||
+|Size|Value|
|-|-|
|ULONG|Function start address|
|ULONG|Function end address|
@@ -28,7 +29,7 @@ The RUNTIME_FUNCTION structure must be DWORD aligned in memory. All addresses ar
The unwind data info structure is used to record the effects a function has on the stack pointer, and where the nonvolatile registers are saved on the stack:
-|||
+|Size|Value|
|-|-|
|UBYTE: 3|Version|
|UBYTE: 5|Flags|
@@ -41,14 +42,14 @@ The unwind data info structure is used to record the effects a function has on t
(1) Exception Handler
-|||
+|Size|Value|
|-|-|
|ULONG|Address of exception handler|
|variable|Language-specific handler data (optional)|
(2) Chained Unwind Info
-|||
+|Size|Value|
|-|-|
|ULONG|Function start address|
|ULONG|Function end address|
@@ -106,7 +107,7 @@ The UNWIND_INFO structure must be DWORD aligned in memory. Here's what each fiel
The unwind code array is used to record the sequence of operations in the prolog that affect the nonvolatile registers and RSP. Each code item has this format:
-|||
+|Size|Value|
|-|-|
|UBYTE|Offset in prolog|
|UBYTE: 4|Unwind operation code|
@@ -172,7 +173,7 @@ The unwind operation code is one of these values:
Push a machine frame. This unwind code is used to record the effect of a hardware interrupt or exception. There are two forms. If the operation info equals 0, one of these frames has been pushed on the stack:
- |||
+ |Location|Value|
|-|-|
|RSP+32|SS|
|RSP+24|Old RSP|
@@ -182,7 +183,7 @@ The unwind operation code is one of these values:
If the operation info equals 1, then one of these frames has been pushed:
- |||
+ |Location|Value|
|-|-|
|RSP+40|SS|
|RSP+32|Old RSP|
@@ -213,7 +214,7 @@ The unwind operation code is one of these values:
The meaning of the operation info bits depends upon the operation code. To encode a general-purpose (integer) register, this mapping is used:
-|||
+|Bit|Register|
|-|-|
|0|RAX|
|1|RCX|
@@ -297,7 +298,7 @@ typedef struct _DISPATCHER_CONTEXT {
} DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT;
```
-**ControlPc** is the value of RIP within this function. This value is either an exception address or the address at which control left the establishing function. The RIP is used to determine if control is within some guarded construct inside this function, for example, a `__try` block for `__try`/**`__except`** or `__try`/**`__finally`**.
+**ControlPc** is the value of RIP within this function. This value is either an exception address or the address at which control left the establishing function. The RIP is used to determine if control is within some guarded construct inside this function, for example, a **`__try`** block for **`__try`**/**`__except`** or **`__try`**/**`__finally`**.
**ImageBase** is the image base (load address) of the module containing this function, to be added to the 32-bit offsets used in the function entry and unwind info to record relative addresses.
@@ -439,6 +440,8 @@ typedef enum _UNWIND_OP_CODES {
UWOP_PUSH_MACHFRAME /* info == 0: no error-code, 1: error-code */
} UNWIND_CODE_OPS;
+typedef unsigned char UBYTE;
+
typedef union _UNWIND_CODE {
struct {
UBYTE CodeOffset;
@@ -487,7 +490,7 @@ typedef struct _RUNTIME_FUNCTION {
((PRUNTIME_FUNCTION)((base) + *(PULONG)GetLanguageSpecificDataPtr(info)))
#define GetExceptionDataPtr(info) \
- ((PVOID)((PULONG)GetLanguageSpecificData(info) + 1)
+ ((PVOID)((PULONG)GetLanguageSpecificData(info) + 1))
```
## See also
diff --git a/docs/build/exporting-and-importing-using-afx-ext-class.md b/docs/build/exporting-and-importing-using-afx-ext-class.md
index ef7af0afc1..e47b06663e 100644
--- a/docs/build/exporting-and-importing-using-afx-ext-class.md
+++ b/docs/build/exporting-and-importing-using-afx-ext-class.md
@@ -1,9 +1,11 @@
---
+description: "Learn more about: Exporting and Importing Using AFX_EXT_CLASS"
title: "Exporting and Importing Using AFX_EXT_CLASS"
ms.date: "11/04/2016"
f1_keywords: ["afx_ext_class"]
helpviewer_keywords: ["AFX_EXT_CLASS macro", "exporting classes [C++]", "importing DLLs [C++]", "extension DLLs [C++], exporting classes", "executable files [C++], importing classes", "exporting DLLs [C++], AFX_EXT_CLASS macro"]
ms.assetid: 6b72cb2b-e92e-4ecd-bcab-c335e1d1cfde
+ms.topic: concept-article
---
# Exporting and Importing Using AFX_EXT_CLASS
diff --git a/docs/build/exporting-c-functions-for-use-in-c-or-cpp-language-executables.md b/docs/build/exporting-c-functions-for-use-in-c-or-cpp-language-executables.md
index bd167aaf9d..4096be3e6e 100644
--- a/docs/build/exporting-c-functions-for-use-in-c-or-cpp-language-executables.md
+++ b/docs/build/exporting-c-functions-for-use-in-c-or-cpp-language-executables.md
@@ -1,14 +1,16 @@
---
-title: "Exporting C Functions for Use in C or C++ Language Executables"
-ms.date: "11/04/2016"
+description: "Learn more about: Exporting C functions for use in C or C++ language executables"
+title: "Export C functions for use in C or C++ language executables"
+ms.date: 05/24/2022
helpviewer_keywords: ["functions [C], exporting", "functions [C], C or C++ executables and", "__cplusplus macro", "exporting DLLs [C++], C functions in C++ executables", "exporting functions [C++], C functions in C++ executables"]
ms.assetid: b51d6e5e-37cf-4c1c-b0bf-fcf188c82f00
+ms.topic: how-to
---
-# Exporting C Functions for Use in C or C++ Language Executables
+# Export C functions for use in C or C++ language executables
-If you have functions in a DLL written in C that you want to access from a C language or C++ language module, you should use the **__cplusplus** preprocessor macro to determine which language is being compiled, and then declare these functions with C linkage if being used from a C++ language module. If you use this technique and provide header files for your DLL, these functions can be used by C and C++ users with no change.
+If you have functions in a DLL written in C, you can use a preprocessor macro to make them easy to access from both C language and C++ language code. The **`__cplusplus`** preprocessor macro indicates which language is being compiled. You may use it to declare the functions with C linkage when called from C++ language code. If you use this technique and provide header files for your DLL, these functions can be used by C and C++ users with no change.
-The following code shows a header file that can be used by C and C++ client applications:
+The following code shows a header file that both C and C++ client applications can use:
```h
// MyCFuncs.h
@@ -25,7 +27,7 @@ __declspec( dllimport ) void AnotherCFunc();
#endif
```
-If you need to link C functions to your C++ executable and the function declaration header files have not used the above technique, in the C++ source file, do the following to prevent the compiler from decorating the C function names:
+Sometimes you may need to link C functions to your C++ executable, but the function declaration header files haven't used the above technique. You can still call the functions from C++. In the C++ source file, wrap the `#include` directive to prevent the compiler from decorating the C function names:
```cpp
extern "C" {
@@ -35,15 +37,15 @@ extern "C" {
## What do you want to do?
-- [Export from a DLL using .def files](exporting-from-a-dll-using-def-files.md)
+- [Export from a DLL using `.def` files](exporting-from-a-dll-using-def-files.md)
-- [Export from a DLL using __declspec(dllexport)](exporting-from-a-dll-using-declspec-dllexport.md)
+- [Export from a DLL using `__declspec(dllexport)`](exporting-from-a-dll-using-declspec-dllexport.md)
-- [Export and import using AFX_EXT_CLASS](exporting-and-importing-using-afx-ext-class.md)
+- [Export and import using `AFX_EXT_CLASS`](exporting-and-importing-using-afx-ext-class.md)
- [Determine which exporting method to use](determining-which-exporting-method-to-use.md)
-- [Import into an application using __declspec(dllimport)](importing-into-an-application-using-declspec-dllimport.md)
+- [Import into an application using `__declspec(dllimport)`](importing-into-an-application-using-declspec-dllimport.md)
- [Initialize a DLL](run-time-library-behavior.md#initializing-a-dll)
@@ -51,7 +53,7 @@ extern "C" {
- [Decorated names](reference/decorated-names.md)
-- [Using extern to Specify Linkage](../cpp/using-extern-to-specify-linkage.md)
+- [Using `extern` to specify linkage](../cpp/extern-cpp.md)
## See also
diff --git a/docs/build/exporting-cpp-functions-for-use-in-c-language-executables.md b/docs/build/exporting-cpp-functions-for-use-in-c-language-executables.md
index 66f9f646d3..d44fe579a3 100644
--- a/docs/build/exporting-cpp-functions-for-use-in-c-language-executables.md
+++ b/docs/build/exporting-cpp-functions-for-use-in-c-language-executables.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Exporting C++ Functions for Use in C-Language Executables"
title: "Exporting C++ Functions for Use in C-Language Executables"
ms.date: "11/04/2016"
helpviewer_keywords: ["functions [C++], C++ functions in C executables", "exporting DLLs [C++], C++ functions in C executables", "exporting functions [C++], C++ functions in C executables", "functions [C++], exporting"]
ms.assetid: 80b9e982-f52d-4312-a891-f73cc69f3c2b
+ms.topic: concept-article
---
# Exporting C++ Functions for Use in C-Language Executables
@@ -34,7 +36,7 @@ extern "C" __declspec( dllexport ) int MyFunc(long parm1);
- [Decorated names](reference/decorated-names.md)
-- [Using extern to Specify Linkage](../cpp/using-extern-to-specify-linkage.md)
+- [Using extern to Specify Linkage](../cpp/extern-cpp.md)
## See also
diff --git a/docs/build/exporting-from-a-dll-using-declspec-dllexport.md b/docs/build/exporting-from-a-dll-using-declspec-dllexport.md
index 888d9aeaaa..674c52fb8d 100644
--- a/docs/build/exporting-from-a-dll-using-declspec-dllexport.md
+++ b/docs/build/exporting-from-a-dll-using-declspec-dllexport.md
@@ -1,9 +1,11 @@
---
+description: "Learn more about: Exporting from a DLL Using __declspec(dllexport)"
title: "Exporting from a DLL Using __declspec(dllexport)"
ms.date: "05/06/2019"
f1_keywords: ["dllexport"]
helpviewer_keywords: ["__declspec(dllexport) keyword [C++]", "names [C++], DLL exports by", "export directives [C++]", "exporting DLLs [C++], __declspec(dllexport) keyword"]
ms.assetid: a35e25e8-7263-4a04-bad4-00b284458679
+ms.topic: how-to
---
# Exporting from a DLL Using __declspec(dllexport)
diff --git a/docs/build/exporting-from-a-dll-using-def-files.md b/docs/build/exporting-from-a-dll-using-def-files.md
index ebcdd72554..ce1b224eed 100644
--- a/docs/build/exporting-from-a-dll-using-def-files.md
+++ b/docs/build/exporting-from-a-dll-using-def-files.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Exporting from a DLL Using DEF Files"
title: "Exporting from a DLL Using DEF Files"
ms.date: "05/06/2019"
helpviewer_keywords: ["def files [C++], exporting from DLLs", ".def files [C++], exporting from DLLs", "exporting DLLs [C++], DEF files"]
ms.assetid: 9d31eda2-184e-47de-a2ee-a93ebd603f8e
+ms.topic: concept-article
---
# Exporting from a DLL Using DEF Files
diff --git a/docs/build/exporting-from-a-dll.md b/docs/build/exporting-from-a-dll.md
index 7c5f3db3c6..d7513fc477 100644
--- a/docs/build/exporting-from-a-dll.md
+++ b/docs/build/exporting-from-a-dll.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Exporting from a DLL"
title: "Exporting from a DLL"
ms.date: "11/04/2016"
helpviewer_keywords: ["exporting DLLs [C++], about exporting from DLLs", "exporting functions [C++], DLLs (exporting from)", "exporting DLLs [C++]", "DLLs [C++], exporting from", "DLL exports [C++]", "functions [C++], exporting", "exports table [C++]"]
ms.assetid: a08f86c4-5996-460b-ae54-da2b764045f0
+ms.topic: concept-article
---
# Exporting from a DLL
diff --git a/docs/build/exporting-functions-from-a-dll-by-ordinal-rather-than-by-name.md b/docs/build/exporting-functions-from-a-dll-by-ordinal-rather-than-by-name.md
index b053bbf1b6..d5911954fb 100644
--- a/docs/build/exporting-functions-from-a-dll-by-ordinal-rather-than-by-name.md
+++ b/docs/build/exporting-functions-from-a-dll-by-ordinal-rather-than-by-name.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Exporting Functions from a DLL by Ordinal Rather Than by Name"
title: "Exporting Functions from a DLL by Ordinal Rather Than by Name"
ms.date: "11/04/2016"
helpviewer_keywords: ["exporting functions [C++], ordinal values", "ordinal exports [C++]", "exporting DLLs [C++], ordinal values", "NONAME attribute"]
ms.assetid: 679719fd-d965-4df3-9f7a-7d86ad831702
+ms.topic: concept-article
---
# Exporting Functions from a DLL by Ordinal Rather Than by Name
diff --git a/docs/build/extension-dlls-overview.md b/docs/build/extension-dlls-overview.md
index d17f10888f..b43f909510 100644
--- a/docs/build/extension-dlls-overview.md
+++ b/docs/build/extension-dlls-overview.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: MFC extension DLLs: Overview"
title: "Extension DLLs: Overview"
ms.date: "05/06/2019"
helpviewer_keywords: ["AFXDLL library", "MFC DLLs [C++], MFC extension DLLs", "DLLs [C++], extension", "shared DLL versions [C++]", "extension DLLs [C++], about MFC extension DLLs"]
ms.assetid: eb5e10b7-d615-4bc7-908d-e3e99b7b1d5f
+ms.topic: concept-article
---
# MFC extension DLLs: Overview
diff --git a/docs/build/extension-dlls.md b/docs/build/extension-dlls.md
index 25192d47ba..c9c4df3763 100644
--- a/docs/build/extension-dlls.md
+++ b/docs/build/extension-dlls.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: MFC extension DLLs"
title: "Extension DLLs"
ms.date: "05/06/2019"
helpviewer_keywords: ["memory [C++], DLLs", "MFC extension DLLs [C++]", "AFXDLL library", "shared resources [C++]", "MFC DLLs [C++], MFC extension DLLs", "DLLs [C++], extension", "shared DLL versions [C++]", "resource sharing [C++]", "extension DLLs [C++]", "extension DLLs [C++], about MFC extension DLLs"]
diff --git a/docs/build/fixing-release-build-problems.md b/docs/build/fixing-release-build-problems.md
index f379c8a98c..f10be40f3e 100644
--- a/docs/build/fixing-release-build-problems.md
+++ b/docs/build/fixing-release-build-problems.md
@@ -1,8 +1,10 @@
---
+description: "Learn more about: Fixing Release Build Problems"
title: "Fixing Release Build Problems"
ms.date: "11/04/2016"
helpviewer_keywords: ["release builds, troubleshooting", "debug builds, memory overwrites", "memory, overwrites", "troubleshooting Visual C++, release builds", "troubleshooting release builds"]
ms.assetid: a0c0818e-4c47-4fe0-a611-50d61a41bd88
+ms.topic: concept-article
---
# Fixing Release Build Problems
diff --git a/docs/build/formatting-the-output-of-a-custom-build-step-or-build-event.md b/docs/build/formatting-the-output-of-a-custom-build-step-or-build-event.md
index 58846ff51b..b8c2ff6f18 100644
--- a/docs/build/formatting-the-output-of-a-custom-build-step-or-build-event.md
+++ b/docs/build/formatting-the-output-of-a-custom-build-step-or-build-event.md
@@ -1,10 +1,12 @@
---
-title: "Formatting the Output of a Custom Build Step or Build Event"
-ms.date: "08/27/2018"
+description: "Learn more about: Formatting the output of a custom build step or build event"
+title: "Formatting the output of a custom build step or build event"
+ms.date: 03/15/2022
helpviewer_keywords: ["builds [C++], build events", "custom build steps [C++], output format", "events [C++], build", "build events [C++], output format", "build steps [C++], output format", "builds [C++], custom build steps"]
ms.assetid: 92ad3e38-24d7-4b89-90e6-5a16f5f998da
+ms.topic: concept-article
---
-# Formatting the Output of a Custom Build Step or Build Event
+# Formatting the output of a custom build step or build event
If the output of a custom build step or build event is formatted correctly, users get the following benefits:
@@ -12,28 +14,30 @@ If the output of a custom build step or build event is formatted correctly, user
- Output appears in the **Task List** window.
-- Clicking on the output in the **Output** window displays the appropriate topic.
+- Clicking on the output in the **Output** window displays the appropriate location.
-- F1 operations are enabled in the **Task List** window or **Output** window.
+- **F1** operations are enabled in the **Task List** window or **Output** window.
+
+## Output format
The format of the output should be:
-> {filename**(**line# \[**,** column#]**)** | *toolname*} **:** \[ any text ] {**error** | **warning**} code+number**:**localizable string \[ any text ]
+> { *filename*`(`*line-number* \[`,` *column-number*]`)` \| *tool-name* } `:` \[ *any-text* ] {`error` \| `warning`} *code-type-and-number* `:` *localizable-string* \[ *any-text* ]
Where:
-- {*a* | *b*} is a choice of either *a* or *b*.
+- { *a* \| *b* } is a choice of either *a* or *b*,
-- \[item] is an optional string or parameter.
+- \[ *item* ] is an optional string or parameter,
-- **Bold** represents a literal.
+- `text` represents a literal.
For example:
-> C:\\*sourcefile.cpp*(134) : error C2143: syntax error : missing ';' before '}'
+> C:\\sourcefile.cpp(134) : error C2143: syntax error : missing ';' before '}'
>
-> LINK : fatal error LNK1104: cannot open file '*somelib.lib*'
+> LINK : fatal error LNK1104: cannot open file 'some-library.lib'
## See also
-[Understanding Custom Build Steps and Build Events](understanding-custom-build-steps-and-build-events.md)
+[Understanding custom build steps and build events](understanding-custom-build-steps-and-build-events.md)
diff --git a/docs/build/freelibrary-and-afxfreelibrary.md b/docs/build/freelibrary-and-afxfreelibrary.md
index c205e2e991..28afe4945a 100644
--- a/docs/build/freelibrary-and-afxfreelibrary.md
+++ b/docs/build/freelibrary-and-afxfreelibrary.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: FreeLibrary and AfxFreeLibrary"
title: "FreeLibrary and AfxFreeLibrary"
ms.date: "11/04/2016"
f1_keywords: ["FreeLibrary", "AfxFreeLibrary"]
diff --git a/docs/build/get-started-linux-cmake.md b/docs/build/get-started-linux-cmake.md
index 19c16e3c98..b2f59a7381 100644
--- a/docs/build/get-started-linux-cmake.md
+++ b/docs/build/get-started-linux-cmake.md
@@ -2,7 +2,8 @@
title: Create C++ cross-platform projects in Visual Studio
description: "How to set up, compile, and debug a C++ open-source CMake project in Visual Studio that targets both Linux and Windows."
ms.topic: tutorial
-ms.date: "01/08/2020"
+ms.date: 02/07/2022
+ms.custom: sfi-image-nochange
---
# Tutorial: Create C++ cross-platform projects in Visual Studio
@@ -21,14 +22,16 @@ In this tutorial, you learn how to:
## Prerequisites
* Set up Visual Studio for Cross Platform C++ Development
+
* First, [install Visual Studio](https://visualstudio.microsoft.com/vs/) and choose the **Desktop development with C++** and **Linux development with C++ workloads**. This minimal install is only 3 GB. Depending on your download speed, installation shouldn't take more than 10 minutes.
* Set up a Linux machine for Cross Platform C++ Development
- * Visual Studio doesn't require any specific distribution of Linux. The OS can be running on a physical machine, in a VM, or in the cloud. You could also use the Windows Subsystem for Linux (WSL). However, for this tutorial a graphical environment is required. WSL isn't recommended here, because it's intended primarily for command-line operations.
- * Visual Studio requires these tools on the Linux machine: C++ compilers, gdb, ssh, rsync, ninja, and zip. On Debian-based systems, you can use this command to install these dependencies:
+
+ * Visual Studio doesn't require any specific distribution of Linux. The OS can be running on a physical machine, in a VM, or in the cloud. You could also use the Windows Subsystem for Linux (WSL). However, for this tutorial, a graphical environment is required. WSL isn't recommended here, because it's intended primarily for command-line operations.
+ * Visual Studio requires these tools on the Linux machine: C++ compilers, `gdb`, `ssh`, `rsync`, `make`, and `zip`. On Debian-based systems, you can use this command to install these dependencies:
```cmd
- sudo apt install -y openssh-server build-essential gdb rsync ninja-build zip
+ sudo apt install -y openssh-server build-essential gdb rsync make zip
```
* Visual Studio requires a recent version of CMake on the Linux machine that has server mode enabled (at least 3.8). Microsoft produces a universal build of CMake that you can install on any Linux distro. We recommend you use this build to ensure that you have the latest features. You can get the CMake binaries from [the Microsoft fork of the CMake repo](https://github.com/Microsoft/CMake/releases) on GitHub. Go to that page and download the version that matches the system architecture on your Linux machine, then mark it as an executable:
@@ -38,7 +41,7 @@ In this tutorial, you learn how to:
chmod +x cmake-3.11.18033000-MSVC_2-Linux-x86_64.sh
```
- * You can see the options for running the script with `-–help`. We recommend that you use the `–prefix` option to specify installing in the **/usr** path, because **/usr/bin** is the default location where Visual Studio looks for CMake. The following example shows the Linux-x86_64 script. Change it as needed if you're using a different target platform.
+ * You can see the options for running the script with `--help`. We recommend that you use the `-prefix` option to specify installing in the **/usr** path, because **/usr/bin** is the default location where Visual Studio looks for CMake. The following example shows the Linux-x86_64 script. Change it as needed if you're using a different target platform.
```cmd
sudo ./cmake-3.11.18033000-MSVC_2-Linux-x86_64.sh --skip-license --prefix=/usr
@@ -49,43 +52,43 @@ In this tutorial, you learn how to:
## Clone an open-source CMake project from GitHub
-This tutorial uses the Bullet Physics SDK on GitHub. It provides collision detection and physics simulations for many applications. The SDK includes sample executable programs that compile and run without having to write additional code. This tutorial doesn't modify any of the source code or build scripts. To start, clone the *bullet3* repository from GitHub on the machine where you have Visual Studio installed.
+This tutorial uses the Bullet Physics SDK on GitHub. It provides collision detection and physics simulations for many applications. The SDK includes sample executable programs that compile and run without having to write other code. This tutorial doesn't modify any of the source code or build scripts. To start, clone the *bullet3* repository from GitHub on the machine where you have Visual Studio installed.
```cmd
git clone https://github.com/bulletphysics/bullet3.git
```
-1. On the Visual Studio main menu, choose **File > Open > CMake**. Navigate to the CMakeLists.txt file in the root of the bullet3 repo you just downloaded.
+1. On the Visual Studio main menu, choose **File > Open > CMake**. Navigate to the `CMakeLists.txt` file in the root of the bullet3 repo you downloaded.
- 
+ 
As soon as you open the folder, your folder structure becomes visible in the **Solution Explorer**.
- 
+ 
This view shows you exactly what is on disk, not a logical or filtered view. By default, it doesn't show hidden files.
1. Choose the **Show all files** button to see all the files in the folder.
- 
+ 
## Switch to targets view
When you open a folder that uses CMake, Visual Studio automatically generates the CMake cache. This operation might take a few moments, depending on the size of your project.
-1. In the **Output Window**, select **Show output from** and then choose **CMake** to monitor the status of the cache generation process. When the operation is complete, it says "Target info extraction done".
+1. In the **Output Window**, select **Show output from** and then choose **CMake** to monitor the status of the cache generation process. When the operation is complete, it says "Target info extraction done."
- 
+ 
After this operation completes, IntelliSense is configured. You can build the project, and debug the application. Visual Studio now shows a logical view of the solution, based on the targets specified in the CMakeLists files.
1. Use the **Solutions and Folders** button in the **Solution Explorer** to switch to CMake Targets View.
- 
+ 
- Here is what that view looks like for the Bullet SDK:
+ Here's what that view looks like for the Bullet SDK:
- 
+ 
Targets view provides a more intuitive view of what is in this source base. You can see some targets are libraries and others are executables.
@@ -97,17 +100,17 @@ Visual Studio creates a default **x64-Debug** configuration for Windows. Configu
1. Add a new configuration. Open the **Configuration** drop-down in the toolbar and select **Manage Configurations**.
- 
+ 
- The [CMake Settings Editor](customize-cmake-settings.md) opens. Select the green plus sign on the left-hand side of the editor to add a new configuration. The **Add Configuration to CMakeSettings** dialog appears.
+ The [CMake Settings Editor](customize-cmake-settings.md) opens. Select the green plus sign on the left-hand side of the editor to add a new configuration. The **Add Configuration to CMakeSettings** dialog appears:
- 
+ 
- This dialog shows all the configurations included with Visual Studio, plus any custom configurations that you create. If you want to continue to use a **x64-Debug** configuration, that should be the first one you add. Select **x64-Debug**, and then choose the **Select** button. Visual Studio creates the CMakeSettings.json file with a configuration for **x64-Debug**, and saves it to disk. You can use whatever names you like for your configurations by changing the name parameter directly in CMakeSettings.json.
+ This dialog shows all the configurations included with Visual Studio, plus any custom configurations that you create. If you want to continue to use a **x64-Debug** configuration that should be the first one you add. Select **x64-Debug**, and then choose the **Select** button. Visual Studio creates the CMakeSettings.json file with a configuration for **x64-Debug**, and saves it to disk. You can use whatever names you like for your configurations by changing the name parameter directly in CMakeSettings.json.
## Set a breakpoint, build, and run on Windows
-In this step, we'll debug an example program that demonstrates the Bullet Physics library.
+In this step, we debug an example program that demonstrates the Bullet Physics library.
1. In **Solution Explorer**, select AppBasicExampleGui and expand it.
@@ -121,17 +124,17 @@ In this step, we'll debug an example program that demonstrates the Bullet Physic
1. In the browser view above your source, you should see that you're in the `CommonRigidBodyBase`. To the right, you can select members to examine. Open the drop-down and select `mouseButtonCallback` to go to the definition of that function in the header.
- 
+ 
1. Place a breakpoint on the first line within this function. It gets hit when you click a mouse button within the window of the application, when run under the Visual Studio debugger.
-1. To launch the application, select the launch drop-down in the toolbar. It's the one with the green play icon that says "Select Startup Item". In the drop-down, select AppBasicExampleGui.exe. The executable name now displays on the launch button:
+1. To launch the application, select the launch drop-down in the toolbar. It's the one with the green play icon that says "Select Startup Item." In the drop-down, select AppBasicExampleGui.exe. The executable name now displays on the launch button:
- 
+ 
1. Choose the launch button to build the application and necessary dependencies, then launch it with the Visual Studio debugger attached. After a few moments, the running application appears:
- 
+ 
1. Move your mouse into the application window, then click a button to trigger the breakpoint. The breakpoint brings Visual Studio back to the foreground, and the editor shows the line where execution is paused. You can inspect the application variables, objects, threads, and memory, or step through your code interactively. Choose **Continue** to let the application resume, and then exit it normally. Or, halt execution within Visual Studio by using the stop button.
@@ -139,21 +142,25 @@ In this step, we'll debug an example program that demonstrates the Bullet Physic
1. Add a Linux configuration. Right-click the CMakeSettings.json file in the **Solution Explorer** view and select **Add Configuration**. You see the same Add Configuration to CMakeSettings dialog as before. Select **Linux-Debug** this time, then save the CMakeSettings.json file (ctrl + s).
+1. **Visual Studio 2019 version 16.6 or later** Scroll down to the bottom of the CMake Settings Editor and select **Show advanced settings**. Select **Unix Makefiles** as the **CMake generator**, then save the CMakeSettings.json file (ctrl + s).
+
1. Select **Linux-Debug** in the configuration drop-down.
- 
+ 
If it's the first time you're connecting to a Linux system, the **Connect to Remote System** dialog appears.
- 
-
+ :::image type="complex" source="./media/cmake-bullet3-connection-manager.png" alt-text="Screenshot of the Visual Studio Connect to Remote System dialog.":::
+ The dialog has fields for the host name, port, user name, authentication type, and password. All of the fields are blank except Port is set to 22 and Authentication type is set to Password.
+ :::image-end:::
+
If you've already added a remote connection, you can open this window by navigating to **Tools > Options > Cross Platform > Connection Manager**.
-1. Provide the [connection information to your Linux machine](/cpp/linux/connect-to-your-remote-linux-computer) and choose **Connect**. Visual Studio adds that machine as to CMakeSettings.json as your default connection for **Linux-Debug**. It also pulls down the headers from your remote machine, so you get [IntelliSense specific to that remote connection](/cpp/linux/configure-a-linux-project?view=vs-2019#remote_intellisense). Next, Visual Studio sends your files to the remote machine and generates the CMake cache on the remote system. These steps may take some time, depending on the speed of your network and power of your remote machine. You'll know it's complete when the message "Target info extraction done" appears in the CMake output window.
+1. Provide the [connection information to your Linux machine](../linux/connect-to-your-remote-linux-computer.md) and choose **Connect**. Visual Studio adds that machine as to CMakeSettings.json as your default connection for **Linux-Debug**. It also pulls down the headers from your remote machine, so you get [IntelliSense specific to that remote connection](../linux/configure-a-linux-project.md#remote_intellisense). Next, Visual Studio sends your files to the remote machine and generates the CMake cache on the remote system. These steps might take some time, depending on the speed of your network and power of your remote machine. You know it's complete when the message "Target info extraction done" appears in the CMake output window.
## Set a breakpoint, build, and run on Linux
-Because it's a desktop application, you need to provide some additional configuration information to the debug configuration.
+Because it's a desktop application, you need to provide some more configuration information to the debug configuration.
1. In the CMake Targets view, right-click AppBasicExampleGui and choose **Debug and Launch Settings** to open the launch.vs.json file that's in the hidden **.vs** subfolder. This file is local to your development environment. You can move it into the root of your project if you wish to check it in and save it with your team. In this file, a configuration has been added for AppBasicExampleGui. These default settings work in most cases, but not here. Because it's a desktop application, you need to provide some additional information to launch the program so you can see it on your Linux machine.
@@ -163,7 +170,7 @@ Because it's a desktop application, you need to provide some additional configur
echo $DISPLAY
```
- In the configuration for AppBasicExampleGui, there's a parameter array, "pipeArgs". It contains a line: "${debuggerCommand}". It's the command that launches gdb on the remote machine. Visual Studio must export the display into this context before that command runs. For example, if the value of your display is `:1`, modify that line as follows:
+ In the configuration for AppBasicExampleGui, there's a parameter array, "pipeArgs". It contains a line: "${debuggerCommand}". It's the command that launches `gdb` on the remote machine. Visual Studio must export the display into this context before that command runs. For example, if the value of your display is `:1`, modify that line as follows:
```cmd
"export DISPLAY=:1;${debuggerCommand}",
@@ -173,13 +180,17 @@ Because it's a desktop application, you need to provide some additional configur
1. Move your mouse into the application window, and click a button. The breakpoint is hit. Program execution pauses, Visual Studio comes back to the foreground, and you see your breakpoint. You should also see a Linux Console Window appear in Visual Studio. The window provides output from the remote Linux machine, and it can also accept input for `stdin`. Like any Visual Studio window, you can dock it where you prefer to see it. Its position is persisted in future sessions.
- 
+ :::image type="complex" source="media/cmake-bullet3-linux-console.png" alt-text="Screenshot of the Visual Studio Linux Console Window.":::
+ The output in the window indicates that the C11 functions dynamically loaded using dlopen/dlsym is OK, a GL 3.0 context has been created and the Direct GLX rendering context obtained and made current. The window has various version information for GL_VENDOR, GL_VERSION, GL_SHADING_LANGUAGE_VERSION, and so on.
+ :::image-end:::
-1. You can inspect the application variables, objects, threads, memory, and step through your code interactively using Visual Studio. But this time, you're doing it all on a remote Linux machine instead of your local Windows environment. You can choose **Continue** to let the application resume and exit normally, or you can choose the stop button, just as with local execution.
+1. You can inspect the application variables, objects, threads, memory, and step through your code interactively using Visual Studio. But this time, you're doing it all on a remote Linux machine instead of your local Windows environment. You can choose **Continue** to let the application resume and exit normally, or you can choose the stop button, as with local execution.
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-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:::
## What you learned
@@ -197,4 +208,5 @@ Learn more about configuring and debugging CMake projects in Visual Studio:
> [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/getprocaddress.md b/docs/build/getprocaddress.md
index 908859a320..6e538053bb 100644
--- a/docs/build/getprocaddress.md
+++ b/docs/build/getprocaddress.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: GetProcAddress"
title: "GetProcAddress"
ms.date: "11/04/2016"
f1_keywords: ["GetProcAddress"]
diff --git a/docs/build/how-to-add-a-custom-build-step-to-msbuild-projects.md b/docs/build/how-to-add-a-custom-build-step-to-msbuild-projects.md
index 96f281575a..5fe3724876 100644
--- a/docs/build/how-to-add-a-custom-build-step-to-msbuild-projects.md
+++ b/docs/build/how-to-add-a-custom-build-step-to-msbuild-projects.md
@@ -1,4 +1,5 @@
---
+description: "Learn more about: How to: Add a Custom Build Step to MSBuild Projects"
title: "How to: Add a Custom Build Step to MSBuild Projects"
ms.date: "10/16/2019"
helpviewer_keywords: ["msbuild (c++), howto: add a custom build step"]
diff --git a/docs/build/how-to-add-custom-build-tools-to-msbuild-projects.md b/docs/build/how-to-add-custom-build-tools-to-msbuild-projects.md
index 75e651069c..ca0ed06ff1 100644
--- a/docs/build/how-to-add-custom-build-tools-to-msbuild-projects.md
+++ b/docs/build/how-to-add-custom-build-tools-to-msbuild-projects.md
@@ -1,24 +1,27 @@
---
-title: "How to: Add Custom Build Tools to MSBuild Projects"
-ms.date: "11/04/2016"
+description: "Learn more about how to add custom build tools to MSBuild projects"
+title: "How to: Add custom build tools to MSBuild projects"
+ms.date: 03/15/2022
helpviewer_keywords: ["msbuild (c++), howto: add custom build tools"]
ms.assetid: de03899a-371d-4396-9bf9-34f45a65e909
---
-# How to: Add Custom Build Tools to MSBuild Projects
+# How to: Add custom build tools to MSBuild projects
-A custom build tool is a user-defined, command-line tool that is associated with a particular file.
+A custom build tool is a user-defined, command-line tool that's associated with a particular file.
-For a particular file, specify in the project file (.vcxproj) the command line to execute, any additional input or output files, and a message to display. If **MSBuild** determines that your output files are out of date with regard to your input files, it displays the message and executes the command-line tool.
+For a particular file, specify in the project file (*`.vcxproj`*) the command line to execute, any other input or output files, and a message to display. If **MSBuild** determines that your output files are out of date relative to your input files, it displays the message and executes the command-line tool.
-To specify when the custom build tool executes, use one or both of the `CustomBuildBeforeTargets` and `CustomBuildAfterTargets` XML elements in the project file. For example, you might specify that your custom build tool run after the MIDL compiler and before the C/C++ compiler. Specify the `CustomBuildBeforeTargets` element to execute the tool before a particular target runs; the `CustomBuildAfterTargets` element to execute the tool after a particular target; or both elements to run the tool between execution of two targets. If neither element is specified, your custom build tool executes at its default location, which is before the **MIDL** target.
+## Specify custom build tools and custom build steps
+
+To specify when the custom build tool executes, use one or both of the `CustomBuildBeforeTargets` and `CustomBuildAfterTargets` XML elements in the project file. For example, you might specify that your custom build tool run after the MIDL compiler and before the C/C++ compiler. Specify the `CustomBuildBeforeTargets` element to execute the tool before a particular target runs. Use the `CustomBuildAfterTargets` element to execute the tool after a particular target runs. Use both elements to run the tool between execution of two targets. If neither element is specified, your custom build tool executes at its default location, which is before the **MIDL** target.
Custom build steps and custom build tools share the information specified in the `CustomBuildBeforeTargets` and `CustomBuildAfterTargets` XML elements. Specify those targets one time in your project file.
### To add a custom build tool
-1. Add an item group to the project file and add an item for each input file. Specify the command, additional inputs, outputs, and a message as item metadata, as shown here. This example assumes that a "faq.txt" file exists in the same directory as your project.
+1. Add an item group to the project file and add an item for each input file. Specify the command and its inputs, outputs, and a message as item metadata, as shown here. This example assumes that a "faq.txt" file exists in the same directory as your project. The custom build step copies it to the output directory.
- ```
+ ```xml