[CSRSRV]
[reactos.git] / reactos / subsystems / win32 / csrss / include / csrplugin.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: subsys/csrss/include/csrplugin.h
5 * PURPOSE: CSRSS plugin interface
6 */
7
8 /*
9 * CSRSS is a native application and can only implicitly link against native
10 * DLLs. Since e.g. user32.dll and gdi32.dll are win32 DLLs and not native
11 * DLLs it is not possible to call functions in those DLLs directly from
12 * CSRSS.
13 * However, it is possible to explicitly load a non-native DLL. Such a DLL
14 * can then in turn be implicitly linked against other DLLs in its own
15 * subsystem.
16 */
17
18 #pragma once
19
20 #include <windows.h>
21 #include "api.h"
22
23 typedef NTSTATUS (WINAPI *CSRSS_ENUM_PROCESSES_PROC)(CSRSS_ENUM_PROCESS_PROC EnumProc,
24 PVOID Context);
25
26 typedef struct tagCSRSS_EXPORTED_FUNCS
27 {
28 CSRSS_ENUM_PROCESSES_PROC CsrEnumProcessesProc;
29 } CSRSS_EXPORTED_FUNCS, *PCSRSS_EXPORTED_FUNCS;
30
31 typedef BOOL (WINAPI *CSRPLUGIN_INIT_COMPLETE_PROC)(void);
32
33 typedef VOID (WINAPI *CSRPLUGIN_HARDERROR_PROC)(IN PCSR_THREAD ThreadData,
34 IN PHARDERROR_MSG HardErrorMessage);
35
36 typedef NTSTATUS (WINAPI *CSRPLUGIN_PROCESS_INHERIT_PROC)(IN PCSR_PROCESS SourceProcessData,
37 IN PCSR_PROCESS TargetProcessData);
38
39 typedef ULONG (WINAPI *CSRPLUGIN_PROCESS_DELETED_PROC)(IN PCSR_PROCESS ProcessData, IN ULONG Unused, IN BOOLEAN Flag);
40
41 typedef struct tagCSRSS_SERVER_PROCS
42 {
43 CSRPLUGIN_INIT_COMPLETE_PROC InitCompleteProc;
44 CSRPLUGIN_HARDERROR_PROC HardErrorProc;
45 CSRPLUGIN_PROCESS_INHERIT_PROC ProcessInheritProc;
46 CSRPLUGIN_PROCESS_DELETED_PROC ProcessDeletedProc;
47 } CSRPLUGIN_SERVER_PROCS, *PCSRPLUGIN_SERVER_PROCS;
48
49 typedef BOOL (WINAPI *CSRPLUGIN_INITIALIZE_PROC)(PCSRSS_API_DEFINITION *ApiDefinitions,
50 PCSRPLUGIN_SERVER_PROCS ServerProcs);
51
52 /* EOF */