Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 1.68 KB

delayload-delay-load-import.md

File metadata and controls

39 lines (25 loc) · 1.68 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: /DELAYLOAD (Delay Load Import)
/DELAYLOAD (Delay Load Import)
11/04/2016
/delayload
VC.Project.VCLinkerTool.DelayLoadDLLS
DELAYLOAD linker option
-DELAYLOAD linker option
/DELAYLOAD linker option
delayed loading of DLLs, /DELAYLOAD option
39ea0f1e-5c01-450f-9c75-2d9761ff9b28

/DELAYLOAD (Delay Load Import)

/DELAYLOAD:dllname

Parameters

dllname
The name of a DLL that you want to delay load.

Remarks

The /DELAYLOAD option causes the DLL that's specified by dllname to be loaded only on the first call by the program to a function in that DLL. For more information, see Linker Support for Delay-Loaded DLLs. You can use this option as many times as necessary to specify as many DLLs as you choose. You must use Delayimp.lib when you link your program, or you can implement your own delay-load helper function.

The /DELAY option specifies binding and loading options for each delay-loaded DLL.

To set this linker option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.

  2. In the Linker folder, select the Input property page.

  3. Modify the Delay Loaded DLLs property.

To set this linker option programmatically

  • See xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.DelayLoadDLLs%2A.

See also

MSVC linker reference
MSVC Linker Options