开发者

Significance of 'in' 'out' and 'retval' inside parameters in C#

Output([out, retval] long* Retval);
Length([in] long Len);

What is the signi开发者_Go百科ficance of 'out', 'retval' and 'in' in this case ??

I know the significance of ref and out which is used usually, but not this.

Thanks.


I found the following information regarding classes generated for COM interop:

By default, the .NET Framework provides an automatic mapping between the two styles of exception handling for COM interface methods called by the .NET Framework.

  • The return value changes to the signature of the parameter marked retval (void if the method has no parameter marked as retval).
  • The parameter marked as retval is left off of the argument list of the method.

You can find more here: http://msdn.microsoft.com/en-us/library/aa645736(VS.71).aspx


These attributes are used for COM integration, they don't change the way these methods work in C#.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜