vararg attribute
The [vararg] attribute specifies that the function takes a variable number of parameters. To accomplish this, the last parameter must be a safe array of VARIANT type that contains all the remaining parameters.
[vararg [, optional-attributes]] return-type function-name(
[optional-param-attributes] param-list,
SAFEARRAY(VARIANT) last-param-name);
Parameters
-
optional-attributes
-
Specifies zero or more attributes to be applied to the function. Separate multiple attributes with commas.
-
return-type
-
The type of the data returned by the remote procedure upon completion.
-
function-name
-
The name of the remote procedure.
-
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, parameter.
-
last-param-name
-
The name of the varying parameter.
Remarks
You cannot apply the [optional] or [defaultvalue] attributes to any parameters in a function that has the [vararg] attribute.
Examples
[vararg] VARIANT_BOOL Button([in]SAFEARRAY(VARIANT) psa);
See also