797c0d2e6df15529881d6c476003025ba16f2ae3
[reactos.git] / reactos / subsys / smss / smss.h
1 #ifndef _SMSS_H_INCLUDED_
2 #define _SMSS_H_INCLUDED_
3
4 #include <stdio.h>
5 #include <windows.h>
6 #define NTOS_MODE_USER
7 #include <ndk/ntndk.h>
8
9 #include <sm/api.h>
10 #include <sm/helper.h>
11
12 /* smss.c */
13 extern ULONG SmSsProcessId;
14
15 /* init.c */
16 NTSTATUS InitSessionManager(VOID);
17
18 /* initheap.c */
19 extern HANDLE SmpHeap;
20 NTSTATUS SmCreateHeap(VOID);
21
22 /* initenv.c */
23 extern PWSTR SmSystemEnvironment;
24 NTSTATUS SmCreateEnvironment(VOID);
25 NTSTATUS SmSetEnvironmentVariables(VOID);
26 NTSTATUS SmUpdateEnvironment(VOID);
27
28 /* initobdir.c */
29 NTSTATUS SmCreateObjectDirectories(VOID);
30
31 /* initdosdev.c */
32 NTSTATUS SmInitDosDevices(VOID);
33
34 /* initrun.c */
35 extern HANDLE Children[2];
36 NTSTATUS SmRunBootApplications(VOID);
37
38 /* initmv.c */
39 NTSTATUS SmProcessFileRenameList(VOID);
40
41 /* initwkdll.c */
42 NTSTATUS SmLoadKnownDlls(VOID);
43
44 /* initpage.c */
45 NTSTATUS SmCreatePagingFiles(VOID);
46
47 /* initreg.c */
48 NTSTATUS SmInitializeRegistry(VOID);
49
50 /* initss.c */
51 NTSTATUS SmLoadSubsystems(VOID);
52
53 /* smapi.c */
54 #define SMAPI(n) \
55 NTSTATUS FASTCALL n (PSM_PORT_MESSAGE Request)
56 PSM_CONNECT_DATA FASTCALL SmpGetConnectData (PSM_PORT_MESSAGE);
57 NTSTATUS SmCreateApiPort(VOID);
58 VOID STDCALL SmpApiThread(PVOID);
59
60
61 /* smapiexec.c */
62 NTSTATUS STDCALL SmCreateUserProcess(LPWSTR ImagePath,
63 LPWSTR CommandLine,
64 BOOLEAN WaitForIt,
65 PLARGE_INTEGER Timeout OPTIONAL,
66 PRTL_USER_PROCESS_INFORMATION UserProcessInfo OPTIONAL);
67 NTSTATUS FASTCALL SmExecPgm(PSM_PORT_MESSAGE);
68
69 /* smapicomp.c */
70 NTSTATUS FASTCALL SmCompSes(PSM_PORT_MESSAGE);
71
72 /* smapiquery.c */
73 NTSTATUS FASTCALL SmQryInfo(PSM_PORT_MESSAGE);
74
75 /* client.c */
76 #define SM_CLIENT_FLAG_CANDIDATE 0x8000
77 #define SM_CLIENT_FLAG_INITIALIZED 0x0001
78 #define SM_CLIENT_FLAG_REQUIRED 0x0002
79 typedef struct _SM_CLIENT_DATA
80 {
81 RTL_CRITICAL_SECTION Lock;
82 WCHAR ProgramName [SM_SB_NAME_MAX_LENGTH];
83 USHORT SubsystemId;
84 WORD Flags;
85 WORD Unused;
86 ULONG ServerProcessId;
87 HANDLE ServerProcess;
88 HANDLE ApiPort;
89 HANDLE ApiPortThread;
90 HANDLE SbApiPort;
91 WCHAR SbApiPortName [SM_SB_NAME_MAX_LENGTH];
92 struct _SM_CLIENT_DATA * Next;
93
94 } SM_CLIENT_DATA, *PSM_CLIENT_DATA;
95 NTSTATUS SmInitializeClientManagement (VOID);
96 NTSTATUS STDCALL SmCreateClient (PRTL_USER_PROCESS_INFORMATION,PWSTR);
97 NTSTATUS STDCALL SmDestroyClient (ULONG);
98 NTSTATUS STDCALL SmBeginClientInitialization (PSM_PORT_MESSAGE,PSM_CLIENT_DATA*);
99 NTSTATUS STDCALL SmCompleteClientInitialization (ULONG);
100 NTSTATUS FASTCALL SmGetClientBasicInformation (PSM_BASIC_INFORMATION);
101 NTSTATUS FASTCALL SmGetSubSystemInformation (PSM_SUBSYSTEM_INFORMATION);
102
103 /* debug.c */
104 extern HANDLE DbgSsApiPort;
105 extern HANDLE DbgUiApiPort;
106 NTSTATUS SmInitializeDbgSs(VOID);
107
108 /* print.c */
109 VOID STDCALL DisplayString(LPCWSTR lpwString);
110 VOID STDCALL PrintString (char* fmt, ...);
111
112 #endif /* _SMSS_H_INCLUDED_ */
113
114 /* EOF */
115