3 * Copyright 2012, 2013 MinGW.org project
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
26 #pragma GCC system_header
29 #define NTAPI __stdcall
30 #define OBJ_INHERIT 2L
31 #define OBJ_PERMANENT 16L
32 #define OBJ_EXCLUSIVE 32L
33 #define OBJ_CASE_INSENSITIVE 64L
34 #define OBJ_OPENIF 128L
35 #define OBJ_OPENLINK 256L
36 #define OBJ_VALID_ATTRIBUTES 498L
37 #define InitializeObjectAttributes(p,n,a,r,s) { \
38 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
39 (p)->RootDirectory = (r); \
40 (p)->Attributes = (a); \
41 (p)->ObjectName = (n); \
42 (p)->SecurityDescriptor = (s); \
43 (p)->SecurityQualityOfService = NULL; \
47 #define NT_SUCCESS(x) ((x)>=0)
48 #define STATUS_SUCCESS ((NTSTATUS)0)
51 #if !defined(_NTSECAPI_H) && !defined(_SUBAUTH_H)
52 typedef LONG NTSTATUS, *PNTSTATUS;
53 typedef struct _UNICODE_STRING {
57 } UNICODE_STRING, *PUNICODE_STRING;
58 typedef const UNICODE_STRING* PCUNICODE_STRING;
59 typedef struct _STRING {
66 typedef STRING ANSI_STRING;
67 typedef PSTRING PANSI_STRING;
68 typedef STRING OEM_STRING;
69 typedef PSTRING POEM_STRING;
70 typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
71 typedef enum _SECTION_INHERIT {
76 #if !defined(_NTSECAPI_H)
77 typedef struct _OBJECT_ATTRIBUTES {
80 PUNICODE_STRING ObjectName;
82 PVOID SecurityDescriptor;
83 PVOID SecurityQualityOfService;
84 } OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;