ReactOS  0.4.14-dev-41-g31d7680
winlogon.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS Winlogon
4  * FILE: base/system/winlogon/winlogon.c
5  * PURPOSE: Logon
6  * PROGRAMMERS: Thomas Weidenmueller (w3seek@users.sourceforge.net)
7  * Filip Navara
8  * Hervé Poussineau (hpoussin@reactos.org)
9  */
10 
11 /* INCLUDES *****************************************************************/
12 
13 #include "winlogon.h"
14 
15 #include <ndk/cmfuncs.h>
16 
17 /* GLOBALS ******************************************************************/
18 
21 
22 /* FUNCTIONS *****************************************************************/
23 
24 static
25 BOOL
27 {
28  STARTUPINFOW StartupInfo;
29  PROCESS_INFORMATION ProcessInformation;
30  LPCWSTR ServiceString = L"services.exe";
31  BOOL res;
32 
33  /* Start the service control manager (services.exe) */
34  ZeroMemory(&StartupInfo, sizeof(STARTUPINFOW));
35  StartupInfo.cb = sizeof(StartupInfo);
36  StartupInfo.lpReserved = NULL;
37  StartupInfo.lpDesktop = NULL;
38  StartupInfo.lpTitle = NULL;
39  StartupInfo.dwFlags = 0;
40  StartupInfo.cbReserved2 = 0;
41  StartupInfo.lpReserved2 = 0;
42 
43  TRACE("WL: Creating new process - %S\n", ServiceString);
44 
45  res = CreateProcessW(ServiceString,
46  NULL,
47  NULL,
48  NULL,
49  FALSE,
51  NULL,
52  NULL,
53  &StartupInfo,
54  &ProcessInformation);
55  if (!res)
56  {
57  ERR("WL: Failed to execute services (error %lu)\n", GetLastError());
58  return FALSE;
59  }
60 
61  TRACE("WL: Created new process - %S\n", ServiceString);
62 
63  CloseHandle(ProcessInformation.hThread);
64  CloseHandle(ProcessInformation.hProcess);
65 
66  TRACE("WL: StartServicesManager() done.\n");
67 
68  return TRUE;
69 }
70 
71 
72 static
73 BOOL
75 {
76  STARTUPINFOW StartupInfo;
77  PROCESS_INFORMATION ProcessInformation;
78  LPCWSTR ServiceString = L"lsass.exe";
79  BOOL res;
80 
81  /* Start the local security authority subsystem (lsass.exe) */
82  ZeroMemory(&StartupInfo, sizeof(STARTUPINFOW));
83  StartupInfo.cb = sizeof(StartupInfo);
84  StartupInfo.lpReserved = NULL;
85  StartupInfo.lpDesktop = NULL;
86  StartupInfo.lpTitle = NULL;
87  StartupInfo.dwFlags = 0;
88  StartupInfo.cbReserved2 = 0;
89  StartupInfo.lpReserved2 = 0;
90 
91  TRACE("WL: Creating new process - %S\n", ServiceString);
92 
93  res = CreateProcessW(ServiceString,
94  NULL,
95  NULL,
96  NULL,
97  FALSE,
99  NULL,
100  NULL,
101  &StartupInfo,
102  &ProcessInformation);
103 
104  TRACE("WL: Created new process - %S\n", ServiceString);
105 
106  CloseHandle(ProcessInformation.hThread);
107  CloseHandle(ProcessInformation.hProcess);
108 
109  return res;
110 }
111 
112 
113 static
114 VOID
116 {
117  HANDLE hEvent;
118  DWORD dwError;
119 
121  TRUE,
122  FALSE,
123  L"LSA_RPC_SERVER_ACTIVE");
124  if (hEvent == NULL)
125  {
126  dwError = GetLastError();
127  TRACE("WL: Failed to create the notification event (Error %lu)\n", dwError);
128 
129  if (dwError == ERROR_ALREADY_EXISTS)
130  {
132  FALSE,
133  L"LSA_RPC_SERVER_ACTIVE");
134  if (hEvent == NULL)
135  {
136  ERR("WL: Could not open the notification event (Error %lu)\n", GetLastError());
137  return;
138  }
139  }
140  }
141 
142  TRACE("WL: Wait for the LSA server!\n");
144  TRACE("WL: LSA server running!\n");
145 
147 }
148 
149 
150 static
151 VOID
153 {
154  LONG lError;
155  HKEY hKey = NULL;
156  DWORD dwType, dwSize;
157  PWSTR pszBuffer;
158  WCHAR szBuffer[128] = L"";
159 
161  L"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters",
162  0,
164  &hKey);
165  if (lError != ERROR_SUCCESS)
166  {
167  ERR("WL: RegOpenKeyExW(\"HKLM\\System\\CurrentControlSet\\Services\\Tcpip\\Parameters\") failed (error %lu)\n", lError);
168  return;
169  }
170 
171  /*
172  * Read the "NV Hostname" value and copy it into the "Hostname" value.
173  */
174 
175  pszBuffer = szBuffer;
176  dwSize = ARRAYSIZE(szBuffer);
177 
178  lError = RegQueryValueExW(hKey,
179  L"NV Hostname",
180  NULL,
181  &dwType,
182  (LPBYTE)pszBuffer,
183  &dwSize);
184  if (((lError == ERROR_INSUFFICIENT_BUFFER) || (lError == ERROR_MORE_DATA)) && (dwType == REG_SZ))
185  {
186  pszBuffer = HeapAlloc(GetProcessHeap(), 0, dwSize);
187  if (pszBuffer)
188  {
189  lError = RegQueryValueExW(hKey,
190  L"NV Hostname",
191  NULL,
192  &dwType,
193  (LPBYTE)pszBuffer,
194  &dwSize);
195  }
196  else
197  {
198  ERR("WL: Could not reallocate memory for pszBuffer\n");
199  }
200  }
201  if ((lError == ERROR_SUCCESS) && (dwType == REG_SZ))
202  {
203  TRACE("NV Hostname is '%S'.\n", pszBuffer);
204 
205  lError = RegSetValueExW(hKey,
206  L"Hostname",
207  0,
208  REG_SZ,
209  (LPBYTE)pszBuffer,
210  dwSize);
211  if (lError != ERROR_SUCCESS)
212  ERR("WL: RegSetValueExW(\"Hostname\") failed (error %lu)\n", lError);
213  }
214 
215  /*
216  * Read the "NV Domain" value and copy it into the "Domain" value.
217  */
218 
219  // pszBuffer = szBuffer;
220  // dwSize = ARRAYSIZE(szBuffer);
221 
222  lError = RegQueryValueExW(hKey,
223  L"NV Domain",
224  NULL,
225  &dwType,
226  (LPBYTE)pszBuffer,
227  &dwSize);
228  if (((lError == ERROR_INSUFFICIENT_BUFFER) || (lError == ERROR_MORE_DATA)) && (dwType == REG_SZ))
229  {
230  if (pszBuffer != szBuffer)
231  {
232  PWSTR pszNewBuffer;
233  pszNewBuffer = HeapReAlloc(GetProcessHeap(), 0, pszBuffer, dwSize);
234  if (pszNewBuffer)
235  {
236  pszBuffer = pszNewBuffer;
237  }
238  else
239  {
240  HeapFree(GetProcessHeap(), 0, pszBuffer);
241  pszBuffer = NULL;
242  }
243  }
244  else
245  {
246  pszBuffer = HeapAlloc(GetProcessHeap(), 0, dwSize);
247  }
248  if (pszBuffer)
249  {
250  lError = RegQueryValueExW(hKey,
251  L"NV Domain",
252  NULL,
253  &dwType,
254  (LPBYTE)pszBuffer,
255  &dwSize);
256  }
257  else
258  {
259  ERR("WL: Could not reallocate memory for pszBuffer\n");
260  }
261  }
262  if ((lError == ERROR_SUCCESS) && (dwType == REG_SZ))
263  {
264  TRACE("NV Domain is '%S'.\n", pszBuffer);
265 
266  lError = RegSetValueExW(hKey,
267  L"Domain",
268  0,
269  REG_SZ,
270  (LPBYTE)pszBuffer,
271  dwSize);
272  if (lError != ERROR_SUCCESS)
273  ERR("WL: RegSetValueExW(\"Domain\") failed (error %lu)\n", lError);
274  }
275 
276  if (pszBuffer != szBuffer)
277  HeapFree(GetProcessHeap(), 0, pszBuffer);
278 
279  RegCloseKey(hKey);
280 }
281 
282 
283 static
284 BOOL
286 {
287  WCHAR wszKeyName[12], wszKLID[10];
288  DWORD dwSize = sizeof(wszKLID), dwType, i = 1;
289  HKEY hKey;
290  UINT Flags;
291  BOOL bRet = FALSE;
292 
293  /* Open registry key with preloaded layouts */
294  if (RegOpenKeyExW(HKEY_CURRENT_USER, L"Keyboard Layout\\Preload", 0, KEY_READ, &hKey) == ERROR_SUCCESS)
295  {
296  while (TRUE)
297  {
298  /* Read values with integer names only */
299  swprintf(wszKeyName, L"%d", i++);
300  if (RegQueryValueExW(hKey, wszKeyName, NULL, &dwType, (LPBYTE)wszKLID, &dwSize) != ERROR_SUCCESS)
301  {
302  /* There is no more entries */
303  break;
304  }
305 
306  /* Only REG_SZ values are valid */
307  if (dwType != REG_SZ)
308  {
309  ERR("Wrong type: %ws!\n", wszKLID);
310  continue;
311  }
312 
313  /* Load keyboard layout with given locale id */
315  if (i > 1)
317  else // First layout
318  Flags |= KLF_ACTIVATE; // |0x40000000
319  if (!LoadKeyboardLayoutW(wszKLID, Flags))
320  {
321  ERR("LoadKeyboardLayoutW(%ws) failed!\n", wszKLID);
322  continue;
323  }
324  else
325  {
326  /* We loaded at least one layout - success */
327  bRet = TRUE;
328  }
329  }
330 
331  /* Close the key now */
332  RegCloseKey(hKey);
333  }
334  else
335  WARN("RegOpenKeyExW(Keyboard Layout\\Preload) failed!\n");
336 
337  if (!bRet)
338  {
339  /* If we failed, load US keyboard layout */
341  bRet = TRUE;
342  }
343 
344  return bRet;
345 }
346 
347 
348 BOOL
350  IN PWLSESSION Session,
351  IN HDESK hDesktop,
352  IN UINT ResourceId)
353 {
354  WCHAR StatusMsg[MAX_PATH];
355 
356  if (Session->Gina.Version < WLX_VERSION_1_3)
357  return TRUE;
358 
359  if (Session->SuppressStatus)
360  return TRUE;
361 
362  if (LoadStringW(hAppInstance, ResourceId, StatusMsg, MAX_PATH) == 0)
363  return FALSE;
364 
365  return Session->Gina.Functions.WlxDisplayStatusMessage(Session->Gina.Context, hDesktop, 0, NULL, StatusMsg);
366 }
367 
368 
369 BOOL
371  IN PWLSESSION Session)
372 {
373  if (Session->Gina.Version < WLX_VERSION_1_3)
374  return TRUE;
375 
376  return Session->Gina.Functions.WlxRemoveStatusMessage(Session->Gina.Context);
377 }
378 
379 
380 static
381 INT_PTR
382 CALLBACK
384  IN HWND hwndDlg,
385  IN UINT uMsg,
386  IN WPARAM wParam,
387  IN LPARAM lParam)
388 {
389  switch (uMsg)
390  {
391  case WM_COMMAND:
392  {
393  switch (LOWORD(wParam))
394  {
395  case IDOK:
396  EndDialog(hwndDlg, IDOK);
397  return TRUE;
398  }
399  break;
400  }
401 
402  case WM_INITDIALOG:
403  {
404  int len;
405  WCHAR templateText[MAX_PATH], text[MAX_PATH];
406 
407  len = GetDlgItemTextW(hwndDlg, IDC_GINALOADFAILED, templateText, MAX_PATH);
408  if (len)
409  {
410  wsprintfW(text, templateText, (LPWSTR)lParam);
412  }
413 
414  SetFocus(GetDlgItem(hwndDlg, IDOK));
415  return TRUE;
416  }
417 
418  case WM_CLOSE:
419  {
420  EndDialog(hwndDlg, IDCANCEL);
421  return TRUE;
422  }
423  }
424 
425  return FALSE;
426 }
427 
428 
429 int
430 WINAPI
433  IN HINSTANCE hPrevInstance,
434  IN LPSTR lpCmdLine,
435  IN int nShowCmd)
436 {
437 #if 0
438  LSA_STRING ProcessName, PackageName;
441  BOOLEAN Old;
444 #endif
445  ULONG HardErrorResponse;
446  MSG Msg;
447 
448  UNREFERENCED_PARAMETER(hPrevInstance);
449  UNREFERENCED_PARAMETER(lpCmdLine);
450  UNREFERENCED_PARAMETER(nShowCmd);
451 
453 
454  /* Make us critical */
457 
458  /* Update the cached TCP/IP Information in the registry */
460 
462  {
463  ERR("WL: Could not register logon process\n");
464  NtRaiseHardError(STATUS_SYSTEM_PROCESS_TERMINATED, 0, 0, NULL, OptionOk, &HardErrorResponse);
465  ExitProcess(1);
466  }
467 
469  if (!WLSession)
470  {
471  ERR("WL: Could not allocate memory for winlogon instance\n");
472  NtRaiseHardError(STATUS_SYSTEM_PROCESS_TERMINATED, 0, 0, NULL, OptionOk, &HardErrorResponse);
473  ExitProcess(1);
474  }
475 
476  ZeroMemory(WLSession, sizeof(WLSESSION));
477  WLSession->DialogTimeout = 120; /* 2 minutes */
478 
479  /* Initialize the dialog tracking list */
481 
483  {
484  ERR("WL: Could not create window station and desktops\n");
485  NtRaiseHardError(STATUS_SYSTEM_PROCESS_TERMINATED, 0, 0, NULL, OptionOk, &HardErrorResponse);
486  ExitProcess(1);
487  }
488 
490 
491  /* Load default keyboard layouts */
492  if (!InitKeyboardLayouts())
493  {
494  ERR("WL: Could not preload keyboard layouts\n");
495  NtRaiseHardError(STATUS_SYSTEM_PROCESS_TERMINATED, 0, 0, NULL, OptionOk, &HardErrorResponse);
496  ExitProcess(1);
497  }
498 
499  if (!StartRpcServer())
500  {
501  ERR("WL: Could not start the RPC server\n");
502  NtRaiseHardError(STATUS_SYSTEM_PROCESS_TERMINATED, 0, 0, NULL, OptionOk, &HardErrorResponse);
503  ExitProcess(1);
504  }
505 
506  if (!StartServicesManager())
507  {
508  ERR("WL: Could not start services.exe\n");
509  NtRaiseHardError(STATUS_SYSTEM_PROCESS_TERMINATED, 0, 0, NULL, OptionOk, &HardErrorResponse);
510  ExitProcess(1);
511  }
512 
513  if (!StartLsass())
514  {
515  ERR("WL: Failed to start lsass.exe service (error %lu)\n", GetLastError());
516  NtRaiseHardError(STATUS_SYSTEM_PROCESS_TERMINATED, 0, 0, NULL, OptionOk, &HardErrorResponse);
517  ExitProcess(1);
518  }
519 
520  /* Wait for the LSA server */
521  WaitForLsass();
522 
523  /* Init Notifications */
525 
526  /* Load and initialize gina */
527  if (!GinaInit(WLSession))
528  {
529  ERR("WL: Failed to initialize Gina\n");
530  // FIXME: Retrieve the real name of the GINA DLL we were trying to load.
531  // It is known only inside the GinaInit function...
534  ExitProcess(1);
535  }
536 
538 
539 #if 0
540  /* Connect to NetLogon service (lsass.exe) */
541  /* Real winlogon uses "Winlogon" */
542  RtlInitUnicodeString((PUNICODE_STRING)&ProcessName, L"Winlogon");
543  Status = LsaRegisterLogonProcess(&ProcessName, &LsaHandle, &Mode);
545  {
546  /* Add the 'SeTcbPrivilege' privilege and try again */
548  if (!NT_SUCCESS(Status))
549  {
550  ERR("RtlAdjustPrivilege() failed with error %lu\n", LsaNtStatusToWinError(Status));
551  return 1;
552  }
553 
554  Status = LsaRegisterLogonProcess(&ProcessName, &LsaHandle, &Mode);
555  }
556 
557  if (!NT_SUCCESS(Status))
558  {
559  ERR("LsaRegisterLogonProcess() failed with error %lu\n", LsaNtStatusToWinError(Status));
560  return 1;
561  }
562 
565  if (!NT_SUCCESS(Status))
566  {
567  ERR("LsaLookupAuthenticationPackage() failed with error %lu\n", LsaNtStatusToWinError(Status));
569  return 1;
570  }
571 #endif
572 
574 
575  /* Create a hidden window to get SAS notifications */
576  if (!InitializeSAS(WLSession))
577  {
578  ERR("WL: Failed to initialize SAS\n");
579  ExitProcess(2);
580  }
581 
582  // DisplayStatusMessage(Session, Session->WinlogonDesktop, IDS_PREPARENETWORKCONNECTIONS);
583  // DisplayStatusMessage(Session, Session->WinlogonDesktop, IDS_APPLYINGCOMPUTERSETTINGS);
584 
585  /* Display logged out screen */
588 
589  /* Check for pending setup */
590  if (GetSetupType() != 0)
591  {
592  /* Run setup and reboot when done */
593  TRACE("WL: Setup mode detected\n");
594  RunSetup();
595  }
596  else
597  {
599  }
600 
601  (void)LoadLibraryW(L"sfc_os.dll");
602 
603  /* Tell kernel that CurrentControlSet is good (needed
604  * to support Last good known configuration boot) */
606 
607  /* Message loop for the SAS window */
608  while (GetMessageW(&Msg, WLSession->SASWindow, 0, 0))
609  {
612  }
613 
615 
616  /* We never go there */
617 
618  return 0;
619 }
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
PWLSESSION WLSession
Definition: winlogon.c:20
#define MAKEINTRESOURCE
Definition: winuser.h:591
BOOL DisplayStatusMessage(IN PWLSESSION Session, IN HDESK hDesktop, IN UINT ResourceId)
Definition: winlogon.c:349
#define IN
Definition: typedefs.h:38
BOOL RemoveStatusMessage(IN PWLSESSION Session)
Definition: winlogon.c:370
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define WLX_WM_SAS
Definition: winwlx.h:71
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
Definition: dialog.c:2208
BOOL WINAPI RegisterLogonProcess(DWORD, BOOL)
Definition: logon.c:43
#define TRUE
Definition: types.h:120
struct _WLSESSION * PWLSESSION
#define IDOK
Definition: winuser.h:824
#define CloseHandle
Definition: compat.h:398
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define ERROR_SUCCESS
Definition: deptool.c:10
#define KEY_SET_VALUE
Definition: nt_native.h:1017
HDESK WinlogonDesktop
Definition: winlogon.h:224
_In_ ULONG Mode
Definition: hubbusif.h:303
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
NTSTATUS NTAPI NtRaiseHardError(IN NTSTATUS ErrorStatus, IN ULONG NumberOfParameters, IN ULONG UnicodeStringParameterMask, IN PULONG_PTR Parameters, IN ULONG ValidResponseOptions, OUT PULONG Response)
Definition: harderr.c:553
LPWSTR lpReserved
Definition: winbase.h:818
PBYTE lpReserved2
Definition: winbase.h:831
static INT_PTR CALLBACK GinaLoadFailedWindowProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: winlogon.c:383
#define KEY_READ
Definition: nt_native.h:1023
#define KLF_ACTIVATE
Definition: winuser.h:111
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
uint16_t * PWSTR
Definition: typedefs.h:54
const WCHAR * text
Definition: package.c:1827
#define HKEY_CURRENT_USER
Definition: winreg.h:11
HWND SASWindow
Definition: winlogon.h:220
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
#define CM_BOOT_FLAG_ACCEPTED
Definition: cmtypes.h:153
BOOL InitializeSAS(IN OUT PWLSESSION Session)
Definition: sas.c:1578
#define WARN(fmt,...)
Definition: debug.h:111
LONG NTSTATUS
Definition: precomp.h:26
#define CALLBACK
Definition: compat.h:27
static VOID UpdateTcpIpInformation(VOID)
Definition: winlogon.c:152
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
VOID WINAPI ExitProcess(IN UINT uExitCode)
Definition: proc.c:1487
#define KLF_NOTELLSHELL
Definition: winuser.h:116
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define ZeroMemory
Definition: winbase.h:1635
WORD cbReserved2
Definition: winbase.h:830
BOOL RunSetup(VOID)
Definition: setup.c:153
NTSYSAPI NTSTATUS NTAPI RtlAdjustPrivilege(_In_ ULONG Privilege, _In_ BOOLEAN NewValue, _In_ BOOLEAN ForThread, _Out_ PBOOLEAN OldValue)
HWND WINAPI SetFocus(_In_opt_ HWND)
UINT_PTR WPARAM
Definition: windef.h:207
NTSTATUS HandleShutdown(IN OUT PWLSESSION Session, IN DWORD wlxAction)
Definition: sas.c:1039
int32_t INT_PTR
Definition: typedefs.h:62
DWORD GetSetupType(VOID)
Definition: setup.c:16
char * LPSTR
Definition: xmlstorage.h:182
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651
HANDLE WINAPI DECLSPEC_HOTPATCH OpenEventW(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCWSTR lpName)
Definition: synch.c:682
static HANDLE hEvent
Definition: comm.c:54
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
static VOID WaitForLsass(VOID)
Definition: winlogon.c:115
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
HANDLE LsaHandle
Definition: logon.c:17
BOOL InitNotifications(VOID)
Definition: notify.c:200
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define STATUS_PORT_CONNECTION_REFUSED
Definition: ntstatus.h:287
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HINSTANCE hInstance
Definition: charmap.c:20
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
struct @1576 Msg[]
unsigned char * LPBYTE
Definition: typedefs.h:52
#define SE_TCB_PRIVILEGE
Definition: security.c:661
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
static BOOL InitKeyboardLayouts(VOID)
Definition: winlogon.c:285
#define IDS_REACTOSISSTARTINGUP
Definition: resource.h:35
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
NTSTATUS NTAPI NtInitializeRegistry(IN USHORT Flag)
Definition: ntapi.c:1298
struct _WLSESSION WLSESSION
LPWSTR lpDesktop
Definition: winbase.h:819
BOOL GinaInit(IN OUT PWLSESSION Session)
Definition: wlx.c:919
int WINAPI WinMain(IN HINSTANCE hInstance, IN HINSTANCE hPrevInstance, IN LPSTR lpCmdLine, IN int nShowCmd)
Definition: winlogon.c:431
HINSTANCE hAppInstance
Definition: winlogon.c:19
unsigned char BOOLEAN
#define LoadLibraryW(x)
Definition: compat.h:404
smooth NULL
Definition: ftsmooth.c:416
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:652
LPWSTR lpTitle
Definition: winbase.h:820
LONG_PTR LPARAM
Definition: windef.h:208
NTSYSAPI NTSTATUS __cdecl RtlSetThreadIsCritical(_In_ BOOLEAN NewValue, _Out_opt_ PBOOLEAN OldValue, _In_ BOOLEAN NeedBreaks)
ULONG LSA_OPERATIONAL_MODE
Definition: ntsecapi.h:364
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
Definition: proc.c:4593
#define KLF_SUBSTITUTE_OK
Definition: winuser.h:112
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4895
#define MICROSOFT_KERBEROS_NAME_W
Definition: ntsecapi.h:25
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
DWORD cb
Definition: winbase.h:817
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4116
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
ULONG WINAPI LsaNtStatusToWinError(IN NTSTATUS Status)
Definition: lsa.c:1129
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define WM_CLOSE
Definition: winuser.h:1603
#define MAX_PATH
Definition: compat.h:26
#define swprintf(buf, format,...)
Definition: sprintf.c:56
#define WINAPI
Definition: msvc.h:8
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD DialogTimeout
Definition: winlogon.h:230
#define LockWorkstation(Session)
Definition: winlogon.h:211
#define DialogBoxParam
Definition: winuser.h:5665
NTSTATUS NTAPI LsaDeregisterLogonProcess(HANDLE)
static const WCHAR L[]
Definition: oid.c:1250
BOOL StartRpcServer(VOID)
Definition: rpcserver.c:19
#define WLX_SAS_TYPE_CTRL_ALT_DEL
Definition: winwlx.h:36
static BOOL StartServicesManager(VOID)
Definition: winlogon.c:26
VOID CleanupNotifications(VOID)
Definition: notify.c:384
GLenum GLsizei len
Definition: glext.h:6722
#define IDD_GINALOADFAILED
Definition: resource.h:12
ULONG AuthenticationPackage
Definition: logon.c:18
static BOOL StartLsass(VOID)
Definition: winlogon.c:74
#define WM_COMMAND
Definition: winuser.h:1722
#define SYNCHRONIZE
Definition: nt_native.h:61
#define ERROR_MORE_DATA
Definition: dderror.h:13
Status
Definition: gdiplustypes.h:24
#define KLF_REPLACELANG
Definition: winuser.h:115
#define ERR(fmt,...)
Definition: debug.h:109
VOID CallNotificationDlls(PWLSESSION pSession, NOTIFICATION_TYPE Type)
Definition: notify.c:304
#define IDC_GINALOADFAILED
Definition: resource.h:13
NTSTATUS NTAPI LsaLookupAuthenticationPackage(HANDLE, PLSA_STRING, PULONG)
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
#define HeapReAlloc
Definition: compat.h:393
#define KLF_SETFORPROCESS
Definition: winuser.h:117
HKL WINAPI LoadKeyboardLayoutW(_In_ LPCWSTR, _In_ UINT)
#define DETACHED_PROCESS
Definition: winbase.h:179
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL CreateWindowStationAndDesktops(IN OUT PWLSESSION Session)
Definition: wlx.c:1121
NTSYSAPI NTSTATUS __cdecl RtlSetProcessIsCritical(_In_ BOOLEAN NewValue, _Out_opt_ PBOOLEAN OldValue, _In_ BOOLEAN NeedBreaks)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLuint res
Definition: glext.h:9613
#define WLX_SAS_ACTION_SHUTDOWN_REBOOT
Definition: winwlx.h:63
unsigned int ULONG
Definition: retypes.h:1
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3366
NTSTATUS NTAPI LsaRegisterLogonProcess(PLSA_STRING, PHANDLE, PLSA_OPERATIONAL_MODE)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
DWORD dwFlags
Definition: winbase.h:828
#define ERROR_ALREADY_EXISTS
Definition: disk.h:80
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define IDCANCEL
Definition: winuser.h:825
#define INFINITE
Definition: serial.h:102
#define STATUS_SYSTEM_PROCESS_TERMINATED
Definition: ntstatus.h:656
VOID InitDialogListHead(VOID)
Definition: wlx.c:45
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define HeapFree(x, y, z)
Definition: compat.h:394
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54
#define WLX_VERSION_1_3
Definition: winwlx.h:31
DWORD WINAPI GetCurrentProcessId(VOID)
Definition: proc.c:1158
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define REG_SZ
Definition: layer.c:22
LOGON_STATE LogonState
Definition: winlogon.h:229