Questions tagged [delay-load]
22 questions
57
votes
3 answers
Set Custom Path to Referenced DLL's?
I've got a C# project (call it MainProj) which references several other DLL projects. By adding these projects to MainProj's references, it will build them and copy their resulting DLL's to MainProj's working directory.
What I'd like to do is have…

J23
- 3,061
- 6
- 41
- 52
5
votes
2 answers
Delay Load DLL: "Exception 0xC06D007E: Module not found" when application started multiple times
I have a case of an intermittent crash in my application where we use Delay Load DLL. There are a few different call-stacks where we have seen the crash, but it always crashes when raising 0xC06D007E: Module not found in __delayLoadHelper2.
The…

decasteljau
- 7,655
- 10
- 41
- 58
5
votes
1 answer
Delay-loading TestCaseSource in NUnit
I have some NUnit tests which uses a TestCaseSource function. Unfortunately, the TestCaseSource function that I need takes a long time to initialize, because it scans a folder tree recursively to find all of the test images that would be passed into…

rwong
- 6,062
- 1
- 23
- 51
4
votes
0 answers
Unload a delay loaded dll in Windows
I am trying to use __FUnloadDelayLoadedDLL2 with opengl32.dll.
I have already defined:
delayimp.lib /DELAYLOAD:OPENGL32.dll /DELAY:UNLOAD
in the linker options, and then
__FUnloadDelayLoadedDLL2("OPENGL32.dll")
but this returns false.
The name in…

bytesixtyfour
- 83
- 3
4
votes
4 answers
DelayLoading a DLL and the associated .lib file
I am attempting to delay load wintrust.dll and crypt32.dll in my application (these are used to perform digital signature/publisher checks in a DLL). I am using VS2008. After adding these two DLLs as entries in the Delay Load property in the Linker…

sohum
- 3,207
- 2
- 39
- 63
3
votes
1 answer
Does cmake support delay-loading dlls on Windows?
I'm converting a MSBuild project to a cmake project (IDE is Visual Studio 2022).
MSBuild properties page allows setting selected dlls to be "delay-loaded" but searching online leaves me finding nothing about a similar flag or configuration setting…

NKatUT
- 429
- 3
- 10
3
votes
2 answers
ReactNative - ImageBackground load local image with a delay
I noticed that, when I run the react-native app, the images that I set as background using the tag load with a delay of almost 2 seconds, even if they are not heavy images (~100K) and they are stored in local.
I have also read this…

th3g3ntl3man
- 1,926
- 5
- 29
- 50
3
votes
6 answers
Disable automatic DLL loading in C++
My scenario is as follows: my application depends on a certain DLL (I use it's lib during linkage). However, when my application executes, I want to explicitly load that DLL using LoadLibrary. However, by default, when the code reaches a scope where…
unknown
2
votes
1 answer
Using unmanaged code to check for presence of .net runtime
I want to create a mixed managed/unmanaged DLL that can be loaded by rundll32, and which checks for the presence of the .Net runtime library before attempting to run any managed code, thusly:
using namespace System;
void SomeManagedCode()
{
…

snowcrash09
- 4,694
- 27
- 45
2
votes
0 answers
DelayLoading with clang LLVM
With Visual Studio under Windows, it is possible to delay load libraries and functions, with the linking flag "/DelayLoad somelib.lib", something provided by DelayImp.lib.
Under the hood, it seems that doing so tells the linker to wrap every…

plowsec
- 71
- 9
2
votes
1 answer
Can PE file sections be moved in memory relative to base address when the image is loaded?
I'm trying to access a delayed loaded function address in the Import Address Table for an arbitrary process.
My assumptions went like this:
First, I need to see where it is located in the image itself relative to the base address:
DWORD_PTR…

c00000fd
- 20,994
- 29
- 177
- 400
2
votes
1 answer
Are delay-loaded DLLs useful to avoid linking specific functions?
Consider the following code which needs to call one of two functions in User32.dll.
if( IsWindowsVistaOrGreater() )
AddClipboardFormatListener(hWnd) ;
else
SetClipboardViewer(hWnd) ;
If I'm not mistaken, this program will fail to start on…

GetFree
- 40,278
- 18
- 77
- 104
1
vote
0 answers
Could I use QT dlls through delay-load or LoadLibrary?
I'm working with a program using qt 5.6. Loading QT dlls(Qt5Core, Qt5Gui, Qt5Widgets etc.) makes my program occupying lot of memory space and it doesn't show UI all the time.
Could I use those Qt dlls through delay-load or use LoadLibrary?

Herlin Drew
- 13
- 8
1
vote
1 answer
Unable to locate SHCreateItemFromParsingName (SHELL32.dll)
Good afternoon all,
I want to set up voice recognition macro's to run on my P.C (Windows XP Professional SP3) so I installed Windows Speech recognition Macros. However when I click on it, it states:
The proceedure entry point…

Alan Smith
- 11
- 1
- 2
1
vote
1 answer
Why are some delay load DLLs immediately unloaded with FFMPEG?
I've built ffmpeg as DLLs and linked them to my application, which runs fine when the DLLs are in the executable folder. Because I would like to load different builds of ffmpeg for different project configurations, I need to put them in different…

alvion
- 1,963
- 3
- 15
- 23