You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider a program MyProgram.exe with 2 dependencies: MyDetoured.dll and MyDelayLoaded.dll.
MyDetoured.dll is injected as first entry in the import libs of MyProgram.exe using setdll.
When MyProgram.exe runs, I can see MyDetoured.dll being loaded before MyDelayLoaded.dll and its DLL_PROCESS_ATTACH is called.
However when MyDelayLoaded.dll is not found, MyProgram.exe:
loads MyDetoured.dll
tries to load MyDelayLoaded.dll and fails with a dll not found pop up error
DLL_PROCESS_ATTACH of MyDetoured.dll is not called <--- issue here
I see this by using "gflags -i Program.exe +sls" which traces dll calls.
I thought Detours are guaranteed to get called.
Is this a bug or is it a limitation that Detours doesn't work when a delay loaded DLL is not resolved at runtime ?
EDIT: this happens also with statically linked DLL
The text was updated successfully, but these errors were encountered:
m-celikba
changed the title
Detours DLL does not DLL_PROCESS_ATTACH if a delay loaded dll is not found
Detours DLL does not DLL_PROCESS_ATTACH if a statically linked DLL or delay loaded DLL is not found
Feb 20, 2025
Consider a program MyProgram.exe with 2 dependencies: MyDetoured.dll and MyDelayLoaded.dll.
MyDetoured.dll is injected as first entry in the import libs of MyProgram.exe using setdll.
When MyProgram.exe runs, I can see MyDetoured.dll being loaded before MyDelayLoaded.dll and its DLL_PROCESS_ATTACH is called.
However when MyDelayLoaded.dll is not found, MyProgram.exe:
I see this by using "gflags -i Program.exe +sls" which traces dll calls.
I thought Detours are guaranteed to get called.
Is this a bug or is it a limitation that Detours doesn't work when a delay loaded DLL is not resolved at runtime ?
EDIT: this happens also with statically linked DLL
The text was updated successfully, but these errors were encountered: