Platform SDK: DLLs, Processes, and Threads |
The WOWHandle16 function is used to map a 32-bit handle to a 16-bit handle. Because the relationship between a Win16 handle and a Win32 handle may change in the future, use this function to convert handles instead of any knowledge of the relationship between them.
This function can only be called in the context of a thunk.
WORD WINAPI WOWHandle16( HANDLE Handle, // 32-bit handle WOW_HANDLE_TYPE Type // handle type );
HWND
HRGN
HMENU
HBITMAP
HDWP
HBRUSH
HDROP
HPALETTE
HDC
HPEN
HFONT
HACCEL
HMETAFILE
HTASK
For example, use WOW_TYPE_HWND to convert an HWND.
A 16-bit handle.
You can also use supplied macros to map handles. For example, to map a 32-bit HWND to a 16-bit HWND, you would use the HWND_16 macro.
(hWnd16 = HWND_16(hWnd32))
WOWHandle16 with WOW_TYPE_HTASK (and HTASK_16) takes a thread identifier and converts it to a handle to a task if possible.
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Wownt32.h.
Library: Included as a resource in Wow32.dll.
Generic Thunks Overview, 32-bit Generic Thunk Functions, WOWHandle32