Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: sandbox/win/src/nt_internals.h

Issue 138593004: Use an alternate mechanism for CreateFile calls in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CreateFile and tests only, gyp changes in separate CL Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome_elf/create_file/chrome_create_file_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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. These are the disposition values returned on the
130 // io status information.
131 #define FILE_SUPERSEDED 0x00000000
132 #define FILE_OPENED 0x00000001
133 #define FILE_CREATED 0x00000002
134 #define FILE_OVERWRITTEN 0x00000003
135 #define FILE_EXISTS 0x00000004
136 #define FILE_DOES_NOT_EXIST 0x00000005
137
128 typedef NTSTATUS (WINAPI *NtCreateFileFunction)( 138 typedef NTSTATUS (WINAPI *NtCreateFileFunction)(
129 OUT PHANDLE FileHandle, 139 OUT PHANDLE FileHandle,
130 IN ACCESS_MASK DesiredAccess, 140 IN ACCESS_MASK DesiredAccess,
131 IN POBJECT_ATTRIBUTES ObjectAttributes, 141 IN POBJECT_ATTRIBUTES ObjectAttributes,
132 OUT PIO_STATUS_BLOCK IoStatusBlock, 142 OUT PIO_STATUS_BLOCK IoStatusBlock,
133 IN PLARGE_INTEGER AllocationSize OPTIONAL, 143 IN PLARGE_INTEGER AllocationSize OPTIONAL,
134 IN ULONG FileAttributes, 144 IN ULONG FileAttributes,
135 IN ULONG ShareAccess, 145 IN ULONG ShareAccess,
136 IN ULONG CreateDisposition, 146 IN ULONG CreateDisposition,
137 IN ULONG CreateOptions, 147 IN ULONG CreateOptions,
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 POBJECT_ATTRIBUTES ObjectAttributes); 651 POBJECT_ATTRIBUTES ObjectAttributes);
642 652
643 #define DIRECTORY_QUERY 0x0001 653 #define DIRECTORY_QUERY 0x0001
644 #define DIRECTORY_TRAVERSE 0x0002 654 #define DIRECTORY_TRAVERSE 0x0002
645 #define DIRECTORY_CREATE_OBJECT 0x0004 655 #define DIRECTORY_CREATE_OBJECT 0x0004
646 #define DIRECTORY_CREATE_SUBDIRECTORY 0x0008 656 #define DIRECTORY_CREATE_SUBDIRECTORY 0x0008
647 #define DIRECTORY_ALL_ACCESS 0x000F 657 #define DIRECTORY_ALL_ACCESS 0x000F
648 658
649 #endif // SANDBOX_WIN_SRC_NT_INTERNALS_H__ 659 #endif // SANDBOX_WIN_SRC_NT_INTERNALS_H__
650 660
OLDNEW
« no previous file with comments | « chrome_elf/create_file/chrome_create_file_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698