rpcsal.h 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  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. // Introduction
  12. //
  13. // rpcsal.h provides a set of annotations to describe how RPC functions use their
  14. // parameters - the assumptions it makes about them, adn the guarantees it makes
  15. // upon finishing. These annotations are similar to those found in specstrings.h,
  16. // but are designed to be used by the MIDL compiler when it generates annotations
  17. // enabled header files.
  18. //
  19. // IDL authors do not need to annotate their functions declarations. The MIDL compiler
  20. // will interpret the IDL directives and use one of the annotations contained
  21. // in this header. This documentation is intended to help those trying to understand
  22. // the MIDL-generated header files or those who maintain their own copies of these files.
  23. //
  24. // -------------------------------------------------------------------------------
  25. // Differences between rpcsal.h and specstrings.h
  26. //
  27. // There are a few important differences between the annotations found in rpcsal.h and
  28. // those in specstrings.h:
  29. //
  30. // 1. [in] parameters are not marked as read-only. They may be used for scratch space
  31. // at the server and changes will not affect the client.
  32. // 2. String versions of each macro alleviates the need for a special type definition
  33. //
  34. // -------------------------------------------------------------------------------
  35. // Interpreting RPC Annotations
  36. //
  37. // These annotations are interpreted precisely in the same way as those in specstrings.h.
  38. // Please refer to that header for information related to general usage in annotations.
  39. //
  40. // To construct an RPC annotation, concatenate the appropriate value from each category
  41. // along with a leading __RPC_. A typical annotation looks like "__RPC__in_string".
  42. //
  43. // |----------------------------------------------------------------------------------|
  44. // | RPC Annotations |
  45. // |------------|------------|---------|--------|----------|----------|---------------|
  46. // | Level | Usage | Size | Output | Optional | String | Parameters |
  47. // |------------|------------|---------|--------|----------|----------|---------------|
  48. // | <> | <> | <> | <> | <> | <> | <> |
  49. // | _deref | _in | _ecount | _full | _opt | _string | (size) |
  50. // | _deref_opt | _out | _bcount | _part | | | (size,length) |
  51. // | | _inout | | | | | |
  52. // | | | | | | | |
  53. // |------------|------------|---------|--------|----------|----------|---------------|
  54. //
  55. // Level: Describes the buffer pointer's level of indirection from the parameter or
  56. // return value 'p'.
  57. //
  58. // <> : p is the buffer pointer.
  59. // _deref : *p is the buffer pointer. p must not be NULL.
  60. // _deref_opt : *p may be the buffer pointer. p may be NULL, in which case the rest of
  61. // the annotation is ignored.
  62. //
  63. // Usage: Describes how the function uses the buffer.
  64. //
  65. // <> : The buffer is not accessed. If used on the return value or with _deref, the
  66. // function will provide the buffer, and it will be uninitialized at exit.
  67. // Otherwise, the caller must provide the buffer. This should only be used
  68. // for alloc and free functions.
  69. // _in : The function will only read from the buffer. The caller must provide the
  70. // buffer and initialize it. Cannot be used with _deref.
  71. // _out : The function will only write to the buffer. If used on the return value or
  72. // with _deref, the function will provide the buffer and initialize it.
  73. // Otherwise, the caller must provide the buffer, and the function will
  74. // initialize it.
  75. // _inout : The function may freely read from and write to the buffer. The caller must
  76. // provide the buffer and initialize it. If used with _deref, the buffer may
  77. // be reallocated by the function.
  78. //
  79. // Size: Describes the total size of the buffer. This may be less than the space actually
  80. // allocated for the buffer, in which case it describes the accessible amount.
  81. //
  82. // <> : No buffer size is given. If the type specifies the buffer size (such as
  83. // with LPSTR and LPWSTR), that amount is used. Otherwise, the buffer is one
  84. // element long. Must be used with _in, _out, or _inout.
  85. // _ecount : The buffer size is an explicit element count.
  86. // _bcount : The buffer size is an explicit byte count.
  87. //
  88. // Output: Describes how much of the buffer will be initialized by the function. For
  89. // _inout buffers, this also describes how much is initialized at entry. Omit this
  90. // category for _in buffers; they must be fully initialized by the caller.
  91. //
  92. // <> : The type specifies how much is initialized. For instance, a function initializing
  93. // an LPWSTR must NULL-terminate the string.
  94. // _full : The function initializes the entire buffer.
  95. // _part : The function initializes part of the buffer, and explicitly indicates how much.
  96. //
  97. // Optional: Describes if the buffer itself is optional.
  98. //
  99. // <> : The pointer to the buffer must not be NULL.
  100. // _opt : The pointer to the buffer might be NULL. It will be checked before being dereferenced.
  101. //
  102. // String: Describes if the buffer is NULL terminated
  103. //
  104. // <> : The buffer is not assumed to be NULL terminated
  105. // _string : The buffer is assumed to be NULL terminated once it has been initialized
  106. //
  107. // Parameters: Gives explicit counts for the size and length of the buffer.
  108. //
  109. // <> : There is no explicit count. Use when neither _ecount nor _bcount is used.
  110. // (size) : Only the buffer's total size is given. Use with _ecount or _bcount but not _part.
  111. // (size,length) : The buffer's total size and initialized length are given. Use with _ecount_part
  112. // and _bcount_part.
  113. //
  114. // Notes:
  115. //
  116. // 1. Specifying two buffer annotations on a single parameter results in unspecified behavior
  117. // (e.g. __RPC__in_bcount(5) __RPC__out_bcount(6)
  118. //
  119. // 2. The size of the buffer and the amount that has been initialized are separate concepts.
  120. // Specify the size using _ecount or _bcount. Specify the amount that is initialized using
  121. // _full, _part, or _string. As a special case, a single element buffer does not need
  122. // _ecount, _bcount, _full, or _part
  123. //
  124. // 3. The count may be less than the total size of the buffer in which case it describes the
  125. // accessible portion.
  126. //
  127. // 4. "__RPC__opt" and "__RPC_deref" are not valid annotations.
  128. //
  129. // 5. The placement of _opt when using _deref is important:
  130. // __RPC__deref_opt_... : Input may be NULL
  131. // __RPC__deref_..._opt : Output may be NULL
  132. // __RPC__deref_opt_..._opt : Both input and output may be NULL
  133. //
  134. #pragma once
  135. #include <specstrings.h>
  136. #ifndef __RPCSAL_H_VERSION__
  137. #define __RPCSAL_H_VERSION__ ( 100 )
  138. #endif // __RPCSAL_H_VERSION__
  139. #ifdef __REQUIRED_RPCSAL_H_VERSION__
  140. #if ( __RPCSAL_H_VERSION__ < __REQUIRED_RPCSAL_H_VERSION__ )
  141. #error incorrect <rpcsal.h> version. Use the header that matches with the MIDL compiler.
  142. #endif
  143. #endif
  144. #ifdef __cplusplus
  145. extern "C" {
  146. #endif // #ifdef __cplusplus
  147. #if (_MSC_VER >= 1000) && !defined(__midl) && defined(_PREFAST_)
  148. // [in]
  149. #define __RPC__in __pre __valid
  150. #define __RPC__in_string __RPC__in __pre __nullterminated
  151. #define __RPC__in_ecount(size) __RPC__in __pre __elem_readableTo(size)
  152. #define __RPC__in_ecount_full(size) __RPC__in_ecount(size)
  153. #define __RPC__in_ecount_full_string(size) __RPC__in_ecount_full(size) __pre __nullterminated
  154. #define __RPC__in_ecount_part(size, length) __RPC__in_ecount(length) __pre __elem_writableTo(size)
  155. #define __RPC__in_ecount_full_opt(size) __RPC__in_ecount_full(size) __pre __exceptthat __maybenull
  156. #define __RPC__in_ecount_full_opt_string(size) __RPC__in_ecount_full_opt(size) __pre __nullterminated
  157. #define __RPC__in_ecount_part_opt(size, length) __RPC__in_ecount_part(size, length) __pre __exceptthat __maybenull
  158. #define __RPC__in_xcount(size) __RPC__in __pre __elem_readableTo(size)
  159. #define __RPC__in_xcount_full(size) __RPC__in_ecount(size)
  160. #define __RPC__in_xcount_full_string(size) __RPC__in_ecount_full(size) __pre __nullterminated
  161. #define __RPC__in_xcount_part(size, length) __RPC__in_ecount(length) __pre __elem_writableTo(size)
  162. #define __RPC__in_xcount_full_opt(size) __RPC__in_ecount_full(size) __pre __exceptthat __maybenull
  163. #define __RPC__in_xcount_full_opt_string(size) __RPC__in_ecount_full_opt(size) __pre __nullterminated
  164. #define __RPC__in_xcount_part_opt(size, length) __RPC__in_ecount_part(size, length) __pre __exceptthat __maybenull
  165. #define __RPC__deref_in __RPC__in __deref __notnull
  166. #define __RPC__deref_in_string __RPC__in __pre __deref __nullterminated
  167. #define __RPC__deref_in_opt __RPC__deref_in __deref __exceptthat __maybenull
  168. #define __RPC__deref_in_opt_string __RPC__deref_in_opt __pre __deref __nullterminated
  169. #define __RPC__deref_opt_in __RPC__in __exceptthat __maybenull
  170. #define __RPC__deref_opt_in_string __RPC__deref_opt_in __pre __deref __nullterminated
  171. #define __RPC__deref_opt_in_opt __RPC__deref_opt_in __pre __deref __exceptthat __maybenull
  172. #define __RPC__deref_opt_in_opt_string __RPC__deref_opt_in_opt __pre __deref __nullterminated
  173. #define __RPC__deref_in_ecount(size) __RPC__in __pre __deref __elem_readableTo(size)
  174. #define __RPC__deref_in_ecount_part(size, length) __RPC__deref_in_ecount(size) __pre __deref __elem_readableTo(length)
  175. #define __RPC__deref_in_ecount_full(size) __RPC__deref_in_ecount_part(size, size)
  176. #define __RPC__deref_in_ecount_full_opt(size) __RPC__deref_in_ecount_full(size) __pre __deref __exceptthat __maybenull
  177. #define __RPC__deref_in_ecount_full_opt_string(size) __RPC__deref_in_ecount_full_opt(size) __pre __deref __nullterminated
  178. #define __RPC__deref_in_ecount_full_string(size) __RPC__deref_in_ecount_full(size) __pre __deref __nullterminated
  179. #define __RPC__deref_in_ecount_opt(size) __RPC__deref_in_ecount(size) __pre __deref __exceptthat __maybenull
  180. #define __RPC__deref_in_ecount_opt_string(size) __RPC__deref_in_ecount_opt(size) __pre __deref __nullterminated
  181. #define __RPC__deref_in_ecount_part_opt(size, length) __RPC__deref_in_ecount_opt(size) __pre __deref __elem_readableTo(length)
  182. #define __RPC__deref_in_xcount(size) __RPC__in __pre __deref __elem_readableTo(size)
  183. #define __RPC__deref_in_xcount_part(size, length) __RPC__deref_in_ecount(size) __pre __deref __elem_readableTo(length)
  184. #define __RPC__deref_in_xcount_full(size) __RPC__deref_in_ecount_part(size, size)
  185. #define __RPC__deref_in_xcount_full_opt(size) __RPC__deref_in_ecount_full(size) __pre __deref __exceptthat __maybenull
  186. #define __RPC__deref_in_xcount_full_opt_string(size) __RPC__deref_in_ecount_full_opt(size) __pre __deref __nullterminated
  187. #define __RPC__deref_in_xcount_full_string(size) __RPC__deref_in_ecount_full(size) __pre __deref __nullterminated
  188. #define __RPC__deref_in_xcount_opt(size) __RPC__deref_in_ecount(size) __pre __deref __exceptthat __maybenull
  189. #define __RPC__deref_in_xcount_opt_string(size) __RPC__deref_in_ecount_opt(size) __pre __deref __nullterminated
  190. #define __RPC__deref_in_xcount_part_opt(size, length) __RPC__deref_in_ecount_opt(size) __pre __deref __elem_readableTo(length)
  191. // [out]
  192. #define __RPC__out __out
  193. #define __RPC__out_ecount(size) __out_ecount(size) __post __elem_writableTo(size)
  194. #define __RPC__out_ecount_string(size) __RPC__out_ecount(size) __post __nullterminated
  195. #define __RPC__out_ecount_part(size, length) __RPC__out_ecount(size) __post __elem_readableTo(length)
  196. #define __RPC__out_ecount_full(size) __RPC__out_ecount_part(size, size)
  197. #define __RPC__out_ecount_full_string(size) __RPC__out_ecount_full(size) __post __nullterminated
  198. #define __RPC__out_xcount(size) __out
  199. #define __RPC__out_xcount_string(size) __RPC__out __post __nullterminated
  200. #define __RPC__out_xcount_part(size, length) __RPC__out
  201. #define __RPC__out_xcount_full(size) __RPC__out
  202. #define __RPC__out_xcount_full_string(size) __RPC__out __post __nullterminated
  203. // [in,out]
  204. #define __RPC__inout __inout
  205. #define __RPC__inout_string __RPC__inout __pre __nullterminated __post __nullterminated
  206. #define __RPC__inout_ecount(size) __inout_ecount(size)
  207. #define __RPC__inout_ecount_part(size, length) __inout_ecount_part(size, length)
  208. #define __RPC__inout_ecount_full(size) __RPC__inout_ecount_part(size, size)
  209. #define __RPC__inout_ecount_full_string(size) __RPC__inout_ecount_full(size) __pre __nullterminated __post __nullterminated
  210. #define __RPC__inout_xcount(size) __inout
  211. #define __RPC__inout_xcount_part(size, length) __inout
  212. #define __RPC__inout_xcount_full(size) __RPC__inout
  213. #define __RPC__inout_xcount_full_string(size) __RPC__inout __pre __nullterminated __post __nullterminated
  214. // [in,unique]
  215. #define __RPC__in_opt __RPC__in __pre __exceptthat __maybenull
  216. #define __RPC__in_opt_string __RPC__in_opt __pre __nullterminated
  217. #define __RPC__in_ecount_opt(size) __RPC__in_ecount(size) __pre __exceptthat __maybenull
  218. #define __RPC__in_ecount_opt_string(size) __RPC__in_ecount_opt(size) __pre __nullterminated
  219. #define __RPC__in_xcount_opt(size) __RPC__in_ecount(size) __pre __exceptthat __maybenull
  220. #define __RPC__in_xcount_opt_string(size) __RPC__in_ecount_opt(size) __pre __nullterminated
  221. // [in,out,unique]
  222. #define __RPC__inout_opt __inout_opt
  223. #define __RPC__inout_opt_string __RPC__inout_opt __pre __nullterminated
  224. #define __RPC__inout_ecount_opt(size) __inout_ecount_opt(size)
  225. #define __RPC__inout_ecount_part_opt(size, length) __inout_ecount_part_opt(size, length)
  226. #define __RPC__inout_ecount_full_opt(size) __RPC__inout_ecount_part_opt(size, size)
  227. #define __RPC__inout_ecount_full_opt_string(size) __RPC__inout_ecount_full_opt(size) __pre __nullterminated __post __nullterminated
  228. #define __RPC__inout_xcount_opt(size) __inout_opt
  229. #define __RPC__inout_xcount_part_opt(size, length) __inout_opt
  230. #define __RPC__inout_xcount_full_opt(size) __RPC__inout_opt
  231. #define __RPC__inout_xcount_full_opt_string(size) __RPC__inout_opt __pre __nullterminated __post __nullterminated
  232. // [out] **
  233. #define __RPC__deref_out __deref_out
  234. #define __RPC__deref_out_string __RPC__deref_out __post __deref __nullterminated
  235. // Removed "__post __deref __exceptthat __maybenull" so return values from QueryInterface and the like can be trusted without an explicit NULL check.
  236. // This is a temporary fix until midl.exe can be rev'd to produce more accurate annotations.
  237. #define __RPC__deref_out_opt __RPC__deref_out
  238. #define __RPC__deref_out_opt_string __RPC__deref_out_opt __post __deref __nullterminated __pre __deref __null
  239. #define __RPC__deref_out_ecount(size) __deref_out_ecount(size) __post __deref __elem_writableTo(size)
  240. #define __RPC__deref_out_ecount_part(size, length) __RPC__deref_out_ecount(size) __post __deref __elem_readableTo(length)
  241. #define __RPC__deref_out_ecount_full(size) __RPC__deref_out_ecount_part(size,size)
  242. #define __RPC__deref_out_ecount_full_string(size) __RPC__deref_out_ecount_full(size) __post __deref __nullterminated
  243. #define __RPC__deref_out_xcount(size) __deref_out __post __deref
  244. #define __RPC__deref_out_xcount_part(size, length) __RPC__deref_out __post __deref
  245. #define __RPC__deref_out_xcount_full(size) __RPC__deref_out
  246. #define __RPC__deref_out_xcount_full_string(size) __RPC__deref_out __post __deref __nullterminated
  247. // [in,out] **, second pointer decoration.
  248. #define __RPC__deref_inout __deref_inout
  249. #define __RPC__deref_inout_string __RPC__deref_inout __pre __deref __nullterminated __post __deref __nullterminated
  250. #define __RPC__deref_inout_opt __deref_inout_opt
  251. #define __RPC__deref_inout_opt_string __RPC__deref_inout_opt __deref __nullterminated
  252. #define __RPC__deref_inout_ecount_opt(size) __deref_inout_ecount_opt(size)
  253. #define __RPC__deref_inout_ecount_part_opt(size, length) __deref_inout_ecount_part_opt(size , length)
  254. #define __RPC__deref_inout_ecount_full_opt(size) __RPC__deref_inout_ecount_part_opt(size, size)
  255. #define __RPC__deref_inout_ecount_full(size) __deref_inout_ecount_full(size)
  256. #define __RPC__deref_inout_ecount_full_string(size) __RPC__deref_inout_ecount_full(size) __post __deref __nullterminated
  257. #define __RPC__deref_inout_ecount_full_opt_string(size) __RPC__deref_inout_ecount_full_opt(size) __pre __deref __nullterminated __post __deref __nullterminated
  258. #define __RPC__deref_inout_xcount_opt(size) __deref_inout_opt
  259. #define __RPC__deref_inout_xcount_part_opt(size, length) __deref_inout_opt
  260. #define __RPC__deref_inout_xcount_full_opt(size) __RPC__deref_inout_opt
  261. #define __RPC__deref_inout_xcount_full(size) __deref_inout
  262. #define __RPC__deref_inout_xcount_full_string(size) __RPC__deref_inout __post __deref __nullterminated
  263. #define __RPC__deref_inout_xcount_full_opt_string(size) __RPC__deref_inout_opt __pre __deref __nullterminated __post __deref __nullterminated
  264. // #define __RPC_out_opt out_opt is not allowed in rpc
  265. // [in,out,unique]
  266. #define __RPC__deref_opt_inout __deref_opt_inout
  267. #define __RPC__deref_opt_inout_ecount(size) __deref_opt_inout_ecount(size)
  268. #define __RPC__deref_opt_inout_string __RPC__deref_opt_inout __pre __deref __nullterminated __post __deref __nullterminated
  269. #define __RPC__deref_opt_inout_ecount_part(size, length) __deref_opt_inout_ecount_part(size, length)
  270. #define __RPC__deref_opt_inout_ecount_full(size) __deref_opt_inout_ecount_full(size)
  271. #define __RPC__deref_opt_inout_ecount_full_string(size) __RPC__deref_opt_inout_ecount_full(size) __pre __deref __nullterminated __post __deref __nullterminated
  272. #define __RPC__deref_opt_inout_xcount_part(size, length) __deref_opt_inout
  273. #define __RPC__deref_opt_inout_xcount_full(size) __deref_opt_inout
  274. #define __RPC__deref_opt_inout_xcount_full_string(size) __RPC__deref_opt_inout __pre __deref __nullterminated __post __deref __nullterminated
  275. // We don't need to specify __pre __deref __exceptthat __maybenull : this is default behavior. While this might not hold in SAL 1.1 syntax, SAL team
  276. // believes it's OK. We can revisit if SAL 1.1 can survive.
  277. #define __RPC__deref_out_ecount_opt(size) __RPC__out_ecount(size) __post __deref __exceptthat __maybenull __pre __deref __null
  278. #define __RPC__deref_out_ecount_part_opt(size, length) __RPC__deref_out_ecount_part(size, length) __post __deref __exceptthat __maybenull __pre __deref __null
  279. #define __RPC__deref_out_ecount_full_opt(size) __RPC__deref_out_ecount_part_opt(size, size) __pre __deref __null
  280. #define __RPC__deref_out_ecount_full_opt_string(size) __RPC__deref_out_ecount_part_opt(size, size) __post __deref __nullterminated __pre __deref __null
  281. #define __RPC__deref_out_xcount_opt(size) __RPC__out __post __deref __exceptthat __maybenull __pre __deref __null
  282. #define __RPC__deref_out_xcount_part_opt(size, length) __RPC__deref_out __post __deref __exceptthat __maybenull __pre __deref __null
  283. #define __RPC__deref_out_xcount_full_opt(size) __RPC__deref_out_opt __pre __deref __null
  284. #define __RPC__deref_out_xcount_full_opt_string(size) __RPC__deref_out_opt __post __deref __nullterminated __pre __deref __null
  285. #define __RPC__deref_opt_inout_opt __deref_opt_inout_opt
  286. #define __RPC__deref_opt_inout_opt_string __RPC__deref_opt_inout_opt __pre __deref __nullterminated __post __deref __nullterminated
  287. #define __RPC__deref_opt_inout_ecount_opt(size) __deref_opt_inout_ecount_opt(size)
  288. #define __RPC__deref_opt_inout_ecount_part_opt(size, length) __deref_opt_inout_ecount_part_opt(size, length)
  289. #define __RPC__deref_opt_inout_ecount_full_opt(size) __RPC__deref_opt_inout_ecount_part_opt(size, size)
  290. #define __RPC__deref_opt_inout_ecount_full_opt_string(size) __RPC__deref_opt_inout_ecount_full_opt(size) __pre __deref __nullterminated __post __deref __nullterminated
  291. #define __RPC__deref_opt_inout_xcount_opt(size) __deref_opt_inout_opt
  292. #define __RPC__deref_opt_inout_xcount_part_opt(size, length) __deref_opt_inout_opt
  293. #define __RPC__deref_opt_inout_xcount_full_opt(size) __RPC__deref_opt_inout_opt
  294. #define __RPC__deref_opt_inout_xcount_full_opt_string(size) __RPC__deref_opt_inout_opt __pre __deref __nullterminated __post __deref __nullterminated
  295. #define __RPC_full_pointer __maybenull
  296. #define __RPC_unique_pointer __maybenull
  297. #define __RPC_ref_pointer __notnull
  298. #define __RPC_string __nullterminated
  299. #define __RPC__range(min,max) __range(min,max)
  300. #define __RPC__in_range(min,max) __in_range(min,max)
  301. #else // not prefast
  302. #define __RPC__range(min,max)
  303. #define __RPC__in_range(min,max)
  304. #define __RPC__in
  305. #define __RPC__in_string
  306. #define __RPC__in_opt_string
  307. #define __RPC__in_ecount(size)
  308. #define __RPC__in_ecount_full(size)
  309. #define __RPC__in_ecount_full_string(size)
  310. #define __RPC__in_ecount_part(size, length)
  311. #define __RPC__in_ecount_full_opt(size)
  312. #define __RPC__in_ecount_full_opt_string(size)
  313. #define __RPC__inout_ecount_full_opt_string(size)
  314. #define __RPC__in_ecount_part_opt(size, length)
  315. #define __RPC__in_xcount(size)
  316. #define __RPC__in_xcount_full(size)
  317. #define __RPC__in_xcount_full_string(size)
  318. #define __RPC__in_xcount_part(size, length)
  319. #define __RPC__in_xcount_full_opt(size)
  320. #define __RPC__in_xcount_full_opt_string(size)
  321. #define __RPC__inout_xcount_full_opt_string(size)
  322. #define __RPC__in_xcount_part_opt(size, length)
  323. #define __RPC__deref_in
  324. #define __RPC__deref_in_string
  325. #define __RPC__deref_in_opt
  326. #define __RPC__deref_in_opt_string
  327. #define __RPC__deref_opt_in
  328. #define __RPC__deref_opt_in_string
  329. #define __RPC__deref_opt_in_opt
  330. #define __RPC__deref_opt_in_opt_string
  331. #define __RPC__deref_in_ecount(size)
  332. #define __RPC__deref_in_ecount_part(size, length)
  333. #define __RPC__deref_in_ecount_full(size)
  334. #define __RPC__deref_in_ecount_full_opt(size)
  335. #define __RPC__deref_in_ecount_full_string(size)
  336. #define __RPC__deref_in_ecount_full_opt_string(size)
  337. #define __RPC__deref_in_ecount_opt(size)
  338. #define __RPC__deref_in_ecount_opt_string(size)
  339. #define __RPC__deref_in_ecount_part_opt(size, length)
  340. #define __RPC__deref_in_xcount(size)
  341. #define __RPC__deref_in_xcount_part(size, length)
  342. #define __RPC__deref_in_xcount_full(size)
  343. #define __RPC__deref_in_xcount_full_opt(size)
  344. #define __RPC__deref_in_xcount_full_string(size)
  345. #define __RPC__deref_in_xcount_full_opt_string(size)
  346. #define __RPC__deref_in_xcount_opt(size)
  347. #define __RPC__deref_in_xcount_opt_string(size)
  348. #define __RPC__deref_in_xcount_part_opt(size, length)
  349. // [out]
  350. #define __RPC__out
  351. #define __RPC__out_ecount(size)
  352. #define __RPC__out_ecount_part(size, length)
  353. #define __RPC__out_ecount_full(size)
  354. #define __RPC__out_ecount_full_string(size)
  355. #define __RPC__out_xcount(size)
  356. #define __RPC__out_xcount_part(size, length)
  357. #define __RPC__out_xcount_full(size)
  358. #define __RPC__out_xcount_full_string(size)
  359. // [in,out]
  360. #define __RPC__inout
  361. #define __RPC__inout_string
  362. #define __RPC__opt_inout
  363. #define __RPC__inout_ecount(size)
  364. #define __RPC__inout_ecount_part(size, length)
  365. #define __RPC__inout_ecount_full(size)
  366. #define __RPC__inout_ecount_full_string(size)
  367. #define __RPC__inout_xcount(size)
  368. #define __RPC__inout_xcount_part(size, length)
  369. #define __RPC__inout_xcount_full(size)
  370. #define __RPC__inout_xcount_full_string(size)
  371. // [in,unique]
  372. #define __RPC__in_opt
  373. #define __RPC__in_ecount_opt(size)
  374. #define __RPC__in_xcount_opt(size)
  375. // [in,out,unique]
  376. #define __RPC__inout_opt
  377. #define __RPC__inout_opt_string
  378. #define __RPC__inout_ecount_opt(size)
  379. #define __RPC__inout_ecount_part_opt(size, length)
  380. #define __RPC__inout_ecount_full_opt(size)
  381. #define __RPC__inout_ecount_full_string(size)
  382. #define __RPC__inout_xcount_opt(size)
  383. #define __RPC__inout_xcount_part_opt(size, length)
  384. #define __RPC__inout_xcount_full_opt(size)
  385. #define __RPC__inout_xcount_full_string(size)
  386. // [out] **
  387. #define __RPC__deref_out
  388. #define __RPC__deref_out_string
  389. #define __RPC__deref_out_opt
  390. #define __RPC__deref_out_opt_string
  391. #define __RPC__deref_out_ecount(size)
  392. #define __RPC__deref_out_ecount_part(size, length)
  393. #define __RPC__deref_out_ecount_full(size)
  394. #define __RPC__deref_out_ecount_full_string(size)
  395. #define __RPC__deref_out_xcount(size)
  396. #define __RPC__deref_out_xcount_part(size, length)
  397. #define __RPC__deref_out_xcount_full(size)
  398. #define __RPC__deref_out_xcount_full_string(size)
  399. // [in,out] **, second pointer decoration.
  400. #define __RPC__deref_inout
  401. #define __RPC__deref_inout_string
  402. #define __RPC__deref_inout_opt
  403. #define __RPC__deref_inout_opt_string
  404. #define __RPC__deref_inout_ecount_full(size)
  405. #define __RPC__deref_inout_ecount_full_string(size)
  406. #define __RPC__deref_inout_ecount_opt(size)
  407. #define __RPC__deref_inout_ecount_part_opt(size, length)
  408. #define __RPC__deref_inout_ecount_full_opt(size)
  409. #define __RPC__deref_inout_ecount_full_opt_string(size)
  410. #define __RPC__deref_inout_xcount_full(size)
  411. #define __RPC__deref_inout_xcount_full_string(size)
  412. #define __RPC__deref_inout_xcount_opt(size)
  413. #define __RPC__deref_inout_xcount_part_opt(size, length)
  414. #define __RPC__deref_inout_xcount_full_opt(size)
  415. #define __RPC__deref_inout_xcount_full_opt_string(size)
  416. // #define __RPC_out_opt out_opt is not allowed in rpc
  417. // [in,out,unique]
  418. #define __RPC__deref_opt_inout
  419. #define __RPC__deref_opt_inout_string
  420. #define __RPC__deref_opt_inout_ecount(size)
  421. #define __RPC__deref_opt_inout_ecount_part(size, length)
  422. #define __RPC__deref_opt_inout_ecount_full(size)
  423. #define __RPC__deref_opt_inout_ecount_full_string(size)
  424. #define __RPC__deref_opt_inout_xcount(size)
  425. #define __RPC__deref_opt_inout_xcount_part(size, length)
  426. #define __RPC__deref_opt_inout_xcount_full(size)
  427. #define __RPC__deref_opt_inout_xcount_full_string(size)
  428. #define __RPC__deref_out_ecount_opt(size)
  429. #define __RPC__deref_out_ecount_part_opt(size, length)
  430. #define __RPC__deref_out_ecount_full_opt(size)
  431. #define __RPC__deref_out_ecount_full_opt_string(size)
  432. #define __RPC__deref_out_xcount_opt(size)
  433. #define __RPC__deref_out_xcount_part_opt(size, length)
  434. #define __RPC__deref_out_xcount_full_opt(size)
  435. #define __RPC__deref_out_xcount_full_opt_string(size)
  436. #define __RPC__deref_opt_inout_opt
  437. #define __RPC__deref_opt_inout_opt_string
  438. #define __RPC__deref_opt_inout_ecount_opt(size)
  439. #define __RPC__deref_opt_inout_ecount_part_opt(size, length)
  440. #define __RPC__deref_opt_inout_ecount_full_opt(size)
  441. #define __RPC__deref_opt_inout_ecount_full_opt_string(size)
  442. #define __RPC__deref_opt_inout_xcount_opt(size)
  443. #define __RPC__deref_opt_inout_xcount_part_opt(size, length)
  444. #define __RPC__deref_opt_inout_xcount_full_opt(size)
  445. #define __RPC__deref_opt_inout_xcount_full_opt_string(size)
  446. #define __RPC_full_pointer
  447. #define __RPC_unique_pointer
  448. #define __RPC_ref_pointer
  449. #define __RPC_string
  450. #endif
  451. #ifdef __cplusplus
  452. }
  453. #endif