How can I share HWND between 32 and 64 bit applications in Win x64?

前端 未结 5 1948
再見小時候
再見小時候 2020-12-09 03:46

MSDN tells me that handles to windows (HWND) can be shared between 32- and 64-bit applications, in Interprocess Communication (MSDN). However, in Win32 a HWND is 32 bits, w

5条回答
  •  失恋的感觉
    2020-12-09 04:22

    I think you're right to be cautious in general. However, MSDN claiming that they can be shared is a contract to us programmers. They can't well say "share it today" and then "no longer" tomorrow, without breaking a great deal of software.

    Similarly, for x64 and 32bit software to run concurrently on a given machine, and for everyone to get along, HWNDs (and many HANDLEs) must continue to be 32bit and compatible.

    I guess what I'm saying is that I think this is a very safe bet, at least for the lifetime of Windows 7, and likely Windows "next".

提交回复
热议问题