Skip to content

Fix typo in DependentLoadFlag documentation #271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/build/loadlibrary-and-afxloadlibrary.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ For MFC applications that load MFC extension DLLs, we recommend that you use `Af
If Windows cannot load the DLL, the process can attempt to recover from the error. For example, the process could notify the user of the error and ask the user to specify another path to the DLL.

> [!IMPORTANT]
> Make sure to specify the full path of any DLLs. The current directory is searched first when files are loaded. If you do not qualify the path of the file, a file that is not the intended one might be loaded. Another way to prevent this is by using the [/DEPENDENTLOADFLAGS](../build/reference/dependentloadflags.md) linker option.
> Make sure to specify the full path of any DLLs. The current directory is searched first when files are loaded. If you do not qualify the path of the file, a file that is not the intended one might be loaded. Another way to prevent this is by using the [/DEPENDENTLOADFLAG](../build/reference/dependentloadflag.md) linker option.

## What do you want to do?

Expand Down
2 changes: 1 addition & 1 deletion docs/build/reference/TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
### [/DELAY (Delay Load Import Settings)](delay-delay-load-import-settings.md)
### [/DELAYLOAD (Delay Load Import)](delayload-delay-load-import.md)
### [/DELAYSIGN (Partially Sign an Assembly)](delaysign-partially-sign-an-assembly.md)
### [/DEPENDENTLOADFLAGS (Set default dependent load flags)](dependentloadflags.md)
### [/DEPENDENTLOADFLAG (Set default dependent load flags)](dependentloadflag.md)
### [/DLL (Build a DLL)](dll-build-a-dll.md)
### [/DRIVER (Windows NT Kernel Mode Driver)](driver-windows-nt-kernel-mode-driver.md)
### [/DYNAMICBASE (Use address space layout randomization)](dynamicbase-use-address-space-layout-randomization.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
---
title: "/DEPENDENTLOADFLAGS (Set default dependent load flags)"
description: "The /DEPENDENTLOADFLAGS option sets default flags for DLLs loaded using LoadLibrary"
title: "/DEPENDENTLOADFLAG (Set default dependent load flags)"
description: "The /DEPENDENTLOADFLAG option sets default flags for DLLs loaded using LoadLibrary"
ms.custom: ""
ms.date: "05/18/2018"
ms.technology: ["cpp-tools"]
ms.topic: "reference"
f1_keywords: ["dependentloadflag"]
dev_langs: ["C++"]
helpviewer_keywords: ["LINK tool [C++], dependent load flags", "-DEPENDENTLOADFLAGS linker option", "linker [C++], DEPENDENTLOADFLAGS", "DEPENDENTLOADFLAGS linker option", "/DEPENDENTLOADFLAGS linker option"]
helpviewer_keywords: ["LINK tool [C++], dependent load flags", "-DEPENDENTLOADFLAG linker option", "linker [C++], DEPENDENTLOADFLAG", "DEPENDENTLOADFLAG linker option", "/DEPENDENTLOADFLAG linker option"]
author: "corob-msft"
ms.author: "corob"
ms.workload: ["cplusplus"]
---
# /DEPENDENTLOADFLAGS (Set default dependent load flags)
# /DEPENDENTLOADFLAG (Set default dependent load flags)

Sets the default load flags used when `LoadLibrary` is used to load DLLs.

## Syntax

> **/DEPENDENTLOADFLAGS**[**:**_loadflags_]
> **/DEPENDENTLOADFLAG**[**:**_loadflags_]

### Arguments

Expand All @@ -34,9 +34,9 @@ On supported operating systems, this option has the effect of changing calls to

This flag can be used to prevent DLL planting attacks. For example, if an app uses `LoadLibrary` to load a dependent DLL, an attacker could plant a DLL with the same name in the search path used by `LoadLibrary`, such as the current directory, which may be checked before system directories if safe DLL search mode is disabled. Safe DLL search mode places the user's current directory later in the search order, and is enabled by default on Windows XP SP2 and later versions. For more information, see [Dynamic-Link Library Search Order](https://msdn.microsoft.com/library/windows/desktop/ms682586.aspx).

For example, if you specify the link option `/DEPENDENTLOADFLAGS:0xA00` (the value of the combined flags `LOAD_LIBRARY_SEARCH_APPLICATION_DIR | LOAD_LIBRARY_SEARCH_SYSTEM32`), then even if safe DLL search mode is disabled on the user's computer, the DLL search path is limited to protected directories that are more difficult for an attacker to change. For information on the flags available, and their symbolic and numeric values, see the *dwFlags* parameter description in [LoadLibraryEx](https://go.microsoft.com/fwlink/p/?LinkID=236091).
If you specify the link option `/DEPENDENTLOADFLAG:0xA00` (the value of the combined flags `LOAD_LIBRARY_SEARCH_APPLICATION_DIR | LOAD_LIBRARY_SEARCH_SYSTEM32`), then even if safe DLL search mode is disabled on the user's computer, the DLL search path is limited to protected directories that are more difficult for an attacker to change. For information on the flags available, and their symbolic and numeric values, see the *dwFlags* parameter description in [LoadLibraryEx](https://go.microsoft.com/fwlink/p/?LinkID=236091).

### To set the DEPENDENTLOADFLAGS linker option in the Visual Studio development environment
### To set the DEPENDENTLOADFLAG linker option in the Visual Studio development environment

1. Open the project's **Property Pages** dialog box. For details, see [Setting Visual C++ Project Properties](../../ide/working-with-project-properties.md).

Expand Down
2 changes: 1 addition & 1 deletion docs/build/reference/linker-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ You can use the [comment](../../preprocessor/comment-c-cpp.md) pragma to specify
|[/DELAY](../../build/reference/delay-delay-load-import-settings.md)|Controls the delayed loading of DLLs.|
|[/DELAYLOAD](../../build/reference/delayload-delay-load-import.md)|Causes the delayed loading of the specified DLL.|
|[/DELAYSIGN](../../build/reference/delaysign-partially-sign-an-assembly.md)|Partially signs an assembly.|
|[/DEPENDENTLOADFLAGS](dependentloadflags.md)|Sets default flags on dependent DLL loads.|
|[/DEPENDENTLOADFLAG](dependentloadflag.md)|Sets default flags on dependent DLL loads.|
|[/DLL](../../build/reference/dll-build-a-dll.md)|Builds a DLL.|
|[/DRIVER](../../build/reference/driver-windows-nt-kernel-mode-driver.md)|Creates a kernel mode driver.|
|[/DYNAMICBASE](../../build/reference/dynamicbase-use-address-space-layout-randomization.md)|Specifies whether to generate an executable image that can be randomly rebased at load time by using the address space layout randomization (ASLR) feature.|
Expand Down