AFAICT it points to an HBITMAP, which is also a pointer-sized type but even in a 64-bit process will always fit in 32 bits. The headers don't make it very clear what's expected. I did a code search on GitHub and didn't see any consistency around how it's handled. I'd suggest testing this on Windows, but I don't have a way to do that, and it might depend on the driver. If an application uses a 64-bit variable that it initializes to NULL, that should work either way. If an application uses a 64-bit variable that it doesn't initialize, and we write 32 bits, the high DWORD will be undefined. Based on my reading of gdi32's `handle_entry` function, I think it'll still accept the value, so long as the application itself doesn't check the high DWORD for whatever reason. If a 64-bit application uses a 32-bit variable, and we write 64 bits, we'll corrupt memory. So if we're not sure, the safe option would be to leave it as-is. Do you have any more information that indicates we should write this as a 64-bit value? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9187#note_118808