diff --git a/win32ss/user/ntuser/main.c b/win32ss/user/ntuser/main.c index 84881a8831e..cb5dc019918 100644 --- a/win32ss/user/ntuser/main.c +++ b/win32ss/user/ntuser/main.c @@ -917,6 +917,7 @@ DriverUnload(IN PDRIVER_OBJECT DriverObject) FreeFontSupport(); ResetCsrApiPort(); ResetCsrProcess(); + IntWin32PowerManagementCleanup(); } // Return on failure @@ -984,8 +985,8 @@ DriverEntry( CalloutData.ProcessCallout = Win32kProcessCallback; CalloutData.ThreadCallout = Win32kThreadCallback; // CalloutData.GlobalAtomTableCallout = NULL; - // CalloutData.PowerEventCallout = NULL; - // CalloutData.PowerStateCallout = NULL; + CalloutData.PowerEventCallout = IntHandlePowerEvent; + CalloutData.PowerStateCallout = IntHandlePowerState; // CalloutData.JobCallout = NULL; CalloutData.BatchFlushRoutine = NtGdiFlushUserBatch; CalloutData.DesktopOpenProcedure = IntDesktopObjectOpen; diff --git a/win32ss/user/ntuser/ntuser.c b/win32ss/user/ntuser/ntuser.c index 6643495606d..d5a40085c37 100644 --- a/win32ss/user/ntuser/ntuser.c +++ b/win32ss/user/ntuser/ntuser.c @@ -195,7 +195,14 @@ NtUserInitialize( /* Save the EPROCESS of CSRSS */ InitCsrProcess(/*PsGetCurrentProcess()*/); -// Initialize Power Request List (use hPowerRequestEvent). + /* Initialize Power Request List */ + Status = IntInitWin32PowerManagement(hPowerRequestEvent); + if (!NT_SUCCESS(Status)) + { + UserLeave(); + return Status; + } + // Initialize Media Change (use hMediaRequestEvent). /* Initialize various GDI stuff (DirectX, fonts, language ID etc.) */