The Logoff-Handler might try to notify the scheduler service which might already
have been shut down. We need to fix the shutdown sequence,
so that the service manager stops all running services.
Might fix CORE-14521 according to patches author ekohl.
I tested myself, it properly works around regression CORE-14999 aka
"Long time to shutdown after installing .NET Framework"
cherry picked from commit 0.4.11-dev-189-g
5e2fe08918fc5a3c52d586a8dc8b8df851473c20
SchedEventLogoff(
PWLX_NOTIFICATION_INFO pInfo)
{
+#if 0
SC_HANDLE hManager = NULL;
SC_HANDLE hService = NULL;
SERVICE_STATUS ServiceStatus;
+#endif
TRACE("SchedEventLogoff\n");
TRACE("Size: %lu\n", pInfo->Size);
TRACE("hDesktop: %p\n", pInfo->hDesktop);
TRACE("pStatusCallback: %p\n", pInfo->pStatusCallback);
+#if 0
hManager = OpenSCManagerW(NULL, NULL, SC_MANAGER_CONNECT);
if (hManager == NULL)
{
if (hManager != NULL)
CloseServiceHandle(hManager);
+#endif
}