WOW32ResolveHandle

BOOL WOW32ResolveHandle(uHandleType, uMappingDirection, wHandle16_In,
lpwHandle16_Out, dwHandle32_In, lpdwHandle32_Out)
UINT uHandleType;
UINT uMappingDirection;
WORD wHandle16_In;
LPWORD lpwHandle16_Out;
DWORD dwHandle32_In;
LPDWORD lpdwHandle32_Out;

WOW32ResolveHandle allows a 32-bit thunk extension DLL to map 16-bit handles to valid 32-bit handles and vice-versa.

Parameters

uHandleType

Specifies a generic user handle (WOW32_USER_HANDLE), generic GDI handle (WOW32_GDI_HANDLE), or multimedia handles (WAVEIN_HANDLE, WAVEOUT_HANDLE, MIDIOUT_HANDLE, or MIDIIN_HANDLE).

uMappingDirection

Specifies the handle mapping direction. Can be either WOW32_DIR_16IN_32OUT or WOW32_DIR_32IN_16OUT.

wHandle16_In

Specifies a 16-bit input handle which is ignored if uMappingDirection is WOW32_DIR_32IN_16OUT.

lpwHandle16_Out

Specifies a 16-bit output handle which is ignored if uMappingDirection is WOW32_DIR_16IN_32OUT.

dwHandle32_In

Specifies a 32-bit input handle which is ignored if uMappingDirection is WOW32_DIR_16IN_32OUT.

lpdwHandle32_Out

Specifies a 32-bit output handle which is ignored if uMappingDirection is WOW32_DIR_32IN_16OUT.

Return Value

WOW32ResolveHandle returns FALSE if a known error occurred in the mapping. A return value of TRUE indicates that the mapping was successful but does not mean that the mapped handle is valid. For example, it may be possible to map an invalid 16-bit handle to an invalid 32-bit handle.

Comments

Users will have to dynamically link this function.

See Also

WOW32DriverCallback