windows – 我们应该使用_In_而不是__in吗?
发布时间:2020-12-14 04:24:58 所属栏目:Windows 来源:网络整理
导读:我今天读到了VS.h中的sal.h. 我有点惊讶. // This section contains the deprecated annotations|------------|------------|---------|--------|----------|----------|---------------|| Level | Usage | Size | Output | NullTerm | Optional | Parameter
我今天读到了VS.h中的sal.h.
我有点惊讶. // This section contains the deprecated annotations |------------|------------|---------|--------|----------|----------|---------------| | Level | Usage | Size | Output | NullTerm | Optional | Parameters | |------------|------------|---------|--------|----------|----------|---------------| | <> | <> | <> | <> | _z | <> | <> | | _deref | _in | _ecount | _full | _nz | _opt | (size) | | _deref_opt | _out | _bcount | _part | | | (size,length) | | | _inout | | | | | | | | | | | | | | |------------|------------|---------|--------|----------|----------|---------------| 我总是使用这些注释. |--------------|----------|----------------|-----------------------------| | Usage | Nullness | ZeroTerminated | Extent | |--------------|----------|----------------|-----------------------------| | _In_ | <> | <> | <> | | _Out_ | opt_ | z_ | [byte]cap_[c_|x_]( size ) | | _Inout_ | | | [byte]count_[c_|x_]( size ) | | _Deref_out_ | | | ptrdiff_cap_( ptr ) | |--------------| | | ptrdiff_count_( ptr ) | | _Ret_ | | | | | _Deref_ret_ | | | | |--------------| | | | | _Pre_ | | | | | _Post_ | | | | | _Deref_pre_ | | | | | _Deref_post_ | | | | |--------------|----------|----------------|-----------------------------| 顺便说一下,SO标签中不存在SAL标签.
您似乎应该习惯新的“属性”SAL格式,请参阅本文中间的红色注释:
http://blogs.msdn.com/b/michael_howard/archive/2006/05/19/602077.aspx (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐
热点阅读