mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
implemented IsWindowInDestroy()
svn path=/trunk/; revision=9281
This commit is contained in:
parent
b2aa394176
commit
9ea61adcf9
7 changed files with 76 additions and 21 deletions
|
@ -179,6 +179,7 @@ NtUserCallNoParam(
|
|||
#define ONEPARAM_ROUTINE_GETWINDOWINSTANCE 0x10
|
||||
#define ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO 0x0a
|
||||
#define ONEPARAM_ROUTINE_GETCURSORPOSITION 0x0b
|
||||
#define ONEPARAM_ROUTINE_ISWINDOWINDESTROY 0x0c
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserCallOneParam(
|
||||
|
|
|
@ -90,6 +90,9 @@ void DrawCaret(HWND hWnd, PTHRDCARETINFO CaretInfo);
|
|||
#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);
|
||||
|
|
|
@ -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
|
||||
|
@ -993,15 +993,6 @@ BOOL STDCALL UnregisterUserApiHook(VOID)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
BOOL STDCALL IsWindowInDestroy(HWND wnd)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
|
|
|
@ -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 @@ AnyPopup(VOID)
|
|||
return NtUserAnyPopup();
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOL
|
||||
STDCALL
|
||||
IsWindowInDestroy(HWND hWnd)
|
||||
{
|
||||
return NtUserIsWindowInDestroy(hWnd);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
||||
|
|
|
@ -213,6 +213,9 @@ IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject, INT *cx, INT *cy);
|
|||
BOOL FASTCALL
|
||||
IntAnyPopup(VOID);
|
||||
|
||||
BOOL FASTCALL
|
||||
IntIsWindowInDestroy(PWINDOW_OBJECT Window);
|
||||
|
||||
DWORD IntRemoveWndProcHandle(WNDPROC Handle);
|
||||
DWORD IntRemoveProcessWndProcHandles(HANDLE ProcessID);
|
||||
DWORD IntAddWndProcHandle(WNDPROC WindowProc, BOOL IsUnicode);
|
||||
|
|
|
@ -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 @@ NtUserCallOneParam(
|
|||
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 @@ NtUserCallOneParam(
|
|||
|
||||
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 @@ NtUserCallOneParam(
|
|||
|
||||
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 @@ NtUserCallOneParam(
|
|||
|
||||
ObDereferenceObject(WinStaObject);
|
||||
return Result;
|
||||
}
|
||||
|
||||
case ONEPARAM_ROUTINE_SWITCHCARETSHOWING:
|
||||
return (DWORD)IntSwitchCaretShowing((PVOID)Param);
|
||||
|
@ -224,6 +240,10 @@ NtUserCallOneParam(
|
|||
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 @@ NtUserCallOneParam(
|
|||
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 @@ NtUserCallOneParam(
|
|||
|
||||
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);
|
||||
|
|
|
@ -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 @@ IntAnyPopup(VOID)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL FASTCALL
|
||||
IntIsWindowInDestroy(PWINDOW_OBJECT Window)
|
||||
{
|
||||
return ((Window->Status & WINDOWSTATUS_DESTROYING) == WINDOWSTATUS_DESTROYING);
|
||||
}
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue