2021-09-13 01:33:14 +00:00
|
|
|
/*
|
2013-04-15 19:46:07 +00:00
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
2014-12-17 00:17:44 +00:00
|
|
|
* PROJECT: ReactOS Win32k subsystem
|
[WIN32K]
Reintroduce CSR support for kernel mode, based on code from Ge that was wiped out in revision 58770, and by ntdll CSR code. Is needed for kernel to user-mode CSR callbacks.
For readers, I remind you the big callback picture in the Win32 subsystem:
- In Windows NT 3.1 and 3.51, USER and GDI was modeled against client/server model (USER32.DLL and WINSRV.DLL, and GDI32.DLL and GDISRV.DLL), all running in user mode (using the CSR API).
- Starting Windows NT 4.0 (and up), some USER and GDI parts were moved into kernel mode (in the WIN32K.SYS driver) to speedup communication. We get:
* GDI32.DLL as the client, doing win32k system calls (kernel-mode system calls to win32k),
* and USER32.DLL, WINSRV.DLL and WIN32K.SYS working in tandem, USER32.DLL being the client and {WINSRV.DLL, WIN32K.SYS} being the server.
USER32.DLL can do win32k system calls or CSR calls to WINSRV.DLL (client to server calls). For server-to-server calls, we have WINSRV.DLL
doing win32k system calls, or WIN32K.SYS doing CSR calls back to WINSRV.DLL . Also, there is the possibility for WIN32K.SYS to make user-mode
callbacks to USER32.DLL.
svn path=/trunk/; revision=65817
2014-12-23 21:17:24 +00:00
|
|
|
* PURPOSE: Interface between Win32k and USERSRV
|
2015-11-10 17:41:55 +00:00
|
|
|
* FILE: win32ss/user/ntuser/csr.h
|
[WIN32K]
Reintroduce CSR support for kernel mode, based on code from Ge that was wiped out in revision 58770, and by ntdll CSR code. Is needed for kernel to user-mode CSR callbacks.
For readers, I remind you the big callback picture in the Win32 subsystem:
- In Windows NT 3.1 and 3.51, USER and GDI was modeled against client/server model (USER32.DLL and WINSRV.DLL, and GDI32.DLL and GDISRV.DLL), all running in user mode (using the CSR API).
- Starting Windows NT 4.0 (and up), some USER and GDI parts were moved into kernel mode (in the WIN32K.SYS driver) to speedup communication. We get:
* GDI32.DLL as the client, doing win32k system calls (kernel-mode system calls to win32k),
* and USER32.DLL, WINSRV.DLL and WIN32K.SYS working in tandem, USER32.DLL being the client and {WINSRV.DLL, WIN32K.SYS} being the server.
USER32.DLL can do win32k system calls or CSR calls to WINSRV.DLL (client to server calls). For server-to-server calls, we have WINSRV.DLL
doing win32k system calls, or WIN32K.SYS doing CSR calls back to WINSRV.DLL . Also, there is the possibility for WIN32K.SYS to make user-mode
callbacks to USER32.DLL.
svn path=/trunk/; revision=65817
2014-12-23 21:17:24 +00:00
|
|
|
* PROGRAMER: Hermes Belusca-Maito (hermes.belusca@sfr.fr), based on
|
|
|
|
* the original code by Ge van Geldorp (ge@gse.nl) and by
|
|
|
|
* the CSR code in NTDLL.
|
2013-04-15 19:46:07 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
[WIN32K]
Reintroduce CSR support for kernel mode, based on code from Ge that was wiped out in revision 58770, and by ntdll CSR code. Is needed for kernel to user-mode CSR callbacks.
For readers, I remind you the big callback picture in the Win32 subsystem:
- In Windows NT 3.1 and 3.51, USER and GDI was modeled against client/server model (USER32.DLL and WINSRV.DLL, and GDI32.DLL and GDISRV.DLL), all running in user mode (using the CSR API).
- Starting Windows NT 4.0 (and up), some USER and GDI parts were moved into kernel mode (in the WIN32K.SYS driver) to speedup communication. We get:
* GDI32.DLL as the client, doing win32k system calls (kernel-mode system calls to win32k),
* and USER32.DLL, WINSRV.DLL and WIN32K.SYS working in tandem, USER32.DLL being the client and {WINSRV.DLL, WIN32K.SYS} being the server.
USER32.DLL can do win32k system calls or CSR calls to WINSRV.DLL (client to server calls). For server-to-server calls, we have WINSRV.DLL
doing win32k system calls, or WIN32K.SYS doing CSR calls back to WINSRV.DLL . Also, there is the possibility for WIN32K.SYS to make user-mode
callbacks to USER32.DLL.
svn path=/trunk/; revision=65817
2014-12-23 21:17:24 +00:00
|
|
|
/* NDK Headers */
|
|
|
|
#include <ndk/lpcfuncs.h>
|
2013-04-15 19:46:07 +00:00
|
|
|
|
[WIN32K]
Reintroduce CSR support for kernel mode, based on code from Ge that was wiped out in revision 58770, and by ntdll CSR code. Is needed for kernel to user-mode CSR callbacks.
For readers, I remind you the big callback picture in the Win32 subsystem:
- In Windows NT 3.1 and 3.51, USER and GDI was modeled against client/server model (USER32.DLL and WINSRV.DLL, and GDI32.DLL and GDISRV.DLL), all running in user mode (using the CSR API).
- Starting Windows NT 4.0 (and up), some USER and GDI parts were moved into kernel mode (in the WIN32K.SYS driver) to speedup communication. We get:
* GDI32.DLL as the client, doing win32k system calls (kernel-mode system calls to win32k),
* and USER32.DLL, WINSRV.DLL and WIN32K.SYS working in tandem, USER32.DLL being the client and {WINSRV.DLL, WIN32K.SYS} being the server.
USER32.DLL can do win32k system calls or CSR calls to WINSRV.DLL (client to server calls). For server-to-server calls, we have WINSRV.DLL
doing win32k system calls, or WIN32K.SYS doing CSR calls back to WINSRV.DLL . Also, there is the possibility for WIN32K.SYS to make user-mode
callbacks to USER32.DLL.
svn path=/trunk/; revision=65817
2014-12-23 21:17:24 +00:00
|
|
|
/* CSRSS Header */
|
|
|
|
#include <csr/csr.h>
|
|
|
|
#include <win/winmsg.h>
|
|
|
|
|
|
|
|
extern PEPROCESS gpepCSRSS;
|
|
|
|
extern PVOID CsrApiPort;
|
|
|
|
|
|
|
|
VOID InitCsrProcess(VOID /*IN PEPROCESS CsrProcess*/);
|
|
|
|
VOID ResetCsrProcess(VOID);
|
|
|
|
NTSTATUS InitCsrApiPort(IN HANDLE CsrPortHandle);
|
|
|
|
VOID ResetCsrApiPort(VOID);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
CsrClientCallServer(IN OUT PCSR_API_MESSAGE ApiMessage,
|
|
|
|
IN OUT PCSR_CAPTURE_BUFFER CaptureBuffer OPTIONAL,
|
|
|
|
IN CSR_API_NUMBER ApiNumber,
|
|
|
|
IN ULONG DataLength);
|
2013-04-15 19:46:07 +00:00
|
|
|
|
2018-12-16 11:16:29 +00:00
|
|
|
#define ST_RIT (1<<0)
|
|
|
|
#define ST_DESKTOP_THREAD (1<<1)
|
|
|
|
#define ST_GHOST_THREAD (1<<2)
|
|
|
|
|
|
|
|
DWORD UserSystemThreadProc(BOOL bRemoteProcess);
|
|
|
|
BOOL UserCreateSystemThread(DWORD Type);
|
|
|
|
|
2013-04-15 19:46:07 +00:00
|
|
|
/* EOF */
|