Share via


/DELAY (Delay Load Import Settings)

 

The latest version of this topic can be found at -DELAY (Delay Load Import Settings).

DELAY:UNLOAD
/DELAY:NOBIND

  
## Remarks  
 The /DELAY option controls [delayed loading](../Topic/Linker%20Support%20for%20Delay-Loaded%20DLLs.md) of DLLs:  
  
-  The UNLOAD qualifier tells the delay-load helper function to support explicit unloading of the DLL. The Import Address Table (IAT) is reset to its original form, invalidating IAT pointers and causing them to be overwritten.  
  
     If you do not select UNLOAD, any call to [FUnloadDelayLoadedDLL](../Topic/Explicitly%20Unloading%20a%20Delay-Loaded%20DLL.md) will fail.  
  
-  The NOBIND qualifier tells the linker not to include a bindable IAT in the final image. The default is to create the bindable IAT for delay-loaded DLLs. The resulting image cannot be statically bound. (Images with bindable IATs may be statically bound prior to execution.) See [/BIND](../Topic/-BIND.md).  
  
     If the DLL is bound, the helper function will attempt to use the bound information instead of calling [GetProcAddress](https://msdn.microsoft.com/library/windows/desktop/ms683212.aspx) on each of the referenced imports. If either the timestamp or the preferred address does not match those of the loaded DLL, the helper function will assume the bound IAT is out of date and will proceed as if the bound IAT does not exist.  
  
     NOBIND causes your program image to be larger but can speed load time of the DLL. If you never intend to bind the DLL, NOBIND will prevent the bound IAT from being generated.  
  
 To specify DLLs to delay load, use the [/DELAYLOAD](../Topic/-DELAYLOAD%20\(Delay%20Load%20Import\).md) option.  
  
### To set this linker option in the Visual Studio development environment  
  
1.  Open the project's **Property Pages** dialog box. For information, see [Working with Project Properties](../Topic/Working%20with%20Project%20Properties.md).  
  
2.  Expand **Configuration Properties**, **Linker**, and then select **Advanced**.  
  
3.  Modify the **Delay Loaded DLL** property.  
  
### To set this linker option programmatically  
  
-  See [DelayLoadDLLs](assetId:///P:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.DelayLoadDLLs?qualifyHint=False&autoUpgrade=True).  
  
## See Also  
 [Setting Linker Options](../Topic/Setting%20Linker%20Options.md)   
 [Linker Options](../Topic/Linker%20Options.md)