if (hEvent == NULL)
{
dwError = GetLastError();
- TRACE("WL: Failed to create the notication event (Error %lu)\n", dwError);
+ TRACE("WL: Failed to create the notification event (Error %lu)\n", dwError);
if (dwError == ERROR_ALREADY_EXISTS)
{
/* Open registry key with preloaded layouts */
if (RegOpenKeyExW(HKEY_CURRENT_USER, L"Keyboard Layout\\Preload", 0, KEY_READ, &hKey) == ERROR_SUCCESS)
{
- while(TRUE)
+ while (TRUE)
{
/* Read values with integer names only */
swprintf(wszKeyName, L"%d", i++);
hAppInstance = hInstance;
+ /* Make us critical */
+ RtlSetProcessIsCritical(TRUE, NULL, FALSE);
+ RtlSetThreadIsCritical(TRUE, NULL, FALSE);
+
if (!RegisterLogonProcess(GetCurrentProcessId(), TRUE))
{
ERR("WL: Could not register logon process\n");
/* Wait for the LSA server */
WaitForLsass();
+ /* Init Notifications */
+ InitNotifications();
+
/* Load and initialize gina */
if (!GinaInit(WLSession))
{
}
#endif
+ CallNotificationDlls(WLSession, StartupHandler);
+
/* Create a hidden window to get SAS notifications */
if (!InitializeSAS(WLSession))
{
ExitProcess(2);
}
- //DisplayStatusMessage(Session, Session->WinlogonDesktop, IDS_PREPARENETWORKCONNECTIONS);
- //DisplayStatusMessage(Session, Session->WinlogonDesktop, IDS_APPLYINGCOMPUTERSETTINGS);
+ // DisplayStatusMessage(Session, Session->WinlogonDesktop, IDS_PREPARENETWORKCONNECTIONS);
+ // DisplayStatusMessage(Session, Session->WinlogonDesktop, IDS_APPLYINGCOMPUTERSETTINGS);
/* Display logged out screen */
WLSession->LogonState = STATE_INIT;
/* Check for pending setup */
if (GetSetupType() != 0)
{
- TRACE("WL: Setup mode detected\n");
-
/* Run setup and reboot when done */
- SwitchDesktop(WLSession->ApplicationDesktop);
+ TRACE("WL: Setup mode detected\n");
RunSetup();
}
else
+ {
PostMessageW(WLSession->SASWindow, WLX_WM_SAS, WLX_SAS_TYPE_CTRL_ALT_DEL, 0);
+ }
+
+ (void)LoadLibraryW(L"sfc_os.dll");
/* Tell kernel that CurrentControlSet is good (needed
* to support Last good known configuration boot) */
DispatchMessageW(&Msg);
}
+ CleanupNotifications();
+
/* We never go there */
return 0;