in reply to Re: OLE optional parameter required
in thread OLE optional parameter required

Holy dooley, holy mackerel, holy perl! It works. I grovel at your superior wisdom and offer prayers of thanks to the monks.

My only question now is why the more or less saintly Jan Dubois does not say so in his erudite teachings on Win32::OLE at http://aspn.activestate.com/ASPN/CodeDoc/libwin32/OLE/Win32/OLE/TPJ.html instead of suggesting undef and named parameters? Does this mean there is something wrong with our server - that optional parameters are not working properly?

Replies are listed 'Best First'.
Re^3: OLE optional parameter required
by jand (Friar) on Mar 03, 2010 at 09:17 UTC
    Yes, the optional parameter doesn't seem to be optional. This may be due to the fact that it is hard (or maybe impossible) to specify even NULL as a default value for VT_DISPATCH parameters in IDL.

    It should still be possible to implement this at the server level if you write your own IDispatch implementation rather than relying on it being autogenerated based on the typelib. It is rather questionable if it would be worth it though.