Fixed the load count in LdrpDetachProcess. That made it again possible to call the dll entry with DLL_PROCESS_DETACH.
Modified: trunk/reactos/lib/ntdll/ldr/utils.c

Modified: trunk/reactos/lib/ntdll/ldr/utils.c
--- trunk/reactos/lib/ntdll/ldr/utils.c	2005-08-08 00:45:04 UTC (rev 17192)
+++ trunk/reactos/lib/ntdll/ldr/utils.c	2005-08-08 01:47:52 UTC (rev 17193)
@@ -104,7 +104,7 @@
        RtlEnterCriticalSection (NtCurrentPeb()->LoaderLock);
      }
    LoadCount = Module->LoadCount;
-   if (Module->LoadCount > 0)
+   if (Module->LoadCount > 0 && Module->LoadCount != 0xFFFF)
      {
        Module->LoadCount--;
      }
@@ -2397,7 +2397,7 @@
    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))
          {