https://bugs.winehq.org/show_bug.cgi?id=56362
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech@gmail.com
--- Comment #1 from Eric Pouech eric.pouech@gmail.com --- This works with Wine in "new" WOW64 mode (which more closely mimics Windows WOW implementation) but fails in the "old" WOW64 mode.
In old wow64 mode, a 32bit process lives in a 32bit address space, whereas in new wow64 mode, a 32bit process lives in a 64bit address space (even if the 32bit pieces of the process only accesses the (lower)32bit address space).
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.
I strongly suggest that you use the Wine's "new" WOW64 for testing injection features, otherwise you'll face more issues than just this one.
(and to come back to what you're trying to do, the &dummy has no meaning in child address space. So, unless you want to pass an integer value, you likely want to virtual alloc that memory in child, initialize it from parent, and pass its address in CreateRemoteThread)