我们是否应该使用标签:APIWinHTTP代替__in? [英] Should we use _In_ instead of __in?
问题描述
我看了sal.h,这是在VS2010,今天结果
我有点惊讶。
I read sal.h, which is in VS2010, today.
I was a little surprised.
// 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 | | | | | |
| | | | | | | |
|------------|------------|---------|--------|----------|----------|---------------|
我总是使用这些注解。结果
我不能相信他们是去precated。是真的吗?结果
如果是这样,为什么?结果
我们是否应该采用以下注释从现在开始? - 它不熟悉的对我说:(
I always used these annotations.
I can't believe that they are deprecated. Is it true?
If so, why?
Should we use following annotations from now on? -It's not familiar to me :(
|--------------|----------|----------------|-----------------------------|
| 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_ | | | |
|--------------|----------|----------------|-----------------------------|
顺便说一句,SAL标签不存在SO。结果
如果您能做到,
By the way, SAL tag doesn't exist in SO.
Please make it, if you could.
推荐答案
看来你应该习惯了新的属性SAL格式,看到红色的注释在这篇文章的中间:
It seems that you should getting used to the new "attribute" SAL format, see the comment in red in the middle of this post:
<一个href=\"http://blogs.msdn.com/b/michael_howard/archive/2006/05/19/602077.aspx\">http://blogs.msdn.com/b/michael_howard/archive/2006/05/19/602077.aspx
这篇关于我们是否应该使用标签:APIWinHTTP代替__in?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!