FreeRDP
spec.h
1 
20 #ifndef WINPR_SPEC_H
21 #define WINPR_SPEC_H
22 
23 #include <winpr/platform.h>
24 
25 WINPR_PRAGMA_DIAG_PUSH
26 WINPR_PRAGMA_DIAG_IGNORED_RESERVED_ID_MACRO
27 WINPR_PRAGMA_DIAG_IGNORED_RESERVED_IDENTIFIER
28 
29 #ifdef _WIN32
30 
31 #include <specstrings.h>
32 #ifndef _COM_Outptr_
33 #define _COM_Outptr_
34 #endif
35 
36 #else
37 
38 #define DUMMYUNIONNAME u
39 #define DUMMYUNIONNAME1 u1
40 #define DUMMYUNIONNAME2 u2
41 #define DUMMYUNIONNAME3 u3
42 #define DUMMYUNIONNAME4 u4
43 #define DUMMYUNIONNAME5 u5
44 #define DUMMYUNIONNAME6 u6
45 #define DUMMYUNIONNAME7 u7
46 #define DUMMYUNIONNAME8 u8
47 
48 #define DUMMYSTRUCTNAME s
49 #define DUMMYSTRUCTNAME1 s1
50 #define DUMMYSTRUCTNAME2 s2
51 #define DUMMYSTRUCTNAME3 s3
52 #define DUMMYSTRUCTNAME4 s4
53 #define DUMMYSTRUCTNAME5 s5
54 
55 #if (defined(_M_AMD64) || defined(_M_ARM)) && !defined(_WIN32)
56 #define _UNALIGNED __unaligned
57 #else
58 #define _UNALIGNED
59 #endif
60 
61 #ifndef DECLSPEC_ALIGN
62 #if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(MIDL_PASS)
63 #define DECLSPEC_ALIGN(x) __declspec(align(x))
64 #elif defined(__GNUC__)
65 #define DECLSPEC_ALIGN(x) __attribute__((__aligned__(x)))
66 #else
67 #define DECLSPEC_ALIGN(x)
68 #endif
69 #endif /* DECLSPEC_ALIGN */
70 
71 #ifdef _M_AMD64
72 #define MEMORY_ALLOCATION_ALIGNMENT 16
73 #else
74 #define MEMORY_ALLOCATION_ALIGNMENT 8
75 #endif
76 
77 #ifdef __GNUC__
78 #ifndef __declspec
79 #define __declspec(e) __attribute__((e))
80 #endif
81 #endif
82 
83 #ifndef DECLSPEC_NORETURN
84 #if (defined(__GNUC__) || defined(_MSC_VER) || defined(__clang__))
85 #define DECLSPEC_NORETURN __declspec(noreturn)
86 #else
87 #define DECLSPEC_NORETURN
88 #endif
89 #endif /* DECLSPEC_NORETURN */
90 
96 #define __field_bcount(size) __notnull __byte_writableTo(size)
97 #define __field_ecount(size) __notnull __elem_writableTo(size)
98 #define __post_invalid _Post_ __notvalid
99 
100 #define __deref_in
101 #define __deref_in_ecount(size)
102 #define __deref_in_bcount(size)
103 #define __deref_in_opt
104 #define __deref_in_ecount_opt(size)
105 #define __deref_in_bcount_opt(size)
106 #define __deref_opt_in
107 #define __deref_opt_in_ecount(size)
108 #define __deref_opt_in_bcount(size)
109 #define __deref_opt_in_opt
110 #define __deref_opt_in_ecount_opt(size)
111 #define __deref_opt_in_bcount_opt(size)
112 #define __out_awcount(expr, size)
113 #define __in_awcount(expr, size)
114 #define __nullnullterminated
115 #define __in_data_source(src_sym)
116 #define __kernel_entry
117 #define __out_data_source(src_sym)
118 #define __analysis_noreturn
119 #define _Check_return_opt_
120 #define _Check_return_wat_
121 
122 #define __inner_exceptthat
123 #define __inner_typefix(ctype)
124 #define _Always_(annos)
125 #define _Analysis_noreturn_
126 #define _Analysis_assume_(expr)
127 #define _At_(target, annos)
128 #define _At_buffer_(target, iter, bound, annos)
129 #define _Check_return_
130 #define _COM_Outptr_
131 #define _COM_Outptr_opt_
132 #define _COM_Outptr_opt_result_maybenull_
133 #define _COM_Outptr_result_maybenull_
134 #define _Const_
135 #define _Deref_in_bound_
136 #define _Deref_in_range_(lb, ub)
137 #define _Deref_inout_bound_
138 #define _Deref_inout_z_
139 #define _Deref_inout_z_bytecap_c_(size)
140 #define _Deref_inout_z_cap_c_(size)
141 #define _Deref_opt_out_
142 #define _Deref_opt_out_opt_
143 #define _Deref_opt_out_opt_z_
144 #define _Deref_opt_out_z_
145 #define _Deref_out_
146 #define _Deref_out_bound_
147 #define _Deref_out_opt_
148 #define _Deref_out_opt_z_
149 #define _Deref_out_range_(lb, ub)
150 #define _Deref_out_z_
151 #define _Deref_out_z_bytecap_c_(size)
152 #define _Deref_out_z_cap_c_(size)
153 #define _Deref_post_bytecap_(size)
154 #define _Deref_post_bytecap_c_(size)
155 #define _Deref_post_bytecap_x_(size)
156 #define _Deref_post_bytecount_(size)
157 #define _Deref_post_bytecount_c_(size)
158 #define _Deref_post_bytecount_x_(size)
159 #define _Deref_post_cap_(size)
160 #define _Deref_post_cap_c_(size)
161 #define _Deref_post_cap_x_(size)
162 #define _Deref_post_count_(size)
163 #define _Deref_post_count_c_(size)
164 #define _Deref_post_count_x_(size)
165 #define _Deref_post_maybenull_
166 #define _Deref_post_notnull_
167 #define _Deref_post_null_
168 #define _Deref_post_opt_bytecap_(size)
169 #define _Deref_post_opt_bytecap_c_(size)
170 #define _Deref_post_opt_bytecap_x_(size)
171 #define _Deref_post_opt_bytecount_(size)
172 #define _Deref_post_opt_bytecount_c_(size)
173 #define _Deref_post_opt_bytecount_x_(size)
174 #define _Deref_post_opt_cap_(size)
175 #define _Deref_post_opt_cap_c_(size)
176 #define _Deref_post_opt_cap_x_(size)
177 #define _Deref_post_opt_count_(size)
178 #define _Deref_post_opt_count_c_(size)
179 #define _Deref_post_opt_count_x_(size)
180 #define _Deref_post_opt_valid_
181 #define _Deref_post_opt_valid_bytecap_(size)
182 #define _Deref_post_opt_valid_bytecap_c_(size)
183 #define _Deref_post_opt_valid_bytecap_x_(size)
184 #define _Deref_post_opt_valid_cap_(size)
185 #define _Deref_post_opt_valid_cap_c_(size)
186 #define _Deref_post_opt_valid_cap_x_(size)
187 #define _Deref_post_opt_z_
188 #define _Deref_post_opt_z_bytecap_(size)
189 #define _Deref_post_opt_z_bytecap_c_(size)
190 #define _Deref_post_opt_z_bytecap_x_(size)
191 #define _Deref_post_opt_z_cap_(size)
192 #define _Deref_post_opt_z_cap_c_(size)
193 #define _Deref_post_opt_z_cap_x_(size)
194 #define _Deref_post_valid_
195 #define _Deref_post_valid_bytecap_(size)
196 #define _Deref_post_valid_bytecap_c_(size)
197 #define _Deref_post_valid_bytecap_x_(size)
198 #define _Deref_post_valid_cap_(size)
199 #define _Deref_post_valid_cap_c_(size)
200 #define _Deref_post_valid_cap_x_(size)
201 #define _Deref_post_z_
202 #define _Deref_post_z_bytecap_(size)
203 #define _Deref_post_z_bytecap_c_(size)
204 #define _Deref_post_z_bytecap_x_(size)
205 #define _Deref_post_z_cap_(size)
206 #define _Deref_post_z_cap_c_(size)
207 #define _Deref_post_z_cap_x_(size)
208 #define _Deref_pre_bytecap_(size)
209 #define _Deref_pre_bytecap_c_(size)
210 #define _Deref_pre_bytecap_x_(size)
211 #define _Deref_pre_bytecount_(size)
212 #define _Deref_pre_bytecount_c_(size)
213 #define _Deref_pre_bytecount_x_(size)
214 #define _Deref_pre_cap_(size)
215 #define _Deref_pre_cap_c_(size)
216 #define _Deref_pre_cap_x_(size)
217 #define _Deref_pre_count_(size)
218 #define _Deref_pre_count_c_(size)
219 #define _Deref_pre_count_x_(size)
220 #define _Deref_pre_invalid_
221 #define _Deref_pre_maybenull_
222 #define _Deref_pre_notnull_
223 #define _Deref_pre_null_
224 #define _Deref_pre_opt_bytecap_(size)
225 #define _Deref_pre_opt_bytecap_c_(size)
226 #define _Deref_pre_opt_bytecap_x_(size)
227 #define _Deref_pre_opt_bytecount_(size)
228 #define _Deref_pre_opt_bytecount_c_(size)
229 #define _Deref_pre_opt_bytecount_x_(size)
230 #define _Deref_pre_opt_cap_(size)
231 #define _Deref_pre_opt_cap_c_(size)
232 #define _Deref_pre_opt_cap_x_(size)
233 #define _Deref_pre_opt_count_(size)
234 #define _Deref_pre_opt_count_c_(size)
235 #define _Deref_pre_opt_count_x_(size)
236 #define _Deref_pre_opt_valid_
237 #define _Deref_pre_opt_valid_bytecap_(size)
238 #define _Deref_pre_opt_valid_bytecap_c_(size)
239 #define _Deref_pre_opt_valid_bytecap_x_(size)
240 #define _Deref_pre_opt_valid_cap_(size)
241 #define _Deref_pre_opt_valid_cap_c_(size)
242 #define _Deref_pre_opt_valid_cap_x_(size)
243 #define _Deref_pre_opt_z_
244 #define _Deref_pre_opt_z_bytecap_(size)
245 #define _Deref_pre_opt_z_bytecap_c_(size)
246 #define _Deref_pre_opt_z_bytecap_x_(size)
247 #define _Deref_pre_opt_z_cap_(size)
248 #define _Deref_pre_opt_z_cap_c_(size)
249 #define _Deref_pre_opt_z_cap_x_(size)
250 #define _Deref_pre_readonly_
251 #define _Deref_pre_valid_
252 #define _Deref_pre_valid_bytecap_(size)
253 #define _Deref_pre_valid_bytecap_c_(size)
254 #define _Deref_pre_valid_bytecap_x_(size)
255 #define _Deref_pre_valid_cap_(size)
256 #define _Deref_pre_valid_cap_c_(size)
257 #define _Deref_pre_valid_cap_x_(size)
258 #define _Deref_pre_writeonly_
259 #define _Deref_pre_z_
260 #define _Deref_pre_z_bytecap_(size)
261 #define _Deref_pre_z_bytecap_c_(size)
262 #define _Deref_pre_z_bytecap_x_(size)
263 #define _Deref_pre_z_cap_(size)
264 #define _Deref_pre_z_cap_c_(size)
265 #define _Deref_pre_z_cap_x_(size)
266 #define _Deref_prepost_bytecap_(size)
267 #define _Deref_prepost_bytecap_x_(size)
268 #define _Deref_prepost_bytecount_(size)
269 #define _Deref_prepost_bytecount_x_(size)
270 #define _Deref_prepost_cap_(size)
271 #define _Deref_prepost_cap_x_(size)
272 #define _Deref_prepost_count_(size)
273 #define _Deref_prepost_count_x_(size)
274 #define _Deref_prepost_opt_bytecap_(size)
275 #define _Deref_prepost_opt_bytecap_x_(size)
276 #define _Deref_prepost_opt_bytecount_(size)
277 #define _Deref_prepost_opt_bytecount_x_(size)
278 #define _Deref_prepost_opt_cap_(size)
279 #define _Deref_prepost_opt_cap_x_(size)
280 #define _Deref_prepost_opt_count_(size)
281 #define _Deref_prepost_opt_count_x_(size)
282 #define _Deref_prepost_opt_valid_
283 #define _Deref_prepost_opt_valid_bytecap_(size)
284 #define _Deref_prepost_opt_valid_bytecap_x_(size)
285 #define _Deref_prepost_opt_valid_cap_(size)
286 #define _Deref_prepost_opt_valid_cap_x_(size)
287 #define _Deref_prepost_opt_z_
288 #define _Deref_prepost_opt_z_bytecap_(size)
289 #define _Deref_prepost_opt_z_cap_(size)
290 #define _Deref_prepost_valid_
291 #define _Deref_prepost_valid_bytecap_(size)
292 #define _Deref_prepost_valid_bytecap_x_(size)
293 #define _Deref_prepost_valid_cap_(size)
294 #define _Deref_prepost_valid_cap_x_(size)
295 #define _Deref_prepost_z_
296 #define _Deref_prepost_z_bytecap_(size)
297 #define _Deref_prepost_z_cap_(size)
298 #define _Deref_ret_bound_
299 #define _Deref_ret_opt_z_
300 #define _Deref_ret_range_(lb, ub)
301 #define _Deref_ret_z_
302 #define _Deref2_pre_readonly_
303 #define _Field_range_(min, max)
304 #define _Field_size_(size)
305 #define _Field_size_bytes_(size)
306 #define _Field_size_bytes_full_(size)
307 #define _Field_size_bytes_full_opt_(size)
308 #define _Field_size_bytes_opt_(size)
309 #define _Field_size_bytes_part_(size, count)
310 #define _Field_size_bytes_part_opt_(size, count)
311 #define _Field_size_full_(size)
312 #define _Field_size_full_opt_(size)
313 #define _Field_size_opt_(size)
314 #define _Field_size_part_(size, count)
315 #define _Field_size_part_opt_(size, count)
316 #define _Field_z_
317 #define _Function_class_(x)
318 #define _Group_(annos)
319 #define _In_
320 #define _In_bound_
321 #define _In_bytecount_(size)
322 #define _In_bytecount_c_(size)
323 #define _In_bytecount_x_(size)
324 #define _In_count_(size)
325 #define _In_count_c_(size)
326 #define _In_count_x_(size)
327 #define _In_defensive_(annotes)
328 #define _In_opt_
329 #define _In_opt_bytecount_(size)
330 #define _In_opt_bytecount_c_(size)
331 #define _In_opt_bytecount_x_(size)
332 #define _In_opt_count_(size)
333 #define _In_opt_count_c_(size)
334 #define _In_opt_count_x_(size)
335 #define _In_opt_ptrdiff_count_(size)
336 #define _In_opt_z_
337 #define _In_opt_z_bytecount_(size)
338 #define _In_opt_z_bytecount_c_(size)
339 #define _In_opt_z_count_(size)
340 #define _In_opt_z_count_c_(size)
341 #define _In_ptrdiff_count_(size)
342 #define _In_range_(lb, ub)
343 #define _In_reads_(size)
344 #define _In_reads_bytes_(size)
345 #define _In_reads_bytes_opt_(size)
346 #define _In_reads_opt_(size)
347 #define _In_reads_opt_z_(size)
348 #define _In_reads_or_z_(size)
349 #define _In_reads_to_ptr_(ptr)
350 #define _In_reads_to_ptr_opt_(ptr)
351 #define _In_reads_to_ptr_opt_z_(ptr)
352 #define _In_reads_to_ptr_z_(ptr)
353 #define _In_reads_z_(size)
354 #define _In_z_
355 #define _In_z_bytecount_(size)
356 #define _In_z_bytecount_c_(size)
357 #define _In_z_count_(size)
358 #define _In_z_count_c_(size)
359 #define _Inout_
360 #define _Inout_bytecap_(size)
361 #define _Inout_bytecap_c_(size)
362 #define _Inout_bytecap_x_(size)
363 #define _Inout_bytecount_(size)
364 #define _Inout_bytecount_c_(size)
365 #define _Inout_bytecount_x_(size)
366 #define _Inout_cap_(size)
367 #define _Inout_cap_c_(size)
368 #define _Inout_cap_x_(size)
369 #define _Inout_count_(size)
370 #define _Inout_count_c_(size)
371 #define _Inout_count_x_(size)
372 #define _Inout_defensive_(annotes)
373 #define _Inout_opt_
374 #define _Inout_opt_bytecap_(size)
375 #define _Inout_opt_bytecap_c_(size)
376 #define _Inout_opt_bytecap_x_(size)
377 #define _Inout_opt_bytecount_(size)
378 #define _Inout_opt_bytecount_c_(size)
379 #define _Inout_opt_bytecount_x_(size)
380 #define _Inout_opt_cap_(size)
381 #define _Inout_opt_cap_c_(size)
382 #define _Inout_opt_cap_x_(size)
383 #define _Inout_opt_count_(size)
384 #define _Inout_opt_count_c_(size)
385 #define _Inout_opt_count_x_(size)
386 #define _Inout_opt_ptrdiff_count_(size)
387 #define _Inout_opt_z_
388 #define _Inout_opt_z_bytecap_(size)
389 #define _Inout_opt_z_bytecap_c_(size)
390 #define _Inout_opt_z_bytecap_x_(size)
391 #define _Inout_opt_z_bytecount_(size)
392 #define _Inout_opt_z_bytecount_c_(size)
393 #define _Inout_opt_z_cap_(size)
394 #define _Inout_opt_z_cap_c_(size)
395 #define _Inout_opt_z_cap_x_(size)
396 #define _Inout_opt_z_count_(size)
397 #define _Inout_opt_z_count_c_(size)
398 #define _Inout_ptrdiff_count_(size)
399 #define _Inout_updates_(size)
400 #define _Inout_updates_all_(size)
401 #define _Inout_updates_all_opt_(size)
402 #define _Inout_updates_bytes_(size)
403 #define _Inout_updates_bytes_all_(size)
404 #define _Inout_updates_bytes_all_opt_(size)
405 #define _Inout_updates_bytes_opt_(size)
406 #define _Inout_updates_bytes_to_(size, count)
407 #define _Inout_updates_bytes_to_opt_(size, count)
408 #define _Inout_updates_opt_(size)
409 #define _Inout_updates_opt_z_(size)
410 #define _Inout_updates_to_(size, count)
411 #define _Inout_updates_to_opt_(size, count)
412 #define _Inout_updates_z_(size)
413 #define _Inout_z_
414 #define _Inout_z_bytecap_(size)
415 #define _Inout_z_bytecap_c_(size)
416 #define _Inout_z_bytecap_x_(size)
417 #define _Inout_z_bytecount_(size)
418 #define _Inout_z_bytecount_c_(size)
419 #define _Inout_z_cap_(size)
420 #define _Inout_z_cap_c_(size)
421 #define _Inout_z_cap_x_(size)
422 #define _Inout_z_count_(size)
423 #define _Inout_z_count_c_(size)
424 #define _Interlocked_operand_
425 #define _Literal_
426 #define _Maybenull_
427 #define _Maybevalid_
428 #define _Maybe_raises_SEH_exception
429 #define _Must_inspect_result_
430 #define _Notliteral_
431 #define _Notnull_
432 #define _Notref_
433 #define _Notvalid_
434 #define _Null_
435 #define _Null_terminated_
436 #define _NullNull_terminated_
437 #define _On_failure_(annos)
438 #define _Out_
439 #define _Out_bound_
440 #define _Out_bytecap_(size)
441 #define _Out_bytecap_c_(size)
442 #define _Out_bytecap_post_bytecount_(cap, count)
443 #define _Out_bytecap_x_(size)
444 #define _Out_bytecapcount_(capcount)
445 #define _Out_bytecapcount_x_(capcount)
446 #define _Out_cap_(size)
447 #define _Out_cap_c_(size)
448 #define _Out_cap_m_(mult, size)
449 #define _Out_cap_post_count_(cap, count)
450 #define _Out_cap_x_(size)
451 #define _Out_capcount_(capcount)
452 #define _Out_capcount_x_(capcount)
453 #define _Out_defensive_(annotes)
454 #define _Out_opt_
455 #define _Out_opt_bytecap_(size)
456 #define _Out_opt_bytecap_c_(size)
457 #define _Out_opt_bytecap_post_bytecount_(cap, count)
458 #define _Out_opt_bytecap_x_(size)
459 #define _Out_opt_bytecapcount_(capcount)
460 #define _Out_opt_bytecapcount_x_(capcount)
461 #define _Out_opt_cap_(size)
462 #define _Out_opt_cap_c_(size)
463 #define _Out_opt_cap_m_(mult, size)
464 #define _Out_opt_cap_post_count_(cap, count)
465 #define _Out_opt_cap_x_(size)
466 #define _Out_opt_capcount_(capcount)
467 #define _Out_opt_capcount_x_(capcount)
468 #define _Out_opt_ptrdiff_cap_(size)
469 #define _Out_opt_z_bytecap_(size)
470 #define _Out_opt_z_bytecap_c_(size)
471 #define _Out_opt_z_bytecap_post_bytecount_(cap, count)
472 #define _Out_opt_z_bytecap_x_(size)
473 #define _Out_opt_z_bytecapcount_(capcount)
474 #define _Out_opt_z_cap_(size)
475 #define _Out_opt_z_cap_c_(size)
476 #define _Out_opt_z_cap_m_(mult, size)
477 #define _Out_opt_z_cap_post_count_(cap, count)
478 #define _Out_opt_z_cap_x_(size)
479 #define _Out_opt_z_capcount_(capcount)
480 #define _Out_ptrdiff_cap_(size)
481 #define _Out_range_(lb, ub)
482 #define _Out_writes_(size)
483 #define _Out_writes_all_(size)
484 #define _Out_writes_all_opt_(size)
485 #define _Out_writes_bytes_(size)
486 #define _Out_writes_bytes_all_(size)
487 #define _Out_writes_bytes_all_opt_(size)
488 #define _Out_writes_bytes_opt_(size)
489 #define _Out_writes_bytes_to_(size, count)
490 #define _Out_writes_bytes_to_opt_(size, count)
491 #define _Out_writes_opt_(size)
492 #define _Out_writes_opt_z_(size)
493 #define _Out_writes_to_(size, count)
494 #define _Out_writes_to_opt_(size, count)
495 #define _Out_writes_to_ptr_(ptr)
496 #define _Out_writes_to_ptr_opt_(ptr)
497 #define _Out_writes_to_ptr_opt_z_(ptr)
498 #define _Out_writes_to_ptr_z_(ptr)
499 #define _Out_writes_z_(size)
500 #define _Out_z_bytecap_(size)
501 #define _Out_z_bytecap_c_(size)
502 #define _Out_z_bytecap_post_bytecount_(cap, count)
503 #define _Out_z_bytecap_x_(size)
504 #define _Out_z_bytecapcount_(capcount)
505 #define _Out_z_cap_(size)
506 #define _Out_z_cap_c_(size)
507 #define _Out_z_cap_m_(mult, size)
508 #define _Out_z_cap_post_count_(cap, count)
509 #define _Out_z_cap_x_(size)
510 #define _Out_z_capcount_(capcount)
511 #define _Outptr_
512 #define _Outptr_opt_
513 #define _Outptr_opt_result_buffer_(size)
514 #define _Outptr_opt_result_buffer_all_(size)
515 #define _Outptr_opt_result_buffer_all_maybenull_(size)
516 #define _Outptr_opt_result_buffer_maybenull_(size)
517 #define _Outptr_opt_result_buffer_to_(size, count)
518 #define _Outptr_opt_result_buffer_to_maybenull_(size, count)
519 #define _Outptr_opt_result_bytebuffer_(size)
520 #define _Outptr_opt_result_bytebuffer_all_(size)
521 #define _Outptr_opt_result_bytebuffer_all_maybenull_(size)
522 #define _Outptr_opt_result_bytebuffer_maybenull_(size)
523 #define _Outptr_opt_result_bytebuffer_to_(size, count)
524 #define _Outptr_opt_result_bytebuffer_to_maybenull_(size, count)
525 #define _Outptr_opt_result_maybenull_
526 #define _Outptr_opt_result_maybenull_z_
527 #define _Outptr_opt_result_nullonfailure_
528 #define _Outptr_opt_result_z_
529 #define _Outptr_result_buffer_(size)
530 #define _Outptr_result_buffer_all_(size)
531 #define _Outptr_result_buffer_all_maybenull_(size)
532 #define _Outptr_result_buffer_maybenull_(size)
533 #define _Outptr_result_buffer_to_(size, count)
534 #define _Outptr_result_buffer_to_maybenull_(size, count)
535 #define _Outptr_result_bytebuffer_(size)
536 #define _Outptr_result_bytebuffer_all_(size)
537 #define _Outptr_result_bytebuffer_all_maybenull_(size)
538 #define _Outptr_result_bytebuffer_maybenull_(size)
539 #define _Outptr_result_bytebuffer_to_(size, count)
540 #define _Outptr_result_bytebuffer_to_maybenull_(size, count)
541 #define _Outptr_result_maybenull_
542 #define _Outptr_result_maybenull_z_
543 #define _Outptr_result_nullonfailure_
544 #define _Outptr_result_z_
545 #define _Outref_
546 #define _Outref_result_buffer_(size)
547 #define _Outref_result_buffer_all_(size)
548 #define _Outref_result_buffer_all_maybenull_(size)
549 #define _Outref_result_buffer_maybenull_(size)
550 #define _Outref_result_buffer_to_(size, count)
551 #define _Outref_result_buffer_to_maybenull_(size, count)
552 #define _Outref_result_bytebuffer_(size)
553 #define _Outref_result_bytebuffer_all_(size)
554 #define _Outref_result_bytebuffer_all_maybenull_(size)
555 #define _Outref_result_bytebuffer_maybenull_(size)
556 #define _Outref_result_bytebuffer_to_(size, count)
557 #define _Outref_result_bytebuffer_to_maybenull_(size, count)
558 #define _Outref_result_maybenull_
559 #define _Outref_result_nullonfailure_
560 #define _Points_to_data_
561 #define _Post_
562 #define _Post_bytecap_(size)
563 #define _Post_bytecount_(size)
564 #define _Post_bytecount_c_(size)
565 #define _Post_bytecount_x_(size)
566 #define _Post_cap_(size)
567 #define _Post_count_(size)
568 #define _Post_count_c_(size)
569 #define _Post_count_x_(size)
570 #define _Post_defensive_
571 #define _Post_equal_to_(expr)
572 #define _Post_invalid_
573 #define _Post_maybenull_
574 #define _Post_maybez_
575 #define _Post_notnull_
576 #define _Post_null_
577 #define _Post_ptr_invalid_
578 #define _Post_readable_byte_size_(size)
579 #define _Post_readable_size_(size)
580 #define _Post_satisfies_(cond)
581 #define _Post_valid_
582 #define _Post_writable_byte_size_(size)
583 #define _Post_writable_size_(size)
584 #define _Post_z_
585 #define _Post_z_bytecount_(size)
586 #define _Post_z_bytecount_c_(size)
587 #define _Post_z_bytecount_x_(size)
588 #define _Post_z_count_(size)
589 #define _Post_z_count_c_(size)
590 #define _Post_z_count_x_(size)
591 #define _Pre_
592 #define _Pre_bytecap_(size)
593 #define _Pre_bytecap_c_(size)
594 #define _Pre_bytecap_x_(size)
595 #define _Pre_bytecount_(size)
596 #define _Pre_bytecount_c_(size)
597 #define _Pre_bytecount_x_(size)
598 #define _Pre_cap_(size)
599 #define _Pre_cap_c_(size)
600 #define _Pre_cap_c_one_
601 #define _Pre_cap_for_(param)
602 #define _Pre_cap_m_(mult, size)
603 #define _Pre_cap_x_(size)
604 #define _Pre_count_(size)
605 #define _Pre_count_c_(size)
606 #define _Pre_count_x_(size)
607 #define _Pre_defensive_
608 #define _Pre_equal_to_(expr)
609 #define _Pre_invalid_
610 #define _Pre_maybenull_
611 #define _Pre_notnull_
612 #define _Pre_null_
613 #define _Pre_opt_bytecap_(size)
614 #define _Pre_opt_bytecap_c_(size)
615 #define _Pre_opt_bytecap_x_(size)
616 #define _Pre_opt_bytecount_(size)
617 #define _Pre_opt_bytecount_c_(size)
618 #define _Pre_opt_bytecount_x_(size)
619 #define _Pre_opt_cap_(size)
620 #define _Pre_opt_cap_c_(size)
621 #define _Pre_opt_cap_c_one_
622 #define _Pre_opt_cap_for_(param)
623 #define _Pre_opt_cap_m_(mult, size)
624 #define _Pre_opt_cap_x_(size)
625 #define _Pre_opt_count_(size)
626 #define _Pre_opt_count_c_(size)
627 #define _Pre_opt_count_x_(size)
628 #define _Pre_opt_ptrdiff_cap_(ptr)
629 #define _Pre_opt_ptrdiff_count_(ptr)
630 #define _Pre_opt_valid_
631 #define _Pre_opt_valid_bytecap_(size)
632 #define _Pre_opt_valid_bytecap_c_(size)
633 #define _Pre_opt_valid_bytecap_x_(size)
634 #define _Pre_opt_valid_cap_(size)
635 #define _Pre_opt_valid_cap_c_(size)
636 #define _Pre_opt_valid_cap_x_(size)
637 #define _Pre_opt_z_
638 #define _Pre_opt_z_bytecap_(size)
639 #define _Pre_opt_z_bytecap_c_(size)
640 #define _Pre_opt_z_bytecap_x_(size)
641 #define _Pre_opt_z_cap_(size)
642 #define _Pre_opt_z_cap_c_(size)
643 #define _Pre_opt_z_cap_x_(size)
644 #define _Pre_ptrdiff_cap_(ptr)
645 #define _Pre_ptrdiff_count_(ptr)
646 #define _Pre_readable_byte_size_(size)
647 #define _Pre_readable_size_(size)
648 #define _Pre_readonly_
649 #define _Pre_satisfies_(cond)
650 #define _Pre_unknown_
651 #define _Pre_valid_
652 #define _Pre_valid_bytecap_(size)
653 #define _Pre_valid_bytecap_c_(size)
654 #define _Pre_valid_bytecap_x_(size)
655 #define _Pre_valid_cap_(size)
656 #define _Pre_valid_cap_c_(size)
657 #define _Pre_valid_cap_x_(size)
658 #define _Pre_writable_byte_size_(size)
659 #define _Pre_writable_size_(size)
660 #define _Pre_writeonly_
661 #define _Pre_z_
662 #define _Pre_z_bytecap_(size)
663 #define _Pre_z_bytecap_c_(size)
664 #define _Pre_z_bytecap_x_(size)
665 #define _Pre_z_cap_(size)
666 #define _Pre_z_cap_c_(size)
667 #define _Pre_z_cap_x_(size)
668 #define _Prepost_bytecount_(size)
669 #define _Prepost_bytecount_c_(size)
670 #define _Prepost_bytecount_x_(size)
671 #define _Prepost_count_(size)
672 #define _Prepost_count_c_(size)
673 #define _Prepost_count_x_(size)
674 #define _Prepost_opt_bytecount_(size)
675 #define _Prepost_opt_bytecount_c_(size)
676 #define _Prepost_opt_bytecount_x_(size)
677 #define _Prepost_opt_count_(size)
678 #define _Prepost_opt_count_c_(size)
679 #define _Prepost_opt_count_x_(size)
680 #define _Prepost_opt_valid_
681 #define _Prepost_opt_z_
682 #define _Prepost_valid_
683 #define _Prepost_z_
684 #define _Printf_format_string_
685 #define _Raises_SEH_exception_
686 #define _Maybe_raises_SEH_exception_
687 #define _Readable_bytes_(size)
688 #define _Readable_elements_(size)
689 #define _Reserved_
690 #define _Result_nullonfailure_
691 #define _Result_zeroonfailure_
692 #define __inner_callback
693 #define _Ret_
694 #define _Ret_bound_
695 #define _Ret_bytecap_(size)
696 #define _Ret_bytecap_c_(size)
697 #define _Ret_bytecap_x_(size)
698 #define _Ret_bytecount_(size)
699 #define _Ret_bytecount_c_(size)
700 #define _Ret_bytecount_x_(size)
701 #define _Ret_cap_(size)
702 #define _Ret_cap_c_(size)
703 #define _Ret_cap_x_(size)
704 #define _Ret_count_(size)
705 #define _Ret_count_c_(size)
706 #define _Ret_count_x_(size)
707 #define _Ret_maybenull_
708 #define _Ret_maybenull_z_
709 #define _Ret_notnull_
710 #define _Ret_null_
711 #define _Ret_opt_
712 #define _Ret_opt_bytecap_(size)
713 #define _Ret_opt_bytecap_c_(size)
714 #define _Ret_opt_bytecap_x_(size)
715 #define _Ret_opt_bytecount_(size)
716 #define _Ret_opt_bytecount_c_(size)
717 #define _Ret_opt_bytecount_x_(size)
718 #define _Ret_opt_cap_(size)
719 #define _Ret_opt_cap_c_(size)
720 #define _Ret_opt_cap_x_(size)
721 #define _Ret_opt_count_(size)
722 #define _Ret_opt_count_c_(size)
723 #define _Ret_opt_count_x_(size)
724 #define _Ret_opt_valid_
725 #define _Ret_opt_z_
726 #define _Ret_opt_z_bytecap_(size)
727 #define _Ret_opt_z_bytecount_(size)
728 #define _Ret_opt_z_cap_(size)
729 #define _Ret_opt_z_count_(size)
730 #define _Ret_range_(lb, ub)
731 #define _Ret_valid_
732 #define _Ret_writes_(size)
733 #define _Ret_writes_bytes_(size)
734 #define _Ret_writes_bytes_maybenull_(size)
735 #define _Ret_writes_bytes_to_(size, count)
736 #define _Ret_writes_bytes_to_maybenull_(size, count)
737 #define _Ret_writes_maybenull_(size)
738 #define _Ret_writes_maybenull_z_(size)
739 #define _Ret_writes_to_(size, count)
740 #define _Ret_writes_to_maybenull_(size, count)
741 #define _Ret_writes_z_(size)
742 #define _Ret_z_
743 #define _Ret_z_bytecap_(size)
744 #define _Ret_z_bytecount_(size)
745 #define _Ret_z_cap_(size)
746 #define _Ret_z_count_(size)
747 #define _Return_type_success_(expr)
748 #define _Scanf_format_string_
749 #define _Scanf_s_format_string_
750 #define _Struct_size_bytes_(size)
751 #define _Success_(expr)
752 #define _Unchanged_(e)
753 #define _Use_decl_annotations_
754 #define _Valid_
755 #define _When_(expr, annos)
756 #define _Writable_bytes_(size)
757 #define _Writable_elements_(size)
758 
759 #define __bcount(size)
760 #define __bcount_opt(size)
761 #define __deref_bcount(size)
762 #define __deref_bcount_opt(size)
763 #define __deref_ecount(size)
764 #define __deref_ecount_opt(size)
765 #define __deref_in
766 #define __deref_in_bcount(size)
767 #define __deref_in_bcount_opt(size)
768 #define __deref_in_ecount(size)
769 #define __deref_in_ecount_opt(size)
770 #define __deref_in_opt
771 #define __deref_inout
772 #define __deref_inout_bcount(size)
773 #define __deref_inout_bcount_full(size)
774 #define __deref_inout_bcount_full_opt(size)
775 #define __deref_inout_bcount_opt(size)
776 #define __deref_inout_bcount_part(size, length)
777 #define __deref_inout_bcount_part_opt(size, length)
778 #define __deref_inout_ecount(size)
779 #define __deref_inout_ecount_full(size)
780 #define __deref_inout_ecount_full_opt(size)
781 #define __deref_inout_ecount_opt(size)
782 #define __deref_inout_ecount_part(size, length)
783 #define __deref_inout_ecount_part_opt(size, length)
784 #define __deref_inout_opt
785 #define __deref_opt_bcount(size)
786 #define __deref_opt_bcount_opt(size)
787 #define __deref_opt_ecount(size)
788 #define __deref_opt_ecount_opt(size)
789 #define __deref_opt_in
790 #define __deref_opt_in_bcount(size)
791 #define __deref_opt_in_bcount_opt(size)
792 #define __deref_opt_in_ecount(size)
793 #define __deref_opt_in_ecount_opt(size)
794 #define __deref_opt_in_opt
795 #define __deref_opt_inout
796 #define __deref_opt_inout_bcount(size)
797 #define __deref_opt_inout_bcount_full(size)
798 #define __deref_opt_inout_bcount_full_opt(size)
799 #define __deref_opt_inout_bcount_opt(size)
800 #define __deref_opt_inout_bcount_part(size, length)
801 #define __deref_opt_inout_bcount_part_opt(size, length)
802 #define __deref_opt_inout_ecount(size)
803 #define __deref_opt_inout_ecount_full(size)
804 #define __deref_opt_inout_ecount_full_opt(size)
805 #define __deref_opt_inout_ecount_opt(size)
806 #define __deref_opt_inout_ecount_part(size, length)
807 #define __deref_opt_inout_ecount_part_opt(size, length)
808 #define __deref_opt_inout_opt
809 #define __deref_opt_out
810 #define __deref_opt_out_bcount(size)
811 #define __deref_opt_out_bcount_full(size)
812 #define __deref_opt_out_bcount_full_opt(size)
813 #define __deref_opt_out_bcount_opt(size)
814 #define __deref_opt_out_bcount_part(size, length)
815 #define __deref_opt_out_bcount_part_opt(size, length)
816 #define __deref_opt_out_ecount(size)
817 #define __deref_opt_out_ecount_full(size)
818 #define __deref_opt_out_ecount_full_opt(size)
819 #define __deref_opt_out_ecount_opt(size)
820 #define __deref_opt_out_ecount_part(size, length)
821 #define __deref_opt_out_ecount_part_opt(size, length)
822 #define __deref_opt_out_opt
823 #define __deref_out
824 #define __deref_out_bcount(size)
825 #define __deref_out_bcount_full(size)
826 #define __deref_out_bcount_full_opt(size)
827 #define __deref_out_bcount_opt(size)
828 #define __deref_out_bcount_part(size, length)
829 #define __deref_out_bcount_part_opt(size, length)
830 #define __deref_out_ecount(size)
831 #define __deref_out_ecount_full(size)
832 #define __deref_out_ecount_full_opt(size)
833 #define __deref_out_ecount_opt(size)
834 #define __deref_out_ecount_part(size, length)
835 #define __deref_out_ecount_part_opt(size, length)
836 #define __deref_out_opt
837 #define __ecount(size)
838 #define __ecount_opt(size)
839 //#define __in /* Conflicts with libstdc++ header macros */
840 #define __in_bcount(size)
841 #define __in_bcount_opt(size)
842 #define __in_ecount(size)
843 #define __in_ecount_opt(size)
844 #define __in_opt
845 #define __inout
846 #define __inout_bcount(size)
847 #define __inout_bcount_full(size)
848 #define __inout_bcount_full_opt(size)
849 #define __inout_bcount_opt(size)
850 #define __inout_bcount_part(size, length)
851 #define __inout_bcount_part_opt(size, length)
852 #define __inout_ecount(size)
853 #define __inout_ecount_full(size)
854 #define __inout_ecount_full_opt(size)
855 #define __inout_ecount_opt(size)
856 #define __inout_ecount_part(size, length)
857 #define __inout_ecount_part_opt(size, length)
858 #define __inout_opt
859 //#define __out /* Conflicts with libstdc++ header macros */
860 #define __out_bcount(size)
861 #define __out_bcount_full(size)
862 #define __out_bcount_full_opt(size)
863 #define __out_bcount_opt(size)
864 #define __out_bcount_part(size, length)
865 #define __out_bcount_part_opt(size, length)
866 #define __out_ecount(size)
867 #define __out_ecount_full(size)
868 #define __out_ecount_full_opt(size)
869 #define __out_ecount_opt(size)
870 #define __out_ecount_part(size, length)
871 #define __out_ecount_part_opt(size, length)
872 #define __out_opt
873 
874 #define __blocksOn(resource)
875 #define __callback
876 #define __checkReturn
877 #define __format_string
878 #define __in_awcount(expr, size)
879 #define __nullnullterminated
880 #define __nullterminated
881 #define __out_awcount(expr, size)
882 #define __override
883 //#define __reserved /* Conflicts with header included by CarbonCore.h on OS X */
884 #define __success(expr)
885 #define __typefix(ctype)
886 
887 #ifndef _countof
888 #ifndef __cplusplus
889 #define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
890 #else
891 extern "C++"
892 {
893  template <typename _CountofType, size_t _SizeOfArray>
894  char (*__countof_helper(_CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
895 #define _countof(_Array) sizeof(*__countof_helper(_Array))
896 }
897 #endif
898 #endif
899 
904 #define MINCHAR 0x80
905 #define MAXCHAR 0x7F
906 
907 #ifndef MINSHORT
908 #define MINSHORT 0x8000
909 #endif
910 
911 #ifndef MAXSHORT
912 #define MAXSHORT 0x7FFF
913 #endif
914 
915 #define MINLONG 0x80000000
916 #define MAXLONG 0x7FFFFFFF
917 #define MAXBYTE 0xFF
918 #define MAXWORD 0xFFFF
919 #define MAXDWORD 0xFFFFFFFF
920 
921 #define FIELD_OFFSET(type, field) ((LONG)(LONG_PTR) & (((type*)0)->field))
922 
923 #define RTL_FIELD_SIZE(type, field) (sizeof(((type*)0)->field))
924 
925 #define RTL_SIZEOF_THROUGH_FIELD(type, field) \
926  (FIELD_OFFSET(type, field) + RTL_FIELD_SIZE(type, field))
927 
928 #define RTL_CONTAINS_FIELD(Struct, Size, Field) \
929  ((((PCHAR)(&(Struct)->Field)) + sizeof((Struct)->Field)) <= (((PCHAR)(Struct)) + (Size)))
930 
931 #define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
932 #define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
933 
934 #define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A)
935 
936 #define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
937 #define _ARRAYSIZE(A) RTL_NUMBER_OF_V1(A)
938 
939 #define RTL_FIELD_TYPE(type, field) (((type*)0)->field)
940 
941 #define RTL_NUMBER_OF_FIELD(type, field) (RTL_NUMBER_OF(RTL_FIELD_TYPE(type, field)))
942 
943 #define RTL_PADDING_BETWEEN_FIELDS(T, F1, F2) \
944  ((FIELD_OFFSET(T, F2) > FIELD_OFFSET(T, F1)) \
945  ? (FIELD_OFFSET(T, F2) - FIELD_OFFSET(T, F1) - RTL_FIELD_SIZE(T, F1)) \
946  : (FIELD_OFFSET(T, F1) - FIELD_OFFSET(T, F2) - RTL_FIELD_SIZE(T, F2)))
947 
948 #if defined(__cplusplus)
949 #define RTL_CONST_CAST(type) const_cast<type>
950 #else
951 #define RTL_CONST_CAST(type) (type)
952 #endif
953 
954 #define RTL_BITS_OF(sizeOfArg) (sizeof(sizeOfArg) * 8)
955 
956 #define RTL_BITS_OF_FIELD(type, field) (RTL_BITS_OF(RTL_FIELD_TYPE(type, field)))
957 
958 #define CONTAINING_RECORD(address, type, field) \
959  ((type*)((PCHAR)(address) - (ULONG_PTR)(&((type*)0)->field)))
960 
961 #endif
962 
963 #if defined(_WIN32) || defined(__CYGWIN__)
964 #ifdef __GNUC__
965 #define DECLSPEC_EXPORT __attribute__((dllexport))
966 #ifndef DECLSPEC_IMPORT
967 #define DECLSPEC_IMPORT __attribute__((dllimport))
968 #endif /* DECLSPEC_IMPORT */
969 #else
970 #define DECLSPEC_EXPORT __declspec(dllexport)
971 #define DECLSPEC_IMPORT __declspec(dllimport)
972 #endif /* __GNUC__ */
973 #else
974 #if defined(__GNUC__) && __GNUC__ >= 4
975 #define DECLSPEC_EXPORT __attribute__((visibility("default")))
976 #define DECLSPEC_IMPORT
977 #else
978 #define DECLSPEC_EXPORT
979 #define DECLSPEC_IMPORT
980 #endif
981 #endif
982 
983 WINPR_PRAGMA_DIAG_POP
984 
985 #endif /* WINPR_SPEC_H */