efc61fb9c75e5cd11a2da4661dffb2f9f9388ade
[reactos.git] / reactos / 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 #define _Old_(x) x
312 #define __AuToQuOtE _SA_annotes0(SAL_AuToQuOtE)
313
314 /******************************************************************************
315 * Public macros *
316 ******************************************************************************/
317
318 #if _USE_ATTRIBUTES_FOR_SAL
319
320 #define _Check_return_ [returnvalue:SA_Post(MustCheck=SA_Yes)]
321 #define _Deref_in_bound_ [SA_PreBound(Deref=1)]
322 #define _Deref_out_bound_ [SA_PostBound(Deref=1)]
323 #define _Deref_in_range_(min,max) [SA_PreRange(Deref=1,MinVal=#min,MaxVal=#max)]
324 #define _Deref_out_range_(min,max) [SA_PostRange(Deref=1,MinVal=#min,MaxVal=#max)]
325 #define _Deref_ret_bound_ [returnvalue:SA_PostBound(Deref=1)]
326 #define _Deref_ret_range_(min,max) [returnvalue:SA_PostRange(Deref=1,MinVal=#min,MaxVal=#max)]
327 #define _In_bound_ [SA_PreBound(Deref=0)]
328 #define _In_range_(min,max) [SA_PreRange(MinVal=#min,MaxVal=#max)]
329 #define _Out_bound_ [SA_PostBound(Deref=0)]
330 #define _Out_range_(min,max) [SA_PostRange(MinVal=#min,MaxVal=#max)]
331 #define _Printf_format_string_ [SA_FormatString(Style="printf")]
332 #define _Scanf_format_string_ [SA_FormatString(Style="scanf")]
333 #define _Scanf_s_format_string_ [SA_FormatString(Style="scanf_s")]
334 #define _Ret_bound_ [returnvalue:SA_PostBound(Deref=0)]
335 #define _Ret_range_(min,max) [returnvalue:SA_PostRange(MinVal=#min,MaxVal=#max)]
336 #define _Use_decl_annotations_ _SA_annotes0(SAL_useHeader)
337 #define __inner_exceptthat [SAL_except]
338 #define __inner_typefix(ctype) [SAL_typefix(p1=_SA_SPECSTRIZE(ctype))]
339
340 #elif _USE_DECLSPECS_FOR_SAL
341
342 #define _Check_return_ _Post_ __declspec("SAL_checkReturn")
343 #define _Deref_in_bound_ _SA_Deref_pre_ _SA_Bound_
344 #define _Deref_out_bound_ _SA_Deref_post_ _SA_Bound_
345 #define _Deref_in_range_(min,max) _SA_Deref_pre_ _Field_range_(min,max)
346 #define _Deref_out_range_(min,max) _SA_Deref_post_ _Field_range_(min,max)
347 #define _Deref_ret_bound_ _SA_Deref_post_ _SA_Bound_
348 #define _Deref_ret_range_(min,max) _SA_Deref_post_ _Field_range_(min,max)
349 #define _In_bound_ _Pre_ _SA_Bound_
350 #define _In_range_(min,max) _Pre_ _Field_range_(min,max)
351 #define _Out_bound_ _Post_ _SA_Bound_
352 #define _Out_range_(min,max) _Post_ _Field_range_(min,max)
353 #define _Printf_format_string_ _SA_annotes1(SAL_IsFormatString, "printf")
354 #define _Scanf_format_string_ _SA_annotes1(SAL_IsFormatString, "scanf")
355 #define _Scanf_s_format_string_ _SA_annotes1(SAL_IsFormatString, "scanf_s")
356 #define _Ret_bound_ _Post_ _SA_Bound_
357 #define _Ret_range_(min,max) _Post_ _Field_range_(min,max)
358 #define _Use_decl_annotations_ _ _declspec("SAL_useHeader()")
359 #define __inner_exceptthat _SA_annotes0(SAL_except)
360 #define __inner_typefix(ctype) _SA_annotes1(SAL_typefix, ctype)
361
362 #endif
363
364 #define _Post_ _SA_annotes0(SAL_post)
365 #define _Pre_ _SA_annotes0(SAL_pre)
366 #ifdef __cplusplus
367 #define _Notref_ _SA_annotes0(SAL_notref)
368 #else
369 #define _Notref_
370 #endif
371 #define _Null_ _SA_annotes1(SAL_null, __yes)
372 #define _Notnull_ _SA_annotes1(SAL_null, __no)
373 #define _Maybenull_ __inner_exceptthat _SA_annotes1(SAL_null, __maybe)
374 #define _Valid_ _SA_annotes1(SAL_valid, __yes)
375 #define _Notvalid_ _SA_annotes1(SAL_valid, __no)
376 #define _Maybevalid_ _SA_annotes1(SAL_valid, __maybe)
377 #define _Const_ _SA_Pre1_(__readaccess_impl_notref)
378 #define _Literal_ _Pre_ _SA_annotes1(SAL_constant, __yes)
379 #define _Notliteral_ _Pre_ _SA_annotes1(SAL_constant, __no)
380 #define _Null_terminated_ _SA_annotes1(SAL_nullTerminated, __yes)
381 #define _NullNull_terminated_ _Group_(_SA_annotes1(SAL_nullTerminated, __yes) _SA_annotes1(SAL_readableTo,inexpressibleCount("NullNull terminated string")))
382 #define _Field_range_(min,max) _SA_annotes2(SAL_range, min, max)
383 #define _Readable_bytes_(size) _SA_annotes1(SAL_readableTo, byteCount(size))
384 #define _Readable_elements_(size) _SA_annotes1(SAL_readableTo, elementCount(size))
385 #define _Writable_bytes_(size) _SA_annotes1(SAL_writableTo, byteCount(size))
386 #define _Writable_elements_(size) _SA_annotes1(SAL_writableTo, elementCount(size))
387 #define _Success_(expr) _SA_annotes1(SAL_success, expr)
388 #define _When_(expr, annos) _SA_annotes0(SAL_when(expr)) _Group_(annos)
389 #define _Group_(annos) _SA_annotes0(SAL_begin) annos _SA_annotes0(SAL_end)
390 #define _On_failure_(annos) _SA_annotes1(SAL_context, SAL_failed) _Group_(_Post_ _Group_(annos))
391 #define _At_(target, annos) _SA_annotes0(SAL_at(target)) _Group_(annos)
392 #define _At_buffer_(t, i, b, a) _SA_annotes3(SAL_at_buffer, t, i, b) _Group_(a)
393 #define _Must_inspect_result_ _SA_Must_inspect_ _Check_return_
394 #define _Always_(annos) _Group_(annos) _On_failure_(annos)
395
396 #if (_MSC_VER >= 1600)
397 #define _Points_to_data_ _Pre_ _At_(*_Curr_, _SA_annotes1(SAL_mayBePointer, __no))
398 #else
399 // FIXME
400 #define _Points_to_data_
401 #endif
402
403 #define _Return_type_success_(expr) _Success_(expr)
404 #define _Struct_size_bytes_(size) _Writable_bytes_(size)
405 #define _Unchanged_(e) _At_(e, _Post_equal_to_(_Old_(e)) _Const_)
406 #define _Analysis_noreturn_ _SA_annotes0(SAL_terminates)
407 #define _Function_class_(x) _SA_annotes1(SAL_functionClassNew, #x)
408 #define _Raises_SEH_exception_ _Group_(_Pre_ _SA_annotes1(SAL_inTry,__yes) _Analysis_noreturn_)
409 #define _Maybe_raises_SEH_exception_ _Pre_ _SA_annotes1(SAL_inTry,__yes)
410 #define _Interlocked_operand_ _Pre_ _SA_annotes0(SAL_interlocked)
411
412 #define _Field_size_(size) _Notnull_ _Writable_elements_(size)
413 #define _Field_size_bytes_(size) _Notnull_ _Writable_bytes_(size)
414 #define _Field_size_bytes_full_(sz) _Field_size_bytes_part_(sz, sz)
415 #define _Field_size_bytes_full_opt_(sz) _Field_size_bytes_part_opt_(sz, sz)
416 #define _Field_size_bytes_opt_(sz) _Writable_bytes_(sz) _Maybenull_
417 #define _Field_size_bytes_part_(sz, c) _Notnull_ _Writable_bytes_(sz) _Readable_bytes_(c)
418 #define _Field_size_bytes_part_opt_(size, count) _Writable_bytes_(size) _Readable_bytes_(count) _Maybenull_
419 #define _Field_size_full_(size) _Field_size_part_(size, size)
420 #define _Field_size_full_opt_(size) _Field_size_part_opt_(size, size)
421 #define _Field_size_opt_(size) _Writable_elements_(size) _Maybenull_
422 #define _Field_size_part_(size, count) _Notnull_ _Writable_elements_(size) _Readable_elements_(count)
423 #define _Field_size_part_opt_(sz, c) _Writable_elements_(sz) _Readable_elements_(c) _Maybenull_
424 #define _Field_z_ _Null_terminated_
425
426 #define _Pre_bytecap_(size) _Pre_notnull_ _SA_Pre1_(__bytecap_impl(size))
427 #define _Pre_bytecap_c_(size) _Pre_notnull_ _SA_Pre1_(__bytecap_c_impl(size))
428 #define _Pre_bytecap_x_(size) _Pre_notnull_ _SA_Pre1_(__bytecap_x_impl(size))
429 #define _Pre_bytecount_(size) _Pre_notnull_ _SA_Pre1_(__bytecount_impl(size)) _SA_Pre1_(__valid_impl)
430 #define _Pre_bytecount_c_(size) _Pre_notnull_ _SA_Pre1_(__bytecount_c_impl(size)) _SA_Pre1_(__valid_impl)
431 #define _Pre_bytecount_x_(size) _Pre_notnull_ _SA_Pre1_(__bytecount_x_impl(size)) _SA_Pre1_(__valid_impl)
432 #define _Pre_cap_(size) _Pre_notnull_ _SA_Pre1_(__cap_impl(size))
433 #define _Pre_cap_c_(size) _Pre_notnull_ _SA_Pre1_(__cap_c_impl(size))
434 #define _Pre_cap_c_one_ _Pre_notnull_ _SA_Pre1_(__cap_c_one_notref_impl)
435 #define _Pre_cap_for_(param) _Pre_notnull_ _SA_Pre1_(__cap_for_impl(param))
436 #define _Pre_cap_m_(mult,size) _Pre_notnull_ _SA_Pre1_(__mult_impl(mult,size))
437 #define _Pre_cap_x_(size) _Pre_notnull_ _SA_Pre1_(__cap_x_impl(size))
438 #define _Pre_count_(size) _Pre_notnull_ _SA_Pre1_(__count_impl(size)) _SA_Pre1_(__valid_impl)
439 #define _Pre_count_c_(size) _Pre_notnull_ _SA_Pre1_(__count_c_impl(size)) _SA_Pre1_(__valid_impl)
440 #define _Pre_count_x_(size) _Pre_notnull_ _SA_Pre1_(__count_x_impl(size)) _SA_Pre1_(__valid_impl)
441 #define _Pre_defensive_ _SA_annotes0(SAL_pre_defensive)
442 #define _Pre_equal_to_(expr) _In_range_(==, expr)
443 #define _Pre_invalid_ _SA_Deref_pre1_(__notvalid_impl) // note: this is appied to the memory referenced by the parameter! Same as _Deref_pre_invalid_
444 #define _Pre_maybenull_ _SA_Pre1_(__maybenull_impl_notref)
445 #define _Pre_notnull_ _SA_Pre1_(__notnull_impl_notref)
446 #define _Pre_null_ _SA_Pre1_(__null_impl_notref)
447 #define _Pre_opt_bytecap_(size) _SA_Pre1_(__bytecap_impl(size)) _Pre_maybenull_
448 #define _Pre_opt_bytecap_c_(size) _SA_Pre1_(__bytecap_c_impl(size)) _Pre_maybenull_
449 #define _Pre_opt_bytecap_x_(size) _SA_Pre1_(__bytecap_x_impl(size)) _Pre_maybenull_
450 #define _Pre_opt_bytecount_(size) _SA_Pre1_(__bytecount_impl(size)) _Pre_opt_valid_
451 #define _Pre_opt_bytecount_c_(size) _SA_Pre1_(__bytecount_c_impl(size)) _Pre_opt_valid_
452 #define _Pre_opt_bytecount_x_(size) _SA_Pre1_(__bytecount_x_impl(size)) _Pre_opt_valid_
453 #define _Pre_opt_cap_(size) _SA_Pre1_(__cap_impl(size)) _Pre_maybenull_
454 #define _Pre_opt_cap_c_(size) _SA_Pre1_(__cap_c_impl(size)) _Pre_maybenull_
455 #define _Pre_opt_cap_c_one_ _SA_Pre1_(__cap_c_one_notref_impl) _Pre_maybenull_
456 #define _Pre_opt_cap_for_(param) _SA_Pre1_(__cap_for_impl(param)) _Pre_maybenull_
457 #define _Pre_opt_cap_m_(mult,size) _SA_Pre1_(__mult_impl(mult,size)) _Pre_maybenull_
458 #define _Pre_opt_cap_x_(size) _SA_Pre1_(__cap_x_impl(size)) _Pre_maybenull_
459 #define _Pre_opt_count_(size) _SA_Pre1_(__count_impl(size)) _Pre_opt_valid_
460 #define _Pre_opt_count_c_(size) _SA_Pre1_(__count_c_impl(size)) _Pre_opt_valid_
461 #define _Pre_opt_count_x_(size) _SA_Pre1_(__count_x_impl(size)) _Pre_opt_valid_
462 #define _Pre_opt_ptrdiff_cap_(ptr) _SA_Pre1_(__cap_x_impl(__ptrdiff(ptr)))
463 #define _Pre_opt_ptrdiff_count_(ptr) _SA_Pre1_(__count_x_impl(__ptrdiff(ptr))) _SA_Pre1_(__valid_impl)
464 #define _Pre_opt_valid_ _SA_Pre1_(__valid_impl) _Pre_maybenull_
465 #define _Pre_opt_valid_bytecap_(size) _SA_Pre1_(__bytecap_impl(size)) _Pre_opt_valid_
466 #define _Pre_opt_valid_bytecap_c_(size) _SA_Pre1_(__bytecap_c_impl(size)) _Pre_opt_valid_
467 #define _Pre_opt_valid_bytecap_x_(size) _SA_Pre1_(__bytecap_x_impl(size)) _Pre_opt_valid_
468 #define _Pre_opt_valid_cap_(size) _SA_Pre1_(__cap_impl(size)) _Pre_opt_valid_
469 #define _Pre_opt_valid_cap_c_(size) _SA_Pre1_(__cap_c_impl(size)) _Pre_opt_valid_
470 #define _Pre_opt_valid_cap_x_(size) _SA_Pre1_(__cap_x_impl(size)) _Pre_opt_valid_
471 #define _Pre_opt_z_ _SA_Pre1_(__zterm_impl) _Pre_opt_valid_
472 #define _Pre_opt_z_bytecap_(size) _SA_Pre2_(__zterm_impl,__bytecap_impl(size)) _Pre_opt_valid_
473 #define _Pre_opt_z_bytecap_c_(size) _SA_Pre2_(__zterm_impl,__bytecap_c_impl(size)) _Pre_opt_valid_
474 #define _Pre_opt_z_bytecap_x_(size) _SA_Pre2_(__zterm_impl,__bytecap_x_impl(size)) _Pre_opt_valid_
475 #define _Pre_opt_z_cap_(size) _SA_Pre2_(__zterm_impl,__cap_impl(size)) _Pre_opt_valid_
476 #define _Pre_opt_z_cap_c_(size) _SA_Pre2_(__zterm_impl,__cap_c_impl(size)) _Pre_opt_valid_
477 #define _Pre_opt_z_cap_x_(size) _SA_Pre2_(__zterm_impl,__cap_x_impl(size)) _Pre_opt_valid_
478 #define _Pre_ptrdiff_cap_(ptr) _Pre_notnull_ _SA_Pre1_(__cap_x_impl(__ptrdiff(ptr)))
479 #define _Pre_ptrdiff_count_(ptr) _Pre_notnull_ _SA_Pre1_(__count_x_impl(__ptrdiff(ptr))) _SA_Pre1_(__valid_impl)
480 #define _Pre_readable_byte_size_(size) _SA_Pre1_(__bytecount_impl(size)) _SA_Pre1_(__valid_impl)
481 #define _Pre_readable_size_(size) _SA_Pre1_(__count_impl(size)) _SA_Pre1_(__valid_impl)
482 #define _Pre_readonly_ _SA_Pre1_(__readaccess_impl_notref)
483 #define _Pre_satisfies_(cond) _Pre_ _SA_Satisfies_(cond)
484 #define _Pre_valid_ _Pre_notnull_ _SA_Pre1_(__valid_impl)
485 #define _Pre_valid_bytecap_(size) _Pre_notnull_ _SA_Pre1_(__bytecap_impl(size)) _SA_Pre1_(__valid_impl)
486 #define _Pre_valid_bytecap_c_(size) _Pre_notnull_ _SA_Pre1_(__bytecap_c_impl(size)) _SA_Pre1_(__valid_impl)
487 #define _Pre_valid_bytecap_x_(size) _Pre_notnull_ _SA_Pre1_(__bytecap_x_impl(size)) _SA_Pre1_(__valid_impl)
488 #define _Pre_valid_cap_(size) _Pre_notnull_ _SA_Pre1_(__cap_impl(size)) _SA_Pre1_(__valid_impl)
489 #define _Pre_valid_cap_c_(size) _Pre_notnull_ _SA_Pre1_(__cap_c_impl(size)) _SA_Pre1_(__valid_impl)
490 #define _Pre_valid_cap_x_(size) _Pre_notnull_ _SA_Pre1_(__cap_x_impl(size)) _SA_Pre1_(__valid_impl)
491 #define _Pre_writable_byte_size_(size) _SA_Pre1_(__bytecap_impl(size))
492 #define _Pre_writable_size_(size) _SA_Pre1_(__cap_impl(size))
493 #define _Pre_writeonly_ _SA_Pre1_(__writeaccess_impl_notref)
494 #define _Pre_z_ _Pre_notnull_ _SA_Pre1_(__zterm_impl) _SA_Pre1_(__valid_impl)
495 #define _Pre_z_bytecap_(size) _Pre_notnull_ _SA_Pre2_(__zterm_impl,__bytecap_impl(size)) _SA_Pre1_(__valid_impl)
496 #define _Pre_z_bytecap_c_(size) _Pre_notnull_ _SA_Pre2_(__zterm_impl,__bytecap_c_impl(size)) _SA_Pre1_(__valid_impl)
497 #define _Pre_z_bytecap_x_(size) _Pre_notnull_ _SA_Pre2_(__zterm_impl,__bytecap_x_impl(size)) _SA_Pre1_(__valid_impl)
498 #define _Pre_z_cap_(size) _Pre_notnull_ _SA_Pre2_(__zterm_impl,__cap_impl(size)) _SA_Pre1_(__valid_impl)
499 #define _Pre_z_cap_c_(size) _Pre_notnull_ _SA_Pre2_(__zterm_impl,__cap_c_impl(size)) _SA_Pre1_(__valid_impl)
500 #define _Pre_z_cap_x_(size) _Pre_notnull_ _SA_Pre2_(__zterm_impl,__cap_x_impl(size)) _SA_Pre1_(__valid_impl)
501
502 #define _Post_bytecap_(size) _SA_Post1_(__bytecap_impl(size))
503 #define _Post_bytecount_(size) _SA_Post1_(__bytecount_impl(size)) _Post_valid_
504 #define _Post_bytecount_c_(size) _SA_Post1_(__bytecount_c_impl(size)) _Post_valid_
505 #define _Post_bytecount_x_(size) _SA_Post1_(__bytecount_x_impl(size)) _Post_valid_
506 #define _Post_cap_(size) _SA_Post1_(__cap_impl(size))
507 #define _Post_count_(size) _SA_Post1_(__count_impl(size)) _Post_valid_
508 #define _Post_count_c_(size) _SA_Post1_(__count_c_impl(size)) _Post_valid_
509 #define _Post_count_x_(size) _SA_Post1_(__count_x_impl(size)) _Post_valid_
510 #define _Post_defensive_ _SA_annotes0(SAL_post_defensive)
511 #define _Post_equal_to_(expr) _Out_range_(==, expr)
512 #define _Post_invalid_ _SA_Deref_post1_(__notvalid_impl) // note: implicitly dereferenced!
513 #define _Post_maybenull_ _SA_Post1_(__maybenull_impl_notref)
514 #define _Post_maybez_ _SA_Post1_(__maybzterm_impl)
515 #define _Post_notnull_ _SA_Post1_(__notnull_impl_notref)
516 #define _Post_null_ _SA_Post1_(__null_impl_notref)
517 #define _Post_ptr_invalid_ _SA_Post1_(__notvalid_impl)
518 #define _Post_readable_byte_size_(size) _SA_Post1_(__bytecount_impl(size)) _Post_valid_
519 #define _Post_readable_size_(size) _SA_Post1_(__count_impl(size)) _Post_valid_
520 #define _Post_satisfies_(cond) _Post_ _SA_Satisfies_(cond)
521 #define _Post_valid_ _SA_Post1_(__valid_impl)
522 #define _Post_writable_byte_size_(size) _SA_Post1_(__bytecap_impl(size))
523 #define _Post_writable_size_(size) _SA_Post1_(__cap_impl(size))
524 #define _Post_z_ _SA_Post1_(__zterm_impl) _Post_valid_
525 #define _Post_z_bytecount_(size) _SA_Post2_(__zterm_impl,__bytecount_impl(size)) _Post_valid_
526 #define _Post_z_bytecount_c_(size) _SA_Post2_(__zterm_impl,__bytecount_c_impl(size)) _Post_valid_
527 #define _Post_z_bytecount_x_(size) _SA_Post2_(__zterm_impl,__bytecount_x_impl(size)) _Post_valid_
528 #define _Post_z_count_(size) _SA_Post2_(__zterm_impl,__count_impl(size)) _Post_valid_
529 #define _Post_z_count_c_(size) _SA_Post2_(__zterm_impl,__count_c_impl(size)) _Post_valid_
530 #define _Post_z_count_x_(size) _SA_Post2_(__zterm_impl,__count_x_impl(size)) _Post_valid_
531
532 #define _Prepost_bytecount_(size) _Pre_bytecount_(size) _Post_bytecount_(size)
533 #define _Prepost_bytecount_c_(size) _Pre_bytecount_c_(size) _Post_bytecount_c_(size)
534 #define _Prepost_bytecount_x_(size) _Pre_bytecount_x_(size) _Post_bytecount_x_(size)
535 #define _Prepost_count_(size) _Pre_count_(size) _Post_count_(size)
536 #define _Prepost_count_c_(size) _Pre_count_c_(size) _Post_count_c_(size)
537 #define _Prepost_count_x_(size) _Pre_count_x_(size) _Post_count_x_(size)
538 #define _Prepost_opt_bytecount_(size) _Post_bytecount_(size) _Pre_opt_bytecount_(size)
539 #define _Prepost_opt_bytecount_c_(size) _Post_bytecount_c_(size) _Pre_opt_bytecount_c_(size)
540 #define _Prepost_opt_bytecount_x_(size) _Post_bytecount_x_(size) _Pre_opt_bytecount_x_(size)
541 #define _Prepost_opt_count_(size) _Post_count_(size) _Pre_opt_count_(size)
542 #define _Prepost_opt_count_c_(size) _Post_count_c_(size) _Pre_opt_count_c_(size)
543 #define _Prepost_opt_count_x_(size) _Post_count_x_(size) _Pre_opt_count_x_(size)
544 #define _Prepost_opt_valid_ _Post_valid_ _Pre_opt_valid_
545 #define _Prepost_opt_z_ _Post_z_ _Pre_opt_z_
546 #define _Prepost_valid_ _Pre_valid_ _Post_valid_
547 #define _Prepost_z_ _Pre_z_ _Post_z_
548
549 #define _Deref_pre_bytecap_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__bytecap_impl(size))
550 #define _Deref_pre_bytecap_c_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__bytecap_c_impl(size))
551 #define _Deref_pre_bytecap_x_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__bytecap_x_impl(size))
552 #define _Deref_pre_bytecount_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__bytecount_impl(size)) _SA_Pre1_(__valid_impl)
553 #define _Deref_pre_bytecount_c_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__bytecount_c_impl(size)) _SA_Pre1_(__valid_impl)
554 #define _Deref_pre_bytecount_x_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__bytecount_x_impl(size)) _SA_Pre1_(__valid_impl)
555 #define _Deref_pre_cap_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__cap_impl(size))
556 #define _Deref_pre_cap_c_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__cap_c_impl(size))
557 #define _Deref_pre_cap_x_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__cap_x_impl(size))
558 #define _Deref_pre_count_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__count_impl(size)) _SA_Pre1_(__valid_impl)
559 #define _Deref_pre_count_c_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__count_c_impl(size)) _SA_Pre1_(__valid_impl)
560 #define _Deref_pre_count_x_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__count_x_impl(size)) _SA_Pre1_(__valid_impl)
561 #define _Deref_pre_invalid_ _SA_Deref_pre1_(__notvalid_impl)
562 #define _Deref_pre_maybenull_ _SA_Deref_pre1_(__maybenull_impl_notref)
563 #define _Deref_pre_notnull_ _SA_Deref_pre1_(__notnull_impl_notref)
564 #define _Deref_pre_null_ _SA_Deref_pre1_(__null_impl_notref)
565 #define _Deref_pre_opt_bytecap_(size) _SA_Deref_pre1_(__bytecap_impl(size)) _Deref_pre_maybenull_
566 #define _Deref_pre_opt_bytecap_c_(size) _SA_Deref_pre1_(__bytecap_c_impl(size)) _Deref_pre_maybenull_
567 #define _Deref_pre_opt_bytecap_x_(size) _SA_Deref_pre1_(__bytecap_x_impl(size)) _Deref_pre_maybenull_
568 #define _Deref_pre_opt_bytecount_(size) _SA_Deref_pre1_(__bytecount_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
569 #define _Deref_pre_opt_bytecount_c_(size) _SA_Deref_pre1_(__bytecount_c_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
570 #define _Deref_pre_opt_bytecount_x_(size) _SA_Deref_pre1_(__bytecount_x_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
571 #define _Deref_pre_opt_cap_(size) _SA_Deref_pre1_(__cap_impl(size)) _Deref_pre_maybenull_
572 #define _Deref_pre_opt_cap_c_(size) _SA_Deref_pre1_(__cap_c_impl(size)) _Deref_pre_maybenull_
573 #define _Deref_pre_opt_cap_x_(size) _SA_Deref_pre1_(__cap_x_impl(size)) _Deref_pre_maybenull_
574 #define _Deref_pre_opt_count_(size) _SA_Deref_pre1_(__count_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
575 #define _Deref_pre_opt_count_c_(size) _SA_Deref_pre1_(__count_c_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
576 #define _Deref_pre_opt_count_x_(size) _SA_Deref_pre1_(__count_x_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
577 #define _Deref_pre_opt_valid_ _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
578 #define _Deref_pre_opt_valid_bytecap_(size) _SA_Deref_pre1_(__bytecap_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
579 #define _Deref_pre_opt_valid_bytecap_c_(size) _SA_Deref_pre1_(__bytecap_c_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
580 #define _Deref_pre_opt_valid_bytecap_x_(size) _SA_Deref_pre1_(__bytecap_x_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
581 #define _Deref_pre_opt_valid_cap_(size) _SA_Deref_pre1_(__cap_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
582 #define _Deref_pre_opt_valid_cap_c_(size) _SA_Deref_pre1_(__cap_c_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
583 #define _Deref_pre_opt_valid_cap_x_(size) _SA_Deref_pre1_(__cap_x_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
584 #define _Deref_pre_opt_z_ _SA_Deref_pre1_(__zterm_impl) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
585 #define _Deref_pre_opt_z_bytecap_(size) _SA_Deref_pre2_(__zterm_impl,__bytecap_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
586 #define _Deref_pre_opt_z_bytecap_c_(size) _SA_Deref_pre2_(__zterm_impl,__bytecap_c_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
587 #define _Deref_pre_opt_z_bytecap_x_(size) _SA_Deref_pre2_(__zterm_impl,__bytecap_x_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
588 #define _Deref_pre_opt_z_cap_(size) _SA_Deref_pre2_(__zterm_impl,__cap_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
589 #define _Deref_pre_opt_z_cap_c_(size) _SA_Deref_pre2_(__zterm_impl,__cap_c_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
590 #define _Deref_pre_opt_z_cap_x_(size) _SA_Deref_pre2_(__zterm_impl,__cap_x_impl(size)) _SA_Pre1_(__valid_impl) _Deref_pre_maybenull_
591 #define _Deref_pre_readonly_ _SA_Deref_pre1_(__readaccess_impl_notref)
592 #define _Deref_pre_valid_ _SA_Deref_pre1_(__notnull_impl_notref) _SA_Pre1_(__valid_impl)
593 #define _Deref_pre_valid_bytecap_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__bytecap_impl(size)) _SA_Pre1_(__valid_impl)
594 #define _Deref_pre_valid_bytecap_c_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__bytecap_c_impl(size)) _SA_Pre1_(__valid_impl)
595 #define _Deref_pre_valid_bytecap_x_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__bytecap_x_impl(size)) _SA_Pre1_(__valid_impl)
596 #define _Deref_pre_valid_cap_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__cap_impl(size)) _SA_Pre1_(__valid_impl)
597 #define _Deref_pre_valid_cap_c_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__cap_c_impl(size)) _SA_Pre1_(__valid_impl)
598 #define _Deref_pre_valid_cap_x_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__cap_x_impl(size)) _SA_Pre1_(__valid_impl)
599 #define _Deref_pre_writeonly_ _SA_Deref_pre1_(__writeaccess_impl_notref)
600 #define _Deref_pre_z_ _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre1_(__zterm_impl) _SA_Pre1_(__valid_impl)
601 #define _Deref_pre_z_bytecap_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre2_(__zterm_impl,__bytecap_impl(size)) _SA_Pre1_(__valid_impl)
602 #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)
603 #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)
604 #define _Deref_pre_z_cap_(size) _SA_Deref_pre1_(__notnull_impl_notref) _SA_Deref_pre2_(__zterm_impl,__cap_impl(size)) _SA_Pre1_(__valid_impl)
605 #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)
606 #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)
607 #define _Deref2_pre_readonly_ _SA_Deref2_pre1_(__readaccess_impl_notref)
608
609 #define _Deref_post_valid_ _Pre_notnull_ _When_(1 == 1, _SA_Deref_pre1_(__maybevalid_impl)) _SA_Deref_post1_(__valid_impl)
610 //#define _Deref_post_valid_ _Deref_post_notnull_ _Post_valid_ // <- ms implementaton
611 #define _Deref_post_bytecap_(size) _Deref_post_notnull_ _SA_Deref_post1_(__bytecap_impl(size))
612 #define _Deref_post_bytecap_c_(sz) _Deref_post_notnull_ _SA_Deref_post1_(__bytecap_c_impl(sz))
613 #define _Deref_post_bytecap_x_(sz) _Deref_post_notnull_ _SA_Deref_post1_(__bytecap_x_impl(sz))
614 #define _Deref_post_bytecount_(sz) _Deref_post_notnull_ _SA_Deref_post1_(__bytecount_impl(sz)) _Post_valid_
615 #define _Deref_post_bytecount_c_(size) _Deref_post_notnull_ _SA_Deref_post1_(__bytecount_c_impl(size)) _Post_valid_
616 #define _Deref_post_bytecount_x_(size) _Deref_post_notnull_ _SA_Deref_post1_(__bytecount_x_impl(size)) _Post_valid_
617 #define _Deref_post_cap_(size) _Deref_post_notnull_ _SA_Deref_post1_(__cap_impl(size))
618 #define _Deref_post_cap_c_(size) _Deref_post_notnull_ _SA_Deref_post1_(__cap_c_impl(size))
619 #define _Deref_post_cap_x_(size) _Deref_post_notnull_ _SA_Deref_post1_(__cap_x_impl(size))
620 #define _Deref_post_count_(size) _Deref_post_notnull_ _SA_Deref_post1_(__count_impl(size)) _Post_valid_
621 #define _Deref_post_count_c_(size) _Deref_post_notnull_ _SA_Deref_post1_(__count_c_impl(size)) _Post_valid_
622 #define _Deref_post_count_x_(size) _Deref_post_notnull_ _SA_Deref_post1_(__count_x_impl(size)) _Post_valid_
623 #define _Deref_post_maybenull_ _SA_Deref_post1_(__maybenull_impl_notref)
624 #define _Deref_post_notnull_ _SA_Deref_post1_(__notnull_impl_notref)
625 #define _Deref_post_null_ _SA_Deref_post1_(__null_impl_notref)
626 #define _Deref_post_opt_bytecap_(size) _SA_Deref_post1_(__bytecap_impl(size)) _Deref_post_maybenull_
627 #define _Deref_post_opt_bytecap_c_(sz) _SA_Deref_post1_(__bytecap_c_impl(sz)) _Deref_post_maybenull_
628 #define _Deref_post_opt_bytecap_x_(sz) _SA_Deref_post1_(__bytecap_x_impl(sz)) _Deref_post_maybenull_
629 #define _Deref_post_opt_bytecount_(sz) _SA_Deref_post1_(__bytecount_impl(sz)) _Post_valid_ _Deref_post_maybenull_
630 #define _Deref_post_opt_bytecount_c_(size) _SA_Deref_post1_(__bytecount_c_impl(size)) _Post_valid_ _Deref_post_maybenull_
631 #define _Deref_post_opt_bytecount_x_(size) _SA_Deref_post1_(__bytecount_x_impl(size)) _Post_valid_ _Deref_post_maybenull_
632 #define _Deref_post_opt_cap_(size) _SA_Deref_post1_(__cap_impl(size)) _Deref_post_maybenull_
633 #define _Deref_post_opt_cap_c_(size) _SA_Deref_post1_(__cap_c_impl(size)) _Deref_post_maybenull_
634 #define _Deref_post_opt_cap_x_(size) _SA_Deref_post1_(__cap_x_impl(size)) _Deref_post_maybenull_
635 #define _Deref_post_opt_count_(size) _SA_Deref_post1_(__count_impl(size)) _Post_valid_ _Deref_post_maybenull_
636 #define _Deref_post_opt_count_c_(size) _SA_Deref_post1_(__count_c_impl(size)) _Post_valid_ _Deref_post_maybenull_
637 #define _Deref_post_opt_count_x_(size) _SA_Deref_post1_(__count_x_impl(size)) _Post_valid_ _Deref_post_maybenull_
638 #define _Deref_post_opt_valid_ _Post_valid_ _Deref_post_maybenull_
639 #define _Deref_post_opt_valid_bytecap_(size) _SA_Deref_post1_(__bytecap_impl(size)) _Post_valid_ _Deref_post_maybenull_
640 #define _Deref_post_opt_valid_bytecap_c_(size) _SA_Deref_post1_(__bytecap_c_impl(size)) _Post_valid_ _Deref_post_maybenull_
641 #define _Deref_post_opt_valid_bytecap_x_(size) _SA_Deref_post1_(__bytecap_x_impl(size)) _Post_valid_ _Deref_post_maybenull_
642 #define _Deref_post_opt_valid_cap_(size) _SA_Deref_post1_(__cap_impl(size)) _Post_valid_ _Deref_post_maybenull_
643 #define _Deref_post_opt_valid_cap_c_(size) _SA_Deref_post1_(__cap_c_impl(size)) _Post_valid_ _Deref_post_maybenull_
644 #define _Deref_post_opt_valid_cap_x_(size) _SA_Deref_post1_(__cap_x_impl(size)) _Post_valid_ _Deref_post_maybenull_
645 #define _Deref_post_opt_z_ _SA_Deref_post1_(__zterm_impl) _Post_valid_ _Deref_post_maybenull_
646 #define _Deref_post_opt_z_bytecap_(size) _SA_Deref_post2_(__zterm_impl,__bytecap_impl(size)) _Post_valid_ _Deref_post_maybenull_
647 #define _Deref_post_opt_z_bytecap_c_(size) _SA_Deref_post2_(__zterm_impl,__bytecap_c_impl(size)) _Post_valid_ _Deref_post_maybenull_
648 #define _Deref_post_opt_z_bytecap_x_(size) _SA_Deref_post2_(__zterm_impl,__bytecap_x_impl(size)) _Post_valid_ _Deref_post_maybenull_
649 #define _Deref_post_opt_z_cap_(size) _SA_Deref_post2_(__zterm_impl,__cap_impl(size)) _Post_valid_ _Deref_post_maybenull_
650 #define _Deref_post_opt_z_cap_c_(size) _SA_Deref_post2_(__zterm_impl,__cap_c_impl(size)) _Post_valid_ _Deref_post_maybenull_
651 #define _Deref_post_opt_z_cap_x_(size) _SA_Deref_post2_(__zterm_impl,__cap_x_impl(size)) _Post_valid_ _Deref_post_maybenull_
652 #define _Deref_post_valid_ _Deref_post_notnull_ _Post_valid_
653 #define _Deref_post_valid_bytecap_(size) _Deref_post_valid_ _SA_Deref_post1_(__bytecap_impl(size))
654 #define _Deref_post_valid_bytecap_c_(size) _Deref_post_valid_ _SA_Deref_post1_(__bytecap_c_impl(size))
655 #define _Deref_post_valid_bytecap_x_(size) _Deref_post_valid_ _SA_Deref_post1_(__bytecap_x_impl(size))
656 #define _Deref_post_valid_cap_(size) _Deref_post_valid_ _SA_Deref_post1_(__cap_impl(size))
657 #define _Deref_post_valid_cap_c_(size) _Deref_post_valid_ _SA_Deref_post1_(__cap_c_impl(size))
658 #define _Deref_post_valid_cap_x_(size) _Deref_post_valid_ _SA_Deref_post1_(__cap_x_impl(size))
659 #define _Deref_post_z_ _Deref_post_valid_ _SA_Deref_post1_(__zterm_impl)
660 #define _Deref_post_z_bytecap_(size) _Deref_post_valid_ _SA_Deref_post2_(__zterm_impl,__bytecap_impl(size))
661 #define _Deref_post_z_bytecap_c_(size) _Deref_post_valid_ _SA_Deref_post2_(__zterm_impl,__bytecap_c_impl(size))
662 #define _Deref_post_z_bytecap_x_(size) _Deref_post_valid_ _SA_Deref_post2_(__zterm_impl,__bytecap_x_impl(size))
663 #define _Deref_post_z_cap_(size) _Deref_post_valid_ _SA_Deref_post2_(__zterm_impl,__cap_impl(size))
664 #define _Deref_post_z_cap_c_(size) _Deref_post_valid_ _SA_Deref_post2_(__zterm_impl,__cap_c_impl(size))
665 #define _Deref_post_z_cap_x_(size) _Deref_post_valid_ _SA_Deref_post2_(__zterm_impl,__cap_x_impl(size))
666
667 #define _Deref_prepost_bytecap_(size) _Deref_pre_bytecap_(size) _Deref_post_bytecap_(size)
668 #define _Deref_prepost_bytecap_x_(size) _Deref_pre_bytecap_x_(size) _Deref_post_bytecap_x_(size)
669 #define _Deref_prepost_bytecount_(size) _Deref_pre_bytecount_(size) _Deref_post_bytecount_(size)
670 #define _Deref_prepost_bytecount_x_(size) _Deref_pre_bytecount_x_(size) _Deref_post_bytecount_x_(size)
671 #define _Deref_prepost_cap_(size) _Deref_pre_cap_(size) _Deref_post_cap_(size)
672 #define _Deref_prepost_cap_x_(size) _Deref_pre_cap_x_(size) _Deref_post_cap_x_(size)
673 #define _Deref_prepost_count_(size) _Deref_pre_count_(size) _Deref_post_count_(size)
674 #define _Deref_prepost_count_x_(size) _Deref_pre_count_x_(size) _Deref_post_count_x_(size)
675 #define _Deref_prepost_opt_bytecap_(size) _Deref_pre_opt_bytecap_(size) _Deref_post_opt_bytecap_(size)
676 #define _Deref_prepost_opt_bytecap_x_(size) _Deref_pre_opt_bytecap_x_(size) _Deref_post_opt_bytecap_x_(size)
677 #define _Deref_prepost_opt_bytecount_(size) _Deref_pre_opt_bytecount_(size) _Deref_post_opt_bytecount_(size)
678 #define _Deref_prepost_opt_bytecount_x_(size) _Deref_pre_opt_bytecount_x_(size) _Deref_post_opt_bytecount_x_(size)
679 #define _Deref_prepost_opt_cap_(size) _Deref_pre_opt_cap_(size) _Deref_post_opt_cap_(size)
680 #define _Deref_prepost_opt_cap_x_(size) _Deref_pre_opt_cap_x_(size) _Deref_post_opt_cap_x_(size)
681 #define _Deref_prepost_opt_count_(size) _Deref_pre_opt_count_(size) _Deref_post_opt_count_(size)
682 #define _Deref_prepost_opt_count_x_(size) _Deref_pre_opt_count_x_(size) _Deref_post_opt_count_x_(size)
683 #define _Deref_prepost_opt_valid_ _Deref_pre_opt_valid_ _Deref_post_opt_valid_
684 #define _Deref_prepost_opt_valid_bytecap_(size) _Deref_pre_opt_valid_bytecap_(size) _Deref_post_opt_valid_bytecap_(size)
685 #define _Deref_prepost_opt_valid_bytecap_x_(size) _Deref_pre_opt_valid_bytecap_x_(size) _Deref_post_opt_valid_bytecap_x_(size)
686 #define _Deref_prepost_opt_valid_cap_(size) _Deref_pre_opt_valid_cap_(size) _Deref_post_opt_valid_cap_(size)
687 #define _Deref_prepost_opt_valid_cap_x_(size) _Deref_pre_opt_valid_cap_x_(size) _Deref_post_opt_valid_cap_x_(size)
688 #define _Deref_prepost_opt_z_ _Deref_pre_opt_z_ _Deref_post_opt_z_
689 #define _Deref_prepost_opt_z_bytecap_(size) _Deref_pre_opt_z_bytecap_(size) _Deref_post_opt_z_bytecap_(size)
690 #define _Deref_prepost_opt_z_cap_(size) _Deref_pre_opt_z_cap_(size) _Deref_post_opt_z_cap_(size)
691 #define _Deref_prepost_valid_ _Deref_pre_valid_ _Deref_post_valid_
692 #define _Deref_prepost_valid_bytecap_(size) _Deref_pre_valid_bytecap_(size) _Deref_post_valid_bytecap_(size)
693 #define _Deref_prepost_valid_bytecap_x_(size) _Deref_pre_valid_bytecap_x_(size) _Deref_post_valid_bytecap_x_(size)
694 #define _Deref_prepost_valid_cap_(size) _Deref_pre_valid_cap_(size) _Deref_post_valid_cap_(size)
695 #define _Deref_prepost_valid_cap_x_(size) _Deref_pre_valid_cap_x_(size) _Deref_post_valid_cap_x_(size)
696 #define _Deref_prepost_z_ _Deref_pre_z_ _Deref_post_z_
697 #define _Deref_prepost_z_bytecap_(size) _Deref_pre_z_bytecap_(size) _Deref_post_z_bytecap_(size)
698 #define _Deref_prepost_z_cap_(size) _Deref_pre_z_cap_(size) _Deref_post_z_cap_(size)
699
700 #define _In_ _Pre_notnull_ _Pre_valid_ _Deref_pre_readonly_
701 #define _In_bytecount_(size) _Pre_bytecount_(size) _Deref_pre_readonly_
702 #define _In_bytecount_c_(size) _Pre_bytecount_c_(size) _Deref_pre_readonly_
703 #define _In_bytecount_x_(size) _Pre_bytecount_x_(size) _Deref_pre_readonly_
704 #define _In_count_(size) _Pre_count_(size) _Deref_pre_readonly_
705 #define _In_count_c_(size) _Pre_count_c_(size) _Deref_pre_readonly_
706 #define _In_count_x_(size) _Pre_count_x_(size) _Deref_pre_readonly_
707 #define _In_defensive_(annotes) _Pre_defensive_ _Group_(annotes)
708 #define _In_opt_ _Deref_pre_readonly_ _Pre_opt_valid_
709 #define _In_opt_bytecount_(size) _Deref_pre_readonly_ _Pre_opt_bytecount_(size)
710 #define _In_opt_bytecount_c_(size) _Deref_pre_readonly_ _Pre_opt_bytecount_c_(size)
711 #define _In_opt_bytecount_x_(size) _Deref_pre_readonly_ _Pre_opt_bytecount_x_(size)
712 #define _In_opt_count_(size) _Deref_pre_readonly_ _Pre_opt_count_(size)
713 #define _In_opt_count_c_(size) _Deref_pre_readonly_ _Pre_opt_count_c_(size)
714 #define _In_opt_count_x_(size) _Deref_pre_readonly_ _Pre_opt_count_x_(size)
715 #define _In_opt_ptrdiff_count_(size) _Deref_pre_readonly_ _Pre_opt_ptrdiff_count_(size)
716 #define _In_opt_z_ _Deref_pre_readonly_ _Pre_opt_z_
717 #define _In_opt_z_bytecount_(size) _Deref_pre_readonly_ _Pre_opt_z_ _Pre_opt_bytecount_(size)
718 #define _In_opt_z_bytecount_c_(size) _Deref_pre_readonly_ _Pre_opt_z_ _Pre_opt_bytecount_c_(size)
719 #define _In_opt_z_count_(size) _Deref_pre_readonly_ _Pre_opt_z_ _Pre_opt_count_(size)
720 #define _In_opt_z_count_c_(size) _Deref_pre_readonly_ _Pre_opt_z_ _Pre_opt_count_c_(size)
721 #define _In_ptrdiff_count_(size) _Deref_pre_readonly_ _Pre_ptrdiff_count_(size)
722 #define _In_reads_(size) _Deref_pre_readonly_ _Pre_count_(size)
723 #define _In_reads_bytes_(size) _Deref_pre_readonly_ _Pre_bytecount_(size)
724 #define _In_reads_bytes_opt_(size) _Deref_pre_readonly_ _Pre_opt_bytecount_(size)
725 #define _In_reads_opt_(size) _Deref_pre_readonly_ _Pre_opt_count_(size)
726 #define _In_reads_opt_z_(size) _Deref_pre_readonly_ _Pre_opt_count_(size) _Pre_opt_z_
727 #define _In_reads_or_z_(size) _When_(_String_length_(_Curr_) < (size), _In_z_) _When_(_String_length_(_Curr_) >= (size), _In_reads_(size))
728 #define _In_reads_to_ptr_(ptr) _Deref_pre_readonly_ _Pre_ptrdiff_count_(ptr)
729 #define _In_reads_to_ptr_opt_(ptr) _Deref_pre_readonly_ _Pre_opt_ptrdiff_count_(ptr)
730 #define _In_reads_to_ptr_opt_z_(ptr) _Deref_pre_readonly_ _Pre_opt_ptrdiff_count_(ptr) _Pre_opt_z_
731 #define _In_reads_to_ptr_z_(ptr) _Deref_pre_readonly_ _Pre_ptrdiff_count_(ptr) _Pre_z_
732 #define _In_reads_z_(size) _Deref_pre_readonly_ _Pre_count_(size) _Pre_z_
733 #define _In_z_ _Deref_pre_readonly_ _Pre_z_
734 #define _In_z_bytecount_(size) _Deref_pre_readonly_ _Pre_z_ _Pre_bytecount_(size)
735 #define _In_z_bytecount_c_(size) _Deref_pre_readonly_ _Pre_z_ _Pre_bytecount_c_(size)
736 #define _In_z_count_(size) _Deref_pre_readonly_ _Pre_z_ _Pre_count_(size)
737 #define _In_z_count_c_(size) _Deref_pre_readonly_ _Pre_z_ _Pre_count_c_(size)
738
739 #define _Out_ _Pre_cap_c_one_ _Post_valid_ /* not in MS hdrs: _Deref_post_maybenull_ */
740 #define _Out_bytecap_(size) _Pre_bytecap_(size) _Post_valid_
741 #define _Out_bytecap_c_(size) _Pre_bytecap_c_(size) _Post_valid_
742 #define _Out_bytecap_post_bytecount_(cap,count) _Pre_bytecap_(cap) _Post_valid_ _Post_bytecount_(count)
743 #define _Out_bytecap_x_(size) _Pre_bytecap_x_(size) _Post_valid_
744 #define _Out_bytecapcount_(capcount) _Pre_bytecap_(capcount) _Post_valid_ _Post_bytecount_(capcount)
745 #define _Out_bytecapcount_x_(capcount) _Pre_bytecap_x_(capcount) _Post_valid_ _Post_bytecount_x_(capcount)
746 #define _Out_cap_(size) _Pre_cap_(size) _Post_valid_
747 #define _Out_cap_c_(size) _Pre_cap_c_(size) _Post_valid_
748 #define _Out_cap_m_(mult,size) _Pre_cap_m_(mult,size) _Post_valid_
749 #define _Out_cap_post_count_(cap,count) _Pre_cap_(cap) _Post_valid_ _Post_count_(count)
750 #define _Out_cap_x_(size) _Pre_cap_x_(size) _Post_valid_
751 #define _Out_capcount_(capcount) _Pre_cap_(capcount) _Post_valid_ _Post_count_(capcount)
752 #define _Out_capcount_x_(capcount) _Pre_cap_x_(capcount) _Post_valid_ _Post_count_x_(capcount)
753 #define _Out_defensive_(annotes) _Post_defensive_ _Group_(annotes)
754 #define _Out_opt_ _Post_valid_ _Pre_opt_cap_c_one_
755 #define _Out_opt_bytecap_(size) _Post_valid_ _Pre_opt_bytecap_(size)
756 #define _Out_opt_bytecap_c_(size) _Post_valid_ _Pre_opt_bytecap_c_(size)
757 #define _Out_opt_bytecap_post_bytecount_(cap,count) _Post_valid_ _Post_bytecount_(count) _Pre_opt_bytecap_(cap)
758 #define _Out_opt_bytecap_x_(size) _Post_valid_ _Pre_opt_bytecap_x_(size)
759 #define _Out_opt_bytecapcount_(capcount) _Post_valid_ _Post_bytecount_(capcount) _Pre_opt_bytecap_(capcount)
760 #define _Out_opt_bytecapcount_x_(capcount) _Post_valid_ _Post_bytecount_x_(capcount) _Pre_opt_bytecap_x_(capcount)
761 #define _Out_opt_cap_(size) _Post_valid_ _Pre_opt_cap_(size)
762 #define _Out_opt_cap_c_(size) _Post_valid_ _Pre_opt_cap_c_(size)
763 #define _Out_opt_cap_m_(mult,size) _Post_valid_ _Pre_opt_cap_m_(mult,size)
764 #define _Out_opt_cap_post_count_(cap,count) _Post_valid_ _Post_count_(count) _Pre_opt_cap_(cap)
765 #define _Out_opt_cap_x_(size) _Post_valid_ _Pre_opt_cap_x_(size)
766 #define _Out_opt_capcount_(capcount) _Post_valid_ _Post_count_(capcount) _Pre_opt_cap_(capcount)
767 #define _Out_opt_capcount_x_(capcount) _Post_valid_ _Post_count_x_(capcount) _Pre_opt_cap_x_(capcount)
768 #define _Out_opt_ptrdiff_cap_(size) _Post_valid_ _Pre_opt_ptrdiff_cap_(size)
769 #define _Out_opt_z_bytecap_(size) _Post_valid_ _Post_z_ _Pre_opt_bytecap_(size)
770 #define _Out_opt_z_bytecap_c_(size) _Post_valid_ _Post_z_ _Pre_opt_bytecap_c_(size)
771 #define _Out_opt_z_bytecap_post_bytecount_(cap,count) _Post_valid_ _Post_z_bytecount_(count) _Pre_opt_bytecap_(cap)
772 #define _Out_opt_z_bytecap_x_(size) _Post_valid_ _Post_z_ _Pre_opt_bytecap_x_(size)
773 #define _Out_opt_z_bytecapcount_(capcount) _Post_valid_ _Post_z_bytecount_(capcount) _Pre_opt_bytecap_(capcount)
774 #define _Out_opt_z_cap_(size) _Post_valid_ _Post_z_ _Pre_opt_cap_(size)
775 #define _Out_opt_z_cap_c_(size) _Post_valid_ _Post_z_ _Pre_opt_cap_c_(size)
776 #define _Out_opt_z_cap_m_(mult,size) _Post_valid_ _Post_z_ _Pre_opt_cap_m_(mult,size)
777 #define _Out_opt_z_cap_post_count_(cap,count) _Post_valid_ _Post_z_count_(count) _Pre_opt_cap_(cap)
778 #define _Out_opt_z_cap_x_(size) _Post_valid_ _Post_z_ _Pre_opt_cap_x_(size)
779 #define _Out_opt_z_capcount_(capcount) _Post_valid_ _Post_z_count_(capcount) _Pre_opt_cap_(capcount)
780 #define _Out_ptrdiff_cap_(size) _Post_valid_ _Pre_ptrdiff_cap_(size)
781 #define _Out_writes_(size) _Post_valid_ _Pre_cap_(size)
782 #define _Out_writes_all_(size) _Out_writes_to_(_Old_(size), _Old_(size))
783 #define _Out_writes_all_opt_(size) _Out_writes_to_opt_(_Old_(size), _Old_(size))
784 #define _Out_writes_bytes_(size) _Post_valid_ _Pre_bytecap_(size)
785 #define _Out_writes_bytes_all_(size) _Out_writes_bytes_to_(_Old_(size), _Old_(size))
786 #define _Out_writes_bytes_all_opt_(size) _Out_writes_bytes_to_opt_(_Old_(size), _Old_(size))
787 #define _Out_writes_bytes_opt_(size) _Post_valid_ _Pre_opt_bytecap_(size)
788 #define _Out_writes_bytes_to_(size,count) _Post_valid_ _Post_bytecount_(count) _Pre_bytecap_(size)
789 #define _Out_writes_bytes_to_opt_(size,count) _Post_valid_ _Post_bytecount_(count) _Pre_opt_bytecap_(size)
790 #define _Out_writes_opt_(size) _Post_valid_ _Pre_opt_cap_(size)
791 #define _Out_writes_opt_z_(size) _Post_valid_ _Post_z_ _Pre_opt_cap_(size)
792 #define _Out_writes_to_(size,count) _Post_valid_ _Post_count_(count) _Pre_cap_(size)
793 #define _Out_writes_to_opt_(size,count) _Post_valid_ _Post_count_(count) _Pre_opt_cap_(size)
794 #define _Out_writes_to_ptr_(ptr) _Post_valid_ _Pre_ptrdiff_cap_(ptr)
795 #define _Out_writes_to_ptr_opt_(ptr) _Post_valid_ _Pre_opt_ptrdiff_cap_(ptr)
796 #define _Out_writes_to_ptr_opt_z_(ptr) _Post_valid_ Post_z_ _Pre_opt_ptrdiff_cap_(ptr)
797 #define _Out_writes_to_ptr_z_(ptr) _Post_valid_ Post_z_ _Pre_ptrdiff_cap_(ptr)
798 #define _Out_writes_z_(size) _Post_valid_ _Post_z_ _Pre_cap_(size)
799 #define _Out_z_bytecap_(size) _Post_valid_ _Post_z_ _Pre_bytecap_(size)
800 #define _Out_z_bytecap_c_(size) _Post_valid_ _Post_z_ _Pre_bytecap_c_(size)
801 #define _Out_z_bytecap_post_bytecount_(cap,count) _Post_valid_ _Post_z_bytecount_(count) _Pre_bytecap_(cap)
802 #define _Out_z_bytecap_x_(size) _Post_valid_ _Post_z_ _Pre_bytecap_x_(size)
803 #define _Out_z_bytecapcount_(capcount) _Post_valid_ _Post_z_bytecount_(capcount) _Pre_bytecap_(capcount)
804 #define _Out_z_cap_(size) _Post_valid_ _Post_z_ _Pre_cap_(size)
805 #define _Out_z_cap_c_(size) _Post_valid_ _Post_z_ _Pre_cap_c_(size)
806 #define _Out_z_cap_m_(mult,size) _Post_valid_ _Post_z_ _Pre_cap_m_(mult,size)
807 #define _Out_z_cap_post_count_(cap,count) _Post_valid_ _Post_z_count_(count) _Pre_cap_(cap)
808 #define _Out_z_cap_x_(size) _Post_valid_ _Post_z_ _Pre_cap_x_(size)
809 #define _Out_z_capcount_(capcount) _Post_valid_ _Post_z_count_(capcount) _Pre_cap_(capcount)
810
811 #define _Inout_ _Prepost_valid_
812 #define _Inout_bytecap_(size) _Post_valid_ _Pre_valid_bytecap_(size)
813 #define _Inout_bytecap_c_(size) _Post_valid_ _Pre_valid_bytecap_c_(size)
814 #define _Inout_bytecap_x_(size) _Post_valid_ _Pre_valid_bytecap_x_(size)
815 #define _Inout_bytecount_(size) _Prepost_bytecount_(size)
816 #define _Inout_bytecount_c_(size) _Prepost_bytecount_c_(size)
817 #define _Inout_bytecount_x_(size) _Prepost_bytecount_x_(size)
818 #define _Inout_cap_(size) _Post_valid_ _Pre_valid_cap_(size)
819 #define _Inout_cap_c_(size) _Post_valid_ _Pre_valid_cap_c_(size)
820 #define _Inout_cap_x_(size) _Post_valid_ _Pre_valid_cap_x_(size)
821 #define _Inout_count_(size) _Prepost_count_(size)
822 #define _Inout_count_c_(size) _Prepost_count_c_(size)
823 #define _Inout_count_x_(size) _Prepost_count_x_(size)
824 #define _Inout_defensive_(annotes) _Pre_defensive_ _Post_defensive_ _Group_(annotes)
825 #define _Inout_opt_ _Prepost_opt_valid_
826 #define _Inout_opt_bytecap_(size) _Post_valid_ _Pre_opt_valid_bytecap_(size)
827 #define _Inout_opt_bytecap_c_(size) _Post_valid_ _Pre_opt_valid_bytecap_c_(size)
828 #define _Inout_opt_bytecap_x_(size) _Post_valid_ _Pre_opt_valid_bytecap_x_(size)
829 #define _Inout_opt_bytecount_(size) _Prepost_opt_bytecount_(size)
830 #define _Inout_opt_bytecount_c_(size) _Prepost_opt_bytecount_c_(size)
831 #define _Inout_opt_bytecount_x_(size) _Prepost_opt_bytecount_x_(size)
832 #define _Inout_opt_cap_(size) _Post_valid_ _Pre_opt_valid_cap_(size)
833 #define _Inout_opt_cap_c_(size) _Post_valid_ _Pre_opt_valid_cap_c_(size)
834 #define _Inout_opt_cap_x_(size) _Post_valid_ _Pre_opt_valid_cap_x_(size)
835 #define _Inout_opt_count_(size) _Prepost_opt_count_(size)
836 #define _Inout_opt_count_c_(size) _Prepost_opt_count_c_(size)
837 #define _Inout_opt_count_x_(size) _Prepost_opt_count_x_(size)
838 #define _Inout_opt_ptrdiff_count_(size) _Pre_opt_ptrdiff_count_(size)
839 #define _Inout_opt_z_ _Prepost_opt_z_
840 #define _Inout_opt_z_bytecap_(size) _Pre_opt_z_bytecap_(size) _Post_z_
841 #define _Inout_opt_z_bytecap_c_(size) _Pre_opt_z_bytecap_c_(size) _Post_z_
842 #define _Inout_opt_z_bytecap_x_(size) _Pre_opt_z_bytecap_x_(size) _Post_z_
843 #define _Inout_opt_z_bytecount_(size) _Prepost_z_ _Prepost_opt_bytecount_(size)
844 #define _Inout_opt_z_bytecount_c_(size) _Prepost_z_ _Prepost_opt_bytecount_c_(size)
845 #define _Inout_opt_z_cap_(size) _Pre_opt_z_cap_(size) _Post_z_
846 #define _Inout_opt_z_cap_c_(size) _Pre_opt_z_cap_c_(size) _Post_z_
847 #define _Inout_opt_z_cap_x_(size) _Pre_opt_z_cap_x_(size) _Post_z_
848 #define _Inout_opt_z_count_(size) _Prepost_z_ _Prepost_opt_count_(size)
849 #define _Inout_opt_z_count_c_(size) _Prepost_z_ _Prepost_opt_count_c_(size)
850 #define _Inout_ptrdiff_count_(size) _Pre_ptrdiff_count_(size)
851 #define _Inout_updates_(size) _Post_valid_ _Pre_cap_(size) _SA_Pre1_(__valid_impl)
852 #define _Inout_updates_all_(size) _Inout_updates_to_(_Old_(size), _Old_(size))
853 #define _Inout_updates_all_opt_(size) _Inout_updates_to_opt_(_Old_(size), _Old_(size))
854 #define _Inout_updates_bytes_(size) _Post_valid_ _Pre_bytecap_(size) _SA_Pre1_(__valid_impl)
855 #define _Inout_updates_bytes_all_(size) _Inout_updates_bytes_to_(_Old_(size), _Old_(size))
856 #define _Inout_updates_bytes_all_opt_(size) _Inout_updates_bytes_to_opt_(_Old_(size), _Old_(size))
857 #define _Inout_updates_bytes_opt_(size) _Post_valid_ _SA_Pre1_(__valid_impl) _Pre_opt_bytecap_(size)
858 #define _Inout_updates_bytes_to_(size,count) _Out_writes_bytes_to_(size,count) _SA_Pre1_(__valid_impl) _SA_Pre1_(__bytecount_impl(count))
859 #define _Inout_updates_bytes_to_opt_(size,count) _SA_Pre1_(__valid_impl) _SA_Pre1_(__bytecount_impl(count)) _Out_writes_bytes_to_opt_(size,count)
860 #define _Inout_updates_opt_(size) _Post_valid_ _SA_Pre1_(__valid_impl) _Pre_opt_cap_(size)
861 #define _Inout_updates_opt_z_(size) _Post_valid_ _SA_Post1_(__zterm_impl) _SA_Pre1_(__valid_impl) _SA_Pre1_(__zterm_impl) _Pre_opt_cap_(size)
862 #define _Inout_updates_to_(size,count) _Out_writes_to_(size,count) _SA_Pre1_(__valid_impl) _SA_Pre1_(__count_impl(count))
863 #define _Inout_updates_to_opt_(size,count) _SA_Pre1_(__valid_impl) _SA_Pre1_(__count_impl(count)) _Out_writes_to_opt_(size,count)
864 #define _Inout_updates_z_(size) _Pre_cap_(size) _SA_Pre1_(__valid_impl) _Post_valid_ _SA_Pre1_(__zterm_impl) _SA_Post1_(__zterm_impl)
865 #define _Inout_z_ _Prepost_z_
866 #define _Inout_z_bytecap_(size) _Pre_z_bytecap_(size) _Post_z_
867 #define _Inout_z_bytecap_c_(size) _Pre_z_bytecap_c_(size) _Post_z_
868 #define _Inout_z_bytecap_x_(size) _Pre_z_bytecap_x_(size) _Post_z_
869 #define _Inout_z_bytecount_(size) _Prepost_z_ _Prepost_bytecount_(size)
870 #define _Inout_z_bytecount_c_(size) _Prepost_z_ _Prepost_bytecount_c_(size)
871 #define _Inout_z_cap_(size) _Pre_z_cap_(size) _Post_z_
872 #define _Inout_z_cap_c_(size) _Pre_z_cap_c_(size) _Post_z_
873 #define _Inout_z_cap_x_(size) _Pre_z_cap_x_(size) _Post_z_
874 #define _Inout_z_count_(size) _Prepost_z_ _Prepost_count_(size)
875 #define _Inout_z_count_c_(size) _Prepost_z_ _Prepost_count_c_(size)
876
877 #define _Deref_opt_out_ _Out_opt_ _Deref_post_valid_
878 #define _Deref_opt_out_opt_ _Out_opt_ _Deref_post_opt_valid_
879 #define _Deref_opt_out_opt_z_ _Out_opt_ _Deref_post_opt_z_
880 #define _Deref_opt_out_z_ _Out_opt_ _Deref_post_z_
881 #define _Deref_out_ _Out_ _Deref_post_valid_
882 #define _Deref_out_opt_ _Out_ _Deref_post_opt_valid_
883 #define _Deref_out_opt_z_ _Out_ _Deref_post_opt_z_
884 #define _Deref_out_z_ _Out_ _Deref_post_z_
885 #define _Deref_out_z_bytecap_c_(sz) _Deref_pre_bytecap_c_(sz) _Deref_post_z_
886 #define _Deref_out_z_cap_c_(size) _Deref_pre_cap_c_(size) _Deref_post_z_
887 #define _Deref_inout_bound_ _Deref_in_bound_ _Deref_out_bound_
888 #define _Deref_inout_z_ _Deref_prepost_z_
889 #define _Deref_inout_z_bytecap_c_(size) _Deref_pre_z_bytecap_c_(size) _Deref_post_z_
890 #define _Deref_inout_z_cap_c_(size) _Deref_pre_z_cap_c_(size) _Deref_post_z_
891
892 #define _Outptr_ _Out_ _SA_Deref_post2_(__notnull_impl_notref, __count_impl(1)) _Post_valid_
893 #define _Outptr_opt_ _Out_opt_ _SA_Deref_post2_(__notnull_impl_notref, __count_impl(1)) //_Post_valid_
894 #define _Outptr_opt_result_buffer_(size) _Out_opt_ _SA_Deref_post2_(__notnull_impl_notref, __cap_impl(size)) //_Post_valid_
895 #define _Outptr_opt_result_buffer_all_(size) _Out_opt_ _SA_Deref_post2_(__notnull_impl_notref, __count_impl(size)) //_Post_valid_
896 #define _Outptr_opt_result_buffer_all_maybenull_(size) _Out_opt_ _SA_Deref_post2_(__maybenull_impl_notref, __count_impl(size)) //_Post_valid_
897 #define _Outptr_opt_result_buffer_maybenull_(size) _Out_opt_ _SA_Deref_post2_(__maybenull_impl_notref, __cap_impl(size)) //_Post_valid_
898 #define _Outptr_opt_result_buffer_to_(size, count) _Out_opt_ _SA_Deref_post3_(__notnull_impl_notref, __cap_impl(size), __count_impl(count)) //_Post_valid_
899 #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_
900 #define _Outptr_opt_result_bytebuffer_(size) _Out_opt_ _SA_Deref_post2_(__notnull_impl_notref, __bytecap_impl(size)) //_Post_valid_
901 #define _Outptr_opt_result_bytebuffer_all_(size) _Out_opt_ _SA_Deref_post2_(__notnull_impl_notref, __bytecount_impl(size)) //_Post_valid_
902 #define _Outptr_opt_result_bytebuffer_all_maybenull_(size) _Out_opt_ _SA_Deref_post2_(__maybenull_impl_notref, __bytecount_impl(size)) //_Post_valid_
903 #define _Outptr_opt_result_bytebuffer_maybenull_(size) _Out_opt_ _SA_Deref_post2_(__maybenull_impl_notref, __bytecap_impl(size)) //_Post_valid_
904 #define _Outptr_opt_result_bytebuffer_to_(size, count) _Out_opt_ _SA_Deref_post3_(__notnull_impl_notref, __bytecap_impl(size), __bytecount_impl(count)) //_Post_valid_
905 #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_
906 #define _Outptr_opt_result_maybenull_ _Out_opt_ _SA_Deref_post2_(__maybenull_impl_notref, __count_impl(1)) //_Post_valid_
907 #define _Outptr_opt_result_maybenull_z_ _Out_opt_ _Deref_post_opt_z_
908 #define _Outptr_opt_result_nullonfailure_ _Outptr_opt_ _On_failure_(_Deref_post_null_)
909 #define _Outptr_opt_result_z_ _Out_opt_ _Deref_post_z_
910 #define _Outptr_result_buffer_(size) _Out_ _SA_Deref_post2_(__notnull_impl_notref, __cap_impl(size)) _Post_valid_
911 #define _Outptr_result_buffer_all_(size) _Out_ _SA_Deref_post2_(__notnull_impl_notref, __count_impl(size)) _Post_valid_
912 #define _Outptr_result_buffer_all_maybenull_(size) _Out_ _SA_Deref_post2_(__maybenull_impl_notref, __count_impl(size)) _Post_valid_
913 #define _Outptr_result_buffer_maybenull_(size) _Out_ _SA_Deref_post2_(__maybenull_impl_notref, __cap_impl(size)) _Post_valid_
914 #define _Outptr_result_buffer_to_(size, count) _Out_ _SA_Deref_post3_(__notnull_impl_notref, __cap_impl(size), __count_impl(count)) _Post_valid_
915 #define _Outptr_result_buffer_to_maybenull_(size, count) _Out_ _SA_Deref_post3_(__maybenull_impl_notref, __cap_impl(size), __count_impl(count)) _Post_valid_
916 #define _Outptr_result_bytebuffer_(size) _Out_ _SA_Deref_post2_(__notnull_impl_notref, __bytecap_impl(size)) _Post_valid_
917 #define _Outptr_result_bytebuffer_all_(size) _Out_ _SA_Deref_post2_(__notnull_impl_notref, __bytecount_impl(size)) _Post_valid_
918 #define _Outptr_result_bytebuffer_all_maybenull_(size) _Out_ _SA_Deref_post2_(__maybenull_impl_notref, __bytecount_impl(size)) _Post_valid_
919 #define _Outptr_result_bytebuffer_maybenull_(size) _Out_ _SA_Deref_post2_(__maybenull_impl_notref, __bytecap_impl(size)) _Post_valid_
920 #define _Outptr_result_bytebuffer_to_(size, count) _Out_ _SA_Deref_post3_(__notnull_impl_notref, __bytecap_impl(size), __bytecount_impl(count)) _Post_valid_
921 #define _Outptr_result_bytebuffer_to_maybenull_(size, count) _Out_ _SA_Deref_post3_(__maybenull_impl_notref, __bytecap_impl(size), __bytecount_impl(count)) _Post_valid_
922 #define _Outptr_result_maybenull_ _Out_ _SA_Deref_post2_(__maybenull_impl_notref, __count_impl(1)) _Post_valid_
923 #define _Outptr_result_maybenull_z_ _Out_ _Deref_post_opt_z_
924 #define _Outptr_result_nullonfailure_ _Outptr_ _On_failure_(_Deref_post_null_)
925 #define _Outptr_result_z_ _Out_ _Deref_post_z_
926
927 #define _COM_Outptr_ _Outptr_ _On_failure_(_Deref_post_null_)
928 #define _COM_Outptr_opt_ _Outptr_opt_ _On_failure_(_Deref_post_null_)
929 #define _COM_Outptr_opt_result_maybenull_ _Outptr_opt_result_maybenull_ _On_failure_(_Deref_post_null_)
930 #define _COM_Outptr_result_maybenull_ _Outptr_result_maybenull_ _On_failure_(_Deref_post_null_)
931
932 #define _Outref_ _Group_(_Out_)
933 #define _Outref_result_buffer_(size) _SA_Post1_(__cap_impl(size)) _Post_valid_
934 #define _Outref_result_buffer_all_(size) _SA_Post1_(__count_impl(size))
935 #define _Outref_result_buffer_all_maybenull_(size) _SA_Post2_(__count_impl(size), __maybenull_impl)
936 #define _Outref_result_buffer_maybenull_(size) _SA_Post2_(__cap_impl(size), __maybenull_impl) _Post_valid_
937 #define _Outref_result_buffer_to_(size, count) _SA_Post2_(__cap_impl(size), __count_impl(count))
938 #define _Outref_result_buffer_to_maybenull_(size, count) _SA_Post3_(__cap_impl(size), __count_impl(count), __maybenull_impl)
939 #define _Outref_result_bytebuffer_(size) _SA_Post1_(__bytecap_impl(size)) _Post_valid_
940 #define _Outref_result_bytebuffer_all_(size) _SA_Post1_(__bytecount_impl(size))
941 #define _Outref_result_bytebuffer_all_maybenull_(size) _SA_Post2_(__bytecount_impl(size), __maybenull_impl)
942 #define _Outref_result_bytebuffer_maybenull_(size) _SA_Post2_(__bytecap_impl(size), __maybenull_impl) _Post_valid_
943 #define _Outref_result_bytebuffer_to_(size, count) _SA_Post2_(__bytecap_impl(size), __bytecount_impl(count))
944 #define _Outref_result_bytebuffer_to_maybenull_(size, count) _SA_Post3_(__bytecap_impl(size), __bytecount_impl(count), __maybenull_impl)
945 #define _Outref_result_maybenull_ _Group_(_Pre_cap_c_one_ _Post_valid_ __maybenull_impl)
946 #define _Outref_result_nullonfailure_ _Group_(_Out_) _On_failure_(_Post_null_)
947
948 #define _Reserved_ _SA_Pre1_(__null_impl)
949 #define _Result_nullonfailure_ _On_failure_(_Notref_ _SA_Deref_ _Post_null_)
950 #define _Result_zeroonfailure_ _On_failure_(_Notref_ _SA_Deref_ _Out_range_(==, 0))
951
952 #define __inner_callback _SA_annotes0(__callback)
953
954 #define _Ret_ _Ret_valid_
955 #define _Ret_bytecap_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__bytecap_impl(size))
956 #define _Ret_bytecap_c_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__bytecap_c_impl(size))
957 #define _Ret_bytecap_x_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__bytecap_x_impl(size))
958 #define _Ret_bytecount_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__bytecount_impl(size)) _SA_Ret1_(__valid_impl)
959 #define _Ret_bytecount_c_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__bytecount_c_impl(size)) _SA_Ret1_(__valid_impl)
960 #define _Ret_bytecount_x_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__bytecount_x_impl(size)) _SA_Ret1_(__valid_impl)
961 #define _Ret_cap_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__cap_impl(size))
962 #define _Ret_cap_c_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__cap_c_impl(size))
963 #define _Ret_cap_x_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__cap_x_impl(size))
964 #define _Ret_count_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__count_impl(size)) _SA_Ret1_(__valid_impl)
965 #define _Ret_count_c_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__count_c_impl(size)) _SA_Ret1_(__valid_impl)
966 #define _Ret_count_x_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__count_x_impl(size)) _SA_Ret1_(__valid_impl)
967 #define _Ret_maybenull_ _SA_Ret1_(__maybenull_impl)
968 #define _Ret_maybenull_z_ _SA_Ret2_(__maybenull_impl,__zterm_impl) _SA_Ret1_(__valid_impl)
969 #define _Ret_notnull_ _SA_Ret1_(__notnull_impl)
970 #define _Ret_null_ _SA_Ret1_(__null_impl)
971 #define _Ret_opt_ _Ret_opt_valid_
972 #define _Ret_opt_bytecap_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__bytecap_impl(size))
973 #define _Ret_opt_bytecap_c_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__bytecap_c_impl(size))
974 #define _Ret_opt_bytecap_x_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__bytecap_x_impl(size))
975 #define _Ret_opt_bytecount_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__bytecount_impl(size)) _SA_Ret1_(__valid_impl)
976 #define _Ret_opt_bytecount_c_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__bytecount_c_impl(size)) _SA_Ret1_(__valid_impl)
977 #define _Ret_opt_bytecount_x_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__bytecount_x_impl(size)) _SA_Ret1_(__valid_impl)
978 #define _Ret_opt_cap_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__cap_impl(size))
979 #define _Ret_opt_cap_c_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__cap_c_impl(size))
980 #define _Ret_opt_cap_x_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__cap_x_impl(size))
981 #define _Ret_opt_count_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__count_impl(size)) _SA_Ret1_(__valid_impl)
982 #define _Ret_opt_count_c_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__count_c_impl(size)) _SA_Ret1_(__valid_impl)
983 #define _Ret_opt_count_x_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__count_x_impl(size)) _SA_Ret1_(__valid_impl)
984 #define _Ret_opt_valid_ _SA_Ret1_(__maybenull_impl_notref) _SA_Ret1_(__valid_impl)
985 #define _Ret_opt_z_ _SA_Ret2_(__maybenull_impl,__zterm_impl) _SA_Ret1_(__valid_impl)
986 #define _Ret_opt_z_bytecap_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret2_(__zterm_impl,__bytecap_impl(size)) _SA_Ret1_(__valid_impl)
987 #define _Ret_opt_z_bytecount_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret2_(__zterm_impl,__bytecount_impl(size)) _SA_Ret1_(__valid_impl)
988 #define _Ret_opt_z_cap_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret2_(__zterm_impl,__cap_impl(size)) _SA_Ret1_(__valid_impl)
989 #define _Ret_opt_z_count_(size) _SA_Ret1_(__maybenull_impl_notref) _SA_Ret2_(__zterm_impl,__count_impl(size)) _SA_Ret1_(__valid_impl)
990 #define _Ret_valid_ _SA_Ret1_(__notnull_impl_notref) _SA_Ret1_(__valid_impl)
991 #define _Ret_writes_(size) _SA_Ret2_(__notnull_impl, __count_impl(size)) _SA_Ret1_(__valid_impl)
992 #define _Ret_writes_bytes_(size) _SA_Ret2_(__notnull_impl, __bytecount_impl(size)) _SA_Ret1_(__valid_impl)
993 #define _Ret_writes_bytes_maybenull_(size) _SA_Ret2_(__maybenull_impl,__bytecount_impl(size)) _SA_Ret1_(__valid_impl)
994 #define _Ret_writes_bytes_to_(size,count) _SA_Ret3_(__notnull_impl, __bytecap_impl(size), __bytecount_impl(count)) _SA_Ret1_(__valid_impl)
995 #define _Ret_writes_bytes_to_maybenull_(size,count) _SA_Ret3_(__maybenull_impl, __bytecap_impl(size), __bytecount_impl(count)) _SA_Ret1_(__valid_impl)
996 #define _Ret_writes_maybenull_(size) _SA_Ret2_(__maybenull_impl,__count_impl(size)) _SA_Ret1_(__valid_impl)
997 #define _Ret_writes_maybenull_z_(size) _SA_Ret3_(__maybenull_impl,__count_impl(size),__zterm_impl) _SA_Ret1_(__valid_impl)
998 #define _Ret_writes_to_(size,count) _SA_Ret3_(__notnull_impl, __cap_impl(size), __count_impl(count)) _SA_Ret1_(__valid_impl)
999 #define _Ret_writes_to_maybenull_(size,count) _SA_Ret3_(__maybenull_impl, __cap_impl(size), __count_impl(count)) _SA_Ret1_(__valid_impl)
1000 #define _Ret_writes_z_(size) _SA_Ret3_(__notnull_impl, __count_impl(size), __zterm_impl) _SA_Ret1_(__valid_impl)
1001 #define _Ret_z_ _SA_Ret2_(__notnull_impl, __zterm_impl) _SA_Ret1_(__valid_impl)
1002 #define _Ret_z_bytecap_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret2_(__zterm_impl,__bytecap_impl(size)) _SA_Ret1_(__valid_impl)
1003 #define _Ret_z_bytecount_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret2_(__zterm_impl,__bytecount_impl(size)) _SA_Ret1_(__valid_impl)
1004 #define _Ret_z_cap_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret2_(__zterm_impl,__cap_impl(size)) _SA_Ret1_(__valid_impl)
1005 #define _Ret_z_count_(size) _SA_Ret1_(__notnull_impl_notref) _SA_Ret2_(__zterm_impl,__count_impl(size)) _SA_Ret1_(__valid_impl)
1006
1007 #define _Deref_ret_opt_z_ _SA_Deref_ret1_(__maybenull_impl_notref) _SA_Ret1_(__zterm_impl)
1008 #define _Deref_ret_z_ _SA_Deref_ret1_(__notnull_impl_notref) _SA_Deref_ret1_(__zterm_impl)
1009
1010 /* Additional annotation declarations */
1011 #define __ANNOTATION(fun) _SA_annotes0(SAL_annotation) void __SA_##fun
1012 #define __PRIMOP(type, fun) _SA_annotes0(SAL_primop) type __SA_##fun;
1013 #if (_MSC_VER < 1600)
1014
1015 __ANNOTATION(SAL_satisfies(_In_ char);)
1016
1017 #define _Inexpressible_(x) (x)
1018
1019 #endif
1020
1021 __ANNOTATION(SAL_constant(enum __SAL_YesNo);)
1022 __ANNOTATION(SAL_TypeName(__AuToQuOtE char *));
1023
1024 __ANNOTATION(SAL_functionClassNew(_In_ char*);)
1025 __PRIMOP(int, _In_function_class_(_In_ char*);)
1026 #define _In_function_class_(x) _In_function_class_(#x)
1027
1028 __ANNOTATION(SAL_interlocked(void);)
1029
1030 __ANNOTATION(SAL_untrusted_data_source(__AuToQuOtE char *));
1031
1032
1033 #else /* _USE_ATTRIBUTES_FOR_SAL || _USE_DECLSPECS_FOR_SAL */
1034
1035 /* Dummys */
1036 #define __inner_exceptthat
1037 #define __inner_typefix(ctype)
1038 #define _Always_(annos)
1039 #define _Analysis_noreturn_
1040 #define _At_(target, annos)
1041 #define _At_buffer_(target, iter, bound, annos)
1042 #define _Check_return_
1043 #define _COM_Outptr_
1044 #define _COM_Outptr_opt_
1045 #define _COM_Outptr_opt_result_maybenull_
1046 #define _COM_Outptr_result_maybenull_
1047 #define _Const_
1048 #define _Deref_in_bound_
1049 #define _Deref_in_range_(lb,ub)
1050 #define _Deref_inout_bound_
1051 #define _Deref_inout_z_
1052 #define _Deref_inout_z_bytecap_c_(size)
1053 #define _Deref_inout_z_cap_c_(size)
1054 #define _Deref_opt_out_
1055 #define _Deref_opt_out_opt_
1056 #define _Deref_opt_out_opt_z_
1057 #define _Deref_opt_out_z_
1058 #define _Deref_out_
1059 #define _Deref_out_bound_
1060 #define _Deref_out_opt_
1061 #define _Deref_out_opt_z_
1062 #define _Deref_out_range_(lb,ub)
1063 #define _Deref_out_z_
1064 #define _Deref_out_z_bytecap_c_(size)
1065 #define _Deref_out_z_cap_c_(size)
1066 #define _Deref_post_bytecap_(size)
1067 #define _Deref_post_bytecap_c_(size)
1068 #define _Deref_post_bytecap_x_(size)
1069 #define _Deref_post_bytecount_(size)
1070 #define _Deref_post_bytecount_c_(size)
1071 #define _Deref_post_bytecount_x_(size)
1072 #define _Deref_post_cap_(size)
1073 #define _Deref_post_cap_c_(size)
1074 #define _Deref_post_cap_x_(size)
1075 #define _Deref_post_count_(size)
1076 #define _Deref_post_count_c_(size)
1077 #define _Deref_post_count_x_(size)
1078 #define _Deref_post_maybenull_
1079 #define _Deref_post_notnull_
1080 #define _Deref_post_null_
1081 #define _Deref_post_opt_bytecap_(size)
1082 #define _Deref_post_opt_bytecap_c_(size)
1083 #define _Deref_post_opt_bytecap_x_(size)
1084 #define _Deref_post_opt_bytecount_(size)
1085 #define _Deref_post_opt_bytecount_c_(size)
1086 #define _Deref_post_opt_bytecount_x_(size)
1087 #define _Deref_post_opt_cap_(size)
1088 #define _Deref_post_opt_cap_c_(size)
1089 #define _Deref_post_opt_cap_x_(size)
1090 #define _Deref_post_opt_count_(size)
1091 #define _Deref_post_opt_count_c_(size)
1092 #define _Deref_post_opt_count_x_(size)
1093 #define _Deref_post_opt_valid_
1094 #define _Deref_post_opt_valid_bytecap_(size)
1095 #define _Deref_post_opt_valid_bytecap_c_(size)
1096 #define _Deref_post_opt_valid_bytecap_x_(size)
1097 #define _Deref_post_opt_valid_cap_(size)
1098 #define _Deref_post_opt_valid_cap_c_(size)
1099 #define _Deref_post_opt_valid_cap_x_(size)
1100 #define _Deref_post_opt_z_
1101 #define _Deref_post_opt_z_bytecap_(size)
1102 #define _Deref_post_opt_z_bytecap_c_(size)
1103 #define _Deref_post_opt_z_bytecap_x_(size)
1104 #define _Deref_post_opt_z_cap_(size)
1105 #define _Deref_post_opt_z_cap_c_(size)
1106 #define _Deref_post_opt_z_cap_x_(size)
1107 #define _Deref_post_valid_
1108 #define _Deref_post_valid_bytecap_(size)
1109 #define _Deref_post_valid_bytecap_c_(size)
1110 #define _Deref_post_valid_bytecap_x_(size)
1111 #define _Deref_post_valid_cap_(size)
1112 #define _Deref_post_valid_cap_c_(size)
1113 #define _Deref_post_valid_cap_x_(size)
1114 #define _Deref_post_z_
1115 #define _Deref_post_z_bytecap_(size)
1116 #define _Deref_post_z_bytecap_c_(size)
1117 #define _Deref_post_z_bytecap_x_(size)
1118 #define _Deref_post_z_cap_(size)
1119 #define _Deref_post_z_cap_c_(size)
1120 #define _Deref_post_z_cap_x_(size)
1121 #define _Deref_pre_bytecap_(size)
1122 #define _Deref_pre_bytecap_c_(size)
1123 #define _Deref_pre_bytecap_x_(size)
1124 #define _Deref_pre_bytecount_(size)
1125 #define _Deref_pre_bytecount_c_(size)
1126 #define _Deref_pre_bytecount_x_(size)
1127 #define _Deref_pre_cap_(size)
1128 #define _Deref_pre_cap_c_(size)
1129 #define _Deref_pre_cap_x_(size)
1130 #define _Deref_pre_count_(size)
1131 #define _Deref_pre_count_c_(size)
1132 #define _Deref_pre_count_x_(size)
1133 #define _Deref_pre_invalid_
1134 #define _Deref_pre_maybenull_
1135 #define _Deref_pre_notnull_
1136 #define _Deref_pre_null_
1137 #define _Deref_pre_opt_bytecap_(size)
1138 #define _Deref_pre_opt_bytecap_c_(size)
1139 #define _Deref_pre_opt_bytecap_x_(size)
1140 #define _Deref_pre_opt_bytecount_(size)
1141 #define _Deref_pre_opt_bytecount_c_(size)
1142 #define _Deref_pre_opt_bytecount_x_(size)
1143 #define _Deref_pre_opt_cap_(size)
1144 #define _Deref_pre_opt_cap_c_(size)
1145 #define _Deref_pre_opt_cap_x_(size)
1146 #define _Deref_pre_opt_count_(size)
1147 #define _Deref_pre_opt_count_c_(size)
1148 #define _Deref_pre_opt_count_x_(size)
1149 #define _Deref_pre_opt_valid_
1150 #define _Deref_pre_opt_valid_bytecap_(size)
1151 #define _Deref_pre_opt_valid_bytecap_c_(size)
1152 #define _Deref_pre_opt_valid_bytecap_x_(size)
1153 #define _Deref_pre_opt_valid_cap_(size)
1154 #define _Deref_pre_opt_valid_cap_c_(size)
1155 #define _Deref_pre_opt_valid_cap_x_(size)
1156 #define _Deref_pre_opt_z_
1157 #define _Deref_pre_opt_z_bytecap_(size)
1158 #define _Deref_pre_opt_z_bytecap_c_(size)
1159 #define _Deref_pre_opt_z_bytecap_x_(size)
1160 #define _Deref_pre_opt_z_cap_(size)
1161 #define _Deref_pre_opt_z_cap_c_(size)
1162 #define _Deref_pre_opt_z_cap_x_(size)
1163 #define _Deref_pre_readonly_
1164 #define _Deref_pre_valid_
1165 #define _Deref_pre_valid_bytecap_(size)
1166 #define _Deref_pre_valid_bytecap_c_(size)
1167 #define _Deref_pre_valid_bytecap_x_(size)
1168 #define _Deref_pre_valid_cap_(size)
1169 #define _Deref_pre_valid_cap_c_(size)
1170 #define _Deref_pre_valid_cap_x_(size)
1171 #define _Deref_pre_writeonly_
1172 #define _Deref_pre_z_
1173 #define _Deref_pre_z_bytecap_(size)
1174 #define _Deref_pre_z_bytecap_c_(size)
1175 #define _Deref_pre_z_bytecap_x_(size)
1176 #define _Deref_pre_z_cap_(size)
1177 #define _Deref_pre_z_cap_c_(size)
1178 #define _Deref_pre_z_cap_x_(size)
1179 #define _Deref_prepost_bytecap_(size)
1180 #define _Deref_prepost_bytecap_x_(size)
1181 #define _Deref_prepost_bytecount_(size)
1182 #define _Deref_prepost_bytecount_x_(size)
1183 #define _Deref_prepost_cap_(size)
1184 #define _Deref_prepost_cap_x_(size)
1185 #define _Deref_prepost_count_(size)
1186 #define _Deref_prepost_count_x_(size)
1187 #define _Deref_prepost_opt_bytecap_(size)
1188 #define _Deref_prepost_opt_bytecap_x_(size)
1189 #define _Deref_prepost_opt_bytecount_(size)
1190 #define _Deref_prepost_opt_bytecount_x_(size)
1191 #define _Deref_prepost_opt_cap_(size)
1192 #define _Deref_prepost_opt_cap_x_(size)
1193 #define _Deref_prepost_opt_count_(size)
1194 #define _Deref_prepost_opt_count_x_(size)
1195 #define _Deref_prepost_opt_valid_
1196 #define _Deref_prepost_opt_valid_bytecap_(size)
1197 #define _Deref_prepost_opt_valid_bytecap_x_(size)
1198 #define _Deref_prepost_opt_valid_cap_(size)
1199 #define _Deref_prepost_opt_valid_cap_x_(size)
1200 #define _Deref_prepost_opt_z_
1201 #define _Deref_prepost_opt_z_bytecap_(size)
1202 #define _Deref_prepost_opt_z_cap_(size)
1203 #define _Deref_prepost_valid_
1204 #define _Deref_prepost_valid_bytecap_(size)
1205 #define _Deref_prepost_valid_bytecap_x_(size)
1206 #define _Deref_prepost_valid_cap_(size)
1207 #define _Deref_prepost_valid_cap_x_(size)
1208 #define _Deref_prepost_z_
1209 #define _Deref_prepost_z_bytecap_(size)
1210 #define _Deref_prepost_z_cap_(size)
1211 #define _Deref_ret_bound_
1212 #define _Deref_ret_opt_z_
1213 #define _Deref_ret_range_(lb,ub)
1214 #define _Deref_ret_z_
1215 #define _Deref2_pre_readonly_
1216 #define _Field_range_(min,max)
1217 #define _Field_size_(size)
1218 #define _Field_size_bytes_(size)
1219 #define _Field_size_bytes_full_(size)
1220 #define _Field_size_bytes_full_opt_(size)
1221 #define _Field_size_bytes_opt_(size)
1222 #define _Field_size_bytes_part_(size, count)
1223 #define _Field_size_bytes_part_opt_(size, count)
1224 #define _Field_size_full_(size)
1225 #define _Field_size_full_opt_(size)
1226 #define _Field_size_opt_(size)
1227 #define _Field_size_part_(size, count)
1228 #define _Field_size_part_opt_(size, count)
1229 #define _Field_z_
1230 #define _Function_class_(x)
1231 #define _Group_(annos)
1232 #define _In_
1233 #define _In_bound_
1234 #define _In_bytecount_(size)
1235 #define _In_bytecount_c_(size)
1236 #define _In_bytecount_x_(size)
1237 #define _In_count_(size)
1238 #define _In_count_c_(size)
1239 #define _In_count_x_(size)
1240 #define _In_defensive_(annotes)
1241 #define _In_opt_
1242 #define _In_opt_bytecount_(size)
1243 #define _In_opt_bytecount_c_(size)
1244 #define _In_opt_bytecount_x_(size)
1245 #define _In_opt_count_(size)
1246 #define _In_opt_count_c_(size)
1247 #define _In_opt_count_x_(size)
1248 #define _In_opt_ptrdiff_count_(size)
1249 #define _In_opt_z_
1250 #define _In_opt_z_bytecount_(size)
1251 #define _In_opt_z_bytecount_c_(size)
1252 #define _In_opt_z_count_(size)
1253 #define _In_opt_z_count_c_(size)
1254 #define _In_ptrdiff_count_(size)
1255 #define _In_range_(lb,ub)
1256 #define _In_reads_(size)
1257 #define _In_reads_bytes_(size)
1258 #define _In_reads_bytes_opt_(size)
1259 #define _In_reads_opt_(size)
1260 #define _In_reads_opt_z_(size)
1261 #define _In_reads_or_z_(size)
1262 #define _In_reads_to_ptr_(ptr)
1263 #define _In_reads_to_ptr_opt_(ptr)
1264 #define _In_reads_to_ptr_opt_z_(ptr)
1265 #define _In_reads_to_ptr_z_(ptr)
1266 #define _In_reads_z_(size)
1267 #define _In_z_
1268 #define _In_z_bytecount_(size)
1269 #define _In_z_bytecount_c_(size)
1270 #define _In_z_count_(size)
1271 #define _In_z_count_c_(size)
1272 #define _Inout_
1273 #define _Inout_bytecap_(size)
1274 #define _Inout_bytecap_c_(size)
1275 #define _Inout_bytecap_x_(size)
1276 #define _Inout_bytecount_(size)
1277 #define _Inout_bytecount_c_(size)
1278 #define _Inout_bytecount_x_(size)
1279 #define _Inout_cap_(size)
1280 #define _Inout_cap_c_(size)
1281 #define _Inout_cap_x_(size)
1282 #define _Inout_count_(size)
1283 #define _Inout_count_c_(size)
1284 #define _Inout_count_x_(size)
1285 #define _Inout_defensive_(annotes)
1286 #define _Inout_opt_
1287 #define _Inout_opt_bytecap_(size)
1288 #define _Inout_opt_bytecap_c_(size)
1289 #define _Inout_opt_bytecap_x_(size)
1290 #define _Inout_opt_bytecount_(size)
1291 #define _Inout_opt_bytecount_c_(size)
1292 #define _Inout_opt_bytecount_x_(size)
1293 #define _Inout_opt_cap_(size)
1294 #define _Inout_opt_cap_c_(size)
1295 #define _Inout_opt_cap_x_(size)
1296 #define _Inout_opt_count_(size)
1297 #define _Inout_opt_count_c_(size)
1298 #define _Inout_opt_count_x_(size)
1299 #define _Inout_opt_ptrdiff_count_(size)
1300 #define _Inout_opt_z_
1301 #define _Inout_opt_z_bytecap_(size)
1302 #define _Inout_opt_z_bytecap_c_(size)
1303 #define _Inout_opt_z_bytecap_x_(size)
1304 #define _Inout_opt_z_bytecount_(size)
1305 #define _Inout_opt_z_bytecount_c_(size)
1306 #define _Inout_opt_z_cap_(size)
1307 #define _Inout_opt_z_cap_c_(size)
1308 #define _Inout_opt_z_cap_x_(size)
1309 #define _Inout_opt_z_count_(size)
1310 #define _Inout_opt_z_count_c_(size)
1311 #define _Inout_ptrdiff_count_(size)
1312 #define _Inout_updates_(size)
1313 #define _Inout_updates_all_(size)
1314 #define _Inout_updates_all_opt_(size)
1315 #define _Inout_updates_bytes_(size)
1316 #define _Inout_updates_bytes_all_(size)
1317 #define _Inout_updates_bytes_all_opt_(size)
1318 #define _Inout_updates_bytes_opt_(size)
1319 #define _Inout_updates_bytes_to_(size,count)
1320 #define _Inout_updates_bytes_to_opt_(size,count)
1321 #define _Inout_updates_opt_(size)
1322 #define _Inout_updates_opt_z_(size)
1323 #define _Inout_updates_to_(size,count)
1324 #define _Inout_updates_to_opt_(size,count)
1325 #define _Inout_updates_z_(size)
1326 #define _Inout_z_
1327 #define _Inout_z_bytecap_(size)
1328 #define _Inout_z_bytecap_c_(size)
1329 #define _Inout_z_bytecap_x_(size)
1330 #define _Inout_z_bytecount_(size)
1331 #define _Inout_z_bytecount_c_(size)
1332 #define _Inout_z_cap_(size)
1333 #define _Inout_z_cap_c_(size)
1334 #define _Inout_z_cap_x_(size)
1335 #define _Inout_z_count_(size)
1336 #define _Inout_z_count_c_(size)
1337 #define _Interlocked_operand_
1338 #define _Literal_
1339 #define _Maybenull_
1340 #define _Maybevalid_
1341 #define _Maybe_raises_SEH_exception
1342 #define _Must_inspect_result_
1343 #define _Notliteral_
1344 #define _Notnull_
1345 #define _Notref_
1346 #define _Notvalid_
1347 #define _Null_
1348 #define _Null_terminated_
1349 #define _NullNull_terminated_
1350 #define _On_failure_(annos)
1351 #define _Out_
1352 #define _Out_bound_
1353 #define _Out_bytecap_(size)
1354 #define _Out_bytecap_c_(size)
1355 #define _Out_bytecap_post_bytecount_(cap,count)
1356 #define _Out_bytecap_x_(size)
1357 #define _Out_bytecapcount_(capcount)
1358 #define _Out_bytecapcount_x_(capcount)
1359 #define _Out_cap_(size)
1360 #define _Out_cap_c_(size)
1361 #define _Out_cap_m_(mult,size)
1362 #define _Out_cap_post_count_(cap,count)
1363 #define _Out_cap_x_(size)
1364 #define _Out_capcount_(capcount)
1365 #define _Out_capcount_x_(capcount)
1366 #define _Out_defensive_(annotes)
1367 #define _Out_opt_
1368 #define _Out_opt_bytecap_(size)
1369 #define _Out_opt_bytecap_c_(size)
1370 #define _Out_opt_bytecap_post_bytecount_(cap,count)
1371 #define _Out_opt_bytecap_x_(size)
1372 #define _Out_opt_bytecapcount_(capcount)
1373 #define _Out_opt_bytecapcount_x_(capcount)
1374 #define _Out_opt_cap_(size)
1375 #define _Out_opt_cap_c_(size)
1376 #define _Out_opt_cap_m_(mult,size)
1377 #define _Out_opt_cap_post_count_(cap,count)
1378 #define _Out_opt_cap_x_(size)
1379 #define _Out_opt_capcount_(capcount)
1380 #define _Out_opt_capcount_x_(capcount)
1381 #define _Out_opt_ptrdiff_cap_(size)
1382 #define _Out_opt_z_bytecap_(size)
1383 #define _Out_opt_z_bytecap_c_(size)
1384 #define _Out_opt_z_bytecap_post_bytecount_(cap,count)
1385 #define _Out_opt_z_bytecap_x_(size)
1386 #define _Out_opt_z_bytecapcount_(capcount)
1387 #define _Out_opt_z_cap_(size)
1388 #define _Out_opt_z_cap_c_(size)
1389 #define _Out_opt_z_cap_m_(mult,size)
1390 #define _Out_opt_z_cap_post_count_(cap,count)
1391 #define _Out_opt_z_cap_x_(size)
1392 #define _Out_opt_z_capcount_(capcount)
1393 #define _Out_ptrdiff_cap_(size)
1394 #define _Out_range_(lb,ub)
1395 #define _Out_writes_(size)
1396 #define _Out_writes_all_(size)
1397 #define _Out_writes_all_opt_(size)
1398 #define _Out_writes_bytes_(size)
1399 #define _Out_writes_bytes_all_(size)
1400 #define _Out_writes_bytes_all_opt_(size)
1401 #define _Out_writes_bytes_opt_(size)
1402 #define _Out_writes_bytes_to_(size,count)
1403 #define _Out_writes_bytes_to_opt_(size,count)
1404 #define _Out_writes_opt_(size)
1405 #define _Out_writes_opt_z_(size)
1406 #define _Out_writes_to_(size,count)
1407 #define _Out_writes_to_opt_(size,count)
1408 #define _Out_writes_to_ptr_(ptr)
1409 #define _Out_writes_to_ptr_opt_(ptr)
1410 #define _Out_writes_to_ptr_opt_z_(ptr)
1411 #define _Out_writes_to_ptr_z_(ptr)
1412 #define _Out_writes_z_(size)
1413 #define _Out_z_bytecap_(size)
1414 #define _Out_z_bytecap_c_(size)
1415 #define _Out_z_bytecap_post_bytecount_(cap,count)
1416 #define _Out_z_bytecap_x_(size)
1417 #define _Out_z_bytecapcount_(capcount)
1418 #define _Out_z_cap_(size)
1419 #define _Out_z_cap_c_(size)
1420 #define _Out_z_cap_m_(mult,size)
1421 #define _Out_z_cap_post_count_(cap,count)
1422 #define _Out_z_cap_x_(size)
1423 #define _Out_z_capcount_(capcount)
1424 #define _Outptr_
1425 #define _Outptr_opt_
1426 #define _Outptr_opt_result_buffer_(size)
1427 #define _Outptr_opt_result_buffer_all_(size)
1428 #define _Outptr_opt_result_buffer_all_maybenull_(size)
1429 #define _Outptr_opt_result_buffer_maybenull_(size)
1430 #define _Outptr_opt_result_buffer_to_(size, count)
1431 #define _Outptr_opt_result_buffer_to_maybenull_(size, count)
1432 #define _Outptr_opt_result_bytebuffer_(size)
1433 #define _Outptr_opt_result_bytebuffer_all_(size)
1434 #define _Outptr_opt_result_bytebuffer_all_maybenull_(size)
1435 #define _Outptr_opt_result_bytebuffer_maybenull_(size)
1436 #define _Outptr_opt_result_bytebuffer_to_(size, count)
1437 #define _Outptr_opt_result_bytebuffer_to_maybenull_(size, count)
1438 #define _Outptr_opt_result_maybenull_
1439 #define _Outptr_opt_result_maybenull_z_
1440 #define _Outptr_opt_result_nullonfailure_
1441 #define _Outptr_opt_result_z_
1442 #define _Outptr_result_buffer_(size)
1443 #define _Outptr_result_buffer_all_(size)
1444 #define _Outptr_result_buffer_all_maybenull_(size)
1445 #define _Outptr_result_buffer_maybenull_(size)
1446 #define _Outptr_result_buffer_to_(size, count)
1447 #define _Outptr_result_buffer_to_maybenull_(size, count)
1448 #define _Outptr_result_bytebuffer_(size)
1449 #define _Outptr_result_bytebuffer_all_(size)
1450 #define _Outptr_result_bytebuffer_all_maybenull_(size)
1451 #define _Outptr_result_bytebuffer_maybenull_(size)
1452 #define _Outptr_result_bytebuffer_to_(size, count)
1453 #define _Outptr_result_bytebuffer_to_maybenull_(size, count)
1454 #define _Outptr_result_maybenull_
1455 #define _Outptr_result_maybenull_z_
1456 #define _Outptr_result_nullonfailure_
1457 #define _Outptr_result_z_
1458 #define _Outref_
1459 #define _Outref_result_buffer_(size)
1460 #define _Outref_result_buffer_all_(size)
1461 #define _Outref_result_buffer_all_maybenull_(size)
1462 #define _Outref_result_buffer_maybenull_(size)
1463 #define _Outref_result_buffer_to_(size, count)
1464 #define _Outref_result_buffer_to_maybenull_(size, count)
1465 #define _Outref_result_bytebuffer_(size)
1466 #define _Outref_result_bytebuffer_all_(size)
1467 #define _Outref_result_bytebuffer_all_maybenull_(size)
1468 #define _Outref_result_bytebuffer_maybenull_(size)
1469 #define _Outref_result_bytebuffer_to_(size, count)
1470 #define _Outref_result_bytebuffer_to_maybenull_(size, count)
1471 #define _Outref_result_maybenull_
1472 #define _Outref_result_nullonfailure_
1473 #define _Points_to_data_
1474 #define _Post_
1475 #define _Post_bytecap_(size)
1476 #define _Post_bytecount_(size)
1477 #define _Post_bytecount_c_(size)
1478 #define _Post_bytecount_x_(size)
1479 #define _Post_cap_(size)
1480 #define _Post_count_(size)
1481 #define _Post_count_c_(size)
1482 #define _Post_count_x_(size)
1483 #define _Post_defensive_
1484 #define _Post_equal_to_(expr)
1485 #define _Post_invalid_
1486 #define _Post_maybenull_
1487 #define _Post_maybez_
1488 #define _Post_notnull_
1489 #define _Post_null_
1490 #define _Post_ptr_invalid_
1491 #define _Post_readable_byte_size_(size)
1492 #define _Post_readable_size_(size)
1493 #define _Post_satisfies_(cond)
1494 #define _Post_valid_
1495 #define _Post_writable_byte_size_(size)
1496 #define _Post_writable_size_(size)
1497 #define _Post_z_
1498 #define _Post_z_bytecount_(size)
1499 #define _Post_z_bytecount_c_(size)
1500 #define _Post_z_bytecount_x_(size)
1501 #define _Post_z_count_(size)
1502 #define _Post_z_count_c_(size)
1503 #define _Post_z_count_x_(size)
1504 #define _Pre_
1505 #define _Pre_bytecap_(size)
1506 #define _Pre_bytecap_c_(size)
1507 #define _Pre_bytecap_x_(size)
1508 #define _Pre_bytecount_(size)
1509 #define _Pre_bytecount_c_(size)
1510 #define _Pre_bytecount_x_(size)
1511 #define _Pre_cap_(size)
1512 #define _Pre_cap_c_(size)
1513 #define _Pre_cap_c_one_
1514 #define _Pre_cap_for_(param)
1515 #define _Pre_cap_m_(mult,size)
1516 #define _Pre_cap_x_(size)
1517 #define _Pre_count_(size)
1518 #define _Pre_count_c_(size)
1519 #define _Pre_count_x_(size)
1520 #define _Pre_defensive_
1521 #define _Pre_equal_to_(expr)
1522 #define _Pre_invalid_
1523 #define _Pre_maybenull_
1524 #define _Pre_notnull_
1525 #define _Pre_null_
1526 #define _Pre_opt_bytecap_(size)
1527 #define _Pre_opt_bytecap_c_(size)
1528 #define _Pre_opt_bytecap_x_(size)
1529 #define _Pre_opt_bytecount_(size)
1530 #define _Pre_opt_bytecount_c_(size)
1531 #define _Pre_opt_bytecount_x_(size)
1532 #define _Pre_opt_cap_(size)
1533 #define _Pre_opt_cap_c_(size)
1534 #define _Pre_opt_cap_c_one_
1535 #define _Pre_opt_cap_for_(param)
1536 #define _Pre_opt_cap_m_(mult,size)
1537 #define _Pre_opt_cap_x_(size)
1538 #define _Pre_opt_count_(size)
1539 #define _Pre_opt_count_c_(size)
1540 #define _Pre_opt_count_x_(size)
1541 #define _Pre_opt_ptrdiff_cap_(ptr)
1542 #define _Pre_opt_ptrdiff_count_(ptr)
1543 #define _Pre_opt_valid_
1544 #define _Pre_opt_valid_bytecap_(size)
1545 #define _Pre_opt_valid_bytecap_c_(size)
1546 #define _Pre_opt_valid_bytecap_x_(size)
1547 #define _Pre_opt_valid_cap_(size)
1548 #define _Pre_opt_valid_cap_c_(size)
1549 #define _Pre_opt_valid_cap_x_(size)
1550 #define _Pre_opt_z_
1551 #define _Pre_opt_z_bytecap_(size)
1552 #define _Pre_opt_z_bytecap_c_(size)
1553 #define _Pre_opt_z_bytecap_x_(size)
1554 #define _Pre_opt_z_cap_(size)
1555 #define _Pre_opt_z_cap_c_(size)
1556 #define _Pre_opt_z_cap_x_(size)
1557 #define _Pre_ptrdiff_cap_(ptr)
1558 #define _Pre_ptrdiff_count_(ptr)
1559 #define _Pre_readable_byte_size_(size)
1560 #define _Pre_readable_size_(size)
1561 #define _Pre_readonly_
1562 #define _Pre_satisfies_(cond)
1563 #define _Pre_valid_
1564 #define _Pre_valid_bytecap_(size)
1565 #define _Pre_valid_bytecap_c_(size)
1566 #define _Pre_valid_bytecap_x_(size)
1567 #define _Pre_valid_cap_(size)
1568 #define _Pre_valid_cap_c_(size)
1569 #define _Pre_valid_cap_x_(size)
1570 #define _Pre_writable_byte_size_(size)
1571 #define _Pre_writable_size_(size)
1572 #define _Pre_writeonly_
1573 #define _Pre_z_
1574 #define _Pre_z_bytecap_(size)
1575 #define _Pre_z_bytecap_c_(size)
1576 #define _Pre_z_bytecap_x_(size)
1577 #define _Pre_z_cap_(size)
1578 #define _Pre_z_cap_c_(size)
1579 #define _Pre_z_cap_x_(size)
1580 #define _Prepost_bytecount_(size)
1581 #define _Prepost_bytecount_c_(size)
1582 #define _Prepost_bytecount_x_(size)
1583 #define _Prepost_count_(size)
1584 #define _Prepost_count_c_(size)
1585 #define _Prepost_count_x_(size)
1586 #define _Prepost_opt_bytecount_(size)
1587 #define _Prepost_opt_bytecount_c_(size)
1588 #define _Prepost_opt_bytecount_x_(size)
1589 #define _Prepost_opt_count_(size)
1590 #define _Prepost_opt_count_c_(size)
1591 #define _Prepost_opt_count_x_(size)
1592 #define _Prepost_opt_valid_
1593 #define _Prepost_opt_z_
1594 #define _Prepost_valid_
1595 #define _Prepost_z_
1596 #define _Printf_format_string_
1597 #define _Raises_SEH_exception_
1598 #define _Maybe_raises_SEH_exception_
1599 #define _Readable_bytes_(size)
1600 #define _Readable_elements_(size)
1601 #define _Reserved_
1602 #define _Result_nullonfailure_
1603 #define _Result_zeroonfailure_
1604 #define __inner_callback
1605 #define _Ret_
1606 #define _Ret_bound_
1607 #define _Ret_bytecap_(size)
1608 #define _Ret_bytecap_c_(size)
1609 #define _Ret_bytecap_x_(size)
1610 #define _Ret_bytecount_(size)
1611 #define _Ret_bytecount_c_(size)
1612 #define _Ret_bytecount_x_(size)
1613 #define _Ret_cap_(size)
1614 #define _Ret_cap_c_(size)
1615 #define _Ret_cap_x_(size)
1616 #define _Ret_count_(size)
1617 #define _Ret_count_c_(size)
1618 #define _Ret_count_x_(size)
1619 #define _Ret_maybenull_
1620 #define _Ret_maybenull_z_
1621 #define _Ret_notnull_
1622 #define _Ret_null_
1623 #define _Ret_opt_
1624 #define _Ret_opt_bytecap_(size)
1625 #define _Ret_opt_bytecap_c_(size)
1626 #define _Ret_opt_bytecap_x_(size)
1627 #define _Ret_opt_bytecount_(size)
1628 #define _Ret_opt_bytecount_c_(size)
1629 #define _Ret_opt_bytecount_x_(size)
1630 #define _Ret_opt_cap_(size)
1631 #define _Ret_opt_cap_c_(size)
1632 #define _Ret_opt_cap_x_(size)
1633 #define _Ret_opt_count_(size)
1634 #define _Ret_opt_count_c_(size)
1635 #define _Ret_opt_count_x_(size)
1636 #define _Ret_opt_valid_
1637 #define _Ret_opt_z_
1638 #define _Ret_opt_z_bytecap_(size)
1639 #define _Ret_opt_z_bytecount_(size)
1640 #define _Ret_opt_z_cap_(size)
1641 #define _Ret_opt_z_count_(size)
1642 #define _Ret_range_(lb,ub)
1643 #define _Ret_valid_
1644 #define _Ret_writes_(size)
1645 #define _Ret_writes_bytes_(size)
1646 #define _Ret_writes_bytes_maybenull_(size)
1647 #define _Ret_writes_bytes_to_(size,count)
1648 #define _Ret_writes_bytes_to_maybenull_(size,count)
1649 #define _Ret_writes_maybenull_(size)
1650 #define _Ret_writes_maybenull_z_(size)
1651 #define _Ret_writes_to_(size,count)
1652 #define _Ret_writes_to_maybenull_(size,count)
1653 #define _Ret_writes_z_(size)
1654 #define _Ret_z_
1655 #define _Ret_z_bytecap_(size)
1656 #define _Ret_z_bytecount_(size)
1657 #define _Ret_z_cap_(size)
1658 #define _Ret_z_count_(size)
1659 #define _Return_type_success_(expr)
1660 #define _Scanf_format_string_
1661 #define _Scanf_s_format_string_
1662 #define _Struct_size_bytes_(size)
1663 #define _Success_(expr)
1664 #define _Unchanged_(e)
1665 #define _Use_decl_annotations_
1666 #define _Valid_
1667 #define _When_(expr, annos)
1668 #define _Writable_bytes_(size)
1669 #define _Writable_elements_(size)
1670
1671 #endif /* _USE_ATTRIBUTES_FOR_SAL || _USE_DECLSPECS_FOR_SAL */
1672