ReactOS 0.4.16-dev-122-g325d74c
logon.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS user32.dll
4 * FILE: win32ss/user/user32/misc/logon.c
5 * PURPOSE: Logon functions
6 * PROGRAMMER: Thomas Weidenmueller (w3seek@users.sourceforge.net)
7 */
8
9#include <user32.h>
10
12
13/*
14 * @implemented
15 */
16BOOL
19{
20 USER_API_MESSAGE ApiMessage;
21 PUSER_REGISTER_SERVICES_PROCESS RegisterServicesProcessRequest = &ApiMessage.Data.RegisterServicesProcessRequest;
22
23 RegisterServicesProcessRequest->ProcessId = ServicesProcessId;
24
26 NULL,
28 sizeof(*RegisterServicesProcessRequest));
29 if (!NT_SUCCESS(ApiMessage.Status))
30 {
31 UserSetLastNTError(ApiMessage.Status);
32 return FALSE;
33 }
34
35 return TRUE;
36}
37
38/*
39 * @implemented
40 */
41BOOL
44 BOOL bRegister)
45{
46 gfLogonProcess = NtUserxRegisterLogonProcess(dwProcessId, bRegister);
47
49 {
50 USER_API_MESSAGE ApiMessage;
51 PUSER_REGISTER_LOGON_PROCESS RegisterLogonProcessRequest = &ApiMessage.Data.RegisterLogonProcessRequest;
52
53 RegisterLogonProcessRequest->ProcessId = dwProcessId;
54 RegisterLogonProcessRequest->Register = bRegister;
55
57 NULL,
59 sizeof(*RegisterLogonProcessRequest));
60 if (!NT_SUCCESS(ApiMessage.Status))
61 {
62 ERR("Failed to register logon process with CSRSS\n");
63 UserSetLastNTError(ApiMessage.Status);
64 }
65 }
66
67 return gfLogonProcess;
68}
69
70/*
71 * Helper function used by SetWindowStationUser (see winsta.c)
72 */
74Logon(BOOL IsLogon)
75{
76 USER_API_MESSAGE ApiMessage;
77 PUSER_LOGON LogonRequest = &ApiMessage.Data.LogonRequest;
78
79 LogonRequest->IsLogon = IsLogon;
81 NULL,
83 sizeof(*LogonRequest));
84}
85
86/*
87 * @implemented
88 */
89BOOL
92{
94}
95
96/*
97 * @implemented
98 */
99BOOL
100WINAPI
103{
104 // Update Imm support and load Imm32.dll.
106
107 /* Initialize the IME hotkeys */
109
110 /* Load Preload keyboard layouts */
112
114}
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ERR(fmt,...)
Definition: precomp.h:57
#define CSR_CREATE_API_NUMBER(ServerId, ApiId)
Definition: csrmsg.h:37
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL NTAPI NtUserSetLogonNotifyWindow(HWND hWnd)
Definition: winsta.c:1953
BOOL NTAPI NtUserUpdatePerUserSystemParameters(DWORD dwReserved, BOOL bEnable)
Definition: sysparams.c:375
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
#define FASTCALL
Definition: nt_native.h:50
EXTINLINE BOOL NtUserxRegisterLogonProcess(DWORD dwProcessId, BOOL bRegister)
Definition: ntwrapper.h:831
NTSTATUS NTAPI CsrClientCallServer(_Inout_ PCSR_API_MESSAGE ApiMessage, _Inout_opt_ PCSR_CAPTURE_BUFFER CaptureBuffer, _In_ CSR_API_NUMBER ApiNumber, _In_ ULONG DataLength)
Definition: connect.c:366
USER_REGISTER_SERVICES_PROCESS RegisterServicesProcessRequest
Definition: winmsg.h:112
USER_REGISTER_LOGON_PROCESS RegisterLogonProcessRequest
Definition: winmsg.h:113
USER_LOGON LogonRequest
Definition: winmsg.h:110
NTSTATUS Status
Definition: winmsg.h:104
union _USER_API_MESSAGE::@3537 Data
BOOL IsLogon
Definition: winmsg.h:65
@ SETIMEHOTKEY_INITIALIZE
Definition: undocuser.h:409
BOOLEAN gfLogonProcess
Definition: dllmain.c:34
VOID APIENTRY CliImmInitializeHotKeys(DWORD dwAction, HKL hKL)
Definition: input.c:402
BOOL WINAPI UpdatePerUserImmEnabling(VOID)
Definition: imm.c:1102
VOID WINAPI UserSetLastNTError(IN NTSTATUS Status)
Definition: misc.c:25
VOID IntLoadPreloadKeyboardLayouts(VOID)
Definition: input.c:148
BOOL WINAPI UpdatePerUserSystemParameters(DWORD dwReserved, BOOL bEnable)
Definition: logon.c:101
BOOL WINAPI SetLogonNotifyWindow(HWND Wnd)
Definition: logon.c:91
BOOL WINAPI RegisterLogonProcess(DWORD dwProcessId, BOOL bRegister)
Definition: logon.c:43
VOID FASTCALL Logon(BOOL IsLogon)
Definition: logon.c:74
BOOL WINAPI RegisterServicesProcess(DWORD ServicesProcessId)
Definition: logon.c:18
ULONG_PTR ServicesProcessId
Definition: register.c:20
_In_ BOOL bEnable
Definition: winddi.h:3426
#define WINAPI
Definition: msvc.h:6
@ UserpRegisterLogonProcess
Definition: winmsg.h:28
@ UserpLogon
Definition: winmsg.h:23
@ UserpRegisterServicesProcess
Definition: winmsg.h:24
#define USERSRV_SERVERDLL_INDEX
Definition: winmsg.h:15