implemented IsWindowInDestroy()

svn path=/trunk/; revision=9281
This commit is contained in:
Thomas Bluemel 2004-05-02 17:25:21 +00:00
parent b2aa394176
commit 9ea61adcf9
7 changed files with 76 additions and 21 deletions

View file

@ -179,6 +179,7 @@ NtUserCallNoParam(
#define ONEPARAM_ROUTINE_GETWINDOWINSTANCE 0x10 #define ONEPARAM_ROUTINE_GETWINDOWINSTANCE 0x10
#define ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO 0x0a #define ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO 0x0a
#define ONEPARAM_ROUTINE_GETCURSORPOSITION 0x0b #define ONEPARAM_ROUTINE_GETCURSORPOSITION 0x0b
#define ONEPARAM_ROUTINE_ISWINDOWINDESTROY 0x0c
DWORD DWORD
STDCALL STDCALL
NtUserCallOneParam( NtUserCallOneParam(

View file

@ -90,6 +90,9 @@ void DrawCaret(HWND hWnd, PTHRDCARETINFO CaretInfo);
#define NtUserGetCursorPos(lpPoint) \ #define NtUserGetCursorPos(lpPoint) \
(BOOL)NtUserCallOneParam((DWORD)lpPoint, ONEPARAM_ROUTINE_GETCURSORPOSITION) (BOOL)NtUserCallOneParam((DWORD)lpPoint, ONEPARAM_ROUTINE_GETCURSORPOSITION)
#define NtUserIsWindowInDestroy(hWnd) \
(BOOL)NtUserCallOneParam((DWORD)hWnd, ONEPARAM_ROUTINE_ISWINDOWINDESTROY)
LONG WINAPI RegCloseKey(HKEY); LONG WINAPI RegCloseKey(HKEY);
LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY); LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD); LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);

View file

@ -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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll * PROJECT: ReactOS user32.dll
@ -993,15 +993,6 @@ BOOL STDCALL UnregisterUserApiHook(VOID)
return FALSE; return FALSE;
} }
/*
* @unimplemented
*/
BOOL STDCALL IsWindowInDestroy(HWND wnd)
{
UNIMPLEMENTED;
return FALSE;
}
/* /*
* @unimplemented * @unimplemented
*/ */

View file

@ -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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll * PROJECT: ReactOS user32.dll
@ -1655,5 +1655,15 @@ AnyPopup(VOID)
return NtUserAnyPopup(); return NtUserAnyPopup();
} }
/*
* @implemented
*/
BOOL
STDCALL
IsWindowInDestroy(HWND hWnd)
{
return NtUserIsWindowInDestroy(hWnd);
}
/* EOF */ /* EOF */

View file

@ -213,6 +213,9 @@ IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject, INT *cx, INT *cy);
BOOL FASTCALL BOOL FASTCALL
IntAnyPopup(VOID); IntAnyPopup(VOID);
BOOL FASTCALL
IntIsWindowInDestroy(PWINDOW_OBJECT Window);
DWORD IntRemoveWndProcHandle(WNDPROC Handle); DWORD IntRemoveWndProcHandle(WNDPROC Handle);
DWORD IntRemoveProcessWndProcHandles(HANDLE ProcessID); DWORD IntRemoveProcessWndProcHandles(HANDLE ProcessID);
DWORD IntAddWndProcHandle(WNDPROC WindowProc, BOOL IsUnicode); DWORD IntAddWndProcHandle(WNDPROC WindowProc, BOOL IsUnicode);

View file

@ -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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -154,18 +154,17 @@ NtUserCallOneParam(
DWORD Param, DWORD Param,
DWORD Routine) DWORD Routine)
{ {
NTSTATUS Status;
DWORD Result = 0;
PWINSTATION_OBJECT WinStaObject;
PWINDOW_OBJECT WindowObject;
switch(Routine) switch(Routine)
{ {
case ONEPARAM_ROUTINE_GETMENU: case ONEPARAM_ROUTINE_GETMENU:
{
PWINDOW_OBJECT WindowObject;
DWORD Result;
WindowObject = IntGetWindowObject((HWND)Param); WindowObject = IntGetWindowObject((HWND)Param);
if(!WindowObject) if(!WindowObject)
{ {
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
return FALSE; return FALSE;
} }
@ -173,26 +172,36 @@ NtUserCallOneParam(
IntReleaseWindowObject(WindowObject); IntReleaseWindowObject(WindowObject);
return Result; return Result;
}
case ONEPARAM_ROUTINE_ISWINDOWUNICODE: case ONEPARAM_ROUTINE_ISWINDOWUNICODE:
{
PWINDOW_OBJECT WindowObject;
DWORD Result;
WindowObject = IntGetWindowObject((HWND)Param); WindowObject = IntGetWindowObject((HWND)Param);
if(!WindowObject) if(!WindowObject)
{ {
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
return FALSE; return FALSE;
} }
Result = WindowObject->Unicode; Result = WindowObject->Unicode;
IntReleaseWindowObject(WindowObject); IntReleaseWindowObject(WindowObject);
return Result; return Result;
}
case ONEPARAM_ROUTINE_WINDOWFROMDC: case ONEPARAM_ROUTINE_WINDOWFROMDC:
return (DWORD)IntWindowFromDC((HDC)Param); return (DWORD)IntWindowFromDC((HDC)Param);
case ONEPARAM_ROUTINE_GETWNDCONTEXTHLPID: case ONEPARAM_ROUTINE_GETWNDCONTEXTHLPID:
{
PWINDOW_OBJECT WindowObject;
DWORD Result;
WindowObject = IntGetWindowObject((HWND)Param); WindowObject = IntGetWindowObject((HWND)Param);
if(!WindowObject) if(!WindowObject)
{ {
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
return FALSE; return FALSE;
} }
@ -200,8 +209,14 @@ NtUserCallOneParam(
IntReleaseWindowObject(WindowObject); IntReleaseWindowObject(WindowObject);
return Result; return Result;
}
case ONEPARAM_ROUTINE_SWAPMOUSEBUTTON: case ONEPARAM_ROUTINE_SWAPMOUSEBUTTON:
{
PWINSTATION_OBJECT WinStaObject;
NTSTATUS Status;
DWORD Result;
Status = IntValidateWindowStationHandle(PROCESS_WINDOW_STATION(), Status = IntValidateWindowStationHandle(PROCESS_WINDOW_STATION(),
KernelMode, KernelMode,
0, 0,
@ -213,6 +228,7 @@ NtUserCallOneParam(
ObDereferenceObject(WinStaObject); ObDereferenceObject(WinStaObject);
return Result; return Result;
}
case ONEPARAM_ROUTINE_SWITCHCARETSHOWING: case ONEPARAM_ROUTINE_SWITCHCARETSHOWING:
return (DWORD)IntSwitchCaretShowing((PVOID)Param); return (DWORD)IntSwitchCaretShowing((PVOID)Param);
@ -224,6 +240,10 @@ NtUserCallOneParam(
return (DWORD)IntEnumClipboardFormats((UINT)Param); return (DWORD)IntEnumClipboardFormats((UINT)Param);
case ONEPARAM_ROUTINE_GETWINDOWINSTANCE: case ONEPARAM_ROUTINE_GETWINDOWINSTANCE:
{
PWINDOW_OBJECT WindowObject;
DWORD Result;
if(!(WindowObject = IntGetWindowObject((HWND)Param))) if(!(WindowObject = IntGetWindowObject((HWND)Param)))
{ {
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE); SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
@ -233,12 +253,15 @@ NtUserCallOneParam(
Result = (DWORD)WindowObject->Instance; Result = (DWORD)WindowObject->Instance;
IntReleaseWindowObject(WindowObject); IntReleaseWindowObject(WindowObject);
return Result; return Result;
}
case ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO: case ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO:
return (DWORD)MsqSetMessageExtraInfo((LPARAM)Param); return (DWORD)MsqSetMessageExtraInfo((LPARAM)Param);
case ONEPARAM_ROUTINE_GETCURSORPOSITION: case ONEPARAM_ROUTINE_GETCURSORPOSITION:
{ {
PWINSTATION_OBJECT WinStaObject;
NTSTATUS Status;
POINT Pos; POINT Pos;
if(!Param) if(!Param)
@ -266,6 +289,24 @@ NtUserCallOneParam(
return (DWORD)TRUE; 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", DPRINT1("Calling invalid routine number 0x%x in NtUserCallOneParam(), Param=0x%x\n",
Routine, Param); Routine, Param);

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -1100,6 +1100,12 @@ IntAnyPopup(VOID)
return FALSE; return FALSE;
} }
BOOL FASTCALL
IntIsWindowInDestroy(PWINDOW_OBJECT Window)
{
return ((Window->Status & WINDOWSTATUS_DESTROYING) == WINDOWSTATUS_DESTROYING);
}
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
/* /*