[USB-BRINGUP-TRUNK]
[reactos.git] / include / psdk / sal.h
1 /*
2 * sal.h
3 *
4 * Standard Annotation Language (SAL) definitions
5 *
6 * This file is part of the ReactOS PSDK package.
7 *
8 * Contributors:
9 * Timo Kreuzer (timo.kreuzer@reactos.org)
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 */
22
23 #pragma once
24 #define __ATTR_SAL
25
26 /* HACK: gcc's C++ headers conflict with oldstyle macros */
27 #if !defined(__cplusplus) || !defined(__GNUC__)
28 #include <sal_old.h>
29 #endif
30
31 #ifdef _PREFAST_
32
33 #pragma warning(disable:6320) /* disable warning about SEH filter */
34 #pragma warning(disable:28247) /* duplicated model file annotations */
35 #pragma warning(disable:28251) /* Inconsistent annotation */
36
37
38 #ifndef _USE_DECLSPECS_FOR_SAL
39 #define _USE_DECLSPECS_FOR_SAL 1
40 #endif
41
42 #if !defined(_USE_ATTRIBUTES_FOR_SAL) || _USE_DECLSPECS_FOR_SAL
43 #define _USE_ATTRIBUTES_FOR_SAL 0
44 #endif
45
46 #if !_USE_DECLSPECS_FOR_SAL && !_USE_ATTRIBUTES_FOR_SAL
47 #if _MSC_VER >= 1400
48 #undef _USE_ATTRIBUTES_FOR_SAL
49 #define _USE_ATTRIBUTES_FOR_SAL 1
50 #else
51 #undef _USE_DECLSPECS_FOR_SAL
52 #define _USE_DECLSPECS_FOR_SAL 1
53 #endif /* _MSC_VER >= 1400 */
54 #endif /* !_USE_DECLSPECS_FOR_SAL && !_USE_ATTRIBUTES_FOR_SAL */
55
56 #else /* _PREFAST_ */
57
58 #undef _USE_DECLSPECS_FOR_SAL
59 #define _USE_DECLSPECS_FOR_SAL 0
60 #undef _USE_ATTRIBUTES_FOR_SAL
61 #define _USE_ATTRIBUTES_FOR_SAL 0
62
63 #endif /* _PREFAST_ */
64
65 #if defined(MIDL_PASS) || defined(__midl) || defined(RC_INVOKED)
66 #undef _USE_DECLSPECS_FOR_SAL
67 #define _USE_DECLSPECS_FOR_SAL 0
68 #undef _USE_ATTRIBUTES_FOR_SAL
69 #define _USE_ATTRIBUTES_FOR_SAL 0
70 #endif
71
72 #if !defined(_MSC_EXTENSIONS) || defined(_M_CEE_SAFE)
73 #undef _USE_ATTRIBUTES_FOR_SAL
74 #define _USE_ATTRIBUTES_FOR_SAL 0
75 #endif
76
77
78 #if _USE_ATTRIBUTES_FOR_SAL || _USE_DECLSPECS_FOR_SAL
79
80 #define _SA_SPECSTRIZE(x) #x
81
82 #if _USE_ATTRIBUTES_FOR_SAL
83
84 #if (_MSC_VER < 1400)
85 #error attribute sal only works with _MSC_VER >= 1400
86 #endif
87
88 #if !defined(_W64)
89 # if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
90 # define _W64 __w64
91 # else
92 # define _W64
93 # endif
94 #endif
95
96 #ifndef _SIZE_T_DEFINED
97 # ifdef _WIN64
98 typedef unsigned __int64 size_t;
99 # else
100 typedef _W64 unsigned int size_t;
101 # endif
102 # define _SIZE_T_DEFINED
103 #endif
104
105 #ifndef _WCHAR_T_DEFINED
106 typedef unsigned short wchar_t;
107 # define _WCHAR_T_DEFINED
108 #endif
109
110 #ifdef __cplusplus
111 # define SA(id) id
112 # define REPEATABLE [repeatable]
113 # define CONSTRUCTOR(name) name();
114 namespace vc_attributes {
115 #else
116 # define SA(id) SA_##id
117 # define REPEATABLE
118 # define CONSTRUCTOR(name)
119 #endif
120 #define ATTR_SA_ALL [source_annotation_attribute(SA(All))]
121
122 typedef enum SA(YesNoMaybe)
123 {
124 SA(No) = 0x0fff0001,
125 SA(Maybe) = 0x0fff0010,
126 SA(Yes) = 0x0fff0100
127 } SA(YesNoMaybe);
128
129 typedef enum SA(AccessType)
130 {
131 SA(NoAccess) = 0,
132 SA(Read) = 1,
133 SA(Write) = 2,
134 SA(ReadWrite) = 3
135 } SA(AccessType);
136
137 #define DECLARE_ATTR(Name, ...) \
138 ATTR_SA_ALL \
139 typedef struct Name \
140 { \
141 CONSTRUCTOR(Name) \
142 __VA_ARGS__ \
143 } Name,
144
145 REPEATABLE DECLARE_ATTR(PreAttribute, unsigned int Deref;SA(YesNoMaybe) Valid;SA(YesNoMaybe) Null;SA(YesNoMaybe) Tainted;SA(AccessType) Access;unsigned int Notref;
146 size_t ValidElementsConst;size_t ValidBytesConst;const wchar_t* ValidElements;const wchar_t* ValidBytes;const wchar_t* ValidElementsLength;const wchar_t* ValidBytesLength;
147 size_t WritableElementsConst;size_t WritableBytesConst;const wchar_t* WritableElements;const wchar_t* WritableBytes;const wchar_t* WritableElementsLength;
148 const wchar_t* WritableBytesLength;size_t ElementSizeConst;const wchar_t* ElementSize;SA(YesNoMaybe) NullTerminated;const wchar_t* Condition;) SA_Pre;
149 REPEATABLE DECLARE_ATTR(PostAttribute, unsigned int Deref;SA(YesNoMaybe) Valid;SA(YesNoMaybe) Null;SA(YesNoMaybe) Tainted;SA(AccessType) Access;
150 unsigned int Notref;size_t ValidElementsConst;size_t ValidBytesConst;const wchar_t* ValidElements;const wchar_t* ValidBytes;
151 const wchar_t* ValidElementsLength;const wchar_t* ValidBytesLength;size_t WritableElementsConst;size_t WritableBytesConst;
152 const wchar_t* WritableElements;const wchar_t* WritableBytes;const wchar_t* WritableElementsLength;const wchar_t* WritableBytesLength;
153 size_t ElementSizeConst;const wchar_t* ElementSize;SA(YesNoMaybe) NullTerminated;SA(YesNoMaybe) MustCheck;const wchar_t* Condition;) SA_Post;
154 DECLARE_ATTR(FormatStringAttribute, const wchar_t* Style; const wchar_t* UnformattedAlternative;) SA_FormatString;
155 REPEATABLE DECLARE_ATTR(PreBoundAttribute, unsigned int Deref;) SA_PreBound;
156 REPEATABLE DECLARE_ATTR(PostBoundAttribute, unsigned int Deref;) SA_PostBound;
157 REPEATABLE DECLARE_ATTR(PreRangeAttribute, unsigned int Deref;const char* MinVal;const char* MaxVal;) SA_PreRange;
158 REPEATABLE DECLARE_ATTR(PostRangeAttribute, unsigned int Deref;const char* MinVal;const char* MaxVal;) SA_PostRange;
159 REPEATABLE DECLARE_ATTR(DerefAttribute, int unused;) SAL_deref;
160 REPEATABLE DECLARE_ATTR(NotrefAttribute, int unused;) SAL_notref;
161 REPEATABLE DECLARE_ATTR(AnnotesAttribute, wchar_t *Name;wchar_t *p1;wchar_t *p2;wchar_t *p3;wchar_t *p4;wchar_t *p5;wchar_t *p6;wchar_t *p7;wchar_t *p8;wchar_t *p9;) SAL_annotes;
162 REPEATABLE DECLARE_ATTR(AtAttribute, wchar_t *p1;) SAL_at;
163 REPEATABLE DECLARE_ATTR(AtBufferAttribute, wchar_t *p1;wchar_t *p2;wchar_t *p3;) SAL_at_buffer;
164 REPEATABLE DECLARE_ATTR(WhenAttribute, wchar_t *p1;) SAL_when;
165 REPEATABLE DECLARE_ATTR(TypefixAttribute, wchar_t *p1;) SAL_typefix;
166 REPEATABLE DECLARE_ATTR(ContextAttribute, wchar_t *p1;) SAL_context;
167 REPEATABLE DECLARE_ATTR(ExceptAttribute, int unused;) SAL_except;
168 REPEATABLE DECLARE_ATTR(PreOpAttribute, int unused;) SAL_pre;
169 REPEATABLE DECLARE_ATTR(PostOpAttribute, int unused;) SAL_post;
170 REPEATABLE DECLARE_ATTR(BeginAttribute, int unused;) SAL_begin;
171 REPEATABLE DECLARE_ATTR(EndAttribute, int unused;) SAL_end;
172
173 #ifdef __cplusplus
174 };
175 #endif
176
177 #undef REPEATABLE
178 #undef SA
179 #undef DECLARE_ATTR
180
181
182 #if (_MSC_VER >= 1610)
183 #define NL_(size) "\n"#size
184 #else
185 #define NL_(size) #size
186 #endif
187
188 #define _SA_annotes0(n) [SAL_annotes(Name=#n)]
189 #define _SA_annotes1(n,pp1) [SAL_annotes(Name=#n, p1=_SA_SPECSTRIZE(pp1))]
190 #define _SA_annotes2(n,pp1,pp2) [SAL_annotes(Name=#n, p1=_SA_SPECSTRIZE(pp1), p2=_SA_SPECSTRIZE(pp2))]
191 #define _SA_annotes3(n,pp1,pp2,pp3) [SAL_annotes(Name=#n, p1=_SA_SPECSTRIZE(pp1), p2=_SA_SPECSTRIZE(pp2), p3=_SA_SPECSTRIZE(pp3))]
192
193 #define _SA_Deref_pre1_(p1) [SA_Pre(Deref=1,p1)]
194 #define _SA_Deref_pre2_(p1,p2) [SA_Pre(Deref=1,p1,p2)]
195 #define _SA_Deref_pre3_(p1,p2,p3) [SA_Pre(Deref=1,p1,p2,p3)]
196 #define _SA_Deref_post1_(p1) [SA_Post(Deref=1,p1)]
197 #define _SA_Deref_post2_(p1,p2) [SA_Post(Deref=1,p1,p2)]
198 #define _SA_Deref_post3_(p1,p2,p3) [SA_Post(Deref=1,p1,p2,p3)]
199 #define _SA_Deref_in_bound_ [SA_PreBound(Deref=1)]
200 #define _SA_Pre1_(p1) [SA_Pre(p1)]
201 #define _SA_Pre2_(p1,p2) [SA_Pre(p1,p2)]
202 #define _SA_Pre3_(p1,p2,p3) [SA_Pre(p1,p2,p3)]
203 #define _SA_Post1_(p1) [SA_Post(p1)]
204 #define _SA_Post2_(p1,p2) [SA_Post(p1,p2)]
205 #define _SA_Post3_(p1,p2,p3) [SA_Post(p1,p2,p3)]
206 #define _SA_Deref_ret1_(p1) [returnvalue:SA_Post(Deref=1,p1)]
207 #define _SA_Deref2_pre1_(p1) [SA_Pre(Deref=2,Notref=1,p1)]
208 #define _SA_Ret1_(p1) [returnvalue:SA_Post(p1)]
209 #define _SA_Ret2_(p1,p2) [returnvalue:SA_Post(p1,p2)]
210 #define _SA_Ret3_(p1,p2,p3) [returnvalue:SA_Post(p1,p2,p3)]
211
212 #define __null_impl Null=SA_Yes
213 #define __null_impl_notref Null=SA_Yes,Notref=1
214 #define __notnull_impl Null=SA_No
215 #define __notnull_impl_notref Null=SA_No,Notref=1
216 #define __maybenull_impl Null=SA_Maybe
217 #define __maybenull_impl_notref Null=SA_Maybe,Notref=1
218 #define __valid_impl Valid=SA_Yes
219 #define __notvalid_impl Valid=SA_No
220 #define __maybevalid_impl Valid=SA_Maybe
221 #define __readaccess_impl_notref Access=SA_Read,Notref=1
222 #define __writeaccess_impl_notref Access=SA_Write,Notref=1
223 #define __bytecap_impl(size) WritableBytes=_NL_(size)
224 #define __bytecap_c_impl(size) WritableBytesConst=size
225 #define __bytecap_x_impl(size) WritableBytes="\n@"#size
226 #define __cap_impl(size) WritableElements=_NL_(size)
227 #define __cap_c_impl(size) WritableElementsConst=size
228 #define __cap_c_one_notref_impl WritableElementsConst=1,Notref=1
229 #define __cap_for_impl(param) WritableElementsLength=#param
230 #define __cap_x_impl(size) WritableElements="\n@"#size
231 #define __bytecount_impl(size) ValidBytes=_NL_(size)
232 #define __bytecount_c_impl(size) ValidBytesConst=size
233 #define __bytecount_x_impl(size) ValidBytes="\n@"#size
234 #define __count_impl(size) ValidElements=_NL_(size)
235 #define __count_c_impl(size) ValidElementsConst=size
236 #define __count_x_impl(size) ValidElements="\n@"#size
237 #define __zterm_impl NullTerminated=SA_Yes
238 #define __notzterm_impl NullTerminated=SA_No
239 #define __maybezterm_impl NullTerminated=SA_Maybe
240 #define __mult_impl(mult,size) __cap_impl((mult)*(size))
241
242 #else /* #if _USE_DECLSPECS_FOR_SAL */
243
244 #define _SA_annotes0(n) __declspec(#n)
245 #define _SA_annotes1(n,pp1) __declspec(#n "(" _SA_SPECSTRIZE(pp1) ")" )
246 #define _SA_annotes2(n,pp1,pp2) __declspec(#n "(" _SA_SPECSTRIZE(pp1) "," _SA_SPECSTRIZE(pp2) ")")
247 #define _SA_annotes3(n,pp1,pp2,pp3) __declspec(#n "(" _SA_SPECSTRIZE(pp1) "," _SA_SPECSTRIZE(pp2) "," _SA_SPECSTRIZE(pp3) ")")
248
249 #define _SA_Deref_pre_ _Pre_ _Notref_ _SA_Deref_
250 #define _SA_Deref_pre1_(p1) _SA_Deref_pre_ p1
251 #define _SA_Deref_pre2_(p1,p2) _SA_Deref_pre_ p1 _SA_Deref_pre_ p2
252 #define _SA_Deref_pre3_(p1,p2,p3) _SA_Deref_pre_ p1 _SA_Deref_pre_ p2 _SA_Deref_pre_ p3
253 #define _SA_Deref_post_ _Post_ _Notref_ _SA_Deref_
254 #define _SA_Deref_post1_(p1) _SA_Deref_post_ p1
255 #define _SA_Deref_post2_(p1,p2) _SA_Deref_post_ p1 _SA_Deref_post_ p2
256 #define _SA_Deref_post3_(p1,p2,p3) _SA_Deref_post_ p1 _SA_Deref_post_ p2 _SA_Deref_post_ p3
257 #define _SA_Deref_in_bound_ _Pre_ _Notref_ _SA_Deref_ _SA_Bound_
258 #define _SA_Pre1_(p1) _Pre_ p1
259 #define _SA_Pre2_(p1,p2) _Pre_ p1 _Pre_ p2
260 #define _SA_Pre3_(p1,p2,p3) _Pre_ p1 _Pre_ p2 _Pre_ p3
261 #define _SA_Post1_(p1) _Post_ p1
262 #define _SA_Post2_(p1,p2) _Post_ p1 _Post_ p2
263 #define _SA_Post3_(p1,p2,p3) _Post_ p1 _Post_ p2 _Post_ p3
264 #define _SA_Deref_ret1_(p1) _SA_Deref_post_ p1
265 #define _SA_Deref2_pre1_(p1) _SA_Deref_pre_ _Notref_ _SA_Deref_ p1
266 #define _SA_Ret1_(p1) _Post_ p1
267 #define _SA_Ret2_(p1,p2) _Post_ p1 _Post_ p2
268 #define _SA_Ret3_(p1,p2,p3) _Post_ p1 _Post_ p2 _Post_ p3
269
270 #define __null_impl _Null_
271 #define __null_impl_notref _Notref_ _Null_
272 #define __notnull_impl _Notnull_
273 #define __notnull_impl_notref _Notref_ _Notnull_
274 #define __maybenull_impl __inner_exceptthat _Maybenull_
275 #define __maybenull_impl_notref _Notref_ __inner_exceptthat _Maybenull_
276 #define __valid_impl __declspec("SAL_valid") // __declspec("SAL_valid(__yes)")
277 #define __maybevalid_impl __declspec("SAL_maybevalid") // __declspec("SAL_valid(__maybe)")
278 #define __notvalid_impl __declspec("SAL_notvalid") // __declspec("SAL_valid(__no)")
279 #define __readaccess_impl_notref _Notref_ __declspec("SAL_readonly") // __declspec("SAL_access(0x1)")
280 #define __writeaccess_impl_notref _Notref_ __declspec("SAL_notreadonly") // __declspec("SAL_access(0x2)")
281 #define __bytecap_impl(size) _SA_annotes1(SAL_writableTo,byteCount(size))
282 #define __bytecap_c_impl(size) _SA_annotes1(SAL_writableTo,byteCount(size))
283 #define __bytecap_x_impl(size) _SA_annotes1(SAL_writableTo,inexpressibleCount(#size))
284 #define __cap_impl(size) _SA_annotes1(SAL_writableTo,elementCount(size))
285 #define __cap_c_impl(size) _SA_annotes1(SAL_writableTo,elementCount(size))
286 #define __cap_c_one_notref_impl _Notref_ __cap_c_impl(1)
287 #define __cap_for_impl(param) _SA_annotes1(SAL_writableTo,inexpressibleCount(sizeof(param)))
288 #define __cap_x_impl(size) _SA_annotes1(SAL_writableTo,inexpressibleCount(#size))
289 #define __bytecount_impl(size) _SA_annotes1(SAL_readableTo,byteCount(size))
290 #define __bytecount_c_impl(size) _SA_annotes1(SAL_readableTo,byteCount(size))
291 #define __bytecount_x_impl(size) _SA_annotes1(SAL_readableTo,inexpressibleCount(#size))
292 #define __count_impl(size) _SA_annotes1(SAL_readableTo,elementCount(size))
293 #define __count_c_impl(size) _SA_annotes1(SAL_readableTo,elementCount(size))
294 #define __count_x_impl(size) _SA_annotes1(SAL_readableTo,inexpressibleCount(#size))
295 #define __zterm_impl _SA_annotes1(SAL_nullTerminated, __yes)
296 #define __notzterm_impl _SA_annotes1(SAL_nullTerminated, __no)
297 #define __maybezterm_impl _SA_annotes1(SAL_nullTerminated, __maybe)
298 #define __mult_impl(mult,size) _SA_annotes1(SAL_writableTo,(mult)*(size))
299
300 #endif
301
302 /* Common internal */
303 #define _SA_Bound_ _SA_annotes0(SAL_bound)
304 #define _SA_Deref_ _SA_annotes0(SAL_deref)
305 #define _SA_Satisfies_(cond) _SA_annotes1(SAL_satisfies, cond)
306 #if (_MSC_VER >= 1600)
307 #define _SA_Must_inspect_ _Post_ _SA_annotes0(SAL_mustInspect)
308 #else
309 #define _SA_Must_inspect_
310 #endif
311
312 /******************************************************************************
313 * Public macros *
314 ******************************************************************************/
315
316 #if _USE_ATTRIBUTES_FOR_SAL
317
318 #define _Check_return_ [returnvalue:SA_Post(MustCheck=SA_Yes)]
319 #define _Deref_in_bound_ [SA_PreBound(Deref=1)]
320 #define _Deref_out_bound_ [SA_PostBound(Deref=1)]
321 #define _Deref_in_range_(min,max) [SA_PreRange(Deref=1,MinVal=#min,MaxVal=#max)]
322 #define _Deref_out_range_(min,max) [SA_PostRange(Deref=1,MinVal=#min,MaxVal=#max)]
323 #define _Deref_ret_bound_ [returnvalue:SA_PostBound(Deref=1)]
324 #define _Deref_ret_range_(min,max) [returnvalue:SA_PostRange(Deref=1,MinVal=#min,MaxVal=#max)]
325 #define _In_bound_ [SA_PreBound(Deref=0)]
326 #define _In_range_(min,max) [SA_PreRange(MinVal=#min,MaxVal=#max)]
327 #define _Out_bound_ [SA_PostBound(Deref=0)]
328 #define _Out_range_(min,max) [SA_PostRange(MinVal=#min,MaxVal=#max)]
329 #define _Printf_format_string_ [SA_FormatString(Style="printf")]
330 #define _Scanf_format_string_ [SA_FormatString(Style="scanf")]
331 #define _Scanf_s_format_string_ [SA_FormatString(Style="scanf_s")]
332 #define _Ret_bound_ [returnvalue:SA_PostBound(Deref=0)]
333 #define _Ret_range_(min,max) [returnvalue:SA_PostRange(MinVal=#min,MaxVal=#max)]
334 #define _Use_decl_annotations_ _SA_annotes0(SAL_useHeader)
335 #define __inner_exceptthat [SAL_except]
336 #define __inner_typefix(ctype) [SAL_typefix(p1=_SA_SPECSTRIZE(ctype))]
337
338 #elif _USE_DECLSPECS_FOR_SAL
339
340 #define _Check_return_ _Post_ __declspec("SAL_checkReturn")
341 #define _Deref_in_bound_ _SA_Deref_pre_ _SA_Bound_
342 #define _Deref_out_bound_ _SA_Deref_post_ _SA_Bound_
343 #define _Deref_in_range_(min,max) _SA_Deref_pre_ _Field_range_(min,max)
344 #define _Deref_out_range_(min,max) _SA_Deref_post_ _Field_range_(min,max)
345 #define _Deref_ret_bound_ _SA_Deref_post_ _SA_Bound_
346 #define _Deref_ret_range_(min,max) _SA_Deref_post_ _Field_range_(min,max)
347 #define _In_bound_ _Pre_ _SA_Bound_
348 #define _In_range_(min,max) _Pre_ _Field_range_(min,max)
349 #define _Out_bound_ _Post_ _SA_Bound_
350 #define _Out_range_(min,max) _Post_ _Field_range_(min,max)
351 #define _Printf_format_string_ _SA_annotes1(SAL_IsFormatString, "printf")
352 #define _Scanf_format_string_ _SA_annotes1(SAL_IsFormatString, "scanf")
353 #define _Scanf_s_format_string_ _SA_annotes1(SAL_IsFormatString, "scanf_s")
354 #define _Ret_bound_ _Post_ _SA_Bound_
355 #define _Ret_range_(min,max) _Post_ _Field_range_(min,max)
356 #define _Use_decl_annotations_ _ _declspec("SAL_useHeader()")
357 #define __inner_exceptthat _SA_annotes0(SAL_except)
358 #define __inner_typefix(ctype) _SA_annotes1(SAL_typefix, ctype)
359
360 #endif
361
362 #define _Post_ _SA_annotes0(SAL_post)
363 #define _Pre_ _SA_annotes0(SAL_pre)
364 #ifdef __cplusplus
365 #define _Notref_ _SA_annotes0(SAL_notref)
366 #else
367 #define _Notref_
368 #endif
369 #define _Null_ _SA_annotes1(SAL_null, __yes)
370 #define _Notnull_ _SA_annotes1(SAL_null, __no)
371 #define _Maybenull_ __inner_exceptthat _SA_annotes1(SAL_null, __maybe)
372 #define _Valid_ _SA_annotes1(SAL_valid, __yes)
373 #define _Notvalid_ _SA_annotes1(SAL_valid, __no)
374 #define _Maybevalid_ _SA_annotes1(SAL_valid, __maybe)
375 #define _Const_ _SA_Pre1_(__readaccess_impl_notref)
376 #define _Literal_ _Pre_ _SA_annotes1(SAL_constant, __yes)
377 #define _Notliteral_ _Pre_ _SA_annotes1(SAL_constant, __no)
378 #define _Null_terminated_ _SA_annotes1(SAL_nullTerminated, __yes)
379 #define _NullNull_terminated_ _Group_(_SA_annotes1(SAL_nullTerminated, __yes) _SA_annotes1(SAL_readableTo,inexpressibleCount("NullNull terminated string")))
380 #define _Field_range_(min,max) _SA_annotes2(SAL_range, min, max)
381 #define _Readable_bytes_(size) _SA_annotes1(SAL_readableTo, byteCount(size))
382 #define _Readable_elements_(size) _SA_annotes1(SAL_readableTo, elementCount(size))
383 #define _Writable_bytes_(size) _SA_annotes1(SAL_writableTo, byteCount(size))
384 #define _Writable_elements_(size) _SA_annotes1(SAL_writableTo, elementCount(size))
385 #define _Success_(expr) _SA_annotes1(SAL_success, expr)
386 #define _When_(expr, annos) _SA_annotes0(SAL_when(expr)) _Group_(annos)
387 #define _Group_(annos) _SA_annotes0(SAL_begin) annos _SA_annotes0(SAL_end)
388 #define _On_failure_(annos) _SA_annotes1(SAL_context, SAL_failed) _Group_(_Post_ _Group_(annos))
389 #define _At_(target, annos) _SA_annotes0(SAL_at(target)) _Group_(annos)
390 #define _At_buffer_(t, i, b, a) _SA_annotes3(SAL_at_buffer, t, i, b) _Group_(a)
391 #define _Must_inspect_result_ _SA_Must_inspect_ _Check_return_
392 #define _Always_(annos) _Group_(annos) _On_failure_(annos)
393 #define _Points_to_data_ _Pre_ _At_(*_Curr_, _SA_annotes1(SAL_mayBePointer, __no))
394 #define _Return_type_success_(expr) _Success_(expr)
395 #define _Struct_size_bytes_(size) _Writable_bytes_(size)
396 #define _Unchanged_(e) _At_(e, _Post_equal_to_(_Old_(e)) _Const_)
397 #define _Analysis_noreturn_ _SA_annotes0(SAL_terminates)
398 #define _Function_class_(x) _SA_annotes1(SAL_functionClassNew, #x)
399 #define _Raises_SEH_exception_ _Group_(_Pre_ _SA_annotes1(SAL_inTry,__yes) _Analysis_noreturn_)
400 #define _Maybe_raises_SEH_exception_ _Pre_ _SA_annotes1(SAL_inTry,__yes)
401 #define _Interlocked_operand_ _Pre_ _SA_annotes0(SAL_interlocked)
402
403 #define _Field_size_(size) _Notnull_ _Writable_elements_(size)
404 #define _Field_size_bytes_(size) _Notnull_ _Writable_bytes_(size)
405 #define _Field_size_bytes_full_(sz) _Field_size_bytes_part_(sz, sz)
406 #define _Field_size_bytes_full_opt_(sz) _Field_size_bytes_part_opt_(sz, sz)
407 #define _Field_size_bytes_opt_(sz) _Writable_bytes_(sz) _Maybenull_
408 #define _Field_size_bytes_part_(sz, c) _Notnull_ _Writable_bytes_(sz) _Readable_bytes_(c)
409 #define _Field_size_bytes_part_opt_(size, count) _Writable_bytes_(size) _Readable_bytes_(count) _Maybenull_
410 #define _Field_size_full_(size) _Field_size_part_(size, size)
411 #define _Field_size_full_opt_(size) _Field_size_part_opt_(size, size)
412 #define _Field_size_opt_(size) _Writable_elements_(size) _Maybenull_
413 #define _Field_size_part_(size, count) _Notnull_ _Writable_elements_(size) _Readable_elements_(count)
414 #define _Field_size_part_opt_(sz, c) _Writable_elements_(sz) _Readable_elements_(c) _Maybenull_
415 #define _Field_z_ _Null_terminated_
416
417 #define _Pre_bytecap_(size) _Pre_notnull_ _SA_Pre1_(__bytecap_impl(size))
418 #define _Pre_bytecap_c_(size) _Pre_notnull_ _SA_Pre1_(__bytecap_c_impl(size))
419 #define _Pre_bytecap_x_(size) _Pre_notnull_ _SA_Pre1_(__bytecap_x_impl(size))
420 #define _Pre_bytecount_(size) _Pre_notnull_ _SA_Pre1_(__bytecount_impl(size)) _SA_Pre1_(__valid_impl)
421 #define _Pre_bytecount_c_(size) _Pre_notnull_ _SA_Pre1_(__bytecount_c_impl(size)) _SA_Pre1_(__valid_impl)
422 #define _Pre_bytecount_x_(size) _Pre_notnull_ _SA_Pre1_(__bytecount_x_impl(size)) _SA_Pre1_(__valid_impl)
423 #define _Pre_cap_(size) _Pre_notnull_ _SA_Pre1_(__cap_impl(size))
424 #define _Pre_cap_c_(size) _Pre_notnull_ _SA_Pre1_(__cap_c_impl(size))
425 #define _Pre_cap_c_one_ _Pre_notnull_ _SA_Pre1_(__cap_c_one_notref_impl)
426 #define _Pre_cap_for_(param) _Pre_notnull_ _SA_Pre1_(__cap_for_impl(param))
427 #define _Pre_cap_m_(mult,size) _Pre_notnull_ _SA_Pre1_(__mult_impl(mult,size))
428 #define _Pre_cap_x_(size) _Pre_notnull_ _SA_Pre1_(__cap_x_impl(size))
429 #define _Pre_count_(size) _Pre_notnull_ _SA_Pre1_(__count_impl(size)) _SA_Pre1_(__valid_impl)
430 #define _Pre_count_c_(size) _Pre_notnull_ _SA_Pre1_(__count_c_impl(size)) _SA_Pre1_(__valid_impl)
431 #define _Pre_count_x_(size) _Pre_notnull_ _SA_Pre1_(__count_x_impl(size)) _SA_Pre1_(__valid_impl)
432 #define _Pre_defensive_ _SA_annotes0(SAL_pre_defensive)
433 #define _Pre_equal_to_(expr) _In_range_(==, expr)
434 #define _Pre_invalid_ _SA_Deref_pre1_(__notvalid_impl) // note: this is appied to the memory referenced by the parameter! Same as _Deref_pre_invalid_
435 #define _Pre_maybenull_ _SA_Pre1_(__maybenull_impl_notref)
436 #define _Pre_notnull_ _SA_Pre1_(__notnull_impl_notref)
437 #define _Pre_null_ _SA_Pre1_(__null_impl_notref)
438 #define _Pre_opt_bytecap_(size) _SA_Pre1_(__bytecap_impl(size)) _Pre_maybenull_
439 #define _Pre_opt_bytecap_c_(size) _SA_Pre1_(__bytecap_c_impl(size)) _Pre_maybenull_
440 #define _Pre_opt_bytecap_x_(size) _SA_Pre1_(__bytecap_x_impl(size)) _Pre_maybenull_
441 #define _Pre_opt_bytecount_(size) _SA_Pre1_(__bytecount_impl(size)) _Pre_opt_valid_
442 #define _Pre_opt_bytecount_c_(size) _SA_Pre1_(__bytecount_c_impl(size)) _Pre_opt_valid_
443 #define _Pre_opt_bytecount_x_(size) _SA_Pre1_(__bytecount_x_impl(size)) _Pre_opt_valid_
444 #define _Pre_opt_cap_(size) _SA_Pre1_(__cap_impl(size)) _Pre_maybenull_
445 #define _Pre_opt_cap_c_(size) _SA_Pre1_(__cap_c_impl(size)) _Pre_maybenull_
446 #define _Pre_opt_cap_c_one_ _SA_Pre1_(__cap_c_one_notref_impl) _Pre_maybenull_
447 #define _Pre_opt_cap_for_(param) _SA_Pre1_(__cap_for_impl(param)) _Pre_maybenull_
448 #define _Pre_opt_cap_m_(mult,size) _SA_Pre1_(__mult_impl(mult,size)) _Pre_maybenull_
449 #define _Pre_opt_cap_x_(size) _SA_Pre1_(__cap_x_impl(size)) _Pre_maybenull_
450 #define _Pre_opt_count_(size) _SA_Pre1_(__count_impl(size)) _Pre_opt_valid_
451 #define _Pre_opt_count_c_(size) _SA_Pre1_(__count_c_impl(size)) _Pre_opt_valid_
452 #define _Pre_opt_count_x_(size) _SA_Pre1_(__count_x_impl(size)) _Pre_opt_valid_
453 #define _Pre_opt_ptrdiff_cap_(ptr) _SA_Pre1_(__cap_x_impl(__ptrdiff(ptr)))
454 #define _Pre_opt_ptrdiff_count_(ptr) _SA_Pre1_(__count_x_impl(__ptrdiff(ptr))) _SA_Pre1_(__valid_impl)
455 #define _Pre_opt_valid_ _SA_Pre1_(__valid_impl) _Pre_maybenull_
456 #define _Pre_opt_valid_bytecap_(size) _SA_Pre1_(__bytecap_impl(size)) _Pre_opt_valid_
457 #define _Pre_opt_valid_bytecap_c_(size) _SA_Pre1_(__bytecap_c_impl(size)) _Pre_opt_valid_
458 #define _Pre_opt_valid_bytecap_x_(size) _SA_Pre1_(__bytecap_x_impl(size)) _Pre_opt_valid_
459 #define _Pre_opt_valid_cap_(size) _SA_Pre1_(__cap_impl(size)) _Pre_opt_valid_
460 #define _Pre_opt_valid_cap_c_(size) _SA_Pre1_(__cap_c_impl(size)) _Pre_opt_valid_
461 #define _Pre_opt_valid_cap_x_(size) _SA_Pre1_(__cap_x_impl(size)) _Pre_opt_valid_
462 #define _Pre_opt_z_ _SA_Pre1_(__zterm_impl) _Pre_opt_valid_
463 #define _Pre_opt_z_bytecap_(size) _SA_Pre2_(__zterm_impl,__bytecap_impl(size)) _Pre_opt_valid_
464 #define _Pre_opt_z_bytecap_c_(size) _SA_Pre2_(__zterm_impl,__bytecap_c_impl(size)) _Pre_opt_valid_
465 #define _Pre_opt_z_bytecap_x_(size) _SA_Pre2_(__zterm_impl,__bytecap_x_impl(size)) _Pre_opt_valid_
466 #define _Pre_opt_z_cap_(size) _SA_Pre2_(__zterm_impl,__cap_impl(size)) _Pre_opt_valid_
467 #define _Pre_opt_z_cap_c_(size) _SA_Pre2_(__zterm_impl,__cap_c_impl(size)) _Pre_opt_valid_
468 #define _Pre_opt_z_cap_x_(size) _SA_Pre2_(__zterm_impl,__cap_x_impl(size)) _Pre_opt_valid_
469 #define _Pre_ptrdiff_cap_(ptr) _Pre_notnull_ _SA_Pre1_(__cap_x_impl(__ptrdiff(ptr)))
470 #define _Pre_ptrdiff_count_(ptr) _Pre_notnull_ _SA_Pre1_(__count_x_impl(__ptrdiff(ptr))) _SA_Pre1_(__valid_impl)
471 #define _Pre_readable_byte_size_(size) _SA_Pre1_(__bytecount_impl(size)) _SA_Pre1_(__valid_impl)
472 #define _Pre_readable_size_(size) _SA_Pre1_(__count_impl(size)) _SA_Pre1_(__valid_impl)
473 #define _Pre_readonly_ _SA_Pre1_(__readaccess_impl_notref)
474 #define _Pre_satisfies_(cond) _Pre_ _SA_Satisfies_(cond)
475 #define _Pre_valid_ _Pre_notnull_ _SA_Pre1_(__valid_impl)
476 #define _Pre_valid_bytecap_(size) _Pre_notnull_ _SA_Pre1_(__bytecap_impl(size)) _SA_Pre1_(__valid_impl)
477 #define _Pre_valid_bytecap_c_(size) _Pre_notnull_ _SA_Pre1_(__bytecap_c_impl(size)) _SA_Pre1_(__valid_impl)
478 #define _Pre_valid_bytecap_x_(size) _Pre_notnull_ _SA_Pre1_(__bytecap_x_impl(size)) _SA_Pre1_(__valid_impl)
479 #define _Pre_valid_cap_(size) _Pre_notnull_ _SA_Pre1_(__cap_impl(size)) _SA_Pre1_(__valid_impl)
480 #define _Pre_valid_cap_c_(size) _Pre_notnull_ _SA_Pre1_(__cap_c_impl(size)) _SA_Pre1_(__valid_impl)
481 #define _Pre_valid_cap_x_(size) _Pre_notnull_ _SA_Pre1_(__cap_x_impl(size)) _SA_Pre1_(__valid_impl)
482 #define _Pre_writable_byte_size_(size) _SA_Pre1_(__bytecap_impl(size))
483 #define _Pre_writable_size_(size) _SA_Pre1_(__cap_impl(size))
484 #define _Pre_writeonly_ _SA_Pre1_(__writeaccess_impl_notref)
485 #define _Pre_z_ _Pre_notnull_ _SA_Pre1_(__zterm_impl) _SA_Pre1_(__valid_impl)
486 #define _Pre_z_bytecap_(size) _Pre_notnull_ _SA_Pre2_(__zterm_impl,__bytecap_impl(size)) _SA_Pre1_(__valid_impl)
487 #define _Pre_z_bytecap_c_(size) _Pre_notnull_ _SA_Pre2_(__zterm_impl,__bytecap_c_impl(size)) _SA_Pre1_(__valid_impl)
488 #define _Pre_z_bytecap_x_(size) _Pre_notnull_ _SA_Pre2_(__zterm_impl,__bytecap_x_impl(size)) _SA_Pre1_(__valid_impl)
489 #define _Pre_z_cap_(size) _Pre_notnull_ _SA_Pre2_(__zterm_impl,__cap_impl(size)) _SA_Pre1_(__valid_impl)
490 #define _Pre_z_cap_c_(size) _Pre_notnull_ _SA_Pre2_(__zterm_impl,__cap_c_impl(size)) _SA_Pre1_(__valid_impl)
491 #define _Pre_z_cap_x_(size) _Pre_notnull_ _SA_Pre2_(__zterm_impl,__cap_x_impl(size)) _SA_Pre1_(__valid_impl)
492
493 #define _Post_bytecap_(size) _SA_Post1_(__bytecap_impl(size))
494 #define _Post_bytecount_(size) _SA_Post1_(__bytecount_impl(size)) _Post_valid_
495 #define _Post_bytecount_c_(size) _SA_Post1_(__bytecount_c_impl(size)) _Post_valid_
496 #define _Post_bytecount_x_(size) _SA_Post1_(__bytecount_x_impl(size)) _Post_valid_
497 #define _Post_cap_(size) _SA_Post1_(__cap_impl(size))
498 #define _Post_count_(size) _SA_Post1_(__count_impl(size)) _Post_valid_
499 #define _Post_count_c_(size) _SA_Post1_(__count_c_impl(size)) _Post_valid_
500 #define _Post_count_x_(size) _SA_Post1_(__count_x_impl(size)) _Post_valid_
501 #define _Post_defensive_ _SA_annotes0(SAL_post_defensive)
502 #define _Post_equal_to_(expr) _Out_range_(==, expr)
503 #define _Post_invalid_ _SA_Deref_post1_(__notvalid_impl) // note: implicitly dereferenced!
504 #define _Post_maybenull_ _SA_Post1_(__maybenull_impl_notref)
505 #define _Post_maybez_ _SA_Post1_(__maybzterm_impl)
506 #define _Post_notnull_ _SA_Post1_(__notnull_impl_notref)
507 #define _Post_null_ _SA_Post1_(__null_impl_notref)
508 #define _Post_ptr_invalid_ _SA_Post1_(__notvalid_impl)
509 #define _Post_readable_byte_size_(size) _SA_Post1_(__bytecount_impl(size)) _Post_valid_
510 #define _Post_readable_size_(size) _SA_Post1_(__count_impl(size)) _Post_valid_
511 #define _Post_satisfies_(cond) _Post_ _SA_Satisfies_(cond)
512 #define _Post_valid_ _SA_Post1_(__valid_impl)
513 #define _Post_writable_byte_size_(size) _SA_Post1_(__bytecap_impl(size))
514 #define _Post_writable_size_(size) _SA_Post1_(__cap_impl(size))
515 #define _Post_z_ _SA_Post1_(__zterm_impl) _Post_valid_
516 #define _Post_z_bytecount_(size) _SA_Post2_(__zterm_impl,__bytecount_impl(size)) _Post_valid_
517 #define _Post_z_bytecount_c_(size) _SA_Post2_(__zterm_impl,__bytecount_c_impl(size)) _Post_valid_
518 #define _Post_z_bytecount_x_(size) _SA_Post2_(__zterm_impl,__bytecount_x_impl(size)) _Post_valid_
519 #define _Post_z_count_(size) _SA_Post2_(__zterm_impl,__count_impl(size)) _Post_valid_
520 #define _Post_z_count_c_(size) _SA_Post2_(__zterm_impl,__count_c_impl(size)) _Post_valid_
521 #define _Post_z_count_x_(size) _SA_Post2_(__zterm_impl,__count_x_impl(size)) _Post_valid_
522
523 #define _Prepost_bytecount_(size) _Pre_bytecount_(size) _Post_bytecount_(size)
524 #define _Prepost_bytecount_c_(size) _Pre_bytecount_c_(size) _Post_bytecount_c_(size)
525 #define _Prepost_bytecount_x_(size) _Pre_bytecount_x_(size) _Post_bytecount_x_(size)
526 #define _Prepost_count_(size) _Pre_count_(size) _Post_count_(size)
527 #define _Prepost_count_c_(size) _Pre_count_c_(size) _Post_count_c_(size)
528 #define _Prepost_count_x_(size) _Pre_count_x_(size) _Post_count_x_(size)
529 #define _Prepost_opt_bytecount_(size) _Post_bytecount_(size) _Pre_opt_bytecount_(size)
530 #define _Prepost_opt_bytecount_c_(size) _Post_bytecount_c_(size) _Pre_opt_bytecount_c_(size)
531 #define _Prepost_opt_bytecount_x_(size) _Post_bytecount_x_(size) _Pre_opt_bytecount_x_(size)
532 #define _Prepost_opt_count_(size) _Post_count_(size) _Pre_opt_count_(size)
533 #define _Prepost_opt_count_c_(size) _Post_count_c_(size) _Pre_opt_count_c_(size)
534 #define _Prepost_opt_count_x_(size) _Post_count_x_(size) _Pre_opt_count_x_(size)
535 #define _Prepost_opt_valid_ _Post_valid_ _Pre_opt_valid_
536 #define _Prepost_opt_z_ _Post_z_ _Pre_opt_z_
537 #define _Prepost_valid_ _Pre_valid_ _Post_valid_
538 #define _Prepost_z_ _Pre_z_ _Post_z_
539
540 #define _Deref_pre_bytecap_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__bytecap_impl(size))
541 #define _Deref_pre_bytecap_c_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__bytecap_c_impl(size))
542 #define _Deref_pre_bytecap_x_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__bytecap_x_impl(size))
543 #define _Deref_pre_bytecount_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__bytecount_impl(size)) _SA_Pre1_(__valid_impl)
544 #define _Deref_pre_bytecount_c_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__bytecount_c_impl(size)) _SA_Pre1_(__valid_impl)
545 #define _Deref_pre_bytecount_x_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__bytecount_x_impl(size)) _SA_Pre1_(__valid_impl)
546 #define _Deref_pre_cap_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__cap_impl(size))
547 #define _Deref_pre_cap_c_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__cap_c_impl(size))
548 #define _Deref_pre_cap_x_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__cap_x_impl(size))
549 #define _Deref_pre_count_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__count_impl(size)) _SA_Pre1_(__valid_impl)
550 #define _Deref_pre_count_c_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__count_c_impl(size)) _SA_Pre1_(__valid_impl)
551 #define _Deref_pre_count_x_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__count_x_impl(size)) _SA_Pre1_(__valid_impl)
552 #define _Deref_pre_invalid_ _SA_Deref_pre1_(__notvalid_impl)
553 #define _Deref_pre_maybenull_ _SA_Deref_pre1_(__maybenull_impl_notref)
554 #define _Deref_pre_notnull_ _SA_Deref_pre1_(__notnull_impl_notref)
555 #define _Deref_pre_null_ _SA_Deref_pre1_(__null_impl_notref)
556 #define _Deref_pre_opt_bytecap_(size) _SA_Deref_pre1_(__bytecap_impl(size)) _Deref_pre_maybenull_
557 #define _Deref_pre_opt_bytecap_c_(size) _SA_Deref_pre1_(__bytecap_c_impl(size)) _Deref_pre_maybenull_
558 #define _Deref_pre_opt_bytecap_x_(size) _SA_Deref_pre1_(__bytecap_x_impl(size)) _Deref_pre_maybenull_
559 #define _Deref_pre_opt_bytecount_(size) _SA_Deref_pre1_(__bytecount_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
560 #define _Deref_pre_opt_bytecount_c_(size) _SA_Deref_pre1_(__bytecount_c_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
561 #define _Deref_pre_opt_bytecount_x_(size) _SA_Deref_pre1_(__bytecount_x_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
562 #define _Deref_pre_opt_cap_(size) _SA_Deref_pre1_(__cap_impl(size)) _Deref_pre_maybenull_
563 #define _Deref_pre_opt_cap_c_(size) _SA_Deref_pre1_(__cap_c_impl(size)) _Deref_pre_maybenull_
564 #define _Deref_pre_opt_cap_x_(size) _SA_Deref_pre1_(__cap_x_impl(size)) _Deref_pre_maybenull_
565 #define _Deref_pre_opt_count_(size) _SA_Deref_pre1_(__count_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
566 #define _Deref_pre_opt_count_c_(size) _SA_Deref_pre1_(__count_c_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
567 #define _Deref_pre_opt_count_x_(size) _SA_Deref_pre1_(__count_x_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
568 #define _Deref_pre_opt_valid_ _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
569 #define _Deref_pre_opt_valid_bytecap_(size) _SA_Deref_pre1_(__bytecap_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
570 #define _Deref_pre_opt_valid_bytecap_c_(size) _SA_Deref_pre1_(__bytecap_c_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
571 #define _Deref_pre_opt_valid_bytecap_x_(size) _SA_Deref_pre1_(__bytecap_x_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
572 #define _Deref_pre_opt_valid_cap_(size) _SA_Deref_pre1_(__cap_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
573 #define _Deref_pre_opt_valid_cap_c_(size) _SA_Deref_pre1_(__cap_c_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
574 #define _Deref_pre_opt_valid_cap_x_(size) _SA_Deref_pre1_(__cap_x_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
575 #define _Deref_pre_opt_z_ _SA_Deref_pre1_(__zterm_impl) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
576 #define _Deref_pre_opt_z_bytecap_(size) _SA_Deref_pre2_(__zterm_impl,__bytecap_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
577 #define _Deref_pre_opt_z_bytecap_c_(size) _SA_Deref_pre2_(__zterm_impl,__bytecap_c_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
578 #define _Deref_pre_opt_z_bytecap_x_(size) _SA_Deref_pre2_(__zterm_impl,__bytecap_x_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
579 #define _Deref_pre_opt_z_cap_(size) _SA_Deref_pre2_(__zterm_impl,__cap_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
580 #define _Deref_pre_opt_z_cap_c_(size) _SA_Deref_pre2_(__zterm_impl,__cap_c_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
581 #define _Deref_pre_opt_z_cap_x_(size) _SA_Deref_pre2_(__zterm_impl,__cap_x_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
582 #define _Deref_pre_readonly_ _SA_Deref_pre1_(__readaccess_impl_notref)
583 #define _Deref_pre_valid_ _SA_Deref_pre1_(__notnull_impl_notref) _SA_Pre1_(__valid_impl)
584 #define _Deref_pre_valid_bytecap_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__bytecap_impl(size)) _SA_Pre1_(__valid_impl)
585 #define _Deref_pre_valid_bytecap_c_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__bytecap_c_impl(size)) _SA_Pre1_(__valid_impl)
586 #define _Deref_pre_valid_bytecap_x_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__bytecap_x_impl(size)) _SA_Pre1_(__valid_impl)
587 #define _Deref_pre_valid_cap_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__cap_impl(size)) _SA_Pre1_(__valid_impl)
588 #define _Deref_pre_valid_cap_c_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__cap_c_impl(size)) _SA_Pre1_(__valid_impl)
589 #define _Deref_pre_valid_cap_x_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__cap_x_impl(size)) _SA_Pre1_(__valid_impl)
590 #define _Deref_pre_writeonly_ _SA_Deref_pre1_(__writeaccess_impl_notref)
591 #define _Deref_pre_z_ _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__zterm_impl) _SA_Pre1_(__valid_impl)
592 #define _Deref_pre_z_bytecap_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre2_(__zterm_impl,__bytecap_impl(size)) _SA_Pre1_(__valid_impl)
593 #define _Deref_pre_z_bytecap_c_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre2_(__zterm_impl,__bytecap_c_impl(size)) _SA_Pre1_(__valid_impl)
594 #define _Deref_pre_z_bytecap_x_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre2_(__zterm_impl,__bytecap_x_impl(size)) _SA_Pre1_(__valid_impl)
595 #define _Deref_pre_z_cap_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre2_(__zterm_impl,__cap_impl(size)) _SA_Pre1_(__valid_impl)
596 #define _Deref_pre_z_cap_c_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre2_(__zterm_impl,__cap_c_impl(size)) _SA_Pre1_(__valid_impl)
597 #define _Deref_pre_z_cap_x_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre2_(__zterm_impl,__cap_x_impl(size)) _SA_Pre1_(__valid_impl)
598 #define _Deref2_pre_readonly_ _SA_Deref2_pre1_(__readaccess_impl_notref)
599
600 #define _Deref_post_valid_ _Pre_notnull_ _When_(1 == 1, _SA_Deref_pre1_(__maybevalid_impl)) _SA_Deref_post1_(__valid_impl)
601 //#define _Deref_post_valid_ _Deref_post_notnull_ _Post_valid_ // <- ms implementaton
602 #define _Deref_post_bytecap_(size) _Deref_post_notnull_ _SA_Deref_post1_(__bytecap_impl(size))
603 #define _Deref_post_bytecap_c_(sz) _Deref_post_notnull_ _SA_Deref_post1_(__bytecap_c_impl(sz))
604 #define _Deref_post_bytecap_x_(sz) _Deref_post_notnull_ _SA_Deref_post1_(__bytecap_x_impl(sz))
605 #define _Deref_post_bytecount_(sz) _Deref_post_notnull_ _SA_Deref_post1_(__bytecount_impl(sz)) _Post_valid_
606 #define _Deref_post_bytecount_c_(size) _Deref_post_notnull_ _SA_Deref_post1_(__bytecount_c_impl(size)) _Post_valid_
607 #define _Deref_post_bytecount_x_(size) _Deref_post_notnull_ _SA_Deref_post1_(__bytecount_x_impl(size)) _Post_valid_
608 #define _Deref_post_cap_(size) _Deref_post_notnull_ _SA_Deref_post1_(__cap_impl(size))
609 #define _Deref_post_cap_c_(size) _Deref_post_notnull_ _SA_Deref_post1_(__cap_c_impl(size))
610 #define _Deref_post_cap_x_(size) _Deref_post_notnull_ _SA_Deref_post1_(__cap_x_impl(size))
611 #define _Deref_post_count_(size) _Deref_post_notnull_ _SA_Deref_post1_(__count_impl(size)) _Post_valid_
612 #define _Deref_post_count_c_(size) _Deref_post_notnull_ _SA_Deref_post1_(__count_c_impl(size)) _Post_valid_
613 #define _Deref_post_count_x_(size) _Deref_post_notnull_ _SA_Deref_post1_(__count_x_impl(size)) _Post_valid_
614 #define _Deref_post_maybenull_ _SA_Deref_post1_(__maybenull_impl_notref)
615 #define _Deref_post_notnull_ _SA_Deref_post1_(__notnull_impl_notref)
616 #define _Deref_post_null_ _SA_Deref_post1_(__null_impl_notref)
617 #define _Deref_post_opt_bytecap_(size) _SA_Deref_post1_(__bytecap_impl(size)) _Deref_post_maybenull_
618 #define _Deref_post_opt_bytecap_c_(sz) _SA_Deref_post1_(__bytecap_c_impl(sz)) _Deref_post_maybenull_
619 #define _Deref_post_opt_bytecap_x_(sz) _SA_Deref_post1_(__bytecap_x_impl(sz)) _Deref_post_maybenull_
620 #define _Deref_post_opt_bytecount_(sz) _SA_Deref_post1_(__bytecount_impl(sz)) _Post_valid_ _Deref_post_maybenull_
621 #define _Deref_post_opt_bytecount_c_(size) _SA_Deref_post1_(__bytecount_c_impl(size)) _Post_valid_ _Deref_post_maybenull_
622 #define _Deref_post_opt_bytecount_x_(size) _SA_Deref_post1_(__bytecount_x_impl(size)) _Post_valid_ _Deref_post_maybenull_
623 #define _Deref_post_opt_cap_(size) _SA_Deref_post1_(__cap_impl(size)) _Deref_post_maybenull_
624 #define _Deref_post_opt_cap_c_(size) _SA_Deref_post1_(__cap_c_impl(size)) _Deref_post_maybenull_
625 #define _Deref_post_opt_cap_x_(size) _SA_Deref_post1_(__cap_x_impl(size)) _Deref_post_maybenull_
626 #define _Deref_post_opt_count_(size) _SA_Deref_post1_(__count_impl(size)) _Post_valid_ _Deref_post_maybenull_
627 #define _Deref_post_opt_count_c_(size) _SA_Deref_post1_(__count_c_impl(size)) _Post_valid_ _Deref_post_maybenull_
628 #define _Deref_post_opt_count_x_(size) _SA_Deref_post1_(__count_x_impl(size)) _Post_valid_ _Deref_post_maybenull_
629 #define _Deref_post_opt_valid_ _Post_valid_ _Deref_post_maybenull_
630 #define _Deref_post_opt_valid_bytecap_(size) _SA_Deref_post1_(__bytecap_impl(size)) _Post_valid_ _Deref_post_maybenull_
631 #define _Deref_post_opt_valid_bytecap_c_(size) _SA_Deref_post1_(__bytecap_c_impl(size)) _Post_valid_ _Deref_post_maybenull_
632 #define _Deref_post_opt_valid_bytecap_x_(size) _SA_Deref_post1_(__bytecap_x_impl(size)) _Post_valid_ _Deref_post_maybenull_
633 #define _Deref_post_opt_valid_cap_(size) _SA_Deref_post1_(__cap_impl(size)) _Post_valid_ _Deref_post_maybenull_
634 #define _Deref_post_opt_valid_cap_c_(size) _SA_Deref_post1_(__cap_c_impl(size)) _Post_valid_ _Deref_post_maybenull_
635 #define _Deref_post_opt_valid_cap_x_(size) _SA_Deref_post1_(__cap_x_impl(size)) _Post_valid_ _Deref_post_maybenull_
636 #define _Deref_post_opt_z_ _SA_Deref_post1_(__zterm_impl) _Post_valid_ _Deref_post_maybenull_
637 #define _Deref_post_opt_z_bytecap_(size) _SA_Deref_post2_(__zterm_impl,__bytecap_impl(size)) _Post_valid_ _Deref_post_maybenull_
638 #define _Deref_post_opt_z_bytecap_c_(size) _SA_Deref_post2_(__zterm_impl,__bytecap_c_impl(size)) _Post_valid_ _Deref_post_maybenull_
639 #define _Deref_post_opt_z_bytecap_x_(size) _SA_Deref_post2_(__zterm_impl,__bytecap_x_impl(size)) _Post_valid_ _Deref_post_maybenull_
640 #define _Deref_post_opt_z_cap_(size) _SA_Deref_post2_(__zterm_impl,__cap_impl(size)) _Post_valid_ _Deref_post_maybenull_
641 #define _Deref_post_opt_z_cap_c_(size) _SA_Deref_post2_(__zterm_impl,__cap_c_impl(size)) _Post_valid_ _Deref_post_maybenull_
642 #define _Deref_post_opt_z_cap_x_(size) _SA_Deref_post2_(__zterm_impl,__cap_x_impl(size)) _Post_valid_ _Deref_post_maybenull_
643 #define _Deref_post_valid_ _Deref_post_notnull_ _Post_valid_
644 #define _Deref_post_valid_bytecap_(size) _Deref_post_valid_ _SA_Deref_post1_(__bytecap_impl(size))
645 #define _Deref_post_valid_bytecap_c_(size) _Deref_post_valid_ _SA_Deref_post1_(__bytecap_c_impl(size))
646 #define _Deref_post_valid_bytecap_x_(size) _Deref_post_valid_ _SA_Deref_post1_(__bytecap_x_impl(size))
647 #define _Deref_post_valid_cap_(size) _Deref_post_valid_ _SA_Deref_post1_(__cap_impl(size))
648 #define _Deref_post_valid_cap_c_(size) _Deref_post_valid_ _SA_Deref_post1_(__cap_c_impl(size))
649 #define _Deref_post_valid_cap_x_(size) _Deref_post_valid_ _SA_Deref_post1_(__cap_x_impl(size))
650 #define _Deref_post_z_ _Deref_post_valid_ _SA_Deref_post1_(__zterm_impl)
651 #define _Deref_post_z_bytecap_(size) _Deref_post_valid_ _SA_Deref_post2_(__zterm_impl,__bytecap_impl(size))
652 #define _Deref_post_z_bytecap_c_(size) _Deref_post_valid_ _SA_Deref_post2_(__zterm_impl,__bytecap_c_impl(size))
653 #define _Deref_post_z_bytecap_x_(size) _Deref_post_valid_ _SA_Deref_post2_(__zterm_impl,__bytecap_x_impl(size))
654 #define _Deref_post_z_cap_(size) _Deref_post_valid_ _SA_Deref_post2_(__zterm_impl,__cap_impl(size))
655 #define _Deref_post_z_cap_c_(size) _Deref_post_valid_ _SA_Deref_post2_(__zterm_impl,__cap_c_impl(size))
656 #define _Deref_post_z_cap_x_(size) _Deref_post_valid_ _SA_Deref_post2_(__zterm_impl,__cap_x_impl(size))
657
658 #define _Deref_prepost_bytecap_(size) _Deref_pre_bytecap_(size) _Deref_post_bytecap_(size)
659 #define _Deref_prepost_bytecap_x_(size) _Deref_pre_bytecap_x_(size) _Deref_post_bytecap_x_(size)
660 #define _Deref_prepost_bytecount_(size) _Deref_pre_bytecount_(size) _Deref_post_bytecount_(size)
661 #define _Deref_prepost_bytecount_x_(size) _Deref_pre_bytecount_x_(size) _Deref_post_bytecount_x_(size)
662 #define _Deref_prepost_cap_(size) _Deref_pre_cap_(size) _Deref_post_cap_(size)
663 #define _Deref_prepost_cap_x_(size) _Deref_pre_cap_x_(size) _Deref_post_cap_x_(size)
664 #define _Deref_prepost_count_(size) _Deref_pre_count_(size) _Deref_post_count_(size)
665 #define _Deref_prepost_count_x_(size) _Deref_pre_count_x_(size) _Deref_post_count_x_(size)
666 #define _Deref_prepost_opt_bytecap_(size) _Deref_pre_opt_bytecap_(size) _Deref_post_opt_bytecap_(size)
667 #define _Deref_prepost_opt_bytecap_x_(size) _Deref_pre_opt_bytecap_x_(size) _Deref_post_opt_bytecap_x_(size)
668 #define _Deref_prepost_opt_bytecount_(size) _Deref_pre_opt_bytecount_(size) _Deref_post_opt_bytecount_(size)
669 #define _Deref_prepost_opt_bytecount_x_(size) _Deref_pre_opt_bytecount_x_(size) _Deref_post_opt_bytecount_x_(size)
670 #define _Deref_prepost_opt_cap_(size) _Deref_pre_opt_cap_(size) _Deref_post_opt_cap_(size)
671 #define _Deref_prepost_opt_cap_x_(size) _Deref_pre_opt_cap_x_(size) _Deref_post_opt_cap_x_(size)
672 #define _Deref_prepost_opt_count_(size) _Deref_pre_opt_count_(size) _Deref_post_opt_count_(size)
673 #define _Deref_prepost_opt_count_x_(size) _Deref_pre_opt_count_x_(size) _Deref_post_opt_count_x_(size)
674 #define _Deref_prepost_opt_valid_ _Deref_pre_opt_valid_ _Deref_post_opt_valid_
675 #define _Deref_prepost_opt_valid_bytecap_(size) _Deref_pre_opt_valid_bytecap_(size) _Deref_post_opt_valid_bytecap_(size)
676 #define _Deref_prepost_opt_valid_bytecap_x_(size) _Deref_pre_opt_valid_bytecap_x_(size) _Deref_post_opt_valid_bytecap_x_(size)
677 #define _Deref_prepost_opt_valid_cap_(size) _Deref_pre_opt_valid_cap_(size) _Deref_post_opt_valid_cap_(size)
678 #define _Deref_prepost_opt_valid_cap_x_(size) _Deref_pre_opt_valid_cap_x_(size) _Deref_post_opt_valid_cap_x_(size)
679 #define _Deref_prepost_opt_z_ _Deref_pre_opt_z_ _Deref_post_opt_z_
680 #define _Deref_prepost_opt_z_bytecap_(size) _Deref_pre_opt_z_bytecap_(size) _Deref_post_opt_z_bytecap_(size)
681 #define _Deref_prepost_opt_z_cap_(size) _Deref_pre_opt_z_cap_(size) _Deref_post_opt_z_cap_(size)
682 #define _Deref_prepost_valid_ _Deref_pre_valid_ _Deref_post_valid_
683 #define _Deref_prepost_valid_bytecap_(size) _Deref_pre_valid_bytecap_(size) _Deref_post_valid_bytecap_(size)
684 #define _Deref_prepost_valid_bytecap_x_(size) _Deref_pre_valid_bytecap_x_(size) _Deref_post_valid_bytecap_x_(size)
685 #define _Deref_prepost_valid_cap_(size) _Deref_pre_valid_cap_(size) _Deref_post_valid_cap_(size)
686 #define _Deref_prepost_valid_cap_x_(size) _Deref_pre_valid_cap_x_(size) _Deref_post_valid_cap_x_(size)
687 #define _Deref_prepost_z_ _Deref_pre_z_ _Deref_post_z_
688 #define _Deref_prepost_z_bytecap_(size) _Deref_pre_z_bytecap_(size) _Deref_post_z_bytecap_(size)
689 #define _Deref_prepost_z_cap_(size) _Deref_pre_z_cap_(size) _Deref_post_z_cap_(size)
690
691 #define _In_ _Pre_notnull_ _Pre_valid_ _Deref_pre_readonly_
692 #define _In_bytecount_(size) _Pre_bytecount_(size) _Deref_pre_readonly_
693 #define _In_bytecount_c_(size) _Pre_bytecount_c_(size) _Deref_pre_readonly_
694 #define _In_bytecount_x_(size) _Pre_bytecount_x_(size) _Deref_pre_readonly_
695 #define _In_count_(size) _Pre_count_(size) _Deref_pre_readonly_
696 #define _In_count_c_(size) _Pre_count_c_(size) _Deref_pre_readonly_
697 #define _In_count_x_(size) _Pre_count_x_(size) _Deref_pre_readonly_
698 #define _In_defensive_(annotes) _Pre_defensive_ _Group_(annotes)
699 #define _In_opt_ _Deref_pre_readonly_ _Pre_opt_valid_
700 #define _In_opt_bytecount_(size) _Deref_pre_readonly_ _Pre_opt_bytecount_(size)
701 #define _In_opt_bytecount_c_(size) _Deref_pre_readonly_ _Pre_opt_bytecount_c_(size)
702 #define _In_opt_bytecount_x_(size) _Deref_pre_readonly_ _Pre_opt_bytecount_x_(size)
703 #define _In_opt_count_(size) _Deref_pre_readonly_ _Pre_opt_count_(size)
704 #define _In_opt_count_c_(size) _Deref_pre_readonly_ _Pre_opt_count_c_(size)
705 #define _In_opt_count_x_(size) _Deref_pre_readonly_ _Pre_opt_count_x_(size)
706 #define _In_opt_ptrdiff_count_(size) _Deref_pre_readonly_ _Pre_opt_ptrdiff_count_(size)
707 #define _In_opt_z_ _Deref_pre_readonly_ _Pre_opt_z_
708 #define _In_opt_z_bytecount_(size) _Deref_pre_readonly_ _Pre_opt_z_ _Pre_opt_bytecount_(size)
709 #define _In_opt_z_bytecount_c_(size) _Deref_pre_readonly_ _Pre_opt_z_ _Pre_opt_bytecount_c_(size)
710 #define _In_opt_z_count_(size) _Deref_pre_readonly_ _Pre_opt_z_ _Pre_opt_count_(size)
711 #define _In_opt_z_count_c_(size) _Deref_pre_readonly_ _Pre_opt_z_ _Pre_opt_count_c_(size)
712 #define _In_ptrdiff_count_(size) _Deref_pre_readonly_ _Pre_ptrdiff_count_(size)
713 #define _In_reads_(size) _Deref_pre_readonly_ _Pre_count_(size)
714 #define _In_reads_bytes_(size) _Deref_pre_readonly_ _Pre_bytecount_(size)
715 #define _In_reads_bytes_opt_(size) _Deref_pre_readonly_ _Pre_opt_bytecount_(size)
716 #define _In_reads_opt_(size) _Deref_pre_readonly_ _Pre_opt_count_(size)
717 #define _In_reads_opt_z_(size) _Deref_pre_readonly_ _Pre_opt_count_(size) _Pre_opt_z_
718 #define _In_reads_or_z_(size) _When_(_String_length_(_Curr_) < (size), _In_z_) _When_(_String_length_(_Curr_) >= (size), _In_reads_(size))
719 #define _In_reads_to_ptr_(ptr) _Deref_pre_readonly_ _Pre_ptrdiff_count_(ptr)
720 #define _In_reads_to_ptr_opt_(ptr) _Deref_pre_readonly_ _Pre_opt_ptrdiff_count_(ptr)
721 #define _In_reads_to_ptr_opt_z_(ptr) _Deref_pre_readonly_ _Pre_opt_ptrdiff_count_(ptr) _Pre_opt_z_
722 #define _In_reads_to_ptr_z_(ptr) _Deref_pre_readonly_ _Pre_ptrdiff_count_(ptr) _Pre_z_
723 #define _In_reads_z_(size) _Deref_pre_readonly_ _Pre_count_(size) _Pre_z_
724 #define _In_z_ _Deref_pre_readonly_ _Pre_z_
725 #define _In_z_bytecount_(size) _Deref_pre_readonly_ _Pre_z_ _Pre_bytecount_(size)
726 #define _In_z_bytecount_c_(size) _Deref_pre_readonly_ _Pre_z_ _Pre_bytecount_c_(size)
727 #define _In_z_count_(size) _Deref_pre_readonly_ _Pre_z_ _Pre_count_(size)
728 #define _In_z_count_c_(size) _Deref_pre_readonly_ _Pre_z_ _Pre_count_c_(size)
729
730 #define _Out_ _Pre_cap_c_one_ _Post_valid_ /* not in MS hdrs: _Deref_post_maybenull_ */
731 #define _Out_bytecap_(size) _Pre_bytecap_(size) _Post_valid_
732 #define _Out_bytecap_c_(size) _Pre_bytecap_c_(size) _Post_valid_
733 #define _Out_bytecap_post_bytecount_(cap,count) _Pre_bytecap_(cap) _Post_valid_ _Post_bytecount_(count)
734 #define _Out_bytecap_x_(size) _Pre_bytecap_x_(size) _Post_valid_
735 #define _Out_bytecapcount_(capcount) _Pre_bytecap_(capcount) _Post_valid_ _Post_bytecount_(capcount)
736 #define _Out_bytecapcount_x_(capcount) _Pre_bytecap_x_(capcount) _Post_valid_ _Post_bytecount_x_(capcount)
737 #define _Out_cap_(size) _Pre_cap_(size) _Post_valid_
738 #define _Out_cap_c_(size) _Pre_cap_c_(size) _Post_valid_
739 #define _Out_cap_m_(mult,size) _Pre_cap_m_(mult,size) _Post_valid_
740 #define _Out_cap_post_count_(cap,count) _Pre_cap_(cap) _Post_valid_ _Post_count_(count)
741 #define _Out_cap_x_(size) _Pre_cap_x_(size) _Post_valid_
742 #define _Out_capcount_(capcount) _Pre_cap_(capcount) _Post_valid_ _Post_count_(capcount)
743 #define _Out_capcount_x_(capcount) _Pre_cap_x_(capcount) _Post_valid_ _Post_count_x_(capcount)
744 #define _Out_defensive_(annotes) _Post_defensive_ _Group_(annotes)
745 #define _Out_opt_ _Post_valid_ _Pre_opt_cap_c_one_
746 #define _Out_opt_bytecap_(size) _Post_valid_ _Pre_opt_bytecap_(size)
747 #define _Out_opt_bytecap_c_(size) _Post_valid_ _Pre_opt_bytecap_c_(size)
748 #define _Out_opt_bytecap_post_bytecount_(cap,count) _Post_valid_ _Post_bytecount_(count) _Pre_opt_bytecap_(cap)
749 #define _Out_opt_bytecap_x_(size) _Post_valid_ _Pre_opt_bytecap_x_(size)
750 #define _Out_opt_bytecapcount_(capcount) _Post_valid_ _Post_bytecount_(capcount) _Pre_opt_bytecap_(capcount)
751 #define _Out_opt_bytecapcount_x_(capcount) _Post_valid_ _Post_bytecount_x_(capcount) _Pre_opt_bytecap_x_(capcount)
752 #define _Out_opt_cap_(size) _Post_valid_ _Pre_opt_cap_(size)
753 #define _Out_opt_cap_c_(size) _Post_valid_ _Pre_opt_cap_c_(size)
754 #define _Out_opt_cap_m_(mult,size) _Post_valid_ _Pre_opt_cap_m_(mult,size)
755 #define _Out_opt_cap_post_count_(cap,count) _Post_valid_ _Post_count_(count) _Pre_opt_cap_(cap)
756 #define _Out_opt_cap_x_(size) _Post_valid_ _Pre_opt_cap_x_(size)
757 #define _Out_opt_capcount_(capcount) _Post_valid_ _Post_count_(capcount) _Pre_opt_cap_(capcount)
758 #define _Out_opt_capcount_x_(capcount) _Post_valid_ _Post_count_x_(capcount) _Pre_opt_cap_x_(capcount)
759 #define _Out_opt_ptrdiff_cap_(size) _Post_valid_ _Pre_opt_ptrdiff_cap_(size)
760 #define _Out_opt_z_bytecap_(size) _Post_valid_ _Post_z_ _Pre_opt_bytecap_(size)
761 #define _Out_opt_z_bytecap_c_(size) _Post_valid_ _Post_z_ _Pre_opt_bytecap_c_(size)
762 #define _Out_opt_z_bytecap_post_bytecount_(cap,count) _Post_valid_ _Post_z_bytecount_(count) _Pre_opt_bytecap_(cap)
763 #define _Out_opt_z_bytecap_x_(size) _Post_valid_ _Post_z_ _Pre_opt_bytecap_x_(size)
764 #define _Out_opt_z_bytecapcount_(capcount) _Post_valid_ _Post_z_bytecount_(capcount) _Pre_opt_bytecap_(capcount)
765 #define _Out_opt_z_cap_(size) _Post_valid_ _Post_z_ _Pre_opt_cap_(size)
766 #define _Out_opt_z_cap_c_(size) _Post_valid_ _Post_z_ _Pre_opt_cap_c_(size)
767 #define _Out_opt_z_cap_m_(mult,size) _Post_valid_ _Post_z_ _Pre_opt_cap_m_(mult,size)
768 #define _Out_opt_z_cap_post_count_(cap,count) _Post_valid_ _Post_z_count_(count) _Pre_opt_cap_(cap)
769 #define _Out_opt_z_cap_x_(size) _Post_valid_ _Post_z_ _Pre_opt_cap_x_(size)
770 #define _Out_opt_z_capcount_(capcount) _Post_valid_ _Post_z_count_(capcount) _Pre_opt_cap_(capcount)
771 #define _Out_ptrdiff_cap_(size) _Post_valid_ _Pre_ptrdiff_cap_(size)
772 #define _Out_writes_(size) _Post_valid_ _Pre_cap_(size)
773 #define _Out_writes_all_(size) _Out_writes_to_(_Old_(size), _Old_(size))
774 #define _Out_writes_all_opt_(size) _Out_writes_to_opt_(_Old_(size), _Old_(size))
775 #define _Out_writes_bytes_(size) _Post_valid_ _Pre_bytecap_(size)
776 #define _Out_writes_bytes_all_(size) _Out_writes_bytes_to_(_Old_(size), _Old_(size))
777 #define _Out_writes_bytes_all_opt_(size) _Out_writes_bytes_to_opt_(_Old_(size), _Old_(size))
778 #define _Out_writes_bytes_opt_(size) _Post_valid_ _Pre_opt_bytecap_(size)
779 #define _Out_writes_bytes_to_(size,count) _Post_valid_ _Post_bytecount_(count) _Pre_bytecap_(size)
780 #define _Out_writes_bytes_to_opt_(size,count) _Post_valid_ _Post_bytecount_(count) _Pre_opt_bytecap_(size)
781 #define _Out_writes_opt_(size) _Post_valid_ _Pre_opt_cap_(size)
782 #define _Out_writes_opt_z_(size) _Post_valid_ _Post_z_ _Pre_opt_cap_(size)
783 #define _Out_writes_to_(size,count) _Post_valid_ _Post_count_(count) _Pre_cap_(size)
784 #define _Out_writes_to_opt_(size,count) _Post_valid_ _Post_count_(count) _Pre_opt_cap_(size)
785 #define _Out_writes_to_ptr_(ptr) _Post_valid_ _Pre_ptrdiff_cap_(ptr)
786 #define _Out_writes_to_ptr_opt_(ptr) _Post_valid_ _Pre_opt_ptrdiff_cap_(ptr)
787 #define _Out_writes_to_ptr_opt_z_(ptr) _Post_valid_ Post_z_ _Pre_opt_ptrdiff_cap_(ptr)
788 #define _Out_writes_to_ptr_z_(ptr) _Post_valid_ Post_z_ _Pre_ptrdiff_cap_(ptr)
789 #define _Out_writes_z_(size) _Post_valid_ _Post_z_ _Pre_cap_(size)
790 #define _Out_z_bytecap_(size) _Post_valid_ _Post_z_ _Pre_bytecap_(size)
791 #define _Out_z_bytecap_c_(size) _Post_valid_ _Post_z_ _Pre_bytecap_c_(size)
792 #define _Out_z_bytecap_post_bytecount_(cap,count) _Post_valid_ _Post_z_bytecount_(count) _Pre_bytecap_(cap)
793 #define _Out_z_bytecap_x_(size) _Post_valid_ _Post_z_ _Pre_bytecap_x_(size)
794 #define _Out_z_bytecapcount_(capcount) _Post_valid_ _Post_z_bytecount_(capcount) _Pre_bytecap_(capcount)
795 #define _Out_z_cap_(size) _Post_valid_ _Post_z_ _Pre_cap_(size)
796 #define _Out_z_cap_c_(size) _Post_valid_ _Post_z_ _Pre_cap_c_(size)
797 #define _Out_z_cap_m_(mult,size) _Post_valid_ _Post_z_ _Pre_cap_m_(mult,size)
798 #define _Out_z_cap_post_count_(cap,count) _Post_valid_ _Post_z_count_(count) _Pre_cap_(cap)
799 #define _Out_z_cap_x_(size) _Post_valid_ _Post_z_ _Pre_cap_x_(size)
800 #define _Out_z_capcount_(capcount) _Post_valid_ _Post_z_count_(capcount) _Pre_cap_(capcount)
801
802 #define _Inout_ _Prepost_valid_
803 #define _Inout_bytecap_(size) _Post_valid_ _Pre_valid_bytecap_(size)
804 #define _Inout_bytecap_c_(size) _Post_valid_ _Pre_valid_bytecap_c_(size)
805 #define _Inout_bytecap_x_(size) _Post_valid_ _Pre_valid_bytecap_x_(size)
806 #define _Inout_bytecount_(size) _Prepost_bytecount_(size)
807 #define _Inout_bytecount_c_(size) _Prepost_bytecount_c_(size)
808 #define _Inout_bytecount_x_(size) _Prepost_bytecount_x_(size)
809 #define _Inout_cap_(size) _Post_valid_ _Pre_valid_cap_(size)
810 #define _Inout_cap_c_(size) _Post_valid_ _Pre_valid_cap_c_(size)
811 #define _Inout_cap_x_(size) _Post_valid_ _Pre_valid_cap_x_(size)
812 #define _Inout_count_(size) _Prepost_count_(size)
813 #define _Inout_count_c_(size) _Prepost_count_c_(size)
814 #define _Inout_count_x_(size) _Prepost_count_x_(size)
815 #define _Inout_defensive_(annotes) _Pre_defensive_ _Post_defensive_ _Group_(annotes)
816 #define _Inout_opt_ _Prepost_opt_valid_
817 #define _Inout_opt_bytecap_(size) _Post_valid_ _Pre_opt_valid_bytecap_(size)
818 #define _Inout_opt_bytecap_c_(size) _Post_valid_ _Pre_opt_valid_bytecap_c_(size)
819 #define _Inout_opt_bytecap_x_(size) _Post_valid_ _Pre_opt_valid_bytecap_x_(size)
820 #define _Inout_opt_bytecount_(size) _Prepost_opt_bytecount_(size)
821 #define _Inout_opt_bytecount_c_(size) _Prepost_opt_bytecount_c_(size)
822 #define _Inout_opt_bytecount_x_(size) _Prepost_opt_bytecount_x_(size)
823 #define _Inout_opt_cap_(size) _Post_valid_ _Pre_opt_valid_cap_(size)
824 #define _Inout_opt_cap_c_(size) _Post_valid_ _Pre_opt_valid_cap_c_(size)
825 #define _Inout_opt_cap_x_(size) _Post_valid_ _Pre_opt_valid_cap_x_(size)
826 #define _Inout_opt_count_(size) _Prepost_opt_count_(size)
827 #define _Inout_opt_count_c_(size) _Prepost_opt_count_c_(size)
828 #define _Inout_opt_count_x_(size) _Prepost_opt_count_x_(size)
829 #define _Inout_opt_ptrdiff_count_(size) _Pre_opt_ptrdiff_count_(size)
830 #define _Inout_opt_z_ _Prepost_opt_z_
831 #define _Inout_opt_z_bytecap_(size) _Pre_opt_z_bytecap_(size) _Post_z_
832 #define _Inout_opt_z_bytecap_c_(size) _Pre_opt_z_bytecap_c_(size) _Post_z_
833 #define _Inout_opt_z_bytecap_x_(size) _Pre_opt_z_bytecap_x_(size) _Post_z_
834 #define _Inout_opt_z_bytecount_(size) _Prepost_z_ _Prepost_opt_bytecount_(size)
835 #define _Inout_opt_z_bytecount_c_(size) _Prepost_z_ _Prepost_opt_bytecount_c_(size)
836 #define _Inout_opt_z_cap_(size) _Pre_opt_z_cap_(size) _Post_z_
837 #define _Inout_opt_z_cap_c_(size) _Pre_opt_z_cap_c_(size) _Post_z_
838 #define _Inout_opt_z_cap_x_(size) _Pre_opt_z_cap_x_(size) _Post_z_
839 #define _Inout_opt_z_count_(size) _Prepost_z_ _Prepost_opt_count_(size)
840 #define _Inout_opt_z_count_c_(size) _Prepost_z_ _Prepost_opt_count_c_(size)
841 #define _Inout_ptrdiff_count_(size) _Pre_ptrdiff_count_(size)
842 #define _Inout_updates_(size) _Post_valid_ _Pre_cap_(size) _SA_Pre1_(__valid_impl)
843 #define _Inout_updates_all_(size) _Inout_updates_to_(_Old_(size), _Old_(size))
844 #define _Inout_updates_all_opt_(size) _Inout_updates_to_opt_(_Old_(size), _Old_(size))
845 #define _Inout_updates_bytes_(size) _Post_valid_ _Pre_bytecap_(size) _SA_Pre1_(__valid_impl)
846 #define _Inout_updates_bytes_all_(size) _Inout_updates_bytes_to_(_Old_(size), _Old_(size))
847 #define _Inout_updates_bytes_all_opt_(size) _Inout_updates_bytes_to_opt_(_Old_(size), _Old_(size))
848 #define _Inout_updates_bytes_opt_(size) _Post_valid_ _SA_Pre1_(__valid_impl) _Pre_opt_bytecap_(size)
849 #define _Inout_updates_bytes_to_(size,count) _Out_writes_bytes_to_(size,count) _SA_Pre1_(__valid_impl) _SA_Pre1_(__bytecount_impl(count))
850 #define _Inout_updates_bytes_to_opt_(size,count) _SA_Pre1_(__valid_impl) _SA_Pre1_(__bytecount_impl(count)) _Out_writes_bytes_to_opt_(size,count)
851 #define _Inout_updates_opt_(size) _Post_valid_ _SA_Pre1_(__valid_impl) _Pre_opt_cap_(size)
852 #define _Inout_updates_opt_z_(size) _Post_valid_ _SA_Post1_(__zterm_impl) _SA_Pre1_(__valid_impl) _SA_Pre1_(__zterm_impl) _Pre_opt_cap_(size)
853 #define _Inout_updates_to_(size,count) _Out_writes_to_(size,count) _SA_Pre1_(__valid_impl) _SA_Pre1_(__count_impl(count))
854 #define _Inout_updates_to_opt_(size,count) _SA_Pre1_(__valid_impl) _SA_Pre1_(__count_impl(count)) _Out_writes_to_opt_(size,count)
855 #define _Inout_updates_z_(size) _Pre_cap_(size) _SA_Pre1_(__valid_impl) _Post_valid_ _SA_Pre1_(__zterm_impl) _SA_Post1_(__zterm_impl)
856 #define _Inout_z_ _Prepost_z_
857 #define _Inout_z_bytecap_(size) _Pre_z_bytecap_(size) _Post_z_
858 #define _Inout_z_bytecap_c_(size) _Pre_z_bytecap_c_(size) _Post_z_
859 #define _Inout_z_bytecap_x_(size) _Pre_z_bytecap_x_(size) _Post_z_
860 #define _Inout_z_bytecount_(size) _Prepost_z_ _Prepost_bytecount_(size)
861 #define _Inout_z_bytecount_c_(size) _Prepost_z_ _Prepost_bytecount_c_(size)
862 #define _Inout_z_cap_(size) _Pre_z_cap_(size) _Post_z_
863 #define _Inout_z_cap_c_(size) _Pre_z_cap_c_(size) _Post_z_
864 #define _Inout_z_cap_x_(size) _Pre_z_cap_x_(size) _Post_z_
865 #define _Inout_z_count_(size) _Prepost_z_ _Prepost_count_(size)
866 #define _Inout_z_count_c_(size) _Prepost_z_ _Prepost_count_c_(size)
867
868 #define _Deref_opt_out_ _Out_opt_ _Deref_post_valid_
869 #define _Deref_opt_out_opt_ _Out_opt_ _Deref_post_opt_valid_
870 #define _Deref_opt_out_opt_z_ _Out_opt_ _Deref_post_opt_z_
871 #define _Deref_opt_out_z_ _Out_opt_ _Deref_post_z_
872 #define _Deref_out_ _Out_ _Deref_post_valid_
873 #define _Deref_out_opt_ _Out_ _Deref_post_opt_valid_
874 #define _Deref_out_opt_z_ _Out_ _Deref_post_opt_z_
875 #define _Deref_out_z_ _Out_ _Deref_post_z_
876 #define _Deref_out_z_bytecap_c_(sz) _Deref_pre_bytecap_c_(sz) _Deref_post_z_
877 #define _Deref_out_z_cap_c_(size) _Deref_pre_cap_c_(size) _Deref_post_z_
878 #define _Deref_inout_bound_ _Deref_in_bound_ _Deref_out_bound_
879 #define _Deref_inout_z_ _Deref_prepost_z_
880 #define _Deref_inout_z_bytecap_c_(size) _Deref_pre_z_bytecap_c_(size) _Deref_post_z_
881 #define _Deref_inout_z_cap_c_(size) _Deref_pre_z_cap_c_(size) _Deref_post_z_
882
883 #define _Outptr_ _Out_ _SA_Deref_post2_(__notnull_impl_notref, __count_impl(1)) _Post_valid_
884 #define _Outptr_opt_ _Out_opt_ _SA_Deref_post2_(__notnull_impl_notref, __count_impl(1)) //_Post_valid_
885 #define _Outptr_opt_result_buffer_(size) _Out_opt_ _SA_Deref_post2_(__notnull_impl_notref, __cap_impl(size)) //_Post_valid_
886 #define _Outptr_opt_result_buffer_all_(size) _Out_opt_ _SA_Deref_post2_(__notnull_impl_notref, __count_impl(size)) //_Post_valid_
887 #define _Outptr_opt_result_buffer_all_maybenull_(size) _Out_opt_ _SA_Deref_post2_(__maybenull_impl_notref, __count_impl(size)) //_Post_valid_
888 #define _Outptr_opt_result_buffer_maybenull_(size) _Out_opt_ _SA_Deref_post2_(__maybenull_impl_notref, __cap_impl(size)) //_Post_valid_
889 #define _Outptr_opt_result_buffer_to_(size, count) _Out_opt_ _SA_Deref_post3_(__notnull_impl_notref, __cap_impl(size), __count_impl(count)) //_Post_valid_
890 #define _Outptr_opt_result_buffer_to_maybenull_(size, count) _Out_opt_ _SA_Deref_post3_(__maybenull_impl_notref, __cap_impl(size), __count_impl(count)) //_Post_valid_
891 #define _Outptr_opt_result_bytebuffer_(size) _Out_opt_ _SA_Deref_post2_(__notnull_impl_notref, __bytecap_impl(size)) //_Post_valid_
892 #define _Outptr_opt_result_bytebuffer_all_(size) _Out_opt_ _SA_Deref_post2_(__notnull_impl_notref, __bytecount_impl(size)) //_Post_valid_
893 #define _Outptr_opt_result_bytebuffer_all_maybenull_(size) _Out_opt_ _SA_Deref_post2_(__maybenull_impl_notref, __bytecount_impl(size)) //_Post_valid_
894 #define _Outptr_opt_result_bytebuffer_maybenull_(size) _Out_opt_ _SA_Deref_post2_(__maybenull_impl_notref, __bytecap_impl(size)) //_Post_valid_
895 #define _Outptr_opt_result_bytebuffer_to_(size, count) _Out_opt_ _SA_Deref_post3_(__notnull_impl_notref, __bytecap_impl(size), __bytecount_impl(count)) //_Post_valid_
896 #define _Outptr_opt_result_bytebuffer_to_maybenull_(size, count) _Out_opt_ _SA_Deref_post3_(__maybenull_impl_notref, __bytecap_impl(size), __bytecount_impl(count)) //_Post_valid_
897 #define _Outptr_opt_result_maybenull_ _Out_opt_ _SA_Deref_post2_(__maybenull_impl_notref, __count_impl(1)) //_Post_valid_
898 #define _Outptr_opt_result_maybenull_z_ _Out_opt_ _Deref_post_opt_z_
899 #define _Outptr_opt_result_nullonfailure_ _Outptr_opt_ _On_failure_(_Deref_post_null_)
900 #define _Outptr_opt_result_z_ _Out_opt_ _Deref_post_z_
901 #define _Outptr_result_buffer_(size) _Out_ _SA_Deref_post2_(__notnull_impl_notref, __cap_impl(size)) _Post_valid_
902 #define _Outptr_result_buffer_all_(size) _Out_ _SA_Deref_post2_(__notnull_impl_notref, __count_impl(size)) _Post_valid_
903 #define _Outptr_result_buffer_all_maybenull_(size) _Out_ _SA_Deref_post2_(__maybenull_impl_notref, __count_impl(size)) _Post_valid_
904 #define _Outptr_result_buffer_maybenull_(size) _Out_ _SA_Deref_post2_(__maybenull_impl_notref, __cap_impl(size)) _Post_valid_
905 #define _Outptr_result_buffer_to_(size, count) _Out_ _SA_Deref_post3_(__notnull_impl_notref, __cap_impl(size), __count_impl(count)) _Post_valid_
906 #define _Outptr_result_buffer_to_maybenull_(size, count) _Out_ _SA_Deref_post3_(__maybenull_impl_notref, __cap_impl(size), __count_impl(count)) _Post_valid_
907 #define _Outptr_result_bytebuffer_(size) _Out_ _SA_Deref_post2_(__notnull_impl_notref, __bytecap_impl(size)) _Post_valid_
908 #define _Outptr_result_bytebuffer_all_(size) _Out_ _SA_Deref_post2_(__notnull_impl_notref, __bytecount_impl(size)) _Post_valid_
909 #define _Outptr_result_bytebuffer_all_maybenull_(size) _Out_ _SA_Deref_post2_(__maybenull_impl_notref, __bytecount_impl(size)) _Post_valid_
910 #define _Outptr_result_bytebuffer_maybenull_(size) _Out_ _SA_Deref_post2_(__maybenull_impl_notref, __bytecap_impl(size)) _Post_valid_
911 #define _Outptr_result_bytebuffer_to_(size, count) _Out_ _SA_Deref_post3_(__notnull_impl_notref, __bytecap_impl(size), __bytecount_impl(count)) _Post_valid_
912 #define _Outptr_result_bytebuffer_to_maybenull_(size, count) _Out_ _SA_Deref_post3_(__maybenull_impl_notref, __bytecap_impl(size), __bytecount_impl(count)) _Post_valid_
913 #define _Outptr_result_maybenull_ _Out_ _SA_Deref_post2_(__maybenull_impl_notref, __count_impl(1)) _Post_valid_
914 #define _Outptr_result_maybenull_z_ _Out_ _Deref_post_opt_z_
915 #define _Outptr_result_nullonfailure_ _Outptr_ _On_failure_(_Deref_post_null_)
916 #define _Outptr_result_z_ _Out_ _Deref_post_z_
917
918 #define _COM_Outptr_ _Outptr_ _On_failure_(_Deref_post_null_)
919 #define _COM_Outptr_opt_ _Outptr_opt_ _On_failure_(_Deref_post_null_)
920 #define _COM_Outptr_opt_result_maybenull_ _Outptr_opt_result_maybenull_ _On_failure_(_Deref_post_null_)
921 #define _COM_Outptr_result_maybenull_ _Outptr_result_maybenull_ _On_failure_(_Deref_post_null_)
922
923 #define _Outref_ _Group_(_Out_)
924 #define _Outref_result_buffer_(size) _SA_Post1_(__cap_impl(size)) _Post_valid_
925 #define _Outref_result_buffer_all_(size) _SA_Post1_(__count_impl(size))
926 #define _Outref_result_buffer_all_maybenull_(size) _SA_Post2_(__count_impl(size), __maybenull_impl)
927 #define _Outref_result_buffer_maybenull_(size) _SA_Post2_(__cap_impl(size), __maybenull_impl) _Post_valid_
928 #define _Outref_result_buffer_to_(size, count) _SA_Post2_(__cap_impl(size), __count_impl(count))
929 #define _Outref_result_buffer_to_maybenull_(size, count) _SA_Post3_(__cap_impl(size), __count_impl(count), __maybenull_impl)
930 #define _Outref_result_bytebuffer_(size) _SA_Post1_(__bytecap_impl(size)) _Post_valid_
931 #define _Outref_result_bytebuffer_all_(size) _SA_Post1_(__bytecount_impl(size))
932 #define _Outref_result_bytebuffer_all_maybenull_(size) _SA_Post2_(__bytecount_impl(size), __maybenull_impl)
933 #define _Outref_result_bytebuffer_maybenull_(size) _SA_Post2_(__bytecap_impl(size), __maybenull_impl) _Post_valid_
934 #define _Outref_result_bytebuffer_to_(size, count) _SA_Post2_(__bytecap_impl(size), __bytecount_impl(count))
935 #define _Outref_result_bytebuffer_to_maybenull_(size, count) _SA_Post3_(__bytecap_impl(size), __bytecount_impl(count), __maybenull_impl)
936 #define _Outref_result_maybenull_ _Group_(_Pre_cap_c_one_ _Post_valid_ __maybenull_impl)
937 #define _Outref_result_nullonfailure_ _Group_(_Out_) _On_failure_(_Post_null_)
938
939 #define _Reserved_ _SA_Pre1_(__null_impl)
940 #define _Result_nullonfailure_ _On_failure_(_Notref_ _SA_Deref_ _Post_null_)
941 #define _Result_zeroonfailure_ _On_failure_(_Notref_ _SA_Deref_ _Out_range_(==, 0))
942
943 #define _Ret_ _Ret_valid_
944 #define _Ret_bytecap_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__bytecap_impl(size))
945 #define _Ret_bytecap_c_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__bytecap_c_impl(size))
946 #define _Ret_bytecap_x_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__bytecap_x_impl(size))
947 #define _Ret_bytecount_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__bytecount_impl(size)) _SA_Ret1_(__valid_impl)
948 #define _Ret_bytecount_c_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__bytecount_c_impl(size)) _SA_Ret1_(__valid_impl)
949 #define _Ret_bytecount_x_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__bytecount_x_impl(size)) _SA_Ret1_(__valid_impl)
950 #define _Ret_cap_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__cap_impl(size))
951 #define _Ret_cap_c_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__cap_c_impl(size))
952 #define _Ret_cap_x_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__cap_x_impl(size))
953 #define _Ret_count_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__count_impl(size)) _SA_Ret1_(__valid_impl)
954 #define _Ret_count_c_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__count_c_impl(size)) _SA_Ret1_(__valid_impl)
955 #define _Ret_count_x_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__count_x_impl(size)) _SA_Ret1_(__valid_impl)
956 #define _Ret_maybenull_ _SA_Ret1_(__maybenull_impl)
957 #define _Ret_maybenull_z_ _SA_Ret2_(__maybenull_impl,__zterm_impl) _SA_Ret1_(__valid_impl)
958 #define _Ret_notnull_ _SA_Ret1_(__notnull_impl)
959 #define _Ret_null_ _SA_Ret1_(__null_impl)
960 #define _Ret_opt_ _Ret_opt_valid_
961 #define _Ret_opt_bytecap_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__bytecap_impl(size))
962 #define _Ret_opt_bytecap_c_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__bytecap_c_impl(size))
963 #define _Ret_opt_bytecap_x_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__bytecap_x_impl(size))
964 #define _Ret_opt_bytecount_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__bytecount_impl(size)) _SA_Ret1_(__valid_impl)
965 #define _Ret_opt_bytecount_c_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__bytecount_c_impl(size)) _SA_Ret1_(__valid_impl)
966 #define _Ret_opt_bytecount_x_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__bytecount_x_impl(size)) _SA_Ret1_(__valid_impl)
967 #define _Ret_opt_cap_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__cap_impl(size))
968 #define _Ret_opt_cap_c_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__cap_c_impl(size))
969 #define _Ret_opt_cap_x_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__cap_x_impl(size))
970 #define _Ret_opt_count_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__count_impl(size)) _SA_Ret1_(__valid_impl)
971 #define _Ret_opt_count_c_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__count_c_impl(size)) _SA_Ret1_(__valid_impl)
972 #define _Ret_opt_count_x_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__count_x_impl(size)) _SA_Ret1_(__valid_impl)
973 #define _Ret_opt_valid_ _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__valid_impl)
974 #define _Ret_opt_z_ _SA_Ret2_(__maybenull_impl,__zterm_impl) _SA_Ret1_(__valid_impl)
975 #define _Ret_opt_z_bytecap_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret2_(__zterm_impl,__bytecap_impl(size)) _SA_Ret1_(__valid_impl)
976 #define _Ret_opt_z_bytecount_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret2_(__zterm_impl,__bytecount_impl(size)) _SA_Ret1_(__valid_impl)
977 #define _Ret_opt_z_cap_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret2_(__zterm_impl,__cap_impl(size)) _SA_Ret1_(__valid_impl)
978 #define _Ret_opt_z_count_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret2_(__zterm_impl,__count_impl(size)) _SA_Ret1_(__valid_impl)
979 #define _Ret_valid_ _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__valid_impl)
980 #define _Ret_writes_(size) _SA_Ret2_(__notnull_impl, __count_impl(size)) _SA_Ret1_(__valid_impl)
981 #define _Ret_writes_bytes_(size) _SA_Ret2_(__notnull_impl, __bytecount_impl(size)) _SA_Ret1_(__valid_impl)
982 #define _Ret_writes_bytes_maybenull_(size) _SA_Ret2_(__maybenull_impl,__bytecount_impl(size)) _SA_Ret1_(__valid_impl)
983 #define _Ret_writes_bytes_to_(size,count) _SA_Ret3_(__notnull_impl, __bytecap_impl(size), __bytecount_impl(count)) _SA_Ret1_(__valid_impl)
984 #define _Ret_writes_bytes_to_maybenull_(size,count) _SA_Ret3_(__maybenull_impl, __bytecap_impl(size), __bytecount_impl(count)) _SA_Ret1_(__valid_impl)
985 #define _Ret_writes_maybenull_(size) _SA_Ret2_(__maybenull_impl,__count_impl(size)) _SA_Ret1_(__valid_impl)
986 #define _Ret_writes_maybenull_z_(size) _SA_Ret3_(__maybenull_impl,__count_impl(size),__zterm_impl) _SA_Ret1_(__valid_impl)
987 #define _Ret_writes_to_(size,count) _SA_Ret3_(__notnull_impl, __cap_impl(size), __count_impl(count)) _SA_Ret1_(__valid_impl)
988 #define _Ret_writes_to_maybenull_(size,count) _SA_Ret3_(__maybenull_impl, __cap_impl(size), __count_impl(count)) _SA_Ret1_(__valid_impl)
989 #define _Ret_writes_z_(size) _SA_Ret3_(__notnull_impl, __count_impl(size), __zterm_impl) _SA_Ret1_(__valid_impl)
990 #define _Ret_z_ _SA_Ret2_(__notnull_impl, __zterm_impl) _SA_Ret1_(__valid_impl)
991 #define _Ret_z_bytecap_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret2_(__zterm_impl,__bytecap_impl(size)) _SA_Ret1_(__valid_impl)
992 #define _Ret_z_bytecount_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret2_(__zterm_impl,__bytecount_impl(size)) _SA_Ret1_(__valid_impl)
993 #define _Ret_z_cap_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret2_(__zterm_impl,__cap_impl(size)) _SA_Ret1_(__valid_impl)
994 #define _Ret_z_count_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret2_(__zterm_impl,__count_impl(size)) _SA_Ret1_(__valid_impl)
995
996 #define _Deref_ret_opt_z_ _SA_Deref_ret1_(__maybenull_impl_notref) _SA_Ret1_(__zterm_impl)
997 #define _Deref_ret_z_ _SA_Deref_ret1_(__notnull_impl_notref) _SA_Deref_ret1_(__zterm_impl)
998
999 #else /* _USE_ATTRIBUTES_FOR_SAL || _USE_DECLSPECS_FOR_SAL */
1000
1001 /* Dummys */
1002 #define __inner_exceptthat
1003 #define __inner_typefix(ctype)
1004 #define _Always_(annos)
1005 #define _Analysis_noreturn_
1006 #define _At_(target, annos)
1007 #define _At_buffer_(target, iter, bound, annos)
1008 #define _Check_return_
1009 #define _COM_Outptr_
1010 #define _COM_Outptr_opt_
1011 #define _COM_Outptr_opt_result_maybenull_
1012 #define _COM_Outptr_result_maybenull_
1013 #define _Const_
1014 #define _Deref_in_bound_
1015 #define _Deref_in_range_(lb,ub)
1016 #define _Deref_inout_bound_
1017 #define _Deref_inout_z_
1018 #define _Deref_inout_z_bytecap_c_(size)
1019 #define _Deref_inout_z_cap_c_(size)
1020 #define _Deref_opt_out_
1021 #define _Deref_opt_out_opt_
1022 #define _Deref_opt_out_opt_z_
1023 #define _Deref_opt_out_z_
1024 #define _Deref_out_
1025 #define _Deref_out_bound_
1026 #define _Deref_out_opt_
1027 #define _Deref_out_opt_z_
1028 #define _Deref_out_range_(lb,ub)
1029 #define _Deref_out_z_
1030 #define _Deref_out_z_bytecap_c_(size)
1031 #define _Deref_out_z_cap_c_(size)
1032 #define _Deref_post_bytecap_(size)
1033 #define _Deref_post_bytecap_c_(size)
1034 #define _Deref_post_bytecap_x_(size)
1035 #define _Deref_post_bytecount_(size)
1036 #define _Deref_post_bytecount_c_(size)
1037 #define _Deref_post_bytecount_x_(size)
1038 #define _Deref_post_cap_(size)
1039 #define _Deref_post_cap_c_(size)
1040 #define _Deref_post_cap_x_(size)
1041 #define _Deref_post_count_(size)
1042 #define _Deref_post_count_c_(size)
1043 #define _Deref_post_count_x_(size)
1044 #define _Deref_post_maybenull_
1045 #define _Deref_post_notnull_
1046 #define _Deref_post_null_
1047 #define _Deref_post_opt_bytecap_(size)
1048 #define _Deref_post_opt_bytecap_c_(size)
1049 #define _Deref_post_opt_bytecap_x_(size)
1050 #define _Deref_post_opt_bytecount_(size)
1051 #define _Deref_post_opt_bytecount_c_(size)
1052 #define _Deref_post_opt_bytecount_x_(size)
1053 #define _Deref_post_opt_cap_(size)
1054 #define _Deref_post_opt_cap_c_(size)
1055 #define _Deref_post_opt_cap_x_(size)
1056 #define _Deref_post_opt_count_(size)
1057 #define _Deref_post_opt_count_c_(size)
1058 #define _Deref_post_opt_count_x_(size)
1059 #define _Deref_post_opt_valid_
1060 #define _Deref_post_opt_valid_bytecap_(size)
1061 #define _Deref_post_opt_valid_bytecap_c_(size)
1062 #define _Deref_post_opt_valid_bytecap_x_(size)
1063 #define _Deref_post_opt_valid_cap_(size)
1064 #define _Deref_post_opt_valid_cap_c_(size)
1065 #define _Deref_post_opt_valid_cap_x_(size)
1066 #define _Deref_post_opt_z_
1067 #define _Deref_post_opt_z_bytecap_(size)
1068 #define _Deref_post_opt_z_bytecap_c_(size)
1069 #define _Deref_post_opt_z_bytecap_x_(size)
1070 #define _Deref_post_opt_z_cap_(size)
1071 #define _Deref_post_opt_z_cap_c_(size)
1072 #define _Deref_post_opt_z_cap_x_(size)
1073 #define _Deref_post_valid_
1074 #define _Deref_post_valid_bytecap_(size)
1075 #define _Deref_post_valid_bytecap_c_(size)
1076 #define _Deref_post_valid_bytecap_x_(size)
1077 #define _Deref_post_valid_cap_(size)
1078 #define _Deref_post_valid_cap_c_(size)
1079 #define _Deref_post_valid_cap_x_(size)
1080 #define _Deref_post_z_
1081 #define _Deref_post_z_bytecap_(size)
1082 #define _Deref_post_z_bytecap_c_(size)
1083 #define _Deref_post_z_bytecap_x_(size)
1084 #define _Deref_post_z_cap_(size)
1085 #define _Deref_post_z_cap_c_(size)
1086 #define _Deref_post_z_cap_x_(size)
1087 #define _Deref_pre_bytecap_(size)
1088 #define _Deref_pre_bytecap_c_(size)
1089 #define _Deref_pre_bytecap_x_(size)
1090 #define _Deref_pre_bytecount_(size)
1091 #define _Deref_pre_bytecount_c_(size)
1092 #define _Deref_pre_bytecount_x_(size)
1093 #define _Deref_pre_cap_(size)
1094 #define _Deref_pre_cap_c_(size)
1095 #define _Deref_pre_cap_x_(size)
1096 #define _Deref_pre_count_(size)
1097 #define _Deref_pre_count_c_(size)
1098 #define _Deref_pre_count_x_(size)
1099 #define _Deref_pre_invalid_
1100 #define _Deref_pre_maybenull_
1101 #define _Deref_pre_notnull_
1102 #define _Deref_pre_null_
1103 #define _Deref_pre_opt_bytecap_(size)
1104 #define _Deref_pre_opt_bytecap_c_(size)
1105 #define _Deref_pre_opt_bytecap_x_(size)
1106 #define _Deref_pre_opt_bytecount_(size)
1107 #define _Deref_pre_opt_bytecount_c_(size)
1108 #define _Deref_pre_opt_bytecount_x_(size)
1109 #define _Deref_pre_opt_cap_(size)
1110 #define _Deref_pre_opt_cap_c_(size)
1111 #define _Deref_pre_opt_cap_x_(size)
1112 #define _Deref_pre_opt_count_(size)
1113 #define _Deref_pre_opt_count_c_(size)
1114 #define _Deref_pre_opt_count_x_(size)
1115 #define _Deref_pre_opt_valid_
1116 #define _Deref_pre_opt_valid_bytecap_(size)
1117 #define _Deref_pre_opt_valid_bytecap_c_(size)
1118 #define _Deref_pre_opt_valid_bytecap_x_(size)
1119 #define _Deref_pre_opt_valid_cap_(size)
1120 #define _Deref_pre_opt_valid_cap_c_(size)
1121 #define _Deref_pre_opt_valid_cap_x_(size)
1122 #define _Deref_pre_opt_z_
1123 #define _Deref_pre_opt_z_bytecap_(size)
1124 #define _Deref_pre_opt_z_bytecap_c_(size)
1125 #define _Deref_pre_opt_z_bytecap_x_(size)
1126 #define _Deref_pre_opt_z_cap_(size)
1127 #define _Deref_pre_opt_z_cap_c_(size)
1128 #define _Deref_pre_opt_z_cap_x_(size)
1129 #define _Deref_pre_readonly_
1130 #define _Deref_pre_valid_
1131 #define _Deref_pre_valid_bytecap_(size)
1132 #define _Deref_pre_valid_bytecap_c_(size)
1133 #define _Deref_pre_valid_bytecap_x_(size)
1134 #define _Deref_pre_valid_cap_(size)
1135 #define _Deref_pre_valid_cap_c_(size)
1136 #define _Deref_pre_valid_cap_x_(size)
1137 #define _Deref_pre_writeonly_
1138 #define _Deref_pre_z_
1139 #define _Deref_pre_z_bytecap_(size)
1140 #define _Deref_pre_z_bytecap_c_(size)
1141 #define _Deref_pre_z_bytecap_x_(size)
1142 #define _Deref_pre_z_cap_(size)
1143 #define _Deref_pre_z_cap_c_(size)
1144 #define _Deref_pre_z_cap_x_(size)
1145 #define _Deref_prepost_bytecap_(size)
1146 #define _Deref_prepost_bytecap_x_(size)
1147 #define _Deref_prepost_bytecount_(size)
1148 #define _Deref_prepost_bytecount_x_(size)
1149 #define _Deref_prepost_cap_(size)
1150 #define _Deref_prepost_cap_x_(size)
1151 #define _Deref_prepost_count_(size)
1152 #define _Deref_prepost_count_x_(size)
1153 #define _Deref_prepost_opt_bytecap_(size)
1154 #define _Deref_prepost_opt_bytecap_x_(size)
1155 #define _Deref_prepost_opt_bytecount_(size)
1156 #define _Deref_prepost_opt_bytecount_x_(size)
1157 #define _Deref_prepost_opt_cap_(size)
1158 #define _Deref_prepost_opt_cap_x_(size)
1159 #define _Deref_prepost_opt_count_(size)
1160 #define _Deref_prepost_opt_count_x_(size)
1161 #define _Deref_prepost_opt_valid_
1162 #define _Deref_prepost_opt_valid_bytecap_(size)
1163 #define _Deref_prepost_opt_valid_bytecap_x_(size)
1164 #define _Deref_prepost_opt_valid_cap_(size)
1165 #define _Deref_prepost_opt_valid_cap_x_(size)
1166 #define _Deref_prepost_opt_z_
1167 #define _Deref_prepost_opt_z_bytecap_(size)
1168 #define _Deref_prepost_opt_z_cap_(size)
1169 #define _Deref_prepost_valid_
1170 #define _Deref_prepost_valid_bytecap_(size)
1171 #define _Deref_prepost_valid_bytecap_x_(size)
1172 #define _Deref_prepost_valid_cap_(size)
1173 #define _Deref_prepost_valid_cap_x_(size)
1174 #define _Deref_prepost_z_
1175 #define _Deref_prepost_z_bytecap_(size)
1176 #define _Deref_prepost_z_cap_(size)
1177 #define _Deref_ret_bound_
1178 #define _Deref_ret_opt_z_
1179 #define _Deref_ret_range_(lb,ub)
1180 #define _Deref_ret_z_
1181 #define _Deref2_pre_readonly_
1182 #define _Field_range_(min,max)
1183 #define _Field_size_(size)
1184 #define _Field_size_bytes_(size)
1185 #define _Field_size_bytes_full_(size)
1186 #define _Field_size_bytes_full_opt_(size)
1187 #define _Field_size_bytes_opt_(size)
1188 #define _Field_size_bytes_part_(size, count)
1189 #define _Field_size_bytes_part_opt_(size, count)
1190 #define _Field_size_full_(size)
1191 #define _Field_size_full_opt_(size)
1192 #define _Field_size_opt_(size)
1193 #define _Field_size_part_(size, count)
1194 #define _Field_size_part_opt_(size, count)
1195 #define _Field_z_
1196 #define _Function_class_(x)
1197 #define _Group_(annos)
1198 #define _In_
1199 #define _In_bound_
1200 #define _In_bytecount_(size)
1201 #define _In_bytecount_c_(size)
1202 #define _In_bytecount_x_(size)
1203 #define _In_count_(size)
1204 #define _In_count_c_(size)
1205 #define _In_count_x_(size)
1206 #define _In_defensive_(annotes)
1207 #define _In_opt_
1208 #define _In_opt_bytecount_(size)
1209 #define _In_opt_bytecount_c_(size)
1210 #define _In_opt_bytecount_x_(size)
1211 #define _In_opt_count_(size)
1212 #define _In_opt_count_c_(size)
1213 #define _In_opt_count_x_(size)
1214 #define _In_opt_ptrdiff_count_(size)
1215 #define _In_opt_z_
1216 #define _In_opt_z_bytecount_(size)
1217 #define _In_opt_z_bytecount_c_(size)
1218 #define _In_opt_z_count_(size)
1219 #define _In_opt_z_count_c_(size)
1220 #define _In_ptrdiff_count_(size)
1221 #define _In_range_(lb,ub)
1222 #define _In_reads_(size)
1223 #define _In_reads_bytes_(size)
1224 #define _In_reads_bytes_opt_(size)
1225 #define _In_reads_opt_(size)
1226 #define _In_reads_opt_z_(size)
1227 #define _In_reads_or_z_(size)
1228 #define _In_reads_to_ptr_(ptr)
1229 #define _In_reads_to_ptr_opt_(ptr)
1230 #define _In_reads_to_ptr_opt_z_(ptr)
1231 #define _In_reads_to_ptr_z_(ptr)
1232 #define _In_reads_z_(size)
1233 #define _In_z_
1234 #define _In_z_bytecount_(size)
1235 #define _In_z_bytecount_c_(size)
1236 #define _In_z_count_(size)
1237 #define _In_z_count_c_(size)
1238 #define _Inout_
1239 #define _Inout_bytecap_(size)
1240 #define _Inout_bytecap_c_(size)
1241 #define _Inout_bytecap_x_(size)
1242 #define _Inout_bytecount_(size)
1243 #define _Inout_bytecount_c_(size)
1244 #define _Inout_bytecount_x_(size)
1245 #define _Inout_cap_(size)
1246 #define _Inout_cap_c_(size)
1247 #define _Inout_cap_x_(size)
1248 #define _Inout_count_(size)
1249 #define _Inout_count_c_(size)
1250 #define _Inout_count_x_(size)
1251 #define _Inout_defensive_(annotes)
1252 #define _Inout_opt_
1253 #define _Inout_opt_bytecap_(size)
1254 #define _Inout_opt_bytecap_c_(size)
1255 #define _Inout_opt_bytecap_x_(size)
1256 #define _Inout_opt_bytecount_(size)
1257 #define _Inout_opt_bytecount_c_(size)
1258 #define _Inout_opt_bytecount_x_(size)
1259 #define _Inout_opt_cap_(size)
1260 #define _Inout_opt_cap_c_(size)
1261 #define _Inout_opt_cap_x_(size)
1262 #define _Inout_opt_count_(size)
1263 #define _Inout_opt_count_c_(size)
1264 #define _Inout_opt_count_x_(size)
1265 #define _Inout_opt_ptrdiff_count_(size)
1266 #define _Inout_opt_z_
1267 #define _Inout_opt_z_bytecap_(size)
1268 #define _Inout_opt_z_bytecap_c_(size)
1269 #define _Inout_opt_z_bytecap_x_(size)
1270 #define _Inout_opt_z_bytecount_(size)
1271 #define _Inout_opt_z_bytecount_c_(size)
1272 #define _Inout_opt_z_cap_(size)
1273 #define _Inout_opt_z_cap_c_(size)
1274 #define _Inout_opt_z_cap_x_(size)
1275 #define _Inout_opt_z_count_(size)
1276 #define _Inout_opt_z_count_c_(size)
1277 #define _Inout_ptrdiff_count_(size)
1278 #define _Inout_updates_(size)
1279 #define _Inout_updates_all_(size)
1280 #define _Inout_updates_all_opt_(size)
1281 #define _Inout_updates_bytes_(size)
1282 #define _Inout_updates_bytes_all_(size)
1283 #define _Inout_updates_bytes_all_opt_(size)
1284 #define _Inout_updates_bytes_opt_(size)
1285 #define _Inout_updates_bytes_to_(size,count)
1286 #define _Inout_updates_bytes_to_opt_(size,count)
1287 #define _Inout_updates_opt_(size)
1288 #define _Inout_updates_opt_z_(size)
1289 #define _Inout_updates_to_(size,count)
1290 #define _Inout_updates_to_opt_(size,count)
1291 #define _Inout_updates_z_(size)
1292 #define _Inout_z_
1293 #define _Inout_z_bytecap_(size)
1294 #define _Inout_z_bytecap_c_(size)
1295 #define _Inout_z_bytecap_x_(size)
1296 #define _Inout_z_bytecount_(size)
1297 #define _Inout_z_bytecount_c_(size)
1298 #define _Inout_z_cap_(size)
1299 #define _Inout_z_cap_c_(size)
1300 #define _Inout_z_cap_x_(size)
1301 #define _Inout_z_count_(size)
1302 #define _Inout_z_count_c_(size)
1303 #define _Interlocked_operand_
1304 #define _Literal_
1305 #define _Maybenull_
1306 #define _Maybevalid_
1307 #define _Maybe_raises_SEH_exception
1308 #define _Must_inspect_result_
1309 #define _Notliteral_
1310 #define _Notnull_
1311 #define _Notref_
1312 #define _Notvalid_
1313 #define _Null_
1314 #define _Null_terminated_
1315 #define _NullNull_terminated_
1316 #define _On_failure_(annos)
1317 #define _Out_
1318 #define _Out_bound_
1319 #define _Out_bytecap_(size)
1320 #define _Out_bytecap_c_(size)
1321 #define _Out_bytecap_post_bytecount_(cap,count)
1322 #define _Out_bytecap_x_(size)
1323 #define _Out_bytecapcount_(capcount)
1324 #define _Out_bytecapcount_x_(capcount)
1325 #define _Out_cap_(size)
1326 #define _Out_cap_c_(size)
1327 #define _Out_cap_m_(mult,size)
1328 #define _Out_cap_post_count_(cap,count)
1329 #define _Out_cap_x_(size)
1330 #define _Out_capcount_(capcount)
1331 #define _Out_capcount_x_(capcount)
1332 #define _Out_defensive_(annotes)
1333 #define _Out_opt_
1334 #define _Out_opt_bytecap_(size)
1335 #define _Out_opt_bytecap_c_(size)
1336 #define _Out_opt_bytecap_post_bytecount_(cap,count)
1337 #define _Out_opt_bytecap_x_(size)
1338 #define _Out_opt_bytecapcount_(capcount)
1339 #define _Out_opt_bytecapcount_x_(capcount)
1340 #define _Out_opt_cap_(size)
1341 #define _Out_opt_cap_c_(size)
1342 #define _Out_opt_cap_m_(mult,size)
1343 #define _Out_opt_cap_post_count_(cap,count)
1344 #define _Out_opt_cap_x_(size)
1345 #define _Out_opt_capcount_(capcount)
1346 #define _Out_opt_capcount_x_(capcount)
1347 #define _Out_opt_ptrdiff_cap_(size)
1348 #define _Out_opt_z_bytecap_(size)
1349 #define _Out_opt_z_bytecap_c_(size)
1350 #define _Out_opt_z_bytecap_post_bytecount_(cap,count)
1351 #define _Out_opt_z_bytecap_x_(size)
1352 #define _Out_opt_z_bytecapcount_(capcount)
1353 #define _Out_opt_z_cap_(size)
1354 #define _Out_opt_z_cap_c_(size)
1355 #define _Out_opt_z_cap_m_(mult,size)
1356 #define _Out_opt_z_cap_post_count_(cap,count)
1357 #define _Out_opt_z_cap_x_(size)
1358 #define _Out_opt_z_capcount_(capcount)
1359 #define _Out_ptrdiff_cap_(size)
1360 #define _Out_range_(lb,ub)
1361 #define _Out_writes_(size)
1362 #define _Out_writes_all_(size)
1363 #define _Out_writes_all_opt_(size)
1364 #define _Out_writes_bytes_(size)
1365 #define _Out_writes_bytes_all_(size)
1366 #define _Out_writes_bytes_all_opt_(size)
1367 #define _Out_writes_bytes_opt_(size)
1368 #define _Out_writes_bytes_to_(size,count)
1369 #define _Out_writes_bytes_to_opt_(size,count)
1370 #define _Out_writes_opt_(size)
1371 #define _Out_writes_opt_z_(size)
1372 #define _Out_writes_to_(size,count)
1373 #define _Out_writes_to_opt_(size,count)
1374 #define _Out_writes_to_ptr_(ptr)
1375 #define _Out_writes_to_ptr_opt_(ptr)
1376 #define _Out_writes_to_ptr_opt_z_(ptr)
1377 #define _Out_writes_to_ptr_z_(ptr)
1378 #define _Out_writes_z_(size)
1379 #define _Out_z_bytecap_(size)
1380 #define _Out_z_bytecap_c_(size)
1381 #define _Out_z_bytecap_post_bytecount_(cap,count)
1382 #define _Out_z_bytecap_x_(size)
1383 #define _Out_z_bytecapcount_(capcount)
1384 #define _Out_z_cap_(size)
1385 #define _Out_z_cap_c_(size)
1386 #define _Out_z_cap_m_(mult,size)
1387 #define _Out_z_cap_post_count_(cap,count)
1388 #define _Out_z_cap_x_(size)
1389 #define _Out_z_capcount_(capcount)
1390 #define _Outptr_
1391 #define _Outptr_opt_
1392 #define _Outptr_opt_result_buffer_(size)
1393 #define _Outptr_opt_result_buffer_all_(size)
1394 #define _Outptr_opt_result_buffer_all_maybenull_(size)
1395 #define _Outptr_opt_result_buffer_maybenull_(size)
1396 #define _Outptr_opt_result_buffer_to_(size, count)
1397 #define _Outptr_opt_result_buffer_to_maybenull_(size, count)
1398 #define _Outptr_opt_result_bytebuffer_(size)
1399 #define _Outptr_opt_result_bytebuffer_all_(size)
1400 #define _Outptr_opt_result_bytebuffer_all_maybenull_(size)
1401 #define _Outptr_opt_result_bytebuffer_maybenull_(size)
1402 #define _Outptr_opt_result_bytebuffer_to_(size, count)
1403 #define _Outptr_opt_result_bytebuffer_to_maybenull_(size, count)
1404 #define _Outptr_opt_result_maybenull_
1405 #define _Outptr_opt_result_maybenull_z_
1406 #define _Outptr_opt_result_nullonfailure_
1407 #define _Outptr_opt_result_z_
1408 #define _Outptr_result_buffer_(size)
1409 #define _Outptr_result_buffer_all_(size)
1410 #define _Outptr_result_buffer_all_maybenull_(size)
1411 #define _Outptr_result_buffer_maybenull_(size)
1412 #define _Outptr_result_buffer_to_(size, count)
1413 #define _Outptr_result_buffer_to_maybenull_(size, count)
1414 #define _Outptr_result_bytebuffer_(size)
1415 #define _Outptr_result_bytebuffer_all_(size)
1416 #define _Outptr_result_bytebuffer_all_maybenull_(size)
1417 #define _Outptr_result_bytebuffer_maybenull_(size)
1418 #define _Outptr_result_bytebuffer_to_(size, count)
1419 #define _Outptr_result_bytebuffer_to_maybenull_(size, count)
1420 #define _Outptr_result_maybenull_
1421 #define _Outptr_result_maybenull_z_
1422 #define _Outptr_result_nullonfailure_
1423 #define _Outptr_result_z_
1424 #define _Outref_
1425 #define _Outref_result_buffer_(size)
1426 #define _Outref_result_buffer_all_(size)
1427 #define _Outref_result_buffer_all_maybenull_(size)
1428 #define _Outref_result_buffer_maybenull_(size)
1429 #define _Outref_result_buffer_to_(size, count)
1430 #define _Outref_result_buffer_to_maybenull_(size, count)
1431 #define _Outref_result_bytebuffer_(size)
1432 #define _Outref_result_bytebuffer_all_(size)
1433 #define _Outref_result_bytebuffer_all_maybenull_(size)
1434 #define _Outref_result_bytebuffer_maybenull_(size)
1435 #define _Outref_result_bytebuffer_to_(size, count)
1436 #define _Outref_result_bytebuffer_to_maybenull_(size, count)
1437 #define _Outref_result_maybenull_
1438 #define _Outref_result_nullonfailure_
1439 #define _Points_to_data_
1440 #define _Post_
1441 #define _Post_bytecap_(size)
1442 #define _Post_bytecount_(size)
1443 #define _Post_bytecount_c_(size)
1444 #define _Post_bytecount_x_(size)
1445 #define _Post_cap_(size)
1446 #define _Post_count_(size)
1447 #define _Post_count_c_(size)
1448 #define _Post_count_x_(size)
1449 #define _Post_defensive_
1450 #define _Post_equal_to_(expr)
1451 #define _Post_invalid_
1452 #define _Post_maybenull_
1453 #define _Post_maybez_
1454 #define _Post_notnull_
1455 #define _Post_null_
1456 #define _Post_ptr_invalid_
1457 #define _Post_readable_byte_size_(size)
1458 #define _Post_readable_size_(size)
1459 #define _Post_satisfies_(cond)
1460 #define _Post_valid_
1461 #define _Post_writable_byte_size_(size)
1462 #define _Post_writable_size_(size)
1463 #define _Post_z_
1464 #define _Post_z_bytecount_(size)
1465 #define _Post_z_bytecount_c_(size)
1466 #define _Post_z_bytecount_x_(size)
1467 #define _Post_z_count_(size)
1468 #define _Post_z_count_c_(size)
1469 #define _Post_z_count_x_(size)
1470 #define _Pre_
1471 #define _Pre_bytecap_(size)
1472 #define _Pre_bytecap_c_(size)
1473 #define _Pre_bytecap_x_(size)
1474 #define _Pre_bytecount_(size)
1475 #define _Pre_bytecount_c_(size)
1476 #define _Pre_bytecount_x_(size)
1477 #define _Pre_cap_(size)
1478 #define _Pre_cap_c_(size)
1479 #define _Pre_cap_c_one_
1480 #define _Pre_cap_for_(param)
1481 #define _Pre_cap_m_(mult,size)
1482 #define _Pre_cap_x_(size)
1483 #define _Pre_count_(size)
1484 #define _Pre_count_c_(size)
1485 #define _Pre_count_x_(size)
1486 #define _Pre_defensive_
1487 #define _Pre_equal_to_(expr)
1488 #define _Pre_invalid_
1489 #define _Pre_maybenull_
1490 #define _Pre_notnull_
1491 #define _Pre_null_
1492 #define _Pre_opt_bytecap_(size)
1493 #define _Pre_opt_bytecap_c_(size)
1494 #define _Pre_opt_bytecap_x_(size)
1495 #define _Pre_opt_bytecount_(size)
1496 #define _Pre_opt_bytecount_c_(size)
1497 #define _Pre_opt_bytecount_x_(size)
1498 #define _Pre_opt_cap_(size)
1499 #define _Pre_opt_cap_c_(size)
1500 #define _Pre_opt_cap_c_one_
1501 #define _Pre_opt_cap_for_(param)
1502 #define _Pre_opt_cap_m_(mult,size)
1503 #define _Pre_opt_cap_x_(size)
1504 #define _Pre_opt_count_(size)
1505 #define _Pre_opt_count_c_(size)
1506 #define _Pre_opt_count_x_(size)
1507 #define _Pre_opt_ptrdiff_cap_(ptr)
1508 #define _Pre_opt_ptrdiff_count_(ptr)
1509 #define _Pre_opt_valid_
1510 #define _Pre_opt_valid_bytecap_(size)
1511 #define _Pre_opt_valid_bytecap_c_(size)
1512 #define _Pre_opt_valid_bytecap_x_(size)
1513 #define _Pre_opt_valid_cap_(size)
1514 #define _Pre_opt_valid_cap_c_(size)
1515 #define _Pre_opt_valid_cap_x_(size)
1516 #define _Pre_opt_z_
1517 #define _Pre_opt_z_bytecap_(size)
1518 #define _Pre_opt_z_bytecap_c_(size)
1519 #define _Pre_opt_z_bytecap_x_(size)
1520 #define _Pre_opt_z_cap_(size)
1521 #define _Pre_opt_z_cap_c_(size)
1522 #define _Pre_opt_z_cap_x_(size)
1523 #define _Pre_ptrdiff_cap_(ptr)
1524 #define _Pre_ptrdiff_count_(ptr)
1525 #define _Pre_readable_byte_size_(size)
1526 #define _Pre_readable_size_(size)
1527 #define _Pre_readonly_
1528 #define _Pre_satisfies_(cond)
1529 #define _Pre_valid_
1530 #define _Pre_valid_bytecap_(size)
1531 #define _Pre_valid_bytecap_c_(size)
1532 #define _Pre_valid_bytecap_x_(size)
1533 #define _Pre_valid_cap_(size)
1534 #define _Pre_valid_cap_c_(size)
1535 #define _Pre_valid_cap_x_(size)
1536 #define _Pre_writable_byte_size_(size)
1537 #define _Pre_writable_size_(size)
1538 #define _Pre_writeonly_
1539 #define _Pre_z_
1540 #define _Pre_z_bytecap_(size)
1541 #define _Pre_z_bytecap_c_(size)
1542 #define _Pre_z_bytecap_x_(size)
1543 #define _Pre_z_cap_(size)
1544 #define _Pre_z_cap_c_(size)
1545 #define _Pre_z_cap_x_(size)
1546 #define _Prepost_bytecount_(size)
1547 #define _Prepost_bytecount_c_(size)
1548 #define _Prepost_bytecount_x_(size)
1549 #define _Prepost_count_(size)
1550 #define _Prepost_count_c_(size)
1551 #define _Prepost_count_x_(size)
1552 #define _Prepost_opt_bytecount_(size)
1553 #define _Prepost_opt_bytecount_c_(size)
1554 #define _Prepost_opt_bytecount_x_(size)
1555 #define _Prepost_opt_count_(size)
1556 #define _Prepost_opt_count_c_(size)
1557 #define _Prepost_opt_count_x_(size)
1558 #define _Prepost_opt_valid_
1559 #define _Prepost_opt_z_
1560 #define _Prepost_valid_
1561 #define _Prepost_z_
1562 #define _Printf_format_string_
1563 #define _Raises_SEH_exception_
1564 #define _Maybe_raises_SEH_exception_
1565 #define _Readable_bytes_(size)
1566 #define _Readable_elements_(size)
1567 #define _Reserved_
1568 #define _Result_nullonfailure_
1569 #define _Result_zeroonfailure_
1570 #define _Ret_
1571 #define _Ret_bound_
1572 #define _Ret_bytecap_(size)
1573 #define _Ret_bytecap_c_(size)
1574 #define _Ret_bytecap_x_(size)
1575 #define _Ret_bytecount_(size)
1576 #define _Ret_bytecount_c_(size)
1577 #define _Ret_bytecount_x_(size)
1578 #define _Ret_cap_(size)
1579 #define _Ret_cap_c_(size)
1580 #define _Ret_cap_x_(size)
1581 #define _Ret_count_(size)
1582 #define _Ret_count_c_(size)
1583 #define _Ret_count_x_(size)
1584 #define _Ret_maybenull_
1585 #define _Ret_maybenull_z_
1586 #define _Ret_notnull_
1587 #define _Ret_null_
1588 #define _Ret_opt_
1589 #define _Ret_opt_bytecap_(size)
1590 #define _Ret_opt_bytecap_c_(size)
1591 #define _Ret_opt_bytecap_x_(size)
1592 #define _Ret_opt_bytecount_(size)
1593 #define _Ret_opt_bytecount_c_(size)
1594 #define _Ret_opt_bytecount_x_(size)
1595 #define _Ret_opt_cap_(size)
1596 #define _Ret_opt_cap_c_(size)
1597 #define _Ret_opt_cap_x_(size)
1598 #define _Ret_opt_count_(size)
1599 #define _Ret_opt_count_c_(size)
1600 #define _Ret_opt_count_x_(size)
1601 #define _Ret_opt_valid_
1602 #define _Ret_opt_z_
1603 #define _Ret_opt_z_bytecap_(size)
1604 #define _Ret_opt_z_bytecount_(size)
1605 #define _Ret_opt_z_cap_(size)
1606 #define _Ret_opt_z_count_(size)
1607 #define _Ret_range_(lb,ub)
1608 #define _Ret_valid_
1609 #define _Ret_writes_(size)
1610 #define _Ret_writes_bytes_(size)
1611 #define _Ret_writes_bytes_maybenull_(size)
1612 #define _Ret_writes_bytes_to_(size,count)
1613 #define _Ret_writes_bytes_to_maybenull_(size,count)
1614 #define _Ret_writes_maybenull_(size)
1615 #define _Ret_writes_maybenull_z_(size)
1616 #define _Ret_writes_to_(size,count)
1617 #define _Ret_writes_to_maybenull_(size,count)
1618 #define _Ret_writes_z_(size)
1619 #define _Ret_z_
1620 #define _Ret_z_bytecap_(size)
1621 #define _Ret_z_bytecount_(size)
1622 #define _Ret_z_cap_(size)
1623 #define _Ret_z_count_(size)
1624 #define _Return_type_success_(expr)
1625 #define _Scanf_format_string_
1626 #define _Scanf_s_format_string_
1627 #define _Struct_size_bytes_(size)
1628 #define _Success_(expr)
1629 #define _Unchanged_(e)
1630 #define _Use_decl_annotations_
1631 #define _Valid_
1632 #define _When_(expr, annos)
1633 #define _Writable_bytes_(size)
1634 #define _Writable_elements_(size)
1635
1636 #endif /* _USE_ATTRIBUTES_FOR_SAL || _USE_DECLSPECS_FOR_SAL */
1637