The first_is and last_is Attributes

You can determine the number of transmitted elements by specifying the first and last elements. Use the first_is and last_is attributes as shown:

/* IDL file */
[ uuid(20B309B1-015C-101A-B308-02608C4C9B53),
  version(4.0)
]
interface arraytest
{

void fArray4([in, out,
              size_is(sSize),
              first_is(sFirst),
              last_is(sLast)]   char achArray[],
             [in] short sSize,
             [in] short sLast,
             [in] short sFirst) ;
}