Alexandre Julliard : user: Don' t return CLASS_OTHER_PROCESS when modifying a class.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Apr 20 13:19:50 CDT 2006


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Apr 20 19:50:01 2006 +0200

user: Don't return CLASS_OTHER_PROCESS when modifying a class.

Based on a patch by qingdoa daoo.

---

 dlls/user/class.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/user/class.c b/dlls/user/class.c
index ff89bb9..0e9d4ff 100644
--- a/dlls/user/class.c
+++ b/dlls/user/class.c
@@ -76,14 +76,14 @@ static CLASS *get_class_ptr( HWND hwnd, 
     if (ptr)
     {
         if (ptr != WND_OTHER_PROCESS && ptr != WND_DESKTOP) return ptr->class;
+        if (!write_access) return CLASS_OTHER_PROCESS;
 
-        if (write_access && (ptr == WND_DESKTOP || IsWindow( hwnd ))) /* check other processes */
+        /* modifying classes in other processes is not allowed */
+        if (ptr == WND_DESKTOP || IsWindow( hwnd ))
         {
-            /* modifying classes in other processes is not allowed */
             SetLastError( ERROR_ACCESS_DENIED );
             return NULL;
         }
-        return CLASS_OTHER_PROCESS;
     }
     SetLastError( ERROR_INVALID_WINDOW_HANDLE );
     return NULL;




More information about the wine-cvs mailing list