length_is

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

Specifies the number of array elements to be transmitted.

  
      [ length_is(  
   "expression"  
) ]  

Parameters

expression
One or more C-language expressions. Empty argument slots are allowed.

The length_is C++ attribute has the same functionality as the length_is MIDL attribute.

See first_is for an example of how to specify a section of an array.

Attribute Context

Applies toField in struct or union, interface parameter, interface method
RepeatableNo
Required attributesNone
Invalid attributesNone

For more information, see Attribute Contexts.

IDL Attributes
Typedef, Enum, Union, and Struct Attributes
Parameter Attributes
first_is
max_is
last_is
size_is
Attributes Samples

Show: