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(ba209999-0c6c-11d2-97cf-00c04f8eea45),
version(4.0)
]
interface arraytest
{
void fArray4([in] short sSize,
[in] short sLast,
[in] short sFirst,
[in,
out,
size_is(sSize),
first_is(sFirst),
last_is(sLast)] char achArray[]) ;
}
Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
