https://bugs.winehq.org/show_bug.cgi?id=56598
Bug ID: 56598 Summary: Calling [vararg] method via ITypeLib without arguments via IDispatch fails Product: Wine Version: 9.6 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: blocker Priority: P2 Component: oleaut32 Assignee: wine-bugs@winehq.org Reporter: pontus@netler.se Distribution: ---
Our COM-interface expose a method that take 0-N opptional parameters via [vararg].
[vararg] HRESULT Test([in] VARIANT mandatory, [in] SAFEARRAY(VARIANT) optional, [out, retval] VARIANT* result);
Calling this method result in error when no arguments are specified, which breaks compatibility with native Windows.
Calling with arguments works.
Problem may relate to SafeArrayCreate not supporting empty arrays in Wine. Or to missing handling for edge-case in typelib.c (arround line 7363).
To progress testing we added workaround for our API, but this will affect compatibility in other areas.