Is it possible for a child process to inherit a handle from its parent process if one of the processes is 32-bit and the other 64-bit?
HANDLE is a 64-bit type on Win64 and a 32-bit type on Win32, which suggests that even this should be possible in all cases, there would be cases when it failed: 64-bit parent process, 32-bit child a process and a descriptor that cannot be represented in 32 bits.
Or assigns an object the only way for a 32-bit process and a 64-bit process to get a handle for the same object?
If it is a file descriptor or another kernel descriptor, then yes.
It just happens that although the HANDLE is a 64-bit type, it can always be converted to 32 bits and vice versa for any valid descriptor value.
GDI handlers cannot be inherited.
, 32- 64- , , . , 32-63 31. , 0x80000000 0xFFFFFFFF80000000, 0x0000000080000000. , 32- 64- ( , - , - , .)
0x80000000
0xFFFFFFFF80000000
0x0000000080000000
. : SO ( Windows HANDLE 64- ?)