The length_is Attribute

The size_is attribute lets you specify the maximum size of the array. When this is the only attribute, all elements of the array are transmitted. Instead of sending all elements of the array, you can specify the transmitted elements using the length_is attribute as:

/* IDL file */
[ uuid(20B309B1-015C-101A-B308-02608C4C9B53),
  version(3.0)
]
interface arraytest
{
void fArray3([in, out, size_is(sSize), length_is(sLen)] char achArray[],
             [in] short sSize, 
             [in] short SLength);
}
 

Size describes allocation while length describes transmission. The number of elements transmitted must always be less than or equal to the number of elements allocated. The value associated with length_is is always less than or equal to size_is.