1 /**************************************************************************
2  *
3  * Copyright 2009 VMware, Inc.
4  * All Rights Reserved.
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a
7  * copy of this software and associated documentation files (the
8  * "Software"), to deal in the Software without restriction, including
9  * without limitation the rights to use, copy, modify, merge, publish,
10  * distribute, sub license, and/or sell copies of the Software, and to
11  * permit persons to whom the Software is furnished to do so, subject to
12  * the following conditions:
13  *
14  * The above copyright notice and this permission notice (including the
15  * next paragraph) shall be included in all copies or substantial portions
16  * of the Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21  * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
22  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25  *
26  **************************************************************************/
27 
28 /**
29  * @file
30  * SDK/DDK compatability.
31  *
32  * Different headers/defines on different Windows SDKs / DDKs, so define
33  * all used status here to keep the code portable.
34  *
35  * @author <jfonseca@vmware.com>
36  */
37 
38 #ifndef VMW_WDDM_COMPAT_H_
39 #define VMW_WDDM_COMPAT_H_
40 
41 #ifndef __in
42 #define __in /**/
43 #endif
44 
45 #ifndef __out
46 #define __out /**/
47 #endif
48 
49 #ifndef __inout
50 #define __inout /**/
51 #endif
52 
53 #ifndef __in_opt
54 #define __in_opt /**/
55 #endif
56 
57 #ifndef __inout_opt
58 #define __inout_opt /**/
59 #endif
60 
61 #ifndef __ecount
62 #define __ecount(x) /**/
63 #endif
64 
65 #ifndef __in_ecount
66 #define __in_ecount(x) /**/
67 #endif
68 
69 #ifndef __deref_ecount
70 #define __deref_ecount(x) /**/
71 #endif
72 
73 #ifndef __in_bcount
74 #define __in_bcount(x) /**/
75 #endif
76 
77 #ifndef __out_bcount
78 #define __out_bcount(x) /**/
79 #endif
80 
81 #ifndef __out_ecount_opt
82 #define __out_ecount_opt(x) /**/
83 #endif
84 
85 #ifndef __deref_out
86 #define __deref_out /**/
87 #endif
88 
89 #ifndef __in_range
90 #define __in_range(x,y) /**/
91 #endif
92 
93 #ifndef __field_bcount
94 #define __field_bcount(x) /**/
95 #endif
96 
97 #ifndef __out_bcount
98 #define __out_bcount(x) /**/
99 #endif
100 
101 #ifndef __out_bcount_full_opt
102 #define __out_bcount_full_opt(x) /**/
103 #endif
104 
105 #ifndef __out_ecount_part_z_opt
106 #define __out_ecount_part_z_opt(x, y) /**/
107 #endif
108 
109 #ifndef __out_ecount_part_opt
110 #define __out_ecount_part_opt(x, y) /**/
111 #endif
112 
113 #ifndef __field_ecount
114 #define __field_ecount(x) /**/
115 #endif
116 
117 #ifndef __field_ecount_full
118 #define __field_ecount_full(x) /**/
119 #endif
120 
121 #ifndef __checkReturn
122 #define __checkReturn /**/
123 #endif
124 
125 #ifndef __drv_requiresIRQL
126 #define __drv_requiresIRQL(x) /**/
127 #endif
128 
129 #ifndef __drv_minIRQL
130 #define __drv_minIRQL(x) /**/
131 #endif
132 
133 #ifndef __drv_maxIRQL
134 #define __drv_maxIRQL(x) /**/
135 #endif
136 
137 #ifdef __MINGW32__
138 #define __inline static __inline__
139 #endif
140 
141 #ifndef EXTERN_C
142 #define EXTERN_C /**/
143 #endif
144 
145 #ifdef __MINGW32__
146 typedef unsigned char UINT8;
147 #endif
148 
149 
150 #ifndef NTSTATUS
151 #define NTSTATUS LONG
152 #endif
153 
154 typedef LARGE_INTEGER PHYSICAL_ADDRESS;
155 
156 #ifndef NT_SUCCESS
157 #define NT_SUCCESS(_status) ((_status) >= 0)
158 #endif
159 
160 #ifndef STATUS_SUCCESS
161 #define STATUS_SUCCESS                                  ((NTSTATUS)0x00000000L)
162 #endif
163 
164 #ifndef STATUS_UNSUCCESSFUL
165 #define STATUS_UNSUCCESSFUL                             ((NTSTATUS)0xC0000001L)
166 #endif
167 
168 #ifndef STATUS_INVALID_PARAMETER
169 #define STATUS_INVALID_PARAMETER                        ((NTSTATUS)0xC000000DL)
170 #endif
171 
172 #ifndef STATUS_NO_MEMORY
173 #define STATUS_NO_MEMORY                                ((NTSTATUS)0xC0000017L)
174 #endif
175 
176 #ifndef STATUS_ILLEGAL_INSTRUCTION
177 #define STATUS_ILLEGAL_INSTRUCTION                      ((NTSTATUS)0xC000001DL)
178 #endif
179 
180 #ifndef STATUS_BUFFER_TOO_SMALL
181 #define STATUS_BUFFER_TOO_SMALL                         ((NTSTATUS)0xC0000023L)
182 #endif
183 
184 #ifndef STATUS_PRIVILEGED_INSTRUCTION
185 #define STATUS_PRIVILEGED_INSTRUCTION                   ((NTSTATUS)0xC0000096L)
186 #endif
187 
188 #ifndef STATUS_NOT_SUPPORTED
189 #define STATUS_NOT_SUPPORTED                            ((NTSTATUS)0xC00000BBL)
190 #endif
191 
192 #ifndef STATUS_DEVICE_REMOVED
193 #define STATUS_DEVICE_REMOVED                           ((NTSTATUS)0xC00002B6L)
194 #endif
195 
196 #ifndef STATUS_INVALID_USER_BUFFER
197 #define STATUS_INVALID_USER_BUFFER                      ((NTSTATUS)0xC00000E8L)
198 #endif
199 
200 #ifndef STATUS_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER
201 #define STATUS_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER        ((NTSTATUS)0xC01E0000L)
202 #endif
203 
204 #ifndef STATUS_NO_VIDEO_MEMORY
205 #define STATUS_NO_VIDEO_MEMORY                          ((NTSTATUS)0xC01E0100L)
206 #endif
207 
208 #ifndef STATUS_GRAPHICS_ALLOCATION_BUSY
209 #define STATUS_GRAPHICS_ALLOCATION_BUSY                 ((NTSTATUS)0xC01E0102L)
210 #endif
211 
212 #ifndef STATUS_GRAPHICS_TOO_MANY_REFERENCES
213 #define STATUS_GRAPHICS_TOO_MANY_REFERENCES             ((NTSTATUS)0xC01E0103L)
214 #endif
215 
216 #ifndef STATUS_GRAPHICS_ALLOCATION_INVALID
217 #define STATUS_GRAPHICS_ALLOCATION_INVALID              ((NTSTATUS)0xC01E0106L)
218 #endif
219 
220 #ifndef STATUS_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION
221 #define STATUS_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION    ((NTSTATUS)0xC01E0109L)
222 #endif
223 
224 #ifndef STATUS_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION
225 #define STATUS_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION   ((NTSTATUS)0xC01E0111L)
226 #endif
227 
228 #ifndef STATUS_GRAPHICS_GPU_EXCEPTION_ON_DEVICE
229 #define STATUS_GRAPHICS_GPU_EXCEPTION_ON_DEVICE         ((NTSTATUS)0xC01E0200L)
230 #endif
231 
232 #ifndef STATUS_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET
233 #define STATUS_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET       ((NTSTATUS)0xC01E0333L)
234 #endif
235 
236 #endif /* VMW_WDDM_COMPAT_H_ */
237