Don't issue error message if message number in application range.
[wine] / include / ntdef.h
1 /*
2  * Copyright (C) 1999 Juergen Schmied
3  *
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.
8  *
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.
13  *
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
17  */
18
19 #ifndef __WINE_NTDEF_H
20 #define __WINE_NTDEF_H
21
22 #include "basetsd.h"
23 #include "windef.h"
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 #define NTAPI   __stdcall
30
31 #ifndef IN
32 #define IN
33 #endif
34
35 #ifndef OUT
36 #define OUT
37 #endif
38
39 #ifndef OPTIONAL
40 #define OPTIONAL
41 #endif
42
43 #ifndef VOID
44 #define VOID void
45 #endif
46
47 typedef LONG NTSTATUS;
48 typedef NTSTATUS *PNTSTATUS;
49
50 typedef short CSHORT;
51 typedef CSHORT *PCSHORT;
52
53
54 /* NT lowlevel Strings (handled by Rtl* functions in NTDLL)
55  * If they are zero terminated, Length does not include the terminating 0.
56  */
57
58 typedef struct _STRING {
59         USHORT  Length;
60         USHORT  MaximumLength;
61         PSTR    Buffer;
62 } STRING,*PSTRING,ANSI_STRING,*PANSI_STRING;
63
64 typedef struct _CSTRING {
65         USHORT  Length;
66         USHORT  MaximumLength;
67         PCSTR   Buffer;
68 } CSTRING,*PCSTRING;
69
70 typedef struct _UNICODE_STRING {
71         USHORT  Length;         /* bytes */
72         USHORT  MaximumLength;  /* bytes */
73         PWSTR   Buffer;
74 } UNICODE_STRING,*PUNICODE_STRING;
75
76 /*
77         Objects
78 */
79
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
88
89 typedef struct _OBJECT_ATTRIBUTES
90 {   ULONG Length;
91     HANDLE RootDirectory;
92     PUNICODE_STRING ObjectName;
93     ULONG Attributes;
94     PVOID SecurityDescriptor;        /* type SECURITY_DESCRIPTOR */
95     PVOID SecurityQualityOfService;  /* type SECURITY_QUALITY_OF_SERVICE */
96 } OBJECT_ATTRIBUTES;
97
98 typedef OBJECT_ATTRIBUTES *POBJECT_ATTRIBUTES;
99
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; \
107 }
108
109
110 #ifdef __cplusplus
111 }
112 #endif
113
114 #endif