ReactOS  0.4.14-dev-604-gcfdd483
specstrings.h
Go to the documentation of this file.
1 /*
2  * specstrings.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 SPECSTRINGS_H
25 
26 #include <sal.h>
27 #include <driverspecs.h>
28 
29 #define __field_bcount(size) __notnull __byte_writableTo(size)
30 #define __field_bcount_full(size) __notnull __byte_writableTo(size) __byte_readableTo(size)
31 #define __field_ecount(size) __notnull __elem_writableTo(size)
32 #define __post_invalid _Post_ __notvalid
33 
34 #define __deref_in
35 #define __deref_in_ecount(size)
36 #define __deref_in_bcount(size)
37 #define __deref_in_opt
38 #define __deref_in_ecount_opt(size)
39 #define __deref_in_bcount_opt(size)
40 #define __deref_opt_in
41 #define __deref_opt_in_ecount(size)
42 #define __deref_opt_in_bcount(size)
43 #define __deref_opt_in_opt
44 #define __deref_opt_in_ecount_opt(size)
45 #define __deref_opt_in_bcount_opt(size)
46 #define __out_awcount(expr,size)
47 #define __in_awcount(expr,size)
48 #define __nullnullterminated
49 #define __in_data_source(src_sym)
50 #define __kernel_entry
51 
52 #if (_MSC_VER >= 1000) && !defined(__midl) && defined(_PREFAST_)
53 
54 #define __inner_data_source(src_raw) _SA_annotes1(SAL_untrusted_data_source,src_raw)
55 #define __out_data_source(src_sym) _Post_ __inner_data_source(#src_sym)
56 #define __analysis_noreturn __declspec(noreturn)
57 
58 #else
59 
60 #define __out_data_source(src_sym)
61 #define __analysis_noreturn
62 
63 #endif
64 
65 #if defined(_PREFAST_) && defined(_PFT_SHOULD_CHECK_RETURN)
66 #define _Check_return_opt_ _Check_return_
67 #else
68 #define _Check_return_opt_
69 #endif
70 
71 #if defined(_PREFAST_) && defined(_PFT_SHOULD_CHECK_RETURN_WAT)
72 #define _Check_return_wat_ _Check_return_
73 #else
74 #define _Check_return_wat_
75 #endif