ReactOS 0.4.16-dev-2284-g3529151
notify.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Winlogon
4 * FILE: base/system/winlogon/notify.c
5 * PURPOSE: Logon notifications
6 * PROGRAMMERS: Eric Kohl
7 */
8
9/* INCLUDES ******************************************************************/
10
11#include "winlogon.h"
12
13/* GLOBALS *******************************************************************/
14
16
18{
19 "Logon",
20 "Logoff",
21 "Lock",
22 "Unlock",
23 "Startup",
24 "Shutdown",
25 "StartScreenSaver",
26 "StopScreenSaver",
27 "Disconnect",
28 "Reconnect",
29 "StartShell",
30 "PostShell"
31};
32
33typedef struct _NOTIFICATION_ITEM
34{
47
49
50/* FUNCTIONS *****************************************************************/
51
57static
60 _In_ HKEY hDllKey,
62 _In_ PCSTR pNotification)
63{
64 LONG lError;
65 DWORD dwType, dwSize;
66 CHAR szFuncBuffer[128];
67
68 dwSize = sizeof(szFuncBuffer);
69 lError = RegQueryValueExA(hDllKey,
70 pNotification,
71 NULL,
72 &dwType,
73 (PBYTE)szFuncBuffer,
74 &dwSize);
75 if ((lError != ERROR_SUCCESS) ||
76 (dwType != REG_SZ && dwType != REG_EXPAND_SZ) || (dwSize == 0))
77 {
78 return NULL;
79 }
80
81 /* NUL-terminate */
82 szFuncBuffer[dwSize / sizeof(CHAR) - 1] = ANSI_NULL;
83
84 return (PWLX_NOTIFY_HANDLER)GetProcAddress(hModule, szFuncBuffer);
85}
86
91static
92BOOL
94 _Inout_ PNOTIFICATION_ITEM NotificationDll)
95{
96 HKEY hNotifyKey, hDllKey;
98 LONG lError;
100
101 if (NotificationDll->bSfcNotification)
102 return TRUE; // Already loaded.
103
105 L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\Notify",
106 0,
107 KEY_READ,
108 &hNotifyKey);
109 if (lError != ERROR_SUCCESS)
110 {
111 ERR("RegOpenKeyExW(Winlogon\\Notify) failed, Error %lu\n", lError);
112 return FALSE;
113 }
114
115 lError = RegOpenKeyExW(hNotifyKey,
116 NotificationDll->pszKeyName,
117 0,
118 KEY_READ,
119 &hDllKey);
120 RegCloseKey(hNotifyKey);
121
122 if (lError != ERROR_SUCCESS)
123 {
124 ERR("RegOpenKeyExW(%S) failed, Error %lu\n", NotificationDll->pszKeyName, lError);
125 return FALSE;
126 }
127
128 hModule = LoadLibraryW(NotificationDll->pszDllName);
129 if (!hModule)
130 {
131 ERR("LoadLibraryW(%S) failed, Error %lu\n", NotificationDll->pszDllName, GetLastError());
132 RegCloseKey(hDllKey);
133 return FALSE;
134 }
135 NotificationDll->hModule = hModule;
136
138 {
139 NotificationDll->Handler[Type] = GetNotificationHandler(hDllKey, hModule, FuncNames[Type]);
140 TRACE("%s: %p\n", FuncNames[Type], NotificationDll->Handler[Type]);
141 }
142
143 RegCloseKey(hDllKey);
144 return TRUE;
145}
146
151static
152VOID
155{
156 if (Notification->hModule)
157 FreeLibrary(Notification->hModule);
158
159 if (Notification->pszKeyName)
160 RtlFreeHeap(RtlGetProcessHeap(), 0, Notification->pszKeyName);
161
162 if (Notification->pszDllName)
163 RtlFreeHeap(RtlGetProcessHeap(), 0, Notification->pszDllName);
164
165 RtlFreeHeap(RtlGetProcessHeap(), 0, Notification);
166}
167
172static
173VOID
175{
176 PNOTIFICATION_ITEM NotificationDll;
178 DWORD dwError;
179 WCHAR szSfcPath[MAX_PATH];
180
181 ExpandEnvironmentStringsW(L"%SystemRoot%\\system32\\sfc.dll",
182 szSfcPath,
183 ARRAYSIZE(szSfcPath));
184
185 NotificationDll = RtlAllocateHeap(RtlGetProcessHeap(),
187 sizeof(*NotificationDll));
188 if (!NotificationDll)
189 return; // If needed: dwError = ERROR_OUTOFMEMORY;
190
191 NotificationDll->pszDllName = WlStrDup(szSfcPath);
192 if (NotificationDll->pszDllName == NULL)
193 {
194 dwError = ERROR_OUTOFMEMORY;
195 goto done;
196 }
197
198 NotificationDll->bEnabled = TRUE;
199 NotificationDll->dwMaxWait = 30; /* FIXME: ??? */
200 NotificationDll->bSfcNotification = TRUE;
201
202 /* Load sfc.dll, and also sfc_os.dll on systems where it forwards to */
203 hModule = LoadLibraryW(szSfcPath);
204 if (!hModule)
205 {
206 dwError = GetLastError();
207 ERR("LoadLibraryW(%S) failed, Error %lu\n", szSfcPath, dwError);
208 goto done;
209 }
210 NotificationDll->hModule = hModule;
211
212 NotificationDll->Handler[LogonHandler] = (PWLX_NOTIFY_HANDLER)GetProcAddress(hModule, "SfcWLEventLogon");
213 NotificationDll->Handler[LogoffHandler] = (PWLX_NOTIFY_HANDLER)GetProcAddress(hModule, "SfcWLEventLogoff");
214 if (!NotificationDll->Handler[LogonHandler] || !NotificationDll->Handler[LogoffHandler])
215 {
216 dwError = ERROR_PROC_NOT_FOUND;
217 ERR("Couldn't snap SfcWLEventLogon/SfcWLEventLogoff\n");
218 goto done;
219 }
220
222 &NotificationDll->ListEntry);
223
224 dwError = ERROR_SUCCESS;
225
226done:
227 if (dwError != ERROR_SUCCESS)
228 DeleteNotification(NotificationDll);
229}
230
231static
232VOID
234 _In_ HKEY hNotifyKey,
235 _In_ PCWSTR pszKeyName)
236{
237 HKEY hDllKey = NULL;
238 PNOTIFICATION_ITEM NotificationDll;
240 DWORD dwValue, dwSize, dwType;
241 LONG lError;
242
243 TRACE("AddNotificationDll(0x%p, %S)\n", hNotifyKey, pszKeyName);
244
245 lError = RegOpenKeyExW(hNotifyKey,
246 pszKeyName,
247 0,
248 KEY_READ,
249 &hDllKey);
250 if (lError != ERROR_SUCCESS)
251 return;
252
253 /* In safe-boot mode, load the notification DLL only if it is enabled there */
254 if (GetSystemMetrics(SM_CLEANBOOT) != 0) // TODO: Cache when Winlogon starts
255 {
256 BOOL bSafeMode = FALSE; // Default to NOT loading the DLL in SafeMode.
257
258 dwSize = sizeof(dwValue);
259 lError = RegQueryValueExW(hDllKey,
260 L"SafeMode",
261 NULL,
262 &dwType,
263 (PBYTE)&dwValue,
264 &dwSize);
265 if ((lError == ERROR_SUCCESS) && (dwType == REG_DWORD) && (dwSize == sizeof(dwValue)))
266 bSafeMode = !!dwValue;
267
268 /* Bail out if the DLL should not be loaded in safe-boot mode.
269 * NOTE: On Win2000 and later, the value is always overridden
270 * to TRUE, and the DLL is loaded unconditionally. This defeats
271 * the whole purpose of this feature... In ReactOS we restore it! */
272 if (!bSafeMode)
273 {
274 RegCloseKey(hDllKey);
275 return;
276 }
277 }
278
279 NotificationDll = RtlAllocateHeap(RtlGetProcessHeap(),
281 sizeof(*NotificationDll));
282 if (!NotificationDll)
283 {
284 lError = ERROR_OUTOFMEMORY;
285 goto done;
286 }
287
288 NotificationDll->pszKeyName = WlStrDup(pszKeyName);
289 if (NotificationDll->pszKeyName == NULL)
290 {
291 lError = ERROR_OUTOFMEMORY;
292 goto done;
293 }
294
295 dwSize = 0;
296 lError = RegQueryValueExW(hDllKey,
297 L"DllName",
298 NULL,
299 &dwType,
300 NULL,
301 &dwSize);
302 if ((lError != ERROR_SUCCESS) ||
303 (dwType != REG_SZ && dwType != REG_EXPAND_SZ) ||
304 (dwSize == 0) || (dwSize % sizeof(WCHAR)))
305 {
306 lError = ERROR_FILE_NOT_FOUND;
307 goto done;
308 }
309 /* Ensure the string can be NUL-terminated */
310 dwSize += sizeof(WCHAR);
311
312 pszDllName = RtlAllocateHeap(RtlGetProcessHeap(), 0, dwSize);
313 if (!pszDllName)
314 {
315 lError = ERROR_OUTOFMEMORY;
316 goto done;
317 }
318
319 lError = RegQueryValueExW(hDllKey,
320 L"DllName",
321 NULL,
322 &dwType,
324 &dwSize);
325 if (lError != ERROR_SUCCESS)
326 {
327 RtlFreeHeap(RtlGetProcessHeap(), 0, pszDllName);
328 goto done;
329 }
330 /* NUL-terminate */
331 pszDllName[dwSize / sizeof(WCHAR) - 1] = UNICODE_NULL;
332
333 /* Expand the path if applicable. Note that Windows always does the
334 * expansion, independently of the REG_SZ or REG_EXPAND_SZ type. */
335 if (wcschr(pszDllName, L'%') != NULL)
336 {
338 if (dwSize)
339 {
340 PWSTR pszDllPath = RtlAllocateHeap(RtlGetProcessHeap(), 0,
341 dwSize * sizeof(WCHAR));
342 if (!pszDllPath)
343 {
344 RtlFreeHeap(RtlGetProcessHeap(), 0, pszDllName);
345 lError = ERROR_OUTOFMEMORY;
346 goto done;
347 }
349
350 /* Free the old buffer and replace it with the expanded path */
351 RtlFreeHeap(RtlGetProcessHeap(), 0, pszDllName);
352 pszDllName = pszDllPath;
353 }
354 }
355
356 NotificationDll->pszDllName = pszDllName;
357
358 NotificationDll->bEnabled = TRUE;
359 NotificationDll->dwMaxWait = 30; /* FIXME: ??? */
360
361 dwSize = sizeof(dwValue);
362 lError = RegQueryValueExW(hDllKey,
363 L"Asynchronous",
364 NULL,
365 &dwType,
366 (PBYTE)&dwValue,
367 &dwSize);
368 if ((lError == ERROR_SUCCESS) && (dwType == REG_DWORD) && (dwSize == sizeof(dwValue)))
369 NotificationDll->bAsynchronous = !!dwValue;
370
371 dwSize = sizeof(dwValue);
372 lError = RegQueryValueExW(hDllKey,
373 L"Impersonate",
374 NULL,
375 &dwType,
376 (PBYTE)&dwValue,
377 &dwSize);
378 if ((lError == ERROR_SUCCESS) && (dwType == REG_DWORD) && (dwSize == sizeof(dwValue)))
379 NotificationDll->bImpersonate = !!dwValue;
380
381 dwSize = sizeof(dwValue);
382 lError = RegQueryValueExW(hDllKey,
383 L"SmartCardLogonNotify",
384 NULL,
385 &dwType,
386 (PBYTE)&dwValue,
387 &dwSize);
388 if ((lError == ERROR_SUCCESS) && (dwType == REG_DWORD) && (dwSize == sizeof(dwValue)))
389 NotificationDll->bSmartCardLogon = !!dwValue;
390
391 dwSize = sizeof(dwValue);
392 lError = RegQueryValueExW(hDllKey,
393 L"MaxWait",
394 NULL,
395 &dwType,
396 (PBYTE)&dwValue,
397 &dwSize);
398 if ((lError == ERROR_SUCCESS) && (dwType == REG_DWORD) && (dwSize == sizeof(dwValue)))
399 NotificationDll->dwMaxWait = dwValue;
400
402 &NotificationDll->ListEntry);
403
404 lError = ERROR_SUCCESS;
405
406done:
407 if (lError != ERROR_SUCCESS)
408 {
409 if (NotificationDll)
410 DeleteNotification(NotificationDll);
411 }
412
413 RegCloseKey(hDllKey);
414}
415
416BOOL
418{
419 HKEY hNotifyKey = NULL;
420 LONG lError;
421 DWORD dwIndex;
422 DWORD dwKeyName;
423 WCHAR szKeyName[80];
424
425 TRACE("InitNotifications()\n");
426
428
430
432 L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\Notify",
433 0,
434 KEY_READ,
435 &hNotifyKey);
436 if (lError != ERROR_SUCCESS)
437 {
438 TRACE("RegOpenKeyExW()\n");
439 return TRUE;
440 }
441
442 for (dwIndex = 0; ; ++dwIndex)
443 {
444 dwKeyName = ARRAYSIZE(szKeyName);
445 lError = RegEnumKeyExW(hNotifyKey,
446 dwIndex,
447 szKeyName,
448 &dwKeyName,
449 NULL,
450 NULL,
451 NULL,
452 NULL);
453 if (lError != ERROR_SUCCESS)
454 break;
455
456 TRACE("Notification DLL: %S\n", szKeyName);
457 AddNotificationDll(hNotifyKey, szKeyName);
458 }
459
460 RegCloseKey(hNotifyKey);
461
462 TRACE("InitNotifications() done\n");
463
464 return TRUE;
465}
466
467static
468VOID
470 _In_ PNOTIFICATION_ITEM NotificationDll,
473{
474 PWLX_NOTIFY_HANDLER pNotifyHandler;
476 HANDLE UserToken;
477
478 /* Delay-load the DLL if needed */
479 if (!NotificationDll->hModule)
480 {
481 if (!LoadNotifyDll(NotificationDll))
482 {
483 /* We failed, disable it */
484 NotificationDll->bEnabled = FALSE;
485 return;
486 }
487 ASSERT(NotificationDll->hModule);
488 }
489
490 /* Retrieve the notification handler; bail out if none is specified */
491 pNotifyHandler = NotificationDll->Handler[Type];
492 if (!pNotifyHandler)
493 return;
494
495 /* Capture the notification info structure, since
496 * the notification handler might mess with it */
497 Info = *pInfo;
498
499 /* Impersonate the logged-on user if necessary */
500 UserToken = (NotificationDll->bImpersonate ? Info.hToken : NULL);
501 if (UserToken && !ImpersonateLoggedOnUser(UserToken))
502 {
503 ERR("WL: ImpersonateLoggedOnUser() failed with error %lu\n", GetLastError());
504 return;
505 }
506
507 /* Call the notification handler in SEH to prevent any Winlogon crashes */
509 {
510#ifdef _M_IX86 // CORE-20279
511 /* Workaround for buggy 3rd-party notification DLLs: Handle broken ones
512 * that use a CDECL calling convention instead of the correct STDCALL */
514 #if defined(__GNUC__)
515 register ULONG_PTR StackPtr;
516 __asm__ __volatile__
517 (
518 "movl %%esp, %[StackPtr]\n\t" // Save current ESP
519 /*"leal %[Info], %%eax\n\t" // Push parameter
520 "pushl %%eax\n\t"*/ "pushl %[Info]\n\t"
521 "call *%[pNotifyHandler]\n\t" // Invoke STDCALL notification handler
522 "cmpl %%esp, %[StackPtr]\n\t" // Check whether ESP is messed up
523 "je 1f\n\t" // Exit if everything is fine
524 "movl %[StackPtr], %%esp\n\t" // Restore correct ESP
525 "1:\n\t"
526 //"seteb %[Success]" // Set success or failure
527 :
528 [StackPtr]"=&S"(StackPtr), [Success]/*"=rm"*/"=@cce"(Success)
529 :
530 [pNotifyHandler]"m"(pNotifyHandler), [Info]/*"m"(Info)*/"r"(&Info)
531 :
532 /*"%esp", "%eax",*/ "cc", "memory"
533 );
534 #elif defined(_MSC_VER) // && !defined(__clang__)
535 __asm
536 {
537 mov esi, esp // Save current ESP
538 lea eax, dword ptr [Info] // Push parameter
539 push eax
540 call [pNotifyHandler] // Invoke STDCALL notification handler
541 cmp esi, esp // Check whether ESP is messed up
542 je l1f // Exit if everything is fine
543 mov esp, esi // Restore correct ESP
544 l1f:
545 sete byte ptr [Success] // Set success or failure
546 }
547 #else
548 #error Unsupported compiler
549 #endif
550 if (!Success)
551 {
552 ERR("WL: The notification DLL '%ws' uses a wrong calling convention or number of parameters. "
553 "Please contact your software vendor for a fixed DLL!\n",
554 NotificationDll->pszDllName);
555 }
556#else
557 pNotifyHandler(&Info);
558#endif // _M_IX86
559 }
561 {
562 ERR("WL: Exception 0x%08lx hit by notification DLL %ws while executing %s notify function\n",
563 _SEH2_GetExceptionCode(), NotificationDll->pszDllName, FuncNames[Type]);
564 }
565 _SEH2_END;
566
567 /* Revert impersonation */
568 if (UserToken)
569 RevertToSelf();
570}
571
572VOID
574 PWLSESSION pSession,
576{
577 PLIST_ENTRY ListEntry;
579
580 /* Check for invalid notification type */
582
583 TRACE("CallNotificationDlls(%s)\n", FuncNames[Type]);
584
585 /* Set up the notification info structure template */
586 Info.Size = sizeof(Info);
587
588 switch (Type)
589 {
590 case LogoffHandler:
591 case ShutdownHandler:
592 Info.Flags = 3;
593 break;
594
595 default:
596 Info.Flags = 0;
597 break;
598 }
599
600 Info.UserName = pSession->UserName;
601 Info.Domain = pSession->Domain;
602 Info.WindowStation = pSession->InteractiveWindowStationName;
603 Info.hToken = pSession->UserToken;
604
605 switch (Type)
606 {
607 case LogonHandler:
609 Info.hDesktop = pSession->ApplicationDesktop;
610 break;
611
613 Info.hDesktop = pSession->ApplicationDesktop;
614 break;
615
616 default:
617 Info.hDesktop = pSession->WinlogonDesktop;
618 break;
619 }
620
621 Info.pStatusCallback = NULL;
622
623 for (ListEntry = NotificationDllListHead.Flink;
624 ListEntry != &NotificationDllListHead;
625 ListEntry = ListEntry->Flink)
626 {
628 CONTAINING_RECORD(ListEntry, NOTIFICATION_ITEM, ListEntry);
629 if (Notification->bEnabled)
631 }
632}
633
634VOID
636{
638 {
641 CONTAINING_RECORD(ListEntry, NOTIFICATION_ITEM, ListEntry);
643 }
644}
645
646/* EOF */
Type
Definition: Type.h:7
#define VOID
Definition: acefi.h:82
unsigned char BOOLEAN
Definition: actypes.h:127
NOTIFICATION_TYPE
Definition: precomp.h:47
#define CHAR(Char)
#define ERR(fmt,...)
Definition: precomp.h:57
static LIST_ENTRY NotificationDllListHead
Definition: notify.c:48
static VOID CallNotificationDll(_In_ PNOTIFICATION_ITEM NotificationDll, _In_ NOTIFICATION_TYPE Type, _In_ PWLX_NOTIFICATION_INFO pInfo)
Definition: notify.c:469
static VOID AddNotificationDll(_In_ HKEY hNotifyKey, _In_ PCWSTR pszKeyName)
Definition: notify.c:233
static VOID DeleteNotification(_In_ PNOTIFICATION_ITEM Notification)
Frees the resources associated to a notification.
Definition: notify.c:153
static PSTR FuncNames[LastHandler]
Definition: notify.c:17
struct _NOTIFICATION_ITEM NOTIFICATION_ITEM
VOID(WINAPI * PWLX_NOTIFY_HANDLER)(PWLX_NOTIFICATION_INFO pInfo)
Definition: notify.c:15
BOOL InitNotifications(VOID)
Definition: notify.c:417
VOID CallNotificationDlls(PWLSESSION pSession, NOTIFICATION_TYPE Type)
Definition: notify.c:573
struct _NOTIFICATION_ITEM * PNOTIFICATION_ITEM
static BOOL LoadNotifyDll(_Inout_ PNOTIFICATION_ITEM NotificationDll)
Loads the notification DLL and retrieves its exported notification handlers.
Definition: notify.c:93
static PWLX_NOTIFY_HANDLER GetNotificationHandler(_In_ HKEY hDllKey, _In_ HMODULE hModule, _In_ PCSTR pNotification)
Retrieves the address of the exported notification handler, specified in the registry entry for the n...
Definition: notify.c:59
VOID CleanupNotifications(VOID)
Definition: notify.c:635
static VOID AddSfcNotification(VOID)
Initializes the internal SFC notifications.
Definition: notify.c:174
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:616
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:634
#define RegCloseKey(hKey)
Definition: registry.h:49
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
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:2504
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
Definition: reg.c:4009
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
BOOL WINAPI ImpersonateLoggedOnUser(HANDLE hToken)
Definition: misc.c:152
#define wcschr
Definition: compat.h:17
#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
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
Definition: environ.c:520
BOOL WINAPI RevertToSelf(void)
Definition: security.c:855
#define L(x)
Definition: resources.c:13
#define InsertHeadList(ListHead, Entry)
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
#define RemoveHeadList(ListHead)
Definition: env_spec_w32.h:964
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
@ Success
Definition: eventcreate.c:712
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:90
#define REG_SZ
Definition: layer.c:22
#define ASSERT(a)
Definition: mode.c:44
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
static PVOID ptr
Definition: dispmode.c:27
#define cmp(status, error)
Definition: error.c:114
HMODULE hModule
Definition: netsh.c:17
#define _Inout_
Definition: no_sal2.h:162
#define _In_
Definition: no_sal2.h:158
#define KEY_READ
Definition: nt_native.h:1026
#define REG_EXPAND_SZ
Definition: nt_native.h:1497
#define UNICODE_NULL
#define ANSI_NULL
BYTE * PBYTE
Definition: pedump.c:66
long LONG
Definition: pedump.c:60
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:181
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:82
__asm__(".p2align 4, 0x90\n" ".seh_proc __seh2_global_filter_func\n" "__seh2_global_filter_func:\n" "\tsub %rbp, %rax\n" "\tpush %rbp\n" "\t.seh_pushreg %rbp\n" "\tsub $32, %rsp\n" "\t.seh_stackalloc 32\n" "\t.seh_endprologue\n" "\tsub %rax, %rdx\n" "\tmov %rdx, %rbp\n" "\tjmp *%r8\n" "__seh2_global_filter_func_exit:\n" "\t.p2align 4\n" "\tadd $32, %rsp\n" "\tpop %rbp\n" "\tret\n" "\t.seh_endproc")
#define _SEH2_END
Definition: pseh2_64.h:171
#define _SEH2_TRY
Definition: pseh2_64.h:71
static void push(calc_node_t *op)
Definition: rpn_ieee.c:113
#define REG_DWORD
Definition: sdbapi.c:615
#define TRACE(s)
Definition: solgame.cpp:4
char * pszDllName
Definition: spec2def.c:74
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
PWLX_NOTIFY_HANDLER Handler[LastHandler]
Definition: notify.c:45
DWORD dwMaxWait
Definition: notify.c:43
LIST_ENTRY ListEntry
Definition: notify.c:35
HMODULE hModule
Definition: notify.c:36
PWSTR pszKeyName
Definition: notify.c:37
PWSTR pszDllName
Definition: notify.c:38
BOOL bAsynchronous
Definition: notify.c:40
BOOL bImpersonate
Definition: notify.c:41
BOOL bSmartCardLogon
Definition: notify.c:42
BOOL bSfcNotification
Definition: notify.c:44
HANDLE UserToken
Definition: winlogon.h:237
HDESK WinlogonDesktop
Definition: winlogon.h:234
PWSTR UserName
Definition: winlogon.h:231
PWSTR Domain
Definition: winlogon.h:232
PWSTR InteractiveWindowStationName
Definition: winlogon.h:230
HDESK ApplicationDesktop
Definition: winlogon.h:233
ecx edi movl ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl eax
Definition: synth_sse3d.h:85
ecx edi movl ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl edx movl TEMP incl eax andl eax ecx incl ebx testl eax jnz xchgl ecx incl TEMP esi
Definition: synth_sse3d.h:103
uint16_t * PWSTR
Definition: typedefs.h:56
char * PSTR
Definition: typedefs.h:51
const uint16_t * PCWSTR
Definition: typedefs.h:57
const char * PCSTR
Definition: typedefs.h:52
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
_In_ PWDFDEVICE_INIT _In_ PFN_WDF_DEVICE_SHUTDOWN_NOTIFICATION Notification
Definition: wdfcontrol.h:115
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define WINAPI
Definition: msvc.h:6
#define ERROR_PROC_NOT_FOUND
Definition: winerror.h:321
PWSTR WlStrDup(_In_opt_ PCWSTR String)
Duplicates the given string, allocating a buffer on the heap.
Definition: winlogon.c:29
@ LastHandler
Definition: winlogon.h:276
@ LogonHandler
Definition: winlogon.h:264
@ LogoffHandler
Definition: winlogon.h:265
@ StartShellHandler
Definition: winlogon.h:274
@ StartScreenSaverHandler
Definition: winlogon.h:270
@ ShutdownHandler
Definition: winlogon.h:269
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define SM_CLEANBOOT
Definition: winuser.h:1038
int WINAPI GetSystemMetrics(_In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175