Skip to content

Commit 4eb0cb5

Browse files
committed
Merging changes synced from https://github.com/MicrosoftDocs/cpp-docs-pr (branch live)
2 parents 3d8e432 + 9665c32 commit 4eb0cb5

17 files changed

+233
-200
lines changed
Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
---
2-
description: "Learn more about: /ALIGN (Section Alignment)"
3-
title: "/ALIGN (Section Alignment)"
4-
ms.date: "12/29/2017"
2+
description: "Learn more about: /ALIGN (Section alignment)"
3+
title: "/ALIGN (Section alignment)"
4+
ms.date: 05/11/2022
55
f1_keywords: ["VC.Project.VCLinkerTool.Alignment", "/align"]
66
helpviewer_keywords: ["sections, specifying alignment", "ALIGN linker option", "/ALIGN linker option", "-ALIGN linker option", "section alignment", "sections"]
77
---
8-
# /ALIGN (Section Alignment)
8+
# `/ALIGN` (Section alignment)
99

10+
Specify the alignment of each section within the executable image.
1011
## Syntax
1112

12-
> **/ALIGN**[**:**_number_]
13+
> **`/ALIGN`**\[**`:`*`number`***]
1314
1415
### Arguments
1516

16-
*number*<br/>
17+
*`number`*\
1718
The alignment value in bytes.
1819

1920
## Remarks
2021

21-
The **/ALIGN** option specifies the alignment of each section within the linear address space of the program. The *number* argument is in bytes and must be a power of two. The default is 4K (4096). The linker issues a warning if the alignment produces an invalid image.
22+
The **`/ALIGN`** linker option specifies the alignment of each section within the linear address space of the program. The *`number`* argument is in bytes and must be a power of two. The default is 4K (4096). The linker issues a warning if the alignment produces an invalid image.
2223

23-
Unless you are writing an application such as a device driver, you should not need to modify the alignment.
24+
Unless you're writing an application such as a device driver, you shouldn't need to modify the alignment.
2425

25-
It is possible to modify the alignment of a particular section with the align parameter to the [/SECTION](section-specify-section-attributes.md) option.
26+
It's possible to modify the alignment of a particular section with the *`align`* parameter to the [`/SECTION`](section-specify-section-attributes.md) option.
2627

27-
The alignment value that you specify cannot be smaller than the largest section alignment.
28+
The alignment value that you specify can't be smaller than the largest section alignment.
2829

2930
### To set this linker option in the Visual Studio development environment
3031

@@ -40,5 +41,5 @@ The alignment value that you specify cannot be smaller than the largest section
4041

4142
## See also
4243

43-
[MSVC linker reference](linking.md)<br/>
44-
[MSVC Linker Options](linker-options.md)
44+
[MSVC linker reference](linking.md)\
45+
[MSVC linker options](linker-options.md)
Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,40 @@
11
---
2-
description: "Learn more about: /ALLOWBIND (Prevent DLL Binding)"
3-
title: "/ALLOWBIND (Prevent DLL Binding)"
4-
ms.date: "11/04/2016"
2+
description: "Learn more about: /ALLOWBIND (Prevent DLL binding)"
3+
title: "/ALLOWBIND (Prevent DLL binding)"
4+
ms.date: 05/11/2022
55
f1_keywords: ["VC.Project.VCLinkerTool.PreventDLLBinding", "/allowbind"]
66
helpviewer_keywords: ["/ALLOWBIND linker option", "binding DLLs", "preventing DLL binding", "ALLOWBIND linker option", "-ALLOWBIND linker option", "DLLs [C++], preventing binding"]
77
ms.assetid: 30e37e24-12e4-407e-988a-39d357403598
88
---
9-
# /ALLOWBIND (Prevent DLL Binding)
9+
# `/ALLOWBIND` (Prevent DLL binding)
1010

11-
```
12-
/ALLOWBIND[:NO]
13-
```
11+
Set a flag to disallow DLL binding.
12+
13+
## Syntax
14+
15+
> **`/ALLOWBIND`**\[**`:NO`**]
1416
1517
## Remarks
1618

17-
/ALLOWBIND:NO sets a bit in a DLL's header that indicates to Bind.exe that the image is not allowed to be bound. You may not want a DLL to be bound if it has been digitally signed (binding invalidates the signature).
19+
The **`/ALLOWBIND:NO`** linker option sets a bit in a DLL's header that indicates to Bind.exe that the image can't be bound. You may not want a DLL to be bound if it's been digitally signed (binding invalidates the signature).
1820

19-
You can edit an existing DLL for /ALLOWBIND functionality with the [/ALLOWBIND](allowbind.md) option of the EDITBIN utility.
21+
You can edit an existing DLL for **`/ALLOWBIND`** functionality with the [`/ALLOWBIND`](allowbind.md) option of the EDITBIN utility.
2022

2123
### To set this linker option in the Visual Studio development environment
2224

2325
1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
2426

2527
1. Select the **Configuration Properties** > **Linker** > **Command Line** property page.
2628

27-
1. Enter `/ALLOWBIND:NO` into **Additional Options**.
29+
1. Enter *`/ALLOWBIND:NO`* into **Additional Options**. Choose **OK** or **Apply** to apply the change.
2830

2931
### To set this linker option programmatically
3032

3133
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.AdditionalOptions%2A>.
3234

3335
## See also
3436

35-
[MSVC linker reference](linking.md)<br/>
36-
[MSVC Linker Options](linker-options.md)<br/>
37-
[BindImage function](/windows/win32/api/imagehlp/nf-imagehlp-bindimage)<br/>
38-
[BindImageEx function](/windows/win32/api/imagehlp/nf-imagehlp-bindimageex)
37+
[MSVC linker reference](linking.md)\
38+
[MSVC linker options](linker-options.md)\
39+
[`BindImage` function](/windows/win32/api/imagehlp/nf-imagehlp-bindimage)\
40+
[`BindImageEx` function](/windows/win32/api/imagehlp/nf-imagehlp-bindimageex)
Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
11
---
2-
description: "Learn more about: /ALLOWISOLATION (Manifest Lookup)"
3-
title: "/ALLOWISOLATION (Manifest Lookup)"
4-
ms.date: "11/04/2016"
2+
description: "Learn more about: /ALLOWISOLATION (Manifest lookup)"
3+
title: "/ALLOWISOLATION (Manifest lookup)"
4+
ms.date: 05/11/2022
55
f1_keywords: ["/ALLOWISOLATION", "VC.Project.VCLinkerTool.AllowIsolation"]
66
helpviewer_keywords: ["-ALLOWISOLATION linker option", "/ALLOWISOLATION linker option"]
77
ms.assetid: 6d41851e-b3c1-4bdf-beaa-031773089d6f
88
---
9-
# /ALLOWISOLATION (Manifest Lookup)
9+
# `/ALLOWISOLATION` (Manifest lookup)
1010

1111
Specifies behavior for manifest lookup.
1212

1313
## Syntax
1414

15-
```
16-
/ALLOWISOLATION[:NO]
17-
```
15+
> **`/ALLOWISOLATION`**\[**`:NO`**]
1816
1917
## Remarks
2018

21-
**/ALLOWISOLATION:NO** indicates DLLs are loaded as if there was no manifest and causes the linker to set the `IMAGE_DLLCHARACTERISTICS_NO_ISOLATION` bit in the optional header's `DllCharacteristics` field.
19+
The **`/ALLOWISOLATION:NO`** linker option indicates DLLs are loaded as if there was no manifest and causes the linker to set the `IMAGE_DLLCHARACTERISTICS_NO_ISOLATION` bit in the optional header's `DllCharacteristics` field.
2220

23-
**/ALLOWISOLATION** causes the operating system to do manifest lookups and loads.
21+
**`/ALLOWISOLATION`** causes the operating system to do manifest lookups and loads.
2422

25-
**/ALLOWISOLATION** is the default.
23+
**`/ALLOWISOLATION`** is the default.
2624

27-
When isolation is disabled for an executable, the Windows loader will not attempt to find an application manifest for the newly created process. The new process will not have a default activation context, even if there is a manifest inside the executable or placed in the same directory as the executable with name <em>executable-name</em>**.exe.manifest**.
25+
When isolation is disabled for an executable, the Windows loader won't attempt to find an application manifest for the newly created process. The new process won't have a default activation context, even if there's a manifest inside the executable or placed in the same directory as the executable with name *`<executable-name>.exe.manifest`*.
2826

29-
For more information, see [Manifest Files Reference](/windows/win32/SbsCs/manifest-files-reference).
27+
For more information, see [Manifest files reference](/windows/win32/SbsCs/manifest-files-reference).
3028

3129
### To set this linker option in the Visual Studio development environment
3230

@@ -38,5 +36,5 @@ For more information, see [Manifest Files Reference](/windows/win32/SbsCs/manife
3836

3937
## See also
4038

41-
[MSVC linker reference](linking.md)<br/>
42-
[MSVC Linker Options](linker-options.md)
39+
[MSVC linker reference](linking.md)\
40+
[MSVC linker options](linker-options.md)
Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,32 @@
11
---
2-
description: "Learn more about: /APPCONTAINER (Microsoft Store App)"
3-
title: "/APPCONTAINER (UWP/Microsoft Store App)"
4-
ms.date: "11/04/2016"
2+
description: "Learn more about: /APPCONTAINER (Microsoft Store app)"
3+
title: "/APPCONTAINER (UWP/Microsoft Store app)"
4+
ms.date: 05/11/2022
55
ms.assetid: 9a432db5-7640-460b-ab18-6f61fa7daf6f
66
---
7-
# /APPCONTAINER (Microsoft Store App)
7+
# `/APPCONTAINER` (Microsoft Store app)
88

9-
Specifies whether the linker creates an executable image that must be run in an app container.
9+
Specifies whether the linker creates an executable image that must run in an AppContainer environment.
1010

1111
## Syntax
1212

13-
```
14-
/APPCONTAINER[:NO]
15-
```
13+
> **`/APPCONTAINER`**\[**`:NO`**]
1614
1715
## Remarks
1816

19-
By default, /APPCONTAINER is off.
17+
The **`/APPCONTAINER`** linker option modifies an executable to indicate whether the app must run in the AppContainer process-isolation environment. Specify **`/APPCONTAINER`** for an app that must run in the AppContainer environment—for example, a Universal Windows Platform (UWP) or Windows Phone 8.x app. The option is set automatically in Visual Studio when you create a Universal Windows app from a template. For a desktop app, specify **`/APPCONTAINER:NO`** or just omit the option. By default, **`/APPCONTAINER`** is off.
2018

21-
This option modifies an executable to indicate whether the app must be run in the appcontainer process-isolation environment. Specify /APPCONTAINER for an app that must run in the appcontainer environment—for example, a Universal Windows Platform (UWP) or Windows Phone 8.x app. (The option is set automatically in Visual Studio when you create a Universal Windows app from a template.) For a desktop app, specify /APPCONTAINER:NO or just omit the option.
22-
23-
The /APPCONTAINER option was introduced in Windows 8.
19+
The **`/APPCONTAINER`** option was introduced in Windows 8.
2420

2521
### To set this linker option in Visual Studio
2622

2723
1. Open the project **Property Pages** dialog box. For more information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
2824

2925
1. Select the **Configuration Properties** > **Linker** > **Command Line** property page.
3026

31-
1. In **Additional Options**, enter `/APPCONTAINER` or `/APPCONTAINER:NO`.
27+
1. In **Additional Options**, enter *`/APPCONTAINER`* or *`/APPCONTAINER:NO`*.
3228

3329
## See also
3430

35-
[MSVC linker reference](linking.md)<br/>
36-
[MSVC Linker Options](linker-options.md)
31+
[MSVC linker reference](linking.md)\
32+
[MSVC linker options](linker-options.md)
Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,58 @@
11
---
22
description: "Learn more about: /ASSEMBLYDEBUG (Add DebuggableAttribute)"
33
title: "/ASSEMBLYDEBUG (Add DebuggableAttribute)"
4-
ms.date: "11/04/2016"
4+
ms.date: 05/11/2022
55
f1_keywords: ["VC.Project.VCLinkerTool.AssemblyDebug", "/ASSEMBLYDEBUG"]
66
helpviewer_keywords: ["/ASSEMBLYDEBUG linker option", "-ASSEMBLYDEBUG linker option", "ASSEMBLYDEBUG linker option"]
77
ms.assetid: 94443af3-470c-41d7-83a0-7434563d7982
88
---
9-
# /ASSEMBLYDEBUG (Add DebuggableAttribute)
9+
# `/ASSEMBLYDEBUG` (Add DebuggableAttribute)
1010

11-
```
12-
/ASSEMBLYDEBUG[:DISABLE]
13-
```
11+
Specify whether to emit the `DebuggableAttribute` attribute with debug information tracking and to disable JIT optimizations.
1412

15-
/ASSEMBLYDEBUG emits the **DebuggableAttribute** attribute with debug information tracking and disables JIT optimizations. This is the same as specifying the following attribute in source:
13+
## Syntax
1614

17-
```
15+
> **`/ASSEMBLYDEBUG`**\[**`:DISABLE`**]
16+
17+
## Remarks
18+
19+
The **`/ASSEMBLYDEBUG`** linker option emits the `DebuggableAttribute` attribute with debug information tracking and disables JIT optimizations. This option is the same as specifying the following attribute in source:
20+
21+
```cpp
1822
[assembly:Debuggable(true, true)]; // same as /ASSEMBLYDEBUG
1923
```
2024

21-
/ASSEMBLYDEBUG:DISABLE emits the **DebuggableAttribute** attribute but disables the tracking of debug information and enables JIT optimizations. This is the same as specifying the following attribute in source:
25+
**`/ASSEMBLYDEBUG:DISABLE`** emits the `DebuggableAttribute` attribute but disables the tracking of debug information and enables JIT optimizations. This option is the same as specifying the following attribute in source:
2226

23-
```
27+
```cpp
2428
[assembly:Debuggable(false, false)]; // same as /ASSEMBLYDEBUG:DISABLE
2529
```
2630

27-
The default is to not emit the **DebuggableAttribute** attribute.
31+
By default, the linker doesn't emit the `DebuggableAttribute` attribute.
2832

29-
DebuggableAttribute can also be added to an assembly directly in source code. For example,
33+
`DebuggableAttribute` can also be added to an assembly directly in source code. For example:
3034

31-
```
35+
```cpp
3236
[assembly:Debuggable(true, true)]; // same as /ASSEMBLYDEBUG
3337
```
3438

35-
## Remarks
36-
37-
It is necessary to explicitly specify that a managed image be debuggable. Using [/Zi](z7-zi-zi-debug-information-format.md) alone is not sufficient.
39+
You must explicitly specify that a managed image is debuggable. The [`/Zi`](z7-zi-zi-debug-information-format.md) option alone is insufficient.
3840

3941
Other linker options that affect assembly generation are:
4042

41-
- [/ASSEMBLYLINKRESOURCE](assemblylinkresource-link-to-dotnet-framework-resource.md)
43+
- [`/ASSEMBLYLINKRESOURCE`](assemblylinkresource-link-to-dotnet-framework-resource.md)
4244

43-
- [/ASSEMBLYMODULE](assemblymodule-add-a-msil-module-to-the-assembly.md)
45+
- [`/ASSEMBLYMODULE`](assemblymodule-add-a-msil-module-to-the-assembly.md)
4446

45-
- [/ASSEMBLYRESOURCE](assemblyresource-embed-a-managed-resource.md)
47+
- [`/ASSEMBLYRESOURCE`](assemblyresource-embed-a-managed-resource.md)
4648

47-
- [/DELAYSIGN](delaysign-partially-sign-an-assembly.md)
49+
- [`/DELAYSIGN`](delaysign-partially-sign-an-assembly.md)
4850

49-
- [/KEYCONTAINER](keycontainer-specify-a-key-container-to-sign-an-assembly.md)
51+
- [`/KEYCONTAINER`](keycontainer-specify-a-key-container-to-sign-an-assembly.md)
5052

51-
- [/KEYFILE](keyfile-specify-key-or-key-pair-to-sign-an-assembly.md)
53+
- [`/KEYFILE`](keyfile-specify-key-or-key-pair-to-sign-an-assembly.md)
5254

53-
- [/NOASSEMBLY](noassembly-create-a-msil-module.md)
55+
- [`/NOASSEMBLY`](noassembly-create-a-msil-module.md)
5456

5557
### To set this linker option in the Visual Studio development environment
5658

@@ -66,5 +68,5 @@ Other linker options that affect assembly generation are:
6668

6769
## See also
6870

69-
[MSVC linker reference](linking.md)<br/>
70-
[MSVC Linker Options](linker-options.md)
71+
[MSVC linker reference](linking.md)\
72+
[MSVC linker options](linker-options.md)
Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,65 @@
11
---
2-
description: "Learn more about: /ASSEMBLYLINKRESOURCE (Link to .NET Framework Resource)"
3-
title: "/ASSEMBLYLINKRESOURCE (Link to .NET Framework Resource)"
4-
ms.date: "11/04/2016"
2+
description: "Learn more about: /ASSEMBLYLINKRESOURCE (Link to .NET Framework resource)"
3+
title: "/ASSEMBLYLINKRESOURCE (Link to .NET Framework resource)"
4+
ms.date: 05/11/2022
55
f1_keywords: ["/ASSEMBLYLINKRESOURCE", "VC.Project.VCLinkerTool.AssemblyLinkResource"]
66
helpviewer_keywords: ["-ASSEMBLYLINKRESOURCE linker option", "ASSEMBLYLINKRESOURCE linker option", "/ASSEMBLYLINKRESOURCE linker option"]
77
ms.assetid: 8b6ad184-1b33-47a4-8513-4803cf915b64
88
---
9-
# /ASSEMBLYLINKRESOURCE (Link to .NET Framework Resource)
9+
# `/ASSEMBLYLINKRESOURCE` (Link to .NET Framework resource)
1010

11-
```
12-
/ASSEMBLYLINKRESOURCE:filename
13-
```
11+
Create a link to a .NET Framework resource in the output file.
12+
13+
## Syntax
14+
15+
> **`/ASSEMBLYLINKRESOURCE:`*`filename`***
1416
1517
## Arguments
1618

17-
*filename*<br/>
18-
The .NET Framework resource file to which you want to link from the assembly.
19+
*`filename`*
20+
The .NET Framework resource file to link from the assembly.
1921

2022
## Remarks
2123

22-
The /ASSEMBLYLINKRESOURCE option creates a link to a .NET Framework resource in the output file; the resource file is not placed in the output file. [/ASSEMBLYRESOURCE](assemblyresource-embed-a-managed-resource.md) embeds a resource file in the output file.
24+
The **`/ASSEMBLYLINKRESOURCE`** linker option creates a link to a .NET Framework resource in the output file. The resource file isn't placed in the output file. Use the [`/ASSEMBLYRESOURCE`](assemblyresource-embed-a-managed-resource.md) option to embed a resource file in the output file.
2325

2426
Linked resources are public in the assembly when created with the linker.
2527

26-
/ASSEMBLYLINKRESOURCE requires that the compilation include [/clr](clr-common-language-runtime-compilation.md); [/LN](ln-create-msil-module.md) or [/NOASSEMBLY](noassembly-create-a-msil-module.md) is not allowed with /ASSEMBLYLINKRESOURCE.
28+
**`/ASSEMBLYLINKRESOURCE`** requires the [`/clr`](clr-common-language-runtime-compilation.md) compiler option. The [`/LN`](ln-create-msil-module.md) or [`/NOASSEMBLY`](noassembly-create-a-msil-module.md) options aren't allowed with **`/ASSEMBLYLINKRESOURCE`**.
2729

28-
If *filename* is a .NET Framework resource file created, for example, by [Resgen.exe](/dotnet/framework/tools/resgen-exe-resource-file-generator) or in the development environment, it can be accessed with members in the **System.Resources** namespace. For more information, see [System.Resources.ResourceManager](/dotnet/api/system.resources.resourcemanager). For all other resources, use the **GetManifestResource**\* methods in the **System.Reflection.Assembly** class to access the resource at run time.
30+
If *`filename`* is a .NET Framework resource file that's created, for example, by [`Resgen.exe`](/dotnet/framework/tools/resgen-exe-resource-file-generator) or in the development environment, it can be accessed with members in the `System.Resources` namespace. For more information, see [`System.Resources.ResourceManager`](/dotnet/api/system.resources.resourcemanager). For all other resources, use the `GetManifestResource*` methods in the `System.Reflection.Assembly` class to access the resource at run time.
2931

30-
*filename* can be any file format. For example, you may want to make a native DLL part of the assembly, so it can be installed into the Global Assembly Cache and accessed from managed code in the assembly.
32+
*`filename`* can have any file format. For example, you may want to make a native DLL part of the assembly. Then it can be installed into the Global Assembly Cache and accessed from managed code in the assembly.
3133

3234
Other linker options that affect assembly generation are:
3335

34-
- [/ASSEMBLYDEBUG](assemblydebug-add-debuggableattribute.md)
36+
- [`/ASSEMBLYDEBUG`](assemblydebug-add-debuggableattribute.md)
3537

36-
- [/ASSEMBLYMODULE](assemblymodule-add-a-msil-module-to-the-assembly.md)
38+
- [`/ASSEMBLYMODULE`](assemblymodule-add-a-msil-module-to-the-assembly.md)
3739

38-
- [/ASSEMBLYRESOURCE](assemblyresource-embed-a-managed-resource.md)
40+
- [`/ASSEMBLYRESOURCE`](assemblyresource-embed-a-managed-resource.md)
3941

40-
- [/DELAYSIGN](delaysign-partially-sign-an-assembly.md)
42+
- [`/DELAYSIGN`](delaysign-partially-sign-an-assembly.md)
4143

42-
- [/KEYCONTAINER](keycontainer-specify-a-key-container-to-sign-an-assembly.md)
44+
- [`/KEYCONTAINER`](keycontainer-specify-a-key-container-to-sign-an-assembly.md)
4345

44-
- [/KEYFILE](keyfile-specify-key-or-key-pair-to-sign-an-assembly.md)
46+
- [`/KEYFILE`](keyfile-specify-key-or-key-pair-to-sign-an-assembly.md)
4547

46-
- [/NOASSEMBLY](noassembly-create-a-msil-module.md)
48+
- [`/NOASSEMBLY`](noassembly-create-a-msil-module.md)
4749

4850
### To set this linker option in the Visual Studio development environment
4951

5052
1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
5153

5254
1. Select the **Configuration Properties** > **Linker** > **Command Line** property page.
5355

54-
1. Type the option into the **Additional Options** box.
56+
1. Enter the option in **Additional Options**. Choose **OK** or **Apply** to apply the change.
5557

5658
### To set this linker option programmatically
5759

5860
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.AdditionalOptions%2A>.
5961

6062
## See also
6163

62-
[MSVC linker reference](linking.md)<br/>
63-
[MSVC Linker Options](linker-options.md)
64+
[MSVC linker reference](linking.md)\
65+
[MSVC linker options](linker-options.md)

0 commit comments

Comments
 (0)