mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:33:16 +00:00
[USER32]: Move some logon-related functions to an appropriate file.
svn path=/trunk/; revision=65515
This commit is contained in:
parent
5ec4df01ce
commit
c5601a5515
4 changed files with 97 additions and 79 deletions
|
@ -25,6 +25,7 @@ list(APPEND SOURCE
|
||||||
misc/exit.c
|
misc/exit.c
|
||||||
misc/exticon.c
|
misc/exticon.c
|
||||||
misc/imm.c
|
misc/imm.c
|
||||||
|
misc/logon.c
|
||||||
misc/misc.c
|
misc/misc.c
|
||||||
misc/object.c
|
misc/object.c
|
||||||
misc/resources.c
|
misc/resources.c
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
* - This ends the processing for the first ExitWindowsEx() call from WinLogon.
|
* - This ends the processing for the first ExitWindowsEx() call from WinLogon.
|
||||||
* Execution continues in WinLogon, which calls ExitWindowsEx() again to
|
* Execution continues in WinLogon, which calls ExitWindowsEx() again to
|
||||||
* terminate COM processes in the interactive user's session.
|
* terminate COM processes in the interactive user's session.
|
||||||
* - WinLogon stops impersonating the interactive user (whos processes are
|
* - WinLogon stops impersonating the interactive user (whose processes are
|
||||||
* all dead by now). and enters log-out state
|
* all dead by now). and enters log-out state
|
||||||
* - If the ExitWindowsEx() request was for a logoff, WinLogon sends a SAS
|
* - If the ExitWindowsEx() request was for a logoff, WinLogon sends a SAS
|
||||||
* event (to display the "press ctrl+alt+del") to the GINA. WinLogon then
|
* event (to display the "press ctrl+alt+del") to the GINA. WinLogon then
|
||||||
|
@ -86,29 +86,4 @@ ExitWindowsEx(UINT uFlags,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @implemented
|
|
||||||
*/
|
|
||||||
BOOL WINAPI
|
|
||||||
RegisterServicesProcess(DWORD ServicesProcessId)
|
|
||||||
{
|
|
||||||
NTSTATUS Status;
|
|
||||||
USER_API_MESSAGE ApiMessage;
|
|
||||||
|
|
||||||
ApiMessage.Data.RegisterServicesProcessRequest.ProcessId = ServicesProcessId;
|
|
||||||
|
|
||||||
Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
|
|
||||||
NULL,
|
|
||||||
CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX, UserpRegisterServicesProcess),
|
|
||||||
sizeof(USER_REGISTER_SERVICES_PROCESS));
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
95
reactos/win32ss/user/user32/misc/logon.c
Normal file
95
reactos/win32ss/user/user32/misc/logon.c
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
/*
|
||||||
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
|
* PROJECT: ReactOS user32.dll
|
||||||
|
* FILE: lib/user32/misc/logon.c
|
||||||
|
* PURPOSE: Logon functions
|
||||||
|
* PROGRAMMER: Thomas Weidenmueller (w3seek@users.sourceforge.net)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES ******************************************************************/
|
||||||
|
|
||||||
|
#include <user32.h>
|
||||||
|
|
||||||
|
#include <wine/debug.h>
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(user32);
|
||||||
|
|
||||||
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
BOOL
|
||||||
|
WINAPI
|
||||||
|
RegisterServicesProcess(DWORD ServicesProcessId)
|
||||||
|
{
|
||||||
|
USER_API_MESSAGE ApiMessage;
|
||||||
|
PUSER_REGISTER_SERVICES_PROCESS RegisterServicesProcessRequest = &ApiMessage.Data.RegisterServicesProcessRequest;
|
||||||
|
|
||||||
|
RegisterServicesProcessRequest->ProcessId = ServicesProcessId;
|
||||||
|
|
||||||
|
CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
|
||||||
|
NULL,
|
||||||
|
CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX, UserpRegisterServicesProcess),
|
||||||
|
sizeof(*RegisterServicesProcessRequest));
|
||||||
|
if (!NT_SUCCESS(ApiMessage.Status))
|
||||||
|
{
|
||||||
|
UserSetLastNTError(ApiMessage.Status);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
BOOL
|
||||||
|
WINAPI
|
||||||
|
RegisterLogonProcess(DWORD dwProcessId,
|
||||||
|
BOOL bRegister)
|
||||||
|
{
|
||||||
|
gfLogonProcess = NtUserxRegisterLogonProcess(dwProcessId, bRegister);
|
||||||
|
|
||||||
|
if (gfLogonProcess)
|
||||||
|
{
|
||||||
|
USER_API_MESSAGE ApiMessage;
|
||||||
|
PUSER_REGISTER_LOGON_PROCESS RegisterLogonProcessRequest = &ApiMessage.Data.RegisterLogonProcessRequest;
|
||||||
|
|
||||||
|
RegisterLogonProcessRequest->ProcessId = dwProcessId;
|
||||||
|
RegisterLogonProcessRequest->Register = bRegister;
|
||||||
|
|
||||||
|
CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
|
||||||
|
NULL,
|
||||||
|
CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX, UserpRegisterLogonProcess),
|
||||||
|
sizeof(*RegisterLogonProcessRequest));
|
||||||
|
if (!NT_SUCCESS(ApiMessage.Status))
|
||||||
|
{
|
||||||
|
ERR("Failed to register logon process with CSRSS\n");
|
||||||
|
UserSetLastNTError(ApiMessage.Status);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return gfLogonProcess;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
BOOL
|
||||||
|
WINAPI
|
||||||
|
SetLogonNotifyWindow(HWND Wnd, HWINSTA WinSta)
|
||||||
|
{
|
||||||
|
return NtUserSetLogonNotifyWindow(Wnd);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
BOOL
|
||||||
|
WINAPI
|
||||||
|
UpdatePerUserSystemParameters(DWORD dwReserved,
|
||||||
|
BOOL bEnable)
|
||||||
|
{
|
||||||
|
return NtUserUpdatePerUserSystemParameters(dwReserved, bEnable);
|
||||||
|
}
|
|
@ -40,59 +40,6 @@ UserSetLastNTError(IN NTSTATUS Status)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @implemented
|
|
||||||
*/
|
|
||||||
BOOL
|
|
||||||
WINAPI
|
|
||||||
RegisterLogonProcess(DWORD dwProcessId, BOOL bRegister)
|
|
||||||
{
|
|
||||||
gfLogonProcess = NtUserxRegisterLogonProcess(dwProcessId, bRegister);
|
|
||||||
|
|
||||||
if (gfLogonProcess)
|
|
||||||
{
|
|
||||||
NTSTATUS Status;
|
|
||||||
USER_API_MESSAGE ApiMessage;
|
|
||||||
|
|
||||||
ApiMessage.Data.RegisterLogonProcessRequest.ProcessId = dwProcessId;
|
|
||||||
ApiMessage.Data.RegisterLogonProcessRequest.Register = bRegister;
|
|
||||||
|
|
||||||
Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
|
|
||||||
NULL,
|
|
||||||
CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX, UserpRegisterLogonProcess),
|
|
||||||
sizeof(USER_REGISTER_LOGON_PROCESS));
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
ERR("Failed to register logon process with CSRSS\n");
|
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
|
||||||
// return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return gfLogonProcess;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @implemented
|
|
||||||
*/
|
|
||||||
BOOL
|
|
||||||
WINAPI
|
|
||||||
SetLogonNotifyWindow(HWND Wnd, HWINSTA WinSta)
|
|
||||||
{
|
|
||||||
return NtUserSetLogonNotifyWindow(Wnd);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @implemented
|
|
||||||
*/
|
|
||||||
BOOL WINAPI
|
|
||||||
UpdatePerUserSystemParameters(
|
|
||||||
DWORD dwReserved,
|
|
||||||
BOOL bEnable)
|
|
||||||
{
|
|
||||||
return NtUserUpdatePerUserSystemParameters(dwReserved, bEnable);
|
|
||||||
}
|
|
||||||
|
|
||||||
PTHREADINFO
|
PTHREADINFO
|
||||||
GetW32ThreadInfo(VOID)
|
GetW32ThreadInfo(VOID)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue