Skip to content

Commit a69fa38

Browse files
authored
Merge pull request #896 from MicrosoftDocs/master
6/13 AM Publish
2 parents 286f2f9 + 9208af3 commit a69fa38

8 files changed

+107
-108
lines changed
5.49 KB
Loading
Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "-DYNAMICBASE (Use address space layout randomization) | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "11/04/2016"
4+
ms.date: "06/12/2018"
55
ms.technology: ["cpp-tools"]
66
ms.topic: "reference"
77
f1_keywords: ["VC.Project.VCLinkerTool.RandomizedBaseAddress"]
@@ -13,37 +13,34 @@ ms.author: "corob"
1313
ms.workload: ["cplusplus"]
1414
---
1515
# /DYNAMICBASE (Use address space layout randomization)
16-
Specifies whether to generate an executable image that can be randomly rebased at load time by using the address space layout randomization (ASLR) feature of [!INCLUDE[windowsver](../../build/reference/includes/windowsver_md.md)].
17-
18-
## Syntax
19-
20-
```
21-
/DYNAMICBASE[:NO]
22-
```
23-
24-
## Remarks
25-
By default, /DYNAMICBASE is on.
26-
27-
This option modifies the header of an executable to indicate whether the application should be randomly rebased at load time.
28-
29-
Address space layout randomization is supported on [!INCLUDE[windowsver](../../build/reference/includes/windowsver_md.md)].
30-
31-
### To set this linker option in Visual Studio
32-
33-
1. Open the project **Property Pages** dialog box. For more information, see [Working with Project Properties](../../ide/working-with-project-properties.md).
34-
35-
2. Expand the **Configuration Properties** node.
36-
37-
3. Expand the **Linker** node.
38-
39-
4. Select the **Advanced** property page.
40-
41-
5. Modify the **Randomized Base Address** property.
42-
43-
### To set this linker option programmatically
44-
45-
1. See <xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.RandomizedBaseAddress%2A>.
46-
47-
## See Also
48-
[Setting Linker Options](../../build/reference/setting-linker-options.md)
49-
[Linker Options](../../build/reference/linker-options.md)
16+
17+
Specifies whether to generate an executable image that can be randomly rebased at load time by using the address space layout randomization (ASLR) feature of Windows that was first available in Windows Vista.
18+
19+
## Syntax
20+
21+
> **/DYNAMICBASE**[**:NO**]
22+
23+
## Remarks
24+
25+
The **/DYNAMICBASE** option modifies the header of an *executable image*, a .dll or .exe file, to indicate whether the application should be randomly rebased at load time, and enables virtual address allocation randomization, which affects the virtual memory location of heaps, stacks, and other operating system allocations. The **/DYNAMICBASE** option applies to both 32-bit and 64-bit images. ASLR is supported on Windows Vista and later operating systems. The option is ignored by earlier operating systems.
26+
27+
By default, **/DYNAMICBASE** is enabled. To disable this option, use **/DYNAMICBASE:NO**. The **/DYNAMICBASE** option is required for the [/HIGHENTROPYVA](highentropyva-support-64-bit-aslr.md) option to have an effect.
28+
29+
### To set this linker option in Visual Studio
30+
31+
1. Open the project **Property Pages** dialog box. For more information, see [Working with Project Properties](../../ide/working-with-project-properties.md).
32+
33+
1. Select the **Configuration Properties** > **Linker** > **Advanced** property page.
34+
35+
1. Modify the **Randomized Base Address** property.
36+
37+
### To set this linker option programmatically
38+
39+
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.RandomizedBaseAddress%2A>.
40+
41+
## See also
42+
43+
- [Setting Linker Options](../../build/reference/setting-linker-options.md)
44+
- [Linker Options](../../build/reference/linker-options.md)
45+
- [/HIGHENTROPYVA](highentropyva-support-64-bit-aslr.md)
46+
- [Windows ISV Software Security Defenses](http://msdn.microsoft.com/library/bb430720.aspx)

docs/build/reference/dynamicbase.md

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "-DYNAMICBASE | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "11/04/2016"
4+
ms.date: "06/12/2018"
55
ms.technology: ["cpp-tools"]
66
ms.topic: "reference"
77
f1_keywords: ["/dynamicbase"]
@@ -13,22 +13,20 @@ ms.author: "corob"
1313
ms.workload: ["cplusplus"]
1414
---
1515
# /DYNAMICBASE
16-
Specifies whether an executable image can be randomly rebased at load time by using address space layout randomization (ASLR).
17-
18-
## Syntax
19-
20-
```
21-
22-
/DYNAMICBASE[:NO]
23-
```
24-
25-
## Remarks
26-
By default, the linker sets the **/DYNAMICBASE** option.
27-
28-
This option modifies the header of an executable image to indicate whether the loader can randomly rebase the image at load time.
29-
30-
ASLR is supported on Windows Vista, Windows Server 2008, Windows 7, Windows 8, and Windows Server 2012.
31-
32-
## See Also
33-
[EDITBIN Options](../../build/reference/editbin-options.md)
34-
[Windows ISV Software Security Defenses](http://msdn.microsoft.com/library/bb430720.aspx)
16+
17+
Specifies whether to generate an executable image that can be randomly rebased at load time by using the address space layout randomization (ASLR) feature of Windows that was first available in Windows Vista.
18+
19+
## Syntax
20+
21+
> **/DYNAMICBASE**[**:NO**]
22+
23+
## Remarks
24+
25+
The **/DYNAMICBASE** option modifies the header of an *executable image*, a .dll or .exe file, to indicate whether the application should be randomly rebased at load time, and enables virtual address allocation randomization, which affects the virtual memory location of heaps, stacks, and other operating system allocations. The **/DYNAMICBASE** option applies to both 32-bit and 64-bit images. ASLR is supported on Windows Vista and later operating systems. The option is ignored by earlier operating systems.
26+
27+
By default, **/DYNAMICBASE** is enabled. To disable this option, use **/DYNAMICBASE:NO**. The **/DYNAMICBASE** option is required for the [/HIGHENTROPYVA](highentropyva-support-64-bit-aslr.md) option to have an effect.
28+
29+
## See also
30+
31+
- [EDITBIN Options](../../build/reference/editbin-options.md)
32+
- [Windows ISV Software Security Defenses](http://msdn.microsoft.com/library/bb430720.aspx)
Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: "-HIGHENTROPYVA (Support 64-Bit ASLR) | Microsoft Docs"
2+
title: "/HIGHENTROPYVA (Support 64-Bit ASLR) | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "11/04/2016"
4+
ms.date: "06/12/2018"
55
ms.technology: ["cpp-tools"]
66
ms.topic: "reference"
77
dev_langs: ["C++"]
@@ -11,31 +11,33 @@ ms.author: "corob"
1111
ms.workload: ["cplusplus"]
1212
---
1313
# /HIGHENTROPYVA (Support 64-Bit ASLR)
14-
Specifies that the executable image supports high-entropy 64-bit address space layout randomization (ASLR).
15-
16-
## Syntax
17-
18-
```
19-
/HIGHENTROPYVA[:NO]
20-
```
21-
22-
## Remarks
23-
By default, /HIGHENTROPYVA is on for 64-bit executable images. It is not applicable to 32-bit executable images. To enable this option, /DYNAMICBASE must also be on.
24-
25-
/HIGHENTROPYVA modifies the header of a .dll file or .exe file to indicate whether ASLR with 64-bit addresses is supported. When this option is set on an executable and all of the modules that it depends on, an operating system that supports 64-bit ASLR can rebase the segments of the executable image at load time by using randomized addresses in a 64-bit virtual address space. This large address space makes it more difficult for an attacker to guess the location of a particular memory region.
26-
27-
### To set this linker option in Visual Studio
28-
29-
1. Open the project **Property Pages** dialog box. For more information, see [Working with Project Properties](../../ide/working-with-project-properties.md).
30-
31-
2. Expand the **Configuration Properties** node.
32-
33-
3. Expand the **Linker** node.
34-
35-
4. Select the **Command Line** property page.
36-
37-
5. In **Additional Options**, enter `/HIGHENTROPYVA` or `/HIGHENTROPYVA:NO`.
38-
39-
## See Also
40-
[Setting Linker Options](../../build/reference/setting-linker-options.md)
41-
[Linker Options](../../build/reference/linker-options.md)
14+
15+
Specifies whether the executable image supports high-entropy 64-bit address space layout randomization (ASLR).
16+
17+
## Syntax
18+
19+
> **/HIGHENTROPYVA**[**:NO**]
20+
21+
## Remarks
22+
23+
**/HIGHENTROPYVA** modifies the header of an *executable image*, a .dll file or .exe file, to indicate whether ASLR can use the entire 64-bit address space. When this option is set on an executable and all of the modules that it depends on, an operating system that supports 64-bit ASLR can rebase the segments of the executable image at load time by using randomized addresses in a 64-bit virtual address space. This large address space makes it more difficult for an attacker to guess the location of a particular memory region.
24+
25+
By default, **/HIGHENTROPYVA** is enabled for 64-bit executable images. This option requires [/LARGEADDRESSAWARE](largeaddressaware-handle-large-addresses.md), which is also enabled by default for 64-bit images. **/HIGHENTROPYVA** is not applicable to 32-bit executable images, where the linker ignores the option. To explicitly disable this option, use **/HIGHENTROPYVA:NO**.
26+
27+
For **/HIGHENTROPYVA** to have an effect at load time, [/DYNAMICBASE](dynamicbase-use-address-space-layout-randomization.md) must also be enabled. **/DYNAMICBASE** is enabled by default, and is required to enable ASLR in Windows Vista and later operating systems. Earlier versions of Windows ignore this flag.
28+
29+
### To set this linker option in Visual Studio
30+
31+
1. Open the project **Property Pages** dialog box. For more information, see [Working with Project Properties](../../ide/working-with-project-properties.md).
32+
33+
1. Select the **Configuration Properties** > **Linker** > **Command Line** property page.
34+
35+
1. In **Additional Options**, enter `/HIGHENTROPYVA` or `/HIGHENTROPYVA:NO`.
36+
37+
## See also
38+
39+
- [Setting Linker Options](../../build/reference/setting-linker-options.md)
40+
- [Linker Options](../../build/reference/linker-options.md)
41+
- [/DYNAMICBASE](dynamicbase-use-address-space-layout-randomization.md)
42+
- [/LARGEADDRESSAWARE](largeaddressaware-handle-large-addresses.md)
43+
- [Windows ISV Software Security Defenses](http://msdn.microsoft.com/library/bb430720.aspx)

docs/build/reference/highentropyva.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "-HIGHENTROPYVA | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "11/04/2016"
4+
ms.date: "06/12/2018"
55
ms.technology: ["cpp-tools"]
66
ms.topic: "reference"
77
f1_keywords: ["/HIGHENTROPYVA"]
@@ -13,19 +13,21 @@ ms.author: "corob"
1313
ms.workload: ["cplusplus"]
1414
---
1515
# /HIGHENTROPYVA
16-
Specifies whether the executable image supports high-entropy 64-bit address space layout randomization (ASLR).
17-
18-
```
19-
20-
/HIGHENTROPYVA[:NO]
21-
```
22-
23-
## Remarks
24-
This option modifies the header of a .dll file or .exe file to indicate whether ASLR with 64-bit addresses is supported. When this option is set on an executable and all of the modules that it depends on, an operating system that supports 64-bit ASLR can rebase the segments of the executable image at load time by using randomized addresses in a 64-bit virtual address space. This large address space makes it more difficult for an attacker to guess the location of a particular memory region.
25-
26-
By default, the linker sets this option for 64-bit executable images. To set this option, the [/DYNAMICBASE](../../build/reference/dynamicbase.md) option must also be set.
27-
28-
## See Also
29-
[EDITBIN Options](../../build/reference/editbin-options.md)
30-
[/DYNAMICBASE](../../build/reference/dynamicbase.md)
31-
[Windows ISV Software Security Defenses](http://msdn.microsoft.com/library/bb430720.aspx)
16+
17+
Specifies whether the executable image supports high-entropy 64-bit address space layout randomization (ASLR).
18+
19+
## Syntax
20+
21+
> **/HIGHENTROPYVA**[**:NO**]
22+
23+
## Remarks
24+
25+
This option modifies the header of an *executable image*, a .dll file or .exe file, to indicate whether ASLR with 64-bit addresses is supported. When this option is set on an executable and all of the modules that it depends on, an operating system that supports 64-bit ASLR can rebase the segments of the executable image at load time by using randomized addresses in a 64-bit virtual address space. This large address space makes it more difficult for an attacker to guess the location of a particular memory region.
26+
27+
By default, the linker enables **/HIGHENTROPYVA** for 64-bit executable images. This option requires [/LARGEADDRESSAWARE](largeaddressaware.md), which is also enabled by default for 64-bit images. **/HIGHENTROPYVA** is not applicable to 32-bit executable images, where the option is ignored. To explicitly disable this option, use **/HIGHENTROPYVA:NO**. For this option to have an effect, the [/DYNAMICBASE](dynamicbase.md) option must also be set.
28+
29+
## See also
30+
31+
- [EDITBIN Options](editbin-options.md)
32+
- [/DYNAMICBASE](dynamicbase.md)
33+
- [Windows ISV Software Security Defenses](http://msdn.microsoft.com/library/bb430720.aspx)

docs/ide/resource-files-cpp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ Resources are interface elements that provide information to the user. Bitmaps,
2020
|---------------|------------------------|--------------------------------|-----------------|
2121
|*Projname*.rc|*Projname*|Source Files|The resource script file for the project. The resource script file contains the following, depending on the type of project, and the support selected for the project (for example, toolbars, dialog boxes, or HTML):<br /><br /> - Default menu definition.<br />- Accelerator and string tables.<br />- Default **About** dialog box.<br />- Other dialog boxes.<br />- Icon file (res\\*Projname*.ico).<br />- Version information.<br />- Bitmaps.<br />- Toolbar.<br />- HTML files.<br /><br /> The resource file includes the file Afxres.rc for standard Microsoft Foundation Class resources.|
2222
|Resource.h|*Projname*|Header Files|The resource header file that includes definitions for the resources used by the project.|
23-
|*Projname*.rc2|*Projname*\res|Source Files|The script file containing additional resources used by the project. You can include the .rc2 file at the top of the project's .rc file.<br /><br /> An .rc2 file is useful for including resources used by several different projects. Instead of having to create the same resources several times for different projects, you can put them in an .rc2 file and include the .rc2 file into the main .rc file.|
23+
|*Projname*.rc2|*Projname*\res|Source Files|The script file containing additional resources used by the project. You can include the .rc2 file under the project's .rc file.<br /><br /> An .rc2 file is useful for including resources used by several different projects. Instead of having to create the same resources several times for different projects, you can put them in an .rc2 file and include the .rc2 file into the main .rc file.|
2424
|*Projname*.def|*Projname*|Source Files|The module definition file for a DLL project. For a control, it provides the name and description of the control, as well as the size of the run-time heap.|
2525
|*Projname*.ico|*Projname*\res|Resource Files|The icon file for the project or control. This icon appears when the application is minimized. It is also used in the application's **About** box. By default, MFC provides the MFC icon, and ATL provides the ATL icon.|
2626
|*Projname*Doc.ico|*Projname*\res|Resource Files|The icon file for an MFC project that includes support for the document/view architecture.|
2727
|Toolbar.bmp|*Projname*\res|Resource Files|The bitmap file representing the application or control in a toolbar or palette. This bitmap is included in the project's resource file. The initial toolbar and status bar are constructed in the **CMainFrame** class.|
2828
|ribbon.mfcribbon-ms|*Projname*\res|Resource Files|The resource file that contains the XML code that defines the buttons, controls, and attributes in the ribbon. For more information, see [Ribbon Designer (MFC)](../mfc/ribbon-designer-mfc.md).|
2929

3030
## See Also
31-
[File Types Created for Visual C++ Projects](../ide/file-types-created-for-visual-cpp-projects.md)
31+
[File Types Created for Visual C++ Projects](../ide/file-types-created-for-visual-cpp-projects.md)

docs/mfc/reference/cfile-class.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "CFile Class | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "11/04/2016"
4+
ms.date: "06/12/2018"
55
ms.technology: ["cpp-mfc"]
66
ms.topic: "reference"
77
f1_keywords: ["CFile", "AFX/CFile", "AFX/CFile::CFile", "AFX/CFile::Abort", "AFX/CFile::Close", "AFX/CFile::Duplicate", "AFX/CFile::Flush", "AFX/CFile::GetFileName", "AFX/CFile::GetFilePath", "AFX/CFile::GetFileTitle", "AFX/CFile::GetLength", "AFX/CFile::GetPosition", "AFX/CFile::GetStatus", "AFX/CFile::LockRange", "AFX/CFile::Open", "AFX/CFile::Read", "AFX/CFile::Remove", "AFX/CFile::Rename", "AFX/CFile::Seek", "AFX/CFile::SeekToBegin", "AFX/CFile::SeekToEnd", "AFX/CFile::SetFilePath", "AFX/CFile::SetLength", "AFX/CFile::SetStatus", "AFX/CFile::UnlockRange", "AFX/CFile::Write", "AFX/CFile::hFileNull", "AFX/CFile::m_hFile", "AFX/CFile::m_pTM"]
@@ -177,7 +177,7 @@ CAtlTransactionManager* pTM);
177177

178178
|Value|Description|
179179
|-----------|-----------------|
180-
|`CFile::modeCreate`|Creates a new file if no file exists.; If the file already exists, [CFileException](../../mfc/reference/cfileexception-class.md) is raised.|
180+
|`CFile::modeCreate`|Creates a new file if no file exists. If the file already exists, it is overwritten and initially set to zero length.|
181181
|`CFile::modeNoTruncate`|Creates a new file if no file exists; otherwise, if the file already exists, it is attached to the `CFile` object.|
182182

183183
Choose the following file caching options as described. By default, the system uses a general purpose caching scheme that is not available as an option.

docs/windows/walkthrough-creating-windows-desktop-applications-cpp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Walkthrough: Create a traditional Windows Desktop application (C++) | Microsoft Docs"
33
ms.custom: "get-started-article"
4-
ms.date: "1/11/2018"
4+
ms.date: "06/12/2018"
55
ms.technology: ["cpp-windows"]
66
ms.topic: "conceptual"
77
dev_langs: ["C++"]
@@ -552,7 +552,7 @@ As promised, here's the complete code for the working application.
552552

553553
1. To run the application, press **F5**. A window that contains the text "Hello, Windows desktop!" should appear in the upper-left corner of the display.
554554

555-
![Run the DesktopApp Project](../build/media/desktop-app-project-run-150.gif "Run the DesktopApp Project")
555+
![Run the DesktopApp Project](../build/media/desktop-app-project-run-157.png "Run the DesktopApp Project")
556556

557557
Congratulations! You've completed this walkthrough and built a traditional Windows desktop application.
558558

0 commit comments

Comments
 (0)