2 * Copyright (C) 1999 Juergen Schmied
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_NTDEF_H
20 #define __WINE_NTDEF_H
29 #define NTAPI __stdcall
47 typedef LONG NTSTATUS;
48 typedef NTSTATUS *PNTSTATUS;
51 typedef CSHORT *PCSHORT;
54 /* NT lowlevel Strings (handled by Rtl* functions in NTDLL)
55 * If they are zero terminated, Length does not include the terminating 0.
58 typedef struct _STRING {
62 } STRING,*PSTRING,ANSI_STRING,*PANSI_STRING;
64 typedef struct _CSTRING {
70 typedef struct _UNICODE_STRING {
71 USHORT Length; /* bytes */
72 USHORT MaximumLength; /* bytes */
74 } UNICODE_STRING,*PUNICODE_STRING;
80 #define OBJ_INHERIT 0x00000002L
81 #define OBJ_PERMANENT 0x00000010L
82 #define OBJ_EXCLUSIVE 0x00000020L
83 #define OBJ_CASE_INSENSITIVE 0x00000040L
84 #define OBJ_OPENIF 0x00000080L
85 #define OBJ_OPENLINK 0x00000100L
86 #define OBJ_KERNEL_HANDLE 0x00000200L
87 #define OBJ_VALID_ATTRIBUTES 0x000003F2L
89 typedef struct _OBJECT_ATTRIBUTES
92 PUNICODE_STRING ObjectName;
94 PVOID SecurityDescriptor; /* type SECURITY_DESCRIPTOR */
95 PVOID SecurityQualityOfService; /* type SECURITY_QUALITY_OF_SERVICE */
98 typedef OBJECT_ATTRIBUTES *POBJECT_ATTRIBUTES;
100 #define InitializeObjectAttributes(p,n,a,r,s) \
101 { (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
102 (p)->RootDirectory = r; \
103 (p)->Attributes = a; \
104 (p)->ObjectName = n; \
105 (p)->SecurityDescriptor = s; \
106 (p)->SecurityQualityOfService = NULL; \