Commit in reactos on win32k_user_reconstruction
Makefile+4-41.233 -> 1.233.2.1
bootdata/hivesft.inf+51.30 -> 1.30.2.1
drivers/video/displays/framebuf/screen.c+2-51.3 -> 1.3.2.1
hal/halx86/mpsirql.c+19-11.8 -> 1.8.14.1
iface/addsys/w32ksvc.db+11.52 -> 1.52.8.1
include/acledit.h+136added 1.1.2.1
       /tchar.h+7-61.10 -> 1.10.24.1
include/win32k/font.h+2-11.1 -> 1.1.10.1
lib/advapi32/advapi32.def+2-21.19 -> 1.19.8.1
            /advapi32.edf+2-21.39 -> 1.39.8.1
lib/advapi32/misc/logon.c+373-361.7 -> 1.7.2.1
lib/advapi32/sec/misc.c+25-11.19 -> 1.19.2.1
lib/cpl/access/access.c+2-21.1 -> 1.1.2.1
lib/cpl/appwiz/appwiz.c+2-21.2 -> 1.2.2.1
lib/cpl/cplsample/cplsample.c+2-21.2 -> 1.2.10.1
lib/gdi32/misc/stubs.c+320-211.62 -> 1.62.8.1
              /stubsa.c+19-11.31 -> 1.31.8.1
              /stubsw.c+20-41.28 -> 1.28.8.1
lib/gdi32/objects/font.c+18-11.5 -> 1.5.2.1
lib/kernel32/mem/virtual.c+2-21.13 -> 1.13.6.1
lib/mmdrv/auxil.c-391.1 -> 1.1.8.1
lib/ntdll/ldr/utils.c+5-21.97 -> 1.97.2.1
lib/rtl/i386/exception.c+7-81.3 -> 1.3.2.1
lib/rtl/sid.c+68-691.2 -> 1.2.2.1
lib/user32/misc/display.c+26-101.9 -> 1.9.8.1
               /misc.c+1-11.5.8.1 -> 1.5.8.2
lib/user32/windows/nonclient.c+32-481.59 -> 1.59.2.1
lib/ws2_32/ws2_32.edf+114-1151.3 -> 1.3.24.1
ntoskrnl/include/internal/mm.h+21.81 -> 1.81.4.1
ntoskrnl/mm/anonmem.c+4-31.28 -> 1.28.4.1
           /marea.c+471.62 -> 1.62.6.1
           /section.c+4-41.152 -> 1.152.2.1
           /virtual.c+91-411.76 -> 1.76.2.1
ntoskrnl/ps/create.c+4-41.73 -> 1.73.8.1
subsys/win32k/include/internal.h+31.1.2.2 -> 1.1.2.3
subsys/win32k/ntuser/desktop.c+9-11.16.2.1 -> 1.16.2.2
                    /keyboard.c+3-91.30.2.2 -> 1.30.2.3
                    /ntuser.c+38-11.1.2.1 -> 1.1.2.2
                    /stubs.c+1-171.45.8.1 -> 1.45.8.2
subsys/win32k/objects/cursoricon.c+3-11.62.2.1 -> 1.62.2.2
                     /text.c+90-81.102 -> 1.102.2.1
lib/acledit/.cvsignore+8added 1.1.2.1
           /Makefile+45added 1.1.2.1
           /acledit.c+60added 1.1.2.1
           /acledit.def+12added 1.1.2.1
           /acledit.edf+12added 1.1.2.1
           /acledit.map+162added 1.1.2.1
           /acledit.rc+40added 1.1.2.1
           /acleditint.h+8added 1.1.2.1
           /resource.h+8added 1.1.2.1
           /stubs.c+118added 1.1.2.1
+1988-474
11 added + 40 modified, total 51 files
some merges from HEAD

reactos
Makefile 1.233 -> 1.233.2.1
diff -u -r1.233 -r1.233.2.1
--- Makefile	2 Jul 2004 08:06:46 -0000	1.233
+++ Makefile	11 Jul 2004 11:09:57 -0000	1.233.2.1
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.233 2004/07/02 08:06:46 arty Exp $
+# $Id: Makefile,v 1.233.2.1 2004/07/11 11:09:57 weiden Exp $
 #
 # Global makefile
 #
@@ -44,8 +44,8 @@
 # advapi32 cards crtdll comdlg32 fmifs gdi32 imagehlp kernel32 libpcap packet msafd msvcrt ntdll
 # epsapi psapi richedit rpcrt4 secur32 user32 version ws2help ws2_32 wsock32 wshirda mswsock
 # imagehlp imm32
-DLLS = advapi32 cabinet cards comctl32 crtdll comdlg32 d3d8thk expat fmifs freetype gdi32 \
-	imm32 iphlpapi kernel32 lzexpand mpr msafd msgina msimg32 msvcrt msvcrt20 mswsock \
+DLLS = acledit advapi32 cabinet cards comctl32 crtdll comdlg32 d3d8thk expat fmifs freetype gdi32 \
+	imm32 iphlpapi kernel32 lzexpand mpr msafd msgina msimg32 msvcrt msvcrt20 msvideo mswsock \
 	netapi32 ntdll ole32 oleaut32 oledlg packet psapi richedit rpcrt4 samlib secur32 \
 	setupapi shell32 shlwapi snmpapi syssetup twain unicode user32 userenv version wininet \
 	winmm winspool ws2help ws2_32 wsock32 wshirda imagehlp $(DLLS_KBD) $(DLLS_CPL)
@@ -92,7 +92,7 @@
 
 # System applications
 # autochk cmd format services setup usetup welcome winlogon
-SYS_APPS = autochk cmd explorer format services setup taskmgr userinit usetup welcome vmwinst winlogon regedit
+SYS_APPS = autochk cmd explorer expand format services setup taskmgr userinit usetup welcome vmwinst winlogon regedit
 
 # System services
 # rpcss eventlog

reactos/bootdata
hivesft.inf 1.30 -> 1.30.2.1
diff -u -r1.30 -r1.30.2.1
--- hivesft.inf	29 Jun 2004 17:40:01 -0000	1.30
+++ hivesft.inf	11 Jul 2004 11:09:58 -0000	1.30.2.1
@@ -19,11 +19,16 @@
 HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Common Templates",0x00020000,"%ALLUSERSPROFILE%\Templates"
 HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Personal",0x00020000,"%ALLUSERSPROFILE%\My Documents"
 
+; Uninstall Application list
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall",,0x00000010
+
+
 ; Version Information
 HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CurrentVersion",0x00020000,"4.0"
 HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CSDVersion",0x00020000,"Service Pack 6"
 HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CurrentBuildNumber",0x00020000,"1381"
 
+
 ; Image File Execution Options (NtGlobalFlag with FLG_SHOW_LDR_SNAPS set for loadlib.exe) 
 HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\loadlib.exe","GlobalFlag",0x00000000,"0x00000002"
 ;HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\loaddll.exe","GlobalFlag",0x00000000,"0x00000002"

reactos/drivers/video/displays/framebuf
screen.c 1.3 -> 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- screen.c	29 Jun 2004 18:12:30 -0000	1.3
+++ screen.c	11 Jul 2004 11:09:58 -0000	1.3.2.1
@@ -158,12 +158,9 @@
       ModeInfoPtr = ModeInfo;
       while (ModeCount-- > 0)
       {
-         if (ModeInfoPtr->Length == 0)
-         {
-            continue;
-         }
 
-         if (pDevMode->dmPelsWidth == ModeInfoPtr->VisScreenWidth &&
+         if (ModeInfoPtr->Length > 0 &&
+	     pDevMode->dmPelsWidth == ModeInfoPtr->VisScreenWidth &&
              pDevMode->dmPelsHeight == ModeInfoPtr->VisScreenHeight &&
              pDevMode->dmBitsPerPel == (ModeInfoPtr->BitsPerPlane *
                                         ModeInfoPtr->NumberOfPlanes) &&

reactos/hal/halx86
mpsirql.c 1.8 -> 1.8.14.1
diff -u -r1.8 -r1.8.14.1
--- mpsirql.c	28 Dec 2003 22:38:09 -0000	1.8
+++ mpsirql.c	11 Jul 2004 11:09:58 -0000	1.8.14.1
@@ -178,7 +178,6 @@
 VOID FASTCALL
 KfLowerIrql (KIRQL	NewIrql)
 {
-  KIRQL OldIrql;
 
   if (NewIrql > KeGetCurrentIrql ())
     {
@@ -403,3 +402,22 @@
 
   return TRUE;
 }
+
+VOID FASTCALL
+HalRequestSoftwareInterrupt(
+  IN KIRQL Request)
+{
+  switch (Request)
+  {
+    case APC_LEVEL:
+      //ApcRequested = TRUE;
+      break;
+
+    case DISPATCH_LEVEL:
+      //DpcRequested = TRUE;
+      break;
+      
+    default:
+      KEBUGCHECK(0);
+  }
+}

reactos/iface/addsys
w32ksvc.db 1.52 -> 1.52.8.1
diff -u -r1.52 -r1.52.8.1
--- w32ksvc.db	16 May 2004 19:31:05 -0000	1.52
+++ w32ksvc.db	11 Jul 2004 11:09:58 -0000	1.52.8.1
@@ -123,6 +123,7 @@
 NtGdiGetEnhMetaFileHeader		3
 NtGdiGetEnhMetaFilePaletteEntries	3
 NtGdiGetEnhMetaFilePixelFormat		3
+NtGdiGetFontData			5
 NtGdiGetFontFamilyInfo			4
 NtGdiGetFontLanguageInfo			1
 #NtGdiGetFontResourceInfo		?

reactos/include
acledit.h added at 1.1.2.1
diff -N acledit.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ acledit.h	11 Jul 2004 11:09:58 -0000	1.1.2.1
@@ -0,0 +1,136 @@
+/*
+ * acledit.h
+ *
+ * Access Control List Editor definitions
+ *
+ * THIS SOFTWARE IS NOT COPYRIGHTED
+ *
+ * This source code is offered for use in the public domain. You may
+ * use, modify or distribute it freely.
+ *
+ * This code is distributed in the hope that it will be useful but
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
+ * DISCLAIMED. This includes but is not limited to warranties of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ */
+
+#ifndef __ACLEDIT_H
+#define __ACLEDIT_H
+
+#include <windows.h>
+
+typedef struct _ACL_HELP_CONTROL
+{
+  LPWSTR lpHelpFile;
+  DWORD dwMainDialogTopic;
+  DWORD dwACLEditorDialogTopic;
+  DWORD Reserved1;
+  DWORD dwAddEntryDialogTopic;
+  DWORD Reserved2;
+  DWORD Reserved3;
+  DWORD dwAccountDialogTopic;
+} ACL_HELP_CONTROL, *PACL_HELP_CONTROL;
+
+typedef struct _ACL_DLG_CONTROL
+{
+  UCHAR ucVersion;
+  BOOL bIsContainer;
+  BOOL bAllowNewObject;
+  BOOL bMapSpecificToGeneric;
+  LPDWORD lpdwGenericAccessMap;
+  LPDWORD lpdwGenericMappingNewObjects;
+  LPWSTR lpDialogTitle;
+  PACL_HELP_CONTROL pHelpInfo;
+  LPWSTR lpSubReplaceTitle;
+  LPWSTR lpSubReplaceObjectsTitle;
+  LPWSTR lpSubReplaceConfirmation;
+  LPWSTR lpSpecialAccess;
+  LPWSTR lpSpecialNewAccess;
+} ACL_DLG_CONTROL, *PACL_DLG_CONTROL;
+
+typedef struct _ACL_EDIT_ENTRY{
+  DWORD dwType;
+  DWORD dwAccessMask;
+  DWORD dwAccessMask1;
+  LPWSTR lpName;
+} ACL_EDIT_ENTRY, *PACL_EDIT_ENTRY;
+
+typedef struct _ACL_EDIT_CONTROL
+{
+  DWORD dwNumberOfEntries;
+  PACL_EDIT_ENTRY pEntries;
+  LPWSTR lpDefaultPermissionName;
+} ACL_EDIT_CONTROL, *PACL_EDIT_CONTROL;
+
+typedef DWORD (CALLBACK *PACL_CHANGE)(HWND hWnd, 
+                                      HINSTANCE hInstance, 
+                                      PVOID pCallbackContext, 
+                                      PSECURITY_DESCRIPTOR pNewSD,
+                                      PSECURITY_DESCRIPTOR pNewObjectSD,
+                                      BOOL bApplyToSubContainers,
+                                      BOOL bApplyToSubObjects,
+                                      LPDWORD lpdwChangeContextStatus);
+
+DWORD WINAPI
+EditAuditInfo(DWORD Unknown);
+
+DWORD WINAPI
+EditOwnerInfo(DWORD Unknown);
+
+DWORD WINAPI
+EditPermissionInfo(DWORD Unknown);
+
+LONG WINAPI
+FMExtensionProcW(HWND hWnd,
+                 WORD wEvent,
+		 LONG lParam);
+
+DWORD WINAPI
+SedDiscretionaryAclEditor(HWND hWndOwner,
+                          HINSTANCE hInstance,
+                          LPCWSTR lpMachineName,
+                          PACL_DLG_CONTROL pAclDlgControl,
+                          PACL_EDIT_CONTROL pAclEditControl,
+                          LPCWSTR lpObjectName,
+                          PACL_CHANGE pChangeCallback,
+                          PVOID pChangeCallbackContext,
+                          PSECURITY_DESCRIPTOR pObjectSecurity,
+                          BOOL bNoReadPermission,
+                          BOOL bReadOnly,
+                          LPDWORD lpdwChangeContextStatus,
+                          DWORD Reserved);
+
+DWORD WINAPI
+SedTakeOwnership(HWND hWndOwner,
+                 HINSTANCE hInstance,
+                 LPCWSTR lpMachineName,
+                 LPCWSTR lpObjectType,
+                 LPCWSTR lpObjectName,
+                 DWORD dwObjectCount,
+                 PACL_CHANGE pChangeCallback,
+                 PVOID pChangeCallbackContext,
+                 PSECURITY_DESCRIPTOR pObjectSecurity,
+                 BOOL NoReadPermission,
+                 BOOL NoOwnerChange,
+                 LPDWORD lpdwChangeContextStatus,
+                 PACL_HELP_CONTROL pHelpInfo,
+                 DWORD Reserved);
+
+DWORD WINAPI
+SedSystemAclEditor(HWND hWndOwner,
+                   HINSTANCE hInstance,
+                   LPCWSTR lpMachineName,
+                   PACL_DLG_CONTROL pAclDlgControl,
+                   PACL_EDIT_CONTROL pAclEditControl,
+                   LPCWSTR lpObjectName,
+                   PACL_CHANGE pChangeCallback,
+                   PVOID pChangeCallbackContext,
+                   PSECURITY_DESCRIPTOR pObjectSecurity,
+                   BOOL bNoReadPermission,
+                   LPDWORD lpdwChangeContextStatus,
+                   DWORD Reserved);
+
+#endif /* __ACLEDIT_H */
+
+/* EOF */

reactos/include
tchar.h 1.10 -> 1.10.24.1
diff -u -r1.10 -r1.10.24.1
--- tchar.h	11 Aug 2003 00:04:05 -0000	1.10
+++ tchar.h	11 Jul 2004 11:09:58 -0000	1.10.24.1
@@ -29,14 +29,14 @@
  *  DISCLAIMED. This includes but is not limited to warranties of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  *
- * $Revision: 1.10 $
- * $Author: royce $
- * $Date: 2003/08/11 00:04:05 $
+ * $Revision: 1.10.24.1 $
+ * $Author: weiden $
+ * $Date: 2004/07/11 11:09:58 $
  *
  */
 
-#ifndef	_TCHAR_H_
-#define _TCHAR_H_
+#ifndef	_ROS_TCHAR_H_
+#define _ROS_TCHAR_H_
 
 #include <msvcrt/string.h>
 
@@ -149,6 +149,7 @@
 #define	_totlower	towlower
 #define	_ttoi		_wtoi
 #define	_tcsftime	wcsftime
+#define	_tsplitpath	_wsplitpath
 
 #else	/* Not _UNICODE */
 
@@ -254,8 +255,8 @@
 #define	_totlower	tolower
 #define	_ttoi		atoi
 #define _tcsftime	strftime
+#define	_tsplitpath	_splitpath
 
 #endif	/* Not _UNICODE */
 
 #endif	/* Not _TCHAR_H_ */
-

reactos/include/win32k
font.h 1.1 -> 1.1.10.1
diff -u -r1.1 -r1.1.10.1
--- font.h	23 Mar 2004 00:18:54 -0000	1.1
+++ font.h	11 Jul 2004 11:09:58 -0000	1.1.10.1
@@ -1,4 +1,4 @@
-/* $Id: font.h,v 1.1 2004/03/23 00:18:54 gvg Exp $
+/* $Id: font.h,v 1.1.10.1 2004/07/11 11:09:58 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -22,5 +22,6 @@
 
 int STDCALL NtGdiGetFontFamilyInfo(HDC Dc, LPLOGFONTW LogFont, PFONTFAMILYINFO Info, DWORD Size);
 BOOL STDCALL NtGdiTranslateCharsetInfo(PDWORD Src, LPCHARSETINFO CSI, DWORD Flags);
+DWORD STDCALL NtGdiGetFontData(HDC,DWORD,DWORD,LPVOID,DWORD);
 
 #endif /* WIN32K_FONT_H_INCLUDED */

reactos/lib/advapi32
advapi32.def 1.19 -> 1.19.8.1
diff -u -r1.19 -r1.19.8.1
--- advapi32.def	26 May 2004 09:50:09 -0000	1.19
+++ advapi32.def	11 Jul 2004 11:09:58 -0000	1.19.8.1
@@ -1,4 +1,4 @@
-; $Id: advapi32.def,v 1.19 2004/05/26 09:50:09 weiden Exp $
+; $Id: advapi32.def,v 1.19.8.1 2004/07/11 11:09:58 weiden Exp $
 ;
 ; advapi32.def
 ;
@@ -155,7 +155,7 @@
 GetSecurityDescriptorLength@4
 GetSecurityDescriptorOwner@12
 GetSecurityDescriptorSacl@16
-;GetSecurityInfo@32
+GetSecurityInfo@32
 GetServiceDisplayNameA@16
 GetServiceDisplayNameW@16
 GetServiceKeyNameA@16

reactos/lib/advapi32
advapi32.edf 1.39 -> 1.39.8.1
diff -u -r1.39 -r1.39.8.1
--- advapi32.edf	26 May 2004 09:50:10 -0000	1.39
+++ advapi32.edf	11 Jul 2004 11:09:58 -0000	1.39.8.1
@@ -1,4 +1,4 @@
-; $Id: advapi32.edf,v 1.39 2004/05/26 09:50:10 weiden Exp $
+; $Id: advapi32.edf,v 1.39.8.1 2004/07/11 11:09:58 weiden Exp $
 ;
 ; advapi32.edf
 ;
@@ -151,7 +151,7 @@
 GetSecurityDescriptorLength=GetSecurityDescriptorLength@4
 GetSecurityDescriptorOwner=GetSecurityDescriptorOwner@12
 GetSecurityDescriptorSacl=GetSecurityDescriptorSacl@16
-;GetSecurityInfo=GetSecurityInfo@32
+GetSecurityInfo=GetSecurityInfo@32
 GetServiceDisplayNameA=GetServiceDisplayNameA@16
 GetServiceDisplayNameW=GetServiceDisplayNameW@16
 GetServiceKeyNameA=GetServiceKeyNameA@16

reactos/lib/advapi32/misc
logon.c 1.7 -> 1.7.2.1
diff -u -r1.7 -r1.7.2.1
--- logon.c	7 Jul 2004 08:41:47 -0000	1.7
+++ logon.c	11 Jul 2004 11:09:58 -0000	1.7.2.1
@@ -1,4 +1,4 @@
-/* $Id: logon.c,v 1.7 2004/07/07 08:41:47 gvg Exp $
+/* $Id: logon.c,v 1.7.2.1 2004/07/11 11:09:58 weiden Exp $
  *
  * COPYRIGHT:   See COPYING in the top level directory
  * PROJECT:     ReactOS system libraries
@@ -237,6 +237,293 @@
 }
 
 
+static BOOL STDCALL
+SamGetDomainSid(PSID *Sid)
+{
+  PSID lpSid;
+  DWORD dwLength;
+  HKEY hDomainKey;
+
+  DPRINT("SamGetDomainSid() called\n");
+
+  if (Sid != NULL)
+    *Sid = NULL;
+
+  /* Open the account domain key */
+  if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
+		    L"SAM\\SAM\\Domains\\Account",
+		    0,
+		    KEY_READ,
+		    &hDomainKey))
+    {
+      DPRINT1("Failed to open the account domain key! (Error %lu)\n", GetLastError());
+      return FALSE;
+    }
+
+  /* Get SID size */
+  dwLength = 0;
+  if (RegQueryValueExW(hDomainKey,
+		       L"Sid",
+		       NULL,
+		       NULL,
+		       NULL,
+		       &dwLength))
+    {
+      DPRINT1("Failed to read the SID size! (Error %lu)\n", GetLastError());
+      RegCloseKey(hDomainKey);
+      return FALSE;
+    }
+
+  /* Allocate sid buffer */
+  DPRINT("Required SID buffer size: %lu\n", dwLength);
+  lpSid = (PSID)RtlAllocateHeap(RtlGetProcessHeap(),
+				0,
+				dwLength);
+  if (lpSid == NULL)
+    {
+      DPRINT1("Failed to allocate SID buffer!\n");
+      RegCloseKey(hDomainKey);
+      return FALSE;
+    }
+
+  /* Read sid */
+  if (RegQueryValueExW(hDomainKey,
+		       L"Sid",
+		       NULL,
+		       NULL,
+		       (LPBYTE)lpSid,
+		       &dwLength))
+    {
+      DPRINT1("Failed to read the SID! (Error %lu)\n", GetLastError());
+      RtlFreeHeap(RtlGetProcessHeap(),
+		  0,
+		  lpSid);
+      RegCloseKey(hDomainKey);
+      return FALSE;
+    }
+
+  RegCloseKey(hDomainKey);
+
+  *Sid = lpSid;
+
+  DPRINT("SamGetDomainSid() done\n");
+
+  return TRUE;
+}
+
+
+static PSID
+AppendRidToSid(PSID SrcSid,
+	       ULONG Rid)
+{
+  ULONG Rids[8] = {0, 0, 0, 0, 0, 0, 0, 0};
+  UCHAR RidCount;
+  PSID DstSid;
+  ULONG i;
+
+  RidCount = *RtlSubAuthorityCountSid(SrcSid);
+  if (RidCount >= 8)
+    return NULL;
+
+  for (i = 0; i < RidCount; i++)
+    Rids[i] = *RtlSubAuthoritySid(SrcSid, i);
+
+  Rids[RidCount] = Rid;
+  RidCount++;
+
+  RtlAllocateAndInitializeSid(RtlIdentifierAuthoritySid(SrcSid),
+			      RidCount,
+			      Rids[0],
+			      Rids[1],
+			      Rids[2],
+			      Rids[3],
+			      Rids[4],
+			      Rids[5],
+			      Rids[6],
+			      Rids[7],
+			      &DstSid);
+
+  return DstSid;
+}
+
+
+static PTOKEN_GROUPS
+AllocateGroupSids(PSID *PrimaryGroupSid,
+		  PSID *OwnerSid)
+{
+  SID_IDENTIFIER_AUTHORITY WorldAuthority = {SECURITY_WORLD_SID_AUTHORITY};
+  SID_IDENTIFIER_AUTHORITY LocalAuthority = {SECURITY_LOCAL_SID_AUTHORITY};
+  SID_IDENTIFIER_AUTHORITY SystemAuthority = {SECURITY_NT_AUTHORITY};
+  PTOKEN_GROUPS TokenGroups;
+  PSID DomainSid;
+  PSID Sid;
+  LUID Luid;
+  NTSTATUS Status;
+
+  Status = NtAllocateLocallyUniqueId(&Luid);
+  if (!NT_SUCCESS(Status))
+    {
+      return NULL;
+    }
+
+  if (!SamGetDomainSid(&DomainSid))
+    {
+      return NULL;
+    }
+
+  TokenGroups = RtlAllocateHeap(GetProcessHeap(), 0,
+                                sizeof(TOKEN_GROUPS) +
+                                8 * sizeof(SID_AND_ATTRIBUTES));
+  if (TokenGroups == NULL)
+    {
+      RtlFreeHeap (RtlGetProcessHeap (),
+		   0,
+		   DomainSid);
+      return NULL;
+    }
+
+  TokenGroups->GroupCount = 8;
+
+  Sid = AppendRidToSid(DomainSid,
+                       DOMAIN_GROUP_RID_USERS);
+
+  RtlFreeHeap(RtlGetProcessHeap(),
+	      0,
+	      DomainSid);
+
+  TokenGroups->Groups[0].Sid = Sid;
+  TokenGroups->Groups[0].Attributes = SE_GROUP_ENABLED | SE_GROUP_ENABLED_BY_DEFAULT | SE_GROUP_MANDATORY;
+  *PrimaryGroupSid = Sid;
+
+
+  RtlAllocateAndInitializeSid(&WorldAuthority,
+			      1,
+			      SECURITY_WORLD_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      &Sid);
+
+  TokenGroups->Groups[1].Sid = Sid;
+  TokenGroups->Groups[1].Attributes = SE_GROUP_ENABLED | SE_GROUP_ENABLED_BY_DEFAULT | SE_GROUP_MANDATORY;
+
+
+  RtlAllocateAndInitializeSid(&SystemAuthority,
+			      2,
+			      SECURITY_BUILTIN_DOMAIN_RID,
+			      DOMAIN_ALIAS_RID_ADMINS,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      &Sid);
+
+  TokenGroups->Groups[2].Sid = Sid;
+  TokenGroups->Groups[2].Attributes = SE_GROUP_ENABLED | SE_GROUP_ENABLED_BY_DEFAULT | SE_GROUP_MANDATORY;
+
+  *OwnerSid = Sid;
+
+  RtlAllocateAndInitializeSid(&SystemAuthority,
+			      2,
+			      SECURITY_BUILTIN_DOMAIN_RID,
+			      DOMAIN_ALIAS_RID_USERS,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      &Sid);
+
+  TokenGroups->Groups[3].Sid = Sid;
+  TokenGroups->Groups[3].Attributes = SE_GROUP_ENABLED | SE_GROUP_ENABLED_BY_DEFAULT | SE_GROUP_MANDATORY;
+
+  /* Logon SID */
+  RtlAllocateAndInitializeSid(&SystemAuthority,
+			      SECURITY_LOGON_IDS_RID_COUNT,
+			      SECURITY_LOGON_IDS_RID,
+			      Luid.HighPart,
+			      Luid.LowPart,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      &Sid);
+
+  TokenGroups->Groups[4].Sid = Sid;
+  TokenGroups->Groups[4].Attributes = SE_GROUP_ENABLED | SE_GROUP_ENABLED_BY_DEFAULT | SE_GROUP_MANDATORY | SE_GROUP_LOGON_ID;
+
+  RtlAllocateAndInitializeSid(&LocalAuthority,
+			      1,
+			      SECURITY_LOCAL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      &Sid);
+
+  TokenGroups->Groups[5].Sid = Sid;
+  TokenGroups->Groups[5].Attributes = SE_GROUP_ENABLED | SE_GROUP_ENABLED_BY_DEFAULT | SE_GROUP_MANDATORY;
+
+  RtlAllocateAndInitializeSid(&SystemAuthority,
+			      1,
+			      SECURITY_INTERACTIVE_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      &Sid);
+
+  TokenGroups->Groups[6].Sid = Sid;
+  TokenGroups->Groups[6].Attributes = SE_GROUP_ENABLED | SE_GROUP_ENABLED_BY_DEFAULT | SE_GROUP_MANDATORY;
+
+  RtlAllocateAndInitializeSid(&SystemAuthority,
+			      1,
+			      SECURITY_AUTHENTICATED_USER_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      &Sid);
+
+  TokenGroups->Groups[7].Sid = Sid;
+  TokenGroups->Groups[7].Attributes = SE_GROUP_ENABLED | SE_GROUP_ENABLED_BY_DEFAULT | SE_GROUP_MANDATORY;
+
+  return TokenGroups;
+}
+
+
+static VOID
+FreeGroupSids(PTOKEN_GROUPS TokenGroups)
+{
+  ULONG i;
+
+  for (i = 0; i < TokenGroups->GroupCount; i++)
+    {
+       if (TokenGroups->Groups[i].Sid != NULL)
+         RtlFreeHeap(GetProcessHeap(), 0, TokenGroups->Groups[i].Sid);
+    }
+
+  RtlFreeHeap(GetProcessHeap(), 0, TokenGroups);
+}
+
+
 /*
  * @unimplemented
  */
@@ -283,15 +570,17 @@
   TOKEN_USER TokenUser;
   TOKEN_OWNER TokenOwner;
   TOKEN_PRIMARY_GROUP TokenPrimaryGroup;
-  TOKEN_GROUPS TokenGroups;
-//  PTOKEN_GROUPS TokenGroups;
+  PTOKEN_GROUPS TokenGroups;
   PTOKEN_PRIVILEGES TokenPrivileges;
   TOKEN_DEFAULT_DACL TokenDefaultDacl;
   LARGE_INTEGER ExpirationTime;
   LUID AuthenticationId;
   TOKEN_SOURCE TokenSource;
-  PSID UserSid;
-  ACL Dacl;
+  PSID UserSid = NULL;
+  PSID PrimaryGroupSid = NULL;
+  PSID OwnerSid = NULL;
+  PSID LocalSystemSid;
+  PACL Dacl;
   NTSTATUS Status;
   SID_IDENTIFIER_AUTHORITY SystemAuthority = {SECURITY_NT_AUTHORITY};
   unsigned i;
@@ -333,21 +622,29 @@
   TokenUser.User.Sid = UserSid;
   TokenUser.User.Attributes = 0;
 
-//  TokenGroups = NULL;
-  TokenGroups.GroupCount = 1;
-  TokenGroups.Groups[0].Sid = UserSid; /* FIXME */
-  TokenGroups.Groups[0].Attributes = SE_GROUP_ENABLED;
+  /* Allocate and initialize token groups */
+  TokenGroups = AllocateGroupSids(&PrimaryGroupSid,
+				  &OwnerSid);
+  if (NULL == TokenGroups)
+    {
+      RtlFreeSid(UserSid);
+      SetLastError(ERROR_OUTOFMEMORY);
+      return FALSE;
+    }
 
+  /* Allocate and initialize token privileges */
   TokenPrivileges = RtlAllocateHeap(GetProcessHeap(), 0,
                                     sizeof(TOKEN_PRIVILEGES)
                                     + sizeof(DefaultPrivs) / sizeof(DefaultPrivs[0])
                                       * sizeof(LUID_AND_ATTRIBUTES));
   if (NULL == TokenPrivileges)
     {
-      RtlFreeSid (UserSid);
+      FreeGroupSids(TokenGroups);
+      RtlFreeSid(UserSid);
       SetLastError(ERROR_OUTOFMEMORY);
       return FALSE;
     }
+
   TokenPrivileges->PrivilegeCount = 0;
   for (i = 0; i < sizeof(DefaultPrivs) / sizeof(DefaultPrivs[0]); i++)
     {
@@ -363,47 +660,87 @@
         }
     }
 
-  TokenOwner.Owner = UserSid;
+  TokenOwner.Owner = OwnerSid;
+  TokenPrimaryGroup.PrimaryGroup = PrimaryGroupSid;
 
-  TokenPrimaryGroup.PrimaryGroup = UserSid;
 
-  Status = RtlCreateAcl (&Dacl, sizeof(ACL), ACL_REVISION);
+  Dacl = RtlAllocateHeap(GetProcessHeap(), 0, 1024);
+  if (Dacl == NULL)
+    {
+      FreeGroupSids(TokenGroups);
+      RtlFreeSid(UserSid);
+      SetLastError(ERROR_OUTOFMEMORY);
+      return FALSE;
+    }
+
+  Status = RtlCreateAcl(Dacl, 1024, ACL_REVISION);
   if (!NT_SUCCESS(Status))
     {
+      RtlFreeHeap(GetProcessHeap(), 0, Dacl);
+      FreeGroupSids(TokenGroups);
       RtlFreeHeap(GetProcessHeap(), 0, TokenPrivileges);
-      RtlFreeSid (UserSid);
+      RtlFreeSid(UserSid);
       return FALSE;
     }
 
-  TokenDefaultDacl.DefaultDacl = &Dacl;
-
-  memcpy (TokenSource.SourceName,
-	  "**ANON**",
-	  8);
-  Status = NtAllocateLocallyUniqueId (&TokenSource.SourceIdentifier);
+  RtlAddAccessAllowedAce(Dacl,
+			 ACL_REVISION,
+			 GENERIC_ALL,
+			 OwnerSid);
+
+  RtlAllocateAndInitializeSid(&SystemAuthority,
+			      1,
+			      SECURITY_LOCAL_SYSTEM_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      SECURITY_NULL_RID,
+			      &LocalSystemSid);
+
+  /* SID: S-1-5-18 */
+  RtlAddAccessAllowedAce(Dacl,
+			 ACL_REVISION,
+			 GENERIC_ALL,
+			 LocalSystemSid);
+
+  RtlFreeSid(LocalSystemSid);
+
+  TokenDefaultDacl.DefaultDacl = Dacl;
+
+  memcpy(TokenSource.SourceName,
+	 "User32  ",
+	 8);
+  Status = NtAllocateLocallyUniqueId(&TokenSource.SourceIdentifier);
   if (!NT_SUCCESS(Status))
     {
-      RtlFreeSid (UserSid);
+      RtlFreeHeap(GetProcessHeap(), 0, Dacl);
+      FreeGroupSids(TokenGroups);
+      RtlFreeHeap(GetProcessHeap(), 0, TokenPrivileges);
+      RtlFreeSid(UserSid);
       return FALSE;
     }
 
-  Status = NtCreateToken (phToken,
-			  TOKEN_ALL_ACCESS,
-			  &ObjectAttributes,
-			  TokenPrimary,
-			  &AuthenticationId,
-			  &ExpirationTime,
-			  &TokenUser,
-//			  TokenGroups,
-			  &TokenGroups,
-			  TokenPrivileges,
-			  &TokenOwner,
-			  &TokenPrimaryGroup,
-			  &TokenDefaultDacl,
-			  &TokenSource);
+  Status = NtCreateToken(phToken,
+			 TOKEN_ALL_ACCESS,
+			 &ObjectAttributes,
+			 TokenPrimary,
+			 &AuthenticationId,
+			 &ExpirationTime,
+			 &TokenUser,
+			 TokenGroups,
+			 TokenPrivileges,
+			 &TokenOwner,
+			 &TokenPrimaryGroup,
+			 &TokenDefaultDacl,
+			 &TokenSource);
 
+  RtlFreeHeap(GetProcessHeap(), 0, Dacl);
+  FreeGroupSids(TokenGroups);
   RtlFreeHeap(GetProcessHeap(), 0, TokenPrivileges);
-  RtlFreeSid (UserSid);
+  RtlFreeSid(UserSid);
 
   return NT_SUCCESS(Status);
 }

reactos/lib/advapi32/sec
misc.c 1.19 -> 1.19.2.1
diff -u -r1.19 -r1.19.2.1
--- misc.c	6 Jul 2004 22:08:48 -0000	1.19
+++ misc.c	11 Jul 2004 11:09:58 -0000	1.19.2.1
@@ -1,4 +1,4 @@
-/* $Id: misc.c,v 1.19 2004/07/06 22:08:48 gvg Exp $
+/* $Id: misc.c,v 1.19.2.1 2004/07/11 11:09:58 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -379,6 +379,8 @@
 		   PSID_NAME_USE peUse)
 {
   DPRINT1("LookupAccountSidA is unimplemented, but returns success\n");
+  lstrcpynA(lpName, "Administrator", *cchName);
+  lstrcpynA(lpReferencedDomainName, "ReactOS", *cchReferencedDomainName);
   return TRUE;
 }
 
@@ -398,6 +400,8 @@
 		   PSID_NAME_USE peUse)
 {
   DPRINT1("LookupAccountSidW is unimplemented, but returns success\n");
+  lstrcpynW(lpName, L"Administrator", *cchName);
+  lstrcpynW(lpReferencedDomainName, L"ReactOS", *cchReferencedDomainName);
   return TRUE;
 }
 
@@ -664,4 +668,24 @@
   return ERROR_CALL_NOT_IMPLEMENTED;
 }
 
+
+/**********************************************************************
+ * GetSecurityInfo				EXPORTED
+ *
+ * @unimplemented
+ */
+DWORD STDCALL
+GetSecurityInfo(HANDLE handle,
+                SE_OBJECT_TYPE ObjectType,
+                SECURITY_INFORMATION SecurityInfo,
+                PSID* ppsidOwner,
+                PSID* ppsidGroup,
+                PACL* ppDacl,
+                PACL* ppSacl,
+                PSECURITY_DESCRIPTOR* ppSecurityDescriptor)
+{
+  DPRINT1("GetSecurityInfo: stub\n");
+  return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
 /* EOF */

reactos/lib/cpl/access
access.c 1.1 -> 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- access.c	30 Jun 2004 12:16:27 -0000	1.1
+++ access.c	11 Jul 2004 11:09:59 -0000	1.1.2.1
@@ -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: access.c,v 1.1 2004/06/30 12:16:27 ekohl Exp $
+/* $Id: access.c,v 1.1.2.1 2004/07/11 11:09:59 weiden Exp $
  *
  * PROJECT:         ReactOS System Control Panel
  * FILE:            lib/cpl/system/sysdm.c
@@ -111,7 +111,7 @@
   psh.hInstance = hApplet;
   psh.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDI_CPLACCESS));
   psh.pszCaption = Caption;
-  psh.nPages = sizeof(psp) / sizeof(PROPSHEETHEADER);
+  psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
   psh.nStartPage = 0;
   psh.ppsp = psp;
   psh.pfnCallback = PropSheetProc;

reactos/lib/cpl/appwiz
appwiz.c 1.2 -> 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- appwiz.c	30 Jun 2004 12:11:11 -0000	1.2
+++ appwiz.c	11 Jul 2004 11:09:59 -0000	1.2.2.1
@@ -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: appwiz.c,v 1.2 2004/06/30 12:11:11 ekohl Exp $
+/* $Id: appwiz.c,v 1.2.2.1 2004/07/11 11:09:59 weiden Exp $
  *
  * PROJECT:         ReactOS Software Control Panel
  * FILE:            lib/cpl/system/appwiz.c
@@ -226,7 +226,7 @@
   psh.hInstance = hApplet;
   psh.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDI_CPLSYSTEM));
   psh.pszCaption = Caption;
-  psh.nPages = sizeof(psp) / sizeof(PROPSHEETHEADER);
+  psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
   psh.nStartPage = 0;
   psh.ppsp = psp;
   psh.pfnCallback = NULL;

reactos/lib/cpl/cplsample
cplsample.c 1.2 -> 1.2.10.1
diff -u -r1.2 -r1.2.10.1
--- cplsample.c	8 Mar 2004 14:20:14 -0000	1.2
+++ cplsample.c	11 Jul 2004 11:09:59 -0000	1.2.10.1
@@ -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: cplsample.c,v 1.2 2004/03/08 14:20:14 weiden Exp $
+/* $Id: cplsample.c,v 1.2.10.1 2004/07/11 11:09:59 weiden Exp $
  *
  * PROJECT:         ReactOS Sample Control Panel
  * FILE:            lib/cpl/cplsample/cplsample.c
@@ -153,7 +153,7 @@
   psh.hInstance = hApplet;
   psh.u1.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDC_CPLICON_1));
   psh.pszCaption = Caption;
-  psh.nPages = sizeof(psp) / sizeof(PROPSHEETHEADER);
+  psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
   psh.u2.nStartPage = 0;
   psh.u3.ppsp = psp;
   psh.pfnCallback = PropSheetProc;

reactos/lib/gdi32/misc
stubs.c 1.62 -> 1.62.8.1
diff -u -r1.62 -r1.62.8.1
--- stubs.c	18 May 2004 13:57:41 -0000	1.62
+++ stubs.c	11 Jul 2004 11:09:59 -0000	1.62.8.1
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.62 2004/05/18 13:57:41 weiden Exp $
+/* $Id: stubs.c,v 1.62.8.1 2004/07/11 11:09:59 weiden Exp $
  *
  * reactos/lib/gdi32/misc/stubs.c
  *
@@ -28,6 +28,8 @@
 typedef CHWIDTHINFO *PCHWIDTHINFO;
 #endif
 
+#define UNIMPLEMENTED DbgPrint("GDI32: %s is unimplemented, please try again later.\n", __FUNCTION__);
+
 /*
  * @unimplemented
  */
@@ -40,6 +42,7 @@
 	CONST PALETTEENTRY	*a3
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -55,6 +58,7 @@
 	HDC	a0
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -77,6 +81,7 @@
 	int	a8
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -91,6 +96,7 @@
 	HDC	a0
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -105,6 +111,7 @@
 	UINT			a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -119,6 +126,7 @@
 	HMETAFILE	a0
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -136,6 +144,7 @@
 	LPCSTR		a3
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -153,6 +162,7 @@
 	LPARAM		a3
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -171,6 +181,7 @@
 	LPVOID		a4
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -187,6 +198,7 @@
 	CONST RGNDATA *	a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -202,6 +214,7 @@
 	LPSIZE	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -218,6 +231,7 @@
 	UINT	a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -233,24 +247,7 @@
 	HRGN	a1
 	)
 {
-	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-	return 0;
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GetFontData(
-	HDC	a0,
-	DWORD	a1,
-	DWORD	a2,
-	LPVOID	a3,
-	DWORD	a4
-	)
-{
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -267,6 +264,7 @@
 	LPVOID		a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -282,6 +280,7 @@
 	UINT			a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -295,6 +294,7 @@
 	HDC	hDc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -309,6 +309,7 @@
 	HDC	hDc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -323,6 +324,7 @@
 	HDC	hdc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -339,6 +341,7 @@
 	DWORD		dwFlags
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -353,6 +356,7 @@
 	HDC 	hDc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -368,6 +372,7 @@
 	HMETAFILE	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -383,6 +388,7 @@
 	UINT		a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -397,6 +403,7 @@
 	HDC	hdc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -413,6 +420,7 @@
 	UINT		a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -428,6 +436,7 @@
 	DWORD	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -443,6 +452,7 @@
 	CONST BYTE	*a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -458,6 +468,7 @@
 	UINT	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -473,6 +484,7 @@
 	int	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -489,6 +501,7 @@
 	int	a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -503,6 +516,7 @@
 	HDC	hdc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -520,6 +534,7 @@
 	UINT		a3
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -537,6 +552,7 @@
 	LPARAM			a3
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -551,6 +567,7 @@
 	HDC	hdc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -565,6 +582,7 @@
 	HENHMETAFILE	a0
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -583,6 +601,7 @@
 	CONST RECT	*a4
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -599,6 +618,7 @@
 	LPBYTE		a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -615,6 +635,7 @@
 	LPENHMETAHEADER	a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -631,6 +652,7 @@
 	LPPALETTEENTRY	a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -649,6 +671,7 @@
 	HDC		a4
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -665,6 +688,7 @@
 	CONST RECT	*a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -682,6 +706,7 @@
 	UINT			a3
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -697,6 +722,7 @@
 	CONST BYTE	*a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -713,6 +739,7 @@
 	HDC			a2,
 	CONST METAFILEPICT	*a3)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -729,6 +756,7 @@
 	CONST BYTE	*a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -748,6 +776,7 @@
 	FLOAT	a5
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -763,6 +792,7 @@
 	CONST COLORADJUSTMENT	*a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -778,6 +808,7 @@
 	LPCOLORADJUSTMENT	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -792,6 +823,7 @@
 	HDC	hdc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -806,6 +838,7 @@
 	HDC	hdc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -820,6 +853,7 @@
 	HDC	hdc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -834,6 +868,7 @@
 	HDC	hdc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -849,6 +884,7 @@
 	ABORTPROC	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -863,6 +899,7 @@
 	HDC	hdc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -877,6 +914,7 @@
 	HDC	hdc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -891,6 +929,7 @@
 	HDC	hdc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -905,6 +944,7 @@
 	HDC	hdc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -919,6 +959,7 @@
 	HDC	hdc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -933,6 +974,7 @@
 	HDC	hdc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -950,6 +992,7 @@
 	int		a3
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -964,6 +1007,7 @@
 	HDC	hdc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -981,6 +1025,7 @@
 	int		a3
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -996,6 +1041,7 @@
 	int	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1012,6 +1058,7 @@
 	PFLOAT	a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1026,6 +1073,7 @@
 	HDC	hdc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1040,6 +1088,7 @@
 	HDC	hdc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1054,6 +1103,7 @@
 	HDC	hdc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1072,6 +1122,7 @@
 	CONST DWORD	*a4
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1087,6 +1138,7 @@
 	PFLOAT	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1105,6 +1157,7 @@
 	LPSIZE	a5
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1124,6 +1177,7 @@
 	LPSIZE	a5
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1138,6 +1192,7 @@
 	HGDIOBJ	a0
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1150,8 +1205,12 @@
 STDCALL
 GdiFlush()
 {
-	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-	return FALSE;
+        /*
+         * Although GdiFlush is unimplemented, it's safe to return
+         * TRUE, because we don't have GDI engine surface caching
+         * implemented yet.
+         */
+	return TRUE;
 }
 
 
@@ -1164,6 +1223,7 @@
 	DWORD	a0
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1176,6 +1236,7 @@
 STDCALL
 GdiGetBatchLimit()
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1191,6 +1252,7 @@
 	int	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1208,6 +1270,7 @@
 	DWORD	a3
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1222,6 +1285,7 @@
 	HDC	hDc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1237,6 +1301,7 @@
 	HCOLORSPACE	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1251,6 +1316,7 @@
 	HCOLORSPACE	a0
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1266,6 +1332,7 @@
 	LPVOID	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1281,6 +1348,7 @@
 	LPVOID	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1297,6 +1365,7 @@
 	DWORD	a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1313,6 +1382,7 @@
 	UINT	a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1327,6 +1397,7 @@
 	HDC	hDc
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1342,6 +1413,7 @@
 	int	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1356,6 +1428,7 @@
 	HGLRC	a
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1368,6 +1441,7 @@
 STDCALL
 wglGetCurrentContext(VOID)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1380,6 +1454,7 @@
 STDCALL
 wglGetCurrentDC(VOID)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1394,6 +1469,7 @@
 	LPCSTR		a0
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1409,6 +1485,7 @@
 	HGLRC	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1424,6 +1501,7 @@
 	HGLRC	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1442,6 +1520,7 @@
 	LPLAYERPLANEDESCRIPTOR	a4
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1460,6 +1539,7 @@
 	CONST COLORREF	*a4
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1478,6 +1558,7 @@
 	COLORREF	*a4
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1494,6 +1575,7 @@
 	BOOL		a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1509,6 +1591,7 @@
 	UINT		a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -1534,6 +1617,7 @@
 	DWORD	a5
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1552,6 +1636,7 @@
 	DWORD	a4
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1572,6 +1657,7 @@
 	DWORD	a6
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1592,6 +1678,7 @@
 	DWORD	a6
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1608,6 +1695,7 @@
 	INT	a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1623,6 +1711,7 @@
 	DWORD	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1638,6 +1727,7 @@
 	DWORD	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1652,6 +1742,7 @@
 	DWORD	a0
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1667,6 +1758,7 @@
 	DWORD	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1686,6 +1778,7 @@
 	DWORD	a5
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1703,6 +1796,7 @@
 	DWORD	a3
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1719,6 +1813,7 @@
 	DWORD *pcFonts
 )
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1733,6 +1828,7 @@
 	int unknown
 )
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1744,6 +1840,7 @@
 STDCALL 
 AnyLinkedFonts(VOID)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1755,6 +1852,7 @@
 STDCALL
 ClearBitmapAttributes(HBITMAP hbm, DWORD dwFlags)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1766,6 +1864,7 @@
 STDCALL
 ClearBrushAttributes(HBRUSH hbm, DWORD dwFlags)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1777,6 +1876,7 @@
 STDCALL
 ColorCorrectPalette(HDC hDC,HPALETTE hPalette,DWORD dwFirstEntry,DWORD dwNumOfEntries)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1788,6 +1888,7 @@
 STDCALL
 EnableEUDC(BOOL enable)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1799,6 +1900,7 @@
 STDCALL
 EndFormPage(HDC hdc)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1810,6 +1912,7 @@
 STDCALL
 EudcLoadLinkW(LPCWSTR pBaseFaceName,LPCWSTR pEudcFontPath,INT iPriority,INT iFontLinkType)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1821,6 +1924,7 @@
 STDCALL
 EudcUnloadLinkW(LPCWSTR pBaseFaceName,LPCWSTR pEudcFontPath)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1832,6 +1936,7 @@
 STDCALL
 FontIsLinked(HDC hdc)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1843,6 +1948,7 @@
 STDCALL
 GdiAddFontResourceW(LPCWSTR filename,FLONG f,DESIGNVECTOR *pdv)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -1854,6 +1960,7 @@
 STDCALL
 GdiAddGlsBounds(HDC hdc,LPRECT prc)
 {
+	UNIMPLEMENTED;
[truncated at 1000 lines; 1538 more skipped]

reactos/lib/gdi32/misc
stubsa.c 1.31 -> 1.31.8.1
diff -u -r1.31 -r1.31.8.1
--- stubsa.c	9 Apr 2004 20:03:13 -0000	1.31
+++ stubsa.c	11 Jul 2004 11:09:59 -0000	1.31.8.1
@@ -1,4 +1,4 @@
-/* $Id: stubsa.c,v 1.31 2004/04/09 20:03:13 navaraf Exp $
+/* $Id: stubsa.c,v 1.31.8.1 2004/07/11 11:09:59 weiden Exp $
  *
  * reactos/lib/gdi32/misc/stubs.c
  *
@@ -23,6 +23,8 @@
 #include <rosrtl/logfont.h>
 #include <internal/heap.h>
 
+#define UNIMPLEMENTED DbgPrint("GDI32: %s is unimplemented, please try again later.\n", __FUNCTION__);
+
 /*
  * @implemented
  */
@@ -172,6 +174,7 @@
 	CONST DEVMODEA	*pDevMode
 	)
 {
+  UNIMPLEMENTED;
   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
   return 0;
 }
@@ -189,6 +192,7 @@
 	LPARAM  lParam
 	)
 {
+  UNIMPLEMENTED;
   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
   return 0;
 #if 0
@@ -291,6 +295,7 @@
 	LPOUTLINETEXTMETRICA	lpOTM
 	)
 {
+  UNIMPLEMENTED;
   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
   return 0;
 }
@@ -344,6 +349,7 @@
 	DWORD		a5
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -404,6 +410,7 @@
 	CONST DOCINFOA	*a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -420,6 +427,7 @@
 	int			a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -436,6 +444,7 @@
 	LPSTR	a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -452,6 +461,7 @@
 	LPKERNINGPAIR	a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -468,6 +478,7 @@
 	DWORD			a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -482,6 +493,7 @@
 	LPLOGCOLORSPACEA	a0
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -498,6 +510,7 @@
 	LPSTR		a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -513,6 +526,7 @@
 	LPSTR	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -539,6 +553,7 @@
    * until we run out of strings or the user returns FALSE
    */
 
+  UNIMPLEMENTED;
   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
   return 0;
 }
@@ -556,6 +571,7 @@
 	DWORD		a3
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -577,6 +593,7 @@
 	LPGLYPHMETRICSFLOAT	a7
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -594,6 +611,7 @@
 	UINT	a3
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }

reactos/lib/gdi32/misc
stubsw.c 1.28 -> 1.28.8.1
diff -u -r1.28 -r1.28.8.1
--- stubsw.c	9 Apr 2004 20:03:13 -0000	1.28
+++ stubsw.c	11 Jul 2004 11:09:59 -0000	1.28.8.1
@@ -1,4 +1,4 @@
-/* $Id: stubsw.c,v 1.28 2004/04/09 20:03:13 navaraf Exp $
+/* $Id: stubsw.c,v 1.28.8.1 2004/07/11 11:09:59 weiden Exp $
  *
  * reactos/lib/gdi32/misc/stubs.c
  *
@@ -14,6 +14,8 @@
 #include <windows.h>
 #include <win32k/kapi.h>
 
+#define UNIMPLEMENTED DbgPrint("GDI32: %s is unimplemented, please try again later.\n", __FUNCTION__);
+
 /*
  * @implemented
  */
@@ -106,6 +108,7 @@
 				  pOutput,
 				  pDevMode );
 #else
+  UNIMPLEMENTED;
   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
   return 0;
 #endif
@@ -127,6 +130,7 @@
 #if 0
   return NtGdiEnumFonts ( hDC, lpFaceName, FontFunc, lParam );
 #else
+  UNIMPLEMENTED;
   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
   return 0;
 #endif
@@ -211,6 +215,7 @@
 	LPOUTLINETEXTMETRICW	lpOTM
 	)
 {
+  UNIMPLEMENTED;
   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
   return 0;
 }
@@ -250,6 +255,7 @@
 	DWORD		a5
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -307,13 +313,14 @@
 	int			a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
 
 
 /*
- * @unimplemented
+ * @implemented
  */
 int
 STDCALL
@@ -323,8 +330,7 @@
 	LPWSTR	a2
 	)
 {
-	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-	return 0;
+	return NtGdiGetTextFace(a0, a1, a2);
 }
 
 
@@ -339,6 +345,7 @@
 	LPKERNINGPAIR	a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -355,6 +362,7 @@
 	DWORD			a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -368,6 +376,7 @@
 	LPLOGCOLORSPACEW	a0
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }
@@ -384,6 +393,7 @@
 	LPWSTR		a2
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -399,6 +409,7 @@
 	LPWSTR	a1
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -424,6 +435,7 @@
    * and call the user's callback function until we run out of strings or
    * the user returns FALSE
    */
+  UNIMPLEMENTED;
   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
   return 0;
 }
@@ -441,6 +453,7 @@
 	DWORD		a3
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -462,6 +475,7 @@
 	LPGLYPHMETRICSFLOAT	a7
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -479,6 +493,7 @@
 	UINT	a3
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
@@ -502,6 +517,7 @@
 	DWORD	a3
 	)
 {
+	UNIMPLEMENTED;
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
 }

reactos/lib/gdi32/objects
font.c 1.5 -> 1.5.2.1
diff -u -r1.5 -r1.5.2.1
--- font.c	3 Jul 2004 17:40:22 -0000	1.5
+++ font.c	11 Jul 2004 11:09:59 -0000	1.5.2.1
@@ -1,4 +1,4 @@
-/* $Id: font.c,v 1.5 2004/07/03 17:40:22 navaraf Exp $
+/* $Id: font.c,v 1.5.2.1 2004/07/11 11:09:59 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -404,3 +404,20 @@
 {
   return NtGdiGetCharWidth32 ( hdc, iFirstChar, iLastChar, lpBuffer );
 }
+
+
+/*
+ * @implemented
+ */
+DWORD
+STDCALL
+GetFontData(
+	HDC	a0,
+	DWORD	a1,
+	DWORD	a2,
+	LPVOID	a3,
+	DWORD	a4
+	)
+{
+	return NtGdiGetFontData(a0, a1, a2, a3, a4);
+}

reactos/lib/kernel32/mem
virtual.c 1.13 -> 1.13.6.1
diff -u -r1.13 -r1.13.6.1
--- virtual.c	13 Jun 2004 10:35:52 -0000	1.13
+++ virtual.c	11 Jul 2004 11:09:59 -0000	1.13.6.1
@@ -1,4 +1,4 @@
-/* $Id: virtual.c,v 1.13 2004/06/13 10:35:52 navaraf Exp $
+/* $Id: virtual.c,v 1.13.6.1 2004/07/11 11:09:59 weiden Exp $
  *
  * COPYRIGHT:            See COPYING in the top level directory
  * PROJECT:              ReactOS kernel
@@ -198,7 +198,7 @@
   if (!NT_SUCCESS(Status))
     {
       SetLastErrorByStatus(Status);
-      return(ResultLength);
+      return 0;
     }
   return(ResultLength);
 }

reactos/lib/mmdrv
auxil.c 1.1 -> 1.1.8.1
diff -u -r1.1 -r1.1.8.1
--- auxil.c	28 Apr 2004 12:55:21 -0000	1.1
+++ auxil.c	11 Jul 2004 11:09:59 -0000	1.1.8.1
@@ -36,43 +36,4 @@
 	}
 
     return MMSYSERR_NOERROR;
-
-
-// WARNING: MS Code -- delete as soon as possible !
-/*    MMRESULT mRet;
-    AUX_DD_VOLUME Volume;
-
-    switch (uMsg) {
-    case AUXDM_GETDEVCAPS:
-        dprintf2(("AUXDM_GETDEVCAPS"));
-        return sndGetData(AuxDevice, uDevice, dwParam2, (LPBYTE)dwParam1,
-                          IOCTL_AUX_GET_CAPABILITIES);
-
-    case AUXDM_GETNUMDEVS:
-        dprintf2(("AUXDM_GETNUMDEVS"));
-        return sndGetNumDevs(AuxDevice);
-
-    case AUXDM_GETVOLUME:
-        dprintf2(("AUXDM_GETVOLUME"));
-
-        mRet = sndGetData(AuxDevice, uDevice, sizeof(Volume),
-                          (PBYTE)&Volume, IOCTL_AUX_GET_VOLUME);
-
-        if (mRet == MMSYSERR_NOERROR) {
-            *(LPDWORD)dwParam1 =
-                (DWORD)MAKELONG(HIWORD(Volume.Left),
-                                HIWORD(Volume.Right));
-        }
-
-        return mRet;
-
-    case AUXDM_SETVOLUME:
-        dprintf2(("AUXDM_SETVOLUME"));
-        Volume.Left = LOWORD(dwParam1) << 16;
-        Volume.Right = HIWORD(dwParam1) << 16;
-
-        return sndSetData(AuxDevice, uDevice, sizeof(Volume),
-                          (PBYTE)&Volume, IOCTL_AUX_SET_VOLUME);
-    }
-*/
 }

reactos/lib/ntdll/ldr
utils.c 1.97 -> 1.97.2.1
diff -u -r1.97 -r1.97.2.1
--- utils.c	3 Jul 2004 17:40:22 -0000	1.97
+++ utils.c	11 Jul 2004 11:09:59 -0000	1.97.2.1
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.97 2004/07/03 17:40:22 navaraf Exp $
+/* $Id: utils.c,v 1.97.2.1 2004/07/11 11:09:59 weiden Exp $
  * 
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
@@ -252,7 +252,10 @@
                TlsData->StartAddressOfRawData = (PVOID)TlsDirectory->StartAddressOfRawData;
                TlsData->TlsDataSize = TlsDirectory->EndAddressOfRawData - TlsDirectory->StartAddressOfRawData;
                TlsData->TlsZeroSize = TlsDirectory->SizeOfZeroFill;
-               TlsData->TlsAddressOfCallBacks = *TlsDirectory->AddressOfCallBacks;
+               if (TlsDirectory->AddressOfCallBacks)
+                 TlsData->TlsAddressOfCallBacks = *(PIMAGE_TLS_CALLBACK)RVA(Module->BaseAddress, TlsDirectory->AddressOfCallBacks);
+               else
+                 TlsData->TlsAddressOfCallBacks = NULL;
                TlsData->Module = Module;
 #if 0
                DbgPrint("TLS directory for %wZ\n", &Module->BaseDllName);

reactos/lib/rtl/i386
exception.c 1.3 -> 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- exception.c	7 Jul 2004 16:25:00 -0000	1.3
+++ exception.c	11 Jul 2004 11:09:59 -0000	1.3.2.1
@@ -1,4 +1,4 @@
-/* $Id: exception.c,v 1.3 2004/07/07 16:25:00 navaraf Exp $
+/* $Id: exception.c,v 1.3.2.1 2004/07/11 11:09:59 weiden Exp $
  *
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:           ReactOS kernel
@@ -90,8 +90,7 @@
 RtlpDispatchException(IN PEXCEPTION_RECORD  ExceptionRecord,
 	IN PCONTEXT  Context)
 {
-  PEXCEPTION_REGISTRATION RegistrationFrame;
-  DWORD DispatcherContext;
+  PEXCEPTION_REGISTRATION RegistrationFrame, NestedFrame = NULL, DispatcherContext;
   DWORD ReturnValue;
 
   DPRINT("RtlpDispatchException()\n");
@@ -107,7 +106,6 @@
   while ((ULONG_PTR)RegistrationFrame != -1)
   {
     EXCEPTION_RECORD ExceptionRecord2;
-    DWORD Temp = 0;
     //PVOID RegistrationFrameEnd = (PVOID)RegistrationFrame + 8;
 
     // Make sure the registration frame is located within the stack
@@ -172,9 +170,10 @@
 		DPRINT("EBP == 0x%.08x\n", sp[6]);
 	}
 #endif
-    if (RegistrationFrame == NULL)
+    if (RegistrationFrame == NestedFrame)
     {
       ExceptionRecord->ExceptionFlags &= ~EXCEPTION_NESTED_CALL;  // Turn off flag
+      NestedFrame = NULL;
     }
 
     if (ReturnValue == ExceptionContinueExecution)
@@ -207,10 +206,10 @@
     {
       DPRINT("ReturnValue == ExceptionNestedException\n");
 
-      ExceptionRecord->ExceptionFlags |= EXCEPTION_EXIT_UNWIND;
-      if (DispatcherContext > Temp)
+      ExceptionRecord->ExceptionFlags |= EXCEPTION_NESTED_CALL;
+      if (NestedFrame < DispatcherContext)
 	  {
-          Temp = DispatcherContext;
+          NestedFrame = DispatcherContext;
 	  }
     }
     else /* if (ReturnValue == ExceptionCollidedUnwind) */

reactos/lib/rtl
sid.c 1.2 -> 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- sid.c	20 Jun 2004 23:30:47 -0000	1.2
+++ sid.c	11 Jul 2004 11:09:59 -0000	1.2.2.1
@@ -1,4 +1,4 @@
-/* $Id: sid.c,v 1.2 2004/06/20 23:30:47 gdalsnes Exp $
+/* $Id: sid.c,v 1.2.2.1 2004/07/11 11:09:59 weiden Exp $
  *
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:           ReactOS kernel
@@ -24,15 +24,13 @@
 BOOLEAN STDCALL
 RtlValidSid(IN PSID Sid)
 {
-   if ((Sid->Revision & 0xf) != 1)
-   {
-      return(FALSE);
-   }
-   if (Sid->SubAuthorityCount > 15)
-   {
-      return(FALSE);
-   }
-   return(TRUE);
+  if (((Sid->Revision & 0xf) != 1) ||
+      (Sid->SubAuthorityCount > 15))
+    {
+      return FALSE;
+    }
+
+   return TRUE;
 }
 
 
@@ -42,7 +40,7 @@
 ULONG STDCALL
 RtlLengthRequiredSid(IN UCHAR SubAuthorityCount)
 {
-   return(sizeof(SID) + (SubAuthorityCount - 1) * sizeof(ULONG));
+  return (sizeof(SID) + (SubAuthorityCount - 1) * sizeof(ULONG));
 }
 
 
@@ -54,12 +52,13 @@
                  IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
                  IN UCHAR SubAuthorityCount)
 {
-   Sid->Revision = 1;
-   Sid->SubAuthorityCount = SubAuthorityCount;
-   memcpy(&Sid->IdentifierAuthority,
-          IdentifierAuthority,
-          sizeof(SID_IDENTIFIER_AUTHORITY));
-   return(STATUS_SUCCESS);
+  Sid->Revision = 1;
+  Sid->SubAuthorityCount = SubAuthorityCount;
+  memcpy(&Sid->IdentifierAuthority,
+         IdentifierAuthority,
+         sizeof(SID_IDENTIFIER_AUTHORITY));
+
+  return STATUS_SUCCESS;
 }
 
 
@@ -70,7 +69,7 @@
 RtlSubAuthoritySid(IN PSID Sid,
                    IN ULONG SubAuthority)
 {
-   return(&Sid->SubAuthority[SubAuthority]);
+  return &Sid->SubAuthority[SubAuthority];
 }
 
 
@@ -80,7 +79,7 @@
 PUCHAR STDCALL
 RtlSubAuthorityCountSid(IN PSID Sid)
 {
-   return(&Sid->SubAuthorityCount);
+  return &Sid->SubAuthorityCount;
 }
 
 
@@ -91,7 +90,7 @@
 RtlEqualSid(IN PSID Sid1,
             IN PSID Sid2)
 {
-   if (Sid1->Revision != Sid2->Revision)
+  if (Sid1->Revision != Sid2->Revision)
    {
       return(FALSE);
    }
@@ -99,7 +98,7 @@
    {
       return(FALSE);
    }
-   if (RtlCompareMemory(Sid1, Sid2, RtlLengthSid(Sid1)) != 0)
+   if (RtlCompareMemory(Sid1, Sid2, RtlLengthSid(Sid1)) != RtlLengthSid(Sid1))
    {
       return(FALSE);
    }
@@ -113,7 +112,7 @@
 ULONG STDCALL
 RtlLengthSid(IN PSID Sid)
 {
-   return(sizeof(SID) + (Sid->SubAuthorityCount-1)*4);
+  return (sizeof(SID) + (Sid->SubAuthorityCount-1) * sizeof(ULONG));
 }
 
 
@@ -125,14 +124,16 @@
            PSID Dest,
            PSID Src)
 {
-   if (BufferLength < RtlLengthSid(Src))
-   {
-      return(STATUS_UNSUCCESSFUL);
-   }
-   memmove(Dest,
-           Src,
-           RtlLengthSid(Src));
-   return(STATUS_SUCCESS);
+  if (BufferLength < RtlLengthSid(Src))
+    {
+      return STATUS_UNSUCCESSFUL;
+    }
+
+  memmove(Dest,
+          Src,
+          RtlLengthSid(Src));
+
+  return STATUS_SUCCESS;
 }
 
 
@@ -181,49 +182,47 @@
 PSID_IDENTIFIER_AUTHORITY STDCALL
 RtlIdentifierAuthoritySid(IN PSID Sid)
 {
-   return(&Sid->IdentifierAuthority);
+  return &Sid->IdentifierAuthority;
 }
 
 
 /*
  * @implemented
  */
-NTSTATUS
-STDCALL
-RtlAllocateAndInitializeSid (
-   PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
-   UCHAR    SubAuthorityCount,
-   ULONG    SubAuthority0,
-   ULONG    SubAuthority1,
-   ULONG    SubAuthority2,
-   ULONG    SubAuthority3,
-   ULONG    SubAuthority4,
-   ULONG    SubAuthority5,
-   ULONG    SubAuthority6,
-   ULONG    SubAuthority7,
-   PSID    *Sid
-)
-{
-   PSID pSid;
-
-   if (SubAuthorityCount > 8)
-      return STATUS_INVALID_SID;
-
-   if (Sid == NULL)
-      return STATUS_INVALID_PARAMETER;
-
-   pSid = (PSID)ExAllocatePool(PagedPool, SubAuthorityCount * sizeof(DWORD) + 8);
-   if (pSid == NULL)
-      return STATUS_NO_MEMORY;
-
-   pSid->Revision = 1;
-   pSid->SubAuthorityCount = SubAuthorityCount;
-   memcpy (&pSid->IdentifierAuthority,
-           IdentifierAuthority,
-           sizeof(SID_IDENTIFIER_AUTHORITY));
+NTSTATUS STDCALL
+RtlAllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
+			    UCHAR SubAuthorityCount,
+			    ULONG SubAuthority0,
+			    ULONG SubAuthority1,
+			    ULONG SubAuthority2,
+			    ULONG SubAuthority3,
+			    ULONG SubAuthority4,
+			    ULONG SubAuthority5,
+			    ULONG SubAuthority6,
+			    ULONG SubAuthority7,
+			    PSID *Sid)
+{
+  PSID pSid;
+
+  if (SubAuthorityCount > 8)
+    return STATUS_INVALID_SID;
+
+  if (Sid == NULL)
+    return STATUS_INVALID_PARAMETER;
+
+  pSid = (PSID)ExAllocatePool(PagedPool,
+			      sizeof(SID) + (SubAuthorityCount - 1) * sizeof(ULONG));
+  if (pSid == NULL)
+    return STATUS_NO_MEMORY;
+
+  pSid->Revision = 1;
+  pSid->SubAuthorityCount = SubAuthorityCount;
+  memcpy(&pSid->IdentifierAuthority,
+         IdentifierAuthority,
+         sizeof(SID_IDENTIFIER_AUTHORITY));
 
-   switch (SubAuthorityCount)
-   {
+  switch (SubAuthorityCount)
+    {
       case 8:
          pSid->SubAuthority[7] = SubAuthority7;
       case 7:
@@ -241,11 +240,11 @@
       case 1:
          pSid->SubAuthority[0] = SubAuthority0;
          break;
-   }
+    }
 
-   *Sid = pSid;
+  *Sid = pSid;
 
-   return STATUS_SUCCESS;
+  return STATUS_SUCCESS;
 }
 
 

reactos/lib/user32/misc
display.c 1.9 -> 1.9.8.1
diff -u -r1.9 -r1.9.8.1
--- display.c	9 Apr 2004 20:03:14 -0000	1.9
+++ display.c	11 Jul 2004 11:10:00 -0000	1.9.8.1
@@ -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: display.c,v 1.9 2004/04/09 20:03:14 navaraf Exp $
+/* $Id: display.c,v 1.9.8.1 2004/07/11 11:10:00 weiden Exp $
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/misc/dde.c
@@ -241,19 +241,30 @@
 {
   LONG rc;
   UNICODE_STRING DeviceName;
+  PUNICODE_STRING pDeviceName = &DeviceName;
   DEVMODEW DevModeW;
+  LPDEVMODEW pDevModeW = &DevModeW;
 
-  if ( !RtlCreateUnicodeStringFromAsciiz ( &DeviceName, (PCSZ)lpszDeviceName ) )
+  if (lpszDeviceName != NULL)
     {
-      SetLastError ( ERROR_OUTOFMEMORY );
-      return DISP_CHANGE_BADPARAM; /* FIXME what to return? */
+      if ( !RtlCreateUnicodeStringFromAsciiz ( pDeviceName, (PCSZ)lpszDeviceName ) )
+        {
+          SetLastError ( ERROR_OUTOFMEMORY );
+          return DISP_CHANGE_BADPARAM; /* FIXME what to return? */
+        }
     }
+  else
+    pDeviceName = NULL;
 
-  RosRtlDevModeA2W ( &DevModeW, lpDevMode );
+  if (lpDevMode != NULL)
+    RosRtlDevModeA2W ( pDevModeW, lpDevMode );
+  else
+    pDevModeW = NULL;
 
-  rc = NtUserChangeDisplaySettings ( &DeviceName, &DevModeW, hwnd, dwflags, lParam );
+  rc = NtUserChangeDisplaySettings ( pDeviceName, pDevModeW, hwnd, dwflags, lParam );
 
-  RtlFreeUnicodeString ( &DeviceName );
+  if (lpszDeviceName != NULL)
+    RtlFreeUnicodeString ( &DeviceName );
 
   return rc;
 }
@@ -286,12 +297,17 @@
 {
   LONG rc;
   UNICODE_STRING DeviceName;
+  PUNICODE_STRING pDeviceName = &DeviceName;
 
-  RtlInitUnicodeString ( &DeviceName, lpszDeviceName );
+  if (lpszDeviceName != NULL)
+    RtlInitUnicodeString ( pDeviceName, lpszDeviceName );
+  else
+    pDeviceName = NULL;
 
-  rc = NtUserChangeDisplaySettings ( &DeviceName, lpDevMode, hwnd, dwflags, lParam );
+  rc = NtUserChangeDisplaySettings ( pDeviceName, lpDevMode, hwnd, dwflags, lParam );
 
-  RtlFreeUnicodeString ( &DeviceName );
+  if (lpszDeviceName != NULL)
+    RtlFreeUnicodeString ( pDeviceName );
 
   return rc;
 }

reactos/lib/user32/misc
misc.c 1.5.8.1 -> 1.5.8.2
diff -u -r1.5.8.1 -r1.5.8.2
--- misc.c	8 Jul 2004 22:58:11 -0000	1.5.8.1
+++ misc.c	11 Jul 2004 11:10:00 -0000	1.5.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: misc.c,v 1.5.8.1 2004/07/08 22:58:11 weiden Exp $
+/* $Id: misc.c,v 1.5.8.2 2004/07/11 11:10:00 weiden Exp $
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/misc/misc.c

reactos/lib/user32/windows
nonclient.c 1.59 -> 1.59.2.1
diff -u -r1.59 -r1.59.2.1
--- nonclient.c	3 Jul 2004 17:40:23 -0000	1.59
+++ nonclient.c	11 Jul 2004 11:10:00 -0000	1.59.2.1
@@ -147,52 +147,38 @@
 HICON 
 UserGetWindowIcon(HWND hwnd)
 {
-  HICON Ret;
-  
-  if(SendMessageTimeoutW(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&Ret) && Ret)
-  {
-    return Ret;
-  }
-  if(SendMessageTimeoutW(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&Ret) && Ret)
-  {
-    return Ret;
-  }
-  if(SendMessageTimeoutW(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&Ret) && Ret)
-  {
-    return Ret;
-  }
-  if((Ret = (HICON)GetClassLongW(hwnd, GCL_HICONSM)))
-  {
-    return Ret;
-  }
-  if((Ret = (HICON)GetClassLongW(hwnd, GCL_HICON)))
-  {
-    return Ret;
-  }
-  if(SendMessageTimeoutW(hwnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (LPDWORD)&Ret) && Ret)
-  {
-    return Ret;
-  }
-  if((Ret = LoadIconW(0, IDI_APPLICATION)))
-  {
-    return Ret;
-  }
-  
-  return NULL;
+   HICON hIcon = 0;
+
+   SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
+
+   if (!hIcon)
+      SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
+
+   if (!hIcon)
+      SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
+
+   if (!hIcon)
+      hIcon = (HICON)GetClassLong(hwnd, GCL_HICONSM);
+
+   if (!hIcon)
+      hIcon = (HICON)GetClassLong(hwnd, GCL_HICON);
+
+   return hIcon;
 }
 
 BOOL
 UserDrawSysMenuButton(HWND hWnd, HDC hDC, LPRECT Rect, BOOL Down)
 {
-  HICON WindowIcon;
+   HICON WindowIcon;
   
-  if((WindowIcon = UserGetWindowIcon(hWnd)))
-  {
-    return DrawIconEx(hDC, Rect->left + 2, Rect->top + 2, WindowIcon,
-                      GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
-                      0, NULL, DI_NORMAL);
-  }
-  return FALSE;
+   if ((WindowIcon = UserGetWindowIcon(hWnd)))
+   {
+      return DrawIconEx(hDC, Rect->left + 2, Rect->top + 2, WindowIcon,
+                        GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
+                        0, NULL, DI_NORMAL);
+   }
+
+   return FALSE;
 }
 
 /*
@@ -1223,11 +1209,11 @@
             xx = GetSystemMetrics(SM_CXSIZE) + Padding;
             /* draw icon background */
             PatBlt(MemDC, 0, 0, xx, lprc->bottom - lprc->top, PATCOPY);
-            // For some reason the icon isn't centered correctly...
+            /* For some reason the icon isn't centered correctly... */
             r.top --;
-            UserDrawSysMenuButton(hWnd, MemDC, &r, FALSE);
+            if (UserDrawSysMenuButton(hWnd, MemDC, &r, FALSE))
+              r.left += xx;
             r.top ++;
-            r.left += xx;
           }
           
           vert[0].x = r.left;
@@ -1269,9 +1255,10 @@
     
     if ((uFlags & DC_ICON) && !(uFlags & DC_GRADIENT) && (Style & WS_SYSMENU) && !(uFlags & DC_SMALLCAP))
     {
-        // For some reason the icon isn't centered correctly...
+        /* For some reason the icon isn't centered correctly... */
         r.top --;
-        UserDrawSysMenuButton(hWnd, MemDC, &r, FALSE);
+        if (UserDrawSysMenuButton(hWnd, MemDC, &r, FALSE))
+          r.left += GetSystemMetrics(SM_CXSIZE) + Padding;
         r.top ++;
     }
     r.top ++;
@@ -1283,9 +1270,6 @@
   {
     if(!(uFlags & DC_GRADIENT))
     {
-    if (!(uFlags & DC_SMALLCAP) && ((uFlags & DC_ICON) || (uFlags & DC_INBUTTON)))
-        r.left += GetSystemMetrics(SM_CXSIZE) + Padding;
-
     r.right = (lprc->right - lprc->left);
     if (uFlags & DC_SMALLCAP)
       ButtonWidth = GetSystemMetrics(SM_CXSMSIZE) - 2;

reactos/lib/ws2_32
ws2_32.edf 1.3 -> 1.3.24.1
diff -u -r1.3 -r1.3.24.1
--- ws2_32.edf	12 Sep 2003 17:51:48 -0000	1.3
+++ ws2_32.edf	11 Jul 2004 11:10:00 -0000	1.3.24.1
@@ -3,120 +3,119 @@
 LIBRARY ws2_32.dll
 
 EXPORTS
-WEP=WEP@0
-WPUCompleteOverlappedRequest=WPUCompleteOverlappedRequest@20
-WSAAccept=WSAAccept@20
-WSAAddressToStringA=WSAAddressToStringA@20
-WSAAddressToStringW=WSAAddressToStringW@20
-WSAAsyncGetHostByAddr=WSAAsyncGetHostByAddr@28
-WSAAsyncGetHostByName=WSAAsyncGetHostByName@20
-WSAAsyncGetProtoByName=WSAAsyncGetProtoByName@20
-WSAAsyncGetProtoByNumber=WSAAsyncGetProtoByNumber@20
-WSAAsyncGetServByName=WSAAsyncGetServByName@24
-WSAAsyncGetServByPort=WSAAsyncGetServByPort@24
-WSAAsyncSelect=WSAAsyncSelect@16
-WSACancelAsyncRequest=WSACancelAsyncRequest@4
-WSACancelBlockingCall=WSACancelBlockingCall@0
-WSACleanup=WSACleanup@0
-WSACloseEvent=WSACloseEvent@4
-WSAConnect=WSAConnect@28
-WSACreateEvent=WSACreateEvent@0
-WSADuplicateSocketA=WSADuplicateSocketA@12
-WSADuplicateSocketW=WSADuplicateSocketW@12
-WSAEnumNameSpaceProvidersA=WSAEnumNameSpaceProvidersA@8
-WSAEnumNameSpaceProvidersW=WSAEnumNameSpaceProvidersW@8
-WSAEnumNetworkEvents=WSAEnumNetworkEvents@12
-WSAEnumProtocolsA=WSAEnumProtocolsA@12
-WSAEnumProtocolsW=WSAEnumProtocolsW@12
-WSAEventSelect=WSAEventSelect@12
-WSAGetLastError=WSAGetLastError@0
-WSAGetOverlappedResult=WSAGetOverlappedResult@20
-WSAGetQOSByName=WSAGetQOSByName@12
-WSAGetServiceClassInfoA=WSAGetServiceClassInfoA@16
-WSAGetServiceClassInfoW=WSAGetServiceClassInfoW@16
-WSAGetServiceClassNameByClassIdA=WSAGetServiceClassNameByClassIdA@12
-WSAGetServiceClassNameByClassIdW=WSAGetServiceClassNameByClassIdW@12
-WSAHtonl=WSAHtonl@12
-WSAHtons=WSAHtons@12
-WSAInstallServiceClassA=WSAInstallServiceClassA@4
-WSAInstallServiceClassW=WSAInstallServiceClassW@4
-WSAIoctl=WSAIoctl@36
-WSAIsBlocking=WSAIsBlocking@0
-WSAJoinLeaf=WSAJoinLeaf@32
-WSALookupServiceBeginA=WSALookupServiceBeginA@12
-WSALookupServiceBeginW=WSALookupServiceBeginW@12
-WSALookupServiceEnd=WSALookupServiceEnd@4
-WSALookupServiceNextA=WSALookupServiceNextA@16
-WSALookupServiceNextW=WSALookupServiceNextW@16
-WSANtohl=WSANtohl@12
-WSANtohs=WSANtohs@12
-WSAProviderConfigChange=WSAProviderConfigChange@12
-WSARecv=WSARecv@28
-WSARecvDisconnect=WSARecvDisconnect@8
-WSARecvFrom=WSARecvFrom@36
-WSARemoveServiceClass=WSARemoveServiceClass@4
-WSAResetEvent=WSAResetEvent@4
-WSASend=WSASend@28
-WSASendDisconnect=WSASendDisconnect@8
-WSASendTo=WSASendTo@36
-WSASetBlockingHook=WSASetBlockingHook@4
-WSASetEvent=WSASetEvent@4
-WSASetLastError=WSASetLastError@4
-WSASetServiceA=WSASetServiceA@12
-WSASetServiceW=WSASetServiceW@12
-WSASocketA=WSASocketA@24
-WSASocketW=WSASocketW@24
-WSAStartup=WSAStartup@8
-WSAStringToAddressA=WSAStringToAddressA@20
-WSAStringToAddressW=WSAStringToAddressW@20
-WSAUnhookBlockingHook=WSAUnhookBlockingHook@0
-WSAWaitForMultipleEvents=WSAWaitForMultipleEvents@20
-WSApSetPostRoutine=WSApSetPostRoutine@4
-WSCDeinstallProvider=WSCDeinstallProvider@8
-WSCEnableNSProvider=WSCEnableNSProvider@8
-WSCEnumProtocols=WSCEnumProtocols@16
-WSCGetProviderPath=WSCGetProviderPath@16
-WSCInstallNameSpace=WSCInstallNameSpace@20
-WSCInstallProvider=WSCInstallProvider@20
-WSCUnInstallNameSpace=WSCUnInstallNameSpace@4
-WSCWriteNameSpaceOrder=WSCWriteNameSpaceOrder@8
-WSCWriteProviderOrder=WSCWriteProviderOrder@8
-__WSAFDIsSet=__WSAFDIsSet@8
-accept=accept@12
-bind=bind@12
-closesocket=closesocket@4
-connect=connect@12
-gethostbyaddr=gethostbyaddr@12
-gethostbyname=gethostbyname@4
-gethostname=gethostname@8
-getpeername=getpeername@12
-getprotobyname=getprotobyname@4
-getprotobynumber=getprotobynumber@4
-getservbyname=getservbyname@8
-getservbyport=getservbyport@8
-getsockname=getsockname@12
-getsockopt=getsockopt@20
-htonl=htonl@4
-htons=htons@4
-inet_addr=inet_addr@4
-inet_ntoa=inet_ntoa@4
-ioctlsocket=ioctlsocket@12
-listen=listen@8
-ntohl=ntohl@4
-ntohs=ntohs@4
-recv=recv@16
-recvfrom=recvfrom@24
-select=select@20
-send=send@16
-sendto=sendto@24
-setsockopt=setsockopt@20
-shutdown=shutdown@8
-socket=socket@12
-WSANSPIoctl=WSANSPIoctl@32
-WSCUpdateProvider=WSCUpdateProvider@20
-WSCWriteNameSpaceOrder=WSCWriteNameSpaceOrder@8
-freeaddrinfo=freeaddrinfo@4
-getaddrinfo=getaddrinfo@16
-getnameinfo=getnameinfo@28
+WEP=WEP@0 @500
+WPUCompleteOverlappedRequest=WPUCompleteOverlappedRequest@20 @25
+WSAAccept=WSAAccept@20 @26
+WSAAddressToStringA=WSAAddressToStringA@20 @27
+WSAAddressToStringW=WSAAddressToStringW@20 @28
+WSAAsyncGetHostByAddr=WSAAsyncGetHostByAddr@28 @102
+WSAAsyncGetHostByName=WSAAsyncGetHostByName@20 @103
+WSAAsyncGetProtoByName=WSAAsyncGetProtoByName@20 @105
+WSAAsyncGetProtoByNumber=WSAAsyncGetProtoByNumber@20 @104
+WSAAsyncGetServByName=WSAAsyncGetServByName@24 @107
+WSAAsyncGetServByPort=WSAAsyncGetServByPort@24 @106
+WSAAsyncSelect=WSAAsyncSelect@16 @101
+WSACancelAsyncRequest=WSACancelAsyncRequest@4 @108
+WSACancelBlockingCall=WSACancelBlockingCall@0 @113
+WSACleanup=WSACleanup@0 @116
+WSACloseEvent=WSACloseEvent@4 @29
+WSAConnect=WSAConnect@28 @30
+WSACreateEvent=WSACreateEvent@0 @31
+WSADuplicateSocketA=WSADuplicateSocketA@12 @32
+WSADuplicateSocketW=WSADuplicateSocketW@12 @33
+WSAEnumNameSpaceProvidersA=WSAEnumNameSpaceProvidersA@8 @34
+WSAEnumNameSpaceProvidersW=WSAEnumNameSpaceProvidersW@8 @35
+WSAEnumNetworkEvents=WSAEnumNetworkEvents@12 @36
+WSAEnumProtocolsA=WSAEnumProtocolsA@12 @37
+WSAEnumProtocolsW=WSAEnumProtocolsW@12 @38
+WSAEventSelect=WSAEventSelect@12 @39
+WSAGetLastError=WSAGetLastError@0 @111
+WSAGetOverlappedResult=WSAGetOverlappedResult@20 @40
+WSAGetQOSByName=WSAGetQOSByName@12 @41
+WSAGetServiceClassInfoA=WSAGetServiceClassInfoA@16 @42
+WSAGetServiceClassInfoW=WSAGetServiceClassInfoW@16 @43
+WSAGetServiceClassNameByClassIdA=WSAGetServiceClassNameByClassIdA@12 @44
+WSAGetServiceClassNameByClassIdW=WSAGetServiceClassNameByClassIdW@12 @45
+WSAHtonl=WSAHtonl@12 @46
+WSAHtons=WSAHtons@12 @47
+WSAInstallServiceClassA=WSAInstallServiceClassA@4 @48
+WSAInstallServiceClassW=WSAInstallServiceClassW@4 @49
+WSAIoctl=WSAIoctl@36 @50
+WSAIsBlocking=WSAIsBlocking@0 @114
+WSAJoinLeaf=WSAJoinLeaf@32 @58
+WSALookupServiceBeginA=WSALookupServiceBeginA@12 @59
+WSALookupServiceBeginW=WSALookupServiceBeginW@12 @60
+WSALookupServiceEnd=WSALookupServiceEnd@4 @61
+WSALookupServiceNextA=WSALookupServiceNextA@16 @62
+WSALookupServiceNextW=WSALookupServiceNextW@16 @63
+WSANSPIoctl=WSANSPIoctl@32 @64
+WSANtohl=WSANtohl@12 @65
+WSANtohs=WSANtohs@12 @66
+WSAProviderConfigChange=WSAProviderConfigChange@12 @67
+WSARecv=WSARecv@28 @68
+WSARecvDisconnect=WSARecvDisconnect@8 @69
+WSARecvFrom=WSARecvFrom@36 @70
+WSARemoveServiceClass=WSARemoveServiceClass@4 @71
+WSAResetEvent=WSAResetEvent@4 @72
+WSASend=WSASend@28 @73
+WSASendDisconnect=WSASendDisconnect@8 @74
+WSASendTo=WSASendTo@36 @75
+WSASetBlockingHook=WSASetBlockingHook@4 @109
+WSASetEvent=WSASetEvent@4 @76
+WSASetLastError=WSASetLastError@4 @112
+WSASetServiceA=WSASetServiceA@12 @77
+WSASetServiceW=WSASetServiceW@12 @78
+WSASocketA=WSASocketA@24 @79
+WSASocketW=WSASocketW@24 @80
+WSAStartup=WSAStartup@8 @115
+WSAStringToAddressA=WSAStringToAddressA@20 @81
+WSAStringToAddressW=WSAStringToAddressW@20 @82
+WSAUnhookBlockingHook=WSAUnhookBlockingHook@0 @110
+WSAWaitForMultipleEvents=WSAWaitForMultipleEvents@20 @83
+WSApSetPostRoutine=WSApSetPostRoutine@4 @24
+WSCDeinstallProvider=WSCDeinstallProvider@8 @84
+WSCEnableNSProvider=WSCEnableNSProvider@8 @85
+WSCEnumProtocols=WSCEnumProtocols@16 @86
+WSCGetProviderPath=WSCGetProviderPath@16 @87
+WSCInstallNameSpace=WSCInstallNameSpace@20 @88
+WSCInstallProvider=WSCInstallProvider@20 @89
+WSCUnInstallNameSpace=WSCUnInstallNameSpace@4 @90
+WSCUpdateProvider=WSCUpdateProvider@20 @91
+WSCWriteNameSpaceOrder=WSCWriteNameSpaceOrder@8 @92
+WSCWriteProviderOrder=WSCWriteProviderOrder@8 @93
+__WSAFDIsSet=__WSAFDIsSet@8 @151
+accept=accept@12 @1
+bind=bind@12 @2
+closesocket=closesocket@4 @3
+connect=connect@12 @4
+freeaddrinfo=freeaddrinfo@4 @94
+getaddrinfo=getaddrinfo@16 @95
+gethostbyaddr=gethostbyaddr@12 @51
+gethostbyname=gethostbyname@4 @52
+gethostname=gethostname@8 @57
+getnameinfo=getnameinfo@28 @96
+getpeername=getpeername@12 @5
+getprotobyname=getprotobyname@4 @53
+getprotobynumber=getprotobynumber@4 @54
+getservbyname=getservbyname@8 @55
+getservbyport=getservbyport@8 @56
+getsockname=getsockname@12 @6
+getsockopt=getsockopt@20 @7
+htonl=htonl@4 @8
+htons=htons@4 @9
+inet_addr=inet_addr@4 @11
+inet_ntoa=inet_ntoa@4 @12
+ioctlsocket=ioctlsocket@12 @10
+listen=listen@8 @13
+ntohl=ntohl@4 @14
+ntohs=ntohs@4 @15
+recv=recv@16 @16
+recvfrom=recvfrom@24 @17
+select=select@20 @18
+send=send@16 @19
+sendto=sendto@24 @20
+setsockopt=setsockopt@20 @21
+shutdown=shutdown@8 @22
+socket=socket@12 @23
 
 ; EOF

reactos/ntoskrnl/include/internal
mm.h 1.81 -> 1.81.4.1
diff -u -r1.81 -r1.81.4.1
--- mm.h	6 Jun 2004 08:36:31 -0000	1.81
+++ mm.h	11 Jul 2004 11:10:00 -0000	1.81.4.1
@@ -203,6 +203,8 @@
 			    PHYSICAL_ADDRESS BoundaryAddressMultiple OPTIONAL);
 MEMORY_AREA* MmOpenMemoryAreaByAddress(PMADDRESS_SPACE AddressSpace, 
 				       PVOID Address);
+ULONG MmFindGapAtAddress(PMADDRESS_SPACE AddressSpace, 
+			 PVOID Address);
 NTSTATUS MmInitMemoryAreas(VOID);
 VOID MiInitializeNonPagedPool(VOID);
 NTSTATUS MmFreeMemoryArea(PMADDRESS_SPACE AddressSpace,

reactos/ntoskrnl/mm
anonmem.c 1.28 -> 1.28.4.1
diff -u -r1.28 -r1.28.4.1
--- anonmem.c	6 Jun 2004 08:36:31 -0000	1.28
+++ anonmem.c	11 Jul 2004 11:10:00 -0000	1.28.4.1
@@ -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: anonmem.c,v 1.28 2004/06/06 08:36:31 hbirr Exp $
+/* $Id: anonmem.c,v 1.28.4.1 2004/07/11 11:10:00 weiden Exp $
  *
  * PROJECT:     ReactOS kernel
  * FILE:        ntoskrnl/mm/anonmem.c
@@ -887,8 +887,9 @@
    Region = MmFindRegion(MemoryArea->BaseAddress,
                          &MemoryArea->Data.VirtualMemoryData.RegionListHead,
                          Address, &RegionBase);
-   Info->AllocationBase = RegionBase;
-   Info->AllocationProtect = Region->Protect;  /* FIXME */
+   Info->BaseAddress = RegionBase;
+   Info->AllocationBase = MemoryArea->BaseAddress;
+   Info->AllocationProtect = MemoryArea->Attributes;
    Info->RegionSize = (char*)RegionBase + Region->Length - (char*)Info->BaseAddress;
    Info->State = Region->Type;
    Info->Protect = Region->Protect;

reactos/ntoskrnl/mm
marea.c 1.62 -> 1.62.6.1
diff -u -r1.62 -r1.62.6.1
--- marea.c	20 May 2004 08:37:20 -0000	1.62
+++ marea.c	11 Jul 2004 11:10:00 -0000	1.62.6.1
@@ -346,6 +346,53 @@
    return MmFindGapBottomUp(AddressSpace, Length);
 }
 
+ULONG MmFindGapAtAddress(PMADDRESS_SPACE AddressSpace, PVOID Address)
+{
+   PLIST_ENTRY current_entry, ListHead;
+   PMEMORY_AREA current;
+
+   Address = (PVOID)PAGE_ROUND_DOWN(Address);
+
+   if (AddressSpace->LowestAddress < KERNEL_BASE)
+   {
+      if (Address >= (PVOID)KERNEL_BASE)
+      {
+         return 0;
+      }
+   }
+   else
+   {
+      if ((ULONG_PTR)Address < AddressSpace->LowestAddress)
+      {
+         return 0;
+      }
+   }
+
+   ListHead = &AddressSpace->MAreaListHead;
+
+   current_entry = ListHead->Flink;
+   while (current_entry != ListHead)
+   {
+      current = CONTAINING_RECORD(current_entry,MEMORY_AREA,Entry);
+      if (current->BaseAddress <= Address && Address < current->BaseAddress + current->Length)
+      {
+         return 0;
+      }
+      else if (current->BaseAddress > Address)
+      {
+         return (ULONG_PTR)current->BaseAddress - (ULONG_PTR)Address;
+      }
+      current_entry = current_entry->Flink;
+   }
+   if (AddressSpace->LowestAddress < KERNEL_BASE)
+   {
+      return KERNEL_BASE - (ULONG_PTR)Address;
+   }
+   else
+   {
+      return 0 - (ULONG_PTR)Address;
+   }
+}
 
 NTSTATUS INIT_FUNCTION
 MmInitMemoryAreas(VOID)

reactos/ntoskrnl/mm
section.c 1.152 -> 1.152.2.1
diff -u -r1.152 -r1.152.2.1
--- section.c	20 Jun 2004 10:21:48 -0000	1.152
+++ section.c	11 Jul 2004 11:10:00 -0000	1.152.2.1
@@ -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: section.c,v 1.152 2004/06/20 10:21:48 navaraf Exp $
+/* $Id: section.c,v 1.152.2.1 2004/07/11 11:10:00 weiden Exp $
  *
  * PROJECT:         ReactOS kernel
  * FILE:            ntoskrnl/mm/section.c
@@ -2035,7 +2035,7 @@
          }
       }
       KeReleaseSpinLock(&Section->ViewListLock, oldIrql);
-      Info->BaseAddress = MemoryArea->BaseAddress;
+      Info->BaseAddress = RegionBaseAddress;
       Info->AllocationProtect = MemoryArea->Attributes;
       Info->Type = MEM_IMAGE;
    }
@@ -2043,10 +2043,10 @@
    {
       Info->BaseAddress = RegionBaseAddress;
       Info->AllocationBase = MemoryArea->BaseAddress;
-      Info->AllocationProtect = Region->Protect;
+      Info->AllocationProtect = MemoryArea->Attributes;
       Info->Type = MEM_MAPPED;
    }
-   Info->RegionSize = MemoryArea->Length;
+   Info->RegionSize = PAGE_ROUND_UP(MemoryArea->Length);
    Info->State = MEM_COMMIT;
    Info->Protect = Region->Protect;
 

reactos/ntoskrnl/mm
virtual.c 1.76 -> 1.76.2.1
diff -u -r1.76 -r1.76.2.1
--- virtual.c	19 Jun 2004 08:53:35 -0000	1.76
+++ virtual.c	11 Jul 2004 11:10:00 -0000	1.76.2.1
@@ -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: virtual.c,v 1.76 2004/06/19 08:53:35 vizzini Exp $
+/* $Id: virtual.c,v 1.76.2.1 2004/07/11 11:10:00 weiden Exp $
  *
  * PROJECT:     ReactOS kernel
  * FILE:        ntoskrnl/mm/virtual.c
@@ -132,6 +132,12 @@
    MEMORY_AREA* MemoryArea;
    ULONG ResultLength = 0;
    PMADDRESS_SPACE AddressSpace;
+   KPROCESSOR_MODE PrevMode;
+   union
+   {
+      MEMORY_BASIC_INFORMATION BasicInfo;
+   }
+   VirtualMemoryInfo;
 
    DPRINT("NtQueryVirtualMemory(ProcessHandle %x, Address %x, "
           "VirtualMemoryInformationClass %d, VirtualMemoryInformation %x, "
@@ -139,20 +145,33 @@
           VirtualMemoryInformationClass,VirtualMemoryInformation,
           Length,ResultLength);
 
-   Status = ObReferenceObjectByHandle(ProcessHandle,
-                                      PROCESS_QUERY_INFORMATION,
-                                      NULL,
-                                      UserMode,
-                                      (PVOID*)(&Process),
-                                      NULL);
+   PrevMode =  ExGetPreviousMode();
 
-   if (!NT_SUCCESS(Status))
+   if (PrevMode == UserMode && Address >= (PVOID)KERNEL_BASE)
    {
-      DPRINT("NtQueryVirtualMemory() = %x\n",Status);
-      return(Status);
+      return STATUS_INVALID_PARAMETER;
    }
 
-   AddressSpace = &Process->AddressSpace;
+   if (Address < (PVOID)KERNEL_BASE)
+   {
+      Status = ObReferenceObjectByHandle(ProcessHandle,
+                                         PROCESS_QUERY_INFORMATION,
+                                         NULL,
+                                         UserMode,
+                                         (PVOID*)(&Process),
+                                         NULL);
+
+      if (!NT_SUCCESS(Status))
+      {
+         DPRINT("NtQueryVirtualMemory() = %x\n",Status);
+         return(Status);
+      }
+      AddressSpace = &Process->AddressSpace;
+   }
+   else
+   {
+      AddressSpace = MmGetKernelAddressSpace();
+   }
    MmLockAddressSpace(AddressSpace);
    MemoryArea = MmOpenMemoryAreaByAddress(AddressSpace,
                                           Address);
@@ -160,47 +179,65 @@
    {
       case MemoryBasicInformation:
          {
-            PMEMORY_BASIC_INFORMATION Info =
-               (PMEMORY_BASIC_INFORMATION)VirtualMemoryInformation;
-
+	    PMEMORY_BASIC_INFORMATION Info = &VirtualMemoryInfo.BasicInfo;
             if (Length != sizeof(MEMORY_BASIC_INFORMATION))
             {
                MmUnlockAddressSpace(AddressSpace);
                ObDereferenceObject(Process);
                return(STATUS_INFO_LENGTH_MISMATCH);
             }
-
+            
             if (MemoryArea == NULL)
             {
+	       Info->Type = 0;
                Info->State = MEM_FREE;
+	       Info->Protect = PAGE_NOACCESS;
+	       Info->AllocationProtect = 0;
                Info->BaseAddress = (PVOID)PAGE_ROUND_DOWN(Address);
-               Info->AllocationBase = 0;
-               Info->AllocationProtect = 0;
-               /* TODO: Find the next memory area and set RegionSize! */
-               /* Since programs might depend on RegionSize for
-                * iteration, we for now just make up a value.
-                */
-               Info->RegionSize = (Address > (PVOID)0x70000000) ? 0 : 0x10000;
-               Info->Protect = PAGE_NOACCESS;
-               Info->Type = 0;
+	       Info->AllocationBase = NULL;
+	       Info->RegionSize = MmFindGapAtAddress(AddressSpace, Info->BaseAddress);
                Status = STATUS_SUCCESS;
                ResultLength = sizeof(MEMORY_BASIC_INFORMATION);
-            }
-            else if (MemoryArea->Type == MEMORY_AREA_VIRTUAL_MEMORY)
-            {
-               Status = MmQueryAnonMem(MemoryArea, Address, Info,
-                                       &ResultLength);
-            }
-            else if (MemoryArea->Type == MEMORY_AREA_SECTION_VIEW)
-            {
-               Status = MmQuerySectionView(MemoryArea, Address, Info,
-                                           &ResultLength);
-            }
-            else
-            {
-               Status = STATUS_UNSUCCESSFUL;
-               ResultLength = 0;
-            }
+	    }
+            else 
+	    {
+	       switch(MemoryArea->Type)
+	       {
+		  case MEMORY_AREA_VIRTUAL_MEMORY:
+                     Status = MmQueryAnonMem(MemoryArea, Address, Info,
+                                             &ResultLength);
+		     break;
+	          case MEMORY_AREA_SECTION_VIEW:
+                     Status = MmQuerySectionView(MemoryArea, Address, Info,
+                                                 &ResultLength);
+                     break;
+		  case MEMORY_AREA_NO_ACCESS:
+	             Info->Type = 0;
+                     Info->State = MEM_FREE;
+	             Info->Protect = MemoryArea->Attributes;
+		     Info->AllocationProtect = MemoryArea->Attributes;
+                     Info->BaseAddress = MemoryArea->BaseAddress;
+	             Info->AllocationBase = MemoryArea->BaseAddress;
+	             Info->RegionSize = MemoryArea->Length;
+                     Status = STATUS_SUCCESS;
+                     ResultLength = sizeof(MEMORY_BASIC_INFORMATION);
+	             break;
+		  case MEMORY_AREA_SHARED_DATA:
+	             Info->Type = 0;
+                     Info->State = MEM_COMMIT;
+	             Info->Protect = MemoryArea->Attributes;
+		     Info->AllocationProtect = MemoryArea->Attributes;
+                     Info->BaseAddress = MemoryArea->BaseAddress;
+	             Info->AllocationBase = MemoryArea->BaseAddress;
+	             Info->RegionSize = MemoryArea->Length;
+                     Status = STATUS_SUCCESS;
+                     ResultLength = sizeof(MEMORY_BASIC_INFORMATION);
+		     break;
+		  default:
+	             Status = STATUS_UNSUCCESSFUL;
+                     ResultLength = 0;
+	       }
+	    }
             break;
          }
 
@@ -213,7 +250,20 @@
    }
 
    MmUnlockAddressSpace(AddressSpace);
-   ObDereferenceObject(Process);
+   if (Address < (PVOID)KERNEL_BASE)
+   {
+      ObDereferenceObject(Process);
+   }
+
+   if (NT_SUCCESS(Status) && ResultLength > 0)
+   {
+      Status = MmCopyToCaller(VirtualMemoryInformation, &VirtualMemoryInfo, ResultLength);
+      if (!NT_SUCCESS(Status))
+      {
+         ResultLength = 0;
+      }
+   }
+   
    if (UnsafeResultLength != NULL)
    {
       MmCopyToCaller(UnsafeResultLength, &ResultLength, sizeof(ULONG));

reactos/ntoskrnl/ps
create.c 1.73 -> 1.73.8.1
diff -u -r1.73 -r1.73.8.1
--- create.c	24 Mar 2004 22:00:39 -0000	1.73
+++ create.c	11 Jul 2004 11:10:01 -0000	1.73.8.1
@@ -1,4 +1,4 @@
-/* $Id: create.c,v 1.73 2004/03/24 22:00:39 ea Exp $
+/* $Id: create.c,v 1.73.8.1 2004/07/11 11:10:01 weiden Exp $
  *
  * COPYRIGHT:              See COPYING in the top level directory
  * PROJECT:                ReactOS kernel
@@ -481,7 +481,7 @@
 
    while (TRUE)
      {
-	Status = NtQueryVirtualMemory(ProcessHandle,
+	Status = ZwQueryVirtualMemory(ProcessHandle,
 				      TebBase,
 				      MemoryBasicInformation,
 				      &Info,
@@ -489,14 +489,14 @@
 				      &ResultLength);
 	if (!NT_SUCCESS(Status))
 	  {
-	     CPRINT("NtQueryVirtualMemory (Status %x)\n", Status);
+	     CPRINT("ZwQueryVirtualMemory (Status %x)\n", Status);
 	     KEBUGCHECK(0);
 	  }
 	/* FIXME: Race between this and the above check */
 	if (Info.State == MEM_FREE)
 	  {
 	     /* The TEB must reside in user space */
-	     Status = NtAllocateVirtualMemory(ProcessHandle,
+	     Status = ZwAllocateVirtualMemory(ProcessHandle,
 					      &TebBase,
 					      0,
 					      &TebSize,

reactos/subsys/win32k/include
internal.h 1.1.2.2 -> 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- internal.h	8 Jul 2004 22:58:12 -0000	1.1.2.2
+++ internal.h	11 Jul 2004 11:10:01 -0000	1.1.2.3
@@ -286,6 +286,7 @@
 VOID                FASTCALL IntGetDesktopWorkArea(PDESKTOP_OBJECT Desktop, PRECT Rect);
 HDC                 FASTCALL IntGetScreenDC(VOID);
 PWINDOW_OBJECT      FASTCALL IntGetDesktopWindow (VOID);
+PWINDOW_OBJECT      FASTCALL IntGetCurrentThreadDesktopWindow(VOID);
 PUSER_MESSAGE_QUEUE FASTCALL IntGetActiveMessageQueue(VOID);
 PUSER_MESSAGE_QUEUE FASTCALL IntSetActiveMessageQueue(PUSER_MESSAGE_QUEUE NewQueue);
 PDESKTOP_OBJECT     FASTCALL IntGetActiveDesktop(VOID);
@@ -656,6 +657,8 @@
                                  PW32THREAD Thread, MSG *Message, BOOL Remove);
 HDC  FASTCALL IntBeginPaint(PWINDOW_OBJECT Window, PAINTSTRUCT* lPs);
 BOOL FASTCALL IntEndPaint(PWINDOW_OBJECT Window, CONST PAINTSTRUCT* lPs);
+BOOL FASTCALL IntGetUpdateRect(PWINDOW_OBJECT Window, LPRECT Rect, BOOL Erase);
+INT  FASTCALL IntGetUpdateRgn(PWINDOW_OBJECT Window, HRGN hRgn, BOOL bErase);
 
 /* WINDOW PROPERTIES **********************************************************/
 

reactos/subsys/win32k/ntuser
desktop.c 1.16.2.1 -> 1.16.2.2
diff -u -r1.16.2.1 -r1.16.2.2
--- desktop.c	7 Jul 2004 18:03:01 -0000	1.16.2.1
+++ desktop.c	11 Jul 2004 11:10:01 -0000	1.16.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: desktop.c,v 1.16.2.1 2004/07/07 18:03:01 weiden Exp $
+ *  $Id: desktop.c,v 1.16.2.2 2004/07/11 11:10:01 weiden Exp $
  *
  *  COPYRIGHT:        See COPYING in the top level directory
  *  PROJECT:          ReactOS kernel
@@ -137,6 +137,14 @@
   return InputDesktop;
 }
 
+PWINDOW_OBJECT FASTCALL
+IntGetCurrentThreadDesktopWindow(VOID)
+{
+  PDESKTOP_OBJECT pdo = PsGetWin32Thread()->Desktop;
+  
+  return (pdo != NULL ? pdo->DesktopWindow : NULL);
+}
+
 /*
  * returns or creates a handle to the desktop object
  */

reactos/subsys/win32k/ntuser
keyboard.c 1.30.2.2 -> 1.30.2.3
diff -u -r1.30.2.2 -r1.30.2.3
--- keyboard.c	8 Jul 2004 15:43:02 -0000	1.30.2.2
+++ keyboard.c	11 Jul 2004 11:10:01 -0000	1.30.2.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: keyboard.c,v 1.30.2.2 2004/07/08 15:43:02 navaraf Exp $
+/* $Id: keyboard.c,v 1.30.2.3 2004/07/11 11:10:01 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -89,13 +89,6 @@
     if (down) QueueKeyStateTable[vk] ^= KS_LOCK_BIT;
   } 
 
-  if (ext && vk == VK_LSHIFT)
-    vk = VK_RSHIFT;
-  if (ext && vk == VK_LCONTROL)
-    vk = VK_RCONTROL;
-  if (ext && vk == VK_LMENU)
-    vk = VK_RMENU;
-
   if (down)
     QueueKeyStateTable[vk] |= KS_DOWN_BIT;
   else
@@ -600,7 +593,8 @@
 #undef XX_STATUS
 }
 
-PKBDTABLES W32kGetDefaultKeyLayout() {
+PKBDTABLES FASTCALL
+W32kGetDefaultKeyLayout(VOID) {
   PKBDTABLES pkKeyboardLayout = 0;
   InitKbdLayout( (PVOID) &pkKeyboardLayout );
   return pkKeyboardLayout;

reactos/subsys/win32k/ntuser
ntuser.c 1.1.2.1 -> 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- ntuser.c	7 Jul 2004 18:14:43 -0000	1.1.2.1
+++ ntuser.c	11 Jul 2004 11:10:01 -0000	1.1.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: ntuser.c,v 1.1.2.1 2004/07/07 18:14:43 weiden Exp $
+/* $Id: ntuser.c,v 1.1.2.2 2004/07/11 11:10:01 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -984,6 +984,43 @@
   END_NTUSER();
 }
 
+BOOL STDCALL
+NtUserGetUpdateRect(HWND hWnd, LPRECT lpRect, BOOL bErase)
+{
+  RECT SafeRect;
+  NTUSER_USER_OBJECT(WINDOW, Window);
+  BEGIN_BUFFERS();
+  BEGIN_NTUSER(BOOL, FALSE);
+  
+  /* FIXME - if bErase == FALSE, should we do ENTER_CRITICAL_SHARED() instead? */
+  ENTER_CRITICAL();
+  VALIDATE_USER_OBJECT(WINDOW, hWnd, Window);
+  Result = IntGetUpdateRect(Window, &SafeRect, bErase);
+  LEAVE_CRITICAL();
+  
+  if(lpRect != NULL)
+  {
+    NTUSER_COPY_BUFFER_BACK_NTERROR(lpRect, &SafeRect, sizeof(RECT));
+  }
+  
+  END_NTUSER();
+}
+
+INT STDCALL
+NtUserGetUpdateRgn(HWND hWnd, HRGN hRgn, BOOL bErase)
+{
+  NTUSER_USER_OBJECT(WINDOW, Window);
+  BEGIN_NTUSER(INT, ERROR);
+  
+  /* FIXME - if bErase == FALSE, should we do ENTER_CRITICAL_SHARED() instead? */
+  ENTER_CRITICAL();
+  VALIDATE_USER_OBJECT(WINDOW, hWnd, Window);
+  Result = IntGetUpdateRgn(Window, hRgn, bErase);
+  LEAVE_CRITICAL();
+  
+  END_NTUSER();
+}
+
 HWND STDCALL
 NtUserGetWindow(HWND hWnd, UINT uCmd)
 {

reactos/subsys/win32k/ntuser
stubs.c 1.45.8.1 -> 1.45.8.2
diff -u -r1.45.8.1 -r1.45.8.2
--- stubs.c	7 Jul 2004 18:03:01 -0000	1.45.8.1
+++ stubs.c	11 Jul 2004 11:10:01 -0000	1.45.8.2
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.45.8.1 2004/07/07 18:03:01 weiden Exp $
+/* $Id: stubs.c,v 1.45.8.2 2004/07/11 11:10:01 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -797,22 +797,6 @@
 }
 
 
-INT STDCALL
-NtUserGetUpdateRgn(HWND hWnd, HRGN hRgn, BOOL bErase)
-{
-   UNIMPLEMENTED;
-   return FALSE;
-}
-
-
-BOOL STDCALL
-NtUserGetUpdateRect(HWND Wnd, LPRECT UnsafeRect, BOOL Erase)
-{
-   UNIMPLEMENTED;
-   return FALSE;
-}
-
-
 BOOL STDCALL
 NtUserRedrawWindow(HWND hWnd, CONST RECT *lprcUpdate, HRGN hrgnUpdate,
    UINT flags)

reactos/subsys/win32k/objects
cursoricon.c 1.62.2.1 -> 1.62.2.2
diff -u -r1.62.2.1 -r1.62.2.2
--- cursoricon.c	7 Jul 2004 18:03:02 -0000	1.62.2.1
+++ cursoricon.c	11 Jul 2004 11:10:01 -0000	1.62.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: cursoricon.c,v 1.62.2.1 2004/07/07 18:03:02 weiden Exp $ */
+/* $Id: cursoricon.c,v 1.62.2.2 2004/07/11 11:10:01 weiden Exp $ */
 #include <w32k.h>
 
 #define COLORCURSORS_ALLOWED FALSE
@@ -606,6 +606,8 @@
   SetStretchBltMode(hdcOff, nStretchMode);
   #endif
   
+  Ret = TRUE;
+  
   cleanup:
   if(DoFlickerFree)
   {

reactos/subsys/win32k/objects
text.c 1.102 -> 1.102.2.1
diff -u -r1.102 -r1.102.2.1
--- text.c	3 Jul 2004 17:40:27 -0000	1.102
+++ text.c	11 Jul 2004 11:10:01 -0000	1.102.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.102 2004/07/03 17:40:27 navaraf Exp $ */
+/* $Id: text.c,v 1.102.2.1 2004/07/11 11:10:01 weiden Exp $ */
 #include <w32k.h>
 
 #include <ft2build.h>
@@ -2016,10 +2016,17 @@
       SetLastWin32Error(ERROR_INVALID_HANDLE);
       return FALSE;
    }
-   TextObj = TEXTOBJ_LockText(hFont);
    hFont = dc->w.hFont;
+   TextObj = TEXTOBJ_LockText(hFont);
    DC_UnlockDc(hDC);
 
+   if (TextObj == NULL)
+   {
+      ExFreePool(SafeBuffer);
+      SetLastWin32Error(ERROR_INVALID_HANDLE);
+      return FALSE;
+   }
+
    if (!NT_SUCCESS(GetFontObjectsFromTextObj(TextObj, NULL, NULL, &FontGDI)))
    {
       ExFreePool(SafeBuffer);
@@ -2498,13 +2505,31 @@
   return TRUE;
 }
 
-int
-STDCALL
-NtGdiGetTextFace(HDC  hDC,
-                     int  Count,
-                     LPWSTR  FaceName)
+INT STDCALL
+NtGdiGetTextFace(HDC hDC, INT Count, LPWSTR FaceName)
 {
-  UNIMPLEMENTED;
+   PDC Dc;
+   PTEXTOBJ TextObj;
+   NTSTATUS Status;
+
+   Dc = DC_LockDc(hDC);
+   if (Dc == NULL)
+   {
+      SetLastWin32Error(ERROR_INVALID_HANDLE);
+      return FALSE;
+   }
+   TextObj = TEXTOBJ_LockText(Dc->w.hFont);
+   DC_UnlockDc(hDC);
+
+   Count = min(Count, wcslen(TextObj->logfont.lfFaceName));
+   Status = MmCopyToCaller(FaceName, TextObj->logfont.lfFaceName, Count * sizeof(WCHAR));
+   if (!NT_SUCCESS(Status))
+   {
+      SetLastNtError(Status);
+      return 0;
+   }
+
+   return Count;
 }
 
 BOOL
@@ -2680,6 +2705,63 @@
    return NtGdiExtTextOut(hDC, XStart, YStart, 0, NULL, String, Count, NULL);
 }
 
+DWORD STDCALL
+NtGdiGetFontData(
+   HDC hDC,
+   DWORD Table,
+   DWORD Offset,
+   LPVOID Buffer,
+   DWORD Size)
+{
+   PDC Dc;
+   HFONT hFont;
+   PTEXTOBJ TextObj;
+   PFONTGDI FontGdi;
+   DWORD Result = GDI_ERROR;
+   NTSTATUS Status;
+
+   Dc = DC_LockDc(hDC);
+   if (Dc == NULL)
+   {
+      SetLastWin32Error(ERROR_INVALID_HANDLE);
+      return GDI_ERROR;
+   }
+   hFont = Dc->w.hFont;
+   TextObj = TEXTOBJ_LockText(hFont);
+   DC_UnlockDc(hDC);
+
+   if (TextObj == NULL)
+   {
+      SetLastWin32Error(ERROR_INVALID_HANDLE);
+      return GDI_ERROR;
+   }
+   
+   Status = GetFontObjectsFromTextObj(TextObj, NULL, NULL, &FontGdi);
+   if (NT_SUCCESS(Status))
+   {
+      IntLockFreeType;
+
+      if (FT_IS_SFNT(FontGdi->face))
+      {
+         if (Table)
+            Table = Table >> 24 | Table << 24 | (Table >> 8 & 0xFF00) |
+                    (Table << 8 & 0xFF0000);
+
+         if (Buffer == NULL)
+            Size = 0;
+
+         if (!FT_Load_Sfnt_Table(FontGdi->face, Table, Offset, Buffer, &Size))
+            Result = Size;
+      }
+
+      IntUnLockFreeType;
+   }
+
+   TEXTOBJ_UnlockText(hFont);
+
+   return Result; 
+}
+
 static UINT FASTCALL
 GetFontScore(LOGFONTW *LogFont, PUNICODE_STRING FaceName, PFONTGDI FontGDI)
 {

reactos/lib/acledit
.cvsignore added at 1.1.2.1
diff -N .cvsignore
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ .cvsignore	11 Jul 2004 11:10:01 -0000	1.1.2.1
@@ -0,0 +1,8 @@
+*.coff
+*.dll
+*.d
+*.a
+*.o
+*.sym
+*.map
+*.tmp

reactos/lib/acledit
Makefile added at 1.1.2.1
diff -N Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Makefile	11 Jul 2004 11:10:01 -0000	1.1.2.1
@@ -0,0 +1,45 @@
+# $Id: Makefile,v 1.1.2.1 2004/07/11 11:10:01 weiden Exp $
+
+PATH_TO_TOP = ../..
+
+TARGET_TYPE = dynlink
+
+TARGET_NAME = acledit
+
+TARGET_INSTALLDIR = system32
+
+TARGET_BASE = $(TARGET_BASE_LIB_ACLEDIT)
+
+TARGET_CFLAGS = \
+ -I./include \
+ -DUNICODE \
+ -D_UNICODE \
+ -D__REACTOS__ \
+ -Wall \
+ -Werror \
+ -fno-builtin
+
+TARGET_LFLAGS = -nostartfiles -nostdlib
+
+TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a user32.a
+
+TARGET_GCCLIBS = gcc
+
+TARGET_PCH = 
+
+TARGET_CLEAN = 
+
+TARGET_OBJECTS = acledit.o stubs.o
+
+DEP_OBJECTS = $(TARGET_OBJECTS)
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
+
+include $(TOOLS_PATH)/depend.mk
+
+%/TAGS:
+	etags -o $(@D)/TAGS $(@D)/\*.c
+
+etags: ./TAGS

reactos/lib/acledit
acledit.c added at 1.1.2.1
diff -N acledit.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ acledit.c	11 Jul 2004 11:10:01 -0000	1.1.2.1
@@ -0,0 +1,60 @@
+/*
+ *  ReactOS kernel
+ *  Copyright (C) 2004 ReactOS Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/* $Id: acledit.c,v 1.1.2.1 2004/07/11 11:10:01 weiden Exp $
+ *
+ * PROJECT:         ReactOS Access Control List Editor
+ * FILE:            lib/acledit/acledit.c
+ * PURPOSE:         Access Control List Editor
+ * PROGRAMMER:      Thomas Weidenmueller (w3seek@users.sourceforge.net)
+ *
+ *                  Based on guess work and on this nice article:
+ *                    http://www.sysinternals.com/ntw2k/info/acledit.shtml
+ *
+ * UPDATE HISTORY:
+ *      07/09/2004  Created
+ */
+#include <windows.h>
+#include <acledit.h>
+#include "acleditint.h"
+#include "resource.h"
+
+extern HINSTANCE hDllInstance;
+
+
+BOOL STDCALL
+DllMain(
+	HINSTANCE hinstDLL,
+	DWORD     dwReason,
+	LPVOID    lpvReserved)
+{
+  switch (dwReason)
+  {
+    case DLL_PROCESS_ATTACH:
+      hDllInstance = hinstDLL;
+      break;
+    case DLL_THREAD_ATTACH:
+      break;
+    case DLL_THREAD_DETACH:
+      break;
+    case DLL_PROCESS_DETACH:
+      break;
+  }
+  return TRUE;
+}
+

reactos/lib/acledit
acledit.def added at 1.1.2.1
diff -N acledit.def
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ acledit.def	11 Jul 2004 11:10:01 -0000	1.1.2.1
@@ -0,0 +1,12 @@
+LIBRARY acledit.dll
+
+EXPORTS
+EditAuditInfo@4
+EditOwnerInfo@4
+EditPermissionInfo@4
+FMExtensionProcW@12
+SedDiscretionaryAclEditor@52
+SedSystemAclEditor@48
+SedTakeOwnership@56
+
+; EOF

reactos/lib/acledit
acledit.edf added at 1.1.2.1
diff -N acledit.edf
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ acledit.edf	11 Jul 2004 11:10:01 -0000	1.1.2.1
@@ -0,0 +1,12 @@
+LIBRARY acledit.dll
+
+EXPORTS
+EditAuditInfo=EditAuditInfo@4
+EditOwnerInfo=EditOwnerInfo@4
+EditPermissionInfo=EditPermissionInfo@4
+FMExtensionProcW=FMExtensionProcW@12
+SedDiscretionaryAclEditor=SedDiscretionaryAclEditor@52
+SedSystemAclEditor=SedSystemAclEditor@48
+SedTakeOwnership=SedTakeOwnership@56
+
+; EOF

reactos/lib/acledit
acledit.map added at 1.1.2.1
diff -N acledit.map
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ acledit.map	11 Jul 2004 11:10:01 -0000	1.1.2.1
@@ -0,0 +1,162 @@
+
+acledit.nostrip.dll:     file format pei-i386
+
+Disassembly of section .text:
+
+10001000 <_DllMain@12>:
+DllMain(
+	HINSTANCE hinstDLL,
+	DWORD     dwReason,
+	LPVOID    lpvReserved)
+{
+10001000:	55                   	push   %ebp
+10001001:	89 e5                	mov    %esp,%ebp
+  switch (dwReason)
+10001003:	8b 45 0c             	mov    0xc(%ebp),%eax
+10001006:	83 f8 01             	cmp    $0x1,%eax
+10001009:	74 02                	je     1000100d <_DllMain@12+0xd>
+1000100b:	eb 08                	jmp    10001015 <_DllMain@12+0x15>
+  {
+    case DLL_PROCESS_ATTACH:
+      hDllInstance = hinstDLL;
+1000100d:	8b 45 08             	mov    0x8(%ebp),%eax
+10001010:	a3 00 30 00 10       	mov    %eax,0x10003000
+      break;
+    case DLL_THREAD_ATTACH:
+      break;
+    case DLL_THREAD_DETACH:
+      break;
+    case DLL_PROCESS_DETACH:
+      break;
+  }
+  return TRUE;
+10001015:	b8 01 00 00 00       	mov    $0x1,%eax
+}
+1000101a:	c9                   	leave  
+1000101b:	c2 0c 00             	ret    $0xc
+1000101e:	90                   	nop    
+1000101f:	90                   	nop    
+
+10001020 <_EditAuditInfo@4>:
+10001020:	55                   	push   %ebp
+10001021:	89 e5                	mov    %esp,%ebp
+10001023:	83 ec 08             	sub    $0x8,%esp
+10001026:	6a 1c                	push   $0x1c
+10001028:	68 0e 20 00 10       	push   $0x1000200e
+1000102d:	68 00 20 00 10       	push   $0x10002000
+10001032:	68 18 20 00 10       	push   $0x10002018
+10001037:	e8 04 01 00 00       	call   10001140 <_DbgPrint>
+1000103c:	83 c4 10             	add    $0x10,%esp
+1000103f:	b8 00 00 00 00       	mov    $0x0,%eax
+10001044:	c9                   	leave  
+10001045:	c2 04 00             	ret    $0x4
+
+10001048 <_EditOwnerInfo@4>:
+10001048:	55                   	push   %ebp
+10001049:	89 e5                	mov    %esp,%ebp
+1000104b:	83 ec 08             	sub    $0x8,%esp
+1000104e:	6a 24                	push   $0x24
+10001050:	68 0e 20 00 10       	push   $0x1000200e
+10001055:	68 41 20 00 10       	push   $0x10002041
+1000105a:	68 18 20 00 10       	push   $0x10002018
+1000105f:	e8 dc 00 00 00       	call   10001140 <_DbgPrint>
+10001064:	83 c4 10             	add    $0x10,%esp
+10001067:	b8 00 00 00 00       	mov    $0x0,%eax
+1000106c:	c9                   	leave  
+1000106d:	c2 04 00             	ret    $0x4
+
+10001070 <_EditPermissionInfo@4>:
+10001070:	55                   	push   %ebp
+10001071:	89 e5                	mov    %esp,%ebp
+10001073:	83 ec 08             	sub    $0x8,%esp
+10001076:	6a 2c                	push   $0x2c
+10001078:	68 0e 20 00 10       	push   $0x1000200e
+1000107d:	68 4f 20 00 10       	push   $0x1000204f
+10001082:	68 18 20 00 10       	push   $0x10002018
+10001087:	e8 b4 00 00 00       	call   10001140 <_DbgPrint>
+1000108c:	83 c4 10             	add    $0x10,%esp
+1000108f:	b8 00 00 00 00       	mov    $0x0,%eax
+10001094:	c9                   	leave  
+10001095:	c2 04 00             	ret    $0x4
+
+10001098 <_FMExtensionProcW@12>:
+10001098:	55                   	push   %ebp
+10001099:	89 e5                	mov    %esp,%ebp
+1000109b:	83 ec 08             	sub    $0x8,%esp
+1000109e:	8b 45 0c             	mov    0xc(%ebp),%eax
+100010a1:	66 89 45 fe          	mov    %ax,0xfffffffe(%ebp)
+100010a5:	6a 36                	push   $0x36
+100010a7:	68 0e 20 00 10       	push   $0x1000200e
+100010ac:	68 62 20 00 10       	push   $0x10002062
+100010b1:	68 18 20 00 10       	push   $0x10002018
+100010b6:	e8 85 00 00 00       	call   10001140 <_DbgPrint>
+100010bb:	83 c4 10             	add    $0x10,%esp
+100010be:	b8 00 00 00 00       	mov    $0x0,%eax
+100010c3:	c9                   	leave  
+100010c4:	c2 0c 00             	ret    $0xc
+
+100010c7 <_SedDiscretionaryAclEditor@52>:
+
+100010c7:	55                   	push   %ebp
+100010c8:	89 e5                	mov    %esp,%ebp
+100010ca:	83 ec 08             	sub    $0x8,%esp
+100010cd:	6a 4a                	push   $0x4a
+100010cf:	68 0e 20 00 10       	push   $0x1000200e
+100010d4:	68 73 20 00 10       	push   $0x10002073
+100010d9:	68 18 20 00 10       	push   $0x10002018
+100010de:	e8 5d 00 00 00       	call   10001140 <_DbgPrint>
+100010e3:	83 c4 10             	add    $0x10,%esp
+100010e6:	b8 00 00 00 00       	mov    $0x0,%eax
+100010eb:	c9                   	leave  
+100010ec:	c2 34 00             	ret    $0x34
+
+100010ef <_SedTakeOwnership@56>:
+100010ef:	55                   	push   %ebp
+100010f0:	89 e5                	mov    %esp,%ebp
+100010f2:	83 ec 08             	sub    $0x8,%esp
+100010f5:	6a 5f                	push   $0x5f
+100010f7:	68 0e 20 00 10       	push   $0x1000200e
+100010fc:	68 8d 20 00 10       	push   $0x1000208d
+10001101:	68 18 20 00 10       	push   $0x10002018
+10001106:	e8 35 00 00 00       	call   10001140 <_DbgPrint>
+1000110b:	83 c4 10             	add    $0x10,%esp
+1000110e:	b8 00 00 00 00       	mov    $0x0,%eax
+10001113:	c9                   	leave  
+10001114:	c2 38 00             	ret    $0x38
+
+10001117 <_SedSystemAclEditor@48>:
+10001117:	55                   	push   %ebp
+10001118:	89 e5                	mov    %esp,%ebp
+1000111a:	83 ec 08             	sub    $0x8,%esp
+1000111d:	6a 72                	push   $0x72
+1000111f:	68 0e 20 00 10       	push   $0x1000200e
+10001124:	68 9e 20 00 10       	push   $0x1000209e
+10001129:	68 18 20 00 10       	push   $0x10002018
+1000112e:	e8 0d 00 00 00       	call   10001140 <_DbgPrint>
+10001133:	83 c4 10             	add    $0x10,%esp
+10001136:	b8 00 00 00 00       	mov    $0x0,%eax
+1000113b:	c9                   	leave  
+1000113c:	c2 30 00             	ret    $0x30
+1000113f:	90                   	nop    
+
+10001140 <_DbgPrint>:
+10001140:	ff 25 38 50 00 10    	jmp    *0x10005038
+10001146:	90                   	nop    
+10001147:	90                   	nop    
+	...
+
+10001150 <__CTOR_LIST__>:
+10001150:	ff                   	(bad)  
+10001151:	ff                   	(bad)  
+10001152:	ff                   	(bad)  
+10001153:	ff 00                	incl   (%eax)
+10001155:	00 00                	add    %al,(%eax)
+	...
+
+10001158 <__DTOR_LIST__>:
+10001158:	ff                   	(bad)  
+10001159:	ff                   	(bad)  
+1000115a:	ff                   	(bad)  
+1000115b:	ff 00                	incl   (%eax)
+1000115d:	00 00                	add    %al,(%eax)
+	...

reactos/lib/acledit
acledit.rc added at 1.1.2.1
diff -N acledit.rc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ acledit.rc	11 Jul 2004 11:10:01 -0000	1.1.2.1
@@ -0,0 +1,40 @@
+#include <reactos/resource.h>
+#include <defines.h>
+#include "resource.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
+
+VS_VERSION_INFO VERSIONINFO
+	FILEVERSION	RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD
+	PRODUCTVERSION	RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD	
+	FILEFLAGSMASK	0x3fL
+#ifdef _DEBUG
+	FILEFLAGS	0x1L
+#else
+	FILEFLAGS	0x0L
+#endif
+	FILEOS		0x40004L
+	FILETYPE	0x2L
+	FILESUBTYPE	0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "CompanyName",	RES_STR_COMPANY_NAME
+            VALUE "FileDescription",	"ReactOS Access Control Editor\0"
+            VALUE "FileVersion",	RES_STR_FILE_VERSION
+            VALUE "InternalName",	"acledit\0"
+            VALUE "LegalCopyright",	RES_STR_LEGAL_COPYRIGHT
+            VALUE "OriginalFilename",	"acledit.dll\0"
+            VALUE "ProductName",	RES_STR_PRODUCT_NAME
+            VALUE "ProductVersion",	RES_STR_PRODUCT_VERSION
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END
+
+

reactos/lib/acledit
acleditint.h added at 1.1.2.1
diff -N acleditint.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ acleditint.h	11 Jul 2004 11:10:01 -0000	1.1.2.1
@@ -0,0 +1,8 @@
+#ifndef __ACLEDITINT_H
+#define __ACLEDITINT_H
+
+HINSTANCE hDllInstance;
+
+#endif /* __ACLEDITINT_H */
+
+/* EOF */

reactos/lib/acledit
resource.h added at 1.1.2.1
diff -N resource.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ resource.h	11 Jul 2004 11:10:01 -0000	1.1.2.1
@@ -0,0 +1,8 @@
+#ifndef __DEVMGR_RESOURCE_H
+#define __DEVMGR_RESOURCE_H
+
+#define IDI_DEVMGR	100
+
+#endif /* __DEVMGR_RESOURCE_H */
+
+/* EOF */

reactos/lib/acledit
stubs.c added at 1.1.2.1
diff -N stubs.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ stubs.c	11 Jul 2004 11:10:01 -0000	1.1.2.1
@@ -0,0 +1,118 @@
+/* $Id: stubs.c,v 1.1.2.1 2004/07/11 11:10:01 weiden Exp $
+ *
+ * COPYRIGHT:       See COPYING in the top level directory
+ * PROJECT:         ReactOS Access Control List Editor
+ * FILE:            lib/acledit/stubs.c
+ * PURPOSE:         acledit.dll stubs
+ * PROGRAMMER:      Thomas Weidenmueller <w3seek@reactos.com>
+ * NOTES:           If you implement a function, remove it from this file
+ *
+ *                  Based on guess work and on this nice article:
+ *                    http://www.sysinternals.com/ntw2k/info/acledit.shtml
+ *
+ * UPDATE HISTORY:
+ *      07/09/2004  Created
+ */
+#include <windows.h>
+#include <acledit.h>
+#include "acleditint.h"
+
+#define UNIMPLEMENTED \
+  DbgPrint("ACLEDIT:  %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__)
+
+
+DWORD
+WINAPI
+EditAuditInfo(DWORD Unknown)
+{
+  UNIMPLEMENTED;
+  return 0;
+}
+
+DWORD
+WINAPI
+EditOwnerInfo(DWORD Unknown)
+{
+  UNIMPLEMENTED;
+  return 0;
+}
+
+DWORD
+WINAPI
+EditPermissionInfo(DWORD Unknown)
+{
+  UNIMPLEMENTED;
+  return 0;
+}
+
+LONG
+WINAPI
+FMExtensionProcW(HWND hWnd,
+                 WORD wEvent,
+		 LONG lParam)
+{
+  UNIMPLEMENTED;
+  return 0;
+}
+
+DWORD
+WINAPI
+SedDiscretionaryAclEditor(HWND hWndOwner,
+                          HINSTANCE hInstance,
+                          LPCWSTR lpMachineName,
+                          PACL_DLG_CONTROL pAclDlgControl,
+                          PACL_EDIT_CONTROL pAclEditControl,
+                          LPCWSTR lpObjectName,
+                          PACL_CHANGE pChangeCallback,
+                          PVOID pChangeCallbackContext,
+                          PSECURITY_DESCRIPTOR pObjectSecurity,
+                          BOOL bNoReadPermission,
+                          BOOL bReadOnly,
+                          LPDWORD lpdwChangeContextStatus,
+                          DWORD Reserved)
+{
+  UNIMPLEMENTED;
+  return 0;
+}
+
+DWORD
+WINAPI
+SedTakeOwnership(HWND hWndOwner,
+                 HINSTANCE hInstance,
+                 LPCWSTR lpMachineName,
+                 LPCWSTR lpObjectType,
+                 LPCWSTR lpObjectName,
+                 DWORD dwObjectCount,
+                 PACL_CHANGE pChangeCallback,
+                 PVOID pChangeCallbackContext,
+                 PSECURITY_DESCRIPTOR pObjectSecurity,
+                 BOOL NoReadPermission,
+                 BOOL NoOwnerChange,
+                 LPDWORD lpdwChangeContextStatus,
+                 PACL_HELP_CONTROL pHelpInfo,
+                 DWORD Reserved)
+{
+  UNIMPLEMENTED;
+  return 0;
+}
+
+DWORD
+WINAPI
+SedSystemAclEditor(HWND hWndOwner,
+                   HINSTANCE hInstance,
+                   LPCWSTR lpMachineName,
+                   PACL_DLG_CONTROL pAclDlgControl,
+                   PACL_EDIT_CONTROL pAclEditControl,
+                   LPCWSTR lpObjectName,
+                   PACL_CHANGE pChangeCallback,
+                   PVOID pChangeCallbackContext,
+                   PSECURITY_DESCRIPTOR pObjectSecurity,
+                   BOOL bNoReadPermission,
+                   LPDWORD lpdwChangeContextStatus,
+                   DWORD Reserved)
+{
+  UNIMPLEMENTED;
+  return 0;
+}
+
+/* EOF */
CVSspam 0.2.8