ReactOS  0.4.15-dev-4614-ga5a6101
wlx.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/wlx.c
5  * PURPOSE: Logon
6  * PROGRAMMERS: Thomas Weidenmueller (w3seek@users.sourceforge.net)
7  * Ge van Geldorp (gvg@reactos.com)
8  * Hervé Poussineau (hpoussin@reactos.org)
9  */
10 
11 /* INCLUDES *****************************************************************/
12 
13 #include "winlogon.h"
14 
15 typedef struct _DIALOG_LIST_ENTRY
16 {
22 
23 /* GLOBALS ******************************************************************/
24 
25 //static UINT_PTR IdTimer;
27 
28 /* FUNCTIONS ****************************************************************/
29 
30 VOID
32 {
34 }
35 
36 
37 static
40 {
41  PDIALOG_LIST_ENTRY ListEntry;
42 
43  ListEntry = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DIALOG_LIST_ENTRY));
44  if (ListEntry == NULL)
45  return NULL;
46 
47  TRACE("Add entry %p\n", ListEntry);
48 
50  &ListEntry->Entry);
51 
52  return ListEntry;
53 }
54 
55 
56 static
57 VOID
59 {
60  TRACE("Remove entry %p\n", ListEntry);
61 
62  RemoveEntryList(&ListEntry->Entry);
63  RtlFreeHeap(RtlGetProcessHeap(), 0, ListEntry);
64 }
65 
66 
67 static
70 {
71  PDIALOG_LIST_ENTRY Current;
72  PLIST_ENTRY ListEntry;
73 
74  ListEntry = DialogListHead.Flink;
75  while (ListEntry != &DialogListHead)
76  {
77  Current = CONTAINING_RECORD(ListEntry,
79  Entry);
80  if (Current->hWnd == hwndDlg)
81  {
82  TRACE("Found entry: %p\n", Current);
83  return Current;
84  }
85 
86  ListEntry = ListEntry->Flink;
87  }
88 
89  TRACE("Found no entry!\n");
90  return NULL;
91 }
92 
93 
94 VOID
96 {
97  PDIALOG_LIST_ENTRY Current;
98  PLIST_ENTRY ListEntry;
99 
100  ListEntry = DialogListHead.Flink;
101  while (ListEntry != &DialogListHead)
102  {
103  Current = CONTAINING_RECORD(ListEntry,
105  Entry);
106 
107  PostMessage(Current->hWnd, WLX_WM_SAS, 0, 0);
108 
109  ListEntry = ListEntry->Flink;
110  }
111 }
112 
113 
114 static
115 INT_PTR
116 CALLBACK
118  IN HWND hwndDlg,
119  IN UINT uMsg,
120  IN WPARAM wParam,
121  IN LPARAM lParam)
122 {
123  PDIALOG_LIST_ENTRY ListEntry;
124  INT_PTR ret;
125 
126  if (uMsg == WM_INITDIALOG)
127  {
128  ListEntry = (PDIALOG_LIST_ENTRY)lParam;
129 
130  TRACE("Set dialog handle: %p\n", hwndDlg);
131  ListEntry->hWnd = hwndDlg;
132  lParam = ListEntry->lParam;
133 // SetTopTimeout(hWnd);
134  }
135  else
136  {
137  ListEntry = GetDialogListEntry(hwndDlg);
138  if (ListEntry == NULL)
139  return FALSE;
140  }
141 
142  if (uMsg == WLX_WM_SAS)
143  {
144  EndDialog(hwndDlg, WLX_DLG_SAS);
145  return 0;
146  }
147 
148  ret = ListEntry->DlgProc(hwndDlg, uMsg, wParam, lParam);
149 
150  return ret;
151 
152 /*
153  if (uMsg == WM_TIMER && (UINT_PTR)wParam == IdTimer)
154  {
155  EndDialog(hwndDlg, -1);
156  KillTimer(hwndDlg, IdTimer);
157  return TRUE;
158  }
159  else if (uMsg == WM_INITDIALOG)
160  {
161  IdTimer = SetTimer(hwndDlg, 0, WLSession->DialogTimeout * 1000, NULL);
162  return PreviousWindowProc(hwndDlg, uMsg, wParam, lParam);
163  }
164  else if (uMsg == WM_NCDESTROY)
165  {
166  BOOL ret;
167  ret = PreviousWindowProc(hwndDlg, uMsg, wParam, lParam);
168  PreviousWindowProc = NULL;
169  return ret;
170  }
171  else
172  {
173  return PreviousWindowProc(hwndDlg, uMsg, wParam, lParam);
174  }
175 */
176 }
177 
178 /*
179  * @implemented
180  */
181 VOID
182 WINAPI
184  HANDLE hWlx)
185 {
186  ULONG_PTR OldValue;
187 
188  TRACE("WlxUseCtrlAltDel()\n");
189 
190  WlxSetOption(hWlx, WLX_OPTION_USE_CTRL_ALT_DEL, TRUE, &OldValue);
191 }
192 
193 /*
194  * @implemented
195  */
196 VOID
197 WINAPI
199  HANDLE hWlx,
200  PVOID pWlxContext)
201 {
202  ULONG_PTR OldValue;
203 
204  TRACE("WlxSetContextPointer(%p)\n", pWlxContext);
205 
206  WlxSetOption(hWlx, WLX_OPTION_CONTEXT_POINTER, (ULONG_PTR)pWlxContext, &OldValue);
207 }
208 
209 /*
210  * @implemented
211  */
212 VOID
213 WINAPI
215  HANDLE hWlx,
216  DWORD dwSasType)
217 {
218  PWLSESSION Session = (PWLSESSION)hWlx;
219 
220  TRACE("WlxSasNotify(0x%lx)\n", dwSasType);
221 
222  if (dwSasType == WLX_SAS_TYPE_CTRL_ALT_DEL || dwSasType > WLX_SAS_TYPE_MAX_MSFT_VALUE)
223  PostMessageW(Session->SASWindow, WLX_WM_SAS, dwSasType, 0);
224 }
225 
226 /*
227  * @implemented
228  */
229 BOOL
230 WINAPI
232  HANDLE hWlx,
233  DWORD Timeout)
234 {
235  PWLSESSION Session = (PWLSESSION)hWlx;
236 
237  TRACE("WlxSetTimeout(%lu)\n", Timeout);
238 
239  Session->DialogTimeout = Timeout;
240  return TRUE;
241 }
242 
243 /*
244  * @unimplemented
245  */
246 int
247 WINAPI
249  HANDLE hWlx,
250  HANDLE hToken,
252  HANDLE hThread)
253 {
255  UNREFERENCED_PARAMETER(hToken);
258 
260  return 0;
261 }
262 
263 /*
264  * @implemented
265  */
266 int
267 WINAPI
269  HANDLE hWlx,
270  HWND hwndOwner,
271  LPWSTR lpszText,
272  LPWSTR lpszTitle,
273  UINT fuStyle)
274 {
276 
277  TRACE("WlxMessageBox()\n");
278  /* FIXME: Provide a custom window proc to be able to handle timeout */
279  return MessageBoxW(hwndOwner, lpszText, lpszTitle, fuStyle);
280 }
281 
282 /*
283  * @implemented
284  */
285 int
286 WINAPI
288  HANDLE hWlx,
289  HANDLE hInst,
290  LPWSTR lpszTemplate,
291  HWND hwndOwner,
292  DLGPROC dlgprc)
293 {
295 
296  TRACE("WlxDialogBox()\n");
297 
298  return (int)WlxDialogBoxParam(hWlx, hInst, lpszTemplate, hwndOwner, dlgprc, 0);
299 }
300 
301 /*
302  * @implemented
303  */
304 int
305 WINAPI
307  HANDLE hWlx,
308  HANDLE hInst,
309  LPWSTR lpszTemplate,
310  HWND hwndOwner,
311  DLGPROC dlgprc,
312  LPARAM dwInitParam)
313 {
314  PDIALOG_LIST_ENTRY ListEntry;
315  int ret;
316 
318 
319  TRACE("WlxDialogBoxParam()\n");
320 
321  ListEntry = AddDialogListEntry();
322  if (ListEntry == NULL)
323  return -1;
324 
325  ListEntry->DlgProc = dlgprc;
326  ListEntry->lParam = dwInitParam;
327 
328  ret = (int)DialogBoxParamW(hInst, lpszTemplate, hwndOwner, DefaultWlxWindowProc, (LPARAM)ListEntry);
329 
330  RemoveDialogListEntry(ListEntry);
331 
332  return ret;
333 }
334 
335 /*
336  * @implemented
337  */
338 int
339 WINAPI
341  HANDLE hWlx,
342  HANDLE hInst,
343  LPCDLGTEMPLATE hDialogTemplate,
344  HWND hwndOwner,
345  DLGPROC dlgprc)
346 {
348 
349  TRACE("WlxDialogBoxIndirect()\n");
350 
351  return (int)WlxDialogBoxIndirectParam(hWlx, hInst, hDialogTemplate, hwndOwner, dlgprc, 0);
352 }
353 
354 /*
355  * @implemented
356  */
357 int
358 WINAPI
360  HANDLE hWlx,
361  HANDLE hInst,
362  LPCDLGTEMPLATE hDialogTemplate,
363  HWND hwndOwner,
364  DLGPROC dlgprc,
365  LPARAM dwInitParam)
366 {
367  PDIALOG_LIST_ENTRY ListEntry;
368  int ret;
369 
371 
372  TRACE("WlxDialogBoxIndirectParam()\n");
373 
374  ListEntry = AddDialogListEntry();
375  if (ListEntry == NULL)
376  return -1;
377 
378  ListEntry->DlgProc = dlgprc;
379  ListEntry->lParam = dwInitParam;
380 
381  ret = (int)DialogBoxIndirectParamW(hInst, hDialogTemplate, hwndOwner, DefaultWlxWindowProc, (LPARAM)ListEntry);
382 
383  RemoveDialogListEntry(ListEntry);
384 
385  return ret;
386 }
387 
388 /*
389  * @implemented
390  */
391 int
392 WINAPI
394  HANDLE hWlx)
395 {
396  PWLSESSION Session = (PWLSESSION)hWlx;
397 
398  TRACE("WlxSwitchDesktopToUser()\n");
399 
400  return (int)SwitchDesktop(Session->ApplicationDesktop);
401 }
402 
403 /*
404  * @implemented
405  */
406 int
407 WINAPI
409  HANDLE hWlx)
410 {
411  PWLSESSION Session = (PWLSESSION)hWlx;
412 
413  TRACE("WlxSwitchDesktopToWinlogon()\n");
414 
415  return (int)SwitchDesktop(Session->WinlogonDesktop);
416 }
417 
418 /*
419  * @unimplemented
420  */
421 int
422 WINAPI
424  HANDLE hWlx,
425  PWLX_MPR_NOTIFY_INFO pMprInfo,
426  DWORD dwChangeInfo)
427 {
429  UNREFERENCED_PARAMETER(pMprInfo);
430  UNREFERENCED_PARAMETER(dwChangeInfo);
431 
433  return 0;
434 }
435 
436 /*
437  * @unimplemented
438  */
439 BOOL
440 WINAPI
442  HANDLE hWlx,
443  PWLX_DESKTOP* ppDesktop)
444 {
446  UNREFERENCED_PARAMETER(ppDesktop);
447 
449  return FALSE;
450 }
451 
452 /*
453  * @unimplemented
454  */
455 BOOL
456 WINAPI
458  HANDLE hWlx,
459  PWLX_DESKTOP pDesktop)
460 {
462  UNREFERENCED_PARAMETER(pDesktop);
463 
465  return FALSE;
466 }
467 
468 /*
469  * @unimplemented
470  */
471 BOOL
472 WINAPI
474  HANDLE hWlx,
475  HANDLE hToken,
476  DWORD Flags,
477  PWSTR pszDesktopName,
478  PWLX_DESKTOP* ppDesktop)
479 {
481  UNREFERENCED_PARAMETER(hToken);
483  UNREFERENCED_PARAMETER(pszDesktopName);
484  UNREFERENCED_PARAMETER(ppDesktop);
485 
487  return FALSE;
488 }
489 
490 /*
491  * @unimplemented
492  */
493 int
494 WINAPI
496  HANDLE hWlx,
497  PWLX_MPR_NOTIFY_INFO pMprInfo,
498  DWORD dwChangeInfo,
499  PWSTR ProviderName,
500  PVOID Reserved)
501 {
503  UNREFERENCED_PARAMETER(pMprInfo);
504  UNREFERENCED_PARAMETER(dwChangeInfo);
505  UNREFERENCED_PARAMETER(ProviderName);
507 
509  return 0;
510 }
511 
512 /*
513  * @unimplemented
514  */
515 BOOL
516 WINAPI
518  HANDLE hWlx,
519  PWLX_DESKTOP pDesktop,
520  HANDLE hToken)
521 {
523  UNREFERENCED_PARAMETER(pDesktop);
524  UNREFERENCED_PARAMETER(hToken);
525 
527  return FALSE;
528 }
529 
530 /*
531  * @implemented
532  */
533 BOOL
534 WINAPI
536  HANDLE hWlx,
537  DWORD Option,
539  ULONG_PTR* OldValue)
540 {
541  PWLSESSION Session = (PWLSESSION)hWlx;
542 
543  TRACE("WlxSetOption(%lu)\n", Option);
544 
545  switch (Option)
546  {
548  *OldValue = (ULONG_PTR)Session->Gina.UseCtrlAltDelete;
549  Session->Gina.UseCtrlAltDelete = (BOOL)Value;
550  return TRUE;
552  *OldValue = (ULONG_PTR)Session->Gina.Context;
553  Session->Gina.Context = (PVOID)Value;
554  return TRUE;
557  return FALSE;
558  }
559 
560  return FALSE;
561 }
562 
563 /*
564  * @implemented
565  */
566 BOOL
567 WINAPI
569  HANDLE hWlx,
570  DWORD Option,
571  ULONG_PTR* Value)
572 {
573  PWLSESSION Session = (PWLSESSION)hWlx;
574 
575  TRACE("WlxGetOption(%lu)\n", Option);
576 
577  switch (Option)
578  {
580  *Value = (ULONG_PTR)Session->Gina.UseCtrlAltDelete;
581  return TRUE;
583  {
584  *Value = (ULONG_PTR)Session->Gina.Context;
585  return TRUE;
586  }
591  return FALSE;
593  {
594  switch (Session->Gina.Version)
595  {
596  case WLX_VERSION_1_0:
597  *Value = sizeof(WLX_DISPATCH_VERSION_1_0);
598  break;
599  case WLX_VERSION_1_1:
600  *Value = sizeof(WLX_DISPATCH_VERSION_1_1);
601  break;
602  case WLX_VERSION_1_2:
603  *Value = sizeof(WLX_DISPATCH_VERSION_1_2);
604  break;
605  case WLX_VERSION_1_3:
606  *Value = sizeof(WLX_DISPATCH_VERSION_1_3);
607  break;
608  case WLX_VERSION_1_4:
609  *Value = sizeof(WLX_DISPATCH_VERSION_1_4);
610  break;
611  default:
612  return FALSE;
613  }
614  return TRUE;
615  }
616  }
617 
618  return FALSE;
619 }
620 
621 /*
622  * @unimplemented
623  */
624 VOID
625 WINAPI
627  HANDLE hWlx)
628 {
630 
632 }
633 
634 /*
635  * @unimplemented
636  */
637 BOOL
638 WINAPI
641 {
642  UNREFERENCED_PARAMETER(pCred);
643 
645  return FALSE;
646 }
647 
648 /*
649  * @unimplemented
650  */
651 BOOL
652 WINAPI
655 {
656  UNREFERENCED_PARAMETER(pCred);
657 
659  return FALSE;
660 }
661 
662 /*
663  * @unimplemented
664  */
665 BOOL
666 WINAPI
668 {
670  return FALSE;
671 }
672 
673 /*
674  * @unimplemented
675  */
676 DWORD
677 WINAPI
679  HANDLE hWlx,
681  WCHAR* UserName,
682  WCHAR* Domain)
683 {
685  UNREFERENCED_PARAMETER(pTSData);
686  UNREFERENCED_PARAMETER(UserName);
687  UNREFERENCED_PARAMETER(Domain);
688 
690  return 0;
691 }
692 
693 /*
694  * @unimplemented
695  */
696 DWORD
697 WINAPI
700 {
701  UNREFERENCED_PARAMETER(pCred);
702 
704  return 0;
705 }
706 
707 /*
708  * @unimplemented
709  */
710 BOOL
711 WINAPI
714 {
715  UNREFERENCED_PARAMETER(pCred);
716 
718  return FALSE;
719 }
720 
721 static
725  WlxSasNotify,
729  WlxDialogBox,
741  WlxSetOption,
742  WlxGetOption,
750 };
751 
752 /******************************************************************************/
753 
754 static
755 BOOL
757  OUT LPWSTR Path,
758  IN DWORD Len)
759 {
760  LONG Status;
761  DWORD Type, Size;
762  HKEY hKey;
763 
766  L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon",
767  0,
769  &hKey);
770  if (Status != ERROR_SUCCESS)
771  {
772  /* Default value */
773  wcsncpy(Path, L"msgina.dll", Len);
774  return TRUE;
775  }
776 
777  Size = Len * sizeof(WCHAR);
779  hKey,
780  L"GinaDLL",
781  NULL,
782  &Type,
783  (LPBYTE)Path,
784  &Size);
785  if (Status != ERROR_SUCCESS || Type != REG_SZ || Size == 0)
786  wcsncpy(Path, L"msgina.dll", Len);
787  RegCloseKey(hKey);
788  return TRUE;
789 }
790 
791 static
792 BOOL
793 WINAPI
795  IN PVOID pWlxContext,
796  IN OUT BOOL *pSecure)
797 {
798  if (*pSecure)
799  *pSecure = WLSession->Gina.Functions.WlxIsLogoffOk(pWlxContext);
800  return TRUE;
801 }
802 
803 static
804 BOOL
806  IN OUT PGINAFUNCTIONS Functions,
807  OUT DWORD *DllVersion,
808  OUT HMODULE *GinaInstance)
809 {
810  HMODULE hGina = NULL;
811  WCHAR GinaDll[MAX_PATH + 1];
812  BOOL ret = FALSE;
813 
814  GinaDll[0] = '\0';
815  if (!GetGinaPath(GinaDll, MAX_PATH))
816  goto cleanup;
817  /* Terminate string */
818  GinaDll[MAX_PATH] = '\0';
819 
820  hGina = LoadLibraryW(GinaDll);
821  if (!hGina)
822  goto cleanup;
823 
824  Functions->WlxNegotiate = (PFWLXNEGOTIATE)GetProcAddress(hGina, "WlxNegotiate");
825  Functions->WlxInitialize = (PFWLXINITIALIZE)GetProcAddress(hGina, "WlxInitialize");
826 
827  if (!Functions->WlxInitialize)
828  goto cleanup;
829 
830  if (!Functions->WlxNegotiate)
831  {
832  /* Assume current version */
833  *DllVersion = WLX_CURRENT_VERSION;
834  }
835  else
836  {
837  TRACE("About to negotiate with Gina %S. Winlogon uses version %x\n",
838  GinaDll, WLX_CURRENT_VERSION);
839  if (!Functions->WlxNegotiate(WLX_CURRENT_VERSION, DllVersion))
840  goto cleanup;
841  }
842 
843  TRACE("Gina uses WLX_VERSION %lx\n", *DllVersion);
844 
845  if (*DllVersion >= WLX_VERSION_1_0)
846  {
847  Functions->WlxActivateUserShell = (PFWLXACTIVATEUSERSHELL)GetProcAddress(hGina, "WlxActivateUserShell");
848  if (!Functions->WlxActivateUserShell) goto cleanup;
849  Functions->WlxDisplayLockedNotice = (PFWLXDISPLAYLOCKEDNOTICE)GetProcAddress(hGina, "WlxDisplayLockedNotice");
850  if (!Functions->WlxDisplayLockedNotice) goto cleanup;
851  Functions->WlxDisplaySASNotice = (PFWLXDISPLAYSASNOTICE)GetProcAddress(hGina, "WlxDisplaySASNotice");
852  if (!Functions->WlxDisplaySASNotice) goto cleanup;
853  Functions->WlxIsLockOk = (PFWLXISLOCKOK)GetProcAddress(hGina, "WlxIsLockOk");
854  if (!Functions->WlxIsLockOk) goto cleanup;
855  Functions->WlxIsLogoffOk = (PFWLXISLOGOFFOK)GetProcAddress(hGina, "WlxIsLogoffOk");
856  if (!Functions->WlxIsLogoffOk) goto cleanup;
857  Functions->WlxLoggedOnSAS = (PFWLXLOGGEDONSAS)GetProcAddress(hGina, "WlxLoggedOnSAS");
858  if (!Functions->WlxLoggedOnSAS) goto cleanup;
859  Functions->WlxLoggedOutSAS = (PFWLXLOGGEDOUTSAS)GetProcAddress(hGina, "WlxLoggedOutSAS");
860  if (!Functions->WlxLoggedOutSAS) goto cleanup;
861  Functions->WlxLogoff = (PFWLXLOGOFF)GetProcAddress(hGina, "WlxLogoff");
862  if (!Functions->WlxLogoff) goto cleanup;
863  Functions->WlxShutdown = (PFWLXSHUTDOWN)GetProcAddress(hGina, "WlxShutdown");
864  if (!Functions->WlxShutdown) goto cleanup;
865  Functions->WlxWkstaLockedSAS = (PFWLXWKSTALOCKEDSAS)GetProcAddress(hGina, "WlxWkstaLockedSAS");
866  if (!Functions->WlxWkstaLockedSAS) goto cleanup;
867  }
868 
869  if (*DllVersion >= WLX_VERSION_1_1)
870  {
871  Functions->WlxScreenSaverNotify = (PFWLXSCREENSAVERNOTIFY)GetProcAddress(hGina, "WlxScreenSaverNotify");
872  Functions->WlxStartApplication = (PFWLXSTARTAPPLICATION)GetProcAddress(hGina, "WlxStartApplication");
873  }
874 
875  if (*DllVersion >= WLX_VERSION_1_3)
876  {
877  Functions->WlxDisplayStatusMessage = (PFWLXDISPLAYSTATUSMESSAGE)GetProcAddress(hGina, "WlxDisplayStatusMessage");
878  if (!Functions->WlxDisplayStatusMessage) goto cleanup;
879  Functions->WlxGetStatusMessage = (PFWLXGETSTATUSMESSAGE)GetProcAddress(hGina, "WlxGetStatusMessage");
880  if (!Functions->WlxGetStatusMessage) goto cleanup;
881  Functions->WlxNetworkProviderLoad = (PFWLXNETWORKPROVIDERLOAD)GetProcAddress(hGina, "WlxNetworkProviderLoad");
882  if (!Functions->WlxNetworkProviderLoad) goto cleanup;
883  Functions->WlxRemoveStatusMessage = (PFWLXREMOVESTATUSMESSAGE)GetProcAddress(hGina, "WlxRemoveStatusMessage");
884  if (!Functions->WlxRemoveStatusMessage) goto cleanup;
885  }
886 
887  /* Provide some default functions */
888  if (!Functions->WlxScreenSaverNotify)
889  Functions->WlxScreenSaverNotify = DefaultWlxScreenSaverNotify;
890 
891  ret = TRUE;
892 
893 cleanup:
894  if (!ret)
895  {
896  if (hGina)
897  FreeLibrary(hGina);
898  }
899  else
900  *GinaInstance = hGina;
901  return ret;
902 }
903 
904 BOOL
906  IN OUT PWLSESSION Session)
907 {
908  DWORD GinaDllVersion;
909 
910  if (!LoadGina(&Session->Gina.Functions, &GinaDllVersion, &Session->Gina.hDllInstance))
911  return FALSE;
912 
913  Session->Gina.Context = NULL;
914  Session->Gina.Version = GinaDllVersion;
915  Session->Gina.UseCtrlAltDelete = FALSE;
916  Session->SuppressStatus = FALSE;
917 
918  TRACE("Calling WlxInitialize(\"%S\")\n", Session->InteractiveWindowStationName);
919  return Session->Gina.Functions.WlxInitialize(
920  Session->InteractiveWindowStationName,
921  (HANDLE)Session,
922  NULL,
924  &Session->Gina.Context);
925 }
926 
927 BOOL
929  _Inout_ PWLSESSION Session)
930 {
931  SECURITY_ATTRIBUTES WinstaSecurity;
932  SECURITY_ATTRIBUTES ApplicationDesktopSecurity;
933  SECURITY_ATTRIBUTES WinlogonDesktopSecurity;
934  SECURITY_ATTRIBUTES ScreenSaverDesktopSecurity;
935  PSECURITY_DESCRIPTOR WlWinstaSecurityDescriptor;
936  PSECURITY_DESCRIPTOR WlApplicationDesktopSecurityDescriptor;
937  PSECURITY_DESCRIPTOR WlWinlogonDesktopSecurityDescriptor;
938  PSECURITY_DESCRIPTOR WlScreenSaverDesktopSecurityDescriptor;
939  BOOL ret = FALSE;
940 
941  if (!CreateWinstaSecurity(&WlWinstaSecurityDescriptor))
942  {
943  ERR("WL: Failed to create winsta security!\n");
944  return ret;
945  }
946 
947  WinstaSecurity.nLength = sizeof(SECURITY_ATTRIBUTES);
948  WinstaSecurity.lpSecurityDescriptor = WlWinstaSecurityDescriptor;
949  WinstaSecurity.bInheritHandle = TRUE;
950 
951  if (!CreateApplicationDesktopSecurity(&WlApplicationDesktopSecurityDescriptor))
952  {
953  ERR("WL: Failed to create application desktop security!\n");
954  goto cleanup;
955  }
956 
957  ApplicationDesktopSecurity.nLength = sizeof(SECURITY_ATTRIBUTES);
958  ApplicationDesktopSecurity.lpSecurityDescriptor = WlApplicationDesktopSecurityDescriptor;
959  ApplicationDesktopSecurity.bInheritHandle = TRUE;
960 
961  if (!CreateWinlogonDesktopSecurity(&WlWinlogonDesktopSecurityDescriptor))
962  {
963  ERR("WL: Failed to create winlogon desktop security!\n");
964  goto cleanup;
965  }
966 
967  WinlogonDesktopSecurity.nLength = sizeof(SECURITY_ATTRIBUTES);
968  WinlogonDesktopSecurity.lpSecurityDescriptor = WlWinlogonDesktopSecurityDescriptor;
969  WinlogonDesktopSecurity.bInheritHandle = FALSE;
970 
971  if (!CreateScreenSaverSecurity(&WlScreenSaverDesktopSecurityDescriptor))
972  {
973  ERR("WL: Failed to create winlogon desktop security!\n");
974  goto cleanup;
975  }
976 
977  ScreenSaverDesktopSecurity.nLength = sizeof(SECURITY_ATTRIBUTES);
978  ScreenSaverDesktopSecurity.lpSecurityDescriptor = WlScreenSaverDesktopSecurityDescriptor;
979  ScreenSaverDesktopSecurity.bInheritHandle = TRUE;
980 
981  /*
982  * Create the interactive window station
983  */
984  Session->InteractiveWindowStationName = L"WinSta0";
985  Session->InteractiveWindowStation = CreateWindowStationW(
986  Session->InteractiveWindowStationName,
987  0,
989  &WinstaSecurity);
990  if (!Session->InteractiveWindowStation)
991  {
992  ERR("WL: Failed to create window station (%lu)\n", GetLastError());
993  goto cleanup;
994  }
995 
996  if (!SetProcessWindowStation(Session->InteractiveWindowStation))
997  {
998  ERR("WL: SetProcessWindowStation() failed (error %lu)\n", GetLastError());
999  goto cleanup;
1000  }
1001 
1002  /*
1003  * Create the application desktop
1004  */
1005  Session->ApplicationDesktop = CreateDesktopW(
1006  L"Default",
1007  NULL,
1008  NULL,
1009  0, /* FIXME: Add DF_ALLOWOTHERACCOUNTHOOK flag? */
1011  &ApplicationDesktopSecurity);
1012  if (!Session->ApplicationDesktop)
1013  {
1014  ERR("WL: Failed to create Default desktop (%lu)\n", GetLastError());
1015  goto cleanup;
1016  }
1017 
1018  /*
1019  * Create the winlogon desktop
1020  */
1021  Session->WinlogonDesktop = CreateDesktopW(
1022  L"Winlogon",
1023  NULL,
1024  NULL,
1025  0,
1027  &WinlogonDesktopSecurity);
1028  if (!Session->WinlogonDesktop)
1029  {
1030  ERR("WL: Failed to create Winlogon desktop (%lu)\n", GetLastError());
1031  goto cleanup;
1032  }
1033 
1034  /*
1035  * Create the screen saver desktop
1036  */
1037  Session->ScreenSaverDesktop = CreateDesktopW(
1038  L"Screen-Saver",
1039  NULL,
1040  NULL,
1041  0,
1043  &ScreenSaverDesktopSecurity);
1044  if(!Session->ScreenSaverDesktop)
1045  {
1046  ERR("WL: Failed to create Screen-Saver desktop (%lu)\n", GetLastError());
1047  goto cleanup;
1048  }
1049 
1050  /*
1051  * Switch to winlogon desktop
1052  */
1053  if (!SetThreadDesktop(Session->WinlogonDesktop) ||
1054  !SwitchDesktop(Session->WinlogonDesktop))
1055  {
1056  ERR("WL: Cannot switch to Winlogon desktop (%lu)\n", GetLastError());
1057  goto cleanup;
1058  }
1059 
1060  SetWindowStationUser(Session->InteractiveWindowStation,
1061  &LuidNone, NULL, 0);
1062 
1063  ret = TRUE;
1064 
1065 cleanup:
1066  if (!ret)
1067  {
1068  if (Session->ApplicationDesktop)
1069  {
1070  CloseDesktop(Session->ApplicationDesktop);
1071  Session->ApplicationDesktop = NULL;
1072  }
1073  if (Session->WinlogonDesktop)
1074  {
1075  CloseDesktop(Session->WinlogonDesktop);
1076  Session->WinlogonDesktop = NULL;
1077  }
1078  if (Session->ScreenSaverDesktop)
1079  {
1080  CloseDesktop(Session->ScreenSaverDesktop);
1081  Session->ScreenSaverDesktop = NULL;
1082  }
1083  if (Session->InteractiveWindowStation)
1084  {
1085  CloseWindowStation(Session->InteractiveWindowStation);
1086  Session->InteractiveWindowStation = NULL;
1087  }
1088  if (WlWinstaSecurityDescriptor)
1089  {
1090  RtlFreeHeap(RtlGetProcessHeap(), 0, WlWinstaSecurityDescriptor);
1091  }
1092  if (WlApplicationDesktopSecurityDescriptor)
1093  {
1094  RtlFreeHeap(RtlGetProcessHeap(), 0, WlApplicationDesktopSecurityDescriptor);
1095  }
1096  if (WlWinlogonDesktopSecurityDescriptor)
1097  {
1098  RtlFreeHeap(RtlGetProcessHeap(), 0, WlWinlogonDesktopSecurityDescriptor);
1099  }
1100  if (WlScreenSaverDesktopSecurityDescriptor)
1101  {
1102  RtlFreeHeap(RtlGetProcessHeap(), 0, WlScreenSaverDesktopSecurityDescriptor);
1103  }
1104  }
1105 
1106  return ret;
1107 }
DLGPROC DlgProc
Definition: wlx.c:19
#define MAXIMUM_ALLOWED
Definition: nt_native.h:83
BOOL UseCtrlAltDelete
Definition: winlogon.h:126
PWLSESSION WLSession
Definition: winlogon.c:20
PVOID Context
Definition: winlogon.h:124
LPARAM lParam
Definition: wlx.c:20
#define IN
Definition: typedefs.h:39
#define WLX_WM_SAS
Definition: winwlx.h:71
int WINAPI WlxDialogBoxIndirectParam(HANDLE hWlx, HANDLE hInst, LPCDLGTEMPLATE hDialogTemplate, HWND hwndOwner, DLGPROC dlgprc, LPARAM dwInitParam)
Definition: wlx.c:359
BOOL WINAPI SetWindowStationUser(IN HWINSTA hWindowStation, IN PLUID pluid, IN PSID psid OPTIONAL, IN DWORD size)
Definition: winsta.c:419
int WINAPI WlxDialogBoxIndirect(HANDLE hWlx, HANDLE hInst, LPCDLGTEMPLATE hDialogTemplate, HWND hwndOwner, DLGPROC dlgprc)
Definition: wlx.c:340
struct _WLSESSION * PWLSESSION
PFWLXISLOGOFFOK WlxIsLogoffOk
Definition: winlogon.h:101
struct _WLX_DISPATCH_VERSION_1_0 WLX_DISPATCH_VERSION_1_0
static VOID RemoveDialogListEntry(PDIALOG_LIST_ENTRY ListEntry)
Definition: wlx.c:58
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
VOID WINAPI WlxWin31Migrate(HANDLE hWlx)
Definition: wlx.c:626
BOOL WINAPI WlxSetTimeout(HANDLE hWlx, DWORD Timeout)
Definition: wlx.c:231
#define _Inout_
Definition: ms_sal.h:378
#define ERROR_SUCCESS
Definition: deptool.c:10
static BOOL WINAPI DefaultWlxScreenSaverNotify(IN PVOID pWlxContext, IN OUT BOOL *pSecure)
Definition: wlx.c:794
HDESK WinlogonDesktop
Definition: winlogon.h:224
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
uint16_t * PWSTR
Definition: typedefs.h:56
FORCEINLINE VOID InsertHeadList(_Inout_ PLIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PLIST_ENTRY Entry)
Definition: rtlfuncs.h:201
BOOL CreateScreenSaverSecurity(_Out_ PSECURITY_DESCRIPTOR *ScreenSaverDesktopSd)
Creates a security descriptor for the screen saver desktop.
Definition: security.c:690
HWND SASWindow
Definition: winlogon.h:220
BOOL(WINAPI * PFWLXSCREENSAVERNOTIFY)(PVOID, BOOL *)
Definition: winlogon.h:77
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:606
#define CALLBACK
Definition: compat.h:35
BOOL(WINAPI * PFWLXDISPLAYSTATUSMESSAGE)(PVOID, HDESK, DWORD, PWSTR, PWSTR)
Definition: winlogon.h:83
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1040
int WINAPI WlxAssignShellProtection(HANDLE hWlx, HANDLE hToken, HANDLE hProcess, HANDLE hThread)
Definition: wlx.c:248
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:70
LIST_ENTRY Entry
Definition: wlx.c:17
#define WLX_OPTION_DISPATCH_TABLE_SIZE
Definition: winwlx.h:331
BOOL WINAPI SetProcessWindowStation(_In_ HWINSTA)
UINT_PTR WPARAM
Definition: windef.h:207
int32_t INT_PTR
Definition: typedefs.h:64
LUID LuidNone
Definition: sas.c:47
static INT_PTR CALLBACK DefaultWlxWindowProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: wlx.c:117
int(WINAPI * PFWLXLOGGEDONSAS)(PVOID, DWORD, PVOID)
Definition: winlogon.h:67
int(WINAPI * PFWLXWKSTALOCKEDSAS)(PVOID, DWORD)
Definition: winlogon.h:69
HDESK ApplicationDesktop
Definition: winlogon.h:223
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
VOID WINAPI WlxSetContextPointer(HANDLE hWlx, PVOID pWlxContext)
Definition: wlx.c:198
BOOL(WINAPI * PFWLXINITIALIZE)(LPWSTR, HANDLE, PVOID, PVOID, PVOID *)
Definition: winlogon.h:61
BOOL WINAPI SetThreadDesktop(_In_ HDESK)
uint32_t ULONG_PTR
Definition: typedefs.h:65
FORCEINLINE BOOLEAN RemoveEntryList(_In_ PLIST_ENTRY Entry)
Definition: rtlfuncs.h:105
BOOL CreateWinlogonDesktopSecurity(_Out_ PSECURITY_DESCRIPTOR *WinlogonDesktopSd)
Creates a security descriptor for the default Winlogon desktop. This descriptor serves as a security ...
Definition: security.c:541
#define L(x)
Definition: ntvdm.h:50
unsigned char * LPBYTE
Definition: typedefs.h:53
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
int WINAPI WlxDialogBox(HANDLE hWlx, HANDLE hInst, LPWSTR lpszTemplate, HWND hwndOwner, DLGPROC dlgprc)
Definition: wlx.c:287
BOOL(WINAPI * PFWLXREMOVESTATUSMESSAGE)(PVOID)
Definition: winlogon.h:85
VOID(WINAPI * PFWLXSHUTDOWN)(PVOID, DWORD)
Definition: winlogon.h:73
VOID WINAPI WlxSasNotify(HANDLE hWlx, DWORD dwSasType)
Definition: wlx.c:214
BOOL WINAPI WlxCloseUserDesktop(HANDLE hWlx, PWLX_DESKTOP pDesktop, HANDLE hToken)
Definition: wlx.c:517
BOOL WINAPI WlxGetSourceDesktop(HANDLE hWlx, PWLX_DESKTOP *ppDesktop)
Definition: wlx.c:441
BOOL CreateWindowStationAndDesktops(_Inout_ PWLSESSION Session)
Definition: wlx.c:928
#define WLX_OPTION_SMART_CARD_INFO
Definition: winwlx.h:330
BOOL WINAPI WlxCreateUserDesktop(HANDLE hWlx, HANDLE hToken, DWORD Flags, PWSTR pszDesktopName, PWLX_DESKTOP *ppDesktop)
Definition: wlx.c:473
#define LoadLibraryW(x)
Definition: compat.h:606
LONG_PTR LPARAM
Definition: windef.h:208
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
int WINAPI WlxChangePasswordNotifyEx(HANDLE hWlx, PWLX_MPR_NOTIFY_INFO pMprInfo, DWORD dwChangeInfo, PWSTR ProviderName, PVOID Reserved)
Definition: wlx.c:495
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
DWORD WINAPI WlxQueryTerminalServicesData(HANDLE hWlx, PWLX_TERMINAL_SERVICES_DATA pTSData, WCHAR *UserName, WCHAR *Domain)
Definition: wlx.c:678
#define WLX_VERSION_1_1
Definition: winwlx.h:29
GINAINSTANCE Gina
Definition: winlogon.h:216
#define PostMessage
Definition: winuser.h:5812
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406
static LIST_ENTRY DialogListHead
Definition: wlx.c:26
int WINAPI WlxMessageBox(HANDLE hWlx, HWND hwndOwner, LPWSTR lpszText, LPWSTR lpszTitle, UINT fuStyle)
Definition: wlx.c:268
Status
Definition: gdiplustypes.h:24
BOOL(WINAPI * PFWLXNETWORKPROVIDERLOAD)(PVOID, PWLX_MPR_NOTIFY_INFO)
Definition: winlogon.h:82
#define WLX_OPTION_SMART_CARD_PRESENT
Definition: winwlx.h:329
#define WLX_OPTION_CONTEXT_POINTER
Definition: winwlx.h:323
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
VOID(WINAPI * PFWLXDISPLAYLOCKEDNOTICE)(PVOID)
Definition: winlogon.h:68
#define WLX_VERSION_1_4
Definition: winwlx.h:32
#define TRACE(s)
Definition: solgame.cpp:4
#define FreeLibrary(x)
Definition: compat.h:607
#define WLX_OPTION_USE_CTRL_ALT_DEL
Definition: winwlx.h:322
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define WLX_OPTION_USE_SMART_CARD
Definition: winwlx.h:324
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4120
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOL WINAPI WlxQueryClientCredentials(PWLX_CLIENT_CREDENTIALS_INFO_V1_0 pCred)
Definition: wlx.c:639
#define MAX_PATH
Definition: compat.h:34
#define WINAPI
Definition: msvc.h:6
#define WLX_VERSION_1_2
Definition: winwlx.h:30
DWORD WINAPI WlxQueryConsoleSwitchCredentials(PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0 pCred)
Definition: wlx.c:698
Type
Definition: Type.h:6
unsigned long DWORD
Definition: ntddk_ex.h:95
#define Len
Definition: deflate.h:82
DWORD DialogTimeout
Definition: winlogon.h:230
static BOOL GetGinaPath(OUT LPWSTR Path, IN DWORD Len)
Definition: wlx.c:756
BOOL WINAPI SwitchDesktop(_In_ HDESK)
GINAFUNCTIONS Functions
Definition: winlogon.h:123
BOOL WINAPI WlxQueryTsLogonCredentials(PWLX_CLIENT_CREDENTIALS_INFO_V2_0 pCred)
Definition: wlx.c:712
VOID(WINAPI * PFWLXLOGOFF)(PVOID)
Definition: winlogon.h:72
HWND hWnd
Definition: wlx.c:18
int ret
struct _WLX_DISPATCH_VERSION_1_4 WLX_DISPATCH_VERSION_1_4
BOOL(WINAPI * PFWLXACTIVATEUSERSHELL)(PVOID, PWSTR, PWSTR, PVOID)
Definition: winlogon.h:66
#define WLX_SAS_TYPE_CTRL_ALT_DEL
Definition: winwlx.h:36
VOID(WINAPI * PFWLXDISPLAYSASNOTICE)(PVOID)
Definition: winlogon.h:62
int(WINAPI * PFWLXLOGGEDOUTSAS)(PVOID, DWORD, PLUID, PSID, PDWORD, PHANDLE, PWLX_MPR_NOTIFY_INFO, PVOID *)
Definition: winlogon.h:63
BOOL(WINAPI * PFWLXSTARTAPPLICATION)(PVOID, PWSTR, PVOID, PWSTR)
Definition: winlogon.h:78
#define WLX_DLG_SAS
Definition: winwlx.h:73
BOOL(WINAPI * PFWLXISLOCKOK)(PVOID)
Definition: winlogon.h:70
Definition: typedefs.h:119
struct _WLX_DISPATCH_VERSION_1_1 WLX_DISPATCH_VERSION_1_1
BOOL CreateApplicationDesktopSecurity(_Out_ PSECURITY_DESCRIPTOR *ApplicationDesktopSd)
Creates a security descriptor for the default application desktop upon its creation.
Definition: security.c:359
INT_PTR(CALLBACK * DLGPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2876
#define WLX_VERSION_1_0
Definition: winwlx.h:28
#define ERR(fmt,...)
Definition: debug.h:110
int WINAPI WlxSwitchDesktopToWinlogon(HANDLE hWlx)
Definition: wlx.c:408
static BOOL LoadGina(IN OUT PGINAFUNCTIONS Functions, OUT DWORD *DllVersion, OUT HMODULE *GinaInstance)
Definition: wlx.c:805
#define WLX_CURRENT_VERSION
Definition: winwlx.h:33
HINSTANCE hInst
Definition: dxdiag.c:13
PRTL_UNICODE_STRING_BUFFER Path
#define WLX_SAS_TYPE_MAX_MSFT_VALUE
Definition: winwlx.h:46
static ULONG Timeout
Definition: ping.c:61
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
LPVOID lpSecurityDescriptor
Definition: compat.h:193
FxAutoRegKey hKey
struct _WLX_DISPATCH_VERSION_1_3 WLX_DISPATCH_VERSION_1_3
static PDIALOG_LIST_ENTRY GetDialogListEntry(HWND hwndDlg)
Definition: wlx.c:69
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
INT_PTR WINAPI DialogBoxIndirectParamW(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
Definition: wlx.c:15
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
VOID InitDialogListHead(VOID)
Definition: wlx.c:31
struct _DIALOG_LIST_ENTRY * PDIALOG_LIST_ENTRY
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
HANDLE hThread
Definition: wizard.c:28
struct _WLX_DISPATCH_VERSION_1_2 WLX_DISPATCH_VERSION_1_2
BOOL CreateWinstaSecurity(_Out_ PSECURITY_DESCRIPTOR *WinstaSd)
Creates a security descriptor for the default window station upon its creation.
Definition: security.c:112
BOOL(WINAPI * PFWLXISLOGOFFOK)(PVOID)
Definition: winlogon.h:71
BOOL WINAPI WlxDisconnect(VOID)
Definition: wlx.c:667
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI WlxSetOption(HANDLE hWlx, DWORD Option, ULONG_PTR Value, ULONG_PTR *OldValue)
Definition: wlx.c:535
#define OUT
Definition: typedefs.h:40
HWINSTA WINAPI CreateWindowStationW(_In_opt_ LPCWSTR lpwinsta, _In_ DWORD dwFlags, _In_ ACCESS_MASK dwDesiredAccess, _In_opt_ LPSECURITY_ATTRIBUTES lpsa)
BOOL WINAPI CloseDesktop(_In_ HDESK)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3356
static PDIALOG_LIST_ENTRY AddDialogListEntry(VOID)
Definition: wlx.c:39
#define UNIMPLEMENTED
Definition: debug.h:115
BOOL GinaInit(IN OUT PWLSESSION Session)
Definition: wlx.c:905
#define ULONG_PTR
Definition: config.h:101
char * cleanup(char *str)
Definition: wpickclick.c:99
static WLX_DISPATCH_VERSION_1_4 FunctionTable
Definition: wlx.c:722
#define GetProcAddress(x, y)
Definition: compat.h:612
BOOL(WINAPI * PFWLXNEGOTIATE)(DWORD, DWORD *)
Definition: winlogon.h:60
VOID WINAPI WlxUseCtrlAltDel(HANDLE hWlx)
Definition: wlx.c:183
int WINAPI WlxChangePasswordNotify(HANDLE hWlx, PWLX_MPR_NOTIFY_INFO pMprInfo, DWORD dwChangeInfo)
Definition: wlx.c:423
WCHAR * LPWSTR
Definition: xmlstorage.h:184
HDESK WINAPI CreateDesktopW(LPCWSTR lpszDesktop, LPCWSTR lpszDevice, LPDEVMODEW pDevmode, DWORD dwFlags, ACCESS_MASK dwDesiredAccess, LPSECURITY_ATTRIBUTES lpsa)
Definition: desktop.c:473
#define WM_INITDIALOG
Definition: winuser.h:1726
BOOL WINAPI WlxQueryInetConnectorCredentials(PWLX_CLIENT_CREDENTIALS_INFO_V1_0 pCred)
Definition: wlx.c:653
VOID CloseAllDialogWindows(VOID)
Definition: wlx.c:95
LPARAM lParam
Definition: combotst.c:139
#define RegCloseKey(hKey)
Definition: registry.h:47
DWORD Version
Definition: winlogon.h:125
base of all file and directory entries
Definition: entries.h:82
BOOL WINAPI WlxSetReturnDesktop(HANDLE hWlx, PWLX_DESKTOP pDesktop)
Definition: wlx.c:457
#define WLX_VERSION_1_3
Definition: winwlx.h:31
BOOL WINAPI CloseWindowStation(_In_ HWINSTA)
BOOL WINAPI WlxGetOption(HANDLE hWlx, DWORD Option, ULONG_PTR *Value)
Definition: wlx.c:568
int WINAPI WlxDialogBoxParam(HANDLE hWlx, HANDLE hInst, LPWSTR lpszTemplate, HWND hwndOwner, DLGPROC dlgprc, LPARAM dwInitParam)
Definition: wlx.c:306
struct _DIALOG_LIST_ENTRY DIALOG_LIST_ENTRY
struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES
BOOL(WINAPI * PFWLXGETSTATUSMESSAGE)(PVOID, DWORD *, PWSTR, DWORD)
Definition: winlogon.h:84
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define REG_SZ
Definition: layer.c:22
int WINAPI WlxSwitchDesktopToUser(HANDLE hWlx)
Definition: wlx.c:393