vararg

[vararg [, optional-attributes]] return-type function-name([optional-param-attributes] param-list, SAFEARRAY(VARIANT) last-param-name)

optional-attributes

Specifies zero or more attributes to be applied to the function. Separate multiple attributes with commas.

optional-param-attributes

Specifies zero or more attributes to be applied to the function parameter immediately following the attribute listing.

param-list

Specifies all the parameters, save the final, varying, parameters.

 

Example

[vararg] boolean Button([in]SAFEARRAY(VARIANT) psa);

 

Remarks

The vararg attribute specifies that the function takes a variable number of arguments. To accomplish this, the last argument must be a safe array of VARIANT type that contains all the remaining arguments.

You cannot apply the optional or defaultvalue attributes to any parameters in a function that has the vararg attribute.

See Also

ODL File Syntax, ODL File Example, Generating a Type Library With MIDL, Differences Between MIDL and MKTYPLIB