mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
Fixed the load count in LdrpDetachProcess. That made it again possible to call the dll entry with DLL_PROCESS_DETACH.
svn path=/trunk/; revision=17193
This commit is contained in:
@@ -104,7 +104,7 @@ static __inline LONG LdrpDecrementLoadCount(PLDR_DATA_TABLE_ENTRY Module, BOOLEA
|
||||
RtlEnterCriticalSection (NtCurrentPeb()->LoaderLock);
|
||||
}
|
||||
LoadCount = Module->LoadCount;
|
||||
if (Module->LoadCount > 0)
|
||||
if (Module->LoadCount > 0 && Module->LoadCount != 0xFFFF)
|
||||
{
|
||||
Module->LoadCount--;
|
||||
}
|
||||
@@ -2397,7 +2397,7 @@ LdrpDetachProcess(BOOLEAN UnloadAll)
|
||||
while (Entry != ModuleListHead)
|
||||
{
|
||||
Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList);
|
||||
if (((UnloadAll && Module->LoadCount <= 0) || Module->LoadCount == 0) &&
|
||||
if (((UnloadAll && Module->LoadCount == 0xFFFF) || Module->LoadCount == 0) &&
|
||||
Module->Flags & LDRP_ENTRY_PROCESSED &&
|
||||
!(Module->Flags & LDRP_UNLOAD_IN_PROGRESS))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user