ReactOS 0.4.15-dev-5666-gc548b97
wlx.c File Reference
#include "winlogon.h"
Include dependency graph for wlx.c:

Go to the source code of this file.

Classes

struct  _DIALOG_LIST_ENTRY
 

Typedefs

typedef struct _DIALOG_LIST_ENTRY DIALOG_LIST_ENTRY
 
typedef struct _DIALOG_LIST_ENTRYPDIALOG_LIST_ENTRY
 

Functions

VOID InitDialogListHead (VOID)
 
static PDIALOG_LIST_ENTRY AddDialogListEntry (VOID)
 
static VOID RemoveDialogListEntry (PDIALOG_LIST_ENTRY ListEntry)
 
static PDIALOG_LIST_ENTRY GetDialogListEntry (HWND hwndDlg)
 
VOID CloseAllDialogWindows (VOID)
 
static INT_PTR CALLBACK DefaultWlxWindowProc (IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
 
VOID WINAPI WlxUseCtrlAltDel (HANDLE hWlx)
 
VOID WINAPI WlxSetContextPointer (HANDLE hWlx, PVOID pWlxContext)
 
VOID WINAPI WlxSasNotify (HANDLE hWlx, DWORD dwSasType)
 
BOOL WINAPI WlxSetTimeout (HANDLE hWlx, DWORD Timeout)
 
int WINAPI WlxAssignShellProtection (HANDLE hWlx, HANDLE hToken, HANDLE hProcess, HANDLE hThread)
 
int WINAPI WlxMessageBox (HANDLE hWlx, HWND hwndOwner, LPWSTR lpszText, LPWSTR lpszTitle, UINT fuStyle)
 
int WINAPI WlxDialogBox (HANDLE hWlx, HANDLE hInst, LPWSTR lpszTemplate, HWND hwndOwner, DLGPROC dlgprc)
 
int WINAPI WlxDialogBoxParam (HANDLE hWlx, HANDLE hInst, LPWSTR lpszTemplate, HWND hwndOwner, DLGPROC dlgprc, LPARAM dwInitParam)
 
int WINAPI WlxDialogBoxIndirect (HANDLE hWlx, HANDLE hInst, LPCDLGTEMPLATE hDialogTemplate, HWND hwndOwner, DLGPROC dlgprc)
 
int WINAPI WlxDialogBoxIndirectParam (HANDLE hWlx, HANDLE hInst, LPCDLGTEMPLATE hDialogTemplate, HWND hwndOwner, DLGPROC dlgprc, LPARAM dwInitParam)
 
int WINAPI WlxSwitchDesktopToUser (HANDLE hWlx)
 
int WINAPI WlxSwitchDesktopToWinlogon (HANDLE hWlx)
 
int WINAPI WlxChangePasswordNotify (HANDLE hWlx, PWLX_MPR_NOTIFY_INFO pMprInfo, DWORD dwChangeInfo)
 
BOOL WINAPI WlxGetSourceDesktop (HANDLE hWlx, PWLX_DESKTOP *ppDesktop)
 
BOOL WINAPI WlxSetReturnDesktop (HANDLE hWlx, PWLX_DESKTOP pDesktop)
 
BOOL WINAPI WlxCreateUserDesktop (HANDLE hWlx, HANDLE hToken, DWORD Flags, PWSTR pszDesktopName, PWLX_DESKTOP *ppDesktop)
 
int WINAPI WlxChangePasswordNotifyEx (HANDLE hWlx, PWLX_MPR_NOTIFY_INFO pMprInfo, DWORD dwChangeInfo, PWSTR ProviderName, PVOID Reserved)
 
BOOL WINAPI WlxCloseUserDesktop (HANDLE hWlx, PWLX_DESKTOP pDesktop, HANDLE hToken)
 
BOOL WINAPI WlxSetOption (HANDLE hWlx, DWORD Option, ULONG_PTR Value, ULONG_PTR *OldValue)
 
BOOL WINAPI WlxGetOption (HANDLE hWlx, DWORD Option, ULONG_PTR *Value)
 
VOID WINAPI WlxWin31Migrate (HANDLE hWlx)
 
BOOL WINAPI WlxQueryClientCredentials (PWLX_CLIENT_CREDENTIALS_INFO_V1_0 pCred)
 
BOOL WINAPI WlxQueryInetConnectorCredentials (PWLX_CLIENT_CREDENTIALS_INFO_V1_0 pCred)
 
BOOL WINAPI WlxDisconnect (VOID)
 
DWORD WINAPI WlxQueryTerminalServicesData (HANDLE hWlx, PWLX_TERMINAL_SERVICES_DATA pTSData, WCHAR *UserName, WCHAR *Domain)
 
DWORD WINAPI WlxQueryConsoleSwitchCredentials (PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0 pCred)
 
BOOL WINAPI WlxQueryTsLogonCredentials (PWLX_CLIENT_CREDENTIALS_INFO_V2_0 pCred)
 
static BOOL GetGinaPath (OUT LPWSTR Path, IN DWORD Len)
 
static BOOL WINAPI DefaultWlxScreenSaverNotify (IN PVOID pWlxContext, IN OUT BOOL *pSecure)
 
static BOOL LoadGina (IN OUT PGINAFUNCTIONS Functions, OUT DWORD *DllVersion, OUT HMODULE *GinaInstance)
 
BOOL GinaInit (IN OUT PWLSESSION Session)
 
BOOL CreateWindowStationAndDesktops (_Inout_ PWLSESSION Session)
 

Variables

static LIST_ENTRY DialogListHead
 
static WLX_DISPATCH_VERSION_1_4 FunctionTable
 

Typedef Documentation

◆ DIALOG_LIST_ENTRY

◆ PDIALOG_LIST_ENTRY

Function Documentation

◆ AddDialogListEntry()

static PDIALOG_LIST_ENTRY AddDialogListEntry ( VOID  )
static

Definition at line 39 of file wlx.c.

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}
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
#define NULL
Definition: types.h:112
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define InsertHeadList(ListHead, Entry)
#define TRACE(s)
Definition: solgame.cpp:4
Definition: wlx.c:16
LIST_ENTRY Entry
Definition: wlx.c:17
static LIST_ENTRY DialogListHead
Definition: wlx.c:26

Referenced by WlxDialogBoxIndirectParam(), and WlxDialogBoxParam().

◆ CloseAllDialogWindows()

VOID CloseAllDialogWindows ( VOID  )

Definition at line 95 of file wlx.c.

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}
base of all file and directory entries
Definition: entries.h:83
HWND hWnd
Definition: wlx.c:18
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
#define PostMessage
Definition: winuser.h:5822
#define WLX_WM_SAS
Definition: winwlx.h:71

Referenced by DispatchSAS().

◆ CreateWindowStationAndDesktops()

BOOL CreateWindowStationAndDesktops ( _Inout_ PWLSESSION  Session)

Definition at line 928 of file wlx.c.

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
1065cleanup:
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}
BOOL CreateApplicationDesktopSecurity(_Out_ PSECURITY_DESCRIPTOR *ApplicationDesktopSd)
Creates a security descriptor for the default application desktop upon its creation.
Definition: security.c:359
BOOL CreateWinstaSecurity(_Out_ PSECURITY_DESCRIPTOR *WinstaSd)
Creates a security descriptor for the default window station upon its creation.
Definition: security.c:112
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
BOOL CreateScreenSaverSecurity(_Out_ PSECURITY_DESCRIPTOR *ScreenSaverDesktopSd)
Creates a security descriptor for the screen saver desktop.
Definition: security.c:690
#define ERR(fmt,...)
Definition: debug.h:110
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:606
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES
static void cleanup(void)
Definition: main.c:1335
unsigned int BOOL
Definition: ntddk_ex.h:94
#define MAXIMUM_ALLOWED
Definition: nt_native.h:83
#define L(x)
Definition: ntvdm.h:50
LUID LuidNone
Definition: sas.c:47
LPVOID lpSecurityDescriptor
Definition: compat.h:193
int ret
HDESK WINAPI CreateDesktopW(LPCWSTR lpszDesktop, LPCWSTR lpszDevice, LPDEVMODEW pDevmode, DWORD dwFlags, ACCESS_MASK dwDesiredAccess, LPSECURITY_ATTRIBUTES lpsa)
Definition: desktop.c:473
DWORD WINAPI GetLastError(void)
Definition: except.c:1040
BOOL WINAPI SetWindowStationUser(IN HWINSTA hWindowStation, IN PLUID pluid, IN PSID psid OPTIONAL, IN DWORD size)
Definition: winsta.c:419
BOOL WINAPI SwitchDesktop(_In_ HDESK)
BOOL WINAPI SetThreadDesktop(_In_ HDESK)
HWINSTA WINAPI CreateWindowStationW(_In_opt_ LPCWSTR lpwinsta, _In_ DWORD dwFlags, _In_ ACCESS_MASK dwDesiredAccess, _In_opt_ LPSECURITY_ATTRIBUTES lpsa)
BOOL WINAPI CloseWindowStation(_In_ HWINSTA)
BOOL WINAPI SetProcessWindowStation(_In_ HWINSTA)
BOOL WINAPI CloseDesktop(_In_ HDESK)

Referenced by WinMain().

◆ DefaultWlxScreenSaverNotify()

static BOOL WINAPI DefaultWlxScreenSaverNotify ( IN PVOID  pWlxContext,
IN OUT BOOL pSecure 
)
static

Definition at line 794 of file wlx.c.

797{
798 if (*pSecure)
799 *pSecure = WLSession->Gina.Functions.WlxIsLogoffOk(pWlxContext);
800 return TRUE;
801}
PFWLXISLOGOFFOK WlxIsLogoffOk
Definition: winlogon.h:106
GINAFUNCTIONS Functions
Definition: winlogon.h:128
GINAINSTANCE Gina
Definition: winlogon.h:221
PWLSESSION WLSession
Definition: winlogon.c:20

Referenced by LoadGina().

◆ DefaultWlxWindowProc()

static INT_PTR CALLBACK DefaultWlxWindowProc ( IN HWND  hwndDlg,
IN UINT  uMsg,
IN WPARAM  wParam,
IN LPARAM  lParam 
)
static

Definition at line 117 of file wlx.c.

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}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
DLGPROC DlgProc
Definition: wlx.c:19
LPARAM lParam
Definition: wlx.c:20
int32_t INT_PTR
Definition: typedefs.h:64
#define WM_INITDIALOG
Definition: winuser.h:1729
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
#define WLX_DLG_SAS
Definition: winwlx.h:73
struct _DIALOG_LIST_ENTRY * PDIALOG_LIST_ENTRY
static PDIALOG_LIST_ENTRY GetDialogListEntry(HWND hwndDlg)
Definition: wlx.c:69

Referenced by WlxDialogBoxIndirectParam(), and WlxDialogBoxParam().

◆ GetDialogListEntry()

static PDIALOG_LIST_ENTRY GetDialogListEntry ( HWND  hwndDlg)
static

Definition at line 69 of file wlx.c.

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}

Referenced by DefaultWlxWindowProc().

◆ GetGinaPath()

static BOOL GetGinaPath ( OUT LPWSTR  Path,
IN DWORD  Len 
)
static

Definition at line 756 of file wlx.c.

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);
788 return TRUE;
789}
PRTL_UNICODE_STRING_BUFFER Path
Type
Definition: Type.h:7
#define RegCloseKey(hKey)
Definition: registry.h:47
#define Len
Definition: deflate.h:82
#define ERROR_SUCCESS
Definition: deptool.c:10
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3356
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4121
unsigned long DWORD
Definition: ntddk_ex.h:95
FxAutoRegKey hKey
Status
Definition: gdiplustypes.h:25
#define REG_SZ
Definition: layer.c:22
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
long LONG
Definition: pedump.c:60
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
unsigned char * LPBYTE
Definition: typedefs.h:53
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by LoadGina().

◆ GinaInit()

BOOL GinaInit ( IN OUT PWLSESSION  Session)

Definition at line 905 of file wlx.c.

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}
static WLX_DISPATCH_VERSION_1_4 FunctionTable
Definition: wlx.c:722
static BOOL LoadGina(IN OUT PGINAFUNCTIONS Functions, OUT DWORD *DllVersion, OUT HMODULE *GinaInstance)
Definition: wlx.c:805

Referenced by WinMain().

◆ InitDialogListHead()

VOID InitDialogListHead ( VOID  )

Definition at line 31 of file wlx.c.

32{
34}
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944

Referenced by WinMain().

◆ LoadGina()

static BOOL LoadGina ( IN OUT PGINAFUNCTIONS  Functions,
OUT DWORD DllVersion,
OUT HMODULE GinaInstance 
)
static

Definition at line 805 of file wlx.c.

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
893cleanup:
894 if (!ret)
895 {
896 if (hGina)
897 FreeLibrary(hGina);
898 }
899 else
900 *GinaInstance = hGina;
901 return ret;
902}
#define GetProcAddress(x, y)
Definition: compat.h:753
#define FreeLibrary(x)
Definition: compat.h:748
#define MAX_PATH
Definition: compat.h:34
#define LoadLibraryW(x)
Definition: compat.h:747
int(WINAPI * PFWLXWKSTALOCKEDSAS)(PVOID, DWORD)
Definition: winlogon.h:74
VOID(WINAPI * PFWLXDISPLAYLOCKEDNOTICE)(PVOID)
Definition: winlogon.h:73
int(WINAPI * PFWLXLOGGEDOUTSAS)(PVOID, DWORD, PLUID, PSID, PDWORD, PHANDLE, PWLX_MPR_NOTIFY_INFO, PVOID *)
Definition: winlogon.h:68
BOOL(WINAPI * PFWLXNEGOTIATE)(DWORD, DWORD *)
Definition: winlogon.h:65
VOID(WINAPI * PFWLXSHUTDOWN)(PVOID, DWORD)
Definition: winlogon.h:78
BOOL(WINAPI * PFWLXISLOGOFFOK)(PVOID)
Definition: winlogon.h:76
VOID(WINAPI * PFWLXLOGOFF)(PVOID)
Definition: winlogon.h:77
BOOL(WINAPI * PFWLXREMOVESTATUSMESSAGE)(PVOID)
Definition: winlogon.h:90
BOOL(WINAPI * PFWLXSTARTAPPLICATION)(PVOID, PWSTR, PVOID, PWSTR)
Definition: winlogon.h:83
BOOL(WINAPI * PFWLXINITIALIZE)(LPWSTR, HANDLE, PVOID, PVOID, PVOID *)
Definition: winlogon.h:66
BOOL(WINAPI * PFWLXSCREENSAVERNOTIFY)(PVOID, BOOL *)
Definition: winlogon.h:82
BOOL(WINAPI * PFWLXNETWORKPROVIDERLOAD)(PVOID, PWLX_MPR_NOTIFY_INFO)
Definition: winlogon.h:87
BOOL(WINAPI * PFWLXGETSTATUSMESSAGE)(PVOID, DWORD *, PWSTR, DWORD)
Definition: winlogon.h:89
BOOL(WINAPI * PFWLXISLOCKOK)(PVOID)
Definition: winlogon.h:75
BOOL(WINAPI * PFWLXDISPLAYSTATUSMESSAGE)(PVOID, HDESK, DWORD, PWSTR, PWSTR)
Definition: winlogon.h:88
VOID(WINAPI * PFWLXDISPLAYSASNOTICE)(PVOID)
Definition: winlogon.h:67
int(WINAPI * PFWLXLOGGEDONSAS)(PVOID, DWORD, PVOID)
Definition: winlogon.h:72
BOOL(WINAPI * PFWLXACTIVATEUSERSHELL)(PVOID, PWSTR, PWSTR, PVOID)
Definition: winlogon.h:71
#define WLX_VERSION_1_1
Definition: winwlx.h:29
#define WLX_CURRENT_VERSION
Definition: winwlx.h:33
#define WLX_VERSION_1_3
Definition: winwlx.h:31
#define WLX_VERSION_1_0
Definition: winwlx.h:28
static BOOL GetGinaPath(OUT LPWSTR Path, IN DWORD Len)
Definition: wlx.c:756
static BOOL WINAPI DefaultWlxScreenSaverNotify(IN PVOID pWlxContext, IN OUT BOOL *pSecure)
Definition: wlx.c:794

Referenced by GinaInit().

◆ RemoveDialogListEntry()

static VOID RemoveDialogListEntry ( PDIALOG_LIST_ENTRY  ListEntry)
static

Definition at line 58 of file wlx.c.

59{
60 TRACE("Remove entry %p\n", ListEntry);
61
62 RemoveEntryList(&ListEntry->Entry);
63 RtlFreeHeap(RtlGetProcessHeap(), 0, ListEntry);
64}
#define RemoveEntryList(Entry)
Definition: env_spec_w32.h:986

Referenced by WlxDialogBoxIndirectParam(), and WlxDialogBoxParam().

◆ WlxAssignShellProtection()

int WINAPI WlxAssignShellProtection ( HANDLE  hWlx,
HANDLE  hToken,
HANDLE  hProcess,
HANDLE  hThread 
)

Definition at line 248 of file wlx.c.

253{
258
260 return 0;
261}
#define UNIMPLEMENTED
Definition: debug.h:115
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:71
HANDLE hThread
Definition: wizard.c:28
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317

◆ WlxChangePasswordNotify()

int WINAPI WlxChangePasswordNotify ( HANDLE  hWlx,
PWLX_MPR_NOTIFY_INFO  pMprInfo,
DWORD  dwChangeInfo 
)

Definition at line 423 of file wlx.c.

427{
429 UNREFERENCED_PARAMETER(pMprInfo);
430 UNREFERENCED_PARAMETER(dwChangeInfo);
431
433 return 0;
434}

◆ WlxChangePasswordNotifyEx()

int WINAPI WlxChangePasswordNotifyEx ( HANDLE  hWlx,
PWLX_MPR_NOTIFY_INFO  pMprInfo,
DWORD  dwChangeInfo,
PWSTR  ProviderName,
PVOID  Reserved 
)

Definition at line 495 of file wlx.c.

501{
503 UNREFERENCED_PARAMETER(pMprInfo);
504 UNREFERENCED_PARAMETER(dwChangeInfo);
505 UNREFERENCED_PARAMETER(ProviderName);
507
509 return 0;
510}
_Reserved_ PVOID Reserved
Definition: winddi.h:3974

◆ WlxCloseUserDesktop()

BOOL WINAPI WlxCloseUserDesktop ( HANDLE  hWlx,
PWLX_DESKTOP  pDesktop,
HANDLE  hToken 
)

Definition at line 517 of file wlx.c.

521{
523 UNREFERENCED_PARAMETER(pDesktop);
525
527 return FALSE;
528}

◆ WlxCreateUserDesktop()

BOOL WINAPI WlxCreateUserDesktop ( HANDLE  hWlx,
HANDLE  hToken,
DWORD  Flags,
PWSTR  pszDesktopName,
PWLX_DESKTOP ppDesktop 
)

Definition at line 473 of file wlx.c.

479{
483 UNREFERENCED_PARAMETER(pszDesktopName);
484 UNREFERENCED_PARAMETER(ppDesktop);
485
487 return FALSE;
488}
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170

◆ WlxDialogBox()

int WINAPI WlxDialogBox ( HANDLE  hWlx,
HANDLE  hInst,
LPWSTR  lpszTemplate,
HWND  hwndOwner,
DLGPROC  dlgprc 
)

Definition at line 287 of file wlx.c.

293{
295
296 TRACE("WlxDialogBox()\n");
297
298 return (int)WlxDialogBoxParam(hWlx, hInst, lpszTemplate, hwndOwner, dlgprc, 0);
299}
HINSTANCE hInst
Definition: dxdiag.c:13
int WINAPI WlxDialogBoxParam(HANDLE hWlx, HANDLE hInst, LPWSTR lpszTemplate, HWND hwndOwner, DLGPROC dlgprc, LPARAM dwInitParam)
Definition: wlx.c:306

◆ WlxDialogBoxIndirect()

int WINAPI WlxDialogBoxIndirect ( HANDLE  hWlx,
HANDLE  hInst,
LPCDLGTEMPLATE  hDialogTemplate,
HWND  hwndOwner,
DLGPROC  dlgprc 
)

Definition at line 340 of file wlx.c.

346{
348
349 TRACE("WlxDialogBoxIndirect()\n");
350
351 return (int)WlxDialogBoxIndirectParam(hWlx, hInst, hDialogTemplate, hwndOwner, dlgprc, 0);
352}
int WINAPI WlxDialogBoxIndirectParam(HANDLE hWlx, HANDLE hInst, LPCDLGTEMPLATE hDialogTemplate, HWND hwndOwner, DLGPROC dlgprc, LPARAM dwInitParam)
Definition: wlx.c:359

◆ WlxDialogBoxIndirectParam()

int WINAPI WlxDialogBoxIndirectParam ( HANDLE  hWlx,
HANDLE  hInst,
LPCDLGTEMPLATE  hDialogTemplate,
HWND  hwndOwner,
DLGPROC  dlgprc,
LPARAM  dwInitParam 
)

Definition at line 359 of file wlx.c.

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}
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
LONG_PTR LPARAM
Definition: windef.h:208
INT_PTR WINAPI DialogBoxIndirectParamW(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
static VOID RemoveDialogListEntry(PDIALOG_LIST_ENTRY ListEntry)
Definition: wlx.c:58
static PDIALOG_LIST_ENTRY AddDialogListEntry(VOID)
Definition: wlx.c:39
static INT_PTR CALLBACK DefaultWlxWindowProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: wlx.c:117

Referenced by WlxDialogBoxIndirect().

◆ WlxDialogBoxParam()

int WINAPI WlxDialogBoxParam ( HANDLE  hWlx,
HANDLE  hInst,
LPWSTR  lpszTemplate,
HWND  hwndOwner,
DLGPROC  dlgprc,
LPARAM  dwInitParam 
)

Definition at line 306 of file wlx.c.

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}
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)

Referenced by WlxDialogBox().

◆ WlxDisconnect()

BOOL WINAPI WlxDisconnect ( VOID  )

Definition at line 667 of file wlx.c.

668{
670 return FALSE;
671}

◆ WlxGetOption()

BOOL WINAPI WlxGetOption ( HANDLE  hWlx,
DWORD  Option,
ULONG_PTR Value 
)

Definition at line 568 of file wlx.c.

572{
573 PWLSESSION Session = (PWLSESSION)hWlx;
574
575 TRACE("WlxGetOption(%lu)\n", Option);
576
577 switch (Option)
578 {
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:
598 break;
599 case WLX_VERSION_1_1:
601 break;
602 case WLX_VERSION_1_2:
604 break;
605 case WLX_VERSION_1_3:
607 break;
608 case WLX_VERSION_1_4:
610 break;
611 default:
612 return FALSE;
613 }
614 return TRUE;
615 }
616 }
617
618 return FALSE;
619}
#define ULONG_PTR
Definition: config.h:101
PVOID Context
Definition: winlogon.h:129
BOOL UseCtrlAltDelete
Definition: winlogon.h:131
DWORD Version
Definition: winlogon.h:130
uint32_t ULONG_PTR
Definition: typedefs.h:65
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
struct _WLSESSION * PWLSESSION
#define WLX_OPTION_USE_CTRL_ALT_DEL
Definition: winwlx.h:322
struct _WLX_DISPATCH_VERSION_1_3 WLX_DISPATCH_VERSION_1_3
#define WLX_OPTION_USE_SMART_CARD
Definition: winwlx.h:324
#define WLX_VERSION_1_4
Definition: winwlx.h:32
#define WLX_OPTION_SMART_CARD_PRESENT
Definition: winwlx.h:329
#define WLX_OPTION_DISPATCH_TABLE_SIZE
Definition: winwlx.h:331
#define WLX_VERSION_1_2
Definition: winwlx.h:30
struct _WLX_DISPATCH_VERSION_1_0 WLX_DISPATCH_VERSION_1_0
struct _WLX_DISPATCH_VERSION_1_1 WLX_DISPATCH_VERSION_1_1
struct _WLX_DISPATCH_VERSION_1_2 WLX_DISPATCH_VERSION_1_2
#define WLX_OPTION_CONTEXT_POINTER
Definition: winwlx.h:323
#define WLX_OPTION_SMART_CARD_INFO
Definition: winwlx.h:330
struct _WLX_DISPATCH_VERSION_1_4 WLX_DISPATCH_VERSION_1_4

◆ WlxGetSourceDesktop()

BOOL WINAPI WlxGetSourceDesktop ( HANDLE  hWlx,
PWLX_DESKTOP ppDesktop 
)

Definition at line 441 of file wlx.c.

444{
446 UNREFERENCED_PARAMETER(ppDesktop);
447
449 return FALSE;
450}

◆ WlxMessageBox()

int WINAPI WlxMessageBox ( HANDLE  hWlx,
HWND  hwndOwner,
LPWSTR  lpszText,
LPWSTR  lpszTitle,
UINT  fuStyle 
)

Definition at line 268 of file wlx.c.

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}
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)

◆ WlxQueryClientCredentials()

BOOL WINAPI WlxQueryClientCredentials ( PWLX_CLIENT_CREDENTIALS_INFO_V1_0  pCred)

Definition at line 639 of file wlx.c.

641{
643
645 return FALSE;
646}

◆ WlxQueryConsoleSwitchCredentials()

DWORD WINAPI WlxQueryConsoleSwitchCredentials ( PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0  pCred)

Definition at line 698 of file wlx.c.

700{
702
704 return 0;
705}

◆ WlxQueryInetConnectorCredentials()

BOOL WINAPI WlxQueryInetConnectorCredentials ( PWLX_CLIENT_CREDENTIALS_INFO_V1_0  pCred)

Definition at line 653 of file wlx.c.

655{
657
659 return FALSE;
660}

◆ WlxQueryTerminalServicesData()

DWORD WINAPI WlxQueryTerminalServicesData ( HANDLE  hWlx,
PWLX_TERMINAL_SERVICES_DATA  pTSData,
WCHAR UserName,
WCHAR Domain 
)

Definition at line 678 of file wlx.c.

683{
685 UNREFERENCED_PARAMETER(pTSData);
686 UNREFERENCED_PARAMETER(UserName);
688
690 return 0;
691}

◆ WlxQueryTsLogonCredentials()

BOOL WINAPI WlxQueryTsLogonCredentials ( PWLX_CLIENT_CREDENTIALS_INFO_V2_0  pCred)

Definition at line 712 of file wlx.c.

714{
716
718 return FALSE;
719}

◆ WlxSasNotify()

VOID WINAPI WlxSasNotify ( HANDLE  hWlx,
DWORD  dwSasType 
)

Definition at line 214 of file wlx.c.

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}
HWND SASWindow
Definition: winlogon.h:225
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WLX_SAS_TYPE_CTRL_ALT_DEL
Definition: winwlx.h:36
#define WLX_SAS_TYPE_MAX_MSFT_VALUE
Definition: winwlx.h:46

◆ WlxSetContextPointer()

VOID WINAPI WlxSetContextPointer ( HANDLE  hWlx,
PVOID  pWlxContext 
)

Definition at line 198 of file wlx.c.

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}
BOOL WINAPI WlxSetOption(HANDLE hWlx, DWORD Option, ULONG_PTR Value, ULONG_PTR *OldValue)
Definition: wlx.c:535

◆ WlxSetOption()

BOOL WINAPI WlxSetOption ( HANDLE  hWlx,
DWORD  Option,
ULONG_PTR  Value,
ULONG_PTR OldValue 
)

Definition at line 535 of file wlx.c.

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}

Referenced by WlxSetContextPointer(), and WlxUseCtrlAltDel().

◆ WlxSetReturnDesktop()

BOOL WINAPI WlxSetReturnDesktop ( HANDLE  hWlx,
PWLX_DESKTOP  pDesktop 
)

Definition at line 457 of file wlx.c.

460{
462 UNREFERENCED_PARAMETER(pDesktop);
463
465 return FALSE;
466}

◆ WlxSetTimeout()

BOOL WINAPI WlxSetTimeout ( HANDLE  hWlx,
DWORD  Timeout 
)

Definition at line 231 of file wlx.c.

234{
235 PWLSESSION Session = (PWLSESSION)hWlx;
236
237 TRACE("WlxSetTimeout(%lu)\n", Timeout);
238
239 Session->DialogTimeout = Timeout;
240 return TRUE;
241}
static ULONG Timeout
Definition: ping.c:61
DWORD DialogTimeout
Definition: winlogon.h:235

◆ WlxSwitchDesktopToUser()

int WINAPI WlxSwitchDesktopToUser ( HANDLE  hWlx)

Definition at line 393 of file wlx.c.

395{
396 PWLSESSION Session = (PWLSESSION)hWlx;
397
398 TRACE("WlxSwitchDesktopToUser()\n");
399
400 return (int)SwitchDesktop(Session->ApplicationDesktop);
401}
HDESK ApplicationDesktop
Definition: winlogon.h:228

◆ WlxSwitchDesktopToWinlogon()

int WINAPI WlxSwitchDesktopToWinlogon ( HANDLE  hWlx)

Definition at line 408 of file wlx.c.

410{
411 PWLSESSION Session = (PWLSESSION)hWlx;
412
413 TRACE("WlxSwitchDesktopToWinlogon()\n");
414
415 return (int)SwitchDesktop(Session->WinlogonDesktop);
416}
HDESK WinlogonDesktop
Definition: winlogon.h:229

◆ WlxUseCtrlAltDel()

VOID WINAPI WlxUseCtrlAltDel ( HANDLE  hWlx)

Definition at line 183 of file wlx.c.

185{
186 ULONG_PTR OldValue;
187
188 TRACE("WlxUseCtrlAltDel()\n");
189
191}

◆ WlxWin31Migrate()

VOID WINAPI WlxWin31Migrate ( HANDLE  hWlx)

Definition at line 626 of file wlx.c.

628{
630
632}

Variable Documentation

◆ DialogListHead

LIST_ENTRY DialogListHead
static

◆ FunctionTable

WLX_DISPATCH_VERSION_1_4 FunctionTable
static
Initial value:
= {
}
BOOL WINAPI WlxCloseUserDesktop(HANDLE hWlx, PWLX_DESKTOP pDesktop, HANDLE hToken)
Definition: wlx.c:517
DWORD WINAPI WlxQueryConsoleSwitchCredentials(PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0 pCred)
Definition: wlx.c:698
BOOL WINAPI WlxCreateUserDesktop(HANDLE hWlx, HANDLE hToken, DWORD Flags, PWSTR pszDesktopName, PWLX_DESKTOP *ppDesktop)
Definition: wlx.c:473
int WINAPI WlxAssignShellProtection(HANDLE hWlx, HANDLE hToken, HANDLE hProcess, HANDLE hThread)
Definition: wlx.c:248
BOOL WINAPI WlxSetTimeout(HANDLE hWlx, DWORD Timeout)
Definition: wlx.c:231
DWORD WINAPI WlxQueryTerminalServicesData(HANDLE hWlx, PWLX_TERMINAL_SERVICES_DATA pTSData, WCHAR *UserName, WCHAR *Domain)
Definition: wlx.c:678
int WINAPI WlxSwitchDesktopToUser(HANDLE hWlx)
Definition: wlx.c:393
BOOL WINAPI WlxQueryClientCredentials(PWLX_CLIENT_CREDENTIALS_INFO_V1_0 pCred)
Definition: wlx.c:639
int WINAPI WlxChangePasswordNotifyEx(HANDLE hWlx, PWLX_MPR_NOTIFY_INFO pMprInfo, DWORD dwChangeInfo, PWSTR ProviderName, PVOID Reserved)
Definition: wlx.c:495
VOID WINAPI WlxSasNotify(HANDLE hWlx, DWORD dwSasType)
Definition: wlx.c:214
int WINAPI WlxDialogBoxIndirect(HANDLE hWlx, HANDLE hInst, LPCDLGTEMPLATE hDialogTemplate, HWND hwndOwner, DLGPROC dlgprc)
Definition: wlx.c:340
VOID WINAPI WlxWin31Migrate(HANDLE hWlx)
Definition: wlx.c:626
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
BOOL WINAPI WlxQueryTsLogonCredentials(PWLX_CLIENT_CREDENTIALS_INFO_V2_0 pCred)
Definition: wlx.c:712
BOOL WINAPI WlxDisconnect(VOID)
Definition: wlx.c:667
BOOL WINAPI WlxGetOption(HANDLE hWlx, DWORD Option, ULONG_PTR *Value)
Definition: wlx.c:568
VOID WINAPI WlxSetContextPointer(HANDLE hWlx, PVOID pWlxContext)
Definition: wlx.c:198
int WINAPI WlxSwitchDesktopToWinlogon(HANDLE hWlx)
Definition: wlx.c:408
int WINAPI WlxDialogBox(HANDLE hWlx, HANDLE hInst, LPWSTR lpszTemplate, HWND hwndOwner, DLGPROC dlgprc)
Definition: wlx.c:287
BOOL WINAPI WlxGetSourceDesktop(HANDLE hWlx, PWLX_DESKTOP *ppDesktop)
Definition: wlx.c:441
int WINAPI WlxMessageBox(HANDLE hWlx, HWND hwndOwner, LPWSTR lpszText, LPWSTR lpszTitle, UINT fuStyle)
Definition: wlx.c:268
BOOL WINAPI WlxQueryInetConnectorCredentials(PWLX_CLIENT_CREDENTIALS_INFO_V1_0 pCred)
Definition: wlx.c:653
BOOL WINAPI WlxSetReturnDesktop(HANDLE hWlx, PWLX_DESKTOP pDesktop)
Definition: wlx.c:457

Definition at line 722 of file wlx.c.

Referenced by CreateSoundDeviceInstance(), DestroySoundDeviceInstance(), DoWaveStreaming(), GetSoundDeviceCapabilities(), GetSoundDeviceFunctionTable(), GinaInit(), IKsAllocator_fnDeviceIoControl(), MmeGetDeviceInterfaceString(), MmeGetLineInfo(), MmeGetPosition(), MmeSetState(), PeLdrpBindImportName(), PrepareWaveHeader(), QueryWaveDeviceFormatSupport(), RtlAddFunctionTable(), RtlDeleteFunctionTable(), RtlLookupFunctionEntry(), SetSoundDeviceFunctionTable(), SetWaveDeviceFormat(), SpInitialize(), SpInstanceInit(), StopStreamingInSoundThread(), UnprepareWaveHeader(), and WriteWaveHeader().