Alexandre Julliard : user32: Remove remaining calls to internal 32-bit functions from msg16.c.

Alexandre Julliard julliard at winehq.org
Thu Dec 24 10:27:15 CST 2009


Module: wine
Branch: master
Commit: cf81d0f0f9bec8fed38c66851c756b387b384072
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=cf81d0f0f9bec8fed38c66851c756b387b384072

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Dec 23 19:45:41 2009 +0100

user32: Remove remaining calls to internal 32-bit functions from msg16.c.

---

 dlls/user32/msg16.c |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/dlls/user32/msg16.c b/dlls/user32/msg16.c
index 085510c..698fb61 100644
--- a/dlls/user32/msg16.c
+++ b/dlls/user32/msg16.c
@@ -258,8 +258,6 @@ static LRESULT call_window_proc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPA
         } u;
     } args;
 
-    USER_CheckNotLock();
-
     if (index >= MAX_WINPROCS32) func = winproc16_array[index - MAX_WINPROCS32];
 
     /* Window procedures want ax = hInstance, ds = es = ss */
@@ -1489,7 +1487,8 @@ LRESULT WINAPI SendMessage16( HWND16 hwnd16, UINT16 msg, WPARAM16 wparam, LPARAM
     LRESULT result;
     HWND hwnd = WIN_Handle32( hwnd16 );
 
-    if (hwnd != HWND_BROADCAST && WIN_IsCurrentThread(hwnd))
+    if (hwnd != HWND_BROADCAST &&
+        GetWindowThreadProcessId( hwnd, NULL ) == GetCurrentThreadId())
     {
         /* call 16-bit window proc directly */
         WNDPROC16 winproc;
@@ -2495,12 +2494,8 @@ static LRESULT mdiclient_proc16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
     if (msg == WM_CREATE)
     {
         LPCREATESTRUCTA cs = (LPCREATESTRUCTA)lParam;
-        WND *win;
-        BOOL is_win32;
-
-        if (!(win = WIN_GetPtr( hwnd ))) return 0;
-        is_win32 = (win == WND_OTHER_PROCESS || win == WND_DESKTOP || (win->flags & WIN_ISWIN32));
-        WIN_ReleasePtr( win );
+        HINSTANCE instance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
+        BOOL is_win32 = !instance || ((ULONG_PTR)instance >> 16);
 
 	/* Translation layer doesn't know what's in the cs->lpCreateParams
 	 * so we have to keep track of what environment we're in. */




More information about the wine-cvs mailing list