- Add flags for NtCreateProcessEx for upcoming patch.
[reactos.git] / reactos / subsys / win32k / main / dllmain.c
index 66aa08d..94eb7a8 100644 (file)
@@ -70,7 +70,7 @@ Win32kProcessCallback(struct _EPROCESS *Process,
     {
       DPRINT("Creating W32 process PID:%d at IRQ level: %lu\n", Process->UniqueProcessId, KeGetCurrentIrql());
 
-      InitializeListHead(&Win32Process->ClassListHead);
+      InitializeListHead(&Win32Process->ClassList);
 
       InitializeListHead(&Win32Process->MenuListHead);
 
@@ -99,7 +99,9 @@ Win32kProcessCallback(struct _EPROCESS *Process,
       IntCleanupCurIcons(Process, Win32Process);
       IntEngCleanupDriverObjs(Process, Win32Process);
       CleanupMonitorImpl();
-
+      
+      /* no process windows should exist at this point, or the function will assert! */
+      DestroyProcessClasses(Win32Process);
 
       GDI_CleanupForProcess(Process);
 
@@ -246,6 +248,7 @@ Win32kThreadCallback(struct _ETHREAD *Thread,
          
          e = PopEntryList(&Win32Thread->ReferencesList);
       }
+      PsSetThreadWin32Thread(Thread, NULL);
     }
 
   RETURN( STATUS_SUCCESS);
@@ -352,6 +355,13 @@ DriverEntry (
     return STATUS_UNSUCCESSFUL;
   }
 
+  Status = InitHotkeyImpl();
+  if (!NT_SUCCESS(Status))
+  {
+    DPRINT1("Failed to initialize hotkey implementation!\n");
+    return STATUS_UNSUCCESSFUL;
+  }
+
   Status = InitWindowStationImpl();
   if (!NT_SUCCESS(Status))
   {