Commit in reactos on win32k_user_rewrite
include/win32k/ntuser.h+1-11.137.4.1 -> 1.137.4.2
subsys/win32k/eng/mouse.c+1-981.76.2.1 -> 1.76.2.2
subsys/win32k/include/internal.h+4-21.1.4.2 -> 1.1.4.3
subsys/win32k/main/dllmain.c+8-11.76.12.1 -> 1.76.12.2
subsys/win32k/ntuser/class.c+37-11.59.8.1 -> 1.59.8.2
                    /focus.c+3-31.24.4.1 -> 1.24.4.2
                    /guicheck.c+22-71.19.12.2 -> 1.19.12.3
                    /input.c+125-1131.36.4.2 -> 1.36.4.3
                    /message.c+8-21.71.4.1 -> 1.71.4.2
                    /msgqueue.c+3-61.100.12.1 -> 1.100.12.2
                    /ntuser.c+33-21.1.4.2 -> 1.1.4.3
                    /stubs.c+1-131.45.12.1 -> 1.45.12.2
subsys/win32k/objects/text.c+43-331.105 -> 1.105.2.1
subsys/win32k/tests/tests/eng-mem-1.c+3-81.1 -> 1.1.12.1
+292-290
14 modified files
implemented GetClassInfo() and a few merges from head

reactos/include/win32k
ntuser.h 1.137.4.1 -> 1.137.4.2
diff -u -r1.137.4.1 -r1.137.4.2
--- ntuser.h	15 Jul 2004 20:07:15 -0000	1.137.4.1
+++ ntuser.h	27 Aug 2004 15:56:04 -0000	1.137.4.2
@@ -573,7 +573,7 @@
 NtUserGetCaretPos(
   LPPOINT lpPoint);
 
-DWORD STDCALL
+RTL_ATOM STDCALL
 NtUserGetClassInfo(HINSTANCE hInst,
 		   LPCWSTR str,
 		   LPWNDCLASSEXW wcex,

reactos/subsys/win32k/eng
mouse.c 1.76.2.1 -> 1.76.2.2
diff -u -r1.76.2.1 -r1.76.2.2
--- mouse.c	15 Jul 2004 20:07:16 -0000	1.76.2.1
+++ mouse.c	27 Aug 2004 15:56:04 -0000	1.76.2.2
@@ -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: mouse.c,v 1.76.2.1 2004/07/15 20:07:16 weiden Exp $
+/* $Id: mouse.c,v 1.76.2.2 2004/08/27 15:56:04 weiden Exp $
  *
  * PROJECT:          ReactOS kernel
  * PURPOSE:          Mouse
@@ -243,103 +243,6 @@
   return(TRUE);
 }
 
-#define ClearMouseInput(mi) \
-  mi.dx = 0; \
-  mi.dy = 0; \
-  mi.mouseData = 0; \
-  mi.dwFlags = 0;
-
-#define SendMouseEvent(mi) \
-  if(mi.dx != 0 || mi.dy != 0) \
-    mi.dwFlags |= MOUSEEVENTF_MOVE; \
-  if(mi.dwFlags) \
-    IntMouseInput(&mi); \
-  ClearMouseInput(mi);
-
-VOID /* STDCALL */
-MouseGDICallBack(PMOUSE_INPUT_DATA Data, ULONG InputCount)
-{
-  PMOUSE_INPUT_DATA mid;
-  MOUSEINPUT mi;
-  ULONG i;
-  
-  ClearMouseInput(mi);
-  mi.time = 0;
-  mi.dwExtraInfo = 0;
-  for(i = 0; i < InputCount; i++)
-  {
-    mid = (Data + i);
-    mi.dx += mid->LastX;
-    mi.dy += mid->LastY;
-    
-    if(mid->ButtonFlags)
-    {
-      if(mid->ButtonFlags & MOUSE_LEFT_BUTTON_DOWN)
-      {
-        mi.dwFlags |= MOUSEEVENTF_LEFTDOWN;
-        SendMouseEvent(mi);
-      }
-      if(mid->ButtonFlags & MOUSE_LEFT_BUTTON_UP)
-      {
-        mi.dwFlags |= MOUSEEVENTF_LEFTUP;
-        SendMouseEvent(mi);
-      }
-      if(mid->ButtonFlags & MOUSE_MIDDLE_BUTTON_DOWN)
-      {
-        mi.dwFlags |= MOUSEEVENTF_MIDDLEDOWN;
-        SendMouseEvent(mi);
-      }
-      if(mid->ButtonFlags & MOUSE_MIDDLE_BUTTON_UP)
-      {
-        mi.dwFlags |= MOUSEEVENTF_MIDDLEUP;
-        SendMouseEvent(mi);
-      }
-      if(mid->ButtonFlags & MOUSE_RIGHT_BUTTON_DOWN)
-      {
-        mi.dwFlags |= MOUSEEVENTF_RIGHTDOWN;
-        SendMouseEvent(mi);
-      }
-      if(mid->ButtonFlags & MOUSE_RIGHT_BUTTON_UP)
-      {
-        mi.dwFlags |= MOUSEEVENTF_RIGHTUP;
-        SendMouseEvent(mi);
-      }
-      if(mid->ButtonFlags & MOUSE_BUTTON_4_DOWN)
-      {
-        mi.mouseData |= XBUTTON1;
-        mi.dwFlags |= MOUSEEVENTF_XDOWN;
-        SendMouseEvent(mi);
-      }
-      if(mid->ButtonFlags & MOUSE_BUTTON_4_UP)
-      {
-        mi.mouseData |= XBUTTON1;
-        mi.dwFlags |= MOUSEEVENTF_XUP;
-        SendMouseEvent(mi);
-      }
-      if(mid->ButtonFlags & MOUSE_BUTTON_5_DOWN)
-      {
-        mi.mouseData |= XBUTTON2;
-        mi.dwFlags |= MOUSEEVENTF_XDOWN;
-        SendMouseEvent(mi);
-      }
-      if(mid->ButtonFlags & MOUSE_BUTTON_5_UP)
-      {
-        mi.mouseData |= XBUTTON2;
-        mi.dwFlags |= MOUSEEVENTF_XUP;
-        SendMouseEvent(mi);
-      }
-      if(mid->ButtonFlags & MOUSE_WHEEL)
-      {
-        mi.mouseData = mid->ButtonData;
-        mi.dwFlags |= MOUSEEVENTF_WHEEL;
-        SendMouseEvent(mi);
-      }
-    }
-  }
-  
-  SendMouseEvent(mi);
-}
-
 /* SOFTWARE MOUSE POINTER IMPLEMENTATION **************************************/
 
 VOID FASTCALL

reactos/subsys/win32k/include
internal.h 1.1.4.2 -> 1.1.4.3
diff -u -r1.1.4.2 -r1.1.4.3
--- internal.h	18 Jul 2004 23:44:01 -0000	1.1.4.2
+++ internal.h	27 Aug 2004 15:56:05 -0000	1.1.4.3
@@ -149,6 +149,7 @@
 BOOL          FASTCALL IntReferenceClassByNameOrAtom(PCLASS_OBJECT *Class, PUNICODE_STRING ClassNameOrAtom, HINSTANCE hInstance);
 BOOL          FASTCALL IntReferenceClassByName(PCLASS_OBJECT *Class, PUNICODE_STRING ClassName, HINSTANCE hInstance);
 BOOL          FASTCALL IntReferenceClassByAtom(PCLASS_OBJECT* Class, RTL_ATOM Atom, HINSTANCE hInstance);
+BOOL          FASTCALL IntGetClassInfo(HINSTANCE hInstance, PUNICODE_STRING ClassName, LPWNDCLASSEXW lpWndClassEx, BOOL Ansi);
 
 /* CURSORS AND ICONS **********************************************************/
 
@@ -450,8 +451,8 @@
 {
   LIST_ENTRY ListEntry;
   MSG Msg;
-  PKEVENT CompletionEvent;
-  LRESULT* Result;
+  PKEVENT volatile CompletionEvent;
+  LRESULT volatile * volatile Result;
   struct _USER_MESSAGE_QUEUE* SenderQueue;
   SENDASYNCPROC CompletionCallback;
   ULONG_PTR CompletionCallbackContext;
@@ -999,6 +1000,7 @@
 
 /* MISC FUNCTIONS *************************************************************/
 
+NTSTATUS  FASTCALL InitGuiCheckImpl(VOID);
 NTSTATUS  FASTCALL CsrInit(VOID);
 NTSTATUS  FASTCALL CsrNotify(PCSRSS_API_REQUEST Request, PCSRSS_API_REPLY Reply);
 PEPROCESS FASTCALL CsrAttachToCsrss(VOID);

reactos/subsys/win32k/main
dllmain.c 1.76.12.1 -> 1.76.12.2
diff -u -r1.76.12.1 -r1.76.12.2
--- dllmain.c	15 Jul 2004 20:07:16 -0000	1.76.12.1
+++ dllmain.c	27 Aug 2004 15:56:05 -0000	1.76.12.2
@@ -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: dllmain.c,v 1.76.12.1 2004/07/15 20:07:16 weiden Exp $
+/* $Id: dllmain.c,v 1.76.12.2 2004/08/27 15:56:05 weiden Exp $
  *
  *  Entry Point for win32k.sys
  */
@@ -254,6 +254,13 @@
       return(Status);
     }
   
+  Status = InitGuiCheckImpl();
+  if (!NT_SUCCESS(Status))
+    {
+      DbgPrint("Failed to initialize GUI check implementation.\n");
+      return(Status);
+    }
+  
   InitGdiObjectHandleTable ();
 
   /* Initialize FreeType library */

reactos/subsys/win32k/ntuser
class.c 1.59.8.1 -> 1.59.8.2
diff -u -r1.59.8.1 -r1.59.8.2
--- class.c	15 Jul 2004 20:07:17 -0000	1.59.8.1
+++ class.c	27 Aug 2004 15:56:05 -0000	1.59.8.2
@@ -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: class.c,v 1.59.8.1 2004/07/15 20:07:17 weiden Exp $
+/* $Id: class.c,v 1.59.8.2 2004/08/27 15:56:05 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -494,3 +494,39 @@
   return Ret;
 }
 
+BOOL FASTCALL
+IntGetClassInfo(HINSTANCE hInstance, PUNICODE_STRING ClassName, LPWNDCLASSEXW lpWndClassEx, BOOL Ansi)
+{
+  PCLASS_OBJECT Class;
+  
+  if(IntReferenceClassByNameOrAtom(&Class, ClassName, hInstance))
+  {
+    RTL_ATOM Atom;
+    
+    lpWndClassEx->cbSize = sizeof(LPWNDCLASSEXW);
+    lpWndClassEx->style = Class->style;
+    lpWndClassEx->lpfnWndProc = (Ansi ? Class->lpfnWndProcA : Class->lpfnWndProcW);
+    lpWndClassEx->cbClsExtra = Class->cbClsExtra;
+    lpWndClassEx->cbWndExtra = Class->cbWndExtra;
+    /* This is not typo, we're really not going to use Class->hInstance here. */
+    lpWndClassEx->hInstance = hInstance;
+    lpWndClassEx->hIcon = Class->hIcon;
+    lpWndClassEx->hCursor = Class->hCursor;
+    lpWndClassEx->hbrBackground = Class->hbrBackground;
+    if (Class->lpszMenuName.MaximumLength)
+      RtlCopyUnicodeString((PUNICODE_STRING)lpWndClassEx->lpszMenuName, &Class->lpszMenuName);
+    else
+      lpWndClassEx->lpszMenuName = Class->lpszMenuName.Buffer;
+    /* ClassName->Buffer points to a buffer that is readable from umode because it was passed to kmode and we just probed it */
+    lpWndClassEx->lpszClassName = ClassName->Buffer;
+    lpWndClassEx->hIconSm = Class->hIconSm;
+    Atom = Class->Atom;
+
+    ObmDereferenceObject(Class);
+    return Atom;
+  }
+  
+  SetLastWin32Error(ERROR_CLASS_DOES_NOT_EXIST);
+  return 0;
+}
+

reactos/subsys/win32k/ntuser
focus.c 1.24.4.1 -> 1.24.4.2
diff -u -r1.24.4.1 -r1.24.4.2
--- focus.c	15 Jul 2004 20:07:17 -0000	1.24.4.1
+++ focus.c	27 Aug 2004 15:56:05 -0000	1.24.4.2
@@ -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: focus.c,v 1.24.4.1 2004/07/15 20:07:17 weiden Exp $
+ * $Id: focus.c,v 1.24.4.2 2004/08/27 15:56:05 weiden Exp $
  */
 #include <w32k.h>
 
@@ -97,8 +97,8 @@
    * message queue has active menus (2000/XP and later)
    */
   
-  if(pdo->ActiveMessageQueue != NULL &&
-     pdo->ActiveMessageQueue->MenuOwner != NULL)
+  if((pdo->ActiveMessageQueue != NULL) &&
+     (pdo->ActiveMessageQueue->MenuOwner != NULL))
   {
     DPRINT("Can't set foreground window, menus are opened!\n");
     return FALSE;

reactos/subsys/win32k/ntuser
guicheck.c 1.19.12.2 -> 1.19.12.3
diff -u -r1.19.12.2 -r1.19.12.3
--- guicheck.c	22 Jul 2004 13:25:58 -0000	1.19.12.2
+++ guicheck.c	27 Aug 2004 15:56:05 -0000	1.19.12.3
@@ -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: guicheck.c,v 1.19.12.2 2004/07/22 13:25:58 weiden Exp $
+/* $Id: guicheck.c,v 1.19.12.3 2004/08/27 15:56:05 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -40,7 +40,8 @@
 
 /* GLOBALS *******************************************************************/
 
-static LONG NrGuiApplicationsRunning = 0;
+static LONG NrGuiAppsRunning = 0;
+static FAST_MUTEX GuiSwitchLock;
 
 /* FUNCTIONS *****************************************************************/
 
@@ -48,16 +49,21 @@
 AddGuiApp(PW32PROCESS W32Data)
 {
   W32Data->Flags |= W32PF_CREATEDWINORDC;
-  if (InterlockedIncrement(&NrGuiApplicationsRunning) == 1)
+  if (InterlockedIncrement(&NrGuiAppsRunning) == 1)
     {
-      if (! IntInitializeDesktopGraphics())
+      BOOL Initialized;
+
+      ExAcquireFastMutex(&GuiSwitchLock);
+      Initialized = IntInitializeDesktopGraphics();
+      ExReleaseFastMutex(&GuiSwitchLock);
+
+      if (!Initialized)
         {
           W32Data->Flags &= ~W32PF_CREATEDWINORDC;
-          InterlockedDecrement(&NrGuiApplicationsRunning);
+          InterlockedDecrement(&NrGuiAppsRunning);
           return FALSE;
         }
     }
-
   return TRUE;
 }
 
@@ -65,9 +71,11 @@
 RemoveGuiApp(PW32PROCESS W32Data)
 {
   W32Data->Flags &= ~W32PF_CREATEDWINORDC;
-  if (InterlockedDecrement(&NrGuiApplicationsRunning) == 0)
+  if (InterlockedDecrement(&NrGuiAppsRunning) == 0)
     {
+      ExAcquireFastMutex(&GuiSwitchLock);
       IntEndDesktopGraphics();
+      ExReleaseFastMutex(&GuiSwitchLock);
     }
 }
 
@@ -121,4 +129,11 @@
     }
 }
 
+NTSTATUS FASTCALL
+InitGuiCheckImpl (VOID)
+{
+  ExInitializeFastMutex(&GuiSwitchLock);
+  return STATUS_SUCCESS;
+}
+
 /* EOF */

reactos/subsys/win32k/ntuser
input.c 1.36.4.2 -> 1.36.4.3
diff -u -r1.36.4.2 -r1.36.4.3
--- input.c	18 Jul 2004 23:44:01 -0000	1.36.4.2
+++ input.c	27 Aug 2004 15:56:05 -0000	1.36.4.3
@@ -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: input.c,v 1.36.4.2 2004/07/18 23:44:01 weiden Exp $
+/* $Id: input.c,v 1.36.4.3 2004/08/27 15:56:05 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -34,13 +34,9 @@
 
 /* GLOBALS *******************************************************************/
 
-#define ENABLEMOUSEGDICALLBACK 1
-
 static HANDLE MouseDeviceHandle;
-#if !ENABLEMOUSEGDICALLBACK
 static HANDLE MouseThreadHandle;
 static CLIENT_ID MouseThreadId;
-#endif
 static HANDLE KeyboardThreadHandle;
 static CLIENT_ID KeyboardThreadId;
 static HANDLE KeyboardDeviceHandle;
@@ -50,15 +46,111 @@
 
 /* FUNCTIONS *****************************************************************/
 
-#if !ENABLEMOUSEGDICALLBACK
-VOID STDCALL_FUNC STATIC
+#define ClearMouseInput(mi) \
+  mi.dx = 0; \
+  mi.dy = 0; \
+  mi.mouseData = 0; \
+  mi.dwFlags = 0;
+
+#define SendMouseEvent(mi) \
+  if(mi.dx != 0 || mi.dy != 0) \
+    mi.dwFlags |= MOUSEEVENTF_MOVE; \
+  if(mi.dwFlags) \
+    IntMouseInput(&mi); \
+  ClearMouseInput(mi);
+
+VOID FASTCALL
+ProcessMouseInputData(PMOUSE_INPUT_DATA Data, ULONG InputCount)
+{
+  PMOUSE_INPUT_DATA mid;
+  MOUSEINPUT mi;
+  ULONG i;
+
+  ClearMouseInput(mi);
+  mi.time = 0;
+  mi.dwExtraInfo = 0;
+  for(i = 0; i < InputCount; i++)
+  {
+    mid = (Data + i);
+    mi.dx += mid->LastX;
+    mi.dy += mid->LastY;
+
+    if(mid->ButtonFlags)
+    {
+      if(mid->ButtonFlags & MOUSE_LEFT_BUTTON_DOWN)
+      {
+        mi.dwFlags |= MOUSEEVENTF_LEFTDOWN;
+        SendMouseEvent(mi);
+      }
+      if(mid->ButtonFlags & MOUSE_LEFT_BUTTON_UP)
+      {
+        mi.dwFlags |= MOUSEEVENTF_LEFTUP;
+        SendMouseEvent(mi);
+      }
+      if(mid->ButtonFlags & MOUSE_MIDDLE_BUTTON_DOWN)
+      {
+        mi.dwFlags |= MOUSEEVENTF_MIDDLEDOWN;
+        SendMouseEvent(mi);
+      }
+      if(mid->ButtonFlags & MOUSE_MIDDLE_BUTTON_UP)
+      {
+        mi.dwFlags |= MOUSEEVENTF_MIDDLEUP;
+        SendMouseEvent(mi);
+      }
+      if(mid->ButtonFlags & MOUSE_RIGHT_BUTTON_DOWN)
+      {
+        mi.dwFlags |= MOUSEEVENTF_RIGHTDOWN;
+        SendMouseEvent(mi);
+      }
+      if(mid->ButtonFlags & MOUSE_RIGHT_BUTTON_UP)
+      {
+        mi.dwFlags |= MOUSEEVENTF_RIGHTUP;
+        SendMouseEvent(mi);
+      }
+      if(mid->ButtonFlags & MOUSE_BUTTON_4_DOWN)
+      {
+        mi.mouseData |= XBUTTON1;
+        mi.dwFlags |= MOUSEEVENTF_XDOWN;
+        SendMouseEvent(mi);
+      }
+      if(mid->ButtonFlags & MOUSE_BUTTON_4_UP)
+      {
+        mi.mouseData |= XBUTTON1;
+        mi.dwFlags |= MOUSEEVENTF_XUP;
+        SendMouseEvent(mi);
+      }
+      if(mid->ButtonFlags & MOUSE_BUTTON_5_DOWN)
+      {
+        mi.mouseData |= XBUTTON2;
+        mi.dwFlags |= MOUSEEVENTF_XDOWN;
+        SendMouseEvent(mi);
+      }
+      if(mid->ButtonFlags & MOUSE_BUTTON_5_UP)
+      {
+        mi.mouseData |= XBUTTON2;
+        mi.dwFlags |= MOUSEEVENTF_XUP;
+        SendMouseEvent(mi);
+      }
+      if(mid->ButtonFlags & MOUSE_WHEEL)
+      {
+        mi.mouseData = mid->ButtonData;
+        mi.dwFlags |= MOUSEEVENTF_WHEEL;
+        SendMouseEvent(mi);
+      }
+    }
+  }
+
+  SendMouseEvent(mi);
+}
+
+VOID STDCALL
 MouseThreadMain(PVOID StartContext)
 {
   UNICODE_STRING MouseDeviceName;
   OBJECT_ATTRIBUTES MouseObjectAttributes;
   IO_STATUS_BLOCK Iosb;
   NTSTATUS Status;
-  
+
   RtlRosInitUnicodeStringFromLiteral(&MouseDeviceName, L"\\??\\Mouse"); /* FIXME - does win use the same? */
   InitializeObjectAttributes(&MouseObjectAttributes,
                              &MouseDeviceName,
@@ -76,7 +168,7 @@
     DPRINT1("Win32K: Failed to open mouse.\n");
     return; //(Status);
   }
-  
+
   for(;;)
   {
     /*
@@ -89,7 +181,7 @@
                                    TRUE,
                                    NULL);
     DPRINT("Mouse Input Thread Starting...\n");
-    
+
     /*
      * Receive and process keyboard input.
      */
@@ -120,13 +212,12 @@
         return; //(Status);
       }
       DPRINT("MouseEvent\n");
-      
-      MouseGDICallBack(&MouseInput, sizeof(MOUSE_INPUT_DATA));
+
+      ProcessMouseInputData(&MouseInput, Iosb.Information / sizeof(MOUSE_INPUT_DATA));
     }
     DPRINT("Mouse Input Thread Stopped...\n");
   }
 }
-#endif
 
 STATIC VOID STDCALL
 KeyboardThreadMain(PVOID StartContext)
@@ -135,12 +226,10 @@
   OBJECT_ATTRIBUTES KeyboardObjectAttributes;
   IO_STATUS_BLOCK Iosb;
   NTSTATUS Status;
-#if 0
   MSG msg;
   PUSER_MESSAGE_QUEUE FocusQueue;
   struct _ETHREAD *FocusThread;
-#endif
-  
+
   RtlRosInitUnicodeStringFromLiteral(&KeyboardDeviceName, L"\\??\\Keyboard");
   InitializeObjectAttributes(&KeyboardObjectAttributes,
 			     &KeyboardDeviceName,
@@ -223,15 +312,15 @@
 
 	  /* FIXME: Support MOD_WIN */
 
-	  lParam = KeyEvent.wRepeatCount | 
+	  lParam = KeyEvent.wRepeatCount |
 	    ((KeyEvent.wVirtualScanCode << 16) & 0x00FF0000) | 0x40000000;
-	  
+
 	  /* Bit 24 indicates if this is an extended key */
 	  if (KeyEvent.dwControlKeyState & ENHANCED_KEY)
 	    {
 	      lParam |= (1 << 24);
 	    }
-	  
+
 	  if (fsModifiers & MOD_ALT)
 	    {
 	      /* Context mode. 1 if ALT if pressed while the key is pressed */
@@ -251,12 +340,12 @@
 		  MsqPostHotKeyMessage (Thread,
 					hWnd,
 					(WPARAM)id,
-					MAKELPARAM((WORD)fsModifiers, 
+					MAKELPARAM((WORD)fsModifiers,
 						   (WORD)msg.wParam));
 		}
-	      continue;	
+	      continue;
 	    }
-
+#endif
 	  /* Find the target thread whose locale is in effect */
 	  if (!IntGetScreenDC())
 	    {
@@ -264,12 +353,16 @@
 	    }
 	  else
 	    {
+#if 0
       	      FocusQueue = IntGetFocusMessageQueue();
+#else
+              FocusQueue = NULL;
+#endif
 	    }
 
 	  if (!FocusQueue) continue;
 
-	  if(KeyEvent.bKeyDown && (fsModifiers & MOD_ALT)) 
+	  if(KeyEvent.bKeyDown && (fsModifiers & MOD_ALT))
 	    msg.message = WM_SYSKEYDOWN;
 	  else if(KeyEvent.bKeyDown)
 	    msg.message = WM_KEYDOWN;
@@ -280,24 +373,25 @@
 
 	  msg.wParam = KeyEvent.wVirtualKeyCode;
 	  msg.lParam = lParam;
+#if 0
 	  msg.hwnd = FocusQueue->FocusWindow;
+#endif
 
 	  FocusThread = FocusQueue->Thread;
 
-	  if (FocusThread && FocusThread->Win32Thread && 
-	      FocusThread->Win32Thread->KeyboardLayout) 
+	  if (FocusThread && FocusThread->Win32Thread &&
+	      FocusThread->Win32Thread->KeyboardLayout)
 	    {
 	      W32kKeyProcessMessage(&msg,
 				    FocusThread->Win32Thread->KeyboardLayout);
-	    } 
+	    }
 	  else
 	    continue;
-	  
+
 	  /*
 	   * Post a keyboard message.
 	   */
 	  MsqPostKeyboardMessage(msg.message,msg.wParam,msg.lParam);
-#endif
 	}
       DPRINT( "KeyboardInput Thread Stopped...\n" );
     }
@@ -328,16 +422,6 @@
 InitInputImpl(VOID)
 {
   NTSTATUS Status;
-#if ENABLEMOUSEGDICALLBACK
-  UNICODE_STRING MouseDeviceName;
-  OBJECT_ATTRIBUTES MouseObjectAttributes;
-  IO_STATUS_BLOCK Iosb;
-  PIRP Irp;
-  PFILE_OBJECT FileObject;
-  GDI_INFORMATION GdiInfo;
-  KEVENT IoEvent;
-  PIO_STACK_LOCATION StackPtr;
-#endif
 
   KeInitializeEvent(&InputThreadsStart, NotificationEvent, FALSE);
 
@@ -355,79 +439,8 @@
 
   /* Initialize the default keyboard layout */
   (VOID)W32kGetDefaultKeyLayout();
-  
-#if ENABLEMOUSEGDICALLBACK
-  /*
-   * Connect to the mouse class driver.
-   * Failures here don't result in a failure return, the system must be
-   * able to operate without mouse
-   */  
-  RtlRosInitUnicodeStringFromLiteral(&MouseDeviceName, L"\\??\\MouseClass");
-  InitializeObjectAttributes(&MouseObjectAttributes,
-			     &MouseDeviceName,
-			     0,
-			     NULL,
-			     NULL);
-  Status = ZwOpenFile(&MouseDeviceHandle,
-		      FILE_ALL_ACCESS,
-		      &MouseObjectAttributes,
-		      &Iosb,
-		      0,
-		      FILE_SYNCHRONOUS_IO_ALERT);
-  if (!NT_SUCCESS(Status))
-    {
-      DPRINT1("Win32K: Failed to open mouse.\n");
-      return STATUS_SUCCESS;
-    }
-  Status = ObReferenceObjectByHandle(MouseDeviceHandle,
-				     FILE_READ_DATA | FILE_WRITE_DATA,
-				     IoFileObjectType,
-				     KernelMode,
-				     (PVOID *) &FileObject,
-				     NULL);
-   
-   if (!NT_SUCCESS(Status))
-     {
-       DPRINT1("Win32K: Failed to reference mouse file object. (0x%X)\n", Status);
-       ZwClose(MouseDeviceHandle);
-       return STATUS_SUCCESS;
-     }
-   KeInitializeEvent(&IoEvent, FALSE, NotificationEvent);
-   GdiInfo.CallBack = MouseGDICallBack;
-   Irp = IoBuildDeviceIoControlRequest(IOCTL_INTERNAL_MOUSE_CONNECT,
-				       FileObject->DeviceObject,
-				       &GdiInfo,
-				       sizeof(GdiInfo),
-				       NULL,
-				       0,
-				       TRUE,
-				       &FileObject->Event,
-				       &Iosb);
-
-   //trigger FileObject/Event dereferencing
-   Irp->Tail.Overlay.OriginalFileObject = FileObject;
-
-   StackPtr = IoGetNextIrpStackLocation(Irp);
-   StackPtr->FileObject = FileObject;
-   StackPtr->DeviceObject = FileObject->DeviceObject;
-   StackPtr->Parameters.DeviceIoControl.InputBufferLength = sizeof(GdiInfo);
-   StackPtr->Parameters.DeviceIoControl.OutputBufferLength = 0;
-
-   Status = IoCallDriver(FileObject->DeviceObject, Irp);
-   if (Status == STATUS_PENDING)
-     {
-       KeWaitForSingleObject(&FileObject->Event, Executive, KernelMode, FALSE,
-			     NULL);
-       Status = Iosb.Status;
-     }
-   if (!NT_SUCCESS(Status))
-     {
-       DPRINT1("Win32K: Failed to connect to mouse driver.\n");
-       ObDereferenceObject(&FileObject);
-       NtClose(MouseDeviceHandle);
-       return STATUS_SUCCESS;
-     }
-#else
+
+
   Status = PsCreateSystemThread(&MouseThreadHandle,
 				THREAD_ALL_ACCESS,
 				NULL,
@@ -439,8 +452,7 @@
   {
     DPRINT1("Win32K: Failed to create mouse thread.\n");
   }
-#endif
-  
+
   return STATUS_SUCCESS;
 }
 

reactos/subsys/win32k/ntuser
message.c 1.71.4.1 -> 1.71.4.2
diff -u -r1.71.4.1 -r1.71.4.2
--- message.c	15 Jul 2004 20:07:17 -0000	1.71.4.1
+++ message.c	27 Aug 2004 15:56:05 -0000	1.71.4.2
@@ -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: message.c,v 1.71.4.1 2004/07/15 20:07:17 weiden Exp $
+/* $Id: message.c,v 1.71.4.2 2004/08/27 15:56:05 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -900,7 +900,13 @@
                           uTimeout, (uFlags & SMTO_BLOCK), uResult);
   if(Status == STATUS_TIMEOUT)
   {
-    SetLastWin32Error(ERROR_TIMEOUT);
+    /* MSDN says GetLastError() should return 0 after timeout */
+    SetLastWin32Error(0);
+    return FALSE;
+  }
+  else if(!NT_SUCCESS(Status))
+  {
+    SetLastNtError(Status);
     return FALSE;
   }
   

reactos/subsys/win32k/ntuser
msgqueue.c 1.100.12.1 -> 1.100.12.2
diff -u -r1.100.12.1 -r1.100.12.2
--- msgqueue.c	15 Jul 2004 20:07:18 -0000	1.100.12.1
+++ msgqueue.c	27 Aug 2004 15:56:05 -0000	1.100.12.2
@@ -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: msgqueue.c,v 1.100.12.1 2004/07/15 20:07:18 weiden Exp $
+/* $Id: msgqueue.c,v 1.100.12.2 2004/08/27 15:56:05 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -375,10 +375,7 @@
     {
       WaitStatus = KeWaitForMultipleObjects(2, WaitObjects, WaitAny, UserRequest,
                                             UserMode, TRUE, NULL, NULL);
-      while (MsqDispatchOneSentMessage(MessageQueue))
-        {
-          ;
-        }
+      while (MsqDispatchOneSentMessage(MessageQueue));
     }
   while (NT_SUCCESS(WaitStatus) && STATUS_WAIT_0 != WaitStatus);
 
@@ -805,7 +802,7 @@
   ThreadQueue = PsGetWin32Thread()->MessageQueue;
   ASSERT(ThreadQueue != MessageQueue);
   
-  Timeout.QuadPart = uTimeout * -10000;
+  Timeout.QuadPart = (LONGLONG)uTimeout * (LONGLONG) -10000;
   
   /* FIXME - increase reference counter of sender's message queue here */
   

reactos/subsys/win32k/ntuser
ntuser.c 1.1.4.2 -> 1.1.4.3
diff -u -r1.1.4.2 -r1.1.4.3
--- ntuser.c	18 Jul 2004 23:44:01 -0000	1.1.4.2
+++ ntuser.c	27 Aug 2004 15:56:05 -0000	1.1.4.3
@@ -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: ntuser.c,v 1.1.4.2 2004/07/18 23:44:01 weiden Exp $
+/* $Id: ntuser.c,v 1.1.4.3 2004/08/27 15:56:05 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -742,6 +742,37 @@
   END_NTUSER_NOERR();
 }
 
+RTL_ATOM STDCALL
+NtUserGetClassInfo(HINSTANCE hInstance, LPCWSTR lpClassName, LPWNDCLASSEXW lpWndClassEx,
+                   BOOL Ansi, DWORD unknown3)
+{
+  UNICODE_STRING ClassName;
+  BEGIN_NTUSER(RTL_ATOM, 0);
+  
+  if(!IS_ATOM(lpClassName))
+  {
+    /* FIXME - probe string */
+    #if 1
+    if(*lpClassName == L'\0') NTUSER_FAIL();
+    #endif
+    RtlInitUnicodeString(&ClassName, lpClassName);
+  }
+  else
+  {
+    ClassName.Length = 0;
+    ClassName.MaximumLength = 0;
+    ClassName.Buffer = (LPWSTR)lpClassName;
+  }
+  
+  /* FIXME - probe lpWndClassEx structure */
+  
+  ENTER_CRITICAL_SHARED();
+  Result = IntGetClassInfo(hInstance, &ClassName, lpWndClassEx, Ansi);
+  LEAVE_CRITICAL();
+  
+  END_NTUSER();
+}
+
 DWORD STDCALL
 NtUserGetClassLong(HWND hWnd, INT Offset, BOOL Ansi)
 {
@@ -949,7 +980,7 @@
   NTUSER_USER_OBJECT(WINDOW, Window);
   BEGIN_NTUSER_NOERR(HWND);
   
-  ENTER_CRITICAL();
+  ENTER_CRITICAL_SHARED();
   Window = IntGetDesktopWindow();
   Result = (Window != NULL ? Window->Handle : NULL);
   LEAVE_CRITICAL();

reactos/subsys/win32k/ntuser
stubs.c 1.45.12.1 -> 1.45.12.2
diff -u -r1.45.12.1 -r1.45.12.2
--- stubs.c	15 Jul 2004 20:07:18 -0000	1.45.12.1
+++ stubs.c	27 Aug 2004 15:56:05 -0000	1.45.12.2
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.45.12.1 2004/07/15 20:07:18 weiden Exp $
+/* $Id: stubs.c,v 1.45.12.2 2004/08/27 15:56:05 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -159,18 +159,6 @@
  */
 
 DWORD STDCALL
-NtUserGetClassInfo(
-   HINSTANCE hInstance,
-   LPCWSTR lpClassName,
-   LPWNDCLASSEXW lpWndClassEx,
-   BOOL Ansi,
-   DWORD unknown3)
-{
-   UNIMPLEMENTED;
-   return 0;
-}
-
-DWORD STDCALL
 NtUserGetClassName (
   HWND hWnd,
   LPWSTR lpClassName,

reactos/subsys/win32k/objects
text.c 1.105 -> 1.105.2.1
diff -u -r1.105 -r1.105.2.1
--- text.c	14 Jul 2004 20:48:58 -0000	1.105
+++ text.c	27 Aug 2004 15:56:05 -0000	1.105.2.1
@@ -22,7 +22,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: text.c,v 1.105 2004/07/14 20:48:58 navaraf Exp $ */
+/* $Id: text.c,v 1.105.2.1 2004/08/27 15:56:05 weiden Exp $ */
 #include <w32k.h>
 
 #include <ft2build.h>
@@ -155,7 +155,7 @@
    BOOL bRestartScan = TRUE;
    NTSTATUS Status;
 
-   RtlInitUnicodeString(&Directory, L"\\SystemRoot\\Media\\Fonts\\");
+   RtlInitUnicodeString(&Directory, L"\\SystemRoot\\media\\fonts\\");
    /* FIXME: Add support for other font types */
    RtlInitUnicodeString(&SearchPattern, L"*.ttf");
 
@@ -213,9 +213,8 @@
             break;
          }
 
-         for (DirInfo = (PFILE_DIRECTORY_INFORMATION)DirInfoBuffer;
-              DirInfo->NextEntryOffset != 0;
-              DirInfo = (PFILE_DIRECTORY_INFORMATION)((ULONG_PTR)DirInfo + DirInfo->NextEntryOffset))
+         DirInfo = (PFILE_DIRECTORY_INFORMATION)DirInfoBuffer;
+         while (1)
          {
             TempString.Buffer = DirInfo->FileName;
             TempString.Length =
@@ -223,6 +222,9 @@
             RtlCopyUnicodeString(&FileName, &Directory);
             RtlAppendUnicodeStringToString(&FileName, &TempString);
             IntGdiAddFontResource(&FileName, 0);
+            if (DirInfo->NextEntryOffset == 0)
+               break;
+            DirInfo = (PFILE_DIRECTORY_INFORMATION)((ULONG_PTR)DirInfo + DirInfo->NextEntryOffset);
          }
 
          bRestartScan = FALSE;
@@ -380,7 +382,8 @@
    /* FIXME: Complete text metrics */
    FontGDI->TextMetric.tmAscent = (Face->size->metrics.ascender + 32) >> 6; /* units above baseline */
    FontGDI->TextMetric.tmDescent = (32 - Face->size->metrics.descender) >> 6; /* units below baseline */
-   FontGDI->TextMetric.tmHeight = FontGDI->TextMetric.tmAscent + FontGDI->TextMetric.tmDescent;
+   FontGDI->TextMetric.tmHeight = (Face->size->metrics.ascender -
+                                   Face->size->metrics.descender) >> 6;
 
    DPRINT("Font loaded: %s (%s)\n", Face->family_name, Face->style_name);
    DPRINT("Num glyphs: %u\n", Face->num_glyphs);
@@ -815,7 +818,6 @@
     }
 
   pPost = FT_Get_Sfnt_Table(FontGDI->face, ft_sfnt_post); /* we can live with this failing */
-  IntUnLockFreeType;
 
   Otm->otmSize = Needed;
 
@@ -963,6 +965,8 @@
       Otm->otmsUnderscorePosition = (FT_MulFix(pPost->underlinePosition, YScale) + 32) >> 6;
     }
 
+  IntUnLockFreeType;
+
   /* otmp* members should clearly have type ptrdiff_t, but M$ knows best */
   Cp = (char*) Otm + sizeof(OUTLINETEXTMETRICW);
   Otm->otmpFamilyName = (LPSTR)(Cp - (char*) Otm);
@@ -1521,7 +1525,8 @@
    int error, glyph_index, n, i;
    FT_Face face;
    FT_GlyphSlot glyph;
-   ULONG TextLeft, TextTop, pitch, previous, BackgroundLeft;
+   LONGLONG TextLeft, RealXStart;
+   ULONG TextTop, pitch, previous, BackgroundLeft;
    FT_Bool use_kerning;
    RECTL DestRect, MaskRect;
    POINTL SourcePoint, BrushOrigin;
@@ -1576,7 +1581,7 @@
    Start.x = XStart; Start.y = YStart;
    IntLPtoDP(dc, &Start, 1);
 
-   XStart = Start.x + dc->w.DCOrgX;
+   RealXStart = (Start.x + dc->w.DCOrgX) << 6;
    YStart = Start.y + dc->w.DCOrgY;
 
    /* Create the brushes */
@@ -1717,7 +1722,7 @@
 
    if (dc->w.textAlign & (TA_RIGHT | TA_CENTER))
    {
-      UINT TextWidth = 0;
+      ULONGLONG TextWidth = 0;
       LPCWSTR TempText = String;
       int Start;
 
@@ -1728,7 +1733,7 @@
       if (NULL != Dx)
       {
          Start = Count < 2 ? 0 : Count - 2;
-         TextWidth = Count < 2 ? 0 : Dx[Count - 2];
+         TextWidth = Count < 2 ? 0 : (Dx[Count - 2] << 6);
       }
       else
       {
@@ -1757,10 +1762,10 @@
             IntLockFreeType;
             FT_Get_Kerning(face, previous, glyph_index, 0, &delta);
             IntUnLockFreeType;
-            TextWidth += delta.x >> 6;
+            TextWidth += delta.x;
          }
 
-         TextWidth += glyph->advance.x >> 6;
+         TextWidth += glyph->advance.x;
 
          previous = glyph_index;
          TempText++;
@@ -1770,17 +1775,17 @@
 
       if (dc->w.textAlign & TA_RIGHT)
       {
-         XStart -= TextWidth;
+         RealXStart -= TextWidth;
       }
       else
       {
-         XStart -= TextWidth / 2;
+         RealXStart -= TextWidth / 2;
       }
    }
 
-   TextLeft = XStart;
+   TextLeft = RealXStart;
    TextTop = YStart;
-   BackgroundLeft = XStart;
+   BackgroundLeft = (RealXStart + 32) >> 6;
 
    /*
     * The main rendering loop.
@@ -1810,7 +1815,7 @@
          IntLockFreeType;
          FT_Get_Kerning(face, previous, glyph_index, 0, &delta);
          IntUnLockFreeType;
-         TextLeft += delta.x >> 6;
+         TextLeft += delta.x;
       }
 
       if (glyph->format == ft_glyph_format_outline)
@@ -1833,7 +1838,7 @@
       if (fuOptions & ETO_OPAQUE)
       {
          DestRect.left = BackgroundLeft;
-         DestRect.right = TextLeft + ((glyph->advance.x + 32) >> 6);
+         DestRect.right = (TextLeft + glyph->advance.x + 32) >> 6;
          DestRect.top = TextTop + yoff - ((face->size->metrics.ascender + 32) >> 6);
          DestRect.bottom = TextTop + yoff + ((32 - face->size->metrics.descender) >> 6);
          IntEngBitBlt(
@@ -1851,8 +1856,8 @@
          BackgroundLeft = DestRect.right;
       }
 
-      DestRect.left = TextLeft;
-      DestRect.right = TextLeft + glyph->bitmap.width;
+      DestRect.left = ((TextLeft + 32) >> 6) + glyph->bitmap_left;
+      DestRect.right = DestRect.left + glyph->bitmap.width;
       DestRect.top = TextTop + yoff - glyph->bitmap_top;
       DestRect.bottom = DestRect.top + glyph->bitmap.rows;
 	
@@ -1892,11 +1897,11 @@
 
       if (NULL == Dx)
       {
-        TextLeft += (glyph->advance.x + 32) >> 6;
+         TextLeft += glyph->advance.x;
       }
       else
       {
-        TextLeft += Dx[i];
+         TextLeft += Dx[i] << 6;
       }
       previous = glyph_index;
 
@@ -2082,7 +2087,7 @@
    {
       glyph_index = FT_Get_Char_Index(face, i);
       FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT);
-      SafeBuffer[i - FirstChar] = face->glyph->advance.x >> 6;
+      SafeBuffer[i - FirstChar] = (face->glyph->advance.x + 32) >> 6;
    }
    IntUnLockFreeType;
    TEXTOBJ_UnlockText(hFont);
@@ -2186,7 +2191,7 @@
   FT_Face face;
   FT_GlyphSlot glyph;
   INT error, n, glyph_index, i, previous;
-  LONG TotalWidth = 0;
+  ULONGLONG TotalWidth = 0;
   FT_CharMap charmap, found = NULL;
   BOOL use_kerning;
 
@@ -2266,25 +2271,25 @@
           IntLockFreeType;
 	  FT_Get_Kerning(face, previous, glyph_index, 0, &delta);
           IntUnLockFreeType;
-	  TotalWidth += delta.x >> 6;
+	  TotalWidth += delta.x;
 	}
 
-      TotalWidth += glyph->advance.x >> 6;
+      TotalWidth += glyph->advance.x;
 
-      if (TotalWidth <= MaxExtent && NULL != Fit)
+      if (((TotalWidth + 32) >> 6) <= MaxExtent && NULL != Fit)
 	{
 	  *Fit = i + 1;
 	}
       if (NULL != Dx)
 	{
-	  Dx[i] = TotalWidth;
+	  Dx[i] = (TotalWidth + 32) >> 6;
 	}
 
       previous = glyph_index;
       String++;
     }
 
-  Size->cx = TotalWidth;
+  Size->cx = (TotalWidth + 32) >> 6;
   Size->cy = (TextObj->logfont.lfHeight < 0 ? - TextObj->logfont.lfHeight : TextObj->logfont.lfHeight);
   Size->cy = EngMulDiv(Size->cy, NtGdiGetDeviceCaps(hDC, LOGPIXELSY), 72);
 
@@ -2611,7 +2616,11 @@
   	SafeTm.tmAscent = (Face->size->metrics.ascender + 32) >> 6; // units above baseline
 	SafeTm.tmDescent = (32 - Face->size->metrics.descender) >> 6; // units below baseline
 	SafeTm.tmHeight = SafeTm.tmAscent + SafeTm.tmDescent;
-        SafeTm.tmMaxCharWidth = (Face->size->metrics.max_advance + 32) >> 6;
+    SafeTm.tmMaxCharWidth = (Face->size->metrics.max_advance + 32) >> 6;
+    if (FT_IS_SFNT(FontGDI->face))
+    {
+      SafeTm.tmPitchAndFamily |= TMPF_TRUETYPE;
+    }
 	Status = MmCopyToCaller(tm, &SafeTm, sizeof(TEXTMETRICW));
 	}
     }
@@ -2855,7 +2864,7 @@
           continue;
         }
       Score = GetFontScore(LogFont, FaceName, FontGDI);
-      if (*MatchScore < Score)
+      if (*MatchScore == 0 || *MatchScore < Score)
         {
           *Font = CurrentEntry->hFont;
           *MatchScore = Score;
@@ -2963,7 +2972,8 @@
 
   RtlFreeUnicodeString(&FaceName);
   TEXTOBJ_UnlockText(FontHandle);
-  ASSERT(! NT_SUCCESS(Status) || NULL != TextObj->GDIFontHandle);
+  
+  ASSERT((NT_SUCCESS(Status) ^ (NULL == TextObj->GDIFontHandle)) != 0);
 
   return Status;
 }

reactos/subsys/win32k/tests/tests
eng-mem-1.c 1.1 -> 1.1.12.1
diff -u -r1.1 -r1.1.12.1
--- eng-mem-1.c	15 May 2004 20:30:19 -0000	1.1
+++ eng-mem-1.c	27 Aug 2004 15:56:05 -0000	1.1.12.1
@@ -13,14 +13,14 @@
   /* Allocate memory with EngAllocMem */
   pmem1 = 0;
   AllocSize1 = 1024;
-  AllocTag1 = "zyxD";
+  AllocTag1 = TAG('D','x','y','z');
   pmem1 = EngAllocMem(FL_ZERO_MEMORY, AllocSize1, AllocTag1);
   FAIL_IF_EQUAL(pmem1, 0, "EngAllocMem() for pmem1 failed");
 
   /* Allocate memory with EngAllocMem */
   pmem2 = 0;
   AllocSize2 = 1024;
-  AllocTag2 = "zyxD";
+  AllocTag2 = TAG('D','x','y','z');
   pmem2 = EngAllocUserMem(AllocSize2, AllocTag2);
   FAIL_IF_EQUAL(pmem1, 0, "EngAllocUserMem() for pmem2 failed");
 
@@ -45,9 +45,4 @@
   return TS_OK;
 }
 
-int
-Eng_mem_1Test(int Command, char *Buffer)
-{
-  DISPATCHER("Win32k Engine Memory API");
-}
-
+DISPATCHER(Eng_mem_1Test, "Win32k Engine Memory API")
CVSspam 0.2.8