Click to Rate and Give Feedback
MSDN
MSDN Library
COM
 vararg Attribute

  Switch on low bandwidth view
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.

Return Value

This attribute does not return a value.

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

defaultvalue
Generating a Type Library With MIDL
ODL File Example
ODL File Syntax
optional

Send comments about this topic to Microsoft

Build date: 4/9/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker