https://bugs.winehq.org/show_bug.cgi?id=56362
--- Comment #2 from admin@sewer56.dev ---
In your code, &dummy is an address from parent's address space, which happens to not fit in a 32bit value. If you truncate &dummy to 32bit
(void*)(ULONG_PTR)(ULONG)(ULONG_PTR)&dummy
your tests work even in old wow64 mode.
Thank you for your response. I wasn't aware of the new mode, but seems that things work just fine over there, thanks.
I was admittedly in quite a rush while writing the original issue report [and all of last week], so I didn't notice the actual core issue was incorrect use of the API (invalid address in child process space). I probably should have caught and noted it in the report.
To give some more context, I forked an existing library and started validating it against Wine while patching up some things. One of the things I saw some test code do was pass an invalid parameter to the target (which goes unused in called method). Running that led to the aforementioned error; it didn't click to me at the time that lpParameter had a value that was out of range for the child.
By all accounts, I simply saw Windows blindly accepted it, Wine didn't, so I reported the discrepancy. That's how I got here anyway.
I imagine this is probably good to close for when the new `WOW64` mode becomes the default.