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.
https://bugs.winehq.org/show_bug.cgi?id=56598
--- Comment #1 from Alexandre Julliard julliard@winehq.org --- Would you happen to have a small test case demonstrating the problem?
https://bugs.winehq.org/show_bug.cgi?id=56598
--- Comment #2 from Pontus Netler pontus@netler.se --- Unfortunately no small and easy, did the investigation in our main product where I'm head developer...
https://bugs.winehq.org/show_bug.cgi?id=56598
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|blocker |normal
--- Comment #3 from Pontus Netler pontus@netler.se --- Created attachment 76363 --> https://bugs.winehq.org/attachment.cgi?id=76363 Simplistic ATL-project for reproducing the bug
https://bugs.winehq.org/show_bug.cgi?id=56598
--- Comment #4 from Pontus Netler pontus@netler.se --- Created attachment 76364 --> https://bugs.winehq.org/attachment.cgi?id=76364 Compiled 32-bit EXE to reproduce the bug
https://bugs.winehq.org/show_bug.cgi?id=56598
--- Comment #5 from Pontus Netler pontus@netler.se --- (In reply to Alexandre Julliard from comment #1)
Would you happen to have a small test case demonstrating the problem?
Now I've uploaded simplistic project and EXE to reproduce issue.
https://bugs.winehq.org/show_bug.cgi?id=56598
Pontus Netler pontus@netler.se changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pontus@netler.se
https://bugs.winehq.org/show_bug.cgi?id=56598
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase
https://bugs.winehq.org/show_bug.cgi?id=56598
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Created attachment 76372 --> https://bugs.winehq.org/attachment.cgi?id=76372 vararg fix
Thank you for the test case, that's very helpful! The attached patch will hopefully fix it.
https://bugs.winehq.org/show_bug.cgi?id=56598
Alex Henrie alexhenrie24@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |fbba581cf2aeeda169f6cc229c1 | |a80da3eb40532 CC| |alexhenrie24@gmail.com Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED
--- Comment #7 from Alex Henrie alexhenrie24@gmail.com --- Fixed by https://gitlab.winehq.org/wine/wine/-/commit/fbba581cf2aeeda169f6cc229c1a80d...
https://bugs.winehq.org/show_bug.cgi?id=56598
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.8.
https://bugs.winehq.org/show_bug.cgi?id=56598
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |9.0.x