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

Based on a patch by qingdoa daoo.
This commit is contained in:
Alexandre Julliard 2006-04-20 19:50:01 +02:00
parent fe99f330ab
commit bace1ef6f0
1 changed files with 3 additions and 3 deletions

View File

@ -76,14 +76,14 @@ static CLASS *get_class_ptr( HWND hwnd, BOOL write_access )
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 ))
{
SetLastError( ERROR_ACCESS_DENIED );
return NULL;
}
return CLASS_OTHER_PROCESS;
}
SetLastError( ERROR_INVALID_WINDOW_HANDLE );
return NULL;