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