user32: Export the WIN_GetFullHandle function through the WoW handlers.
This commit is contained in:
parent
eb36bb2e47
commit
b201a41edf
|
@ -63,7 +63,7 @@
|
|||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wine/winuser16.h"
|
||||
#include "win.h"
|
||||
#include "controls.h"
|
||||
#include "user_private.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
|
|
@ -115,6 +115,7 @@ struct wow_handlers32
|
|||
LRESULT (*scrollbar_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
|
||||
LRESULT (*static_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
|
||||
HWND (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,UINT);
|
||||
HWND (*get_win_handle)(HWND);
|
||||
WNDPROC (*alloc_winproc)(WNDPROC,BOOL);
|
||||
struct tagDIALOGINFO *(*get_dialog_info)(HWND,BOOL);
|
||||
INT (*dialog_box_loop)(HWND,HWND);
|
||||
|
@ -137,6 +138,11 @@ extern void free_module_classes(HINSTANCE16) DECLSPEC_HIDDEN;
|
|||
extern void register_wow_handlers(void) DECLSPEC_HIDDEN;
|
||||
extern void WINAPI UserRegisterWowHandlers( const struct wow_handlers16 *new,
|
||||
struct wow_handlers32 *orig );
|
||||
static inline HWND WIN_Handle32( HWND16 hwnd16 )
|
||||
{
|
||||
return wow_handlers32.get_win_handle( (HWND)(ULONG_PTR)hwnd16 );
|
||||
}
|
||||
|
||||
|
||||
/* Class functions */
|
||||
struct tagCLASS; /* opaque structure */
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "winuser.h"
|
||||
#include "wownt32.h"
|
||||
#include "wine/winuser16.h"
|
||||
#include "win.h"
|
||||
#include "controls.h"
|
||||
#include "user_private.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
|
|
|
@ -524,18 +524,18 @@ HWND WIN_IsCurrentThread( HWND hwnd )
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* WIN_Handle32
|
||||
* WIN_GetFullHandle
|
||||
*
|
||||
* Convert a 16-bit window handle to a full 32-bit handle.
|
||||
* Convert a possibly truncated window handle to a full 32-bit handle.
|
||||
*/
|
||||
HWND WIN_Handle32( HWND16 hwnd16 )
|
||||
HWND WIN_GetFullHandle( HWND hwnd )
|
||||
{
|
||||
WND *ptr;
|
||||
HWND hwnd = (HWND)(ULONG_PTR)hwnd16;
|
||||
|
||||
if (hwnd16 <= 1 || hwnd16 == 0xffff) return hwnd;
|
||||
if (!hwnd || (ULONG_PTR)hwnd >> 16) return hwnd;
|
||||
if (LOWORD(hwnd) <= 1 || LOWORD(hwnd) == 0xffff) return hwnd;
|
||||
/* do sign extension for -2 and -3 */
|
||||
if (hwnd16 >= (HWND16)-3) return (HWND)(LONG_PTR)(INT16)hwnd16;
|
||||
if (LOWORD(hwnd) >= (WORD)-3) return (HWND)(LONG_PTR)(INT16)LOWORD(hwnd);
|
||||
|
||||
if (!(ptr = WIN_GetPtr( hwnd ))) return hwnd;
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ typedef struct tagWND
|
|||
extern HWND get_hwnd_message_parent(void) DECLSPEC_HIDDEN;
|
||||
extern BOOL is_desktop_window( HWND hwnd ) DECLSPEC_HIDDEN;
|
||||
extern WND *WIN_GetPtr( HWND hwnd ) DECLSPEC_HIDDEN;
|
||||
extern HWND WIN_Handle32( HWND16 hwnd16 ) DECLSPEC_HIDDEN;
|
||||
extern HWND WIN_GetFullHandle( HWND hwnd ) DECLSPEC_HIDDEN;
|
||||
extern HWND WIN_IsCurrentProcess( HWND hwnd ) DECLSPEC_HIDDEN;
|
||||
extern HWND WIN_IsCurrentThread( HWND hwnd ) DECLSPEC_HIDDEN;
|
||||
extern HWND WIN_SetOwner( HWND hwnd, HWND owner ) DECLSPEC_HIDDEN;
|
||||
|
@ -98,12 +98,6 @@ extern HDESK open_winstation_desktop( HWINSTA hwinsta, LPCWSTR name, DWORD flags
|
|||
extern void USER_Lock(void) DECLSPEC_HIDDEN;
|
||||
extern void USER_Unlock(void) DECLSPEC_HIDDEN;
|
||||
|
||||
static inline HWND WIN_GetFullHandle( HWND hwnd )
|
||||
{
|
||||
if (!HIWORD(hwnd) && hwnd) hwnd = WIN_Handle32( LOWORD(hwnd) );
|
||||
return hwnd;
|
||||
}
|
||||
|
||||
/* to release pointers retrieved by WIN_GetPtr */
|
||||
static inline void WIN_ReleasePtr( WND *ptr )
|
||||
{
|
||||
|
|
|
@ -1168,6 +1168,7 @@ void WINAPI UserRegisterWowHandlers( const struct wow_handlers16 *new, struct wo
|
|||
orig->scrollbar_proc = ScrollBarWndProc_common;
|
||||
orig->static_proc = StaticWndProc_common;
|
||||
orig->create_window = WIN_CreateWindowEx;
|
||||
orig->get_win_handle = WIN_GetFullHandle;
|
||||
orig->alloc_winproc = WINPROC_AllocProc;
|
||||
orig->get_dialog_info = DIALOG_get_info;
|
||||
orig->dialog_box_loop = DIALOG_DoDialogBox;
|
||||
|
|
Loading…
Reference in New Issue