Author: jimtabor
Date: Tue Sep 18 09:07:49 2007
New Revision: 29090
URL:
http://svn.reactos.org/svn/reactos?rev=29090&view=rev
Log:
- Implement NtUserValidateHandleSecure and most support functions moved from static and
added to their respected headers.
Modified:
trunk/reactos/subsystems/win32/win32k/include/accelerator.h
trunk/reactos/subsystems/win32/win32k/include/hook.h
trunk/reactos/subsystems/win32/win32k/include/monitor.h
trunk/reactos/subsystems/win32/win32k/ntuser/accelerator.c
trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c
trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c
trunk/reactos/subsystems/win32/win32k/ntuser/window.c
Modified: trunk/reactos/subsystems/win32/win32k/include/accelerator.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/accelerator.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/accelerator.h Tue Sep 18 09:07:49 2007
@@ -18,5 +18,6 @@
VOID
RegisterThreadAcceleratorTable(struct _ETHREAD *Thread);
+PACCELERATOR_TABLE FASTCALL UserGetAccelObject(HACCEL);
#endif /* _WIN32K_ACCELERATOR_H */
Modified: trunk/reactos/subsystems/win32/win32k/include/hook.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/hook.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/hook.h Tue Sep 18 09:07:49 2007
@@ -25,6 +25,7 @@
LRESULT FASTCALL co_HOOK_CallHooks(INT HookId, INT Code, WPARAM wParam, LPARAM lParam);
VOID FASTCALL HOOK_DestroyThreadHooks(PETHREAD Thread);
+PHOOK FASTCALL IntGetHookObject(HHOOK);
#endif /* _WIN32K_HOOK_H */
Modified: trunk/reactos/subsystems/win32/win32k/include/monitor.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/monitor.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/monitor.h Tue Sep 18 09:07:49 2007
@@ -22,6 +22,7 @@
NTSTATUS IntAttachMonitor(GDIDEVICE *pGdiDevice, ULONG DisplayNumber);
NTSTATUS IntDetachMonitor(GDIDEVICE *pGdiDevice);
+PMONITOR_OBJECT FASTCALL UserGetMonitorObject(IN HMONITOR);
#endif /* _WIN32K_MONITOR_H */
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/accelerator.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/accelerator.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/accelerator.c Tue Sep 18 09:07:49 2007
@@ -69,7 +69,6 @@
}
-static
PACCELERATOR_TABLE FASTCALL UserGetAccelObject(HACCEL hAccel)
{
PACCELERATOR_TABLE Accel;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c Tue Sep 18 09:07:49 2007
@@ -120,7 +120,6 @@
}
-static
PMONITOR_OBJECT FASTCALL
UserGetMonitorObject(IN HMONITOR hMonitor)
{
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c Tue Sep 18 09:07:49 2007
@@ -637,17 +637,6 @@
return 0;
}
-BOOL
-STDCALL
-NtUserValidateHandleSecure(
- HANDLE hHdl,
- BOOL Restricted)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
DWORD
STDCALL
NtUserWaitForInputIdle(
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/window.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c Tue Sep 18 09:07:49 2007
@@ -4683,5 +4683,84 @@
return TRUE;
}
+/*
+ * NtUserValidateHandleSecure
+ *
+ * Status
+ * @implemented
+ */
+
+BOOL
+STDCALL
+NtUserValidateHandleSecure(
+ HANDLE handle,
+ BOOL Restricted)
+{
+ if(!Restricted)
+ {
+ UINT uType;
+ {
+ PUSER_HANDLE_ENTRY entry;
+ if (!(entry = handle_to_entry(gHandleTable, handle )))
+ {
+ SetLastWin32Error(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+ uType = entry->type;
+ }
+ switch (uType)
+ {
+ case otWindow:
+ {
+ PWINDOW_OBJECT Window;
+ if ((Window = UserGetWindowObject((HWND) handle))) return TRUE;
+ return FALSE;
+ }
+ case otMenu:
+ {
+ PMENU_OBJECT Menu;
+ if ((Menu = UserGetMenuObject((HMENU) handle))) return TRUE;
+ return FALSE;
+ }
+ case otAccel:
+ {
+ PACCELERATOR_TABLE Accel;
+ if ((Accel = UserGetAccelObject((HACCEL) handle))) return TRUE;
+ return FALSE;
+ }
+ case otCursorIcon:
+ {
+ PCURICON_OBJECT Cursor;
+ if ((Cursor = UserGetCurIconObject((HCURSOR) handle))) return TRUE;
+ return FALSE;
+ }
+ case otHook:
+ {
+ PHOOK Hook;
+ if ((Hook = IntGetHookObject((HHOOK) handle))) return TRUE;
+ return FALSE;
+ }
+ case otMonitor:
+ {
+ PMONITOR_OBJECT Monitor;
+ if ((Monitor = UserGetMonitorObject((HMONITOR) handle))) return TRUE;
+ return FALSE;
+ }
+ case otCallProc:
+ {
+ WNDPROC_INFO Proc;
+ return UserGetCallProcInfo( handle, &Proc );
+ }
+ default:
+ SetLastWin32Error(ERROR_INVALID_HANDLE);
+ }
+ }
+ else
+ { /* Is handle entry restricted? */
+ UNIMPLEMENTED
+ }
+ return FALSE;
+}
+
/* EOF */