Added more time functions
[reactos.git] / reactos / include / ntdll / rtl.h
1 /* $Id: rtl.h,v 1.14 2000/04/07 12:45:02 ekohl Exp $
2 *
3 */
4
5 #ifndef __INCLUDE_NTDLL_RTL_H
6 #define __INCLUDE_NTDLL_RTL_H
7
8 /*
9 * Preliminary data type!!
10 *
11 * This definition is not finished yet. It will change in the future.
12 */
13 typedef struct _RTL_USER_PROCESS_INFO
14 {
15 ULONG Unknown1; // 0x00
16 HANDLE ProcessHandle; // 0x04
17 HANDLE ThreadHandle; // 0x08
18 CLIENT_ID ClientId; // 0x0C
19 ULONG Unknown5; // 0x14
20 LONG StackZeroBits; // 0x18
21 LONG StackReserved; // 0x1C
22 LONG StackCommit; // 0x20
23 ULONG Unknown9; // 0x24
24 // more data ... ???
25 } RTL_USER_PROCESS_INFO, *PRTL_USER_PROCESS_INFO;
26
27
28
29 #define HEAP_BASE (0xa0000000)
30
31 VOID
32 STDCALL
33 RtlDeleteCriticalSection (
34 LPCRITICAL_SECTION lpCriticalSection
35 );
36
37 VOID
38 STDCALL
39 RtlEnterCriticalSection (
40 LPCRITICAL_SECTION lpCriticalSection
41 );
42
43 VOID
44 STDCALL
45 RtlInitializeCriticalSection (
46 LPCRITICAL_SECTION pcritical
47 );
48
49 VOID
50 STDCALL
51 RtlLeaveCriticalSection (
52 LPCRITICAL_SECTION lpCriticalSection
53 );
54
55 BOOLEAN
56 STDCALL
57 RtlTryEntryCriticalSection (
58 LPCRITICAL_SECTION lpCriticalSection
59 );
60
61 UINT
62 STDCALL
63 RtlCompactHeap (
64 HANDLE heap,
65 DWORD flags
66 );
67
68 VOID
69 STDCALL
70 RtlEraseUnicodeString (
71 IN PUNICODE_STRING String
72 );
73
74 /* Path functions */
75
76 ULONG
77 STDCALL
78 RtlDetermineDosPathNameType_U (
79 PWSTR Path
80 );
81
82 BOOLEAN
83 STDCALL
84 RtlDoesFileExists_U (
85 PWSTR FileName
86 );
87
88 BOOLEAN
89 STDCALL
90 RtlDosPathNameToNtPathName_U (
91 PWSTR dosname,
92 PUNICODE_STRING ntname,
93 PWSTR *shortname,
94 PCURDIR nah
95 );
96
97 ULONG
98 STDCALL
99 RtlDosSearchPath_U (
100 WCHAR *sp,
101 WCHAR *name,
102 WCHAR *ext,
103 ULONG buf_sz,
104 WCHAR *buffer,
105 WCHAR **shortname
106 );
107
108 ULONG
109 STDCALL
110 RtlGetCurrentDirectory_U (
111 ULONG MaximumLength,
112 PWSTR Buffer
113 );
114
115 ULONG
116 STDCALL
117 RtlGetFullPathName_U (
118 WCHAR *dosname,
119 ULONG size,
120 WCHAR *buf,
121 WCHAR **shortname
122 );
123
124 ULONG
125 STDCALL
126 RtlGetLongestNtPathLength (
127 VOID
128 );
129
130 ULONG
131 STDCALL
132 RtlIsDosDeviceName_U (
133 PWSTR DeviceName
134 );
135
136 NTSTATUS
137 STDCALL
138 RtlSetCurrentDirectory_U (
139 PUNICODE_STRING name
140 );
141
142 /* Environment functions */
143 VOID
144 STDCALL
145 RtlAcquirePebLock (
146 VOID
147 );
148
149 VOID
150 STDCALL
151 RtlReleasePebLock (
152 VOID
153 );
154
155 NTSTATUS
156 STDCALL
157 RtlCreateEnvironment (
158 BOOLEAN Inherit,
159 PVOID *Environment
160 );
161
162 VOID
163 STDCALL
164 RtlDestroyEnvironment (
165 PVOID Environment
166 );
167
168 NTSTATUS
169 STDCALL
170 RtlExpandEnvironmentStrings_U (
171 PVOID Environment,
172 PUNICODE_STRING Source,
173 PUNICODE_STRING Destination,
174 PULONG Length
175 );
176
177 NTSTATUS
178 STDCALL
179 RtlQueryEnvironmentVariable_U (
180 PVOID Environment,
181 PUNICODE_STRING Name,
182 PUNICODE_STRING Value
183 );
184
185 VOID
186 STDCALL
187 RtlSetCurrentEnvironment (
188 PVOID NewEnvironment,
189 PVOID *OldEnvironment
190 );
191
192 NTSTATUS
193 STDCALL
194 RtlSetEnvironmentVariable (
195 PVOID *Environment,
196 PUNICODE_STRING Name,
197 PUNICODE_STRING Value
198 );
199
200 NTSTATUS
201 STDCALL
202 RtlCreateUserThread (
203 IN HANDLE ProcessHandle,
204 IN PSECURITY_DESCRIPTOR SecurityDescriptor,
205 IN BOOLEAN CreateSuspended,
206 IN LONG StackZeroBits,
207 IN OUT PULONG StackReserved,
208 IN OUT PULONG StackCommit,
209 IN PTHREAD_START_ROUTINE StartAddress,
210 IN PVOID Parameter,
211 IN OUT PHANDLE ThreadHandle,
212 IN OUT PCLIENT_ID ClientId
213 );
214
215 /*
216 * Preliminary prototype!!
217 *
218 * This prototype is not finished yet. It will change in the future.
219 */
220 NTSTATUS
221 STDCALL
222 RtlCreateUserProcess (
223 PUNICODE_STRING CommandLine,
224 ULONG Unknown2,
225 PRTL_USER_PROCESS_PARAMETERS ProcessParameters, // verified
226 PSECURITY_DESCRIPTOR ProcessSd,
227 PSECURITY_DESCRIPTOR ThreadSd,
228 WINBOOL bInheritHandles,
229 DWORD dwCreationFlags,
230 ULONG Unknown8,
231 ULONG Unknown9,
232 PRTL_USER_PROCESS_INFO ProcessInfo // verified
233 );
234
235 NTSTATUS
236 STDCALL
237 RtlCreateProcessParameters (
238 IN OUT PRTL_USER_PROCESS_PARAMETERS *ProcessParameters,
239 IN PUNICODE_STRING CommandLine,
240 IN PUNICODE_STRING DllPath,
241 IN PUNICODE_STRING CurrentDirectory,
242 IN PUNICODE_STRING ImagePathName,
243 IN PVOID Environment,
244 IN PUNICODE_STRING WindowTitle,
245 IN PUNICODE_STRING DesktopInfo,
246 IN PUNICODE_STRING ShellInfo,
247 IN PUNICODE_STRING RuntimeData
248 );
249
250 PRTL_USER_PROCESS_PARAMETERS
251 STDCALL
252 RtlDeNormalizeProcessParams (
253 IN OUT PRTL_USER_PROCESS_PARAMETERS ProcessParameters
254 );
255
256 VOID
257 STDCALL
258 RtlDestroyProcessParameters (
259 IN OUT PRTL_USER_PROCESS_PARAMETERS ProcessParameters
260 );
261
262 PRTL_USER_PROCESS_PARAMETERS
263 STDCALL
264 RtlNormalizeProcessParams (
265 IN OUT PRTL_USER_PROCESS_PARAMETERS ProcessParameters
266 );
267
268 NTSTATUS
269 STDCALL
270 RtlLocalTimeToSystemTime (
271 PLARGE_INTEGER LocalTime,
272 PLARGE_INTEGER SystemTime
273 );
274
275 NTSTATUS
276 STDCALL
277 RtlSystemTimeToLocalTime (
278 PLARGE_INTEGER SystemTime,
279 PLARGE_INTEGER LocalTime
280 );
281
282 #endif /* __INCLUDE_NTDLL_RTL_H */
283
284 /* EOF */