[ros-diffs] [jimtabor] 32932: More hook removal and cleanup.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Sat Apr 12 23:07:40 CEST 2008


Author: jimtabor
Date: Sat Apr 12 16:07:40 2008
New Revision: 32932

URL: http://svn.reactos.org/svn/reactos?rev=32932&view=rev
Log:
More hook removal and cleanup.

Modified:
    trunk/reactos/dll/win32/user32/user32.def
    trunk/reactos/dll/win32/user32/windows/hook.c

Modified: trunk/reactos/dll/win32/user32/user32.def
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/user32.def?rev=32932&r1=32931&r2=32932&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/user32.def [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/user32.def [iso-8859-1] Sat Apr 12 16:07:40 2008
@@ -693,7 +693,7 @@
 TranslateMessageEx at 8
 UnhookWinEvent at 4=NtUserUnhookWinEvent at 4
 UnhookWindowsHook at 8
-UnhookWindowsHookEx at 4
+UnhookWindowsHookEx at 4=NtUserUnhookWindowsHookEx at 4
 UnionRect at 12
 UnloadKeyboardLayout at 4=NtUserUnloadKeyboardLayout at 4
 UnlockWindowStation at 4

Modified: trunk/reactos/dll/win32/user32/windows/hook.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/hook.c?rev=32932&r1=32931&r2=32932&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/hook.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/hook.c [iso-8859-1] Sat Apr 12 16:07:40 2008
@@ -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$
+/*
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/windows/input.c
@@ -70,113 +70,6 @@
     if ( Event != EVENT_OBJECT_FOCUS )            return SRV_EVENT_CREATE;
   }
   return Ret;
-}
-
-/* FUNCTIONS *****************************************************************/
-
-/*
- * @implemented
- */
-BOOL
-STDCALL
-UnhookWindowsHookEx(
-  HHOOK Hook)
-{
-  return NtUserUnhookWindowsHookEx(Hook);
-}
-#if 0
-BOOL
-STDCALL
-CallMsgFilter(
-  LPMSG lpMsg,
-  int nCode)
-{
-  UNIMPLEMENTED;
-  return FALSE;
-}
-#endif
-
-
-/*
- * @implemented
- */
-BOOL
-STDCALL
-CallMsgFilterA(
-  LPMSG lpMsg,
-  int nCode)
-{
-   BOOL ret = FALSE;
-
-  if (nCode != HCBT_CREATEWND) ret = NtUserCallMsgFilter((LPMSG) lpMsg, nCode);
-  else
-     {
-        UNICODE_STRING usBuffer;
-        CBT_CREATEWNDA *cbtcwA = (CBT_CREATEWNDA *)lpMsg->lParam;
-        CBT_CREATEWNDW cbtcwW;
-        CREATESTRUCTW csW;
-	MSG Msg;
-
-	Msg.hwnd = lpMsg->hwnd;
-	Msg.message = lpMsg->message;
-	Msg.time = lpMsg->time;
-	Msg.pt = lpMsg->pt;
-	Msg.wParam = lpMsg->wParam;
-
-        cbtcwW.lpcs = &csW;
-        cbtcwW.hwndInsertAfter = cbtcwA->hwndInsertAfter;
-        csW = *(CREATESTRUCTW *)cbtcwA->lpcs;
-
-        if (HIWORD(cbtcwA->lpcs->lpszName))
-        {
-            RtlCreateUnicodeStringFromAsciiz(&usBuffer,cbtcwA->lpcs->lpszName);
-            csW.lpszName = usBuffer.Buffer;
-        }
-        if (HIWORD(cbtcwA->lpcs->lpszClass))
-        {
-            RtlCreateUnicodeStringFromAsciiz(&usBuffer,cbtcwA->lpcs->lpszClass);
-            csW.lpszClass = usBuffer.Buffer;
-        }
-        Msg.lParam =(LPARAM) &cbtcwW;
-
-        ret = NtUserCallMsgFilter((LPMSG)&Msg, nCode);
-
-        lpMsg->time = Msg.time;
-        lpMsg->pt = Msg.pt;
-
-        cbtcwA->hwndInsertAfter = cbtcwW.hwndInsertAfter;
-        if (HIWORD(csW.lpszName)) HeapFree( GetProcessHeap(), 0, (LPWSTR)csW.lpszName );
-        if (HIWORD(csW.lpszClass)) HeapFree( GetProcessHeap(), 0, (LPWSTR)csW.lpszClass );
-     }
-  return ret;
-}
-
-
-/*
- * @implemented
- */
-BOOL
-STDCALL
-CallMsgFilterW(
-  LPMSG lpMsg,
-  int nCode)
-{
-  return  NtUserCallMsgFilter((LPMSG) lpMsg, nCode);
-}
-
-
-/*
- * @unimplemented
- */
-LRESULT
-STDCALL
-CallNextHookEx(
-  HHOOK Hook,
-  int Code,
-  WPARAM wParam,
-  LPARAM lParam)
-{
-  return NtUserCallNextHookEx(Hook, Code, wParam, lParam);
 }
 
 static
@@ -206,6 +99,103 @@
     }
 
   return NtUserSetWindowsHookEx(hMod, &USModuleName, dwThreadId, idHook, lpfn, bAnsi);
+}
+
+
+/* FUNCTIONS *****************************************************************/
+
+#if 0
+BOOL
+STDCALL
+CallMsgFilter(
+  LPMSG lpMsg,
+  int nCode)
+{
+  UNIMPLEMENTED;
+  return FALSE;
+}
+#endif
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+CallMsgFilterA(
+  LPMSG lpMsg,
+  int nCode)
+{
+   BOOL ret = FALSE;
+
+  if (nCode != HCBT_CREATEWND) ret = NtUserCallMsgFilter((LPMSG) lpMsg, nCode);
+  else
+     {
+        UNICODE_STRING usBuffer;
+        CBT_CREATEWNDA *cbtcwA = (CBT_CREATEWNDA *)lpMsg->lParam;
+        CBT_CREATEWNDW cbtcwW;
+        CREATESTRUCTW csW;
+	MSG Msg;
+
+	Msg.hwnd = lpMsg->hwnd;
+	Msg.message = lpMsg->message;
+	Msg.time = lpMsg->time;
+	Msg.pt = lpMsg->pt;
+	Msg.wParam = lpMsg->wParam;
+
+        cbtcwW.lpcs = &csW;
+        cbtcwW.hwndInsertAfter = cbtcwA->hwndInsertAfter;
+        csW = *(CREATESTRUCTW *)cbtcwA->lpcs;
+
+        if (HIWORD(cbtcwA->lpcs->lpszName))
+        {
+            RtlCreateUnicodeStringFromAsciiz(&usBuffer,cbtcwA->lpcs->lpszName);
+            csW.lpszName = usBuffer.Buffer;
+        }
+        if (HIWORD(cbtcwA->lpcs->lpszClass))
+        {
+            RtlCreateUnicodeStringFromAsciiz(&usBuffer,cbtcwA->lpcs->lpszClass);
+            csW.lpszClass = usBuffer.Buffer;
+        }
+        Msg.lParam =(LPARAM) &cbtcwW;
+
+        ret = NtUserCallMsgFilter((LPMSG)&Msg, nCode);
+
+        lpMsg->time = Msg.time;
+        lpMsg->pt = Msg.pt;
+
+        cbtcwA->hwndInsertAfter = cbtcwW.hwndInsertAfter;
+        if (HIWORD(csW.lpszName)) HeapFree( GetProcessHeap(), 0, (LPWSTR)csW.lpszName );
+        if (HIWORD(csW.lpszClass)) HeapFree( GetProcessHeap(), 0, (LPWSTR)csW.lpszClass );
+     }
+  return ret;
+}
+
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+CallMsgFilterW(
+  LPMSG lpMsg,
+  int nCode)
+{
+  return  NtUserCallMsgFilter((LPMSG) lpMsg, nCode);
+}
+
+
+/*
+ * @unimplemented
+ */
+LRESULT
+STDCALL
+CallNextHookEx(
+  HHOOK Hook,
+  int Code,
+  WPARAM wParam,
+  LPARAM lParam)
+{
+  return NtUserCallNextHookEx(Hook, Code, wParam, lParam);
 }
 
 /*



More information about the Ros-diffs mailing list