INFO: 32-Bit Handles Required by Windows NT 4.0 and Windows 2000ID: Q229072
|
Windows NT 4.0 and Windows 2000 require full 32-bit handles to system resources. Applications that do not correctly access and return 32-bit handles fail on Windows NT 4.0 and Windows 2000.
Previous versions of Windows 9x and Windows NT used 32-bit handles, but accommodated 16-bit handles for backwards compatibility with legacy code. However, Windows NT 4.0 and Windows 2000 use the entire 32-bit values of each handle as a unique identifier. If an application tries to pass a 16-bit handle to Windows NT 4.0 or Windows 2000, the API call will fail.
For example, code that truncates a handle for a device context (hDC) from 32 bits to 16 bits and then tries to use that handle to open a print dialog box will fail to show the print dialog box. Also, if a message is sent to a window using a 16-bit handle, the specified window will not get the message.
When Windows 95 and Windows 98 receive 16-bit handles, the high 16 bits are automatically set to zero. True 32-bit handles almost always have at least one nonzero high bit. When code is tested on Windows NT 4.0 and Windows 2000, all handles should be validated as true 32-bit handles. You can validate 32-bit handles using a HIGH WORD bit mask (that is, 0xFFFF0000).
Additional query words: compatguidediff
Keywords : kbWinOS2000 kbGrpKernBase
Version : winnt:
Platform : winnt
Issue type : kbinfo
Last Reviewed: June 23, 1999