24c0c7debc36861f7801195b45ad5e299c5d32f6
[reactos.git] / reactos / subsystems / win32 / csrss / include / csrplugin.h
1 /* $Id$
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS system libraries
5 * FILE: subsys/csrss/include/csrplugin.h
6 * PURPOSE: CSRSS plugin interface
7 */
8
9 /*
10 * CSRSS is a native application and can only implicitly link against native
11 * DLLs. Since e.g. user32.dll and gdi32.dll are win32 DLLs and not native
12 * DLLs it is not possible to call functions in those DLLs directly from
13 * CSRSS.
14 * However, it is possible to explicitly load a non-native DLL. Such a DLL
15 * can then in turn be implicitly linked against other DLLs in its own
16 * subsystem.
17 */
18
19 #pragma once
20
21 #include <windows.h>
22 #include "api.h"
23
24 typedef NTSTATUS (WINAPI *CSRSS_INSERT_OBJECT_PROC)(PCSRSS_PROCESS_DATA ProcessData,
25 PHANDLE Handle,
26 Object_t *Object,
27 DWORD Access,
28 BOOL Inheritable);
29 typedef NTSTATUS (WINAPI *CSRSS_GET_OBJECT_PROC)(PCSRSS_PROCESS_DATA ProcessData,
30 HANDLE Handle,
31 Object_t **Object,
32 DWORD Access);
33 typedef NTSTATUS (WINAPI *CSRSS_RELEASE_OBJECT_BY_POINTER_PROC)(Object_t *Object);
34 typedef NTSTATUS (WINAPI *CSRSS_RELEASE_OBJECT_PROC)(PCSRSS_PROCESS_DATA ProcessData,
35 HANDLE Object );
36 typedef NTSTATUS (WINAPI *CSRSS_RELEASE_CONSOLE_PROC)(PCSRSS_PROCESS_DATA ProcessData);
37 typedef NTSTATUS (WINAPI *CSRSS_ENUM_PROCESSES_PROC)(CSRSS_ENUM_PROCESS_PROC EnumProc,
38 PVOID Context);
39
40 typedef struct tagCSRSS_EXPORTED_FUNCS
41 {
42 CSRSS_INSERT_OBJECT_PROC CsrInsertObjectProc;
43 CSRSS_GET_OBJECT_PROC CsrGetObjectProc;
44 CSRSS_RELEASE_OBJECT_BY_POINTER_PROC CsrReleaseObjectByPointerProc;
45 CSRSS_RELEASE_OBJECT_PROC CsrReleaseObjectProc;
46 CSRSS_RELEASE_CONSOLE_PROC CsrReleaseConsoleProc;
47 CSRSS_ENUM_PROCESSES_PROC CsrEnumProcessesProc;
48 } CSRSS_EXPORTED_FUNCS, *PCSRSS_EXPORTED_FUNCS;
49
50 typedef BOOL (WINAPI *CSRPLUGIN_INIT_COMPLETE_PROC)(void);
51
52 typedef BOOL (WINAPI *CSRPLUGIN_HARDERROR_PROC)(IN PCSRSS_PROCESS_DATA ProcessData,
53 IN PHARDERROR_MSG HardErrorMessage);
54
55 typedef BOOL (WINAPI *CSRPLUGIN_INITIALIZE_PROC)(PCSRSS_API_DEFINITION *ApiDefinitions,
56 PCSRSS_OBJECT_DEFINITION *ObjectDefinitions,
57 CSRPLUGIN_INIT_COMPLETE_PROC *InitCompleteProc,
58 CSRPLUGIN_HARDERROR_PROC *HardErrorProc,
59 PCSRSS_EXPORTED_FUNCS Exports,
60 HANDLE CsrssApiHeap);
61
62 /* EOF */