tags:

views:

86

answers:

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

What is the significance of 'out', 'retval' and 'in' in this case ??

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

Thanks.

A: 

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

Mike Hofer
A: 

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

Grzenio