Ticket #129 (closed Defect: fixed)
Functions that have default values for input parameters and that have more than one output parameter cannot be exposed via COM Automation
|Reported by:||jjr8||Owned by:||jjr8|
|Component:||Core - COM Interop||Version:||0.4a1|
The problem is that the second and subsequent output parameters are being attributed in IDL as [in, out] and the MIDL compiler fails with an error saying that all parameters after the first [optional] parameter must also be [optional].
The apparent solution: when a function has default values for input parameters, attribute the second and subsequent parameters as [in, out, optional] VARIANT *. Unfortunately they cannot retain their original type and must be VARIANT * because MIDL requires that all [optional] parameters be VARIANT *.