RetroArch
rpcsal.h
Go to the documentation of this file.
1 /****************************************************************\
2 * *
3 * rpcsal.h - markers for documenting the semantics of RPC APIs *
4 * *
5 * Version 1.0 *
6 * *
7 * Copyright (c) 2004 Microsoft Corporation. All rights reserved. *
8 * *
9 \****************************************************************/
10 
11 // -------------------------------------------------------------------------------
12 // Introduction
13 //
14 // rpcsal.h provides a set of annotations to describe how RPC functions use their
15 // parameters - the assumptions it makes about them, adn the guarantees it makes
16 // upon finishing. These annotations are similar to those found in specstrings.h,
17 // but are designed to be used by the MIDL compiler when it generates annotations
18 // enabled header files.
19 //
20 // IDL authors do not need to annotate their functions declarations. The MIDL compiler
21 // will interpret the IDL directives and use one of the annotations contained
22 // in this header. This documentation is intended to help those trying to understand
23 // the MIDL-generated header files or those who maintain their own copies of these files.
24 //
25 // -------------------------------------------------------------------------------
26 // Differences between rpcsal.h and specstrings.h
27 //
28 // There are a few important differences between the annotations found in rpcsal.h and
29 // those in specstrings.h:
30 //
31 // 1. [in] parameters are not marked as read-only. They may be used for scratch space
32 // at the server and changes will not affect the client.
33 // 2. String versions of each macro alleviates the need for a special type definition
34 //
35 // -------------------------------------------------------------------------------
36 // Interpreting RPC Annotations
37 //
38 // These annotations are interpreted precisely in the same way as those in specstrings.h.
39 // Please refer to that header for information related to general usage in annotations.
40 //
41 // To construct an RPC annotation, concatenate the appropriate value from each category
42 // along with a leading __RPC_. A typical annotation looks like "__RPC__in_string".
43 //
44 // |----------------------------------------------------------------------------------|
45 // | RPC Annotations |
46 // |------------|------------|---------|--------|----------|----------|---------------|
47 // | Level | Usage | Size | Output | Optional | String | Parameters |
48 // |------------|------------|---------|--------|----------|----------|---------------|
49 // | <> | <> | <> | <> | <> | <> | <> |
50 // | _deref | _in | _ecount | _full | _opt | _string | (size) |
51 // | _deref_opt | _out | _bcount | _part | | | (size,length) |
52 // | | _inout | | | | | |
53 // | | | | | | | |
54 // |------------|------------|---------|--------|----------|----------|---------------|
55 //
56 // Level: Describes the buffer pointer's level of indirection from the parameter or
57 // return value 'p'.
58 //
59 // <> : p is the buffer pointer.
60 // _deref : *p is the buffer pointer. p must not be NULL.
61 // _deref_opt : *p may be the buffer pointer. p may be NULL, in which case the rest of
62 // the annotation is ignored.
63 //
64 // Usage: Describes how the function uses the buffer.
65 //
66 // <> : The buffer is not accessed. If used on the return value or with _deref, the
67 // function will provide the buffer, and it will be uninitialized at exit.
68 // Otherwise, the caller must provide the buffer. This should only be used
69 // for alloc and free functions.
70 // _in : The function will only read from the buffer. The caller must provide the
71 // buffer and initialize it. Cannot be used with _deref.
72 // _out : The function will only write to the buffer. If used on the return value or
73 // with _deref, the function will provide the buffer and initialize it.
74 // Otherwise, the caller must provide the buffer, and the function will
75 // initialize it.
76 // _inout : The function may freely read from and write to the buffer. The caller must
77 // provide the buffer and initialize it. If used with _deref, the buffer may
78 // be reallocated by the function.
79 //
80 // Size: Describes the total size of the buffer. This may be less than the space actually
81 // allocated for the buffer, in which case it describes the accessible amount.
82 //
83 // <> : No buffer size is given. If the type specifies the buffer size (such as
84 // with LPSTR and LPWSTR), that amount is used. Otherwise, the buffer is one
85 // element long. Must be used with _in, _out, or _inout.
86 // _ecount : The buffer size is an explicit element count.
87 // _bcount : The buffer size is an explicit byte count.
88 //
89 // Output: Describes how much of the buffer will be initialized by the function. For
90 // _inout buffers, this also describes how much is initialized at entry. Omit this
91 // category for _in buffers; they must be fully initialized by the caller.
92 //
93 // <> : The type specifies how much is initialized. For instance, a function initializing
94 // an LPWSTR must NULL-terminate the string.
95 // _full : The function initializes the entire buffer.
96 // _part : The function initializes part of the buffer, and explicitly indicates how much.
97 //
98 // Optional: Describes if the buffer itself is optional.
99 //
100 // <> : The pointer to the buffer must not be NULL.
101 // _opt : The pointer to the buffer might be NULL. It will be checked before being dereferenced.
102 //
103 // String: Describes if the buffer is NULL terminated
104 //
105 // <> : The buffer is not assumed to be NULL terminated
106 // _string : The buffer is assumed to be NULL terminated once it has been initialized
107 //
108 // Parameters: Gives explicit counts for the size and length of the buffer.
109 //
110 // <> : There is no explicit count. Use when neither _ecount nor _bcount is used.
111 // (size) : Only the buffer's total size is given. Use with _ecount or _bcount but not _part.
112 // (size,length) : The buffer's total size and initialized length are given. Use with _ecount_part
113 // and _bcount_part.
114 //
115 // Notes:
116 //
117 // 1. Specifying two buffer annotations on a single parameter results in unspecified behavior
118 // (e.g. __RPC__in_bcount(5) __RPC__out_bcount(6)
119 //
120 // 2. The size of the buffer and the amount that has been initialized are separate concepts.
121 // Specify the size using _ecount or _bcount. Specify the amount that is initialized using
122 // _full, _part, or _string. As a special case, a single element buffer does not need
123 // _ecount, _bcount, _full, or _part
124 //
125 // 3. The count may be less than the total size of the buffer in which case it describes the
126 // accessible portion.
127 //
128 // 4. "__RPC__opt" and "__RPC_deref" are not valid annotations.
129 //
130 // 5. The placement of _opt when using _deref is important:
131 // __RPC__deref_opt_... : Input may be NULL
132 // __RPC__deref_..._opt : Output may be NULL
133 // __RPC__deref_opt_..._opt : Both input and output may be NULL
134 //
135 
136 #pragma once
137 
138 #include <specstrings.h>
139 
140 #ifndef __RPCSAL_H_VERSION__
141 #define __RPCSAL_H_VERSION__ ( 100 )
142 #endif // __RPCSAL_H_VERSION__
143 
144 #ifdef __REQUIRED_RPCSAL_H_VERSION__
145  #if ( __RPCSAL_H_VERSION__ < __REQUIRED_RPCSAL_H_VERSION__ )
146  #error incorrect <rpcsal.h> version. Use the header that matches with the MIDL compiler.
147  #endif
148 #endif
149 
150 
151 #ifdef __cplusplus
152 extern "C" {
153 #endif // #ifdef __cplusplus
154 
155 
156 #ifndef _SAL1_2_Source_
157 #define _SAL1_2_Source_(Name, args, annotes) _SA_annotes3(SAL_name, #Name, "", "1.2") _Group_(annotes _SAL_nop_impl_)
158 #endif // _SAL1_2_Source_
159 
160 // [in]
161 #define __RPC__in _SAL1_2_Source_(__RPC__in, (), _Pre_ _Notref_ _Notnull_ _Pre_ _Valid_)
162 #define __RPC__in_string _SAL1_2_Source_(__RPC__in_string, (), __RPC__in _Pre_ _Null_terminated_)
163 #define __RPC__in_ecount(size) _SAL1_2_Source_(__RPC__in_ecount, (size), __RPC__in _Pre_readable_size_(size))
164 #define __RPC__in_ecount_full(size) _SAL1_2_Source_(__RPC__in_ecount_full, (size), __RPC__in_ecount(size))
165 #define __RPC__in_ecount_full_string(size) _SAL1_2_Source_(__RPC__in_ecount_full_string, (size), __RPC__in_ecount_full(size) _Pre_ _Null_terminated_)
166 #define __RPC__in_ecount_part(size, length) _SAL1_2_Source_(__RPC__in_ecount_part, (size,length), __RPC__in_ecount(length) _Pre_writable_size_(size))
167 #define __RPC__in_xcount(size) _SAL1_2_Source_(__RPC__in_xcount, (size), __RPC__in _Pre_readable_size_(size))
168 #define __RPC__in_xcount_full(size) _SAL1_2_Source_(__RPC__in_xcount_full, (size), __RPC__in_ecount(size))
169 #define __RPC__in_xcount_full_string(size) _SAL1_2_Source_(__RPC__in_xcount_full_string, (size), __RPC__in_ecount_full(size) _Pre_ _Null_terminated_)
170 #define __RPC__in_xcount_part(size, length) _SAL1_2_Source_(__RPC__in_xcount_part, (size,length), __RPC__in_ecount(length) _Pre_writable_size_(size))
171 
172 
173 #define __RPC__deref_in _SAL1_2_Source_(__RPC__deref_in, (), __RPC__in _At_(*_Curr_, _Pre_ _Notnull_))
174 #define __RPC__deref_in_string _SAL1_2_Source_(__RPC__deref_in_string, (), __RPC__deref_in _At_(*_Curr_, _Pre_ _Null_terminated_))
175 #define __RPC__deref_in_opt _SAL1_2_Source_(__RPC__deref_in_opt, (), __RPC__in _At_(*_Curr_, _Pre_ _Maybenull_))
176 #define __RPC__deref_in_opt_string _SAL1_2_Source_(__RPC__deref_in_opt_string, (), __RPC__deref_in_opt _At_(*_Curr_, _Pre_ _Null_terminated_))
177 #define __RPC__deref_opt_in _SAL1_2_Source_(__RPC__deref_opt_in, (), __RPC__in_opt _At_(*_Curr_, _Pre_ _Notnull_))
178 #define __RPC__deref_opt_in_string _SAL1_2_Source_(__RPC__deref_opt_in_string, (), __RPC__deref_opt_in _At_(*_Curr_, _Pre_ _Null_terminated_))
179 #define __RPC__deref_opt_in_opt _SAL1_2_Source_(__RPC__deref_opt_in_opt, (), __RPC__in_opt _At_(*_Curr_, _Pre_ _Maybenull_))
180 #define __RPC__deref_opt_in_opt_string _SAL1_2_Source_(__RPC__deref_opt_in_opt_string, (), __RPC__deref_opt_in_opt _At_(*_Curr_, _Pre_ _Null_terminated_))
181 #define __RPC__deref_in_ecount(size) _SAL1_2_Source_(__RPC__deref_in_ecount, (size), __RPC__in _At_(*_Curr_, _Pre_ _Notnull_ _Pre_readable_size_(size)))
182 #define __RPC__deref_in_ecount_part(size, length) _SAL1_2_Source_(__RPC__deref_in_ecount_part, (size,length), __RPC__deref_in_ecount(size) _At_(*_Curr_, _Pre_readable_size_(length)))
183 #define __RPC__deref_in_ecount_full(size) _SAL1_2_Source_(__RPC__deref_in_ecount_full, (size), __RPC__deref_in_ecount_part(size, size))
184 #define __RPC__deref_in_ecount_full_opt(size) _SAL1_2_Source_(__RPC__deref_in_ecount_full_opt, (size), __RPC__deref_in_ecount_part_opt(size, size))
185 #define __RPC__deref_in_ecount_full_opt_string(size) _SAL1_2_Source_(__RPC__deref_in_ecount_full_opt_string, (size), __RPC__deref_in_ecount_full_opt(size) _At_(*_Curr_, _Pre_ _Null_terminated_))
186 #define __RPC__deref_in_ecount_full_string(size) _SAL1_2_Source_(__RPC__deref_in_ecount_full_string, (size), __RPC__deref_in_ecount_full(size) _At_(*_Curr_, _Pre_ _Null_terminated_))
187 #define __RPC__deref_in_ecount_opt(size) _SAL1_2_Source_(__RPC__deref_in_ecount_opt, (size), __RPC__in _At_(*_Curr_, _Pre_ _Maybenull_ _Pre_readable_size_(size)))
188 #define __RPC__deref_in_ecount_opt_string(size) _SAL1_2_Source_(__RPC__deref_in_ecount_opt_string, (size), __RPC__deref_in_ecount_opt(size) _At_(*_Curr_, _Pre_ _Null_terminated_))
189 #define __RPC__deref_in_ecount_part_opt(size, length) _SAL1_2_Source_(__RPC__deref_in_ecount_part_opt, (size,length), __RPC__deref_in_ecount_opt(size) _At_(*_Curr_, _Pre_readable_size_(length)))
190 #define __RPC__deref_in_xcount(size) _SAL1_2_Source_(__RPC__deref_in_xcount, (size), __RPC__deref_in_ecount(size))
191 #define __RPC__deref_in_xcount_part(size, length) _SAL1_2_Source_(__RPC__deref_in_xcount_part, (size,length), __RPC__deref_in_ecount_part(size, length))
192 #define __RPC__deref_in_xcount_full(size) _SAL1_2_Source_(__RPC__deref_in_xcount_full, (size), __RPC__deref_in_ecount_part(size, size))
193 #define __RPC__deref_in_xcount_full_opt(size) _SAL1_2_Source_(__RPC__deref_in_xcount_full_opt, (size), __RPC__deref_in_ecount_full_opt(size))
194 #define __RPC__deref_in_xcount_full_opt_string(size) _SAL1_2_Source_(__RPC__deref_in_xcount_full_opt_string, (size), __RPC__deref_in_ecount_full_opt_string(size))
195 #define __RPC__deref_in_xcount_full_string(size) _SAL1_2_Source_(__RPC__deref_in_xcount_full_string, (size), __RPC__deref_in_ecount_full_string(size))
196 #define __RPC__deref_in_xcount_opt(size) _SAL1_2_Source_(__RPC__deref_in_xcount_opt, (size), __RPC__deref_in_ecount_opt(size))
197 #define __RPC__deref_in_xcount_opt_string(size) _SAL1_2_Source_(__RPC__deref_in_xcount_opt_string, (size), __RPC__deref_in_ecount_opt_string(size))
198 #define __RPC__deref_in_xcount_part_opt(size, length) _SAL1_2_Source_(__RPC__deref_in_xcount_part_opt, (size,length), __RPC__deref_in_ecount_part_opt(size))
199 
200 // [out]
201 #define __RPC__out _SAL1_2_Source_(__RPC__out, (), _Out_)
202 #define __RPC__out_ecount(size) _SAL1_2_Source_(__RPC__out_ecount, (size), _Out_writes_(size) _Post_writable_size_(size))
203 #define __RPC__out_ecount_string(size) _SAL1_2_Source_(__RPC__out_ecount_string, (size), __RPC__out_ecount(size) _Post_ _Null_terminated_)
204 #define __RPC__out_ecount_part(size, length) _SAL1_2_Source_(__RPC__out_ecount_part, (size,length), __RPC__out_ecount(size) _Post_readable_size_(length))
205 #define __RPC__out_ecount_full(size) _SAL1_2_Source_(__RPC__out_ecount_full, (size), __RPC__out_ecount_part(size, size))
206 #define __RPC__out_ecount_full_string(size) _SAL1_2_Source_(__RPC__out_ecount_full_string, (size), __RPC__out_ecount_full(size) _Post_ _Null_terminated_)
207 #define __RPC__out_xcount(size) _SAL1_2_Source_(__RPC__out_xcount, (size), _Out_)
208 #define __RPC__out_xcount_string(size) _SAL1_2_Source_(__RPC__out_xcount_string, (size), __RPC__out _Post_ _Null_terminated_)
209 #define __RPC__out_xcount_part(size, length) _SAL1_2_Source_(__RPC__out_xcount_part, (size,length), __RPC__out)
210 #define __RPC__out_xcount_full(size) _SAL1_2_Source_(__RPC__out_xcount_full, (size), __RPC__out)
211 #define __RPC__out_xcount_full_string(size) _SAL1_2_Source_(__RPC__out_xcount_full_string, (size), __RPC__out _Post_ _Null_terminated_)
212 
213 // [in,out]
214 #define __RPC__inout _SAL1_2_Source_(__RPC__inout, (), _Inout_)
215 #define __RPC__inout_string _SAL1_2_Source_(__RPC__inout_string, (), __RPC__inout _Pre_ _Null_terminated_ _Post_ _Null_terminated_)
216 #define __RPC__inout_ecount(size) _SAL1_2_Source_(__RPC__inout_ecount, (size), _Inout_updates_(size))
217 #define __RPC__inout_ecount_part(size, length) _SAL1_2_Source_(__RPC__inout_ecount_part, (size,length), _Inout_updates_to_(size, length))
218 #define __RPC__inout_ecount_full(size) _SAL1_2_Source_(__RPC__inout_ecount_full, (size), __RPC__inout_ecount_part(size, size))
219 #define __RPC__inout_ecount_full_string(size) _SAL1_2_Source_(__RPC__inout_ecount_full_string, (size), __RPC__inout_ecount_full(size) _Pre_ _Null_terminated_ _Post_ _Null_terminated_)
220 #define __RPC__inout_xcount(size) _SAL1_2_Source_(__RPC__inout_xcount, (size), _Inout_)
221 #define __RPC__inout_xcount_part(size, length) _SAL1_2_Source_(__RPC__inout_xcount_part, (size,length), _Inout_)
222 #define __RPC__inout_xcount_full(size) _SAL1_2_Source_(__RPC__inout_xcount_full, (size), __RPC__inout)
223 #define __RPC__inout_xcount_full_string(size) _SAL1_2_Source_(__RPC__inout_xcount_full_string, (size), __RPC__inout _Pre_ _Null_terminated_ _Post_ _Null_terminated_)
224 
225 // [in,unique]
226 #define __RPC__in_opt _SAL1_2_Source_(__RPC__in_opt, (), _Pre_ _Notref_ _Maybenull_ _Pre_ _Valid_)
227 #define __RPC__in_opt_string _SAL1_2_Source_(__RPC__in_opt_string, (), __RPC__in_opt _Pre_ _Null_terminated_)
228 #define __RPC__in_ecount_opt(size) _SAL1_2_Source_(__RPC__in_ecount_opt, (size), __RPC__in_opt _Pre_readable_size_(size))
229 #define __RPC__in_ecount_opt_string(size) _SAL1_2_Source_(__RPC__in_ecount_opt_string, (size), __RPC__in_ecount_opt(size) _Pre_ _Null_terminated_)
230 #define __RPC__in_ecount_full_opt(size) _SAL1_2_Source_(__RPC__in_ecount_full_opt, (size), __RPC__in_ecount_opt(size))
231 #define __RPC__in_ecount_full_opt_string(size) _SAL1_2_Source_(__RPC__in_ecount_full_opt_string, (size), __RPC__in_ecount_full_opt(size) _Pre_ _Null_terminated_)
232 #define __RPC__in_ecount_part_opt(size, length) _SAL1_2_Source_(__RPC__in_ecount_part_opt, (size,length), __RPC__in_ecount_opt(length) _Pre_writable_size_(size))
233 #define __RPC__in_xcount_full_opt(size) _SAL1_2_Source_(__RPC__in_xcount_full_opt, (size), __RPC__in_ecount_opt(size))
234 #define __RPC__in_xcount_full_opt_string(size) _SAL1_2_Source_(__RPC__in_xcount_full_opt_string, (size), __RPC__in_ecount_full_opt(size) _Pre_ _Null_terminated_)
235 #define __RPC__in_xcount_part_opt(size, length) _SAL1_2_Source_(__RPC__in_xcount_part_opt, (size,length), __RPC__in_ecount_part_opt(size, length))
236 #define __RPC__in_xcount_opt(size) _SAL1_2_Source_(__RPC__in_xcount_opt, (size), __RPC__in_ecount_opt(size))
237 #define __RPC__in_xcount_opt_string(size) _SAL1_2_Source_(__RPC__in_xcount_opt_string, (size), __RPC__in_ecount_opt(size) _Pre_ _Null_terminated_)
238 
239 // [in,out,unique]
240 #define __RPC__inout_opt _SAL1_2_Source_(__RPC__inout_opt, (), _Inout_opt_)
241 #define __RPC__inout_opt_string _SAL1_2_Source_(__RPC__inout_opt_string, (), __RPC__inout_opt _Pre_ _Null_terminated_)
242 #define __RPC__inout_ecount_opt(size) _SAL1_2_Source_(__RPC__inout_ecount_opt, (size), _Inout_updates_opt_(size))
243 #define __RPC__inout_ecount_part_opt(size, length) _SAL1_2_Source_(__RPC__inout_ecount_part_opt, (size,length), _Inout_updates_to_opt_(size, length))
244 #define __RPC__inout_ecount_full_opt(size) _SAL1_2_Source_(__RPC__inout_ecount_full_opt, (size), __RPC__inout_ecount_part_opt(size, size))
245 #define __RPC__inout_ecount_full_opt_string(size) _SAL1_2_Source_(__RPC__inout_ecount_full_opt_string, (size), __RPC__inout_ecount_full_opt(size) _Pre_ _Null_terminated_ _Post_ _Null_terminated_)
246 #define __RPC__inout_xcount_opt(size) _SAL1_2_Source_(__RPC__inout_xcount_opt, (size), _Inout_opt_)
247 #define __RPC__inout_xcount_part_opt(size, length) _SAL1_2_Source_(__RPC__inout_xcount_part_opt, (size,length), _Inout_opt_)
248 #define __RPC__inout_xcount_full_opt(size) _SAL1_2_Source_(__RPC__inout_xcount_full_opt, (size), __RPC__inout_opt)
249 #define __RPC__inout_xcount_full_opt_string(size) _SAL1_2_Source_(__RPC__inout_xcount_full_opt_string, (size), __RPC__inout_opt _Pre_ _Null_terminated_ _Post_ _Null_terminated_)
250 
251 // [out] **
252 #define __RPC__deref_out _SAL1_2_Source_(__RPC__deref_out, (), _Outptr_)
253 #define __RPC__deref_out_string _SAL1_2_Source_(__RPC__deref_out_string, (), _Outptr_result_z_)
254 #define __RPC__deref_out_opt _SAL1_2_Source_(__RPC__deref_out_opt, (), __RPC__deref_out)
255 #define __RPC__deref_out_opt_string _SAL1_2_Source_(__RPC__deref_out_opt_string, (), _Outptr_result_maybenull_z_ _At_(*_Curr_, _Pre_opt_z_))
256 #define __RPC__deref_out_ecount(size) _SAL1_2_Source_(__RPC__deref_out_ecount, (size), _Outptr_result_buffer_(size))
257 #define __RPC__deref_out_ecount_part(size, length) _SAL1_2_Source_(__RPC__deref_out_ecount_part, (size,length), _Outptr_result_buffer_to_(size, length))
258 #define __RPC__deref_out_ecount_full(size) _SAL1_2_Source_(__RPC__deref_out_ecount_full, (size), __RPC__deref_out_ecount_part(size,size))
259 #define __RPC__deref_out_ecount_full_string(size) _SAL1_2_Source_(__RPC__deref_out_ecount_full_string, (size), __RPC__deref_out_ecount_full(size) _At_(*_Curr_, _Post_ _Null_terminated_))
260 #define __RPC__deref_out_xcount(size) _SAL1_2_Source_(__RPC__deref_out_xcount, (size), _Outptr_)
261 #define __RPC__deref_out_xcount_part(size, length) _SAL1_2_Source_(__RPC__deref_out_xcount_part, (size,length), __RPC__deref_out)
262 #define __RPC__deref_out_xcount_full(size) _SAL1_2_Source_(__RPC__deref_out_xcount_full, (size), __RPC__deref_out)
263 #define __RPC__deref_out_xcount_full_string(size) _SAL1_2_Source_(__RPC__deref_out_xcount_full_string, (size), __RPC__deref_out _At_(*_Curr_, _Post_ _Null_terminated_))
264 
265 // [in,out] **, second pointer decoration.
266 #define __RPC__deref_inout _SAL1_2_Source_(__RPC__deref_inout, (), _Inout_ _At_(*_Curr_, _Pre_ _Notnull_ _Post_ _Notnull_))
267 #define __RPC__deref_inout_string _SAL1_2_Source_(__RPC__deref_inout_string, (), __RPC__deref_inout _At_(*_Curr_, _Pre_ _Null_terminated_ _Post_ _Null_terminated_))
268 #define __RPC__deref_inout_opt _SAL1_2_Source_(__RPC__deref_inout_opt, (), _Inout_ _At_(*_Curr_, _Pre_ _Maybenull_ _Post_ _Maybenull_))
269 #define __RPC__deref_inout_opt_string _SAL1_2_Source_(__RPC__deref_inout_opt_string, (), __RPC__deref_inout_opt _At_(*_Curr_, _Pre_ _Null_terminated_ _Post_ _Null_terminated_))
270 #define __RPC__deref_inout_ecount_opt(size) _SAL1_2_Source_(__RPC__deref_inout_ecount_opt, (size), __RPC__deref_inout_opt _At_(*_Curr_, _Pre_writable_size_(size) _Post_writable_size_(size)))
271 #define __RPC__deref_inout_ecount_part_opt(size, length) _SAL1_2_Source_(__RPC__deref_inout_ecount_part_opt, (size,length), __RPC__deref_inout_ecount_opt(size) _At_(*_Curr_, _Pre_readable_size_(length) _Post_readable_size_(length)))
272 #define __RPC__deref_inout_ecount_full_opt(size) _SAL1_2_Source_(__RPC__deref_inout_ecount_full_opt, (size), __RPC__deref_inout_ecount_part_opt(size, size))
273 #define __RPC__deref_inout_ecount_full(size) _SAL1_2_Source_(__RPC__deref_inout_ecount_full, (size), __RPC__deref_inout _At_(*_Curr_, _Pre_readable_size_(size) _Post_readable_size_(size)))
274 #define __RPC__deref_inout_ecount_full_string(size) _SAL1_2_Source_(__RPC__deref_inout_ecount_full_string, (size), __RPC__deref_inout_ecount_full(size) _At_(*_Curr_, _Post_ _Null_terminated_))
275 #define __RPC__deref_inout_ecount_full_opt_string(size) _SAL1_2_Source_(__RPC__deref_inout_ecount_full_opt_string, (size), __RPC__deref_inout_ecount_full_opt(size) _At_(*_Curr_, _Pre_ _Null_terminated_ _Post_ _Null_terminated_))
276 #define __RPC__deref_inout_xcount_opt(size) _SAL1_2_Source_(__RPC__deref_inout_xcount_opt, (size), __RPC__deref_inout_opt)
277 #define __RPC__deref_inout_xcount_part_opt(size, length) _SAL1_2_Source_(__RPC__deref_inout_xcount_part_opt, (size,length), __RPC__deref_inout_opt)
278 #define __RPC__deref_inout_xcount_full_opt(size) _SAL1_2_Source_(__RPC__deref_inout_xcount_full_opt, (size), __RPC__deref_inout_opt)
279 #define __RPC__deref_inout_xcount_full(size) _SAL1_2_Source_(__RPC__deref_inout_xcount_full, (size), __RPC__deref_inout)
280 #define __RPC__deref_inout_xcount_full_string(size) _SAL1_2_Source_(__RPC__deref_inout_xcount_full_string, (size), __RPC__deref_inout _At_(*_Curr_, _Post_ _Null_terminated_))
281 #define __RPC__deref_inout_xcount_full_opt_string(size) _SAL1_2_Source_(__RPC__deref_inout_xcount_full_opt_string, (size), __RPC__deref_inout_opt _At_(*_Curr_, _Pre_ _Null_terminated_ _Post_ _Null_terminated_))
282 
283 
284 // #define __RPC_out_opt out_opt is not allowed in rpc
285 
286 // [in,out,unique]
287 #define __RPC__deref_opt_inout _SAL1_2_Source_(__RPC__deref_opt_inout, (), _Inout_opt_ _At_(*_Curr_, _Pre_ _Notnull_ _Post_ _Notnull_))
288 #define __RPC__deref_opt_inout_ecount(size) _SAL1_2_Source_(__RPC__deref_opt_inout_ecount, (size), __RPC__deref_opt_inout _At_(*_Curr_, _Pre_writable_size_(size) _Post_writable_size_(size)))
289 #define __RPC__deref_opt_inout_string _SAL1_2_Source_(__RPC__deref_opt_inout_string, (), __RPC__deref_opt_inout _At_(*_Curr_, _Pre_ _Null_terminated_ _Post_ _Null_terminated_))
290 #define __RPC__deref_opt_inout_ecount_part(size, length) _SAL1_2_Source_(__RPC__deref_opt_inout_ecount_part, (size,length), __RPC__deref_opt_inout_ecount(size) _At_(*_Curr_, _Pre_readable_size_(length) _Post_readable_size_(length)))
291 #define __RPC__deref_opt_inout_ecount_full(size) _SAL1_2_Source_(__RPC__deref_opt_inout_ecount_full, (size), __RPC__deref_opt_inout_ecount_part(size, size))
292 #define __RPC__deref_opt_inout_ecount_full_string(size) _SAL1_2_Source_(__RPC__deref_opt_inout_ecount_full_string, (size), __RPC__deref_opt_inout_ecount_full(size) _At_(*_Curr_, _Pre_ _Null_terminated_ _Post_ _Null_terminated_))
293 #define __RPC__deref_opt_inout_xcount_part(size, length) _SAL1_2_Source_(__RPC__deref_opt_inout_xcount_part, (size,length), __RPC__deref_opt_inout)
294 #define __RPC__deref_opt_inout_xcount_full(size) _SAL1_2_Source_(__RPC__deref_opt_inout_xcount_full, (size), __RPC__deref_opt_inout)
295 #define __RPC__deref_opt_inout_xcount_full_string(size) _SAL1_2_Source_(__RPC__deref_opt_inout_xcount_full_string, (size), __RPC__deref_opt_inout_string)
296 
297 
298 #define __RPC__deref_out_ecount_opt(size) _SAL1_2_Source_(__RPC__deref_out_ecount_opt, (size), _Outptr_result_buffer_maybenull_(size) _At_(*_Curr_, _Pre_maybenull_))
299 #define __RPC__deref_out_ecount_part_opt(size, length) _SAL1_2_Source_(__RPC__deref_out_ecount_part_opt, (size,length), _Outptr_result_buffer_to_maybenull_(size, length) _At_(*_Curr_, _Pre_maybenull_))
300 #define __RPC__deref_out_ecount_full_opt(size) _SAL1_2_Source_(__RPC__deref_out_ecount_full_opt, (size), __RPC__deref_out_ecount_part_opt(size, size))
301 #define __RPC__deref_out_ecount_full_opt_string(size) _SAL1_2_Source_(__RPC__deref_out_ecount_full_opt_string, (size), __RPC__deref_out_ecount_part_opt(size, size) _At_(*_Curr_, _Post_ _Null_terminated_))
302 #define __RPC__deref_out_xcount_opt(size) _SAL1_2_Source_(__RPC__deref_out_xcount_opt, (size), __RPC__out _At_(*_Curr_, _Pre_maybenull_ _Pre_writable_size_(_Inexpressible_(size)) _Post_ _Maybenull_))
303 #define __RPC__deref_out_xcount_part_opt(size, length) _SAL1_2_Source_(__RPC__deref_out_xcount_part_opt, (size,length), __RPC__deref_out _At_(*_Curr_, _Pre_maybenull_ _Pre_writable_size_(_Inexpressible_(size)) _Post_ _Maybenull_))
304 #define __RPC__deref_out_xcount_full_opt(size) _SAL1_2_Source_(__RPC__deref_out_xcount_full_opt, (size), __RPC__deref_out_opt _At_(*_Curr_, _Pre_maybenull_ _Pre_writable_size_(_Inexpressible_(size))))
305 #define __RPC__deref_out_xcount_full_opt_string(size) _SAL1_2_Source_(__RPC__deref_out_xcount_full_opt_string, (size), __RPC__deref_out_opt _At_(*_Curr_, _Pre_maybenull_ _Pre_writable_size_(_Inexpressible_(size)) _Post_ _Null_terminated_))
306 
307 #define __RPC__deref_opt_inout_opt _SAL1_2_Source_(__RPC__deref_opt_inout_opt, (), _Inout_opt_ _At_(*_Curr_, _Pre_ _Maybenull_ _Post_ _Maybenull_))
308 #define __RPC__deref_opt_inout_opt_string _SAL1_2_Source_(__RPC__deref_opt_inout_opt_string, (), __RPC__deref_opt_inout_opt _At_(*_Curr_, _Pre_ _Null_terminated_ _Post_ _Null_terminated_))
309 #define __RPC__deref_opt_inout_ecount_opt(size) _SAL1_2_Source_(__RPC__deref_opt_inout_ecount_opt, (size), _Inout_opt_ _At_(*_Curr_, _Pre_ _Maybenull_ _Pre_writable_size_(size) _Post_ _Maybenull_ _Post_writable_size_(size)))
310 #define __RPC__deref_opt_inout_ecount_part_opt(size, length) _SAL1_2_Source_(__RPC__deref_opt_inout_ecount_part_opt, (size,length), __RPC__deref_opt_inout_ecount_opt(size) _At_(*_Curr_, _Pre_readable_size_(length) _Post_readable_size_(length)))
311 #define __RPC__deref_opt_inout_ecount_full_opt(size) _SAL1_2_Source_(__RPC__deref_opt_inout_ecount_full_opt, (size), __RPC__deref_opt_inout_ecount_part_opt(size, size))
312 #define __RPC__deref_opt_inout_ecount_full_opt_string(size) _SAL1_2_Source_(__RPC__deref_opt_inout_ecount_full_opt_string, (size), __RPC__deref_opt_inout_ecount_full_opt(size) _At_(*_Curr_, _Pre_ _Null_terminated_ _Post_ _Null_terminated_))
313 #define __RPC__deref_opt_inout_xcount_opt(size) _SAL1_2_Source_(__RPC__deref_opt_inout_xcount_opt, (size), __RPC__deref_opt_inout_opt)
314 #define __RPC__deref_opt_inout_xcount_part_opt(size, length) _SAL1_2_Source_(__RPC__deref_opt_inout_xcount_part_opt, (size,length), __RPC__deref_opt_inout_opt)
315 #define __RPC__deref_opt_inout_xcount_full_opt(size) _SAL1_2_Source_(__RPC__deref_opt_inout_xcount_full_opt, (size), __RPC__deref_opt_inout_opt)
316 #define __RPC__deref_opt_inout_xcount_full_opt_string(size) _SAL1_2_Source_(__RPC__deref_opt_inout_xcount_full_opt_string, (size), __RPC__deref_opt_inout_opt_string)
317 
318 #define __RPC_full_pointer _SAL1_2_Source_(__RPC_full_pointer, (), _Maybenull_)
319 #define __RPC_unique_pointer _SAL1_2_Source_(__RPC_unique_pointer, (), _Maybenull_)
320 #define __RPC_ref_pointer _SAL1_2_Source_(__RPC_ref_pointer, (), _Notnull_)
321 #define __RPC_string _SAL1_2_Source_(__RPC_string, (), _Null_terminated_)
322 
323 #define __RPC__range(min,max) _SAL1_2_Source_(__RPC__range, (min,max), __range(min,max))
324 #define __RPC__in_range(min,max) _SAL1_2_Source_(__RPC__in_range, (min,max), _In_range_(min,max))
325 
326 
327 #ifdef __cplusplus
328 }
329 #endif
330