This commit is contained in:
Elliot Killick
2023-10-31 10:26:55 +00:00
parent 2497bb9fff
commit b5620cc252
3 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -43,4 +43,4 @@ USE_MSVCRT=1
# The C standard that comes with this WDK version is very old: C89 (very broken in terms of compliance)
# For further development, I recommned switching to C++ (change this to a .cpp/.cc file)
SOURCES=LdrLockLiberator.c
SOURCES=LdrLockLiberatorWDK.c
+1 -1
View File
@@ -26,7 +26,7 @@ It's exactly what it sounds like. Unlock Loader Lock, set loader events, and fli
### Escaping at the Exit
We use the CRT `atexit` typically used by EXEs in our DLL code to escape Loader Lock when the program exits. For dynamic loads, this is made <b>100% safe</b> by pinning (`LDR_ADDREF_DLL_PIN`) our library using `LdrAddRefDll` so a following `FreeLibrary` won't remove our DLL from memory.
We use the CRT `atexit` typically used by EXEs in our DLL code to escape Loader Lock when the program exits. For dynamic loads (using LoadLibrary), this is made <b>100% safe</b> by pinning (`LDR_ADDREF_DLL_PIN`) our library using `LdrAddRefDll` so a following `FreeLibrary` won't remove our DLL from memory.
### Using Locks to Our Advantage