Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54606
-- v2: rpcrt4: Forward NdrStubCall3 to NdrStubCall2.
From: Alex Henrie alexhenrie24@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54606 --- dlls/rpcrt4/rpcrt4.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/rpcrt4/rpcrt4.spec b/dlls/rpcrt4/rpcrt4.spec index 21476714ae2..62f812ac489 100644 --- a/dlls/rpcrt4/rpcrt4.spec +++ b/dlls/rpcrt4/rpcrt4.spec @@ -294,8 +294,9 @@ @ stdcall NdrSimpleStructUnmarshall(ptr ptr ptr long) @ stdcall NdrSimpleTypeMarshall(ptr ptr long) @ stdcall NdrSimpleTypeUnmarshall(ptr ptr long) -@ stdcall NdrStubCall2(ptr ptr ptr ptr) @ stdcall NdrStubCall(ptr ptr ptr ptr) +@ stdcall NdrStubCall2(ptr ptr ptr ptr) +@ stdcall -arch=win64 NdrStubCall3(ptr ptr ptr ptr) NdrStubCall2 @ stdcall NdrStubForwardingFunction(ptr ptr ptr ptr) @ stdcall NdrStubGetBuffer(ptr ptr ptr) @ stdcall NdrStubInitialize(ptr ptr ptr ptr)
On Tue Aug 8 15:28:30 2023 +0000, Nikolay Sivov wrote:
I don't think it can work like that. Newer calls like NdrStubCall3 are only used on 64-bit, and only for NDR64 mode, that we don't support.
I've updated the patch to only export NdrStubCall3 on 64-bit. Forwarding NdrStubCall3 to Wine's existing NdrStubCall2 implementation does fix the app. It has a free download, so feel free to give it a try.
On Tue Aug 8 15:28:30 2023 +0000, Alex Henrie wrote:
I've updated the patch to only export NdrStubCall3 on 64-bit. Forwarding NdrStubCall3 to Wine's existing NdrStubCall2 implementation does fix the app. It has a free download, so feel free to give it a try.
What I mean is that it probably does something different comparing to Call3, blindly forwarding it does not look right. When is Call3 used vs Call2?
On Tue Aug 8 15:39:00 2023 +0000, Nikolay Sivov wrote:
What I mean is that it probably does something different comparing to Call3, blindly forwarding it does not look right. When is Call3 used vs Call2?
NdrStubCall3 was added in Windows 10.0.10240 and removed in 10.0.16299. It takes exactly the same parameters as NdrStubCall2 and there is no documentation on what, if anything, it did differently.
On Tue Aug 8 16:12:43 2023 +0000, Alex Henrie wrote:
NdrStubCall3 was added in Windows 10.0.10240 and removed in 10.0.16299. It takes exactly the same parameters as NdrStubCall2 and there is no documentation on what, if anything, it did differently.
I found backtraces from [Firefox](https://bugzilla.mozilla.org/show_bug.cgi?id=1581719#c0) and [LibreOffice](https://bugs.documentfoundation.org/show_bug.cgi?id=140762#c7) that show that NdrStubCall3 calls NdrStubCall2.
Wait, if this function was removed, how does the program work on Windows?
On Tue Aug 8 18:39:16 2023 +0000, Zebediah Figura wrote:
Wait, if this function was removed, how does the program work on Windows?
I wish I knew. Somehow that code path is not used on Windows. Just providing the function seemed like a reasonable solution.
On Tue Aug 8 18:39:16 2023 +0000, Alex Henrie wrote:
I wish I knew. Somehow that code path is not used on Windows. Just providing the function seemed like a reasonable solution.
Presumably the code path was used on Windows 10.0.10240. Maybe there's some kind of version checking in the app.