Skip Menu |

This queue is for tickets about the Win32-GuiTest CPAN distribution.

Report information
The Basics
Id: 130258
Status: new
Priority: 0/
Queue: Win32-GuiTest

People
Owner: Nobody in particular
Requestors: petercj [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.63
Fixed in: (no value)



Subject: SendMessage will not return 64bits
If I do a SendMessage from a 64-bit perl to the HWND of a 64-bit application, and that application returns a 64-bit value, Win32::GuiTest::SendMessage will give Perl only a 32-bits return code. Looking at the XS code, I see that SendMessage is defined as returning an `int`, but Microsoft defines it as being an `LRESULT` (https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessage). In the 64bit application, the LRESULT would be 64-bit but the `int` is only 32-bit. Changing the XS definition from int SendMessage(hwnd, msg, wParam, lParam) to IV SendMessage(hwnd, msg, wParam, lParam) should force it to match whatever size the current Perl can handle, rather than arbitrarily forcing it to always be an `int`. I haven't found any unintended side effects of that change, and it passes your test suite. Pull request coming momentarily