Commit in reactos on MAIN
include/win32k/ntuser.h+11.132 -> 1.133
lib/user32/include/user32.h+31.25 -> 1.26
lib/user32/misc/stubs.c+1-101.61 -> 1.62
lib/user32/windows/window.c+11-11.114 -> 1.115
subsys/win32k/include/window.h+31.56 -> 1.57
subsys/win32k/ntuser/misc.c+50-91.68 -> 1.69
                    /window.c+7-11.222 -> 1.223
+76-21
7 modified files
implemented IsWindowInDestroy()

reactos/include/win32k
ntuser.h 1.132 -> 1.133
diff -u -r1.132 -r1.133
--- ntuser.h	1 May 2004 18:06:59 -0000	1.132
+++ ntuser.h	2 May 2004 17:25:17 -0000	1.133
@@ -179,6 +179,7 @@
 #define ONEPARAM_ROUTINE_GETWINDOWINSTANCE    0x10
 #define ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO  0x0a
 #define ONEPARAM_ROUTINE_GETCURSORPOSITION    0x0b
+#define ONEPARAM_ROUTINE_ISWINDOWINDESTROY    0x0c
 DWORD
 STDCALL
 NtUserCallOneParam(

reactos/lib/user32/include
user32.h 1.25 -> 1.26
diff -u -r1.25 -r1.26
--- user32.h	1 May 2004 18:06:59 -0000	1.25
+++ user32.h	2 May 2004 17:25:20 -0000	1.26
@@ -90,6 +90,9 @@
 #define NtUserGetCursorPos(lpPoint) \
   (BOOL)NtUserCallOneParam((DWORD)lpPoint, ONEPARAM_ROUTINE_GETCURSORPOSITION)
 
+#define NtUserIsWindowInDestroy(hWnd) \
+  (BOOL)NtUserCallOneParam((DWORD)hWnd, ONEPARAM_ROUTINE_ISWINDOWINDESTROY)
+
 LONG WINAPI RegCloseKey(HKEY);
 LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
 LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);

reactos/lib/user32/misc
stubs.c 1.61 -> 1.62
diff -u -r1.61 -r1.62
--- stubs.c	1 May 2004 18:06:59 -0000	1.61
+++ stubs.c	2 May 2004 17:25:20 -0000	1.62
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.61 2004/05/01 18:06:59 weiden Exp $
+/* $Id: stubs.c,v 1.62 2004/05/02 17:25:20 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS user32.dll
@@ -996,15 +996,6 @@
 /*
  * @unimplemented
  */
-BOOL STDCALL IsWindowInDestroy(HWND wnd)
-{
-  UNIMPLEMENTED;
-  return FALSE;
-}
-
-/*
- * @unimplemented
- */
 HKL STDCALL LoadKeyboardLayoutEx(DWORD unknown,LPCWSTR pwszKLID,UINT Flags) //1st parameter unknown
 {
   UNIMPLEMENTED;

reactos/lib/user32/windows
window.c 1.114 -> 1.115
diff -u -r1.114 -r1.115
--- window.c	1 May 2004 18:06:59 -0000	1.114
+++ window.c	2 May 2004 17:25:21 -0000	1.115
@@ -1,4 +1,4 @@
-/* $Id: window.c,v 1.114 2004/05/01 18:06:59 weiden Exp $
+/* $Id: window.c,v 1.115 2004/05/02 17:25:21 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS user32.dll
@@ -1655,5 +1655,15 @@
   return NtUserAnyPopup();
 }
 
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+IsWindowInDestroy(HWND hWnd)
+{
+  return NtUserIsWindowInDestroy(hWnd);
+}
+
 /* EOF */
 	 

reactos/subsys/win32k/include
window.h 1.56 -> 1.57
diff -u -r1.56 -r1.57
--- window.h	1 May 2004 18:06:59 -0000	1.56
+++ window.h	2 May 2004 17:25:21 -0000	1.57
@@ -213,6 +213,9 @@
 BOOL FASTCALL
 IntAnyPopup(VOID);
 
+BOOL FASTCALL
+IntIsWindowInDestroy(PWINDOW_OBJECT Window);
+
 DWORD IntRemoveWndProcHandle(WNDPROC Handle);
 DWORD IntRemoveProcessWndProcHandles(HANDLE ProcessID);
 DWORD IntAddWndProcHandle(WNDPROC WindowProc, BOOL IsUnicode);

reactos/subsys/win32k/ntuser
misc.c 1.68 -> 1.69
diff -u -r1.68 -r1.69
--- misc.c	1 May 2004 18:06:59 -0000	1.68
+++ misc.c	2 May 2004 17:25:21 -0000	1.69
@@ -1,4 +1,4 @@
-/* $Id: misc.c,v 1.68 2004/05/01 18:06:59 weiden Exp $
+/* $Id: misc.c,v 1.69 2004/05/02 17:25:21 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -154,18 +154,17 @@
   DWORD Param,
   DWORD Routine)
 {
-  NTSTATUS Status;
-  DWORD Result = 0;
-  PWINSTATION_OBJECT WinStaObject;
-  PWINDOW_OBJECT WindowObject;
-  
   switch(Routine)
   {
     case ONEPARAM_ROUTINE_GETMENU:
+    {
+      PWINDOW_OBJECT WindowObject;
+      DWORD Result;
+      
       WindowObject = IntGetWindowObject((HWND)Param);
       if(!WindowObject)
       {
-        SetLastWin32Error(ERROR_INVALID_HANDLE);
+        SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
         return FALSE;
       }
       
@@ -173,26 +172,36 @@
       
       IntReleaseWindowObject(WindowObject);
       return Result;
+    }
       
     case ONEPARAM_ROUTINE_ISWINDOWUNICODE:
+    {
+      PWINDOW_OBJECT WindowObject;
+      DWORD Result;
+      
       WindowObject = IntGetWindowObject((HWND)Param);
       if(!WindowObject)
       {
-        SetLastWin32Error(ERROR_INVALID_HANDLE);
+        SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
         return FALSE;
       }
       Result = WindowObject->Unicode;
       IntReleaseWindowObject(WindowObject);
       return Result;
+    }
       
     case ONEPARAM_ROUTINE_WINDOWFROMDC:
       return (DWORD)IntWindowFromDC((HDC)Param);
       
     case ONEPARAM_ROUTINE_GETWNDCONTEXTHLPID:
+    {
+      PWINDOW_OBJECT WindowObject;
+      DWORD Result;
+      
       WindowObject = IntGetWindowObject((HWND)Param);
       if(!WindowObject)
       {
-        SetLastWin32Error(ERROR_INVALID_HANDLE);
+        SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
         return FALSE;
       }
       
@@ -200,8 +209,14 @@
       
       IntReleaseWindowObject(WindowObject);
       return Result;
+    }
     
     case ONEPARAM_ROUTINE_SWAPMOUSEBUTTON:
+    {
+      PWINSTATION_OBJECT WinStaObject;
+      NTSTATUS Status;
+      DWORD Result;
+      
       Status = IntValidateWindowStationHandle(PROCESS_WINDOW_STATION(),
                                               KernelMode,
                                               0,
@@ -213,6 +228,7 @@
 
       ObDereferenceObject(WinStaObject);
       return Result;
+    }
     
     case ONEPARAM_ROUTINE_SWITCHCARETSHOWING:
       return (DWORD)IntSwitchCaretShowing((PVOID)Param);
@@ -224,6 +240,10 @@
       return (DWORD)IntEnumClipboardFormats((UINT)Param);
     
     case ONEPARAM_ROUTINE_GETWINDOWINSTANCE:
+    {
+      PWINDOW_OBJECT WindowObject;
+      DWORD Result;
+      
       if(!(WindowObject = IntGetWindowObject((HWND)Param)))
       {
         SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
@@ -233,12 +253,15 @@
       Result = (DWORD)WindowObject->Instance;
       IntReleaseWindowObject(WindowObject);
       return Result;
+    }
     
     case ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO:
       return (DWORD)MsqSetMessageExtraInfo((LPARAM)Param);
     
     case ONEPARAM_ROUTINE_GETCURSORPOSITION:
     {
+      PWINSTATION_OBJECT WinStaObject;
+      NTSTATUS Status;
       POINT Pos;
       
       if(!Param)
@@ -266,6 +289,24 @@
       
       return (DWORD)TRUE;
     }
+    
+    case ONEPARAM_ROUTINE_ISWINDOWINDESTROY:
+    {
+      PWINDOW_OBJECT WindowObject;
+      DWORD Result;
+      
+      WindowObject = IntGetWindowObject((HWND)Param);
+      if(!WindowObject)
+      {
+        SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
+        return FALSE;
+      }
+      
+      Result = (DWORD)IntIsWindowInDestroy(WindowObject);
+      
+      IntReleaseWindowObject(WindowObject);
+      return Result;
+    }
   }
   DPRINT1("Calling invalid routine number 0x%x in NtUserCallOneParam(), Param=0x%x\n", 
           Routine, Param);

reactos/subsys/win32k/ntuser
window.c 1.222 -> 1.223
diff -u -r1.222 -r1.223
--- window.c	1 May 2004 18:06:59 -0000	1.222
+++ window.c	2 May 2004 17:25:21 -0000	1.223
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: window.c,v 1.222 2004/05/01 18:06:59 weiden Exp $
+/* $Id: window.c,v 1.223 2004/05/02 17:25:21 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -1100,6 +1100,12 @@
   return FALSE;
 }
 
+BOOL FASTCALL
+IntIsWindowInDestroy(PWINDOW_OBJECT Window)
+{
+  return ((Window->Status & WINDOWSTATUS_DESTROYING) == WINDOWSTATUS_DESTROYING);
+}
+
 /* FUNCTIONS *****************************************************************/
 
 /*
CVSspam 0.2.8