HANDLEs on 64bit windows have 32bits that are valid whereas HANDLES on 32bit windows only have 16bits that are valid
...then use a translation table. If the system is 64-bit, there's certainly enough room and speed for one!
16-bit applications would not be able to handle more than 64k handles either way.