OLD | NEW |
1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file holds definitions related to the ntdll API. | 5 // This file holds definitions related to the ntdll API. |
6 | 6 |
7 #ifndef SANDBOX_SRC_NT_INTERNALS_H__ | 7 #ifndef SANDBOX_WIN_SRC_NT_INTERNALS_H__ |
8 #define SANDBOX_SRC_NT_INTERNALS_H__ | 8 #define SANDBOX_WIN_SRC_NT_INTERNALS_H__ |
9 | 9 |
10 #include <windows.h> | 10 #include <windows.h> |
11 | 11 |
12 typedef LONG NTSTATUS; | 12 typedef LONG NTSTATUS; |
13 #define NT_SUCCESS(st) (st >= 0) | 13 #define NT_SUCCESS(st) (st >= 0) |
14 | 14 |
15 #define STATUS_SUCCESS ((NTSTATUS)0x00000000L) | 15 #define STATUS_SUCCESS ((NTSTATUS)0x00000000L) |
16 #define STATUS_BUFFER_OVERFLOW ((NTSTATUS)0x80000005L) | 16 #define STATUS_BUFFER_OVERFLOW ((NTSTATUS)0x80000005L) |
17 #define STATUS_UNSUCCESSFUL ((NTSTATUS)0xC0000001L) | 17 #define STATUS_UNSUCCESSFUL ((NTSTATUS)0xC0000001L) |
18 #define STATUS_NOT_IMPLEMENTED ((NTSTATUS)0xC0000002L) | 18 #define STATUS_NOT_IMPLEMENTED ((NTSTATUS)0xC0000002L) |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 } NT_THREAD_INFORMATION_CLASS, *PNT_THREAD_INFORMATION_CLASS; | 285 } NT_THREAD_INFORMATION_CLASS, *PNT_THREAD_INFORMATION_CLASS; |
286 | 286 |
287 typedef NTSTATUS (WINAPI *NtSetInformationThreadFunction) ( | 287 typedef NTSTATUS (WINAPI *NtSetInformationThreadFunction) ( |
288 IN HANDLE ThreadHandle, | 288 IN HANDLE ThreadHandle, |
289 IN NT_THREAD_INFORMATION_CLASS ThreadInformationClass, | 289 IN NT_THREAD_INFORMATION_CLASS ThreadInformationClass, |
290 IN PVOID ThreadInformation, | 290 IN PVOID ThreadInformation, |
291 IN ULONG ThreadInformationLength); | 291 IN ULONG ThreadInformationLength); |
292 | 292 |
293 // Partial definition only: | 293 // Partial definition only: |
294 typedef enum _PROCESSINFOCLASS { | 294 typedef enum _PROCESSINFOCLASS { |
295 ProcessBasicInformation = 0 | 295 ProcessBasicInformation = 0, |
| 296 ProcessExecuteFlags = 0x22 |
296 } PROCESSINFOCLASS; | 297 } PROCESSINFOCLASS; |
297 | 298 |
298 typedef PVOID PPEB; | 299 typedef PVOID PPEB; |
299 typedef PVOID KPRIORITY; | 300 typedef PVOID KPRIORITY; |
300 | 301 |
301 typedef struct _PROCESS_BASIC_INFORMATION { | 302 typedef struct _PROCESS_BASIC_INFORMATION { |
302 NTSTATUS ExitStatus; | 303 NTSTATUS ExitStatus; |
303 PPEB PebBaseAddress; | 304 PPEB PebBaseAddress; |
304 KAFFINITY AffinityMask; | 305 KAFFINITY AffinityMask; |
305 KPRIORITY BasePriority; | 306 KPRIORITY BasePriority; |
306 ULONG UniqueProcessId; | 307 ULONG UniqueProcessId; |
307 ULONG InheritedFromUniqueProcessId; | 308 ULONG InheritedFromUniqueProcessId; |
308 } PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION; | 309 } PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION; |
309 | 310 |
310 typedef NTSTATUS (WINAPI *NtQueryInformationProcessFunction)( | 311 typedef NTSTATUS (WINAPI *NtQueryInformationProcessFunction)( |
311 IN HANDLE ProcessHandle, | 312 IN HANDLE ProcessHandle, |
312 IN PROCESSINFOCLASS ProcessInformationClass, | 313 IN PROCESSINFOCLASS ProcessInformationClass, |
313 OUT PVOID ProcessInformation, | 314 OUT PVOID ProcessInformation, |
314 IN ULONG ProcessInformationLength, | 315 IN ULONG ProcessInformationLength, |
315 OUT PULONG ReturnLength OPTIONAL); | 316 OUT PULONG ReturnLength OPTIONAL); |
316 | 317 |
| 318 typedef NTSTATUS (WINAPI *NtSetInformationProcessFunction)( |
| 319 HANDLE ProcessHandle, |
| 320 IN PROCESSINFOCLASS ProcessInformationClass, |
| 321 IN PVOID ProcessInformation, |
| 322 IN ULONG ProcessInformationLength); |
| 323 |
317 typedef NTSTATUS (WINAPI *NtOpenThreadTokenFunction) ( | 324 typedef NTSTATUS (WINAPI *NtOpenThreadTokenFunction) ( |
318 IN HANDLE ThreadHandle, | 325 IN HANDLE ThreadHandle, |
319 IN ACCESS_MASK DesiredAccess, | 326 IN ACCESS_MASK DesiredAccess, |
320 IN BOOLEAN OpenAsSelf, | 327 IN BOOLEAN OpenAsSelf, |
321 OUT PHANDLE TokenHandle); | 328 OUT PHANDLE TokenHandle); |
322 | 329 |
323 typedef NTSTATUS (WINAPI *NtOpenThreadTokenExFunction) ( | 330 typedef NTSTATUS (WINAPI *NtOpenThreadTokenExFunction) ( |
324 IN HANDLE ThreadHandle, | 331 IN HANDLE ThreadHandle, |
325 IN ACCESS_MASK DesiredAccess, | 332 IN ACCESS_MASK DesiredAccess, |
326 IN BOOLEAN OpenAsSelf, | 333 IN BOOLEAN OpenAsSelf, |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 | 608 |
602 typedef LONG (WINAPI *RtlCompareUnicodeStringFunction)( | 609 typedef LONG (WINAPI *RtlCompareUnicodeStringFunction)( |
603 IN PCUNICODE_STRING String1, | 610 IN PCUNICODE_STRING String1, |
604 IN PCUNICODE_STRING String2, | 611 IN PCUNICODE_STRING String2, |
605 IN BOOLEAN CaseInSensitive); | 612 IN BOOLEAN CaseInSensitive); |
606 | 613 |
607 typedef VOID (WINAPI *RtlInitUnicodeStringFunction) ( | 614 typedef VOID (WINAPI *RtlInitUnicodeStringFunction) ( |
608 IN OUT PUNICODE_STRING DestinationString, | 615 IN OUT PUNICODE_STRING DestinationString, |
609 IN PCWSTR SourceString); | 616 IN PCWSTR SourceString); |
610 | 617 |
611 #endif // SANDBOX_SRC_NT_INTERNALS_H__ | 618 #endif // SANDBOX_WIN_SRC_NT_INTERNALS_H__ |
| 619 |
OLD | NEW |