ReactOS  r75636
winlogon.h File Reference
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
#include <winreg.h>
#include <winwlx.h>
#include <ndk/rtlfuncs.h>
#include <ndk/exfuncs.h>
#include <strsafe.h>
#include <reactos/undocuser.h>
#include <wine/debug.h>
#include "resource.h"
Include dependency graph for winlogon.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _GINAFUNCTIONS
 
struct  _GINAINSTANCE
 
struct  _WLSESSION
 

Macros

#define USE_GETLASTINPUTINFO
 
#define WIN32_NO_STATUS
 
#define LockWorkstation(Session)
 
#define UnlockWorkstation(Session)
 
#define WLX_SHUTTINGDOWN(Status)
 
#define WLX_SUSPENDING(Status)
 

Typedefs

typedef DWORD *typedef BOOL (WINAPI *PFWLXINITIALIZE)(LPWSTR
 
typedef DWORD *typedef HANDLE
 
typedef DWORD *typedef PVOID
 
typedef DWORD *typedef PVOID
*typedef 
VOID (WINAPI *PFWLXDISPLAYSASNOTICE)(PVOID)
 
typedef PVOID *typedef PWSTR
 
typedef DWORD DWORD
 
typedef struct _GINAFUNCTIONS GINAFUNCTIONS
 
typedef struct _GINAFUNCTIONSPGINAFUNCTIONS
 
typedef struct _GINAINSTANCE GINAINSTANCE
 
typedef struct _GINAINSTANCEPGINAINSTANCE
 
typedef enum _LOGON_STATE LOGON_STATE
 
typedef enum _LOGON_STATEPLOGON_STATE
 
typedef struct _WLSESSION WLSESSION
 
typedef struct _WLSESSIONPWLSESSION
 
typedef enum _NOTIFICATION_TYPE NOTIFICATION_TYPE
 
typedef enum _NOTIFICATION_TYPEPNOTIFICATION_TYPE
 

Enumerations

enum  _LOGON_STATE {
  STATE_INIT, STATE_LOGGED_OFF, STATE_LOGGED_OFF_SAS, STATE_LOGGED_ON,
  STATE_LOGGED_ON_SAS, STATE_LOCKED, STATE_LOCKED_SAS, STATE_LOGGING_OFF,
  STATE_SHUTTING_DOWN, STATE_SHUT_DOWN, STATE_SCREENSAVER
}
 
enum  _NOTIFICATION_TYPE {
  LogonHandler, LogoffHandler, LockHandler, UnlockHandler,
  StartupHandler, ShutdownHandler, StartScreenSaverHandler, StopScreenSaverHandler,
  DisconnectHandler, ReconnectHandler, StartShellHandler, PostShellHandler,
  LastHandler
}
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (winlogon)
 
typedef BOOL (WINAPI *PFWLXNEGOTIATE)(DWORD
 
typedef int (WINAPI *PFWLXLOGGEDOUTSAS)(PVOID
 
typedef VOID (WINAPI *PFWLXDISPLAYLOCKEDNOTICE)(PVOID)
 
BOOL CreateUserEnvironment (IN PWLSESSION Session)
 
BOOL InitNotifications (VOID)
 
VOID CleanupNotifications (VOID)
 
VOID CallNotificationDlls (PWLSESSION pSession, NOTIFICATION_TYPE Type)
 
BOOL StartRpcServer (VOID)
 
BOOL SetDefaultLanguage (IN PWLSESSION Session)
 
BOOL InitializeSAS (IN OUT PWLSESSION Session)
 
BOOL InitializeScreenSaver (IN OUT PWLSESSION Session)
 
VOID StartScreenSaver (IN PWLSESSION Session)
 
DWORD GetSetupType (VOID)
 
BOOL RunSetup (VOID)
 
BOOL PlaySoundRoutine (IN LPCWSTR FileName, IN UINT Logon, IN UINT Flags)
 
BOOL DisplayStatusMessage (IN PWLSESSION Session, IN HDESK hDesktop, IN UINT ResourceId)
 
BOOL RemoveStatusMessage (IN PWLSESSION Session)
 
VOID InitDialogListHead (VOID)
 
HWND GetTopDialogWindow (VOID)
 
BOOL GinaInit (IN OUT PWLSESSION Session)
 
BOOL CreateWindowStationAndDesktops (IN OUT PWLSESSION Session)
 
NTSTATUS HandleShutdown (IN OUT PWLSESSION Session, IN DWORD wlxAction)
 
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)
 
DWORD WINAPI WlxQueryConsoleSwitchCredentials (PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0 pCred)
 
BOOL WINAPI WlxQueryTsLogonCredentials (PWLX_CLIENT_CREDENTIALS_INFO_V2_0 pCred)
 
BOOL WINAPI WlxDisconnect (VOID)
 
DWORD WINAPI WlxQueryTerminalServicesData (HANDLE hWlx, PWLX_TERMINAL_SERVICES_DATA pTSData, WCHAR *UserName, WCHAR *Domain)
 

Variables

typedef PLUID
 
typedef PSID
 
typedef PDWORD
 
typedef PHANDLE
 
typedef PWLX_MPR_NOTIFY_INFO
 
typedef HDESK
 
HINSTANCE hAppInstance
 
PWLSESSION WLSession
 

Macro Definition Documentation

#define LockWorkstation (   Session)

Definition at line 202 of file winlogon.h.

Referenced by WinMain().

#define UnlockWorkstation (   Session)

Definition at line 203 of file winlogon.h.

#define USE_GETLASTINPUTINFO

Definition at line 31 of file winlogon.h.

#define WIN32_NO_STATUS

Definition at line 33 of file winlogon.h.

#define WLX_SHUTTINGDOWN (   Status)
Value:
)
#define WLX_SAS_ACTION_SHUTDOWN
Definition: winwlx.h:57
#define WLX_SAS_ACTION_SHUTDOWN_POWER_OFF
Definition: winwlx.h:62
Status
Definition: gdiplustypes.h:24
#define WLX_SAS_ACTION_SHUTDOWN_REBOOT
Definition: winwlx.h:63

Definition at line 262 of file winlogon.h.

Referenced by DoGenericAction().

#define WLX_SUSPENDING (   Status)
Value:
)
#define WLX_SAS_ACTION_SHUTDOWN_HIBERNATE
Definition: winwlx.h:66
#define WLX_SAS_ACTION_SHUTDOWN_SLEEP2
Definition: winwlx.h:65
Status
Definition: gdiplustypes.h:24
#define WLX_SAS_ACTION_SHUTDOWN_SLEEP
Definition: winwlx.h:64

Definition at line 268 of file winlogon.h.

Typedef Documentation

typedef CONST PIXELFORMATDESCRIPTOR *typedef CONST PIXELFORMATDESCRIPTOR *typedef BOOL(WINAPI *SWAPBUFFERS)(HDC hdc)

Definition at line 52 of file winlogon.h.

typedef DWORD

Definition at line 75 of file winlogon.h.

typedef HANDLE

Definition at line 52 of file winlogon.h.

typedef PVOID

Definition at line 52 of file winlogon.h.

static PWSTR

Definition at line 57 of file winlogon.h.

typedef VOID

Definition at line 53 of file winlogon.h.

Enumeration Type Documentation

Enumerator
STATE_INIT 
STATE_LOGGED_OFF 
STATE_LOGGED_OFF_SAS 
STATE_LOGGED_ON 
STATE_LOGGED_ON_SAS 
STATE_LOCKED 
STATE_LOCKED_SAS 
STATE_LOGGING_OFF 
STATE_SHUTTING_DOWN 
STATE_SHUT_DOWN 
STATE_SCREENSAVER 

Definition at line 187 of file winlogon.h.

188 {
189  STATE_INIT,
194  STATE_LOCKED,
196  STATE_LOGGING_OFF, // not used yet
197  STATE_SHUTTING_DOWN, // not used yet
198  STATE_SHUT_DOWN, // not used yet
199  STATE_SCREENSAVER // not used yet
enum _LOGON_STATE LOGON_STATE
enum _LOGON_STATE * PLOGON_STATE
Enumerator
LogonHandler 
LogoffHandler 
LockHandler 
UnlockHandler 
StartupHandler 
ShutdownHandler 
StartScreenSaverHandler 
StopScreenSaverHandler 
DisconnectHandler 
ReconnectHandler 
StartShellHandler 
PostShellHandler 
LastHandler 

Definition at line 242 of file winlogon.h.

Function Documentation

typedef BOOL ( WINAPI PFWLXNEGOTIATE)
VOID CallNotificationDlls ( PWLSESSION  pSession,
NOTIFICATION_TYPE  Type 
)

Definition at line 249 of file notify.c.

Referenced by DoGenericAction(), HandleLogoff(), HandleLogon(), HandleShutdown(), StartScreenSaver(), and WinMain().

252 {
253  PLIST_ENTRY ListEntry;
254  PNOTIFICATION_ITEM NotificationDll;
256 
257  TRACE("CallNotificationDlls()\n");
258 
259  Info.Size = sizeof(WLX_NOTIFICATION_INFO);
260 
261  switch (Type)
262  {
263  case LogoffHandler:
264  case ShutdownHandler:
265  Info.Flags = 3;
266  break;
267 
268  default:
269  Info.Flags = 0;
270  break;
271  }
272 
273  Info.UserName = NULL; //UserName;
274  Info.Domain = NULL; //Domain;
276  Info.hToken = pSession->UserToken;
277 
278  switch (Type)
279  {
280  case LogonHandler:
281  case StartShellHandler:
282  Info.hDesktop = pSession->ApplicationDesktop;
283  break;
284 
286  Info.hDesktop = pSession->ApplicationDesktop;
287  break;
288 
289  default:
290  Info.hDesktop = pSession->WinlogonDesktop;
291  break;
292  }
293 
294  Info.pStatusCallback = NULL;
295 
296  ListEntry = NotificationDllListHead.Flink;
297  while (ListEntry != &NotificationDllListHead)
298  {
299 TRACE("ListEntry %p\n", ListEntry);
300 
301  NotificationDll = CONTAINING_RECORD(ListEntry,
303  ListEntry);
304 TRACE("NotificationDll: %p\n", NotificationDll);
305  if (NotificationDll != NULL && NotificationDll->bEnabled)
306  {
307 TRACE("NotificationDll->Handler: %p\n", NotificationDll->Handler[Type]);
308  if (NotificationDll->Handler[Type] != NULL)
309  NotificationDll->Handler[Type](&Info);
310  }
311 
312  ListEntry = ListEntry->Flink;
313  }
314 }
Definition: video.h:583
PWLX_NOTIFY_HANDLER Handler[LastHandler]
Definition: notify.c:46
Type
Definition: Type.h:6
HDESK WinlogonDesktop
Definition: winlogon.h:215
HANDLE UserToken
Definition: winlogon.h:218
static LIST_ENTRY NotificationDllListHead
Definition: notify.c:50
HDESK ApplicationDesktop
Definition: winlogon.h:214
PFNMSGECALLBACK pStatusCallback
Definition: winwlx.h:629
smooth NULL
Definition: ftsmooth.c:513
struct _LIST_ENTRY * Flink
Definition: typedefs.h:120
#define TRACE(s)
Definition: solgame.cpp:4
LPWSTR InteractiveWindowStationName
Definition: winlogon.h:213
Definition: typedefs.h:118
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
struct _WLX_NOTIFICATION_INFO WLX_NOTIFICATION_INFO
VOID CleanupNotifications ( VOID  )

Definition at line 318 of file notify.c.

Referenced by WinMain().

319 {
320  PLIST_ENTRY ListEntry;
321  PNOTIFICATION_ITEM NotificationDll;
322 
323  ListEntry = NotificationDllListHead.Flink;
324  while (ListEntry != &NotificationDllListHead)
325  {
326  NotificationDll = CONTAINING_RECORD(ListEntry,
328  ListEntry);
329  if (NotificationDll != NULL)
330  {
331  FreeLibrary(NotificationDll->hInstance);
332  }
333 
334  ListEntry = ListEntry->Flink;
335 
336  RemoveEntryList(&NotificationDll->ListEntry);
337 
338  RtlFreeHeap(RtlGetProcessHeap(), 0, NotificationDll);
339  }
340 }
HINSTANCE hInstance
Definition: notify.c:39
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:603
static LIST_ENTRY NotificationDllListHead
Definition: notify.c:50
LIST_ENTRY ListEntry
Definition: notify.c:37
FORCEINLINE BOOLEAN RemoveEntryList(_In_ PLIST_ENTRY Entry)
Definition: rtlfuncs.h:105
smooth NULL
Definition: ftsmooth.c:513
struct _LIST_ENTRY * Flink
Definition: typedefs.h:120
#define FreeLibrary(x)
Definition: compat.h:405
Definition: typedefs.h:118
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
BOOL CreateUserEnvironment ( IN PWLSESSION  Session)

Definition at line 128 of file environment.c.

Referenced by HandleLogon().

130 {
131  HKEY hKeyCurrentUser;
132  LONG lError;
133 
134  TRACE("WL: CreateUserEnvironment called\n");
135 
136  /* Impersonate the new user */
137  if (!ImpersonateLoggedOnUser(Session->UserToken))
138  {
139  ERR("ImpersonateLoggedOnUser() failed with error %lu\n", GetLastError());
140  return FALSE;
141  }
142 
143  /* Open the new user HKCU key */
145  &hKeyCurrentUser);
146  if (lError == ERROR_SUCCESS)
147  {
148  BuildVolatileEnvironment(Session,
149  hKeyCurrentUser);
150  RegCloseKey(hKeyCurrentUser);
151  }
152 
153  /* Revert the impersonation */
154  RevertToSelf();
155 
156  TRACE("WL: CreateUserEnvironment done\n");
157 
158  return TRUE;
159 }
#define TRUE
Definition: types.h:120
#define ERROR_SUCCESS
Definition: deptool.c:10
BOOL WINAPI RevertToSelf(VOID)
Definition: security.c:1476
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1056
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
#define FALSE
Definition: types.h:117
long LONG
Definition: pedump.c:60
static VOID BuildVolatileEnvironment(IN PWLSESSION Session, IN HKEY hKeyCurrentUser)
Definition: environment.c:19
BOOL WINAPI ImpersonateLoggedOnUser(HANDLE hToken)
Definition: misc.c:152
#define TRACE(s)
Definition: solgame.cpp:4
HANDLE HKEY
Definition: registry.h:24
#define ERR(fmt,...)
Definition: debug.h:109
LONG WINAPI RegOpenCurrentUser(IN REGSAM samDesired, OUT PHKEY phkResult)
Definition: reg.c:3247
#define KEY_CREATE_SUB_KEY
Definition: nt_native.h:1018
BOOL CreateWindowStationAndDesktops ( IN OUT PWLSESSION  Session)

Definition at line 1123 of file wlx.c.

Referenced by WinMain().

1125 {
1126  BYTE LocalSystemBuffer[SECURITY_MAX_SID_SIZE];
1127  BYTE InteractiveBuffer[SECURITY_MAX_SID_SIZE];
1128  PSID pLocalSystemSid = (PSID)&LocalSystemBuffer;
1129  PSID pInteractiveSid = (PSID)InteractiveBuffer;
1130  DWORD SidSize, AclSize;
1131  PACL pDefaultAcl = NULL;
1132  PACL pUserDesktopAcl = NULL;
1133  SECURITY_DESCRIPTOR DefaultSecurityDescriptor;
1134  SECURITY_ATTRIBUTES DefaultSecurity;
1135  SECURITY_DESCRIPTOR UserDesktopSecurityDescriptor;
1136  SECURITY_ATTRIBUTES UserDesktopSecurity;
1137  BOOL ret = FALSE;
1138 
1139  /*
1140  * Prepare information for ACLs we will apply
1141  */
1142  SidSize = SECURITY_MAX_SID_SIZE;
1143  if (!CreateWellKnownSid(WinLocalSystemSid, NULL, pLocalSystemSid, &SidSize))
1144  {
1145  ERR("WL: CreateWellKnownSid() failed (error %lu)\n", GetLastError());
1146  goto cleanup;
1147  }
1148  SidSize = SECURITY_MAX_SID_SIZE;
1149  if (!CreateWellKnownSid(WinInteractiveSid, NULL, pInteractiveSid, &SidSize))
1150  {
1151  ERR("WL: CreateWellKnownSid() failed (error %lu)\n", GetLastError());
1152  goto cleanup;
1153  }
1154 
1155  AclSize = sizeof(ACL)
1156  + FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart) + GetLengthSid(pLocalSystemSid)
1157  + FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart) + GetLengthSid(pInteractiveSid);
1158  pDefaultAcl = HeapAlloc(GetProcessHeap(), 0, AclSize);
1159  pUserDesktopAcl = HeapAlloc(GetProcessHeap(), 0, AclSize);
1160  if (!pDefaultAcl || !pUserDesktopAcl)
1161  {
1162  ERR("WL: HeapAlloc() failed\n");
1163  goto cleanup;
1164  }
1165 
1166  if (!InitializeAcl(pDefaultAcl, AclSize, ACL_REVISION)
1167  || !InitializeAcl(pUserDesktopAcl, AclSize, ACL_REVISION))
1168  {
1169  ERR("WL: InitializeAcl() failed (error %lu)\n", GetLastError());
1170  goto cleanup;
1171  }
1172 
1173  /*
1174  * Create default ACL (window station, winlogon desktop, screen saver desktop)
1175  */
1176  if (!AddAccessAllowedAce(pDefaultAcl, ACL_REVISION, GENERIC_ALL, pLocalSystemSid)
1177  || !AddAccessAllowedAce(pDefaultAcl, ACL_REVISION, GENERIC_READ, pInteractiveSid))
1178  {
1179  ERR("WL: AddAccessAllowedAce() failed (error %lu)\n", GetLastError());
1180  goto cleanup;
1181  }
1182 
1183  /*
1184  * Create the default security descriptor
1185  */
1186  if (!InitializeSecurityDescriptor(&DefaultSecurityDescriptor, SECURITY_DESCRIPTOR_REVISION))
1187  {
1188  ERR("WL: InitializeSecurityDescriptor() failed (error %lu)\n", GetLastError());
1189  goto cleanup;
1190  }
1191 
1192  if (!SetSecurityDescriptorDacl(&DefaultSecurityDescriptor, TRUE, pDefaultAcl, FALSE))
1193  {
1194  ERR("WL: SetSecurityDescriptorDacl() failed (error %lu)\n", GetLastError());
1195  goto cleanup;
1196  }
1197 
1198  DefaultSecurity.nLength = sizeof(SECURITY_ATTRIBUTES);
1199  DefaultSecurity.lpSecurityDescriptor = &DefaultSecurityDescriptor;
1200  DefaultSecurity.bInheritHandle = TRUE;
1201 
1202  /*
1203  * Create user desktop ACL
1204  */
1205  if (!AddAccessAllowedAce(pUserDesktopAcl, ACL_REVISION, GENERIC_ALL, pLocalSystemSid)
1206  || !AddAccessAllowedAce(pUserDesktopAcl, ACL_REVISION, GENERIC_ALL, pInteractiveSid))
1207  {
1208  ERR("WL: AddAccessAllowedAce() failed (error %lu)\n", GetLastError());
1209  goto cleanup;
1210  }
1211 
1212  /*
1213  * Create the user desktop security descriptor
1214  */
1215  if (!InitializeSecurityDescriptor(&UserDesktopSecurityDescriptor, SECURITY_DESCRIPTOR_REVISION))
1216  {
1217  ERR("WL: InitializeSecurityDescriptor() failed (error %lu)\n", GetLastError());
1218  goto cleanup;
1219  }
1220 
1221  if (!SetSecurityDescriptorDacl(&UserDesktopSecurityDescriptor, TRUE, pUserDesktopAcl, FALSE))
1222  {
1223  ERR("WL: SetSecurityDescriptorDacl() failed (error %lu)\n", GetLastError());
1224  goto cleanup;
1225  }
1226 
1227  UserDesktopSecurity.nLength = sizeof(SECURITY_ATTRIBUTES);
1228  UserDesktopSecurity.lpSecurityDescriptor = &UserDesktopSecurityDescriptor;
1229  UserDesktopSecurity.bInheritHandle = TRUE;
1230 
1231  /*
1232  * Create the interactive window station
1233  */
1234  Session->InteractiveWindowStationName = L"WinSta0";
1235  Session->InteractiveWindowStation = CreateWindowStationW(
1236  Session->InteractiveWindowStationName,
1237  0,
1239  &DefaultSecurity);
1240  if (!Session->InteractiveWindowStation)
1241  {
1242  ERR("WL: Failed to create window station (%lu)\n", GetLastError());
1243  goto cleanup;
1244  }
1245  if (!SetProcessWindowStation(Session->InteractiveWindowStation))
1246  {
1247  ERR("WL: SetProcessWindowStation() failed (error %lu)\n", GetLastError());
1248  goto cleanup;
1249  }
1250 
1251  /*
1252  * Create the application desktop
1253  */
1254  Session->ApplicationDesktop = CreateDesktopW(
1255  L"Default",
1256  NULL,
1257  NULL,
1258  0, /* FIXME: Add DF_ALLOWOTHERACCOUNTHOOK flag? */
1260  &UserDesktopSecurity);
1261  if (!Session->ApplicationDesktop)
1262  {
1263  ERR("WL: Failed to create Default desktop (%lu)\n", GetLastError());
1264  goto cleanup;
1265  }
1266 
1267  /*
1268  * Create the winlogon desktop
1269  */
1270  Session->WinlogonDesktop = CreateDesktopW(
1271  L"Winlogon",
1272  NULL,
1273  NULL,
1274  0,
1276  &DefaultSecurity);
1277  if (!Session->WinlogonDesktop)
1278  {
1279  ERR("WL: Failed to create Winlogon desktop (%lu)\n", GetLastError());
1280  goto cleanup;
1281  }
1282 
1283  /*
1284  * Create the screen saver desktop
1285  */
1286  Session->ScreenSaverDesktop = CreateDesktopW(
1287  L"Screen-Saver",
1288  NULL,
1289  NULL,
1290  0,
1292  &DefaultSecurity);
1293  if(!Session->ScreenSaverDesktop)
1294  {
1295  ERR("WL: Failed to create Screen-Saver desktop (%lu)\n", GetLastError());
1296  goto cleanup;
1297  }
1298 
1299  /*
1300  * Switch to winlogon desktop
1301  */
1302  if (!SetThreadDesktop(Session->WinlogonDesktop) ||
1303  !SwitchDesktop(Session->WinlogonDesktop))
1304  {
1305  ERR("WL: Cannot switch to Winlogon desktop (%lu)\n", GetLastError());
1306  goto cleanup;
1307  }
1308 
1309  ret = TRUE;
1310 
1311 cleanup:
1312  if (!ret)
1313  {
1314  if (Session->ApplicationDesktop)
1315  {
1316  CloseDesktop(Session->ApplicationDesktop);
1317  Session->ApplicationDesktop = NULL;
1318  }
1319  if (Session->WinlogonDesktop)
1320  {
1321  CloseDesktop(Session->WinlogonDesktop);
1322  Session->WinlogonDesktop = NULL;
1323  }
1324  if (Session->ScreenSaverDesktop)
1325  {
1326  CloseDesktop(Session->ScreenSaverDesktop);
1327  Session->ScreenSaverDesktop = NULL;
1328  }
1329  if (Session->InteractiveWindowStation)
1330  {
1331  CloseWindowStation(Session->InteractiveWindowStation);
1332  Session->InteractiveWindowStation = NULL;
1333  }
1334  }
1335  HeapFree(GetProcessHeap(), 0, pDefaultAcl);
1336  HeapFree(GetProcessHeap(), 0, pUserDesktopAcl);
1337  return ret;
1338 }
#define MAXIMUM_ALLOWED
Definition: nt_native.h:83
#define GENERIC_ALL
Definition: nt_native.h:92
#define TRUE
Definition: types.h:120
#define SECURITY_MAX_SID_SIZE
Definition: setypes.h:458
BOOL WINAPI InitializeAcl(PACL pAcl, DWORD nAclLength, DWORD dwAclRevision)
Definition: security.c:874
Definition: bidi.c:75
BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD dwRevision)
Definition: security.c:797
BOOL WINAPI AddAccessAllowedAce(PACL pAcl, DWORD dwAceRevision, DWORD AccessMask, PSID pSid)
Definition: security.c:907
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1056
BOOL WINAPI SetProcessWindowStation(_In_ HWINSTA)
DWORD DWORD
Definition: winlogon.h:75
BOOL WINAPI SetThreadDesktop(_In_ HDESK)
#define SECURITY_DESCRIPTOR_REVISION
Definition: setypes.h:58
#define FALSE
Definition: types.h:117
struct _ACL ACL
smooth NULL
Definition: ftsmooth.c:513
unsigned int BOOL
Definition: ntddk_ex.h:94
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
DWORD WINAPI GetLengthSid(PSID pSid)
Definition: security.c:787
BOOL WINAPI SwitchDesktop(_In_ HDESK)
struct _SID * PSID
Definition: eventlog.c:35
int ret
#define GENERIC_READ
Definition: compat.h:124
unsigned char BYTE
Definition: ntddk_ex.h:96
#define ERR(fmt,...)
Definition: debug.h:109
static PSID pLocalSystemSid
Definition: security.c:17
LPVOID lpSecurityDescriptor
Definition: compat.h:181
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bDaclPresent, PACL pDacl, BOOL bDaclDefaulted)
Definition: sec.c:262
#define ACL_REVISION
Definition: setypes.h:39
HWINSTA WINAPI CreateWindowStationW(_In_opt_ LPCWSTR lpwinsta, _In_ DWORD dwFlags, _In_ ACCESS_MASK dwDesiredAccess, _In_opt_ LPSECURITY_ATTRIBUTES lpsa)
BOOL WINAPI CloseDesktop(_In_ HDESK)
char * cleanup(char *str)
Definition: wpickclick.c:99
HDESK WINAPI CreateDesktopW(LPCWSTR lpszDesktop, LPCWSTR lpszDevice, LPDEVMODEW pDevmode, DWORD dwFlags, ACCESS_MASK dwDesiredAccess, LPSECURITY_ATTRIBUTES lpsa)
Definition: desktop.c:471
BOOL WINAPI CreateWellKnownSid(IN WELL_KNOWN_SID_TYPE WellKnownSidType, IN PSID DomainSid OPTIONAL, OUT PSID pSid, IN OUT DWORD *cbSid)
Definition: security.c:591
#define HeapFree(x, y, z)
Definition: compat.h:394
BOOL WINAPI CloseWindowStation(_In_ HWINSTA)
struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES
BOOL DisplayStatusMessage ( IN PWLSESSION  Session,
IN HDESK  hDesktop,
IN UINT  ResourceId 
)

Definition at line 216 of file winlogon.c.

Referenced by HandleLogoff(), HandleLogon(), HandleShutdown(), and WinMain().

220 {
221  WCHAR StatusMsg[MAX_PATH];
222 
223  if (Session->Gina.Version < WLX_VERSION_1_3)
224  return TRUE;
225 
226  if (Session->SuppressStatus)
227  return TRUE;
228 
229  if (LoadStringW(hAppInstance, ResourceId, StatusMsg, MAX_PATH) == 0)
230  return FALSE;
231 
232  return Session->Gina.Functions.WlxDisplayStatusMessage(Session->Gina.Context, hDesktop, 0, NULL, StatusMsg);
233 }
#define TRUE
Definition: types.h:120
__wchar_t WCHAR
Definition: xmlstorage.h:180
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define FALSE
Definition: types.h:117
HINSTANCE hAppInstance
Definition: winlogon.c:19
smooth NULL
Definition: ftsmooth.c:513
#define MAX_PATH
Definition: compat.h:26
#define WLX_VERSION_1_3
Definition: winwlx.h:31
DWORD GetSetupType ( VOID  )

Definition at line 16 of file setup.c.

Referenced by SASWindowProc(), and WinMain().

17 {
18  DWORD dwError;
19  HKEY hKey;
20  DWORD dwType;
21  DWORD dwSize;
22  DWORD dwSetupType;
23 
24  TRACE("GetSetupType()\n");
25 
26  /* Open key */
28  L"SYSTEM\\Setup",
29  0,
31  &hKey);
32  if (dwError != ERROR_SUCCESS)
33  return 0;
34 
35  /* Read key */
36  dwSize = sizeof(DWORD);
37  dwError = RegQueryValueExW(hKey,
38  L"SetupType",
39  NULL,
40  &dwType,
41  (LPBYTE)&dwSetupType,
42  &dwSize);
43 
44  /* Close key, and check if returned values are correct */
45  RegCloseKey(hKey);
46  if (dwError != ERROR_SUCCESS || dwType != REG_DWORD || dwSize != sizeof(DWORD))
47  return 0;
48 
49  TRACE("GetSetupType() returns %lu\n", dwSetupType);
50  return dwSetupType;
51 }
#define ERROR_SUCCESS
Definition: deptool.c:10
Definition: bidi.c:75
unsigned char * LPBYTE
Definition: typedefs.h:53
#define DWORD
Definition: msvc.h:34
DWORD DWORD
Definition: winlogon.h:75
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
smooth NULL
Definition: ftsmooth.c:513
#define TRACE(s)
Definition: solgame.cpp:4
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4134
HANDLE HKEY
Definition: registry.h:24
#define REG_DWORD
Definition: nt_native.h:1497
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3381
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
DWORD dwSize
Definition: wglext.h:734
HWND GetTopDialogWindow ( VOID  )

Definition at line 109 of file wlx.c.

Referenced by DispatchSAS().

110 {
111  PDIALOG_LIST_ENTRY Current;
112  PLIST_ENTRY ListEntry;
113 
114  ListEntry = DialogListHead.Flink;
115  if (ListEntry != &DialogListHead)
116  {
117  Current = CONTAINING_RECORD(ListEntry,
119  Entry);
120 
121  TRACE("Found entry: %p window %p\n", Current, Current->hWnd);
122  return Current->hWnd;
123  }
124 
125  TRACE("Found no window\n");
126  return NULL;
127 }
smooth NULL
Definition: ftsmooth.c:513
static LIST_ENTRY DialogListHead
Definition: wlx.c:40
struct _LIST_ENTRY * Flink
Definition: typedefs.h:120
#define TRACE(s)
Definition: solgame.cpp:4
HWND hWnd
Definition: wlx.c:32
Definition: typedefs.h:118
Definition: wlx.c:29
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
base of all file and directory entries
Definition: entries.h:82
BOOL GinaInit ( IN OUT PWLSESSION  Session)

Definition at line 921 of file wlx.c.

Referenced by WinMain().

923 {
924  DWORD GinaDllVersion;
925 
926  if (!LoadGina(&Session->Gina.Functions, &GinaDllVersion, &Session->Gina.hDllInstance))
927  return FALSE;
928 
929  Session->Gina.Context = NULL;
930  Session->Gina.Version = GinaDllVersion;
931  Session->Gina.UseCtrlAltDelete = FALSE;
932  Session->SuppressStatus = FALSE;
933 
934  TRACE("Calling WlxInitialize(\"%S\")\n", Session->InteractiveWindowStationName);
935  return Session->Gina.Functions.WlxInitialize(
936  Session->InteractiveWindowStationName,
937  (HANDLE)Session,
938  NULL,
940  &Session->Gina.Context);
941 }
DWORD *typedef PVOID
Definition: winlogon.h:52
DWORD DWORD
Definition: winlogon.h:75
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:513
#define TRACE(s)
Definition: solgame.cpp:4
static BOOL LoadGina(IN OUT PGINAFUNCTIONS Functions, OUT DWORD *DllVersion, OUT HMODULE *GinaInstance)
Definition: wlx.c:821
DWORD *typedef HANDLE
Definition: winlogon.h:52
static WLX_DISPATCH_VERSION_1_4 FunctionTable
Definition: wlx.c:738
NTSTATUS HandleShutdown ( IN OUT PWLSESSION  Session,
IN DWORD  wlxAction 
)

Definition at line 877 of file sas.c.

Referenced by DoGenericAction(), and WinMain().

880 {
881  PLOGOFF_SHUTDOWN_DATA LSData;
882  HANDLE hThread;
883  DWORD exitCode;
884  BOOLEAN Old;
885 
886  // SwitchDesktop(Session->WinlogonDesktop);
887  DisplayStatusMessage(Session, Session->WinlogonDesktop, IDS_REACTOSISSHUTTINGDOWN);
888 
889  /* Prepare data for shutdown thread */
890  LSData = HeapAlloc(GetProcessHeap(), 0, sizeof(LOGOFF_SHUTDOWN_DATA));
891  if (!LSData)
892  {
893  ERR("Failed to allocate mem for thread data\n");
894  return STATUS_NO_MEMORY;
895  }
896  if (wlxAction == WLX_SAS_ACTION_SHUTDOWN_POWER_OFF)
897  LSData->Flags = EWX_POWEROFF;
898  else if (wlxAction == WLX_SAS_ACTION_SHUTDOWN_REBOOT)
899  LSData->Flags = EWX_REBOOT;
900  else
901  LSData->Flags = EWX_SHUTDOWN;
902  LSData->Session = Session;
903 
904  // FIXME: We may need to specify this flag to really force application kill
905  // (we are shutting down ReactOS, not just logging off so no hangs, etc...
906  // should be allowed).
907  // LSData->Flags |= EWX_FORCE;
908 
909  /* Run shutdown thread */
910  hThread = CreateThread(NULL, 0, LogoffShutdownThread, (LPVOID)LSData, 0, NULL);
911  if (!hThread)
912  {
913  ERR("Unable to create shutdown thread, error %lu\n", GetLastError());
914  HeapFree(GetProcessHeap(), 0, LSData);
915  return STATUS_UNSUCCESSFUL;
916  }
917  WaitForSingleObject(hThread, INFINITE);
918  HeapFree(GetProcessHeap(), 0, LSData);
919  if (!GetExitCodeThread(hThread, &exitCode))
920  {
921  ERR("Unable to get exit code of shutdown thread (error %lu)\n", GetLastError());
922  CloseHandle(hThread);
923  return STATUS_UNSUCCESSFUL;
924  }
925  CloseHandle(hThread);
926  if (exitCode == 0)
927  {
928  ERR("Shutdown thread returned failure\n");
929  return STATUS_UNSUCCESSFUL;
930  }
931 
933 
934  /* Destroy SAS window */
935  UninitializeSAS(Session);
936 
937  /* Now we can shut down NT */
938  ERR("Shutting down NT...\n");
940  if (wlxAction == WLX_SAS_ACTION_SHUTDOWN_REBOOT)
941  {
943  }
944  else
945  {
946  if (FALSE)
947  {
948  /* FIXME - only show this dialog if it's a shutdown and the computer doesn't support APM */
951  }
953  }
955  return STATUS_SUCCESS;
956 }
#define STATUS_SUCCESS
Definition: contextmenu.cpp:55
#define MAKEINTRESOURCE
Definition: winuser.h:591
BOOL DisplayStatusMessage(IN PWLSESSION Session, IN HDESK hDesktop, IN UINT ResourceId)
Definition: winlogon.c:216
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:398
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1056
NTSYSAPI NTSTATUS NTAPI RtlAdjustPrivilege(_In_ ULONG Privilege, _In_ BOOLEAN NewValue, _In_ BOOLEAN ForThread, _Out_ PBOOLEAN OldValue)
PWLSESSION Session
Definition: sas.c:41
static VOID UninitializeSAS(IN OUT PWLSESSION Session)
Definition: sas.c:863
#define EWX_REBOOT
Definition: winuser.h:633
DWORD DWORD
Definition: winlogon.h:75
static DWORD WINAPI LogoffShutdownThread(LPVOID Parameter)
Definition: sas.c:540
BOOL WINAPI GetExitCodeThread(IN HANDLE hThread, OUT LPDWORD lpExitCode)
Definition: thread.c:525
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
#define DialogBox
Definition: winuser.h:5606
static INT_PTR CALLBACK ShutdownComputerWindowProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: sas.c:831
#define FALSE
Definition: types.h:117
#define EWX_SHUTDOWN
Definition: winuser.h:634
#define IDS_REACTOSISSHUTTINGDOWN
Definition: resource.h:28
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:135
smooth NULL
Definition: ftsmooth.c:513
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:623
#define SE_SHUTDOWN_PRIVILEGE
Definition: security.c:679
#define EWX_POWEROFF
Definition: winuser.h:632
unsigned char BOOLEAN
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
#define WLX_SAS_ACTION_SHUTDOWN_POWER_OFF
Definition: winwlx.h:62
NTSTATUS NTAPI NtShutdownSystem(IN SHUTDOWN_ACTION Action)
Definition: shutdown.c:24
#define IDD_SHUTDOWNCOMPUTER
Definition: resource.h:5
#define ERR(fmt,...)
Definition: debug.h:109
VOID CallNotificationDlls(PWLSESSION pSession, NOTIFICATION_TYPE Type)
Definition: notify.c:249
DWORD *typedef HANDLE
Definition: winlogon.h:52
#define STATUS_NO_MEMORY
Definition: ntstatus.h:246
HANDLE hThread
Definition: wizard.c:27
#define WLX_SAS_ACTION_SHUTDOWN_REBOOT
Definition: winwlx.h:63
#define INFINITE
Definition: serial.h:102
#define HeapFree(x, y, z)
Definition: compat.h:394
HINSTANCE hAppInstance
Definition: mmc.c:23
VOID InitDialogListHead ( VOID  )

Definition at line 45 of file wlx.c.

Referenced by WinMain().

46 {
48 }
static LIST_ENTRY DialogListHead
Definition: wlx.c:40
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
BOOL InitializeSAS ( IN OUT PWLSESSION  Session)

Definition at line 1508 of file sas.c.

Referenced by WinMain().

1510 {
1511  WNDCLASSEXW swc;
1512  BOOL ret = FALSE;
1513 
1514  if (!SwitchDesktop(Session->WinlogonDesktop))
1515  {
1516  ERR("WL: Failed to switch to winlogon desktop\n");
1517  goto cleanup;
1518  }
1519 
1520  /* Register SAS window class */
1521  swc.cbSize = sizeof(WNDCLASSEXW);
1522  swc.style = CS_SAVEBITS;
1523  swc.lpfnWndProc = SASWindowProc;
1524  swc.cbClsExtra = 0;
1525  swc.cbWndExtra = 0;
1526  swc.hInstance = hAppInstance;
1527  swc.hIcon = NULL;
1528  swc.hCursor = NULL;
1529  swc.hbrBackground = NULL;
1530  swc.lpszMenuName = NULL;
1532  swc.hIconSm = NULL;
1533  if (RegisterClassExW(&swc) == 0)
1534  {
1535  ERR("WL: Failed to register SAS window class\n");
1536  goto cleanup;
1537  }
1538 
1539  /* Create invisible SAS window */
1540  Session->SASWindow = CreateWindowExW(
1541  0,
1544  WS_POPUP,
1545  0, 0, 0, 0, 0, 0,
1546  hAppInstance, Session);
1547  if (!Session->SASWindow)
1548  {
1549  ERR("WL: Failed to create SAS window\n");
1550  goto cleanup;
1551  }
1552 
1553  /* Register SAS window to receive SAS notifications */
1554  if (!SetLogonNotifyWindow(Session->SASWindow))
1555  {
1556  ERR("WL: Failed to register SAS window\n");
1557  goto cleanup;
1558  }
1559 
1560  if (!SetDefaultLanguage(NULL))
1561  return FALSE;
1562 
1563  ret = TRUE;
1564 
1565 cleanup:
1566  if (!ret)
1567  UninitializeSAS(Session);
1568  return ret;
1569 }
#define TRUE
Definition: types.h:120
int cbWndExtra
Definition: winuser.h:3163
BOOL WINAPI SetLogonNotifyWindow(HWND Wnd)
Definition: logon.c:97
static LRESULT CALLBACK SASWindowProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: sas.c:1311
HICON hIcon
Definition: winuser.h:3165
struct _WNDCLASSEXW WNDCLASSEXW
static VOID UninitializeSAS(IN OUT PWLSESSION Session)
Definition: sas.c:863
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
LPCWSTR lpszMenuName
Definition: winuser.h:3168
#define WINLOGON_SAS_CLASS
Definition: sas.c:25
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:513
int cbClsExtra
Definition: winuser.h:3162
LPCWSTR lpszClassName
Definition: winuser.h:3169
unsigned int BOOL
Definition: ntddk_ex.h:94
HBRUSH hbrBackground
Definition: winuser.h:3167
UINT cbSize
Definition: winuser.h:3159
BOOL WINAPI SwitchDesktop(_In_ HDESK)
HINSTANCE hInstance
Definition: winuser.h:3164
#define CS_SAVEBITS
Definition: winuser.h:652
BOOL SetDefaultLanguage(IN PWLSESSION Session)
Definition: sas.c:108
int ret
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
HCURSOR hCursor
Definition: winuser.h:3166
UINT style
Definition: winuser.h:3160
WNDPROC lpfnWndProc
Definition: winuser.h:3161
#define ERR(fmt,...)
Definition: debug.h:109
#define WS_POPUP
Definition: pedump.c:616
#define WINLOGON_SAS_TITLE
Definition: sas.c:26
HICON hIconSm
Definition: winuser.h:3170
char * cleanup(char *str)
Definition: wpickclick.c:99
HINSTANCE hAppInstance
Definition: mmc.c:23
BOOL InitializeScreenSaver ( IN OUT PWLSESSION  Session)

Definition at line 204 of file screensaver.c.

Referenced by HandleLogon().

206 {
207  HANDLE ScreenSaverThread;
208 
209 #ifndef USE_GETLASTINPUTINFO
210  /* Register hooks to detect keyboard and mouse activity */
211  Session->KeyboardHook = SetWindowsHookEx(WH_KEYBOARD_LL, KeyboardActivityProc, hAppInstance, 0);
212  if (!Session->KeyboardHook)
213  {
214  ERR("WL: Unable to register keyboard hook\n");
215  return FALSE;
216  }
217 
218  Session->MouseHook = SetWindowsHookEx(WH_MOUSE_LL, MouseActivityProc, hAppInstance, 0);
219  if (!Session->MouseHook)
220  {
221  ERR("WL: Unable to register mouse hook\n");
222  return FALSE;
223  }
224 #endif
225 
226  Session->hScreenSaverParametersChanged = CreateEventW(NULL, FALSE, FALSE, NULL);
227  if (!Session->hScreenSaverParametersChanged)
228  {
229  WARN("WL: Unable to create screen saver event (error %lu)\n", GetLastError());
230  return TRUE;
231  }
232 
233  Session->hEndOfScreenSaverThread = CreateEventW(NULL, FALSE, FALSE, NULL);
234  if (!Session->hEndOfScreenSaverThread)
235  {
236  WARN("WL: Unable to create screen saver event (error %lu)\n", GetLastError());
237  CloseHandle(Session->hScreenSaverParametersChanged);
238  return TRUE;
239  }
240 
241  ScreenSaverThread = CreateThread(NULL,
242  0,
244  Session,
245  0,
246  NULL);
247  if (ScreenSaverThread)
248  CloseHandle(ScreenSaverThread);
249  else
250  ERR("WL: Unable to start screen saver thread\n");
251 
252  return TRUE;
253 }
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:398
#define WARN(fmt,...)
Definition: debug.h:111
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1056
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:597
#define WH_MOUSE_LL
Definition: winuser.h:44
#define FALSE
Definition: types.h:117
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:135
smooth NULL
Definition: ftsmooth.c:513
#define WH_KEYBOARD_LL
Definition: winuser.h:43
#define SetWindowsHookEx
Definition: winuser.h:5701
#define ERR(fmt,...)
Definition: debug.h:109
DWORD *typedef HANDLE
Definition: winlogon.h:52
static DWORD WINAPI ScreenSaverThreadMain(IN LPVOID lpParameter)
Definition: screensaver.c:76
HINSTANCE hAppInstance
Definition: mmc.c:23
BOOL InitNotifications ( VOID  )

Definition at line 196 of file notify.c.

Referenced by WinMain().

197 {
198  HKEY hNotifyKey = NULL;
199  LONG lError;
200  DWORD dwIndex;
201  WCHAR szKeyName[80];
202  DWORD dwKeyName;
203 
204  TRACE("InitNotifications()\n");
205 
207 
209  L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\Notify",
210  0,
212  &hNotifyKey);
213  if (lError != ERROR_SUCCESS)
214  {
215  TRACE("RegOpenKeyExW()\n");
216  return TRUE;
217  }
218 
219  dwIndex = 0;
220  for(;;)
221  {
222  dwKeyName = 80 * sizeof(WCHAR);
223  lError = RegEnumKeyExW(hNotifyKey,
224  dwIndex,
225  szKeyName,
226  &dwKeyName,
227  NULL,
228  NULL,
229  NULL,
230  NULL);
231  if (lError != ERROR_SUCCESS)
232  break;
233 
234  TRACE("Notification DLL: %S\n", szKeyName);
235  LoadNotificationDll(hNotifyKey, szKeyName);
236 
237  dwIndex++;
238  }
239 
240  RegCloseKey(hNotifyKey);
241 
242  TRACE("InitNotifications() done\n");
243 
244  return TRUE;
245 }
#define TRUE
Definition: types.h:120
#define ERROR_SUCCESS
Definition: deptool.c:10
Definition: bidi.c:75
#define KEY_READ
Definition: nt_native.h:1023
__wchar_t WCHAR
Definition: xmlstorage.h:180
static LIST_ENTRY NotificationDllListHead
Definition: notify.c:50
#define WCHAR
Definition: msvc.h:43
DWORD DWORD
Definition: winlogon.h:75
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
long LONG
Definition: pedump.c:60
smooth NULL
Definition: ftsmooth.c:513
#define TRACE(s)
Definition: solgame.cpp:4
static VOID LoadNotificationDll(HKEY hNotifyKey, PWSTR pKeyName)
Definition: notify.c:84
HANDLE HKEY
Definition: registry.h:24
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3381
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
Definition: reg.c:2541
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define KEY_ENUMERATE_SUB_KEYS
Definition: nt_native.h:1019
typedef int ( WINAPI PFWLXLOGGEDOUTSAS)
BOOL PlaySoundRoutine ( IN LPCWSTR  FileName,
IN UINT  Logon,
IN UINT  Flags 
)

Definition at line 237 of file sas.c.

Referenced by HandleMessageBeep(), and PlayLogonSoundThread().

241 {
242  typedef BOOL (WINAPI *PLAYSOUNDW)(LPCWSTR,HMODULE,DWORD);
243  typedef UINT (WINAPI *WAVEOUTGETNUMDEVS)(VOID);
244  PLAYSOUNDW Play;
245  WAVEOUTGETNUMDEVS waveOutGetNumDevs;
246  UINT NumDevs;
247  HMODULE hLibrary;
248  BOOL Ret = FALSE;
249 
250  hLibrary = LoadLibraryW(L"winmm.dll");
251  if (hLibrary)
252  {
253  waveOutGetNumDevs = (WAVEOUTGETNUMDEVS)GetProcAddress(hLibrary, "waveOutGetNumDevs");
254  if (waveOutGetNumDevs)
255  {
256  NumDevs = waveOutGetNumDevs();
257  if (!NumDevs)
258  {
259  if (!bLogon)
260  {
261  Beep(500, 500);
262  }
263  FreeLibrary(hLibrary);
264  return FALSE;
265  }
266  }
267 
268  Play = (PLAYSOUNDW)GetProcAddress(hLibrary, "PlaySoundW");
269  if (Play)
270  {
271  Ret = Play(FileName, NULL, Flags);
272  }
273  FreeLibrary(hLibrary);
274  }
275 
276  return Ret;
277 }
Definition: bidi.c:75
#define DWORD
Definition: msvc.h:34
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define FALSE
Definition: types.h:117
#define LoadLibraryW(x)
Definition: compat.h:404
smooth NULL
Definition: ftsmooth.c:513
UINT WINAPI waveOutGetNumDevs(void)
Definition: winmm.c:2140
#define FreeLibrary(x)
Definition: compat.h:405
unsigned int BOOL
Definition: ntddk_ex.h:94
#define VOID
Definition: acefi.h:82
HMODULE hLibrary
Definition: odbccp32.c:12
#define WINAPI
Definition: msvc.h:20
unsigned int UINT
Definition: ndis.h:50
HANDLE HMODULE
Definition: typedefs.h:76
BOOL WINAPI Beep(IN DWORD dwFreq, IN DWORD dwDuration)
Definition: deviceio.c:48
#define GetProcAddress(x, y)
Definition: compat.h:410
#define UINT
Definition: msvc.h:27
#define BOOL
Definition: msvc.h:23
#define LPCWSTR
Definition: msvc.h:45
BOOL RemoveStatusMessage ( IN PWLSESSION  Session)

Definition at line 237 of file winlogon.c.

Referenced by DoGenericAction(), HandleLogon(), and WinMain().

239 {
240  if (Session->Gina.Version < WLX_VERSION_1_3)
241  return TRUE;
242 
243  return Session->Gina.Functions.WlxRemoveStatusMessage(Session->Gina.Context);
244 }
#define TRUE
Definition: types.h:120
#define WLX_VERSION_1_3
Definition: winwlx.h:31
BOOL RunSetup ( VOID  )

Definition at line 148 of file setup.c.

Referenced by WinMain().

149 {
150  HANDLE hThread;
151 
152  hThread = CreateThread(NULL,
153  0,
155  NULL,
156  0,
157  NULL);
158  if (hThread != NULL)
159  CloseHandle(hThread);
160 
161  return hThread != NULL;
162 }
#define CloseHandle
Definition: compat.h:398
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:135
smooth NULL
Definition: ftsmooth.c:513
static DWORD WINAPI RunSetupThreadProc(IN LPVOID lpParameter)
Definition: setup.c:57
DWORD *typedef HANDLE
Definition: winlogon.h:52
HANDLE hThread
Definition: wizard.c:27
BOOL SetDefaultLanguage ( IN PWLSESSION  Session)

Definition at line 108 of file sas.c.

Referenced by HandleLogon(), and InitializeSAS().

110 {
111  BOOL ret = FALSE;
112  BOOL UserProfile;
113  LONG rc;
114  HKEY UserKey, hKey = NULL;
115  LPCWSTR SubKey, ValueName;
116  DWORD dwType, dwSize;
117  LPWSTR Value = NULL;
118  UNICODE_STRING ValueString;
120  LCID Lcid;
121 
122  UserProfile = (Session && Session->UserToken);
123 
124  if (UserProfile && !ImpersonateLoggedOnUser(Session->UserToken))
125  {
126  ERR("WL: ImpersonateLoggedOnUser() failed with error %lu\n", GetLastError());
127  return FALSE;
128  // FIXME: ... or use the default language of the system??
129  // UserProfile = FALSE;
130  }
131 
132  if (UserProfile)
133  {
134  rc = RegOpenCurrentUser(MAXIMUM_ALLOWED, &UserKey);
135  if (rc != ERROR_SUCCESS)
136  {
137  TRACE("RegOpenCurrentUser() failed with error %lu\n", rc);
138  goto cleanup;
139  }
140 
141  SubKey = L"Control Panel\\International";
142  ValueName = L"Locale";
143  }
144  else
145  {
146  UserKey = NULL;
147  SubKey = L"System\\CurrentControlSet\\Control\\Nls\\Language";
148  ValueName = L"Default";
149  }
150 
151  rc = RegOpenKeyExW(UserKey ? UserKey : HKEY_LOCAL_MACHINE,
152  SubKey,
153  0,
154  KEY_READ,
155  &hKey);
156 
157  if (UserKey)
158  RegCloseKey(UserKey);
159 
160  if (rc != ERROR_SUCCESS)
161  {
162  TRACE("RegOpenKeyEx() failed with error %lu\n", rc);
163  goto cleanup;
164  }
165 
166  rc = RegQueryValueExW(hKey,
167  ValueName,
168  NULL,
169  &dwType,
170  NULL,
171  &dwSize);
172  if (rc != ERROR_SUCCESS)
173  {
174  TRACE("RegQueryValueEx() failed with error %lu\n", rc);
175  goto cleanup;
176  }
177  else if (dwType != REG_SZ)
178  {
179  TRACE("Wrong type for %S\\%S registry entry (got 0x%lx, expected 0x%x)\n",
180  SubKey, ValueName, dwType, REG_SZ);
181  goto cleanup;
182  }
183 
184  Value = HeapAlloc(GetProcessHeap(), 0, dwSize);
185  if (!Value)
186  {
187  TRACE("HeapAlloc() failed\n");
188  goto cleanup;
189  }
190  rc = RegQueryValueExW(hKey,
191  ValueName,
192  NULL,
193  NULL,
194  (LPBYTE)Value,
195  &dwSize);
196  if (rc != ERROR_SUCCESS)
197  {
198  TRACE("RegQueryValueEx() failed with error %lu\n", rc);
199  goto cleanup;
200  }
201 
202  /* Convert Value to a Lcid */
203  ValueString.Length = ValueString.MaximumLength = (USHORT)dwSize;
204  ValueString.Buffer = Value;
205  Status = RtlUnicodeStringToInteger(&ValueString, 16, (PULONG)&Lcid);
206  if (!NT_SUCCESS(Status))
207  {
208  TRACE("RtlUnicodeStringToInteger() failed with status 0x%08lx\n", Status);
209  goto cleanup;
210  }
211 
212  TRACE("%s language is 0x%08lx\n",
213  UserProfile ? "User" : "System", Lcid);
214  Status = NtSetDefaultLocale(UserProfile, Lcid);
215  if (!NT_SUCCESS(Status))
216  {
217  TRACE("NtSetDefaultLocale() failed with status 0x%08lx\n", Status);
218  goto cleanup;
219  }
220 
221  ret = TRUE;
222 
223 cleanup:
224  if (Value)
225  HeapFree(GetProcessHeap(), 0, Value);
226 
227  if (hKey)
228  RegCloseKey(hKey);
229 
230  if (UserProfile)
231  RevertToSelf();
232 
233  return ret;
234 }
#define MAXIMUM_ALLOWED
Definition: nt_native.h:83
#define TRUE
Definition: types.h:120
#define ERROR_SUCCESS
Definition: deptool.c:10
_In_ CONST DEVPROPKEY _In_ LCID Lcid
Definition: iofuncs.h:2408
USHORT MaximumLength
Definition: env_spec_w32.h:370
Definition: bidi.c:75
#define KEY_READ
Definition: nt_native.h:1023
BOOL WINAPI RevertToSelf(VOID)
Definition: security.c:1476
unsigned char * LPBYTE
Definition: typedefs.h:53
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1056
DWORD DWORD
Definition: winlogon.h:75
_In_ PUNICODE_STRING ValueName
Definition: cmfuncs.h:264
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
#define FALSE
Definition: types.h:117
long LONG
Definition: pedump.c:60
smooth NULL
Definition: ftsmooth.c:513
BOOL WINAPI ImpersonateLoggedOnUser(HANDLE hToken)
Definition: misc.c:152
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int BOOL
Definition: ntddk_ex.h:94
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4134
HANDLE HKEY
Definition: registry.h:24
NTSTATUS NTAPI NtSetDefaultLocale(IN BOOLEAN UserProfile, IN LCID DefaultLocaleId)
Definition: locale.c:203
int ret
UINTN UINT8 Value
Definition: acefiex.h:751
Status
Definition: gdiplustypes.h:24
#define ERR(fmt,...)
Definition: debug.h:109
#define NT_SUCCESS(StatCode)
Definition: cmd.c:149
LONG NTSTATUS
Definition: DriverTester.h:11
unsigned short USHORT
Definition: pedump.c:61
unsigned int * PULONG
Definition: retypes.h:1
LONG WINAPI RegOpenCurrentUser(IN REGSAM samDesired, OUT PHKEY phkResult)
Definition: reg.c:3247
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToInteger(PUNICODE_STRING String, ULONG Base, PULONG Value)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3381
char * cleanup(char *str)
Definition: wpickclick.c:99
DWORD LCID
Definition: nls.h:14
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:394
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define REG_SZ
Definition: layer.c:33
DWORD dwSize
Definition: wglext.h:734
BOOL StartRpcServer ( VOID  )

Definition at line 20 of file rpcserver.c.

Referenced by WinMain().

21 {
23 
24  TRACE("StartRpcServer() called\n");
25 
26  Status = RpcServerUseProtseqEpW(L"ncacn_np",
28  L"\\pipe\\winreg",
29  NULL);
30  if (Status != RPC_S_OK)
31  {
32  ERR("RpcServerUseProtseqEpW() failed (Status %lx)\n", Status);
33  return FALSE;
34  }
35 
36  Status = RpcServerRegisterIf(winreg_v1_0_s_ifspec,
37  NULL,
38  NULL);
39  if (Status != RPC_S_OK)
40  {
41  ERR("RpcServerRegisterIf() failed (Status %lx)\n", Status);
42  return FALSE;
43  }
44 
45  Status = RpcServerListen(1, 20, TRUE);
46  if (Status != RPC_S_OK)
47  {
48  ERR("RpcServerListen() failed (Status %lx)\n", Status);
49  return FALSE;
50  }
51 
52  TRACE("StartRpcServer() done\n");
53  return TRUE;
54 }
#define TRUE
Definition: types.h:120
Definition: bidi.c:75
long RPC_STATUS
Definition: rpc.h:52
#define FALSE
Definition: types.h:117
RPC_STATUS WINAPI RpcServerListen(UINT MinimumCallThreads, UINT MaxCalls, UINT DontWait)
Definition: rpc_server.c:1485
smooth NULL
Definition: ftsmooth.c:513
#define TRACE(s)
Definition: solgame.cpp:4
RPC_STATUS WINAPI RpcServerRegisterIf(RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, RPC_MGR_EPV *MgrEpv)
Definition: rpc_server.c:1082
Status
Definition: gdiplustypes.h:24
RPC_STATUS WINAPI RpcServerUseProtseqEpW(RPC_WSTR Protseq, UINT MaxCalls, RPC_WSTR Endpoint, LPVOID SecurityDescriptor)
Definition: rpc_server.c:893
#define ERR(fmt,...)
Definition: debug.h:109
#define RPC_C_PROTSEQ_MAX_REQS_DEFAULT
Definition: rpcdce.h:123
#define RPC_S_OK
Definition: rpcnterr.h:22
VOID StartScreenSaver ( IN PWLSESSION  Session)

Definition at line 257 of file screensaver.c.

Referenced by DispatchSAS().

259 {
260  HKEY hKey = NULL, hCurrentUser = NULL;
261  WCHAR szApplicationName[MAX_PATH];
262  WCHAR szCommandLine[MAX_PATH + 3];
263  DWORD bufferSize = sizeof(szApplicationName) - sizeof(WCHAR);
264  DWORD dwType;
265  STARTUPINFOW StartupInfo;
266  PROCESS_INFORMATION ProcessInformation;
267  HANDLE HandleArray[2];
268  LONG rc;
269  DWORD Status;
270  BOOL ret = FALSE;
271 
272  if (!ImpersonateLoggedOnUser(Session->UserToken))
273  {
274  ERR("WL: ImpersonateLoggedOnUser() failed with error %lu\n", GetLastError());
275  goto cleanup;
276  }
277 
279  &hCurrentUser);
280  if (rc != ERROR_SUCCESS)
281  {
282  ERR("WL: RegOpenCurrentUser error %lu\n", rc);
283  goto cleanup;
284  }
285 
286  rc = RegOpenKeyExW(hCurrentUser,
287  L"Control Panel\\Desktop",
288  0,
290  &hKey);
291  if (rc != ERROR_SUCCESS)
292  {
293  ERR("WL: RegOpenKeyEx error %lu\n", rc);
294  goto cleanup;
295  }
296 
297  rc = RegQueryValueExW(hKey,
298  L"SCRNSAVE.EXE",
299  0,
300  &dwType,
301  (LPBYTE)szApplicationName,
302  &bufferSize);
303  if (rc != ERROR_SUCCESS || dwType != REG_SZ)
304  {
305  if (rc != ERROR_FILE_NOT_FOUND)
306  ERR("WL: RegQueryValueEx error %lu\n", rc);
307  goto cleanup;
308  }
309 
310  if (bufferSize == 0)
311  {
312  ERR("WL: Buffer size is NULL!\n");
313  goto cleanup;
314  }
315 
316  szApplicationName[bufferSize / sizeof(WCHAR)] = 0; /* Terminate the string */
317 
318  if (wcslen(szApplicationName) == 0)
319  {
320  ERR("WL: Application Name length is zero!\n");
321  goto cleanup;
322  }
323 
324  wsprintfW(szCommandLine, L"%s /s", szApplicationName);
325  TRACE("WL: Executing %S\n", szCommandLine);
326 
327  ZeroMemory(&StartupInfo, sizeof(STARTUPINFOW));
328  ZeroMemory(&ProcessInformation, sizeof(PROCESS_INFORMATION));
329  StartupInfo.cb = sizeof(STARTUPINFOW);
330  StartupInfo.dwFlags = STARTF_SCRNSAVER;
331 
332  /* FIXME: run the screen saver on the screen saver desktop */
333  ret = CreateProcessW(szApplicationName,
334  szCommandLine,
335  NULL,
336  NULL,
337  FALSE,
338  0,
339  NULL,
340  NULL,
341  &StartupInfo,
342  &ProcessInformation);
343  if (!ret)
344  {
345  ERR("WL: Unable to start %S, error %lu\n", szApplicationName, GetLastError());
346  goto cleanup;
347  }
348 
349  CloseHandle(ProcessInformation.hThread);
350 
351  SystemParametersInfoW(SPI_SETSCREENSAVERRUNNING, TRUE, NULL, 0);
352 
354 
355  /* Wait the end of the process or some other activity */
356  ResetEvent(Session->hUserActivity);
357  HandleArray[0] = ProcessInformation.hProcess;
358  HandleArray[1] = Session->hUserActivity;
359  Status = WaitForMultipleObjects(2, HandleArray, FALSE, INFINITE);
360  if (Status == WAIT_OBJECT_0 + 1)
361  {
362  /* Kill the screen saver */
363  TerminateProcess(ProcessInformation.hProcess, 0);
364  }
365 
366  SetEvent(Session->hEndOfScreenSaver);
367 
368  CloseHandle(ProcessInformation.hProcess);
369 
371 
372 cleanup:
373  if (hKey)
374  RegCloseKey(hKey);
375 
376  if (hCurrentUser)
377  RegCloseKey(hCurrentUser);
378 
379  RevertToSelf();
380 
381  if (!ret)
382  {
383  PostMessageW(Session->SASWindow, WLX_WM_SAS, WLX_SAS_TYPE_SCRNSVR_ACTIVITY, 0);
384 #ifndef USE_GETLASTINPUTINFO
385  InterlockedExchange((LONG*)&Session->LastActivity, GetTickCount());
386 #endif
387  }
388 }
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define WLX_WM_SAS
Definition: winwlx.h:71
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:398
#define ERROR_SUCCESS
Definition: deptool.c:10
Definition: bidi.c:75
#define WLX_SAS_TYPE_SCRNSVR_ACTIVITY
Definition: winwlx.h:38
#define KEY_READ
Definition: nt_native.h:1023
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOL WINAPI RevertToSelf(VOID)
Definition: security.c:1476
unsigned char * LPBYTE
Definition: typedefs.h:53
struct _STARTUPINFOW STARTUPINFOW
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:445
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:679
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1056
#define ZeroMemory
Definition: winbase.h:1621
#define STARTF_SCRNSAVER
Definition: undocuser.h:160
#define WCHAR
Definition: msvc.h:43
DWORD WINAPI WaitForMultipleObjects(IN DWORD nCount, IN CONST HANDLE *lpHandles, IN BOOL bWaitAll, IN DWORD dwMilliseconds)
Definition: synch.c:151
DWORD DWORD
Definition: winlogon.h:75
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
#define FALSE
Definition: types.h:117
long LONG
Definition: pedump.c:60
smooth NULL
Definition: ftsmooth.c:513
BOOL WINAPI ImpersonateLoggedOnUser(HANDLE hToken)
Definition: misc.c:152
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
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:4619
BOOL WINAPI SystemParametersInfoW(_In_ UINT, _In_ UINT, _Inout_opt_ PVOID, _In_ UINT)
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int BOOL
Definition: ntddk_ex.h:94
#define WAIT_OBJECT_0
Definition: winbase.h:378
DWORD cb
Definition: winbase.h:803
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4134
HANDLE HKEY
Definition: registry.h:24
#define MAX_PATH
Definition: compat.h:26
int ret
#define InterlockedExchange
Definition: armddk.h:54
Status
Definition: gdiplustypes.h:24
#define ERR(fmt,...)
Definition: debug.h:109
VOID CallNotificationDlls(PWLSESSION pSession, NOTIFICATION_TYPE Type)
Definition: notify.c:249
DWORD *typedef HANDLE
Definition: winlogon.h:52
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
Definition: proc.c:1577
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
Definition: synch.c:660
LONG WINAPI RegOpenCurrentUser(IN REGSAM samDesired, OUT PHKEY phkResult)
Definition: reg.c:3247
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3381
char * cleanup(char *str)
Definition: wpickclick.c:99
DWORD dwFlags
Definition: winbase.h:814
#define INFINITE
Definition: serial.h:102
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define REG_SZ
Definition: layer.c:33
typedef VOID ( WINAPI PFWLXDISPLAYLOCKEDNOTICE)
WINE_DEFAULT_DEBUG_CHANNEL ( winlogon  )
int WINAPI WlxAssignShellProtection ( HANDLE  hWlx,
HANDLE  hToken,
HANDLE  hProcess,
HANDLE  hThread 
)

Definition at line 264 of file wlx.c.

269 {
271  UNREFERENCED_PARAMETER(hToken);
274 
276  return 0;
277 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:70
HANDLE hThread
Definition: wizard.c:27
#define UNIMPLEMENTED
Definition: debug.h:114
int WINAPI WlxChangePasswordNotify ( HANDLE  hWlx,
PWLX_MPR_NOTIFY_INFO  pMprInfo,
DWORD  dwChangeInfo 
)

Definition at line 439 of file wlx.c.

443 {
445  UNREFERENCED_PARAMETER(pMprInfo);
446  UNREFERENCED_PARAMETER(dwChangeInfo);
447 
449  return 0;
450 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
#define UNIMPLEMENTED
Definition: debug.h:114
int WINAPI WlxChangePasswordNotifyEx ( HANDLE  hWlx,
PWLX_MPR_NOTIFY_INFO  pMprInfo,
DWORD  dwChangeInfo,
PWSTR  ProviderName,
PVOID  Reserved 
)

Definition at line 511 of file wlx.c.

517 {
519  UNREFERENCED_PARAMETER(pMprInfo);
520  UNREFERENCED_PARAMETER(dwChangeInfo);
521  UNREFERENCED_PARAMETER(ProviderName);
523 
525  return 0;
526 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
ULONG PVOID Reserved
Definition: ntimage.h:533
#define UNIMPLEMENTED
Definition: debug.h:114
BOOL WINAPI WlxCloseUserDesktop ( HANDLE  hWlx,
PWLX_DESKTOP  pDesktop,
HANDLE  hToken 
)

Definition at line 533 of file wlx.c.

537 {
539  UNREFERENCED_PARAMETER(pDesktop);
540  UNREFERENCED_PARAMETER(hToken);
541 
543  return FALSE;
544 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:114
BOOL WINAPI WlxCreateUserDesktop ( HANDLE  hWlx,
HANDLE  hToken,
DWORD  Flags,
PWSTR  pszDesktopName,
PWLX_DESKTOP ppDesktop 
)

Definition at line 489 of file wlx.c.

495 {
497  UNREFERENCED_PARAMETER(hToken);
499  UNREFERENCED_PARAMETER(pszDesktopName);
500  UNREFERENCED_PARAMETER(ppDesktop);
501 
503  return FALSE;
504 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:114
int WINAPI WlxDialogBox ( HANDLE  hWlx,
HANDLE  hInst,
LPWSTR  lpszTemplate,
HWND  hwndOwner,
DLGPROC  dlgprc 
)

Definition at line 303 of file wlx.c.

309 {
311 
312  TRACE("WlxDialogBox()\n");
313 
314  return (int)WlxDialogBoxParam(hWlx, hInst, lpszTemplate, hwndOwner, dlgprc, 0);
315 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
#define TRACE(s)
Definition: solgame.cpp:4
HINSTANCE hInst
Definition: dxdiag.c:13
int WINAPI WlxDialogBoxParam(HANDLE hWlx, HANDLE hInst, LPWSTR lpszTemplate, HWND hwndOwner, DLGPROC dlgprc, LPARAM dwInitParam)
Definition: wlx.c:322
int WINAPI WlxDialogBoxIndirect ( HANDLE  hWlx,
HANDLE  hInst,
LPCDLGTEMPLATE  hDialogTemplate,
HWND  hwndOwner,
DLGPROC  dlgprc 
)

Definition at line 356 of file wlx.c.

362 {
364 
365  TRACE("WlxDialogBoxIndirect()\n");
366 
367  return (int)WlxDialogBoxIndirectParam(hWlx, hInst, hDialogTemplate, hwndOwner, dlgprc, 0);
368 }
int WINAPI WlxDialogBoxIndirectParam(HANDLE hWlx, HANDLE hInst, LPCDLGTEMPLATE hDialogTemplate, HWND hwndOwner, DLGPROC dlgprc, LPARAM dwInitParam)
Definition: wlx.c:375
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
#define TRACE(s)
Definition: solgame.cpp:4
HINSTANCE hInst
Definition: dxdiag.c:13
int WINAPI WlxDialogBoxIndirectParam ( HANDLE  hWlx,
HANDLE  hInst,
LPCDLGTEMPLATE  hDialogTemplate,
HWND  hwndOwner,
DLGPROC  dlgprc,
LPARAM  dwInitParam 
)

Definition at line 375 of file wlx.c.

Referenced by WlxDialogBoxIndirect().

382 {
383  PDIALOG_LIST_ENTRY ListEntry;
384  int ret;
385 
387 
388  TRACE("WlxDialogBoxIndirectParam()\n");
389 
390  ListEntry = AddDialogListEntry();
391  if (ListEntry == NULL)
392  return -1;
393 
394  ListEntry->DlgProc = dlgprc;
395  ListEntry->lParam = dwInitParam;
396 
397  ret = (int)DialogBoxIndirectParamW(hInst, hDialogTemplate, hwndOwner, DefaultWlxWindowProc, (LPARAM)ListEntry);
398 
399  RemoveDialogListEntry(ListEntry);
400 
401  return ret;
402 }
DLGPROC DlgProc
Definition: wlx.c:33
LPARAM lParam
Definition: wlx.c:34
static VOID RemoveDialogListEntry(PDIALOG_LIST_ENTRY ListEntry)
Definition: wlx.c:72
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
static INT_PTR CALLBACK DefaultWlxWindowProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: wlx.c:133
LONG_PTR LPARAM
Definition: windef.h:231
smooth NULL
Definition: ftsmooth.c:513
#define TRACE(s)
Definition: solgame.cpp:4
int ret
HINSTANCE hInst
Definition: dxdiag.c:13
INT_PTR WINAPI DialogBoxIndirectParamW(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
Definition: wlx.c:29
static PDIALOG_LIST_ENTRY AddDialogListEntry(VOID)
Definition: wlx.c:53
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:29
int WINAPI WlxDialogBoxParam ( HANDLE  hWlx,
HANDLE  hInst,
LPWSTR  lpszTemplate,
HWND  hwndOwner,
DLGPROC  dlgprc,
LPARAM  dwInitParam 
)

Definition at line 322 of file wlx.c.

Referenced by WlxDialogBox().

329 {
330  PDIALOG_LIST_ENTRY ListEntry;
331  int ret;
332 
334 
335  TRACE("WlxDialogBoxParam()\n");
336 
337  ListEntry = AddDialogListEntry();
338  if (ListEntry == NULL)
339  return -1;
340 
341  ListEntry->DlgProc = dlgprc;
342  ListEntry->lParam = dwInitParam;
343 
344  ret = (int)DialogBoxParamW(hInst, lpszTemplate, hwndOwner, DefaultWlxWindowProc, (LPARAM)ListEntry);
345 
346  RemoveDialogListEntry(ListEntry);
347 
348  return ret;
349 }
DLGPROC DlgProc
Definition: wlx.c:33
LPARAM lParam
Definition: wlx.c:34
static VOID RemoveDialogListEntry(PDIALOG_LIST_ENTRY ListEntry)
Definition: wlx.c:72
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
static INT_PTR CALLBACK DefaultWlxWindowProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: wlx.c:133
LONG_PTR LPARAM
Definition: windef.h:231
smooth NULL
Definition: ftsmooth.c:513
#define TRACE(s)
Definition: solgame.cpp:4
int ret
HINSTANCE hInst
Definition: dxdiag.c:13
Definition: wlx.c:29
static PDIALOG_LIST_ENTRY AddDialogListEntry(VOID)
Definition: wlx.c:53
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:29
BOOL WINAPI WlxDisconnect ( VOID  )

Definition at line 683 of file wlx.c.

684 {
686  return FALSE;
687 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:114
BOOL WINAPI WlxGetOption ( HANDLE  hWlx,
DWORD  Option,
ULONG_PTR Value 
)

Definition at line 584 of file wlx.c.

588 {
589  PWLSESSION Session = (PWLSESSION)hWlx;
590 
591  TRACE("WlxGetOption(%lu)\n", Option);
592 
593  switch (Option)
594  {
596  *Value = (ULONG_PTR)Session->Gina.UseCtrlAltDelete;
597  return TRUE;
599  {
600  *Value = (ULONG_PTR)Session->Gina.Context;
601  return TRUE;
602  }
607  return FALSE;
609  {
610  switch (Session->Gina.Version)
611  {
612  case WLX_VERSION_1_0:
613  *Value = sizeof(WLX_DISPATCH_VERSION_1_0);
614  break;
615  case WLX_VERSION_1_1:
616  *Value = sizeof(WLX_DISPATCH_VERSION_1_1);
617  break;
618  case WLX_VERSION_1_2:
619  *Value = sizeof(WLX_DISPATCH_VERSION_1_2);
620  break;
621  case WLX_VERSION_1_3:
622  *Value = sizeof(WLX_DISPATCH_VERSION_1_3);
623  break;
624  case WLX_VERSION_1_4:
625  *Value = sizeof(WLX_DISPATCH_VERSION_1_4);
626  break;
627  default:
628  return FALSE;
629  }
630  return TRUE;
631  }
632  }
633 
634  return FALSE;
635 }
BOOL UseCtrlAltDelete
Definition: winlogon.h:117
PVOID Context
Definition: winlogon.h:115
#define TRUE
Definition: types.h:120
struct _WLSESSION * PWLSESSION
struct _WLX_DISPATCH_VERSION_1_0 WLX_DISPATCH_VERSION_1_0
#define WLX_OPTION_DISPATCH_TABLE_SIZE
Definition: winwlx.h:331
uint32_t ULONG_PTR
Definition: typedefs.h:64
#define FALSE
Definition: types.h:117
#define WLX_OPTION_SMART_CARD_INFO
Definition: winwlx.h:330
#define WLX_VERSION_1_1
Definition: winwlx.h:29
GINAINSTANCE Gina
Definition: winlogon.h:207
#define WLX_OPTION_SMART_CARD_PRESENT
Definition: winwlx.h:329
#define WLX_OPTION_CONTEXT_POINTER
Definition: winwlx.h:323
#define WLX_VERSION_1_4
Definition: winwlx.h:32
#define TRACE(s)
Definition: solgame.cpp:4
#define WLX_OPTION_USE_CTRL_ALT_DEL
Definition: winwlx.h:322
#define WLX_OPTION_USE_SMART_CARD
Definition: winwlx.h:324
#define WLX_VERSION_1_2
Definition: winwlx.h:30
struct _WLX_DISPATCH_VERSION_1_4 WLX_DISPATCH_VERSION_1_4
struct _WLX_DISPATCH_VERSION_1_1 WLX_DISPATCH_VERSION_1_1
UINTN UINT8 Value
Definition: acefiex.h:751
#define WLX_VERSION_1_0
Definition: winwlx.h:28
struct _WLX_DISPATCH_VERSION_1_3 WLX_DISPATCH_VERSION_1_3
struct _WLX_DISPATCH_VERSION_1_2 WLX_DISPATCH_VERSION_1_2
#define UNIMPLEMENTED
Definition: debug.h:114
#define ULONG_PTR
Definition: config.h:101
DWORD Version
Definition: winlogon.h:116
#define WLX_VERSION_1_3
Definition: winwlx.h:31
BOOL WINAPI WlxGetSourceDesktop ( HANDLE  hWlx,
PWLX_DESKTOP ppDesktop 
)

Definition at line 457 of file wlx.c.

460 {
462  UNREFERENCED_PARAMETER(ppDesktop);
463 
465  return FALSE;
466 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:114
int WINAPI WlxMessageBox ( HANDLE  hWlx,
HWND  hwndOwner,
LPWSTR  lpszText,
LPWSTR  lpszTitle,
UINT  fuStyle 
)

Definition at line 284 of file wlx.c.

290 {
292 
293  TRACE("WlxMessageBox()\n");
294  /* FIXME: Provide a custom window proc to be able to handle timeout */
295  return MessageBoxW(hwndOwner, lpszText, lpszTitle, fuStyle);
296 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
#define TRACE(s)
Definition: solgame.cpp:4
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
BOOL WINAPI WlxQueryClientCredentials ( PWLX_CLIENT_CREDENTIALS_INFO_V1_0  pCred)

Definition at line 655 of file wlx.c.

657 {
658  UNREFERENCED_PARAMETER(pCred);
659 
661  return FALSE;
662 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:114
DWORD WINAPI WlxQueryConsoleSwitchCredentials ( PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0  pCred)

Definition at line 714 of file wlx.c.

716 {
717  UNREFERENCED_PARAMETER(pCred);
718 
720  return 0;
721 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
#define UNIMPLEMENTED
Definition: debug.h:114
BOOL WINAPI WlxQueryInetConnectorCredentials ( PWLX_CLIENT_CREDENTIALS_INFO_V1_0  pCred)

Definition at line 669 of file wlx.c.

671 {
672  UNREFERENCED_PARAMETER(pCred);
673 
675  return FALSE;
676 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:114
DWORD WINAPI WlxQueryTerminalServicesData ( HANDLE  hWlx,
PWLX_TERMINAL_SERVICES_DATA  pTSData,
WCHAR UserName,
WCHAR Domain 
)

Definition at line 694 of file wlx.c.

699 {
701  UNREFERENCED_PARAMETER(pTSData);
702  UNREFERENCED_PARAMETER(UserName);
703  UNREFERENCED_PARAMETER(Domain);
704 
706  return 0;
707 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
#define UNIMPLEMENTED
Definition: debug.h:114
BOOL WINAPI WlxQueryTsLogonCredentials ( PWLX_CLIENT_CREDENTIALS_INFO_V2_0  pCred)

Definition at line 728 of file wlx.c.

730 {
731  UNREFERENCED_PARAMETER(pCred);
732 
734  return FALSE;
735 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:114
VOID WINAPI WlxSasNotify ( HANDLE  hWlx,
DWORD  dwSasType 
)

Definition at line 230 of file wlx.c.

233 {
234  PWLSESSION Session = (PWLSESSION)hWlx;
235 
236  TRACE("WlxSasNotify(0x%lx)\n", dwSasType);
237 
238  if (dwSasType == WLX_SAS_TYPE_CTRL_ALT_DEL || dwSasType > WLX_SAS_TYPE_MAX_MSFT_VALUE)
239  PostMessageW(Session->SASWindow, WLX_WM_SAS, dwSasType, 0);
240 }
#define WLX_WM_SAS
Definition: winwlx.h:71
struct _WLSESSION * PWLSESSION
HWND SASWindow
Definition: winlogon.h:211
#define TRACE(s)
Definition: solgame.cpp:4
#define WLX_SAS_TYPE_CTRL_ALT_DEL
Definition: winwlx.h:36
#define WLX_SAS_TYPE_MAX_MSFT_VALUE
Definition: winwlx.h:46
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
VOID WINAPI WlxSetContextPointer ( HANDLE  hWlx,
PVOID  pWlxContext 
)

Definition at line 214 of file wlx.c.

217 {
218  ULONG_PTR OldValue;
219 
220  TRACE("WlxSetContextPointer(%p)\n", pWlxContext);
221 
222  WlxSetOption(hWlx, WLX_OPTION_CONTEXT_POINTER, (ULONG_PTR)pWlxContext, &OldValue);
223 }
uint32_t ULONG_PTR
Definition: typedefs.h:64
#define WLX_OPTION_CONTEXT_POINTER
Definition: winwlx.h:323
#define TRACE(s)
Definition: solgame.cpp:4
BOOL WINAPI WlxSetOption(HANDLE hWlx, DWORD Option, ULONG_PTR Value, ULONG_PTR *OldValue)
Definition: wlx.c:551
BOOL WINAPI WlxSetOption ( HANDLE  hWlx,
DWORD  Option,
ULONG_PTR  Value,
ULONG_PTR OldValue 
)

Definition at line 551 of file wlx.c.

Referenced by WlxSetContextPointer(), and WlxUseCtrlAltDel().

556 {
557  PWLSESSION Session = (PWLSESSION)hWlx;
558 
559  TRACE("WlxSetOption(%lu)\n", Option);
560 
561  switch (Option)
562  {
564  *OldValue = (ULONG_PTR)Session->Gina.UseCtrlAltDelete;
565  Session->Gina.UseCtrlAltDelete = (BOOL)Value;
566  return TRUE;
568  *OldValue = (ULONG_PTR)Session->Gina.Context;
569  Session->Gina.Context = (PVOID)Value;
570  return TRUE;
573  return FALSE;
574  }
575 
576  return FALSE;
577 }
DWORD *typedef PVOID
Definition: winlogon.h:52
BOOL UseCtrlAltDelete
Definition: winlogon.h:117
PVOID Context
Definition: winlogon.h:115
#define TRUE
Definition: types.h:120
struct _WLSESSION * PWLSESSION
#define FALSE
Definition: types.h:117
GINAINSTANCE Gina
Definition: winlogon.h:207
#define WLX_OPTION_CONTEXT_POINTER
Definition: winwlx.h:323
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int BOOL
Definition: ntddk_ex.h:94
#define WLX_OPTION_USE_CTRL_ALT_DEL
Definition: winwlx.h:322
#define WLX_OPTION_USE_SMART_CARD
Definition: winwlx.h:324
UINTN UINT8 Value
Definition: acefiex.h:751
#define UNIMPLEMENTED
Definition: debug.h:114
#define ULONG_PTR
Definition: config.h:101
BOOL WINAPI WlxSetReturnDesktop ( HANDLE  hWlx,
PWLX_DESKTOP  pDesktop 
)

Definition at line 473 of file wlx.c.

476 {
478  UNREFERENCED_PARAMETER(pDesktop);
479 
481  return FALSE;
482 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:114
BOOL WINAPI WlxSetTimeout ( HANDLE  hWlx,
DWORD  Timeout 
)

Definition at line 247 of file wlx.c.

250 {
251  PWLSESSION Session = (PWLSESSION)hWlx;
252 
253  TRACE("WlxSetTimeout(%lu)\n", Timeout);
254 
255  Session->DialogTimeout = Timeout;
256  return TRUE;
257 }
#define TRUE
Definition: types.h:120
struct _WLSESSION * PWLSESSION
#define TRACE(s)
Definition: solgame.cpp:4
DWORD DialogTimeout
Definition: winlogon.h:221
static ULONG Timeout
Definition: ping.c:61
int WINAPI WlxSwitchDesktopToUser ( HANDLE  hWlx)

Definition at line 409 of file wlx.c.

411 {
412  PWLSESSION Session = (PWLSESSION)hWlx;
413 
414  TRACE("WlxSwitchDesktopToUser()\n");
415 
416  return (int)SwitchDesktop(Session->ApplicationDesktop);
417 }
struct _WLSESSION * PWLSESSION
HDESK ApplicationDesktop
Definition: winlogon.h:214
#define TRACE(s)
Definition: solgame.cpp:4
BOOL WINAPI SwitchDesktop(_In_ HDESK)
int WINAPI WlxSwitchDesktopToWinlogon ( HANDLE  hWlx)

Definition at line 424 of file wlx.c.

426 {
427  PWLSESSION Session = (PWLSESSION)hWlx;
428 
429  TRACE("WlxSwitchDesktopToWinlogon()\n");
430 
431  return (int)SwitchDesktop(Session->WinlogonDesktop);
432 }
struct _WLSESSION * PWLSESSION
HDESK WinlogonDesktop
Definition: winlogon.h:215
#define TRACE(s)
Definition: solgame.cpp:4
BOOL WINAPI SwitchDesktop(_In_ HDESK)
VOID WINAPI WlxUseCtrlAltDel ( HANDLE  hWlx)

Definition at line 199 of file wlx.c.

201 {
202  ULONG_PTR OldValue;
203 
204  TRACE("WlxUseCtrlAltDel()\n");
205 
206  WlxSetOption(hWlx, WLX_OPTION_USE_CTRL_ALT_DEL, TRUE, &OldValue);
207 }
#define TRUE
Definition: types.h:120
uint32_t ULONG_PTR
Definition: typedefs.h:64
#define TRACE(s)
Definition: solgame.cpp:4
#define WLX_OPTION_USE_CTRL_ALT_DEL
Definition: winwlx.h:322
BOOL WINAPI WlxSetOption(HANDLE hWlx, DWORD Option, ULONG_PTR Value, ULONG_PTR *OldValue)
Definition: wlx.c:551
VOID WINAPI WlxWin31Migrate ( HANDLE  hWlx)

Definition at line 642 of file wlx.c.

644 {
646 
648 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
#define UNIMPLEMENTED
Definition: debug.h:114

Variable Documentation

typedef PDWORD

Definition at line 54 of file winlogon.h.

typedef PHANDLE

Definition at line 54 of file winlogon.h.

typedef PLUID

Definition at line 54 of file winlogon.h.

typedef PSID

Definition at line 54 of file winlogon.h.

Definition at line 54 of file winlogon.h.

PWLSESSION WLSession

Definition at line 20 of file winlogon.c.

Referenced by DefaultWlxScreenSaverNotify().