points by my123 3 days ago | 0 comments
being able to transfer HANDLEs across the 16/32-bit boundary notably for COM/OLE integration becomes a lot more painful
Microsoft says at https://learn.microsoft.com/en-us/windows/win32/winprog64/ru...:
> Note that 64-bit Windows does not support running 16-bit Windows-based applications. The primary reason is that handles have 32 significant bits on 64-bit Windows. Therefore, handles cannot be truncated and passed to 16-bit applications without loss of data. Attempts to launch 16-bit applications fail with the following error: ERROR_BAD_EXE_FORMAT.
winevdm on Windows eschews that level of integration, but perhaps MS should have shipped WoW16 with limitations instead of nothing.
[–] vintagedave 2 days ago
[–] my123 2 days ago
Looks like they tried some level of mapping but it didn't go too well: https://www.vttoth.com/CMS/technical-notes/?view=article&id=...
Edit: the readme has something very similar:
I would guess that's what the WIN_Handle32 method/macro is doing.