OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_WIN_SRC_NT_INTERNALS_H__ | 7 #ifndef SANDBOX_WIN_SRC_NT_INTERNALS_H__ |
8 #define SANDBOX_WIN_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) |
19 #define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004L) | 19 #define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004L) |
20 #ifndef STATUS_INVALID_PARAMETER | 20 #ifndef STATUS_INVALID_PARAMETER |
21 // It is now defined in Windows 2008 SDK. | 21 // It is now defined in Windows 2008 SDK. |
22 #define STATUS_INVALID_PARAMETER ((NTSTATUS)0xC000000DL) | 22 #define STATUS_INVALID_PARAMETER ((NTSTATUS)0xC000000DL) |
23 #endif | 23 #endif |
24 #define STATUS_CONFLICTING_ADDRESSES ((NTSTATUS)0xC0000018L) | 24 #define STATUS_CONFLICTING_ADDRESSES ((NTSTATUS)0xC0000018L) |
25 #define STATUS_ACCESS_DENIED ((NTSTATUS)0xC0000022L) | 25 #define STATUS_ACCESS_DENIED ((NTSTATUS)0xC0000022L) |
26 #define STATUS_BUFFER_TOO_SMALL ((NTSTATUS)0xC0000023L) | 26 #define STATUS_BUFFER_TOO_SMALL ((NTSTATUS)0xC0000023L) |
27 #define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034L) | 27 #define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034L) |
28 #define STATUS_OBJECT_NAME_COLLISION ((NTSTATUS)0xC0000035L) | |
28 #define STATUS_PROCEDURE_NOT_FOUND ((NTSTATUS)0xC000007AL) | 29 #define STATUS_PROCEDURE_NOT_FOUND ((NTSTATUS)0xC000007AL) |
29 #define STATUS_INVALID_IMAGE_FORMAT ((NTSTATUS)0xC000007BL) | 30 #define STATUS_INVALID_IMAGE_FORMAT ((NTSTATUS)0xC000007BL) |
30 #define STATUS_NO_TOKEN ((NTSTATUS)0xC000007CL) | 31 #define STATUS_NO_TOKEN ((NTSTATUS)0xC000007CL) |
31 | 32 |
32 #define CURRENT_PROCESS ((HANDLE) -1) | 33 #define CURRENT_PROCESS ((HANDLE) -1) |
33 #define CURRENT_THREAD ((HANDLE) -2) | 34 #define CURRENT_THREAD ((HANDLE) -2) |
34 #define NtCurrentProcess CURRENT_PROCESS | 35 #define NtCurrentProcess CURRENT_PROCESS |
35 | 36 |
36 typedef struct _UNICODE_STRING { | 37 typedef struct _UNICODE_STRING { |
37 USHORT Length; | 38 USHORT Length; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
118 #define FILE_DELETE_ON_CLOSE 0x00001000 | 119 #define FILE_DELETE_ON_CLOSE 0x00001000 |
119 #define FILE_OPEN_BY_FILE_ID 0x00002000 | 120 #define FILE_OPEN_BY_FILE_ID 0x00002000 |
120 #define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000 | 121 #define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000 |
121 #define FILE_NO_COMPRESSION 0x00008000 | 122 #define FILE_NO_COMPRESSION 0x00008000 |
122 | 123 |
123 #define FILE_RESERVE_OPFILTER 0x00100000 | 124 #define FILE_RESERVE_OPFILTER 0x00100000 |
124 #define FILE_OPEN_REPARSE_POINT 0x00200000 | 125 #define FILE_OPEN_REPARSE_POINT 0x00200000 |
125 #define FILE_OPEN_NO_RECALL 0x00400000 | 126 #define FILE_OPEN_NO_RECALL 0x00400000 |
126 #define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000 | 127 #define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000 |
127 | 128 |
129 // Create/open result values. | |
rvargas (doing something else)
2014/01/15 23:00:39
Add to the comment that these are the disposition
Cait (Slow)
2014/01/17 23:05:41
Done.
| |
130 #define FILE_SUPERSEDED 0x00000000 | |
131 #define FILE_OPENED 0x00000001 | |
132 #define FILE_CREATED 0x00000002 | |
133 #define FILE_OVERWRITTEN 0x00000003 | |
134 #define FILE_EXISTS 0x00000004 | |
135 #define FILE_DOES_NOT_EXIST 0x00000005 | |
136 | |
128 typedef NTSTATUS (WINAPI *NtCreateFileFunction)( | 137 typedef NTSTATUS (WINAPI *NtCreateFileFunction)( |
129 OUT PHANDLE FileHandle, | 138 OUT PHANDLE FileHandle, |
130 IN ACCESS_MASK DesiredAccess, | 139 IN ACCESS_MASK DesiredAccess, |
131 IN POBJECT_ATTRIBUTES ObjectAttributes, | 140 IN POBJECT_ATTRIBUTES ObjectAttributes, |
132 OUT PIO_STATUS_BLOCK IoStatusBlock, | 141 OUT PIO_STATUS_BLOCK IoStatusBlock, |
133 IN PLARGE_INTEGER AllocationSize OPTIONAL, | 142 IN PLARGE_INTEGER AllocationSize OPTIONAL, |
134 IN ULONG FileAttributes, | 143 IN ULONG FileAttributes, |
135 IN ULONG ShareAccess, | 144 IN ULONG ShareAccess, |
136 IN ULONG CreateDisposition, | 145 IN ULONG CreateDisposition, |
137 IN ULONG CreateOptions, | 146 IN ULONG CreateOptions, |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
641 POBJECT_ATTRIBUTES ObjectAttributes); | 650 POBJECT_ATTRIBUTES ObjectAttributes); |
642 | 651 |
643 #define DIRECTORY_QUERY 0x0001 | 652 #define DIRECTORY_QUERY 0x0001 |
644 #define DIRECTORY_TRAVERSE 0x0002 | 653 #define DIRECTORY_TRAVERSE 0x0002 |
645 #define DIRECTORY_CREATE_OBJECT 0x0004 | 654 #define DIRECTORY_CREATE_OBJECT 0x0004 |
646 #define DIRECTORY_CREATE_SUBDIRECTORY 0x0008 | 655 #define DIRECTORY_CREATE_SUBDIRECTORY 0x0008 |
647 #define DIRECTORY_ALL_ACCESS 0x000F | 656 #define DIRECTORY_ALL_ACCESS 0x000F |
648 | 657 |
649 #endif // SANDBOX_WIN_SRC_NT_INTERNALS_H__ | 658 #endif // SANDBOX_WIN_SRC_NT_INTERNALS_H__ |
650 | 659 |
OLD | NEW |