Mixed-tag commit in reactos on ros-branch-0_2_2 & MAIN
include/csrss/csrss.h+98-84MAIN1.42 -> 1.43
include/ddentry.h+1-1MAIN1.3 -> 1.4
include/ddk/ddrawi.h+5-3MAIN1.2 -> 1.3
           /ddrawint.h+3-3MAIN1.1 -> 1.2
include/napi/teb.h+1-1MAIN1.31 -> 1.32
include/ntos/zw.h+3-1MAIN1.21 -> 1.22
            /zwtypes.h+6-8MAIN1.32 -> 1.33
include/win32k/brush.h+7MAIN1.13 -> 1.14
              /driver.h+59-59MAIN1.15 -> 1.16
              /kapi.h+1-1MAIN1.7 -> 1.8
              /ntuser.h+4MAIN1.123 -> 1.124
              /print.h+1-1MAIN1.6 -> 1.7
              /region.h+1-1MAIN1.20 -> 1.21
lib/gdi32/main/dllmain.c+11-11MAIN1.8 -> 1.9
lib/gdi32/makefile+5-2MAIN1.36 -> 1.37
lib/gdi32/misc/heap.c+2MAIN1.1 -> 1.2
              /stubs.c+41-29MAIN1.51 -> 1.52
              /stubsa.c+3-1MAIN1.30 -> 1.31
              /stubsw.c+2-2MAIN1.27 -> 1.28
              /wingl.c+1-1MAIN1.2 -> 1.3
lib/gdi32/objects/bitblt.c+2-2MAIN1.20 -> 1.21
                 /dc.c+1-1MAIN1.28 -> 1.29
                 /font.c+14-7MAIN1.2 -> 1.3
                 /metafile.c+2MAIN1.1 -> 1.2
lib/ntdll/rtl/i386/exception.c+5-1MAIN1.6 -> 1.7
lib/user32/Makefile+4-1MAIN1.36 -> 1.37
          /user32.edf+1-1MAIN1.34 -> 1.35
lib/user32/controls/combo.c+1-1MAIN1.12 -> 1.13
                   /listbox.c+17-13MAIN1.15 -> 1.16
                   /scrollbar.c+3MAIN1.26 -> 1.27
lib/user32/include/user32.h+6MAIN1.21 -> 1.22
lib/user32/misc/dde.c+2MAIN1.8 -> 1.9
               /display.c+12-4MAIN1.8 -> 1.9
               /dllmain.c+13-10MAIN1.37 -> 1.38
               /exit.c+4-3MAIN1.3 -> 1.4
               /resources.c+2MAIN1.10 -> 1.11
               /strpool.c+2MAIN1.2 -> 1.3
               /stubs.c+5-21MAIN1.57 -> 1.58
               /winsta.c+3-3MAIN1.14 -> 1.15
               /wsprintf.c+5-4MAIN1.1 -> 1.2
lib/user32/windows/accel.c+7-5MAIN1.13 -> 1.14
                  /bitmap.c+10-8MAIN1.27 -> 1.28
                  /class.c+4-2MAIN1.45 -> 1.46
                  /cursor.c+4-1MAIN1.19 -> 1.20
                  /defwnd.c+19-11MAIN1.131 -> 1.132
                  /dialog.c+6-4MAIN1.24 -> 1.25
                  /hook.c+8-6MAIN1.14 -> 1.15
                  /icon.c+10-8MAIN1.20 -> 1.21
                  /mdi.c-4MAIN1.11 -> 1.12
                  /menu.c+7-6MAIN1.61 -> 1.62
                  /message.c+32-25MAIN1.36 -> 1.37
                  /messagebox.c+23-22MAIN1.24 -> 1.25
                  /nonclient.c+3MAIN1.49 -> 1.50
                  /paint.c+3-1MAIN1.25 -> 1.26
                  /prop.c+15-13MAIN1.11 -> 1.12
                  /text.c+3-5MAIN1.8 -> 1.9
                  /window.c+4-2MAIN1.107 -> 1.108
subsys/csrss/api/handle.c+2-3MAIN1.16 -> 1.17
                /process.c+14-20MAIN1.32 -> 1.33
                /user.c+3-7MAIN1.2 -> 1.3
                /wapi.c+3-4MAIN1.33 -> 1.34
subsys/csrss/init.c+2-2MAIN1.25 -> 1.26
            /makefile+2-2MAIN1.27 -> 1.28
            /print.c+5-6MAIN1.6 -> 1.7
            /video.c+5-2MAIN1.9 -> 1.10
subsys/csrss/win32csr/conio.c+33-36MAIN1.9 -> 1.10
                     /desktopbg.c+16-4MAIN1.6 -> 1.7
                     /guiconsole.c+7-14MAIN1.12 -> 1.13
subsys/win32k/dib/dib.h+29-29ros-branch-0_2_21.19 -> 1.19.2.1
                 /dib16bpp.c+13-13ros-branch-0_2_21.28 -> 1.28.2.1
                 /dib1bpp.c+10-10ros-branch-0_2_21.22.2.1 -> 1.22.2.2
                 /dib24bpp.c+10-10ros-branch-0_2_21.23 -> 1.23.2.1
                 /dib32bpp.c+10-10ros-branch-0_2_21.23 -> 1.23.2.1
                 /dib4bpp.c+21-31ros-branch-0_2_21.32 -> 1.32.2.1
                 /dib8bpp.c+10-10ros-branch-0_2_21.21 -> 1.21.2.1
subsys/win32k/eng/bitblt.c+24-6MAIN1.47 -> 1.48
                 /clip.c+7-7MAIN1.18 -> 1.19
                 /clip.h+1-1MAIN1.5 -> 1.6
                 /copybits.c+7-4MAIN1.22 -> 1.23
                 /event.c+4-1MAIN1.1 -> 1.2
                 /float.c+2-2MAIN1.1 -> 1.2
                 /gradient.c+8-8MAIN1.7 -> 1.8
                 /lineto.c+8-2MAIN1.31 -> 1.32
                 /misc.c+3-3MAIN1.4 -> 1.5
                 /mouse.c+13-13MAIN1.64 -> 1.65
                 /nls.c+2-2MAIN1.2 -> 1.3
                 /objects.h+3-3MAIN1.29 -> 1.30
                 /surface.c+3-3MAIN1.36 -> 1.37
                 /transblt.c+9-9MAIN1.16 -> 1.17
subsys/win32k/include/class.h+1MAIN1.20 -> 1.21
                     /color.h+3-1MAIN1.7 -> 1.8
                     /inteng.h+5-5MAIN1.12 -> 1.13
                     /intgdi.h+1-1MAIN1.9 -> 1.10
                     /palette.h+6-2MAIN1.7 -> 1.8
                     /useratom.h+1MAIN1.1 -> 1.2
subsys/win32k/ldr/loader.c+55-49MAIN1.14 -> 1.15
subsys/win32k/main/dllmain.c+24-1MAIN1.67 -> 1.68
subsys/win32k/makefile+4-6MAIN1.96 -> 1.97
subsys/win32k/misc/driver.c+2-1MAIN1.37 -> 1.38
subsys/win32k/ntuser/class.c+7-1MAIN1.50 -> 1.51
                    /desktop.c+10-12MAIN1.9 -> 1.10
                    /misc.c+3-3MAIN1.58 -> 1.59
                    /msgqueue.c+3-2MAIN1.81 -> 1.82
                    /painting.c+4-2MAIN1.79 -> 1.80
                    /scrollbar.c+4-1MAIN1.28 -> 1.29
                    /timer.c+16-8MAIN1.29 -> 1.30
                    /windc.c+23-2MAIN1.64 -> 1.65
                    /window.c+1-20MAIN1.209 -> 1.210
                    /winpos.c+2-2MAIN1.108 -> 1.109
                    /winsta.c+4-5MAIN1.56 -> 1.57
subsys/win32k/objects/bitmaps.c+24-24MAIN1.68 -> 1.69
                     /brush.c+3-3MAIN1.33 -> 1.34
                     /cliprgn.c+2-2MAIN1.30 -> 1.31
                     /color.c+18-12MAIN1.35 -> 1.36
                     /cursoricon.c+9-9MAIN1.52 -> 1.53
                     /dc.c+15-17MAIN1.127 -> 1.128
                     /dib.c+13-13MAIN1.44 -> 1.45
                     /fillshap.c+10-10MAIN1.46 -> 1.47
                     /gdiobj.c+2-2MAIN1.65 -> 1.66
                     /line.c+3-3MAIN1.28 -> 1.29
                     /objconv.c+2-2MAIN1.16 -> 1.17
                     /palette.c+14-4MAIN1.16 -> 1.17
                     /polyfill.c+10-10MAIN1.12 -> 1.13
                     /print.c+9-9MAIN1.15 -> 1.16
                     /region.c+20-20MAIN1.47 -> 1.48
                     /text.c+14-14MAIN1.88 -> 1.89
subsys/win32k/stubs/stubs.c+9-9MAIN1.28 -> 1.29
w32api/include/ddk/prntfont.h+291MAINadded 1.1
                  /ntapi.h+2-3MAIN1.2 -> 1.3
                  /ntifs.h+2-2MAIN1.1 -> 1.2
                  /winddi.h+24-12MAIN1.1 -> 1.2
                  /winddk.h+4MAIN1.6 -> 1.7
w32api/include/winbase.h+1-1MAIN1.2 -> 1.3
              /wingdi.h+46-7MAIN1.1 -> 1.2
              /winuser.h+64-5MAIN1.3 -> 1.4
+1596-998
1 added + 134 modified, total 135 files
- Compile Win32k, GDI, USER32 and CSRSS using W32API.

reactos/include/csrss
csrss.h 1.42 -> 1.43
diff -u -r1.42 -r1.43
--- csrss.h	14 Mar 2004 17:53:26 -0000	1.42
+++ csrss.h	9 Apr 2004 20:03:08 -0000	1.43
@@ -3,7 +3,7 @@
 
 #include <windows.h>
 #include <ddk/ntddblue.h>
-#include <ntos/keyboard.h>
+#include <ntos.h>
 
 #define CSR_PRIORITY_CLASS_NORMAL	(0x10)
 #define CSR_PRIORITY_CLASS_IDLE		(0x20)
@@ -535,7 +535,7 @@
 #define CSRSS_MAX_WRITE_CONSOLE_REQUEST       \
       (MAX_MESSAGE_DATA - sizeof(ULONG) - sizeof(CSRSS_WRITE_CONSOLE_REQUEST))
 
-#define CSRSS_MAX_SET_TITLE_REQUEST           (MAX_MESSAGE_DATA - sizeof( HANDLE ) - sizeof( DWORD ) - sizeof( ULONG ) - sizeof( LPC_MESSAGE ))
+#define CSRSS_MAX_SET_TITLE_REQUEST           (MAX_MESSAGE_DATA - sizeof( HANDLE ) - sizeof( DWORD ) - sizeof( ULONG ) - LPC_MESSAGE_BASE_SIZE)
 
 #define CSRSS_MAX_WRITE_CONSOLE_OUTPUT_CHAR   (MAX_MESSAGE_DATA - sizeof( ULONG ) - sizeof( CSRSS_WRITE_CONSOLE_OUTPUT_CHAR_REQUEST ))
 
@@ -599,99 +599,113 @@
 #define CSRSS_SET_CONSOLE_ICON              (0x2E)
 
 /* Keep in sync with definition below. */
-#define CSRSS_REQUEST_HEADER_SIZE (sizeof(LPC_MESSAGE) + sizeof(ULONG))
+#define CSRSS_REQUEST_HEADER_SIZE (LPC_MESSAGE_BASE_SIZE + sizeof(ULONG))
 
 typedef struct
 {
-  LPC_MESSAGE Header;
-  ULONG Type;
   union
   {
-    CSRSS_CREATE_PROCESS_REQUEST CreateProcessRequest;
-    CSRSS_CONNECT_PROCESS_REQUEST ConnectRequest;
-    CSRSS_WRITE_CONSOLE_REQUEST WriteConsoleRequest;
-    CSRSS_READ_CONSOLE_REQUEST ReadConsoleRequest;
-    CSRSS_ALLOC_CONSOLE_REQUEST AllocConsoleRequest;
-    CSRSS_SCREEN_BUFFER_INFO_REQUEST ScreenBufferInfoRequest;
-    CSRSS_SET_CURSOR_REQUEST SetCursorRequest;
-    CSRSS_FILL_OUTPUT_REQUEST FillOutputRequest;
-    CSRSS_READ_INPUT_REQUEST ReadInputRequest;
-    CSRSS_WRITE_CONSOLE_OUTPUT_CHAR_REQUEST WriteConsoleOutputCharRequest;
-    CSRSS_WRITE_CONSOLE_OUTPUT_ATTRIB_REQUEST WriteConsoleOutputAttribRequest;
-    CSRSS_FILL_OUTPUT_ATTRIB_REQUEST FillOutputAttribRequest;
-    CSRSS_SET_CURSOR_INFO_REQUEST SetCursorInfoRequest;
-    CSRSS_GET_CURSOR_INFO_REQUEST GetCursorInfoRequest;
-    CSRSS_SET_ATTRIB_REQUEST SetAttribRequest;
-    CSRSS_SET_CONSOLE_MODE_REQUEST SetConsoleModeRequest;
-    CSRSS_GET_CONSOLE_MODE_REQUEST GetConsoleModeRequest;
-    CSRSS_CREATE_SCREEN_BUFFER_REQUEST CreateScreenBufferRequest;
-    CSRSS_SET_SCREEN_BUFFER_REQUEST SetScreenBufferRequest;
-    CSRSS_SET_TITLE_REQUEST SetTitleRequest;
-    CSRSS_GET_TITLE_REQUEST GetTitleRequest;
-    CSRSS_WRITE_CONSOLE_OUTPUT_REQUEST WriteConsoleOutputRequest;
-    CSRSS_FLUSH_INPUT_BUFFER_REQUEST FlushInputBufferRequest;
-    CSRSS_SCROLL_CONSOLE_SCREEN_BUFFER_REQUEST 
-    ScrollConsoleScreenBufferRequest;
-    CSRSS_READ_CONSOLE_OUTPUT_CHAR_REQUEST ReadConsoleOutputCharRequest;
-    CSRSS_READ_CONSOLE_OUTPUT_ATTRIB_REQUEST ReadConsoleOutputAttribRequest;
-    CSRSS_GET_NUM_INPUT_EVENTS_REQUEST GetNumInputEventsRequest;
-    CSRSS_REGISTER_SERVICES_PROCESS_REQUEST RegisterServicesProcessRequest;
-    CSRSS_EXIT_REACTOS_REQUEST ExitReactosRequest;
-    CSRSS_SET_SHUTDOWN_PARAMETERS_REQUEST SetShutdownParametersRequest;
-    CSRSS_GET_SHUTDOWN_PARAMETERS_REQUEST GetShutdownParametersRequest;
-    CSRSS_PEEK_CONSOLE_INPUT_REQUEST PeekConsoleInputRequest;
-    CSRSS_READ_CONSOLE_OUTPUT_REQUEST ReadConsoleOutputRequest;
-    CSRSS_WRITE_CONSOLE_INPUT_REQUEST WriteConsoleInputRequest;
-    CSRSS_CLOSE_HANDLE_REQUEST CloseHandleRequest;
-    CSRSS_VERIFY_HANDLE_REQUEST VerifyHandleRequest;
-    CSRSS_DUPLICATE_HANDLE_REQUEST DuplicateHandleRequest;
-    CSRSS_SETGET_CONSOLE_HW_STATE_REQUEST ConsoleHardwareStateRequest;
-    CSRSS_CONSOLE_WINDOW ConsoleWindowRequest;
-    CSRSS_CREATE_DESKTOP_REQUEST CreateDesktopRequest;
-    CSRSS_SHOW_DESKTOP_REQUEST ShowDesktopRequest;
-    CSRSS_HIDE_DESKTOP_REQUEST HideDesktopRequest;
-    CSRSS_CONSOLE_SET_WINDOW_ICON ConsoleSetWindowIconRequest;
-  } Data;
+    LPC_MESSAGE Header;
+    struct
+    {
+      BYTE HeaderReserved[LPC_MESSAGE_BASE_SIZE];
+      ULONG Type;
+      union
+      {
+        CSRSS_CREATE_PROCESS_REQUEST CreateProcessRequest;
+        CSRSS_CONNECT_PROCESS_REQUEST ConnectRequest;
+        CSRSS_WRITE_CONSOLE_REQUEST WriteConsoleRequest;
+        CSRSS_READ_CONSOLE_REQUEST ReadConsoleRequest;
+        CSRSS_ALLOC_CONSOLE_REQUEST AllocConsoleRequest;
+        CSRSS_SCREEN_BUFFER_INFO_REQUEST ScreenBufferInfoRequest;
+        CSRSS_SET_CURSOR_REQUEST SetCursorRequest;
+        CSRSS_FILL_OUTPUT_REQUEST FillOutputRequest;
+        CSRSS_READ_INPUT_REQUEST ReadInputRequest;
+        CSRSS_WRITE_CONSOLE_OUTPUT_CHAR_REQUEST WriteConsoleOutputCharRequest;
+        CSRSS_WRITE_CONSOLE_OUTPUT_ATTRIB_REQUEST WriteConsoleOutputAttribRequest;
+        CSRSS_FILL_OUTPUT_ATTRIB_REQUEST FillOutputAttribRequest;
+        CSRSS_SET_CURSOR_INFO_REQUEST SetCursorInfoRequest;
+        CSRSS_GET_CURSOR_INFO_REQUEST GetCursorInfoRequest;
+        CSRSS_SET_ATTRIB_REQUEST SetAttribRequest;
+        CSRSS_SET_CONSOLE_MODE_REQUEST SetConsoleModeRequest;
+        CSRSS_GET_CONSOLE_MODE_REQUEST GetConsoleModeRequest;
+        CSRSS_CREATE_SCREEN_BUFFER_REQUEST CreateScreenBufferRequest;
+        CSRSS_SET_SCREEN_BUFFER_REQUEST SetScreenBufferRequest;
+        CSRSS_SET_TITLE_REQUEST SetTitleRequest;
+        CSRSS_GET_TITLE_REQUEST GetTitleRequest;
+        CSRSS_WRITE_CONSOLE_OUTPUT_REQUEST WriteConsoleOutputRequest;
+        CSRSS_FLUSH_INPUT_BUFFER_REQUEST FlushInputBufferRequest;
+        CSRSS_SCROLL_CONSOLE_SCREEN_BUFFER_REQUEST 
+        ScrollConsoleScreenBufferRequest;
+        CSRSS_READ_CONSOLE_OUTPUT_CHAR_REQUEST ReadConsoleOutputCharRequest;
+        CSRSS_READ_CONSOLE_OUTPUT_ATTRIB_REQUEST ReadConsoleOutputAttribRequest;
+        CSRSS_GET_NUM_INPUT_EVENTS_REQUEST GetNumInputEventsRequest;
+        CSRSS_REGISTER_SERVICES_PROCESS_REQUEST RegisterServicesProcessRequest;
+        CSRSS_EXIT_REACTOS_REQUEST ExitReactosRequest;
+        CSRSS_SET_SHUTDOWN_PARAMETERS_REQUEST SetShutdownParametersRequest;
+        CSRSS_GET_SHUTDOWN_PARAMETERS_REQUEST GetShutdownParametersRequest;
+        CSRSS_PEEK_CONSOLE_INPUT_REQUEST PeekConsoleInputRequest;
+        CSRSS_READ_CONSOLE_OUTPUT_REQUEST ReadConsoleOutputRequest;
+        CSRSS_WRITE_CONSOLE_INPUT_REQUEST WriteConsoleInputRequest;
+        CSRSS_CLOSE_HANDLE_REQUEST CloseHandleRequest;
+        CSRSS_VERIFY_HANDLE_REQUEST VerifyHandleRequest;
+        CSRSS_DUPLICATE_HANDLE_REQUEST DuplicateHandleRequest;
+        CSRSS_SETGET_CONSOLE_HW_STATE_REQUEST ConsoleHardwareStateRequest;
+        CSRSS_CONSOLE_WINDOW ConsoleWindowRequest;
+        CSRSS_CREATE_DESKTOP_REQUEST CreateDesktopRequest;
+        CSRSS_SHOW_DESKTOP_REQUEST ShowDesktopRequest;
+        CSRSS_HIDE_DESKTOP_REQUEST HideDesktopRequest;
+        CSRSS_CONSOLE_SET_WINDOW_ICON ConsoleSetWindowIconRequest;
+      } Data;
+    };
+  };
 } CSRSS_API_REQUEST, *PCSRSS_API_REQUEST;
 
 typedef struct
 {
-  LPC_MESSAGE Header;
-  NTSTATUS Status;
   union
   {
-    CSRSS_CREATE_PROCESS_REPLY CreateProcessReply;
-    CSRSS_CONNECT_PROCESS_REPLY ConnectReply;
-    CSRSS_WRITE_CONSOLE_REPLY WriteConsoleReply;
-    CSRSS_READ_CONSOLE_REPLY ReadConsoleReply;
-    CSRSS_ALLOC_CONSOLE_REPLY AllocConsoleReply;
-    CSRSS_SCREEN_BUFFER_INFO_REPLY ScreenBufferInfoReply;
-    CSRSS_READ_INPUT_REPLY ReadInputReply;
-    CSRSS_WRITE_CONSOLE_OUTPUT_CHAR_REPLY WriteConsoleOutputCharReply;
-    CSRSS_WRITE_CONSOLE_OUTPUT_ATTRIB_REPLY WriteConsoleOutputAttribReply;
-    CSRSS_GET_CURSOR_INFO_REPLY GetCursorInfoReply;
-    CSRSS_GET_CONSOLE_MODE_REPLY GetConsoleModeReply;
-    CSRSS_CREATE_SCREEN_BUFFER_REPLY CreateScreenBufferReply;
-    CSRSS_GET_TITLE_REPLY GetTitleReply;
-    CSRSS_WRITE_CONSOLE_OUTPUT_REPLY WriteConsoleOutputReply;
-    CSRSS_READ_CONSOLE_OUTPUT_CHAR_REPLY ReadConsoleOutputCharReply;
-    CSRSS_READ_CONSOLE_OUTPUT_ATTRIB_REPLY ReadConsoleOutputAttribReply;
-    CSRSS_GET_NUM_INPUT_EVENTS_REPLY GetNumInputEventsReply;
-    CSRSS_SET_SHUTDOWN_PARAMETERS_REPLY SetShutdownParametersReply;
-    CSRSS_GET_SHUTDOWN_PARAMETERS_REPLY GetShutdownParametersReply;
-    CSRSS_PEEK_CONSOLE_INPUT_REPLY PeekConsoleInputReply;
-    CSRSS_READ_CONSOLE_OUTPUT_REPLY ReadConsoleOutputReply;
-    CSRSS_WRITE_CONSOLE_INPUT_REPLY WriteConsoleInputReply;
-    CSRSS_GET_INPUT_HANDLE_REPLY GetInputHandleReply;
-    CSRSS_GET_OUTPUT_HANDLE_REPLY GetOutputHandleReply;
-    CSRSS_DUPLICATE_HANDLE_REPLY DuplicateHandleReply;
-    CSRSS_SETGET_CONSOLE_HW_STATE_REPLY ConsoleHardwareStateReply;
-    CSRSS_CONSOLE_WINDOW ConsoleWindowReply;
-    CSRSS_CREATE_DESKTOP_REPLY CreateDesktopReply;
-    CSRSS_SHOW_DESKTOP_REPLY ShowDesktopReply;
-    CSRSS_HIDE_DESKTOP_REPLY HideDesktopReply;
-    CSRSS_CONSOLE_SET_WINDOW_ICON ConsoleSetWindowIconReply;
-  } Data;
+    LPC_MESSAGE Header;
+    struct
+    {
+      BYTE HeaderReserved[LPC_MESSAGE_BASE_SIZE];
+      NTSTATUS Status;
+      union
+      {
+        CSRSS_CREATE_PROCESS_REPLY CreateProcessReply;
+        CSRSS_CONNECT_PROCESS_REPLY ConnectReply;
+        CSRSS_WRITE_CONSOLE_REPLY WriteConsoleReply;
+        CSRSS_READ_CONSOLE_REPLY ReadConsoleReply;
+        CSRSS_ALLOC_CONSOLE_REPLY AllocConsoleReply;
+        CSRSS_SCREEN_BUFFER_INFO_REPLY ScreenBufferInfoReply;
+        CSRSS_READ_INPUT_REPLY ReadInputReply;
+        CSRSS_WRITE_CONSOLE_OUTPUT_CHAR_REPLY WriteConsoleOutputCharReply;
+        CSRSS_WRITE_CONSOLE_OUTPUT_ATTRIB_REPLY WriteConsoleOutputAttribReply;
+        CSRSS_GET_CURSOR_INFO_REPLY GetCursorInfoReply;
+        CSRSS_GET_CONSOLE_MODE_REPLY GetConsoleModeReply;
+        CSRSS_CREATE_SCREEN_BUFFER_REPLY CreateScreenBufferReply;
+        CSRSS_GET_TITLE_REPLY GetTitleReply;
+        CSRSS_WRITE_CONSOLE_OUTPUT_REPLY WriteConsoleOutputReply;
+        CSRSS_READ_CONSOLE_OUTPUT_CHAR_REPLY ReadConsoleOutputCharReply;
+        CSRSS_READ_CONSOLE_OUTPUT_ATTRIB_REPLY ReadConsoleOutputAttribReply;
+        CSRSS_GET_NUM_INPUT_EVENTS_REPLY GetNumInputEventsReply;
+        CSRSS_SET_SHUTDOWN_PARAMETERS_REPLY SetShutdownParametersReply;
+        CSRSS_GET_SHUTDOWN_PARAMETERS_REPLY GetShutdownParametersReply;
+        CSRSS_PEEK_CONSOLE_INPUT_REPLY PeekConsoleInputReply;
+        CSRSS_READ_CONSOLE_OUTPUT_REPLY ReadConsoleOutputReply;
+        CSRSS_WRITE_CONSOLE_INPUT_REPLY WriteConsoleInputReply;
+        CSRSS_GET_INPUT_HANDLE_REPLY GetInputHandleReply;
+        CSRSS_GET_OUTPUT_HANDLE_REPLY GetOutputHandleReply;
+        CSRSS_DUPLICATE_HANDLE_REPLY DuplicateHandleReply;
+        CSRSS_SETGET_CONSOLE_HW_STATE_REPLY ConsoleHardwareStateReply;
+        CSRSS_CONSOLE_WINDOW ConsoleWindowReply;
+        CSRSS_CREATE_DESKTOP_REPLY CreateDesktopReply;
+        CSRSS_SHOW_DESKTOP_REPLY ShowDesktopReply;
+        CSRSS_HIDE_DESKTOP_REPLY HideDesktopReply;
+        CSRSS_CONSOLE_SET_WINDOW_ICON ConsoleSetWindowIconReply;
+      } Data;
+    };
+  };
 } CSRSS_API_REPLY, *PCSRSS_API_REPLY;
 
 #endif /* __INCLUDE_CSRSS_CSRSS_H */

reactos/include
ddentry.h 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- ddentry.h	28 Oct 2003 19:30:08 -0000	1.3
+++ ddentry.h	9 Apr 2004 20:03:10 -0000	1.4
@@ -16,9 +16,9 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-#include <ddk/winddi.h>
 #include <ddk/ddrawi.h>
 #include <ddk/d3dhal.h>
+#include <ddk/winddi.h>
 BOOL STDCALL DdCreateDirectDrawObject( 
 LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
 HDC hdc

reactos/include/ddk
ddrawi.h 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- ddrawi.h	28 Oct 2003 19:30:08 -0000	1.2
+++ ddrawi.h	9 Apr 2004 20:03:10 -0000	1.3
@@ -19,8 +19,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#ifndef __WINE_DDRAWI_H
-#define __WINE_DDRAWI_H
+#ifndef __DDRAWI_INCLUDED__
+#define __DDRAWI_INCLUDED__
 
 #ifdef __cplusplus
 extern "C" {
@@ -616,7 +616,9 @@
 /*****************************************************************************
  * high-level ddraw implementation structures
  */
+#ifndef __USE_W32API
 typedef DWORD IUnknown; /* FIXME: implement proper definition */
+#endif
 typedef struct _IUNKNOWN_LIST {
     struct _IUNKNOWN_LIST *	lpLink;
     LPGUID			lpGuid;
@@ -1326,4 +1328,4 @@
 } /* extern "C" */
 #endif
 
-#endif /* __WINE_DDRAWI_H */
+#endif /* __DDRAWI_INCLUDED__ */

reactos/include/ddk
ddrawint.h 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- ddrawint.h	28 Oct 2003 19:30:08 -0000	1.1
+++ ddrawint.h	9 Apr 2004 20:03:10 -0000	1.2
@@ -2,8 +2,8 @@
  * DirectDraw NT driver interface
  */
 
-#ifndef __DDK_DDRAWINT_H
-#define __DDK_DDRAWINT_H
+#ifndef __DD_INCLUDED__
+#define __DD_INCLUDED__
 
 #include <ddraw.h>
 #include <ole32/guiddef.h>
@@ -1233,4 +1233,4 @@
 } /* extern "C" */
 #endif
 
-#endif /* __DDK_DDRAWINT_H */
+#endif /* __DD_INCLUDED__ */

reactos/include/napi
teb.h 1.31 -> 1.32
diff -u -r1.31 -r1.32
--- teb.h	7 Mar 2004 20:07:05 -0000	1.31
+++ teb.h	9 Apr 2004 20:03:10 -0000	1.32
@@ -98,7 +98,7 @@
    LIST_ENTRY InInitializationOrderModuleList;
 } PEB_LDR_DATA, *PPEB_LDR_DATA;
 
-typedef VOID STDCALL_FUNC (*PPEBLOCKROUTINE)(PVOID);
+typedef VOID (STDCALL *PPEBLOCKROUTINE)(PVOID);
 
 typedef struct _PEB
 {

reactos/include/ntos
zw.h 1.21 -> 1.22
diff -u -r1.21 -r1.22
--- zw.h	6 Jan 2004 15:57:48 -0000	1.21
+++ zw.h	9 Apr 2004 20:03:11 -0000	1.22
@@ -1,5 +1,5 @@
 
-/* $Id: zw.h,v 1.21 2004/01/06 15:57:48 ekohl Exp $
+/* $Id: zw.h,v 1.22 2004/04/09 20:03:11 navaraf Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -4446,10 +4446,12 @@
 
 /* --- POWER MANAGEMENT --- */
 
+#ifndef __USE_W32API
 NTSTATUS STDCALL 
 NtSetSystemPowerState(IN POWER_ACTION SystemAction,
 		      IN SYSTEM_POWER_STATE MinSystemState,
 		      IN ULONG Flags);
+#endif
 
 /* --- DEBUG SUBSYSTEM --- */
 

reactos/include/ntos
zwtypes.h 1.32 -> 1.33
diff -u -r1.32 -r1.33
--- zwtypes.h	21 Feb 2004 09:20:33 -0000	1.32
+++ zwtypes.h	9 Apr 2004 20:03:11 -0000	1.33
@@ -1706,6 +1706,12 @@
    ULONG SectionSize; /* CallbackID */
 } LPC_MESSAGE, *PLPC_MESSAGE;
 
+#define PORT_MESSAGE_TYPE(m) (LPC_TYPE)((m).Header.MessageType)
+
+#define PORT_MAX_DATA_LENGTH    0x104
+#define PORT_MAX_MESSAGE_LENGTH 0x148
+
+#endif /* __USE_W32API */
 
 #define MAX_MESSAGE_DATA   (0x130)
 
@@ -1715,14 +1721,6 @@
    BYTE Data[MAX_MESSAGE_DATA];
 } LPC_MAX_MESSAGE, *PLPC_MAX_MESSAGE;
 
-
-#define PORT_MESSAGE_TYPE(m) (LPC_TYPE)((m).Header.MessageType)
-
-#define PORT_MAX_DATA_LENGTH    0x104
-#define PORT_MAX_MESSAGE_LENGTH 0x148
-
-#endif /* __USE_W32API */
-
 typedef struct _LPC_PORT_BASIC_INFORMATION
 {
 	DWORD	Unknown0;

reactos/include/win32k
brush.h 1.13 -> 1.14
diff -u -r1.13 -r1.14
--- brush.h	5 Apr 2004 21:26:24 -0000	1.13
+++ brush.h	9 Apr 2004 20:03:11 -0000	1.14
@@ -71,6 +71,13 @@
 #define  BRUSHOBJ_LockBrush(hBrush) ((PGDIBRUSHOBJ)GDIOBJ_LockObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH))
 #define  BRUSHOBJ_UnlockBrush(hBrush) GDIOBJ_UnlockObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH)
 
+#ifdef __USE_W32API
+typedef struct _PATRECT {
+	RECT r;
+	HBRUSH hBrush;
+} PATRECT, * PPATRECT;
+#endif
+
 HBRUSH STDCALL
 NtGdiCreateBrushIndirect(
    CONST LOGBRUSH *LogBrush);

reactos/include/win32k
driver.h 1.15 -> 1.16
diff -u -r1.15 -r1.16
--- driver.h	6 Mar 2004 01:22:03 -0000	1.15
+++ driver.h	9 Apr 2004 20:03:11 -0000	1.16
@@ -4,8 +4,8 @@
 
 #include <ddk/winddi.h>
 
-typedef BOOL STDCALL_FUNC (*PGD_ENABLEDRIVER)(ULONG, ULONG, PDRVENABLEDATA);
-typedef DHPDEV STDCALL_FUNC (*PGD_ENABLEPDEV)(DEVMODEW  *,
+typedef BOOL (STDCALL *PGD_ENABLEDRIVER)(ULONG, ULONG, PDRVENABLEDATA);
+typedef DHPDEV (STDCALL *PGD_ENABLEPDEV)(DEVMODEW  *,
                                  LPWSTR,
                                  ULONG,
                                  HSURF  *,
@@ -16,86 +16,86 @@
                                  LPWSTR,
                                  LPWSTR,
                                  HANDLE);
-typedef VOID STDCALL_FUNC (*PGD_COMPLETEPDEV)(DHPDEV, HDEV);
-typedef VOID STDCALL_FUNC (*PGD_DISABLEPDEV)(DHPDEV); 
-typedef HSURF STDCALL_FUNC (*PGD_ENABLESURFACE)(DHPDEV);
-typedef VOID STDCALL_FUNC (*PGD_DISABLESURFACE)(DHPDEV);
-typedef BOOL STDCALL_FUNC (*PGD_ASSERTMODE)(DHPDEV, BOOL);
-typedef BOOL STDCALL_FUNC (*PGD_RESETPDEV)(DHPDEV, DHPDEV);
-typedef HBITMAP STDCALL_FUNC (*PGD_CREATEDEVICEBITMAP)(DHPDEV, SIZEL, ULONG); 
-typedef VOID STDCALL_FUNC (*PGD_DELETEDEVICEBITMAP)(DHSURF); 
-typedef BOOL STDCALL_FUNC (*PGD_REALIZEBRUSH)(BRUSHOBJ*, SURFOBJ*, SURFOBJ*, SURFOBJ*,
+typedef VOID (STDCALL *PGD_COMPLETEPDEV)(DHPDEV, HDEV);
+typedef VOID (STDCALL *PGD_DISABLEPDEV)(DHPDEV); 
+typedef HSURF (STDCALL *PGD_ENABLESURFACE)(DHPDEV);
+typedef VOID (STDCALL *PGD_DISABLESURFACE)(DHPDEV);
+typedef BOOL (STDCALL *PGD_ASSERTMODE)(DHPDEV, BOOL);
+typedef BOOL (STDCALL *PGD_RESETPDEV)(DHPDEV, DHPDEV);
+typedef HBITMAP (STDCALL *PGD_CREATEDEVICEBITMAP)(DHPDEV, SIZEL, ULONG); 
+typedef VOID (STDCALL *PGD_DELETEDEVICEBITMAP)(DHSURF); 
+typedef BOOL (STDCALL *PGD_REALIZEBRUSH)(BRUSHOBJ*, SURFOBJ*, SURFOBJ*, SURFOBJ*,
                                  XLATEOBJ*, ULONG); 
-typedef ULONG STDCALL_FUNC (*PGD_DITHERCOLOR)(DHPDEV, ULONG, ULONG, PULONG); 
-typedef BOOL STDCALL_FUNC (*PGD_STROKEPATH)(SURFOBJ*, PATHOBJ*, CLIPOBJ*, XFORMOBJ*,
+typedef ULONG (STDCALL *PGD_DITHERCOLOR)(DHPDEV, ULONG, ULONG, PULONG); 
+typedef BOOL (STDCALL *PGD_STROKEPATH)(SURFOBJ*, PATHOBJ*, CLIPOBJ*, XFORMOBJ*,
                                BRUSHOBJ*, POINTL*, PLINEATTRS, MIX); 
-typedef BOOL STDCALL_FUNC (*PGD_FILLPATH)(SURFOBJ*, PATHOBJ*, CLIPOBJ*, BRUSHOBJ*,
+typedef BOOL (STDCALL *PGD_FILLPATH)(SURFOBJ*, PATHOBJ*, CLIPOBJ*, BRUSHOBJ*,
                              POINTL*, MIX, ULONG); 
-typedef BOOL STDCALL_FUNC (*PGD_STROKEANDFILLPATH)(SURFOBJ*, PATHOBJ*, CLIPOBJ*,
+typedef BOOL (STDCALL *PGD_STROKEANDFILLPATH)(SURFOBJ*, PATHOBJ*, CLIPOBJ*,
                                       XFORMOBJ*, BRUSHOBJ*, PLINEATTRS,
                                       BRUSHOBJ*, POINTL*, MIX, ULONG); 
-typedef BOOL STDCALL_FUNC (*PGD_PAINT)(SURFOBJ*, CLIPOBJ*, BRUSHOBJ*, POINTL*, MIX); 
-typedef BOOL STDCALL_FUNC (*PGD_BITBLT)(SURFOBJ*, SURFOBJ*, SURFOBJ*, CLIPOBJ*,
+typedef BOOL (STDCALL *PGD_PAINT)(SURFOBJ*, CLIPOBJ*, BRUSHOBJ*, POINTL*, MIX); 
+typedef BOOL (STDCALL *PGD_BITBLT)(SURFOBJ*, SURFOBJ*, SURFOBJ*, CLIPOBJ*,
                            XLATEOBJ*, RECTL*, POINTL*, POINTL*, BRUSHOBJ*,
                            POINTL*, ROP4); 
-typedef BOOL STDCALL_FUNC (*PGD_TRANSPARENTBLT)(SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*, RECTL*, RECTL*, ULONG, ULONG);
-typedef BOOL STDCALL_FUNC (*PGD_COPYBITS)(SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*,
+typedef BOOL (STDCALL *PGD_TRANSPARENTBLT)(SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*, RECTL*, RECTL*, ULONG, ULONG);
+typedef BOOL (STDCALL *PGD_COPYBITS)(SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*,
                              RECTL*, POINTL*); 
-typedef BOOL STDCALL_FUNC (*PGD_STRETCHBLT)(SURFOBJ*, SURFOBJ*, SURFOBJ*, CLIPOBJ*,
+typedef BOOL (STDCALL *PGD_STRETCHBLT)(SURFOBJ*, SURFOBJ*, SURFOBJ*, CLIPOBJ*,
                                XLATEOBJ*, COLORADJUSTMENT*, POINTL*,
                                RECTL*, RECTL*, POINTL*, ULONG); 
-typedef BOOL STDCALL_FUNC (*PGD_SETPALETTE)(DHPDEV, PALOBJ*, ULONG, ULONG, ULONG); 
-typedef BOOL STDCALL_FUNC (*PGD_TEXTOUT)(SURFOBJ*, STROBJ*, FONTOBJ*, CLIPOBJ*, RECTL*,
+typedef BOOL (STDCALL *PGD_SETPALETTE)(DHPDEV, PALOBJ*, ULONG, ULONG, ULONG); 
+typedef BOOL (STDCALL *PGD_TEXTOUT)(SURFOBJ*, STROBJ*, FONTOBJ*, CLIPOBJ*, RECTL*,
                             RECTL*, BRUSHOBJ*, BRUSHOBJ*, POINTL*, MIX); 
-typedef ULONG STDCALL_FUNC (*PGD_ESCAPE)(SURFOBJ*, ULONG, ULONG, PVOID *, ULONG, PVOID *); 
-typedef ULONG STDCALL_FUNC (*PGD_DRAWESCAPE)(SURFOBJ*, ULONG, CLIPOBJ*, RECTL*, ULONG, 
+typedef ULONG (STDCALL *PGD_ESCAPE)(SURFOBJ*, ULONG, ULONG, PVOID *, ULONG, PVOID *); 
+typedef ULONG (STDCALL *PGD_DRAWESCAPE)(SURFOBJ*, ULONG, CLIPOBJ*, RECTL*, ULONG, 
                                 PVOID *); 
-typedef PIFIMETRICS STDCALL_FUNC (*PGD_QUERYFONT)(DHPDEV, ULONG, ULONG, PULONG); 
-typedef PVOID STDCALL_FUNC (*PGD_QUERYFONTTREE)(DHPDEV, ULONG, ULONG, ULONG, PULONG); 
-typedef LONG STDCALL_FUNC (*PGD_QUERYFONTDATA)(DHPDEV, FONTOBJ*, ULONG, HGLYPH, GLYPHDATA*,
+typedef PIFIMETRICS (STDCALL *PGD_QUERYFONT)(DHPDEV, ULONG, ULONG, PULONG); 
+typedef PVOID (STDCALL *PGD_QUERYFONTTREE)(DHPDEV, ULONG, ULONG, ULONG, PULONG); 
+typedef LONG (STDCALL *PGD_QUERYFONTDATA)(DHPDEV, FONTOBJ*, ULONG, HGLYPH, GLYPHDATA*,
                                   PVOID, ULONG); 
-typedef ULONG STDCALL_FUNC (*PGD_SETPOINTERSHAPE)(SURFOBJ*, SURFOBJ*, SURFOBJ*, XLATEOBJ*,
+typedef ULONG (STDCALL *PGD_SETPOINTERSHAPE)(SURFOBJ*, SURFOBJ*, SURFOBJ*, XLATEOBJ*,
                                      LONG, LONG, LONG, LONG, RECTL*, ULONG); 
-typedef VOID STDCALL_FUNC (*PGD_MOVEPOINTER)(SURFOBJ*, LONG, LONG, RECTL*); 
-typedef BOOL STDCALL_FUNC (*PGD_LINETO)(SURFOBJ*, CLIPOBJ*, BRUSHOBJ*, LONG, LONG, LONG,
+typedef VOID (STDCALL *PGD_MOVEPOINTER)(SURFOBJ*, LONG, LONG, RECTL*); 
+typedef BOOL (STDCALL *PGD_LINETO)(SURFOBJ*, CLIPOBJ*, BRUSHOBJ*, LONG, LONG, LONG,
                            LONG, RECTL*, MIX);
-typedef BOOL STDCALL_FUNC (*PGD_SENDPAGE)(SURFOBJ*);
-typedef BOOL STDCALL_FUNC (*PGD_STARTPAGE)(SURFOBJ*);
-typedef BOOL STDCALL_FUNC (*PGD_ENDDOC)(SURFOBJ*, ULONG);
-typedef BOOL STDCALL_FUNC (*PGD_STARTDOC)(SURFOBJ*, PWSTR, DWORD);
-typedef ULONG STDCALL_FUNC (*PGD_GETGLYPHMODE)(DHPDEV, FONTOBJ*);
-typedef VOID STDCALL_FUNC (*PGD_SYNCHRONIZE)(DHPDEV, RECTL*);
-typedef ULONG STDCALL_FUNC (*PGD_SAVESCREENBITS)(SURFOBJ*, ULONG, ULONG, RECTL*);
-typedef ULONG STDCALL_FUNC (*PGD_GETMODES)(HANDLE, ULONG, PDEVMODEW);
-typedef VOID STDCALL_FUNC (*PGD_FREE)(PVOID, ULONG);
-typedef VOID STDCALL_FUNC (*PGD_DESTROYFONT)(FONTOBJ*);
-typedef LONG STDCALL_FUNC (*PGD_QUERYFONTCAPS)(ULONG, PULONG);
-typedef ULONG STDCALL_FUNC (*PGD_LOADFONTFILE)(ULONG, PVOID, ULONG, ULONG);
-typedef BOOL STDCALL_FUNC (*PGD_UNLOADFONTFILE)(ULONG);
-typedef ULONG STDCALL_FUNC (*PGD_FONTMANAGEMENT)(SURFOBJ*, FONTOBJ*, ULONG, ULONG, PVOID,
+typedef BOOL (STDCALL *PGD_SENDPAGE)(SURFOBJ*);
+typedef BOOL (STDCALL *PGD_STARTPAGE)(SURFOBJ*);
+typedef BOOL (STDCALL *PGD_ENDDOC)(SURFOBJ*, ULONG);
+typedef BOOL (STDCALL *PGD_STARTDOC)(SURFOBJ*, PWSTR, DWORD);
+typedef ULONG (STDCALL *PGD_GETGLYPHMODE)(DHPDEV, FONTOBJ*);
+typedef VOID (STDCALL *PGD_SYNCHRONIZE)(DHPDEV, RECTL*);
+typedef ULONG (STDCALL *PGD_SAVESCREENBITS)(SURFOBJ*, ULONG, ULONG, RECTL*);
+typedef ULONG (STDCALL *PGD_GETMODES)(HANDLE, ULONG, PDEVMODEW);
+typedef VOID (STDCALL *PGD_FREE)(PVOID, ULONG);
+typedef VOID (STDCALL *PGD_DESTROYFONT)(FONTOBJ*);
+typedef LONG (STDCALL *PGD_QUERYFONTCAPS)(ULONG, PULONG);
+typedef ULONG (STDCALL *PGD_LOADFONTFILE)(ULONG, PVOID, ULONG, ULONG);
+typedef BOOL (STDCALL *PGD_UNLOADFONTFILE)(ULONG);
+typedef ULONG (STDCALL *PGD_FONTMANAGEMENT)(SURFOBJ*, FONTOBJ*, ULONG, ULONG, PVOID,
                                     ULONG, PVOID);
-typedef LONG STDCALL_FUNC (*PGD_QUERYTRUETYPETABLE)(ULONG, ULONG, ULONG, PTRDIFF, ULONG,
+typedef LONG (STDCALL *PGD_QUERYTRUETYPETABLE)(ULONG, ULONG, ULONG, PTRDIFF, ULONG,
                                        PBYTE);
-typedef LONG STDCALL_FUNC (*PGD_QUERYTRUETYPEOUTLINE)(DHPDEV, FONTOBJ*, HGLYPH, BOOL,
+typedef LONG (STDCALL *PGD_QUERYTRUETYPEOUTLINE)(DHPDEV, FONTOBJ*, HGLYPH, BOOL,
                                          GLYPHDATA*, ULONG, TTPOLYGONHEADER*);
-typedef PVOID STDCALL_FUNC (*PGD_GETTRUETYPEFILE)(ULONG, PULONG);
-typedef LONG STDCALL_FUNC (*PGD_QUERYFONTFILE)(ULONG, ULONG, ULONG, PULONG);
-typedef BOOL STDCALL_FUNC (*PGD_QUERYADVANCEWIDTHS)(DHPDEV, FONTOBJ*, ULONG, HGLYPH *,
+typedef PVOID (STDCALL *PGD_GETTRUETYPEFILE)(ULONG, PULONG);
+typedef LONG (STDCALL *PGD_QUERYFONTFILE)(ULONG, ULONG, ULONG, PULONG);
+typedef BOOL (STDCALL *PGD_QUERYADVANCEWIDTHS)(DHPDEV, FONTOBJ*, ULONG, HGLYPH *,
                                        PVOID *, ULONG);
-typedef BOOL STDCALL_FUNC (*PGD_SETPIXELFORMAT)(SURFOBJ*, LONG, ULONG);
-typedef LONG STDCALL_FUNC (*PGD_DESCRIBEPIXELFORMAT)(DHPDEV, LONG, ULONG,
+typedef BOOL (STDCALL *PGD_SETPIXELFORMAT)(SURFOBJ*, LONG, ULONG);
+typedef LONG (STDCALL *PGD_DESCRIBEPIXELFORMAT)(DHPDEV, LONG, ULONG,
                                         PPIXELFORMATDESCRIPTOR);
-typedef BOOL STDCALL_FUNC (*PGD_SWAPBUFFERS)(SURFOBJ*, PWNDOBJ);
-typedef BOOL STDCALL_FUNC (*PGD_STARTBANDING)(SURFOBJ*, POINTL*);
-typedef BOOL STDCALL_FUNC (*PGD_NEXTBAND)(SURFOBJ*, POINTL*);
+typedef BOOL (STDCALL *PGD_SWAPBUFFERS)(SURFOBJ*, PWNDOBJ);
+typedef BOOL (STDCALL *PGD_STARTBANDING)(SURFOBJ*, POINTL*);
+typedef BOOL (STDCALL *PGD_NEXTBAND)(SURFOBJ*, POINTL*);
 
-typedef BOOL STDCALL_FUNC (*PGD_GETDIRECTDRAWINFO)(DHPDEV, PDD_HALINFO, PDWORD, VIDEOMEMORY*, PDWORD, PDWORD);
-typedef BOOL STDCALL_FUNC (*PGD_ENABLEDIRECTDRAW)(DHPDEV, PDD_CALLBACKS, PDD_SURFACECALLBACKS, PDD_PALETTECALLBACKS);
-typedef VOID STDCALL_FUNC (*PGD_DISABLEDIRECTDRAW)(DHPDEV);
+typedef BOOL (STDCALL *PGD_GETDIRECTDRAWINFO)(DHPDEV, PDD_HALINFO, PDWORD, VIDEOMEMORY*, PDWORD, PDWORD);
+typedef BOOL (STDCALL *PGD_ENABLEDIRECTDRAW)(DHPDEV, PDD_CALLBACKS, PDD_SURFACECALLBACKS, PDD_PALETTECALLBACKS);
+typedef VOID (STDCALL *PGD_DISABLEDIRECTDRAW)(DHPDEV);
 
-typedef LONG STDCALL_FUNC (*PGD_QUERYSPOOLTYPE)(DHPDEV, LPWSTR);
+typedef LONG (STDCALL *PGD_QUERYSPOOLTYPE)(DHPDEV, LPWSTR);
 
-typedef BOOL STDCALL_FUNC (*PGD_GRADIENTFILL)(SURFOBJ*, CLIPOBJ*, XLATEOBJ*, TRIVERTEX*, ULONG, PVOID, ULONG, RECTL*, POINTL*, ULONG);
+typedef BOOL (STDCALL *PGD_GRADIENTFILL)(SURFOBJ*, CLIPOBJ*, XLATEOBJ*, TRIVERTEX*, ULONG, PVOID, ULONG, RECTL*, POINTL*, ULONG);
 
 typedef struct _DRIVER_FUNCTIONS
 {

reactos/include/win32k
kapi.h 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- kapi.h	23 Mar 2004 00:18:54 -0000	1.7
+++ kapi.h	9 Apr 2004 20:03:11 -0000	1.8
@@ -1,5 +1,6 @@
 #ifndef _WIN32K_KAPI_H
 #define _WIN32K_KAPI_H
+#include <win32k/ntddraw.h>
 #include <win32k/bitmaps.h>
 #include <win32k/brush.h>
 #include <win32k/cliprgn.h>
@@ -23,5 +24,4 @@
 #include <win32k/region.h>
 #include <win32k/text.h>
 #include <win32k/wingl.h>
-#include <win32k/ntddraw.h>
 #endif /* ndef _WIN32K_KAPI_H */

reactos/include/win32k
ntuser.h 1.123 -> 1.124
diff -u -r1.123 -r1.124
--- ntuser.h	2 Apr 2004 23:54:26 -0000	1.123
+++ ntuser.h	9 Apr 2004 20:03:11 -0000	1.124
@@ -1,6 +1,10 @@
 #ifndef __WIN32K_NTUSER_H
 #define __WIN32K_NTUSER_H
 
+#include <ddk/ntapi.h>
+
+#define WM_SYSTIMER 280
+
 ULONG STDCALL
 NtUserGetSystemMetrics(ULONG Index);
 

reactos/include/win32k
print.h 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- print.h	19 Aug 2003 11:48:49 -0000	1.6
+++ print.h	9 Apr 2004 20:03:11 -0000	1.7
@@ -39,7 +39,7 @@
 INT
 STDCALL
 NtGdiStartDoc(HDC  hDC,
-                  CONST PDOCINFOW  di);
+                  CONST LPDOCINFOW  di);
 
 INT
 STDCALL

reactos/include/win32k
region.h 1.20 -> 1.21
diff -u -r1.20 -r1.21
--- region.h	3 Apr 2004 20:36:55 -0000	1.20
+++ region.h	9 Apr 2004 20:03:11 -0000	1.21
@@ -7,7 +7,7 @@
 /* Internal region data. Can't use RGNDATA structure because buffer is allocated statically */
 typedef struct _ROSRGNDATA {
   RGNDATAHEADER rdh;
-  char*         Buffer;
+  PRECT         Buffer;
   RECT          BuiltInRect;   /* Testing shows that > 95% of all regions have only 1 rect.
                                   Including that here saves us from having to do another
                                   allocation */

reactos/lib/gdi32/main
dllmain.c 1.8 -> 1.9
diff -u -r1.8 -r1.9
--- dllmain.c	4 Aug 2003 00:28:44 -0000	1.8
+++ dllmain.c	9 Apr 2004 20:03:11 -0000	1.9
@@ -1,9 +1,9 @@
 /*
  * dllmain.c
  *
- * $Revision: 1.8 $
- * $Author: royce $
- * $Date: 2003/08/04 00:28:44 $
+ * $Revision: 1.9 $
+ * $Author: navaraf $
+ * $Date: 2004/04/09 20:03:11 $
  *
  */
 
@@ -27,6 +27,14 @@
 }
 
 
+VOID
+WINAPI
+GdiProcessSetup (VOID)
+{
+	hProcessHeap = GetProcessHeap();
+}
+
+
 /*
  * @implemented
  */
@@ -60,12 +68,4 @@
 	return TRUE;
 }
 
-
-VOID
-WINAPI
-GdiProcessSetup (VOID)
-{
-	hProcessHeap = RtlGetProcessHeap();
-}
-
 /* EOF */

reactos/lib/gdi32
makefile 1.36 -> 1.37
diff -u -r1.36 -r1.37
--- makefile	23 Mar 2004 00:18:54 -0000	1.36
+++ makefile	9 Apr 2004 20:03:11 -0000	1.37
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.36 2004/03/23 00:18:54 gvg Exp $
+# $Id: makefile,v 1.37 2004/04/09 20:03:11 navaraf Exp $
 
 PATH_TO_TOP = ../..
 
@@ -15,7 +15,10 @@
  -DUNICODE \
  -Wall \
  -Werror \
- -fno-builtin
+ -fno-builtin \
+ -D__USE_W32API \
+ -DWINVER=0x0600 \
+ -D_WIN32_WINNT=0x0501
 
 # require os code to explicitly request A/W version of structs/functions
 TARGET_CFLAGS += -D_DISABLE_TIDENTS

reactos/lib/gdi32/misc
heap.c 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- heap.c	4 Aug 2003 00:28:44 -0000	1.1
+++ heap.c	9 Apr 2004 20:03:12 -0000	1.2
@@ -3,6 +3,8 @@
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <ddk/ntddk.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 #include <debug.h>
 
 // global variables in a dll are process-global

reactos/lib/gdi32/misc
stubs.c 1.51 -> 1.52
diff -u -r1.51 -r1.52
--- stubs.c	24 Mar 2004 00:13:31 -0000	1.51
+++ stubs.c	9 Apr 2004 20:03:12 -0000	1.52
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.51 2004/03/24 00:13:31 royce Exp $
+/* $Id: stubs.c,v 1.52 2004/04/09 20:03:12 navaraf Exp $
  *
  * reactos/lib/gdi32/misc/stubs.c
  *
@@ -13,6 +13,20 @@
 #endif
 #include <windows.h>
 #include <ddentry.h>
+#include <ddk/prntfont.h>
+
+#ifdef __USE_W32API
+typedef int (CALLBACK* EMFPLAYPROC)( HDC, INT, HANDLE );
+typedef DWORD FULLSCREENCONTROL;
+typedef DWORD SHAREDHANDLETABLE;
+typedef SHAREDHANDLETABLE *PSHAREDHANDLETABLE;
+typedef DWORD UNIVERSAL_FONT_ID;
+typedef UNIVERSAL_FONT_ID *PUNIVERSAL_FONT_ID;
+typedef DWORD REALIZATION_INFO;
+typedef REALIZATION_INFO *PREALIZATION_INFO;
+typedef DWORD CHWIDTHINFO;
+typedef CHWIDTHINFO *PCHWIDTHINFO;
+#endif
 
 /*
  * @unimplemented
@@ -135,7 +149,7 @@
 EnumObjects(
 	HDC		a0,
 	int		a1,
-	ENUMOBJECTSPROC	a2,
+	GOBJENUMPROC	a2,
 	LPARAM		a3
 	)
 {
@@ -614,7 +628,7 @@
 EnumMetaFile(
 	HDC			a0,
 	HMETAFILE		a1,
-	ENUMMETAFILEPROC	a2,
+	MFENUMPROC		a2,
 	LPARAM			a3
 	)
 {
@@ -659,7 +673,7 @@
 EnumEnhMetaFile(
 	HDC		a0,
 	HENHMETAFILE	a1,
-	ENHMETAFILEPROC	a2,
+	ENHMFENUMPROC	a2,
 	LPVOID		a3,
 	CONST RECT	*a4
 	)
@@ -792,9 +806,7 @@
 	UINT			a0,
 	CONST BYTE		*a1,
 	HDC			a2,
-//	CONST METAFILEPICT	*a3
-		   PVOID a3
-	)
+	CONST METAFILEPICT	*a3)
 {
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
@@ -1624,7 +1636,7 @@
 	int		a1,
 	int		a2,
 	int		a3,
-	CONST COLORREF	*a4
+	COLORREF	*a4
 	)
 {
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@@ -1749,12 +1761,12 @@
 /*
  * @unimplemented
  */
-DWORD
+INT
 STDCALL
 GetRandomRgn(
-	DWORD	a0,
-	DWORD	a1,
-	DWORD	a2
+	HDC	a0,
+	HRGN	a1,
+	INT	a2
 	)
 {
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@@ -3200,7 +3212,7 @@
  * @unimplemented
  */
 PVOID STDCALL
-BRUSHOBJ_pvAllocRbrush(IN PBRUSHOBJ BrushObj,
+BRUSHOBJ_pvAllocRbrush(IN BRUSHOBJ *BrushObj,
 		       IN ULONG ObjSize)
 {
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@@ -3211,7 +3223,7 @@
  * @unimplemented
  */
 PVOID STDCALL
-BRUSHOBJ_pvGetRbrush(IN PBRUSHOBJ BrushObj)
+BRUSHOBJ_pvGetRbrush(IN BRUSHOBJ *BrushObj)
 {
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
@@ -3231,7 +3243,7 @@
  * @unimplemented
  */
 BOOL STDCALL
-CLIPOBJ_bEnum(IN PCLIPOBJ ClipObj,
+CLIPOBJ_bEnum(IN CLIPOBJ *ClipObj,
 	      IN ULONG ObjSize,
 	      OUT ULONG *EnumRects)
 {
@@ -3243,7 +3255,7 @@
  * @unimplemented
  */
 ULONG STDCALL
-CLIPOBJ_cEnumStart(IN PCLIPOBJ ClipObj,
+CLIPOBJ_cEnumStart(IN CLIPOBJ *ClipObj,
 		   IN BOOL ShouldDoAll,
 		   IN ULONG ClipType,
 		   IN ULONG BuildOrder,
@@ -3256,8 +3268,8 @@
 /*
  * @unimplemented
  */
-PPATHOBJ STDCALL
-CLIPOBJ_ppoGetPath(PCLIPOBJ ClipObj)
+PATHOBJ* STDCALL
+CLIPOBJ_ppoGetPath(CLIPOBJ *ClipObj)
 {
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
@@ -3367,7 +3379,7 @@
 /*
  * @unimplemented
  */
-PCLIPOBJ STDCALL
+CLIPOBJ* STDCALL
 EngCreateClip(VOID)
 {
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@@ -3731,10 +3743,10 @@
  * @unimplemented
  */
 BOOL STDCALL
-EngTransparentBlt(IN PSURFOBJ Dest,
-		  IN PSURFOBJ Source,
-		  IN PCLIPOBJ Clip,
-		  IN PXLATEOBJ ColorTranslation,
+EngTransparentBlt(IN SURFOBJ *Dest,
+		  IN SURFOBJ *Source,
+		  IN CLIPOBJ *Clip,
+		  IN XLATEOBJ *ColorTranslation,
 		  IN PRECTL DestRect,
 		  IN PRECTL SourceRect,
 		  IN ULONG TransparentColor,
@@ -3781,7 +3793,7 @@
  */
 ULONG
 STDCALL
-FONTOBJ_cGetAllGlyphHandles(IN PFONTOBJ  FontObj,
+FONTOBJ_cGetAllGlyphHandles(IN FONTOBJ *FontObj,
                             IN HGLYPH  *Glyphs)
 {
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@@ -3793,7 +3805,7 @@
  */
 ULONG
 STDCALL
-FONTOBJ_cGetGlyphs(IN PFONTOBJ FontObj,
+FONTOBJ_cGetGlyphs(IN FONTOBJ *FontObj,
                    IN ULONG    Mode,
                    IN ULONG    NumGlyphs,
                    IN HGLYPH  *GlyphHandles,
@@ -3828,7 +3840,7 @@
  */
 IFIMETRICS*
 STDCALL
-FONTOBJ_pifi(IN PFONTOBJ  FontObj)
+FONTOBJ_pifi(IN FONTOBJ  *FontObj)
 {
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
@@ -3839,7 +3851,7 @@
  */
 PVOID
 STDCALL
-FONTOBJ_pvTrueTypeFontFile(IN PFONTOBJ  FontObj,
+FONTOBJ_pvTrueTypeFontFile(IN FONTOBJ  *FontObj,
                            IN ULONG    *FileSize)
 {
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@@ -3851,7 +3863,7 @@
  */
 XFORMOBJ*
 STDCALL
-FONTOBJ_pxoGetXform(IN PFONTOBJ  FontObj)
+FONTOBJ_pxoGetXform(IN FONTOBJ  *FontObj)
 {
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return 0;
@@ -3862,7 +3874,7 @@
  */
 VOID
 STDCALL
-FONTOBJ_vGetInfo(IN  PFONTOBJ   FontObj,
+FONTOBJ_vGetInfo(IN  FONTOBJ   *FontObj,
                  IN  ULONG      InfoSize,
                  OUT PFONTINFO  FontInfo)
 {

reactos/lib/gdi32/misc
stubsa.c 1.30 -> 1.31
diff -u -r1.30 -r1.31
--- stubsa.c	23 Mar 2004 19:46:49 -0000	1.30
+++ stubsa.c	9 Apr 2004 20:03:13 -0000	1.31
@@ -1,4 +1,4 @@
-/* $Id: stubsa.c,v 1.30 2004/03/23 19:46:49 gvg Exp $
+/* $Id: stubsa.c,v 1.31 2004/04/09 20:03:13 navaraf Exp $
  *
  * reactos/lib/gdi32/misc/stubs.c
  *
@@ -15,6 +15,8 @@
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <ddk/ntddk.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 #include <win32k/text.h>
 #include <win32k/dc.h>
 #include <rosrtl/devmode.h>

reactos/lib/gdi32/misc
stubsw.c 1.27 -> 1.28
diff -u -r1.27 -r1.28
--- stubsw.c	23 Mar 2004 19:46:49 -0000	1.27
+++ stubsw.c	9 Apr 2004 20:03:13 -0000	1.28
@@ -1,4 +1,4 @@
-/* $Id: stubsw.c,v 1.27 2004/03/23 19:46:49 gvg Exp $
+/* $Id: stubsw.c,v 1.28 2004/04/09 20:03:13 navaraf Exp $
  *
  * reactos/lib/gdi32/misc/stubs.c
  *
@@ -292,7 +292,7 @@
 	CONST DOCINFOW	*a1
 	)
 {
-	return NtGdiStartDoc ( hdc, (CONST PDOCINFOW)a1 );
+	return NtGdiStartDoc ( hdc, (DOCINFOW *)a1 );
 }
 
 

reactos/lib/gdi32/misc
wingl.c 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- wingl.c	6 Sep 2003 19:44:00 -0000	1.2
+++ wingl.c	9 Apr 2004 20:03:13 -0000	1.3
@@ -195,7 +195,7 @@
 	CONST PIXELFORMATDESCRIPTOR	*ppfd
 	)
 {
-ENHMETAHEADER pemh;
+	ENHMETAHEADER pemh;
 
 	if(GetEnhMetaFileHeader(hEmh, sizeof(ENHMETAHEADER), &pemh))
 	{

reactos/lib/gdi32/objects
bitblt.c 1.20 -> 1.21
diff -u -r1.20 -r1.21
--- bitblt.c	28 Mar 2004 21:46:26 -0000	1.20
+++ bitblt.c	9 Apr 2004 20:03:13 -0000	1.21
@@ -1,4 +1,4 @@
-/* $Id: bitblt.c,v 1.20 2004/03/28 21:46:26 weiden Exp $
+/* $Id: bitblt.c,v 1.21 2004/04/09 20:03:13 navaraf Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -323,7 +323,7 @@
 CreateDIBSection(HDC hDC,
 	CONST BITMAPINFO  *bmi,
 	UINT  Usage,
-	VOID  *Bits,
+	PVOID  *Bits,
 	HANDLE  hSection,
 	DWORD  dwOffset)
 {

reactos/lib/gdi32/objects
dc.c 1.28 -> 1.29
diff -u -r1.28 -r1.29
--- dc.c	23 Mar 2004 22:50:14 -0000	1.28
+++ dc.c	9 Apr 2004 20:03:13 -0000	1.29
@@ -814,7 +814,7 @@
 	CONST RGBQUAD	*a3
 	)
 {
-	return NtGdiSetDIBColorTable(hdc,a1,a2,(CONST PRGBQUAD)a3);
+	return NtGdiSetDIBColorTable(hdc,a1,a2,(RGBQUAD*)a3);
 }
 
 /*

reactos/lib/gdi32/objects
font.c 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- font.c	23 Mar 2004 07:59:47 -0000	1.2
+++ font.c	9 Apr 2004 20:03:13 -0000	1.3
@@ -1,4 +1,4 @@
-/* $Id: font.c,v 1.2 2004/03/23 07:59:47 gvg Exp $
+/* $Id: font.c,v 1.3 2004/04/09 20:03:13 navaraf Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -14,6 +14,9 @@
 
 #include <windows.h>
 #include <rosrtl/logfont.h>
+#include <ddk/ntddk.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 #include <win32k/font.h>
 #include <win32k/text.h>
 #include <internal/font.h>
@@ -242,8 +245,10 @@
     {
       if (Unicode)
         {
-          Ret = ((FONTENUMEXPROCW) EnumProc)(&Info[i].EnumLogFontEx, &Info[i].NewTextMetricEx,
-                                             Info[i].FontType, lParam);
+          Ret = ((FONTENUMPROCW) EnumProc)(
+            (LPLOGFONTW)&Info[i].EnumLogFontEx,
+            (LPTEXTMETRICW)&Info[i].NewTextMetricEx,
+            Info[i].FontType, lParam);
         }
       else
         {
@@ -256,8 +261,10 @@
                               EnumLogFontExA.elfScript, LF_FACESIZE, NULL, NULL);
           NewTextMetricExW2A(&NewTextMetricExA,
                              &Info[i].NewTextMetricEx);
-          Ret = ((FONTENUMEXPROCA) EnumProc)(&EnumLogFontExA, &NewTextMetricExA,
-                                             Info[i].FontType, lParam);
+          Ret = ((FONTENUMPROCA) EnumProc)(
+            (LPLOGFONTA)&EnumLogFontExA,
+            (LPTEXTMETRICA)&NewTextMetricExA,
+            Info[i].FontType, lParam);
         }
     }
 
@@ -270,7 +277,7 @@
  * @implemented
  */
 int STDCALL
-EnumFontFamiliesExW(HDC Dc, LPLOGFONTW LogFont, FONTENUMEXPROCW EnumFontFamProc,
+EnumFontFamiliesExW(HDC Dc, LPLOGFONTW LogFont, FONTENUMPROCW EnumFontFamProc,
                     LPARAM lParam, DWORD Flags)
 {
   return IntEnumFontFamilies(Dc, LogFont, EnumFontFamProc, lParam, TRUE);
@@ -301,7 +308,7 @@
  * @implemented
  */
 int STDCALL
-EnumFontFamiliesExA (HDC Dc, LPLOGFONTA LogFont, FONTENUMEXPROCA EnumFontFamProc,
+EnumFontFamiliesExA (HDC Dc, LPLOGFONTA LogFont, FONTENUMPROCA EnumFontFamProc,
                      LPARAM lParam, DWORD dwFlags)
 {
   LOGFONTW LogFontW;

reactos/lib/gdi32/objects
metafile.c 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- metafile.c	15 Nov 2003 15:18:06 -0000	1.1
+++ metafile.c	9 Apr 2004 20:03:13 -0000	1.2
@@ -6,6 +6,8 @@
 #include <string.h>
 #include <windows.h>
 #include <ddk/ntddk.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 #include <internal/heap.h>
 #include <win32k/kapi.h>
 #include <win32k/metafile.h>

reactos/lib/ntdll/rtl/i386
exception.c 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- exception.c	12 Sep 2003 17:51:48 -0000	1.6
+++ exception.c	9 Apr 2004 20:03:13 -0000	1.7
@@ -1,4 +1,4 @@
-/* $Id: exception.c,v 1.6 2003/09/12 17:51:48 vizzini Exp $
+/* $Id: exception.c,v 1.7 2004/04/09 20:03:13 navaraf Exp $
  *
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:           ReactOS kernel
@@ -299,6 +299,10 @@
     pExceptRec->ExceptionAddress = ReturnAddress;
     pExceptRec->ExceptionInformation[0] = 0;
   }
+  else
+  {
+    pExceptRec = ExceptionRecord;
+  }
 
   if (RegistrationFrame)
     pExceptRec->ExceptionFlags |= EXCEPTION_UNWINDING;

reactos/lib/user32
Makefile 1.36 -> 1.37
diff -u -r1.36 -r1.37
--- Makefile	7 Mar 2004 11:59:43 -0000	1.36
+++ Makefile	9 Apr 2004 20:03:13 -0000	1.37
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.36 2004/03/07 11:59:43 navaraf Exp $
+# $Id: Makefile,v 1.37 2004/04/09 20:03:13 navaraf Exp $
 
 PATH_TO_TOP = ../..
 
@@ -14,6 +14,9 @@
  -I./include \
  -DUNICODE \
  -D__REACTOS__ \
+ -D__USE_W32API \
+ -DWINVER=0x0600 \
+ -D_WIN32_WINNT=0x0501 \
  -Wall \
  -Werror \
  -fno-builtin

reactos/lib/user32
user32.edf 1.34 -> 1.35
diff -u -r1.34 -r1.35
--- user32.edf	2 Apr 2004 22:16:09 -0000	1.34
+++ user32.edf	9 Apr 2004 20:03:13 -0000	1.35
@@ -17,7 +17,7 @@
 BeginPaint=BeginPaint@8
 BlockInput=BlockInput@4
 BringWindowToTop=BringWindowToTop@4
-BroadcastSystemMessage=BroadcastSystemMessage@20
+BroadcastSystemMessage=BroadcastSystemMessageA@20
 BroadcastSystemMessageA=BroadcastSystemMessageA@20
 BroadcastSystemMessageExA=BroadcastSystemMessageExA@24
 BroadcastSystemMessageExW=BroadcastSystemMessageExW@24

reactos/lib/user32/controls
combo.c 1.12 -> 1.13
diff -u -r1.12 -r1.13
--- combo.c	2 Jan 2004 19:49:46 -0000	1.12
+++ combo.c	9 Apr 2004 20:03:13 -0000	1.13
@@ -2368,7 +2368,7 @@
 	case CB_SETEDITSEL:
 		if( lphc->wState & CBF_EDIT )
                     return SendMessageW(lphc->hWndEdit, EM_SETSEL,
-			  (INT)(INT16)LOWORD(lParam), (INT)(INT16)HIWORD(lParam) );
+			  (INT)(USHORT)LOWORD(lParam), (INT)(USHORT)HIWORD(lParam) );
 		return  CB_ERR;
 #ifndef __REACTOS__
 	case CB_SETEXTENDEDUI16:

reactos/lib/user32/controls
listbox.c 1.15 -> 1.16
diff -u -r1.15 -r1.16
--- listbox.c	2 Jan 2004 19:49:47 -0000	1.15
+++ listbox.c	9 Apr 2004 20:03:13 -0000	1.16
@@ -1,4 +1,4 @@
-/* $Id: listbox.c,v 1.15 2004/01/02 19:49:47 gvg Exp $
+/* $Id: listbox.c,v 1.16 2004/04/09 20:03:13 navaraf Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS User32
@@ -38,6 +38,10 @@
 #define WM_LBTRACKPOINT     0x0131
 #define WS_EX_DRAGDETECT    0x00000002L
 #define WM_BEGINDRAG        0x022C
+#define WM_SYSTIMER         280
+
+UINT STDCALL SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC);
+WINBOOL STDCALL KillSystemTimer(HWND,UINT_PTR);
 
 /* End of hack section -------------------------------- */
 
@@ -737,7 +741,7 @@
     if (short_ints)
     {
         INT i;
-        LPINT16 p = (LPINT16)tabs;
+        PUSHORT p = (PUSHORT)tabs;
 
         TRACE("[%p]: settabstops ", hwnd );
         for (i = 0; i < descr->nb_tabs; i++) {
@@ -2873,16 +2877,16 @@
         return LISTBOX_HandleMouseWheel( hwnd, descr, wParam );
     case WM_LBUTTONDOWN:
         return LISTBOX_HandleLButtonDown( hwnd, descr, wParam,
-                                          (INT16)LOWORD(lParam),
-                                          (INT16)HIWORD(lParam) );
+                                          (USHORT)LOWORD(lParam),
+                                          (USHORT)HIWORD(lParam) );
     case WM_LBUTTONDBLCLK:
         if (descr->style & LBS_NOTIFY)
             SEND_NOTIFICATION( hwnd, descr, LBN_DBLCLK );
         return 0;
     case WM_MOUSEMOVE:
         if (GetCapture() == hwnd)
-            LISTBOX_HandleMouseMove( hwnd, descr, (INT16)LOWORD(lParam),
-                                     (INT16)HIWORD(lParam) );
+            LISTBOX_HandleMouseMove( hwnd, descr, (USHORT)LOWORD(lParam),
+                                     (USHORT)HIWORD(lParam) );
         return 0;
     case WM_LBUTTONUP:
         return LISTBOX_HandleLButtonUp( hwnd, descr );
@@ -2991,8 +2995,8 @@
                 BOOL    captured;
                 RECT    clientRect;
 
-                mousePos.x = (INT16)LOWORD(lParam);
-                mousePos.y = (INT16)HIWORD(lParam);
+                mousePos.x = (USHORT)LOWORD(lParam);
+                mousePos.y = (USHORT)HIWORD(lParam);
 
                 /*
                  * If we are in a dropdown combobox, we simulate that
@@ -3033,8 +3037,8 @@
                  * we make sure there is no selection by re-selecting the
                  * item that was selected when the listbox was made visible.
                  */
-                mousePos.x = (INT16)LOWORD(lParam);
-                mousePos.y = (INT16)HIWORD(lParam);
+                mousePos.x = (USHORT)LOWORD(lParam);
+                mousePos.y = (USHORT)HIWORD(lParam);
 
                 GetClientRect(hwnd, &clientRect);
 
@@ -3054,8 +3058,8 @@
         case WM_LBUTTONDBLCLK:
         case WM_LBUTTONDOWN:
             return LISTBOX_HandleLButtonDownCombo(hwnd, descr, msg, wParam,
-                                                  (INT16)LOWORD(lParam),
-                                                  (INT16)HIWORD(lParam) );
+                                                  (USHORT)LOWORD(lParam),
+                                                  (USHORT)HIWORD(lParam) );
         case WM_NCACTIVATE:
             return FALSE;
         case WM_KEYDOWN:
@@ -3092,7 +3096,7 @@
     lRet = unicode ? ListBoxWndProcW( hwnd, msg, wParam, lParam ) :
                      ListBoxWndProcA( hwnd, msg, wParam, lParam );
 
-    TRACE_(combo)("\t default on msg [%04x]\n", (UINT16)msg );
+    TRACE_(combo)("\t default on msg [%04x]\n", (USHORT)msg );
 
     return lRet;
 }

reactos/lib/user32/controls
scrollbar.c 1.26 -> 1.27
diff -u -r1.26 -r1.27
--- scrollbar.c	29 Mar 2004 12:49:07 -0000	1.26
+++ scrollbar.c	9 Apr 2004 20:03:13 -0000	1.27
@@ -36,6 +36,7 @@
 #include <draw.h>
 #include <stdlib.h>
 #include <string.h>
+#include <oleacc.h>
 #include <user32/regcontrol.h>
 #include <rosrtl/minmax.h>
 
@@ -75,6 +76,8 @@
 
 static LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
 
+UINT STDCALL SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC);
+WINBOOL STDCALL KillSystemTimer(HWND,UINT_PTR);
 
 /*********************************************************************
  * scrollbar class descriptor

reactos/lib/user32/include
user32.h 1.21 -> 1.22
diff -u -r1.21 -r1.22
--- user32.h	2 Apr 2004 22:16:09 -0000	1.21
+++ user32.h	9 Apr 2004 20:03:14 -0000	1.22
@@ -91,3 +91,9 @@
 LONG WINAPI RegCloseKey(HKEY);
 LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
 LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
+
+#ifdef __USE_W32API
+NTSTATUS STDCALL ZwCallbackReturn(PVOID Result,
+				  ULONG ResultLength,
+				  NTSTATUS Status);
+#endif

reactos/lib/user32/misc
dde.c 1.8 -> 1.9
diff -u -r1.8 -r1.9
--- dde.c	3 Jan 2004 23:34:17 -0000	1.8
+++ dde.c	9 Apr 2004 20:03:14 -0000	1.9
@@ -22,7 +22,9 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#ifndef __USE_W32API
 #define __USE_W32API
+#endif
 
 #include "wine/config.h"
 #include "wine/port.h"

reactos/lib/user32/misc
display.c 1.8 -> 1.9
diff -u -r1.8 -r1.9
--- display.c	23 Jan 2004 23:38:26 -0000	1.8
+++ display.c	9 Apr 2004 20:03:14 -0000	1.9
@@ -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.8 2004/01/23 23:38:26 ekohl Exp $
+/* $Id: display.c,v 1.9 2004/04/09 20:03:14 navaraf Exp $
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/misc/dde.c
@@ -29,9 +29,12 @@
 /* INCLUDES ******************************************************************/
 
 #include <windows.h>
-#include <user32.h>
-#include <debug.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 #include <rosrtl/devmode.h>
+#include <win32k/ntuser.h>
+#define NDEBUG
+#include <debug.h>
 
 /* FUNCTIONS *****************************************************************/
 
@@ -42,9 +45,11 @@
 EnumDisplayDevicesA(
   LPCSTR lpDevice,
   DWORD iDevNum,
-  PDISPLAY_DEVICE lpDisplayDevice,
+  PDISPLAY_DEVICEA lpDisplayDevice,
   DWORD dwFlags)
 {
+/* FIXME: This implementation doesn't convert the lpDisplayDevice structure! */
+#if 0
   BOOL rc;
   UNICODE_STRING Device;
   if ( !RtlCreateUnicodeStringFromAsciiz ( &Device, (PCSZ)lpDevice ) )
@@ -62,6 +67,9 @@
   RtlFreeUnicodeString ( &Device );
 
   return rc;
+#else
+  return 0;
+#endif
 }
 
 

reactos/lib/user32/misc
dllmain.c 1.37 -> 1.38
diff -u -r1.37 -r1.38
--- dllmain.c	30 Jan 2004 22:29:39 -0000	1.37
+++ dllmain.c	9 Apr 2004 20:03:14 -0000	1.38
@@ -1,9 +1,12 @@
+#undef __USE_W32API
 #include <windows.h>
 #include <debug.h>
+#include <ddk/ntddk.h>
 #include <user32/callback.h>
 #include <user32/accel.h>
 #include <window.h>
 #include <menu.h>
+#define _WIN32K_KAPI_H
 #include <user32.h>
 #include <strpool.h>
 
@@ -14,7 +17,7 @@
 
 #endif /* DBG */
 
-extern RTL_CRITICAL_SECTION gcsMPH;
+extern CRITICAL_SECTION gcsMPH;
 static ULONG User32TlsIndex;
 
 /* To make the linker happy */
@@ -54,15 +57,15 @@
   DWORD Status;
 
   /* Set up the kernel callbacks. */
-  NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_WINDOWPROC] =
+  NtCurrentTeb()->Peb->KernelCallbackTable[USER32_CALLBACK_WINDOWPROC] =
     (PVOID)User32CallWindowProcFromKernel;
-  NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_SENDASYNCPROC] =
+  NtCurrentTeb()->Peb->KernelCallbackTable[USER32_CALLBACK_SENDASYNCPROC] =
     (PVOID)User32CallSendAsyncProcForKernel;
-  NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_LOADSYSMENUTEMPLATE] =
+  NtCurrentTeb()->Peb->KernelCallbackTable[USER32_CALLBACK_LOADSYSMENUTEMPLATE] =
     (PVOID)User32LoadSysMenuTemplateForKernel;
-  NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_LOADDEFAULTCURSORS] =
+  NtCurrentTeb()->Peb->KernelCallbackTable[USER32_CALLBACK_LOADDEFAULTCURSORS] =
     (PVOID)User32SetupDefaultCursors;
-  NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_HOOKPROC] =
+  NtCurrentTeb()->Peb->KernelCallbackTable[USER32_CALLBACK_HOOKPROC] =
     (PVOID)User32CallHookProcFromKernel;
 
   /* Allocate an index for user32 thread local data. */
@@ -70,8 +73,8 @@
 
   MenuInit();
 
-  RtlInitializeCriticalSection(&U32AccelCacheLock);
-  RtlInitializeCriticalSection(&gcsMPH);
+  InitializeCriticalSection(&U32AccelCacheLock);
+  InitializeCriticalSection(&gcsMPH);
 
   GdiDllInitialize(NULL, DLL_PROCESS_ATTACH, NULL);
 
@@ -104,7 +107,7 @@
     case DLL_PROCESS_ATTACH:
       hProcessHeap = RtlGetProcessHeap();
       Init();
-/*      InitThread();*/
+      InitThread();
       break;
     case DLL_THREAD_ATTACH:
       InitThread();
@@ -114,7 +117,7 @@
       break;
     case DLL_PROCESS_DETACH:
       DeleteFrameBrushes();
-/*      CleanupThread();*/
+      CleanupThread();
       Cleanup();
       break;
     }

reactos/lib/user32/misc
exit.c 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- exit.c	23 Jan 2004 23:38:26 -0000	1.3
+++ exit.c	9 Apr 2004 20:03:14 -0000	1.4
@@ -1,4 +1,4 @@
-/* $Id: exit.c,v 1.3 2004/01/23 23:38:26 ekohl Exp $
+/* $Id: exit.c,v 1.4 2004/04/09 20:03:14 navaraf Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS user32.dll
@@ -8,8 +8,9 @@
  */
 
 #include <windows.h>
-//#include <user32.h>
-
+#include <user32.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 #include <ntdll/csr.h>
 
 /*

reactos/lib/user32/misc
resources.c 1.10 -> 1.11
diff -u -r1.10 -r1.11
--- resources.c	18 Nov 2003 05:17:22 -0000	1.10
+++ resources.c	9 Apr 2004 20:03:14 -0000	1.11
@@ -1,6 +1,8 @@
 #include <string.h>
 #include <windows.h>
 #include <ddk/ntddk.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 /*#include <kernel32/error.h>*/
 
 /* FIXME: Currently IsBadWritePtr is implemented using VirtualQuery which

reactos/lib/user32/misc
strpool.c 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- strpool.c	9 Aug 2003 09:34:09 -0000	1.2
+++ strpool.c	9 Apr 2004 20:03:14 -0000	1.3
@@ -2,6 +2,8 @@
 
 #include <windows.h>
 #include <ddk/ntddk.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 #include <strpool.h>
 #include <string.h>
 

reactos/lib/user32/misc
stubs.c 1.57 -> 1.58
diff -u -r1.57 -r1.58
--- stubs.c	23 Mar 2004 21:47:36 -0000	1.57
+++ stubs.c	9 Apr 2004 20:03:14 -0000	1.58
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.57 2004/03/23 21:47:36 weiden Exp $
+/* $Id: stubs.c,v 1.58 2004/04/09 20:03:14 navaraf Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS user32.dll
@@ -12,10 +12,11 @@
 #include <windows.h>
 #include <debug.h>
 #include <string.h>
-typedef UINT *LPUINT;
 #include <mmsystem.h>
 #include <user32.h>
-
+#ifdef __USE_W32API
+typedef PVOID LPIMEPROW, LPIMEPROA;
+#endif
 
 /*
  * @unimplemented
@@ -48,23 +49,6 @@
  */
 long
 STDCALL
-BroadcastSystemMessage(
-  DWORD dwFlags,
-  LPDWORD lpdwRecipients,
-  UINT uiMessage,
-  WPARAM wParam,
-  LPARAM lParam)
-{
-  UNIMPLEMENTED;
-  return 0;
-}
-
-
-/*
- * @unimplemented
- */
-long
-STDCALL
 BroadcastSystemMessageA(
   DWORD dwFlags,
   LPDWORD lpdwRecipients,
@@ -185,7 +169,7 @@
 STDCALL
 MsgWaitForMultipleObjects(
   DWORD nCount,
-  CONST LPHANDLE pHandles,
+  CONST HANDLE *pHandles,
   BOOL fWaitAll,
   DWORD dwMilliseconds,
   DWORD dwWakeMask)

reactos/lib/user32/misc
winsta.c 1.14 -> 1.15
diff -u -r1.14 -r1.15
--- winsta.c	23 Jan 2004 23:38:26 -0000	1.14
+++ winsta.c	9 Apr 2004 20:03:14 -0000	1.15
@@ -1,4 +1,4 @@
-/* $Id: winsta.c,v 1.14 2004/01/23 23:38:26 ekohl Exp $
+/* $Id: winsta.c,v 1.15 2004/04/09 20:03:14 navaraf Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS user32.dll
@@ -81,7 +81,7 @@
  * @unimplemented
  */
 BOOL STDCALL
-EnumWindowStationsA(ENUMWINDOWSTATIONPROCA lpEnumFunc,
+EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
 		    LPARAM lParam)
 {
   UNIMPLEMENTED;
@@ -93,7 +93,7 @@
  * @unimplemented
  */
 BOOL STDCALL
-EnumWindowStationsW(ENUMWINDOWSTATIONPROCW lpEnumFunc,
+EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
 		    LPARAM lParam)
 {
    PWCHAR Buffer;

reactos/lib/user32/misc
wsprintf.c 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- wsprintf.c	7 Nov 2003 19:13:02 -0000	1.1
+++ wsprintf.c	9 Apr 2004 20:03:14 -0000	1.2
@@ -35,6 +35,7 @@
 #include <string.h>
 #include <stdio.h>
 #include <windows.h>
+#include <wine/winternl.h>
 #include "strpool.h"
 
 #define WPRINTF_LEFTALIGN   0x0001  /* Align output on the left ('-' prefix) */
@@ -552,9 +553,9 @@
 	}
 	if (Allocate)
 	{
-		*MBString = HEAP_alloc(MBSize);
+		*MBString = RtlAllocateHeap(GetProcessHeap(), 0, MBSize);
 	}
-	if ((CodePage == 0) || (CodePage == NLS_ANSI_CODE_PAGE))
+	if (CodePage == 0)
 	{
 		RtlUnicodeToMultiByteN(*MBString,MBSize,&Size,UnicodeString,UnicodeSize);
 	}
@@ -584,10 +585,10 @@
 	}
 	if (Allocate)
 	{
-		*UnicodeString = HEAP_alloc(UnicodeSize);
+		*UnicodeString = RtlAllocateHeap(GetProcessHeap(), 0, UnicodeSize);
 	}
 	UnicodeSize *= sizeof(WCHAR);
-	if ((CodePage == 0) || (CodePage == NLS_ANSI_CODE_PAGE))
+	if (CodePage == 0)
 	{
 		RtlMultiByteToUnicodeN(*UnicodeString,UnicodeSize,&Size,MBString,MBSize);
 	}

reactos/lib/user32/windows
accel.c 1.13 -> 1.14
diff -u -r1.13 -r1.14
--- accel.c	28 Jan 2004 21:00:23 -0000	1.13
+++ accel.c	9 Apr 2004 20:03:14 -0000	1.14
@@ -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: accel.c,v 1.13 2004/01/28 21:00:23 gvg Exp $
+/* $Id: accel.c,v 1.14 2004/04/09 20:03:14 navaraf Exp $
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/windows/input.c
@@ -31,6 +31,8 @@
 #include <windows.h>
 #include <user32/accel.h>
 #include <win32k/ntuser.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 
 /* this is the 8 byte accel struct used in Win32 resources (internal only) */
 typedef struct
@@ -101,7 +103,7 @@
  /* failure */
  if(hAccTableData == NULL) return NULL;
 
- RtlEnterCriticalSection(&U32AccelCacheLock);
+ EnterCriticalSection(&U32AccelCacheLock);
 
  /* see if this accelerator table has already been loaded */
  pEntry = *U32AccelCacheFind(NULL, hAccTableData);
@@ -152,7 +154,7 @@
  U32AccelCacheAdd(hAccTable, pAccTableResData);
 
 l_Leave:
- RtlLeaveCriticalSection(&U32AccelCacheLock);
+ LeaveCriticalSection(&U32AccelCacheLock);
  return hAccTable;
 }
 
@@ -186,7 +188,7 @@
  U32_ACCEL_CACHE_ENTRY ** ppEntry;
  ULONG_PTR nUsage = 0;
 
- RtlEnterCriticalSection(&U32AccelCacheLock);
+ EnterCriticalSection(&U32AccelCacheLock);
 
  /* see if this accelerator table has been cached */
  ppEntry = U32AccelCacheFind(hAccel, NULL);
@@ -210,7 +212,7 @@
   }
  }
 
- RtlLeaveCriticalSection(&U32AccelCacheLock);
+ LeaveCriticalSection(&U32AccelCacheLock);
 
  if(nUsage > 0) return FALSE;
 

reactos/lib/user32/windows
bitmap.c 1.27 -> 1.28
diff -u -r1.27 -r1.28
--- bitmap.c	23 Feb 2004 18:16:37 -0000	1.27
+++ bitmap.c	9 Apr 2004 20:03:14 -0000	1.28
@@ -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: bitmap.c,v 1.27 2004/02/23 18:16:37 navaraf Exp $
+/* $Id: bitmap.c,v 1.28 2004/04/09 20:03:14 navaraf Exp $
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/windows/input.c
@@ -33,6 +33,8 @@
 #include <user32.h>
 #include <debug.h>
 #include <stdlib.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 
 /*forward declerations... actualy in user32\windows\icon.c but usful here****/
 HICON ICON_CreateCursorFromData(HDC hDC, PVOID ImageData, ICONIMAGE* IconImage, int cxDesired, int cyDesired, int xHotspot, int yHotspot);
@@ -221,7 +223,7 @@
          return(NULL);
       }
 
-      SafeIconImage = RtlAllocateHeap(RtlGetProcessHeap(), 0, dirEntry->dwBytesInRes); 
+      SafeIconImage = RtlAllocateHeap(GetProcessHeap(), 0, dirEntry->dwBytesInRes); 
       memcpy(SafeIconImage, ((PBYTE)IconDIR) + dirEntry->dwImageOffset, dirEntry->dwBytesInRes);
    }
 
@@ -250,7 +252,7 @@
 
   hIcon = ICON_CreateCursorFromData(hScreenDc, Data, SafeIconImage, 32, 32, dirEntry->Info.cursor.wXHotspot, dirEntry->Info.cursor.wYHotspot);
   DeleteDC(hScreenDc);
-  RtlFreeHeap(RtlGetProcessHeap(), 0, SafeIconImage);
+  RtlFreeHeap(GetProcessHeap(), 0, SafeIconImage);
   return hIcon;
 }
 
@@ -390,7 +392,7 @@
 	       return(NULL);
 	  }
 
-      SafeIconImage = RtlAllocateHeap(RtlGetProcessHeap(), 0, dirEntry->dwBytesInRes); 
+      SafeIconImage = RtlAllocateHeap(GetProcessHeap(), 0, dirEntry->dwBytesInRes); 
 
       memcpy(SafeIconImage, ((PBYTE)IconDIR) + dirEntry->dwImageOffset, dirEntry->dwBytesInRes);
 
@@ -428,14 +430,14 @@
   {
       if (fuLoad & LR_LOADFROMFILE)
 	  {
-	  	RtlFreeHeap(RtlGetProcessHeap(), 0, SafeIconImage);
+	  	RtlFreeHeap(GetProcessHeap(), 0, SafeIconImage);
         UnmapViewOfFile(IconDIR);
 	  }
       return(NULL);
   }
 
   hIcon = ICON_CreateIconFromData(hScreenDc, Data, SafeIconImage, width, height, width/2, height/2);
-  RtlFreeHeap(RtlGetProcessHeap(), 0, SafeIconImage);
+  RtlFreeHeap(GetProcessHeap(), 0, SafeIconImage);
   return hIcon;
 }
 
@@ -533,7 +535,7 @@
     }
   Data = (PVOID)BitmapInfo + HeaderSize;
 
-  PrivateInfo = RtlAllocateHeap(RtlGetProcessHeap(), 0, HeaderSize);
+  PrivateInfo = RtlAllocateHeap(GetProcessHeap(), 0, HeaderSize);
   if (PrivateInfo == NULL)
     {
       if (fuLoad & LR_LOADFROMFILE)
@@ -572,7 +574,7 @@
 			       Data, PrivateInfo, DIB_RGB_COLORS);
     }
 
-  RtlFreeHeap(RtlGetProcessHeap(), 0, PrivateInfo);
+  RtlFreeHeap(GetProcessHeap(), 0, PrivateInfo);
   /*DeleteDC(hScreenDc);*/
   if (fuLoad & LR_LOADFROMFILE)
     {

reactos/lib/user32/windows
class.c 1.45 -> 1.46
diff -u -r1.45 -r1.46
--- class.c	8 Apr 2004 21:14:21 -0000	1.45
+++ class.c	9 Apr 2004 20:03:14 -0000	1.46
@@ -1,4 +1,4 @@
-/* $Id: class.c,v 1.45 2004/04/08 21:14:21 navaraf Exp $
+/* $Id: class.c,v 1.46 2004/04/09 20:03:14 navaraf Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS user32.dll
@@ -16,6 +16,8 @@
 #include <window.h>
 #include <strpool.h>
 #include <user32/regcontrol.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 
 
 
@@ -490,7 +492,7 @@
   if ( !lpwcx->lpszClassName )
     return 0;
 
-  hHeap = RtlGetProcessHeap();
+  hHeap = GetProcessHeap();
   RtlCopyMemory ( &wndclass, lpwcx, sizeof(WNDCLASSEXW) );
 
   /* copy strings if needed */

reactos/lib/user32/windows
cursor.c 1.19 -> 1.20
diff -u -r1.19 -r1.20
--- cursor.c	26 Jan 2004 08:44:51 -0000	1.19
+++ cursor.c	9 Apr 2004 20:03:14 -0000	1.20
@@ -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: cursor.c,v 1.19 2004/01/26 08:44:51 weiden Exp $
+/* $Id: cursor.c,v 1.20 2004/04/09 20:03:14 navaraf Exp $
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/windows/cursor.c
@@ -32,6 +32,9 @@
 #include <user32.h>
 #include <string.h>
 #include <debug.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
+#undef CopyCursor
 
 HBITMAP
 CopyBitmap(HBITMAP bmp);

reactos/lib/user32/windows
defwnd.c 1.131 -> 1.132
diff -u -r1.131 -r1.132
--- defwnd.c	5 Apr 2004 22:42:11 -0000	1.131
+++ defwnd.c	9 Apr 2004 20:03:14 -0000	1.132
@@ -1,4 +1,4 @@
-/* $Id: defwnd.c,v 1.131 2004/04/05 22:42:11 weiden Exp $
+/* $Id: defwnd.c,v 1.132 2004/04/09 20:03:14 navaraf Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS user32.dll
@@ -12,6 +12,7 @@
 /* INCLUDES ******************************************************************/
 
 #include <windows.h>
+#include <windowsx.h>
 #include <user32.h>
 #include <window.h>
 #include <user32/wininternal.h>
@@ -24,6 +25,13 @@
 #define NDEBUG
 #include <debug.h>
 
+#ifndef WM_SETVISIBLE
+#define WM_SETVISIBLE 9
+#endif
+#ifndef WM_QUERYDROPOBJECT
+#define WM_QUERYDROPOBJECT  0x022B
+#endif
+
 LRESULT DefWndNCPaint(HWND hWnd, HRGN hRgn);
 LRESULT DefWndNCCalcSize(HWND hWnd, BOOL CalcSizeStruct, RECT *Rect);
 LRESULT DefWndNCActivate(HWND hWnd, WPARAM wParam);
@@ -502,8 +510,8 @@
 
   SystemParametersInfoA(SPI_GETDRAGFULLWINDOWS, 0, &DragFullWindows, 0);
   
-  pt.x = SLOWORD(dwPoint);
-  pt.y = SHIWORD(dwPoint);
+  pt.x = GET_X_LPARAM(dwPoint);
+  pt.y = GET_Y_LPARAM(dwPoint);
   capturePoint = pt;
   
   if (IsZoomed(hwnd) || !IsWindowVisible(hwnd))
@@ -1013,8 +1021,8 @@
         case WM_NCHITTEST:
         {
             POINT Point;
-            Point.x = SLOWORD(lParam);
-            Point.y = SHIWORD(lParam);
+            Point.x = GET_X_LPARAM(lParam);
+            Point.y = GET_Y_LPARAM(lParam);
             return (DefWndNCHitTest(hWnd, Point));
         }
 
@@ -1045,8 +1053,8 @@
             {
                 ReleaseCapture();
             }
-            Pt.x = SLOWORD(lParam);
-            Pt.y = SHIWORD(lParam);
+            Pt.x = GET_X_LPARAM(lParam);
+            Pt.y = GET_Y_LPARAM(lParam);
             ClientToScreen(hWnd, &Pt);
             lParam = MAKELPARAM(Pt.x, Pt.y);
             if (bUnicode)
@@ -1081,8 +1089,8 @@
                 
                 Style = GetWindowLongW(hWnd, GWL_STYLE);
                 
-                Pt.x = SLOWORD(lParam);
-                Pt.y = SHIWORD(lParam);
+                Pt.x = GET_X_LPARAM(lParam);
+                Pt.y = GET_Y_LPARAM(lParam);
                 if (Style & WS_CHILD)
                 {
                     ScreenToClient(GetParent(hWnd), &Pt);
@@ -1286,8 +1294,8 @@
         case WM_SYSCOMMAND:
         {
             POINT Pt;
-            Pt.x = SLOWORD(lParam);
-            Pt.y = SHIWORD(lParam);
+            Pt.x = GET_X_LPARAM(lParam);
+            Pt.y = GET_Y_LPARAM(lParam);
             return (DefWndHandleSysCommand(hWnd, wParam, Pt));
         }
 

reactos/lib/user32/windows
dialog.c 1.24 -> 1.25
diff -u -r1.24 -r1.25
--- dialog.c	23 Jan 2004 23:38:26 -0000	1.24
+++ dialog.c	9 Apr 2004 20:03:14 -0000	1.25
@@ -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: dialog.c,v 1.24 2004/01/23 23:38:26 ekohl Exp $
+/* $Id: dialog.c,v 1.25 2004/04/09 20:03:14 navaraf Exp $
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/windows/dialog.c
@@ -30,19 +30,21 @@
  */
 
 /* INCLUDES ******************************************************************/
+
 #define __NTAPP__
 #include <windows.h>
 #include <string.h>
 #include <user32.h>
-#include <ntos/rtl.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <limits.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 #include <debug.h>
 
 #include "user32/regcontrol.h"
 #include "../controls/controls.h"
 
-
 /* MACROS/DEFINITIONS ********************************************************/
 
 #define DF_END  0x0001
@@ -1259,7 +1261,7 @@
 
     if (!str) return NULL;
     len = WideCharToMultiByte( CP_ACP, 0, str, -1, NULL, 0, NULL, NULL );
-    ret = RtlAllocateHeap(RtlGetProcessHeap(), flags, len );
+    ret = RtlAllocateHeap(GetProcessHeap(), flags, len );
     if(ret) WideCharToMultiByte( CP_ACP, 0, str, -1, ret, len, NULL, NULL );
     return ret;
 }

reactos/lib/user32/windows
hook.c 1.14 -> 1.15
diff -u -r1.14 -r1.15
--- hook.c	23 Jan 2004 23:38:26 -0000	1.14
+++ hook.c	9 Apr 2004 20:03:14 -0000	1.15
@@ -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: hook.c,v 1.14 2004/01/23 23:38:26 ekohl Exp $
+/* $Id: hook.c,v 1.15 2004/04/09 20:03:14 navaraf Exp $
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/windows/input.c
@@ -31,6 +31,8 @@
 #include <windows.h>
 #include <user32.h>
 #include <user32/callback.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 
 #define NDEBUG
 #include <debug.h>
@@ -205,13 +207,13 @@
 HWINEVENTHOOK
 STDCALL
 SetWinEventHook(
-		DWORD        eventMin,
-		DWORD        eventMax,
+		UINT         eventMin,
+		UINT         eventMax,
 		HMODULE      hmodWinEventProc,
 		WINEVENTPROC pfnWinEventProc,
 		DWORD        idProcess,
 		DWORD        idThread,
-		DWORD        dwFlags
+		UINT         dwFlags
 		)
 {
   UNIMPLEMENTED;
@@ -347,11 +349,11 @@
             {
               if (0 != HIWORD(Csa.lpszClass))
                 {
-                  RtlFreeHeap(RtlGetProcessHeap(), 0, (LPSTR) Csa.lpszClass);
+                  RtlFreeHeap(GetProcessHeap(), 0, (LPSTR) Csa.lpszClass);
                 }
               if (NULL != Csa.lpszName)
                 {
-                  RtlFreeHeap(RtlGetProcessHeap(), 0, (LPSTR) Csa.lpszName);
+                  RtlFreeHeap(GetProcessHeap(), 0, (LPSTR) Csa.lpszName);
                 }
             }
           break;

reactos/lib/user32/windows
icon.c 1.20 -> 1.21
diff -u -r1.20 -r1.21
--- icon.c	23 Feb 2004 22:04:38 -0000	1.20
+++ icon.c	9 Apr 2004 20:03:14 -0000	1.21
@@ -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: icon.c,v 1.20 2004/02/23 22:04:38 navaraf Exp $
+/* $Id: icon.c,v 1.21 2004/04/09 20:03:14 navaraf Exp $
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/windows/icon.c
@@ -32,6 +32,8 @@
 #include <user32.h>
 #include <string.h>
 #include <stdlib.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 #include <debug.h>
 
 /* FUNCTIONS *****************************************************************/
@@ -56,7 +58,7 @@
                                       (IconImage->icHeader.biHeight );
 
   /* create a BITMAPINFO header for the monocrome part of the icon */
-  bwBIH = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof (BITMAPINFOHEADER)+2*sizeof(RGBQUAD));
+  bwBIH = RtlAllocateHeap(GetProcessHeap(), 0, sizeof (BITMAPINFOHEADER)+2*sizeof(RGBQUAD));
 
   bwBIH->bmiHeader.biBitCount = 1;
   bwBIH->bmiHeader.biWidth = IconImage->icHeader.biWidth;
@@ -88,7 +90,7 @@
   SetDIBits(hDC, IconInfo.hbmMask, 0, IconImage->icHeader.biHeight, 
             ImageData, bwBIH, DIB_RGB_COLORS);
   
-  RtlFreeHeap(RtlGetProcessHeap(), 0, bwBIH);
+  RtlFreeHeap(GetProcessHeap(), 0, bwBIH);
   
   /* Create the icon based on everything we have so far */
   return NtUserCreateCursorIconHandle(&IconInfo, FALSE);
@@ -107,7 +109,7 @@
   IconInfo.yHotspot = yHotspot;
   
   /* create a BITMAPINFO header for the monocrome part of the icon */
-  bwBIH = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof (BITMAPINFOHEADER)+2*sizeof(RGBQUAD));
+  bwBIH = RtlAllocateHeap(GetProcessHeap(), 0, sizeof (BITMAPINFOHEADER)+2*sizeof(RGBQUAD));
 
   bwBIH->bmiHeader.biBitCount = 1;
   bwBIH->bmiHeader.biWidth = IconImage->icHeader.biWidth;
@@ -145,7 +147,7 @@
   
   IconInfo.hbmColor = (HBITMAP)0;
   
-  RtlFreeHeap(RtlGetProcessHeap(), 0, bwBIH);
+  RtlFreeHeap(GetProcessHeap(), 0, bwBIH);
   
   /* Create the icon based on everything we have so far */
   return NtUserCreateCursorIconHandle(&IconInfo, FALSE);
@@ -269,7 +271,7 @@
     }
 
   /* get an safe copy of the icon data */
-  SafeIconImage = RtlAllocateHeap(RtlGetProcessHeap(), 0, cbIconBits);
+  SafeIconImage = RtlAllocateHeap(GetProcessHeap(), 0, cbIconBits);
   memcpy(SafeIconImage, pbIconBits, cbIconBits);
   
   /* take into acount the origonal height was for both the AND and XOR images */
@@ -296,7 +298,7 @@
   hScreenDc = CreateCompatibleDC(NULL);
   if (hScreenDc == NULL)
     {
-      RtlFreeHeap(RtlGetProcessHeap(), 0, SafeIconImage);
+      RtlFreeHeap(GetProcessHeap(), 0, SafeIconImage);
       return(NULL);
     }
 
@@ -304,7 +306,7 @@
     hIcon = ICON_CreateIconFromData(hScreenDc, Data, SafeIconImage, cxDesired, cyDesired, wXHotspot, wYHotspot);
   else
     hIcon = ICON_CreateCursorFromData(hScreenDc, Data, SafeIconImage, cxDesired, cyDesired, wXHotspot, wYHotspot);
-  RtlFreeHeap(RtlGetProcessHeap(), 0, SafeIconImage);
+  RtlFreeHeap(GetProcessHeap(), 0, SafeIconImage);
   DeleteDC(hScreenDc);
 
   return hIcon;

reactos/lib/user32/windows
mdi.c 1.11 -> 1.12
diff -u -r1.11 -r1.12
--- mdi.c	22 Dec 2003 15:30:03 -0000	1.11
+++ mdi.c	9 Apr 2004 20:03:15 -0000	1.12
@@ -80,10 +80,6 @@
  *
  */
 
-#ifdef __REACTOS__
-#define __USE_W32API
-#endif
-
 #include <stdlib.h>
 #include <stdarg.h>
 #include <stdio.h>

reactos/lib/user32/windows
menu.c 1.61 -> 1.62
diff -u -r1.61 -r1.62
--- menu.c	2 Apr 2004 19:14:44 -0000	1.61
+++ menu.c	9 Apr 2004 20:03:15 -0000	1.62
@@ -21,7 +21,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: menu.c,v 1.61 2004/04/02 19:14:44 weiden Exp $
+/* $Id: menu.c,v 1.62 2004/04/09 20:03:15 navaraf Exp $
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/windows/menu.c
@@ -41,7 +41,8 @@
 #include <draw.h>
 #include <window.h>
 #include <strpool.h>
-#include <ntos/rtl.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 
 #include <user32/callback.h>
 #include "user32/regcontrol.h"
@@ -3585,7 +3586,7 @@
 /*
  * @implemented
  */
-UINT STDCALL
+BOOL STDCALL
 EnableMenuItem(HMENU hMenu,
 	       UINT uIDEnableItem,
 	       UINT uEnable)
@@ -4030,7 +4031,7 @@
   UNICODE_STRING MenuText;
   BOOL res = FALSE;
   BOOL CleanHeap = FALSE;
-  HANDLE hHeap = RtlGetProcessHeap();
+  HANDLE hHeap = GetProcessHeap();
   mi.hbmpItem = (HBITMAP)0;
 
   // while we could just pass 'lpmii' to win32k, we make a copy so that
@@ -4370,7 +4371,7 @@
   HMENU hMenu,
   UINT uItem,
   BOOL fByPosition,
-  LPMENUITEMINFOA lpmii)
+  LPCMENUITEMINFOA lpmii)
 {
   UNIMPLEMENTED;
   return FALSE;
@@ -4386,7 +4387,7 @@
   HMENU hMenu,
   UINT uItem,
   BOOL fByPosition,
-  LPMENUITEMINFOW lpmii)
+  LPCMENUITEMINFOW lpmii)
 {
   UNIMPLEMENTED;
   return FALSE;

reactos/lib/user32/windows
message.c 1.36 -> 1.37
diff -u -r1.36 -r1.37
--- message.c	11 Mar 2004 14:47:43 -0000	1.36
+++ message.c	9 Apr 2004 20:03:15 -0000	1.37
@@ -1,4 +1,4 @@
-/* $Id: message.c,v 1.36 2004/03/11 14:47:43 weiden Exp $
+/* $Id: message.c,v 1.37 2004/04/09 20:03:15 navaraf Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS user32.dll
@@ -12,6 +12,8 @@
 #include <user32.h>
 #include <string.h>
 #include <debug.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 
 /*
  * @implemented
@@ -316,7 +318,7 @@
 	ANSI_STRING AString;
 
 	CsW = (CREATESTRUCTW*)(*lParam);
-	CsA = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof(CREATESTRUCTA));
+	CsA = RtlAllocateHeap(GetProcessHeap(), 0, sizeof(CREATESTRUCTA));
 	memcpy(CsA, CsW, sizeof(CREATESTRUCTW));
 
 	RtlInitUnicodeString(&UString, CsW->lpszName);
@@ -360,7 +362,7 @@
 	LPSTR TempString;
 	LPSTR InString;
 	InString = (LPSTR)lParam;
-	TempString = RtlAllocateHeap(RtlGetProcessHeap(), 0, strlen(InString) + 1);
+	TempString = RtlAllocateHeap(GetProcessHeap(), 0, strlen(InString) + 1);
 	strcpy(TempString, InString);
 	RtlInitAnsiString(&AnsiString, TempString);
 	UnicodeString.Length = wParam * sizeof(WCHAR);
@@ -375,7 +377,7 @@
 		UnicodeString.Buffer[0] = L'\0';
 	      }
 	  }
-	RtlFreeHeap(RtlGetProcessHeap(), 0, TempString);
+	RtlFreeHeap(GetProcessHeap(), 0, TempString);
 	break;
       }
     case WM_SETTEXT:
@@ -391,12 +393,12 @@
 	CREATESTRUCTA* Cs;
 
 	Cs = (CREATESTRUCTA*)lParam;
-	RtlFreeHeap(RtlGetProcessHeap(), 0, (LPSTR)Cs->lpszName);
+	RtlFreeHeap(GetProcessHeap(), 0, (LPSTR)Cs->lpszName);
 	if (HIWORD((ULONG)Cs->lpszClass) != 0)
 	  {
-            RtlFreeHeap(RtlGetProcessHeap(), 0, (LPSTR)Cs->lpszClass);
+            RtlFreeHeap(GetProcessHeap(), 0, (LPSTR)Cs->lpszClass);
 	  }
-	RtlFreeHeap(RtlGetProcessHeap(), 0, Cs);
+	RtlFreeHeap(GetProcessHeap(), 0, Cs);
 	break;
       }
     }
@@ -475,6 +477,10 @@
   BOOL IsHandle;
   WndProcHandle wphData;
 
+  DbgPrint("CallWindowProcA(%p,%x,%x,%x,%x)\n",lpPrevWndFunc,hWnd,Msg,wParam,lParam);
+  if (lpPrevWndFunc == NULL)
+    lpPrevWndFunc = (WNDPROC)NtUserGetWindowLong(hWnd, GWL_WNDPROC, FALSE);
+
   IsHandle = NtUserDereferenceWndProcHandle(lpPrevWndFunc,&wphData);
   if (! IsHandle)
     {
@@ -967,18 +973,19 @@
  * @implemented
  */
 BOOL STDCALL
-TranslateMessage(CONST MSG *lpMsg)
+TranslateMessageEx(CONST MSG *lpMsg, DWORD unk)
 {
-  return(TranslateMessageEx((LPMSG)lpMsg, 0));
+  return(NtUserTranslateMessage((LPMSG)lpMsg, (HKL)unk));
 }
 
+
 /*
  * @implemented
  */
 BOOL STDCALL
-TranslateMessageEx(CONST MSG *lpMsg, DWORD unk)
+TranslateMessage(CONST MSG *lpMsg)
 {
-  return(NtUserTranslateMessage((LPMSG)lpMsg, (HKL)unk));
+  return(TranslateMessageEx((LPMSG)lpMsg, 0));
 }
 
 
@@ -1112,7 +1119,7 @@
   return TRUE;
 }
 typedef DWORD (WINAPI * RealGetQueueStatusProc)(UINT flags);
-typedef DWORD (WINAPI * RealMsgWaitForMultipleObjectsExProc)(DWORD nCount, LPHANDLE lpHandles, DWORD dwMilliseconds, DWORD dwWakeMask, DWORD dwFlags);
+typedef DWORD (WINAPI * RealMsgWaitForMultipleObjectsExProc)(DWORD nCount, CONST HANDLE *lpHandles, DWORD dwMilliseconds, DWORD dwWakeMask, DWORD dwFlags);
 
 typedef struct _USER_MESSAGE_PUMP_ADDRESSES {
 	DWORD cbSize;
@@ -1126,14 +1133,14 @@
 STDCALL
 RealMsgWaitForMultipleObjectsEx(
   DWORD nCount,
-  LPHANDLE pHandles,
+  CONST HANDLE *pHandles,
   DWORD dwMilliseconds,
   DWORD dwWakeMask,
   DWORD dwFlags);
 
 typedef BOOL (WINAPI * MESSAGEPUMPHOOKPROC)(BOOL Unregistering,PUSER_MESSAGE_PUMP_ADDRESSES MessagePumpAddresses);
 
-RTL_CRITICAL_SECTION gcsMPH;
+CRITICAL_SECTION gcsMPH;
 MESSAGEPUMPHOOKPROC gpfnInitMPH;
 DWORD gcLoadMPH = 0;
 USER_MESSAGE_PUMP_ADDRESSES gmph = {sizeof(USER_MESSAGE_PUMP_ADDRESSES),
@@ -1173,10 +1180,10 @@
 
 BOOL WINAPI RegisterMessagePumpHook(MESSAGEPUMPHOOKPROC Hook)
 {
-	RtlEnterCriticalSection(&gcsMPH);
+	EnterCriticalSection(&gcsMPH);
 	if(!Hook) {
 		SetLastError(ERROR_INVALID_PARAMETER);
-		RtlLeaveCriticalSection(&gcsMPH);
+		LeaveCriticalSection(&gcsMPH);
 		return FALSE;
 	}
 	if(!gcLoadMPH) {
@@ -1184,30 +1191,30 @@
 		gpfnInitMPH = Hook;
 		ResetMessagePumpHook(&Addresses);
 		if(!Hook(FALSE, &Addresses) || !Addresses.cbSize) {
-			RtlLeaveCriticalSection(&gcsMPH);
+			LeaveCriticalSection(&gcsMPH);
 			return FALSE;
 		}
 		memcpy(&gmph, &Addresses, Addresses.cbSize);
 	} else {
 		if(gpfnInitMPH != Hook) {
-			RtlLeaveCriticalSection(&gcsMPH);
+			LeaveCriticalSection(&gcsMPH);
 			return FALSE;
 		}
 	}
 	if(NtUserCallNoParam(NOPARAM_ROUTINE_INIT_MESSAGE_PUMP)) {
-		RtlLeaveCriticalSection(&gcsMPH);
+		LeaveCriticalSection(&gcsMPH);
 		return FALSE;
 	}
 	if (!gcLoadMPH++) {
 		InterlockedExchange(&gfMessagePumpHook, 1);
 	}
-	RtlLeaveCriticalSection(&gcsMPH);
+	LeaveCriticalSection(&gcsMPH);
 	return TRUE;
 }
 
 BOOL WINAPI UnregisterMessagePumpHook(VOID)
 {
-	RtlEnterCriticalSection(&gcsMPH);
+	EnterCriticalSection(&gcsMPH);
 	if(gcLoadMPH > 0) {
 		if(NtUserCallNoParam(NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP)) {
 			gcLoadMPH--;
@@ -1217,11 +1224,11 @@
 				ResetMessagePumpHook(&gmph);
 				gpfnInitMPH = 0;
 			}
-			RtlLeaveCriticalSection(&gcsMPH);
+			LeaveCriticalSection(&gcsMPH);
 			return TRUE;
 		}
 	}
-	RtlLeaveCriticalSection(&gcsMPH);
+	LeaveCriticalSection(&gcsMPH);
 	return FALSE;
 }
 
@@ -1230,7 +1237,7 @@
 	return IsInsideMessagePumpHook() ? gmph.RealGetQueueStatus(flags) : RealGetQueueStatus(flags);
 }
 
-DWORD WINAPI MsgWaitForMultipleObjectsEx(DWORD nCount, LPHANDLE lpHandles, DWORD dwMilliseconds, DWORD dwWakeMask, DWORD dwFlags)
+DWORD WINAPI MsgWaitForMultipleObjectsEx(DWORD nCount, CONST HANDLE *lpHandles, DWORD dwMilliseconds, DWORD dwWakeMask, DWORD dwFlags)
 {
-	return IsInsideMessagePumpHook() ? gmph.RealMsgWaitForMultipleObjectsEx(nCount, lpHandles,dwMilliseconds, dwWakeMask, dwFlags) : RealMsgWaitForMultipleObjectsEx(nCount, lpHandles,dwMilliseconds, dwWakeMask, dwFlags);
+	return IsInsideMessagePumpHook() ? gmph.RealMsgWaitForMultipleObjectsEx(nCount, lpHandles, dwMilliseconds, dwWakeMask, dwFlags) : RealMsgWaitForMultipleObjectsEx(nCount, lpHandles,dwMilliseconds, dwWakeMask, dwFlags);
 }

reactos/lib/user32/windows
messagebox.c 1.24 -> 1.25
diff -u -r1.24 -r1.25
--- messagebox.c	5 Feb 2004 22:09:15 -0000	1.24
+++ messagebox.c	9 Apr 2004 20:03:15 -0000	1.25
@@ -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: messagebox.c,v 1.24 2004/02/05 22:09:15 gvg Exp $
+/* $Id: messagebox.c,v 1.25 2004/04/09 20:03:15 navaraf Exp $
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/windows/messagebox.c
@@ -35,13 +35,14 @@
 #include <messages.h>
 #include <user32.h>
 #include <string.h>
-#include <ntos/rtl.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <debug.h>
 #include "resource.h"
 
-typedef UINT *LPUINT;
+//typedef UINT *LPUINT;
 #include <mmsystem.h>
 
 /* DEFINES *******************************************************************/
@@ -207,7 +208,7 @@
 #define SAFETY_MARGIN 32 /* Extra number of bytes to allocate in case we counted wrong */
 static int
 MessageBoxTimeoutIndirectW(
-  CONST LPMSGBOXPARAMS lpMsgBoxParams, UINT Timeout)
+  CONST MSGBOXPARAMS *lpMsgBoxParams, UINT Timeout)
 {
     DLGTEMPLATE *tpl;
     DLGITEMTEMPLATE *iico, *itxt;
@@ -393,7 +394,7 @@
                  (wcslen(ButtonText[i]) + 1) * sizeof(WCHAR);
     }
     
-    buf = RtlAllocateHeap(RtlGetProcessHeap(), 0, bufsize + SAFETY_MARGIN);
+    buf = RtlAllocateHeap(GetProcessHeap(), 0, bufsize + SAFETY_MARGIN);
         /* Just to be safe.... */
     if(!buf)
     {
@@ -633,7 +634,7 @@
     if(hFont)
       DeleteObject(hFont);
     
-    RtlFreeHeap(RtlGetProcessHeap(), 0, buf);
+    RtlFreeHeap(GetProcessHeap(), 0, buf);
     return ret;
 }
 
@@ -667,7 +668,7 @@
   UINT uType,
   WORD wLanguageId)
 {
-    MSGBOXPARAMS msgbox;
+    MSGBOXPARAMSA msgbox;
 
     msgbox.cbSize = sizeof(msgbox);
     msgbox.hwndOwner = hWnd;
@@ -696,13 +697,13 @@
   UINT uType,
   WORD wLanguageId)
 {
-    MSGBOXPARAMS msgbox;
+    MSGBOXPARAMSW msgbox;
 
     msgbox.cbSize = sizeof(msgbox);
     msgbox.hwndOwner = hWnd;
     msgbox.hInstance = 0;
-    msgbox.lpszText = (LPCSTR)lpText;
-    msgbox.lpszCaption =(LPCSTR) lpCaption;
+    msgbox.lpszText = lpText;
+    msgbox.lpszCaption = lpCaption;
     msgbox.dwStyle = uType;
     msgbox.lpszIcon = NULL;
     msgbox.dwContextHelpId = 0;
@@ -719,9 +720,9 @@
 int
 STDCALL
 MessageBoxIndirectA(
-  CONST LPMSGBOXPARAMS lpMsgBoxParams)
+  CONST MSGBOXPARAMSA *lpMsgBoxParams)
 {
-    MSGBOXPARAMS msgboxW;
+    MSGBOXPARAMSW msgboxW;
     UNICODE_STRING textW, captionW, iconW;
     int ret;
 
@@ -764,10 +765,10 @@
     msgboxW.cbSize = sizeof(msgboxW);
     msgboxW.hwndOwner = lpMsgBoxParams->hwndOwner;
     msgboxW.hInstance = lpMsgBoxParams->hInstance;
-    msgboxW.lpszText = (LPCSTR)textW.Buffer;
-    msgboxW.lpszCaption = (LPCSTR)captionW.Buffer;
+    msgboxW.lpszText = textW.Buffer;
+    msgboxW.lpszCaption = captionW.Buffer;
     msgboxW.dwStyle = lpMsgBoxParams->dwStyle;
-    msgboxW.lpszIcon = (LPCSTR)iconW.Buffer;
+    msgboxW.lpszIcon = iconW.Buffer;
     msgboxW.dwContextHelpId = lpMsgBoxParams->dwContextHelpId;
     msgboxW.lpfnMsgBoxCallback = lpMsgBoxParams->lpfnMsgBoxCallback;
     msgboxW.dwLanguageId = lpMsgBoxParams->dwLanguageId;
@@ -793,7 +794,7 @@
 int
 STDCALL
 MessageBoxIndirectW(
-  CONST LPMSGBOXPARAMS lpMsgBoxParams)
+  CONST MSGBOXPARAMSW *lpMsgBoxParams)
 {
     return MessageBoxTimeoutIndirectW(lpMsgBoxParams, (UINT)-1);
 }
@@ -826,7 +827,7 @@
   WORD wLanguageId,
   DWORD dwTime)
 {
-    MSGBOXPARAMS msgboxW;
+    MSGBOXPARAMSW msgboxW;
     UNICODE_STRING textW, captionW;
     int ret;
 
@@ -843,8 +844,8 @@
     msgboxW.cbSize = sizeof(msgboxW);
     msgboxW.hwndOwner = hWnd;
     msgboxW.hInstance = 0;
-    msgboxW.lpszText = (LPCSTR)textW.Buffer;
-    msgboxW.lpszCaption = (LPCSTR)captionW.Buffer;
+    msgboxW.lpszText = textW.Buffer;
+    msgboxW.lpszCaption = captionW.Buffer;
     msgboxW.dwStyle = uType;
     msgboxW.lpszIcon = NULL;
     msgboxW.dwContextHelpId = 0;
@@ -875,13 +876,13 @@
   WORD wLanguageId,
   DWORD dwTime)
 {
-    MSGBOXPARAMS msgbox;
+    MSGBOXPARAMSW msgbox;
 
     msgbox.cbSize = sizeof(msgbox);
     msgbox.hwndOwner = hWnd;
     msgbox.hInstance = 0;
-    msgbox.lpszText = (LPCSTR)lpText;
-    msgbox.lpszCaption =(LPCSTR) lpCaption;
+    msgbox.lpszText = lpText;
+    msgbox.lpszCaption = lpCaption;
     msgbox.dwStyle = uType;
     msgbox.lpszIcon = NULL;
     msgbox.dwContextHelpId = 0;

reactos/lib/user32/windows
nonclient.c 1.49 -> 1.50
diff -u -r1.49 -r1.50
--- nonclient.c	5 Apr 2004 19:54:10 -0000	1.49
+++ nonclient.c	9 Apr 2004 20:03:15 -0000	1.50
@@ -66,6 +66,7 @@
              ((Style & WS_CHILD) && (ParentStyle & WS_THICKFRAME) && !(ParentStyle & WS_MAXIMIZE) && \
              (WindowRect.right - WindowRect.left == ParentClientRect.right) && \
              (WindowRect.bottom - WindowRect.top == ParentClientRect.bottom)))
+
 /*
  * FIXME: This should be moved to a header
  */
@@ -76,6 +77,8 @@
 HPEN STDCALL
 GetSysColorPen(int nIndex);
 
+BOOL STDCALL GdiGradientFill(HDC,PTRIVERTEX,ULONG,PVOID,ULONG,ULONG);
+
 extern ATOM AtomInternalPos;
 
 /* PRIVATE FUNCTIONS **********************************************************/

reactos/lib/user32/windows
paint.c 1.25 -> 1.26
diff -u -r1.25 -r1.26
--- paint.c	23 Mar 2004 21:47:37 -0000	1.25
+++ paint.c	9 Apr 2004 20:03:15 -0000	1.26
@@ -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: paint.c,v 1.25 2004/03/23 21:47:37 weiden Exp $
+/* $Id: paint.c,v 1.26 2004/04/09 20:03:15 navaraf Exp $
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/windows/paint.c
@@ -38,6 +38,8 @@
 static HBITMAP hHatch;
 const DWORD HatchBitmap[4] = {0x5555AAAA, 0x5555AAAA, 0x5555AAAA, 0x5555AAAA};
 
+BOOL STDCALL PolyPatBlt(HDC,DWORD,PPATRECT,INT,ULONG);
+
 /* FUNCTIONS *****************************************************************/
 
 VOID 

reactos/lib/user32/windows
prop.c 1.11 -> 1.12
diff -u -r1.11 -r1.12
--- prop.c	23 Jan 2004 23:38:26 -0000	1.11
+++ prop.c	9 Apr 2004 20:03:15 -0000	1.12
@@ -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: prop.c,v 1.11 2004/01/23 23:38:26 ekohl Exp $
+/* $Id: prop.c,v 1.12 2004/04/09 20:03:15 navaraf Exp $
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/windows/input.c
@@ -31,6 +31,8 @@
 #include <windows.h>
 #include <user32.h>
 #include <strpool.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 #include <debug.h>
 
 typedef struct _PROPLISTITEM
@@ -72,12 +74,12 @@
   
   if(Count > 0)
   {
-    pli = HEAP_alloc(Count);
+    pli = RtlAllocateHeap(GetProcessHeap(), 0, Count);
     
     Status = NtUserBuildPropList(hWnd, (LPVOID)pli, Count, &Count);
     if(!NT_SUCCESS(Status))
     {
-      HEAP_free(pli);
+      RtlFreeHeap(GetProcessHeap(), 0, pli);
       if(Status == STATUS_INVALID_HANDLE)
         SetLastError(ERROR_INVALID_WINDOW_HANDLE);
       else
@@ -98,7 +100,7 @@
         break;
     }
     
-    HEAP_free(pli);
+    RtlFreeHeap(GetProcessHeap(), 0, pli);
   }
   
   return ret;
@@ -134,12 +136,12 @@
   
   if(Count > 0)
   {
-    pli = HEAP_alloc(Count);
+    pli = RtlAllocateHeap(GetProcessHeap(), 0, Count);
     
     Status = NtUserBuildPropList(hWnd, (LPVOID)pli, Count, &Count);
     if(!NT_SUCCESS(Status))
     {
-      HEAP_free(pli);
+      RtlFreeHeap(GetProcessHeap(), 0, pli);
       if(Status == STATUS_INVALID_HANDLE)
         SetLastError(ERROR_INVALID_WINDOW_HANDLE);
       else
@@ -160,7 +162,7 @@
         break;
     }
     
-    HEAP_free(pli);
+    RtlFreeHeap(GetProcessHeap(), 0, pli);
   }
   
   return ret;
@@ -196,12 +198,12 @@
   
   if(Count > 0)
   {
-    pli = HEAP_alloc(Count);
+    pli = RtlAllocateHeap(GetProcessHeap(), 0, Count);
     
     Status = NtUserBuildPropList(hWnd, (LPVOID)pli, Count, &Count);
     if(!NT_SUCCESS(Status))
     {
-      HEAP_free(pli);
+      RtlFreeHeap(GetProcessHeap(), 0, pli);
       if(Status == STATUS_INVALID_HANDLE)
         SetLastError(ERROR_INVALID_WINDOW_HANDLE);
       else
@@ -222,7 +224,7 @@
         break;
     }
     
-    HEAP_free(pli);
+    RtlFreeHeap(GetProcessHeap(), 0, pli);
   }
   
   return ret;
@@ -258,12 +260,12 @@
   
   if(Count > 0)
   {
-    pli = HEAP_alloc(Count);
+    pli = RtlAllocateHeap(GetProcessHeap(), 0, Count);
     
     Status = NtUserBuildPropList(hWnd, (LPVOID)pli, Count, &Count);
     if(!NT_SUCCESS(Status))
     {
-      HEAP_free(pli);
+      RtlFreeHeap(GetProcessHeap(), 0, pli);
       if(Status == STATUS_INVALID_HANDLE)
         SetLastError(ERROR_INVALID_WINDOW_HANDLE);
       else
@@ -284,7 +286,7 @@
         break;
     }
     
-    HEAP_free(pli);
+    RtlFreeHeap(GetProcessHeap(), 0, pli);
   }
   
   return ret;

reactos/lib/user32/windows
text.c 1.8 -> 1.9
diff -u -r1.8 -r1.9
--- text.c	23 Jan 2004 23:38:26 -0000	1.8
+++ text.c	9 Apr 2004 20:03:15 -0000	1.9
@@ -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: text.c,v 1.8 2004/01/23 23:38:26 ekohl Exp $
+/* $Id: text.c,v 1.9 2004/04/09 20:03:15 navaraf Exp $
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/windows/input.c
@@ -32,12 +32,10 @@
 
 #include <windows.h>
 #include <user32.h>
-
-#include <ntos/rtl.h>
-
+#define NTOS_MODE_USER
+#include <ntos.h>
 #include <debug.h>
 
-
 const unsigned short wctype_table[] =
 {
 };

reactos/lib/user32/windows
window.c 1.107 -> 1.108
diff -u -r1.107 -r1.108
--- window.c	8 Apr 2004 21:14:21 -0000	1.107
+++ window.c	9 Apr 2004 20:03:15 -0000	1.108
@@ -1,4 +1,4 @@
-/* $Id: window.c,v 1.107 2004/04/08 21:14:21 navaraf Exp $
+/* $Id: window.c,v 1.108 2004/04/09 20:03:15 navaraf Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS user32.dll
@@ -18,6 +18,8 @@
 #include <strpool.h>
 #include <user32/callback.h>
 #include <user32/regcontrol.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 
 #define NDEBUG
 #include <debug.h>
@@ -1453,7 +1455,7 @@
 /*
  * @implemented
  */
-DWORD
+INT
 STDCALL
 InternalGetWindowText(HWND hWnd, LPWSTR lpString, int nMaxCount)
 {

reactos/subsys/csrss/api
handle.c 1.16 -> 1.17
diff -u -r1.16 -r1.17
--- handle.c	11 Jan 2004 17:31:15 -0000	1.16
+++ handle.c	9 Apr 2004 20:03:15 -0000	1.17
@@ -1,4 +1,4 @@
-/* $Id: handle.c,v 1.16 2004/01/11 17:31:15 gvg Exp $
+/* $Id: handle.c,v 1.17 2004/04/09 20:03:15 navaraf Exp $
  *
  * reactos/subsys/csrss/api/handle.c
  *
@@ -9,9 +9,8 @@
 
 /* INCLUDES ******************************************************************/
 
-#include <ddk/ntddk.h>
-
 #include <csrss/csrss.h>
+#include <ddk/ntddk.h>
 #include <ntdll/rtl.h>
 #include "api.h"
 

reactos/subsys/csrss/api
process.c 1.32 -> 1.33
diff -u -r1.32 -r1.33
--- process.c	11 Jan 2004 17:31:15 -0000	1.32
+++ process.c	9 Apr 2004 20:03:15 -0000	1.33
@@ -1,4 +1,4 @@
-/* $Id: process.c,v 1.32 2004/01/11 17:31:15 gvg Exp $
+/* $Id: process.c,v 1.33 2004/04/09 20:03:15 navaraf Exp $
  *
  * reactos/subsys/csrss/api/process.c
  *
@@ -9,9 +9,8 @@
 
 /* INCLUDES ******************************************************************/
 
-#include <ddk/ntddk.h>
-
 #include <csrss/csrss.h>
+#include <ddk/ntddk.h>
 #include <ntdll/rtl.h>
 #include "api.h"
 #include "conio.h"
@@ -172,8 +171,7 @@
    CSRSS_API_REQUEST ApiRequest;
    CSRSS_API_REPLY ApiReply;
 
-   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) -
-     sizeof(LPC_MESSAGE);
+   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
    Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
 
    NewProcessData = CsrCreateProcessData(Request->Data.CreateProcessRequest.NewProcessId);
@@ -195,11 +193,11 @@
      {
         ApiRequest.Type = CSRSS_ALLOC_CONSOLE;
         ApiRequest.Header.DataSize = sizeof(CSRSS_ALLOC_CONSOLE_REQUEST);
-        ApiRequest.Header.MessageSize = sizeof(LPC_MESSAGE) + sizeof(CSRSS_ALLOC_CONSOLE_REQUEST);
+        ApiRequest.Header.MessageSize = LPC_MESSAGE_BASE_SIZE + sizeof(CSRSS_ALLOC_CONSOLE_REQUEST);
         ApiRequest.Data.AllocConsoleRequest.CtrlDispatcher = Request->Data.CreateProcessRequest.CtrlDispatcher;
 
         ApiReply.Header.DataSize = sizeof(CSRSS_ALLOC_CONSOLE_REPLY);
-        ApiReply.Header.MessageSize = sizeof(LPC_MESSAGE) + sizeof(CSRSS_ALLOC_CONSOLE_REPLY);
+        ApiReply.Header.MessageSize = LPC_MESSAGE_BASE_SIZE + sizeof(CSRSS_ALLOC_CONSOLE_REPLY);
 
         CsrApiCallHandler(NewProcessData, &ApiRequest, &ApiReply);
 
@@ -263,8 +261,7 @@
 {
    NTSTATUS Status;
 
-   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY)
-      - sizeof(LPC_MESSAGE);
+   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
    Reply->Header.DataSize = sizeof(CSRSS_API_REPLY);
 
    if (ProcessData == NULL)
@@ -281,8 +278,7 @@
 CSR_API(CsrConnectProcess)
 {
    Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) -
-     sizeof(LPC_MESSAGE);
+   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
    Reply->Status = STATUS_SUCCESS;
 
@@ -292,8 +288,7 @@
 CSR_API(CsrGetShutdownParameters)
 {
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) -
-    sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   if (ProcessData == NULL)
   {
@@ -311,8 +306,7 @@
 CSR_API(CsrSetShutdownParameters)
 {
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) -
-    sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   if (ProcessData == NULL)
   {
@@ -330,7 +324,7 @@
 CSR_API(CsrGetInputHandle)
 {
    Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
    if (ProcessData == NULL)
    {
@@ -355,7 +349,7 @@
 CSR_API(CsrGetOutputHandle)
 {
    Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
    if (ProcessData == NULL)
    {
@@ -382,7 +376,7 @@
 CSR_API(CsrCloseHandle)
 {
    Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
    if (ProcessData == NULL)
    {
@@ -398,7 +392,7 @@
 CSR_API(CsrVerifyHandle)
 {
    Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
    Reply->Status = CsrVerifyObject(ProcessData, Request->Data.VerifyHandleRequest.Handle);
    if (!NT_SUCCESS(Reply->Status))
@@ -414,7 +408,7 @@
   Object_t *Object;
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   ProcessData = CsrGetProcessData(Request->Data.DuplicateHandleRequest.ProcessId);
   Reply->Status = CsrGetObject(ProcessData, Request->Data.DuplicateHandleRequest.Handle, &Object);

reactos/subsys/csrss/api
user.c 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- user.c	3 Nov 2002 20:01:07 -0000	1.2
+++ user.c	9 Apr 2004 20:03:15 -0000	1.3
@@ -1,4 +1,4 @@
-/* $Id: user.c,v 1.2 2002/11/03 20:01:07 chorns Exp $
+/* $Id: user.c,v 1.3 2004/04/09 20:03:15 navaraf Exp $
  *
  * reactos/subsys/csrss/api/user.c
  *
@@ -32,8 +32,7 @@
   NTSTATUS Status;
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) -
-    sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   if (ServicesProcessIdValid == TRUE)
     {
@@ -56,10 +55,7 @@
 CSR_API(CsrExitReactos)
 {
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) -
-    sizeof(LPC_MESSAGE);
-
-
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   Reply->Status = STATUS_NOT_IMPLEMENTED;
 

reactos/subsys/csrss/api
wapi.c 1.33 -> 1.34
diff -u -r1.33 -r1.34
--- wapi.c	30 Dec 2003 05:10:32 -0000	1.33
+++ wapi.c	9 Apr 2004 20:03:15 -0000	1.34
@@ -1,4 +1,4 @@
-/* $Id: wapi.c,v 1.33 2003/12/30 05:10:32 hyperion Exp $
+/* $Id: wapi.c,v 1.34 2004/04/09 20:03:15 navaraf Exp $
  * 
  * reactos/subsys/csrss/api/wapi.c
  *
@@ -10,10 +10,9 @@
 
 /* INCLUDES ******************************************************************/
 
+#include <csrss/csrss.h>
 #include <ddk/ntddk.h>
-#include <windows.h>
 #include <ntdll/rtl.h>
-#include <csrss/csrss.h>
 #include <debug.h>
 
 #include "api.h"
@@ -93,7 +92,7 @@
     {
       DPRINT1("CSR: Unknown request type 0x%x\n", Request->Type);
       Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-      Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+      Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
       Reply->Status = STATUS_INVALID_SYSTEM_SERVICE;
     }
 }

reactos/subsys/csrss
init.c 1.25 -> 1.26
diff -u -r1.25 -r1.26
--- init.c	3 Dec 2003 21:50:49 -0000	1.25
+++ init.c	9 Apr 2004 20:03:15 -0000	1.26
@@ -1,4 +1,4 @@
-/* $Id: init.c,v 1.25 2003/12/03 21:50:49 gvg Exp $
+/* $Id: init.c,v 1.26 2004/04/09 20:03:15 navaraf Exp $
  * 
  * reactos/subsys/csrss/init.c
  *
@@ -10,11 +10,11 @@
 
 /* INCLUDES ******************************************************************/
 
+#include <csrss/csrss.h>
 #include <ddk/ntddk.h>
 #include <ntdll/csr.h>
 #include <ntdll/rtl.h>
 #include <ntdll/ldr.h>
-#include <csrss/csrss.h>
 #include <win32k/win32k.h>
 #include <rosrtl/string.h>
 

reactos/subsys/csrss
makefile 1.27 -> 1.28
diff -u -r1.27 -r1.28
--- makefile	30 Dec 2003 05:11:54 -0000	1.27
+++ makefile	9 Apr 2004 20:03:15 -0000	1.28
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.27 2003/12/30 05:11:54 hyperion Exp $
+# $Id: makefile,v 1.28 2004/04/09 20:03:15 navaraf Exp $
 
 PATH_TO_TOP = ../..
 
@@ -18,7 +18,7 @@
 TARGET_LFLAGS = -nostdlib
 
 # require os code to explicitly request A/W version of structs/functions
-TARGET_CFLAGS += -D_DISABLE_TIDENTS
+TARGET_CFLAGS += -D__USE_W32API -DWINVER=0x0600 -D_WIN32_WINNT=0x0501
 
 SUBDIRS = win32csr
 

reactos/subsys/csrss
print.c 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- print.c	20 Oct 2003 18:02:04 -0000	1.6
+++ print.c	9 Apr 2004 20:03:15 -0000	1.7
@@ -1,4 +1,4 @@
-/* $Id: print.c,v 1.6 2003/10/20 18:02:04 gvg Exp $
+/* $Id: print.c,v 1.7 2004/04/09 20:03:15 navaraf Exp $
  *
  * smss.c - Session Manager
  * 
@@ -27,17 +27,16 @@
  * 		Compiled successfully with egcs 1.1.2
  */
 
-#include <ddk/ntddk.h>
-
 #include <csrss/csrss.h>
-
+#include <ddk/ntddk.h>
+#include <ntos.h>
 
 VOID STDCALL DisplayString(LPCWSTR lpwString)
 {
    UNICODE_STRING us;
    
    RtlInitUnicodeString (&us, lpwString);
-   NtDisplayString (&us);
+   ZwDisplayString (&us);
 }
 
 VOID STDCALL PrintString (char* fmt, ...)
@@ -48,7 +47,7 @@
    ANSI_STRING AnsiString;
    
    va_start(ap, fmt);
-	vsprintf(buffer, fmt, ap);
+   vsprintf(buffer, fmt, ap);
    va_end(ap);
    
    RtlInitAnsiString (&AnsiString, buffer);

reactos/subsys/csrss
video.c 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- video.c	26 Dec 2003 09:52:37 -0000	1.9
+++ video.c	9 Apr 2004 20:03:15 -0000	1.10
@@ -1,8 +1,11 @@
-/* $Id: video.c,v 1.9 2003/12/26 09:52:37 navaraf Exp $
+/* $Id: video.c,v 1.10 2004/04/09 20:03:15 navaraf Exp $
  *
  * ReactOS Project
  */
+
+#include <windows.h>
 #include <ddk/ntddk.h>
+#include <ddk/ntapi.h>
 #include <rosrtl/string.h>
 
 ULONG
@@ -28,7 +31,7 @@
 			      0,
 			      NULL,
 			      NULL);
-   Status = NtOpenSection(&PhysMemHandle, SECTION_ALL_ACCESS, 
+   Status = ZwOpenSection(&PhysMemHandle, SECTION_ALL_ACCESS, 
 			  &ObjectAttributes);
    if (!NT_SUCCESS(Status))
      {

reactos/subsys/csrss/win32csr
conio.c 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- conio.c	14 Mar 2004 17:53:27 -0000	1.9
+++ conio.c	9 Apr 2004 20:03:16 -0000	1.10
@@ -1,4 +1,4 @@
-/* $Id: conio.c,v 1.9 2004/03/14 17:53:27 weiden Exp $
+/* $Id: conio.c,v 1.10 2004/04/09 20:03:16 navaraf Exp $
  *
  * reactos/subsys/csrss/win32csr/conio.c
  *
@@ -241,7 +241,7 @@
   DPRINT("CsrAllocConsole\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   if (ProcessData == NULL)
     {
@@ -326,7 +326,7 @@
   DPRINT("CsrFreeConsole\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   if (ProcessData == NULL || ProcessData->Console == NULL)
     {
@@ -516,7 +516,7 @@
   /* truncate length to CSRSS_MAX_READ_CONSOLE_REQUEST */
   nNumberOfCharsToRead = Request->Data.ReadConsoleRequest.NrCharactersToRead > CSRSS_MAX_READ_CONSOLE_REQUEST ? CSRSS_MAX_READ_CONSOLE_REQUEST : Request->Data.ReadConsoleRequest.NrCharactersToRead;
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = Reply->Header.MessageSize - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = Reply->Header.MessageSize - LPC_MESSAGE_BASE_SIZE;
 
   Buffer = Reply->Data.ReadConsoleReply.Buffer;
   Status = ConioLockConsole(ProcessData, Request->Data.ReadConsoleRequest.ConsoleHandle,
@@ -842,8 +842,7 @@
   DPRINT("CsrWriteConsole\n");
    
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) -
-                           sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   if (Request->Header.DataSize
       < sizeof(CSRSS_WRITE_CONSOLE_REQUEST) - 1
@@ -1338,7 +1337,7 @@
   DPRINT("CsrGetScreenBufferInfo\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   Status = ConioLockScreenBuffer(ProcessData, Request->Data.ScreenBufferInfoRequest.ConsoleHandle, &Buff);
   if (! NT_SUCCESS(Status))
@@ -1380,7 +1379,7 @@
     }
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   Status = ConioLockScreenBuffer(ProcessData, Request->Data.SetCursorRequest.ConsoleHandle, &Buff);
   if (! NT_SUCCESS(Status))
@@ -1453,8 +1452,7 @@
   DPRINT("CsrWriteConsoleOutputChar\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) -
-                           sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   if (Request->Header.DataSize
       < sizeof(CSRSS_WRITE_CONSOLE_OUTPUT_CHAR_REQUEST) - 1
@@ -1533,7 +1531,7 @@
   DPRINT("CsrFillOutputChar\n");
    
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   Status = ConioConsoleFromProcessData(ProcessData, &Console);
   if (! NT_SUCCESS(Status))
@@ -1598,7 +1596,7 @@
   DPRINT("CsrReadInputEvent\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
   Reply->Data.ReadInputReply.Event = ProcessData->ConsoleEvent;
    
   Status = ConioLockConsole(ProcessData, Request->Data.ReadInputRequest.ConsoleHandle, &Console);
@@ -1655,8 +1653,7 @@
   DPRINT("CsrWriteConsoleOutputAttrib\n");
    
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) -
-                           sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   if (Request->Header.DataSize
       < sizeof(CSRSS_WRITE_CONSOLE_OUTPUT_ATTRIB_REQUEST) - 1
@@ -1743,7 +1740,7 @@
     }
    
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
   Status = ConioLockScreenBuffer(ProcessData, Request->Data.FillOutputAttribRequest.ConsoleHandle, &Buff);
   if (! NT_SUCCESS(Status))
     {
@@ -1799,7 +1796,7 @@
   DPRINT("CsrGetCursorInfo\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   Status = ConioLockScreenBuffer(ProcessData, Request->Data.GetCursorInfoRequest.ConsoleHandle, &Buff);
   if (! NT_SUCCESS(Status))
@@ -1823,7 +1820,7 @@
   DPRINT("CsrSetCursorInfo\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   Status = ConioConsoleFromProcessData(ProcessData, &Console);
   if (! NT_SUCCESS(Status))
@@ -1931,7 +1928,7 @@
   DPRINT("CsrSetConsoleMode\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
   Status = Win32CsrGetObject(ProcessData,
                              Request->Data.SetConsoleModeRequest.ConsoleHandle,
                              (Object_t **) &Console);
@@ -1968,7 +1965,7 @@
   DPRINT("CsrGetConsoleMode\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
   Status = Win32CsrGetObject(ProcessData, Request->Data.GetConsoleModeRequest.ConsoleHandle,
                              (Object_t **) &Console);
   if (! NT_SUCCESS(Status))
@@ -2017,7 +2014,7 @@
     }
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   Buff = HeapAlloc(Win32CsrApiHeap, 0, sizeof(CSRSS_SCREEN_BUFFER));
   if (NULL == Buff)
@@ -2060,7 +2057,7 @@
     }
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   Status = ConioLockScreenBuffer(ProcessData, Request->Data.SetScreenBufferRequest.OutputHandle, &Buff);
   if (! NT_SUCCESS(Status))
@@ -2102,7 +2099,7 @@
   DPRINT("CsrSetTitle\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   if (Request->Header.DataSize
       < sizeof(CSRSS_SET_TITLE_REQUEST) - 1
@@ -2144,7 +2141,7 @@
   DPRINT("CsrGetTitle\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
   Status = ConioLockConsole(ProcessData,
                             Request->Data.GetTitleRequest.ConsoleHandle,
                             &Console);
@@ -2192,7 +2189,7 @@
     }
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
   Status = ConioLockScreenBuffer(ProcessData,
                                  Request->Data.WriteConsoleOutputRequest.ConsoleHandle,
                                  &Buff);
@@ -2276,7 +2273,7 @@
   DPRINT("CsrFlushInputBuffer\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
   Status = ConioLockConsole(ProcessData,
                             Request->Data.FlushInputBufferRequest.ConsoleInput,
                             &Console);
@@ -2327,7 +2324,7 @@
     }
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
   Status = ConioLockScreenBuffer(ProcessData, ConsoleHandle, &Buff);
   if (! NT_SUCCESS(Status))
     {
@@ -2424,7 +2421,7 @@
   DPRINT("CsrReadConsoleOutputChar\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = Reply->Header.MessageSize - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = Reply->Header.MessageSize - LPC_MESSAGE_BASE_SIZE;
   ReadBuffer = Reply->Data.ReadConsoleOutputCharReply.String;
 
   Status = ConioLockScreenBuffer(ProcessData, Request->Data.ReadConsoleOutputCharRequest.ConsoleHandle, &Buff);
@@ -2479,7 +2476,7 @@
   DPRINT("CsrReadConsoleOutputAttrib\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = Reply->Header.MessageSize - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = Reply->Header.MessageSize - LPC_MESSAGE_BASE_SIZE;
   ReadBuffer = Reply->Data.ReadConsoleOutputAttribReply.String;
 
   Status = ConioLockScreenBuffer(ProcessData, Request->Data.ReadConsoleOutputAttribRequest.ConsoleHandle, &Buff);
@@ -2535,7 +2532,7 @@
   DPRINT("CsrGetNumberOfConsoleInputEvents\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = Reply->Header.MessageSize - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = Reply->Header.MessageSize - LPC_MESSAGE_BASE_SIZE;
 
   Status = ConioLockConsole(ProcessData, Request->Data.GetNumInputEventsRequest.ConsoleHandle, &Console);
   if (! NT_SUCCESS(Status))
@@ -2580,7 +2577,7 @@
   DPRINT("CsrPeekConsoleInput\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
    
   Status = ConioLockConsole(ProcessData, Request->Data.GetNumInputEventsRequest.ConsoleHandle, &Console);
   if(! NT_SUCCESS(Status))
@@ -2650,7 +2647,7 @@
   DPRINT("CsrReadConsoleOutput\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
   
   Status = ConioLockScreenBuffer(ProcessData, Request->Data.ReadConsoleOutputRequest.ConsoleHandle, &Buff);
   if (! NT_SUCCESS(Status))
@@ -2727,7 +2724,7 @@
   DPRINT("CsrWriteConsoleInput\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
    
   Status = ConioLockConsole(ProcessData, Request->Data.WriteConsoleInputRequest.ConsoleHandle, &Console);
   if (! NT_SUCCESS(Status))
@@ -2817,7 +2814,7 @@
   DPRINT("CsrHardwareStateProperty\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
    
   Status = ConioLockConsole(ProcessData,
                             Request->Data.ConsoleHardwareStateRequest.ConsoleHandle,
@@ -2857,7 +2854,7 @@
   DPRINT("CsrGetConsoleWindow\n");
  
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
    
   Status = ConioLockConsole(ProcessData,
                             Request->Data.ConsoleWindowRequest.ConsoleHandle,
@@ -2881,7 +2878,7 @@
   DPRINT("CsrSetConsoleIcon\n");
  
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
    
   Status = ConioLockConsole(ProcessData,
                             Request->Data.ConsoleSetWindowIconRequest.ConsoleHandle,
@@ -2893,7 +2890,7 @@
 
   Console->hWindowIcon = Request->Data.ConsoleSetWindowIconRequest.WindowIcon;
   Reply->Status = (ConioChangeIcon(Console) ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL);
-  Reply->Data.ConsoleSetWindowIconReply.WindowIcon = Console->hWindow;
+  Reply->Data.ConsoleSetWindowIconReply.WindowIcon = Console->hWindowIcon;
   
   ConioUnlockConsole(Console);
 

reactos/subsys/csrss/win32csr
desktopbg.c 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- desktopbg.c	17 Jan 2004 15:18:25 -0000	1.6
+++ desktopbg.c	9 Apr 2004 20:03:16 -0000	1.7
@@ -1,4 +1,4 @@
-/* $Id: desktopbg.c,v 1.6 2004/01/17 15:18:25 navaraf Exp $
+/* $Id: desktopbg.c,v 1.7 2004/04/09 20:03:16 navaraf Exp $
  *
  * reactos/subsys/csrss/win32csr/desktopbg.c
  *
@@ -7,6 +7,18 @@
  * ReactOS Operating System
  */
 
+/*
+ * There is a problem with size of LPC_MESSAGE structure. In the old ReactOS
+ * headers it doesn't contain the data field and so it has a different size.
+ * We must use this workaround to get our Data field 0-sized.
+ */
+
+#include <windef.h>
+#include <winnt.h>
+#undef ANYSIZE_ARRAY
+#define ANYSIZE_ARRAY 0
+#include <ddk/ntapi.h>
+
 #include <windows.h>
 #include <csrss/csrss.h>
 
@@ -187,7 +199,7 @@
   DPRINT("CsrCreateDesktop\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   if (! Initialized)
     {
@@ -241,7 +253,7 @@
   DPRINT("CsrShowDesktop\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   Reply->Status = SendMessageW(Request->Data.ShowDesktopRequest.DesktopWindow,
                                PM_SHOW_DESKTOP,
@@ -258,7 +270,7 @@
   DPRINT("CsrHideDesktop\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
-  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE);
+  Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
   Reply->Status = SendMessageW(Request->Data.ShowDesktopRequest.DesktopWindow,
                                PM_HIDE_DESKTOP, 0, 0)

reactos/subsys/csrss/win32csr
guiconsole.c 1.12 -> 1.13
diff -u -r1.12 -r1.13
--- guiconsole.c	14 Mar 2004 17:53:27 -0000	1.12
+++ guiconsole.c	9 Apr 2004 20:03:16 -0000	1.13
@@ -1,4 +1,4 @@
-/* $Id: guiconsole.c,v 1.12 2004/03/14 17:53:27 weiden Exp $
+/* $Id: guiconsole.c,v 1.13 2004/04/09 20:03:16 navaraf Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -63,7 +63,6 @@
   HDC Dc;
   HFONT OldFont;
   TEXTMETRICW Metrics;
-  NTSTATUS Status;
 
   GuiData = HeapAlloc(Win32CsrApiHeap, HEAP_ZERO_MEMORY,
                       sizeof(GUI_CONSOLE_DATA) +
@@ -74,13 +73,7 @@
       return FALSE;
     }
 
-  Status = RtlInitializeCriticalSection(&GuiData->Lock);
-  if (!NT_SUCCESS(Status))
-    {
-      DPRINT1("RtlInitializeCriticalSection failed, Status=%x\n", Status);
-      HeapFree(Win32CsrApiHeap, 0, GuiData);
-      return FALSE;
-    }
+  InitializeCriticalSection(&GuiData->Lock);
 
   GuiData->LineBuffer = (PWCHAR)(GuiData + 1);
 
@@ -92,7 +85,7 @@
   if (NULL == GuiData->Font)
     {
       DPRINT1("GuiConsoleNcCreate: CreateFont failed\n");
-      RtlDeleteCriticalSection(&GuiData->Lock);
+      DeleteCriticalSection(&GuiData->Lock);
       HeapFree(Win32CsrApiHeap, 0, GuiData);
       return FALSE;
     }
@@ -101,7 +94,7 @@
     {
       DPRINT1("GuiConsoleNcCreate: GetDC failed\n");
       DeleteObject(GuiData->Font);
-      RtlDeleteCriticalSection(&GuiData->Lock);
+      DeleteCriticalSection(&GuiData->Lock);
       HeapFree(Win32CsrApiHeap, 0, GuiData);
       return FALSE;
     }
@@ -111,7 +104,7 @@
       DPRINT1("GuiConsoleNcCreate: SelectObject failed\n");
       ReleaseDC(hWnd, Dc);
       DeleteObject(GuiData->Font);
-      RtlDeleteCriticalSection(&GuiData->Lock);
+      DeleteCriticalSection(&GuiData->Lock);
       HeapFree(Win32CsrApiHeap, 0, GuiData);
       return FALSE;
     }
@@ -121,7 +114,7 @@
       SelectObject(Dc, OldFont);
       ReleaseDC(hWnd, Dc);
       DeleteObject(GuiData->Font);
-      RtlDeleteCriticalSection(&GuiData->Lock);
+      DeleteCriticalSection(&GuiData->Lock);
       HeapFree(Win32CsrApiHeap, 0, GuiData);
       return FALSE;
     }
@@ -498,7 +491,7 @@
   KillTimer(hWnd, 1);
   Console->PrivateData = NULL;
   DeleteDC(GuiData->MemoryDC);
-  RtlDeleteCriticalSection(&GuiData->Lock);
+  DeleteCriticalSection(&GuiData->Lock);
   HeapFree(Win32CsrApiHeap, 0, GuiData);
 }
 

reactos/subsys/win32k/dib
dib.h 1.19 -> 1.19.2.1
diff -u -r1.19 -r1.19.2.1
--- dib.h	6 Apr 2004 21:53:48 -0000	1.19
+++ dib.h	9 Apr 2004 20:03:16 -0000	1.19.2.1
@@ -12,13 +12,13 @@
 BOOLEAN DIB_1BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                         SURFGDI *DestGDI, SURFGDI *SourceGDI,
                         RECTL* DestRect, POINTL *SourcePoint,
-          			    BRUSHOBJ* Brush, POINTL* BrushOrigin,
-			            XLATEOBJ *ColorTranslation, ULONG Rop4);
+                        BRUSHOBJ* Brush, POINTL BrushOrigin,
+                        XLATEOBJ *ColorTranslation, ULONG Rop4);
 BOOLEAN DIB_1BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                             SURFGDI *DestGDI, SURFGDI *SourceGDI,
                             RECTL* DestRect, RECTL *SourceRect,
-                            POINTL* MaskOrigin, POINTL* BrushOrigin,
-			                XLATEOBJ *ColorTranslation, ULONG Mode);
+                            POINTL* MaskOrigin, POINTL BrushOrigin,
+                            XLATEOBJ *ColorTranslation, ULONG Mode);
 BOOLEAN DIB_1BPP_TransparentBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                                 PSURFGDI DestGDI,  PSURFGDI SourceGDI,
                                 RECTL*  DestRect,  POINTL  *SourcePoint,
@@ -31,13 +31,13 @@
 BOOLEAN DIB_4BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                         SURFGDI *DestGDI, SURFGDI *SourceGDI,
                         RECTL* DestRect, POINTL *SourcePoint,
-			            BRUSHOBJ* Brush, POINTL* BrushOrigin,
+                        BRUSHOBJ* Brush, POINTL BrushOrigin,
                         XLATEOBJ *ColorTranslation, ULONG Rop4);
 BOOLEAN DIB_4BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                             SURFGDI *DestGDI, SURFGDI *SourceGDI,
                             RECTL* DestRect, RECTL *SourceRect,
-                            POINTL* MaskOrigin, POINTL* BrushOrigin,
-			                XLATEOBJ *ColorTranslation, ULONG Mode);
+                            POINTL* MaskOrigin, POINTL BrushOrigin,
+                            XLATEOBJ *ColorTranslation, ULONG Mode);
 BOOLEAN DIB_4BPP_TransparentBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                                 PSURFGDI DestGDI,  PSURFGDI SourceGDI,
                                 RECTL*  DestRect,  POINTL  *SourcePoint,
@@ -50,13 +50,13 @@
 BOOLEAN DIB_8BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                         SURFGDI *DestGDI, SURFGDI *SourceGDI,
                         RECTL* DestRect, POINTL *SourcePoint,
-			            BRUSHOBJ* Brush, POINTL* BrushOrigin,
-			            XLATEOBJ *ColorTranslation, ULONG Rop4);
+                        BRUSHOBJ* Brush, POINTL BrushOrigin,
+                        XLATEOBJ *ColorTranslation, ULONG Rop4);
 BOOLEAN DIB_8BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                             SURFGDI *DestGDI, SURFGDI *SourceGDI,
                             RECTL* DestRect, RECTL *SourceRect,
-                            POINTL* MaskOrigin, POINTL* BrushOrigin,
-			                XLATEOBJ *ColorTranslation, ULONG Mode);
+                            POINTL* MaskOrigin, POINTL BrushOrigin,
+                            XLATEOBJ *ColorTranslation, ULONG Mode);
 BOOLEAN DIB_8BPP_TransparentBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                                 PSURFGDI DestGDI,  PSURFGDI SourceGDI,
                                 RECTL*  DestRect,  POINTL  *SourcePoint,
@@ -69,13 +69,13 @@
 BOOLEAN DIB_16BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                          SURFGDI *DestGDI, SURFGDI *SourceGDI,
                          RECTL* DestRect, POINTL *SourcePoint,
-			             BRUSHOBJ* Brush, POINTL* BrushOrigin,
-			             XLATEOBJ *ColorTranslation, ULONG Rop4);
+                         BRUSHOBJ* Brush, POINTL BrushOrigin,
+                         XLATEOBJ *ColorTranslation, ULONG Rop4);
 BOOLEAN DIB_16BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
-                            SURFGDI *DestGDI, SURFGDI *SourceGDI,
-                            RECTL* DestRect, RECTL *SourceRect,
-                            POINTL* MaskOrigin, POINTL* BrushOrigin,
-			                XLATEOBJ *ColorTranslation, ULONG Mode);
+                             SURFGDI *DestGDI, SURFGDI *SourceGDI,
+                             RECTL* DestRect, RECTL *SourceRect,
+                             POINTL* MaskOrigin, POINTL BrushOrigin,
+                             XLATEOBJ *ColorTranslation, ULONG Mode);
 BOOLEAN DIB_16BPP_TransparentBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                                  PSURFGDI DestGDI,  PSURFGDI SourceGDI,
                                  RECTL*  DestRect,  POINTL  *SourcePoint,
@@ -88,13 +88,13 @@
 BOOLEAN DIB_24BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                          SURFGDI *DestGDI, SURFGDI *SourceGDI,
                          RECTL* DestRect, POINTL *SourcePoint,
-			             BRUSHOBJ* Brush, POINTL* BrushOrigin,
-			             XLATEOBJ *ColorTranslation, ULONG Rop4);
+                         BRUSHOBJ* Brush, POINTL BrushOrigin,
+                         XLATEOBJ *ColorTranslation, ULONG Rop4);
 BOOLEAN DIB_24BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
-                            SURFGDI *DestGDI, SURFGDI *SourceGDI,
-                            RECTL* DestRect, RECTL *SourceRect,
-                            POINTL* MaskOrigin, POINTL* BrushOrigin,
-			                XLATEOBJ *ColorTranslation, ULONG Mode);
+                             SURFGDI *DestGDI, SURFGDI *SourceGDI,
+                             RECTL* DestRect, RECTL *SourceRect,
+                             POINTL* MaskOrigin, POINTL BrushOrigin,
+                             XLATEOBJ *ColorTranslation, ULONG Mode);
 BOOLEAN DIB_24BPP_TransparentBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                                  PSURFGDI DestGDI,  PSURFGDI SourceGDI,
                                  RECTL*  DestRect,  POINTL  *SourcePoint,
@@ -107,13 +107,13 @@
 BOOLEAN DIB_32BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                          SURFGDI *DestGDI, SURFGDI *SourceGDI,
                          RECTL* DestRect, POINTL *SourcePoint,
-			             BRUSHOBJ* Brush, POINTL* BrushOrigin,
-			             XLATEOBJ *ColorTranslation, ULONG Rop4);
+                         BRUSHOBJ* Brush, POINTL BrushOrigin,
+                         XLATEOBJ *ColorTranslation, ULONG Rop4);
 BOOLEAN DIB_32BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
-                            SURFGDI *DestGDI, SURFGDI *SourceGDI,
-                            RECTL* DestRect, RECTL *SourceRect,
-                            POINTL* MaskOrigin, POINTL* BrushOrigin,
-			                XLATEOBJ *ColorTranslation, ULONG Mode);			             
+                             SURFGDI *DestGDI, SURFGDI *SourceGDI,
+                             RECTL* DestRect, RECTL *SourceRect,
+                             POINTL* MaskOrigin, POINTL BrushOrigin,
+                             XLATEOBJ *ColorTranslation, ULONG Mode);			             
 BOOLEAN DIB_32BPP_TransparentBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                                  PSURFGDI DestGDI,  PSURFGDI SourceGDI,
                                  RECTL*  DestRect,  POINTL  *SourcePoint,

reactos/subsys/win32k/dib
dib16bpp.c 1.28 -> 1.28.2.1
diff -u -r1.28 -r1.28.2.1
--- dib16bpp.c	7 Apr 2004 22:09:09 -0000	1.28
+++ dib16bpp.c	9 Apr 2004 20:03:16 -0000	1.28.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: dib16bpp.c,v 1.28 2004/04/07 22:09:09 weiden Exp $ */
+/* $Id: dib16bpp.c,v 1.28.2.1 2004/04/09 20:03:16 navaraf Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdlib.h>
@@ -31,7 +31,7 @@
 #include "dib.h"
 
 VOID
-DIB_16BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c)
+DIB_16BPP_PutPixel(SURFOBJ *SurfObj, LONG x, LONG y, ULONG c)
 {
   PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta;
   PWORD addr = (PWORD)byteaddr + x;
@@ -40,7 +40,7 @@
 }
 
 ULONG
-DIB_16BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y)
+DIB_16BPP_GetPixel(SURFOBJ *SurfObj, LONG x, LONG y)
 {
   PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta;
   PWORD addr = (PWORD)byteaddr + x;
@@ -49,7 +49,7 @@
 }
 
 VOID
-DIB_16BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
+DIB_16BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
 {
   PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta;
   PWORD addr = (PWORD)byteaddr + x1;
@@ -63,7 +63,7 @@
 }
 
 VOID
-DIB_16BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
+DIB_16BPP_VLine(SURFOBJ *SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
 {
   PBYTE byteaddr = SurfObj->pvScan0 + y1 * SurfObj->lDelta;
   PWORD addr = (PWORD)byteaddr + x;
@@ -278,7 +278,7 @@
 DIB_16BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
 		 SURFGDI *DestGDI,  SURFGDI *SourceGDI,
 		 PRECTL  DestRect,  POINTL  *SourcePoint,
-		 PBRUSHOBJ Brush, PPOINTL BrushOrigin,
+		 BRUSHOBJ *Brush,   POINTL BrushOrigin,
 		 XLATEOBJ *ColorTranslation, ULONG Rop4)
 {
    ULONG X, Y;
@@ -291,7 +291,7 @@
    /* Pattern brushes */
    PGDIBRUSHOBJ GdiBrush;
    HBITMAP PatternSurface = NULL;
-   PSURFOBJ PatternObj;
+   SURFOBJ *PatternObj;
    ULONG PatternWidth, PatternHeight;
 
    if (Rop4 == SRCCOPY)
@@ -324,7 +324,7 @@
          PatternSurface = BitmapToSurf(PatternBitmap, NULL);
          BITMAPOBJ_UnlockBitmap(GdiBrush->hbmPattern);
 
-         PatternObj = (PSURFOBJ)AccessUserObject((ULONG)PatternSurface);
+         PatternObj = (SURFOBJ*)AccessUserObject((ULONG)PatternSurface);
          PatternWidth = PatternObj->sizlBitmap.cx;
          PatternHeight = PatternObj->sizlBitmap.cy;
          
@@ -396,7 +396,7 @@
    }
 
    if (PatternSurface != NULL)
-      EngDeleteSurface(PatternSurface);
+      EngDeleteSurface((HSURF)PatternSurface);
   
    return TRUE;
 }
@@ -546,10 +546,10 @@
 
 //NOTE: If you change something here, please do the same in other dibXXbpp.c files!
 BOOLEAN DIB_16BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
-                            SURFGDI *DestGDI, SURFGDI *SourceGDI,
-                            RECTL* DestRect, RECTL *SourceRect,
-                            POINTL* MaskOrigin, POINTL* BrushOrigin,
-			                XLATEOBJ *ColorTranslation, ULONG Mode)
+                             SURFGDI *DestGDI, SURFGDI *SourceGDI,
+                             RECTL* DestRect, RECTL *SourceRect,
+                             POINTL* MaskOrigin, POINTL BrushOrigin,
+                             XLATEOBJ *ColorTranslation, ULONG Mode)
 {
   BYTE *SourceLine, *DestLine;
   

reactos/subsys/win32k/dib
dib1bpp.c 1.22.2.1 -> 1.22.2.2
diff -u -r1.22.2.1 -r1.22.2.2
--- dib1bpp.c	8 Apr 2004 15:51:03 -0000	1.22.2.1
+++ dib1bpp.c	9 Apr 2004 20:03:16 -0000	1.22.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: dib1bpp.c,v 1.22.2.1 2004/04/08 15:51:03 navaraf Exp $ */
+/* $Id: dib1bpp.c,v 1.22.2.2 2004/04/09 20:03:16 navaraf Exp $ */
 
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
@@ -31,7 +31,7 @@
 #include "dib.h"
 
 VOID
-DIB_1BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c)
+DIB_1BPP_PutPixel(SURFOBJ *SurfObj, LONG x, LONG y, ULONG c)
 {
   PBYTE addr = SurfObj->pvScan0 + y * SurfObj->lDelta + (x >> 3);
 
@@ -42,7 +42,7 @@
 }
 
 ULONG
-DIB_1BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y)
+DIB_1BPP_GetPixel(SURFOBJ *SurfObj, LONG x, LONG y)
 {
   PBYTE addr = SurfObj->pvScan0 + y * SurfObj->lDelta + (x >> 3);
 
@@ -50,7 +50,7 @@
 }
 
 VOID
-DIB_1BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
+DIB_1BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
 {
   while(x1 < x2) {
     DIB_1BPP_PutPixel(SurfObj, x1, y, c);
@@ -59,7 +59,7 @@
 }
 
 VOID
-DIB_1BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
+DIB_1BPP_VLine(SURFOBJ *SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
 {
   while(y1 < y2) {
     DIB_1BPP_PutPixel(SurfObj, x, y1, c);
@@ -350,7 +350,7 @@
 	SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
 	SURFGDI *DestGDI,  SURFGDI *SourceGDI,
 	PRECTL  DestRect,  POINTL  *SourcePoint,
-	PBRUSHOBJ Brush, PPOINTL BrushOrigin,
+	BRUSHOBJ *Brush,   POINTL BrushOrigin,
 	XLATEOBJ *ColorTranslation, ULONG Rop4)
 {
    ULONG X, Y, SourceX, SourceY, k;
@@ -363,7 +363,7 @@
    /* Pattern brushes */
    PGDIBRUSHOBJ GdiBrush;
    HBITMAP PatternSurface = NULL;
-   PSURFOBJ PatternObj;
+   SURFOBJ *PatternObj;
    ULONG PatternWidth, PatternHeight;
 
    if (Rop4 == SRCCOPY)
@@ -396,7 +396,7 @@
          PatternSurface = BitmapToSurf(PatternBitmap, NULL);
          BITMAPOBJ_UnlockBitmap(GdiBrush->hbmPattern);
 
-         PatternObj = (PSURFOBJ)AccessUserObject((ULONG)PatternSurface);
+         PatternObj = (SURFOBJ*)AccessUserObject((ULONG)PatternSurface);
          PatternWidth = PatternObj->sizlBitmap.cx;
          PatternHeight = PatternObj->sizlBitmap.cy;
          
@@ -515,7 +515,7 @@
    }
 
    if (PatternSurface != NULL)
-      EngDeleteSurface(PatternSurface);
+      EngDeleteSurface((HSURF)PatternSurface);
   
    return TRUE;
 }
@@ -525,7 +525,7 @@
 	SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
 	SURFGDI *DestGDI, SURFGDI *SourceGDI,
 	RECTL* DestRect, RECTL *SourceRect,
-	POINTL* MaskOrigin, POINTL* BrushOrigin,
+	POINTL* MaskOrigin, POINTL BrushOrigin,
 	XLATEOBJ *ColorTranslation, ULONG Mode)
 {
 	DbgPrint("DIB_1BPP_StretchBlt: Source BPP: %u\n", SourceGDI->BitsPerPixel);

reactos/subsys/win32k/dib
dib24bpp.c 1.23 -> 1.23.2.1
diff -u -r1.23 -r1.23.2.1
--- dib24bpp.c	7 Apr 2004 15:37:50 -0000	1.23
+++ dib24bpp.c	9 Apr 2004 20:03:16 -0000	1.23.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: dib24bpp.c,v 1.23 2004/04/07 15:37:50 weiden Exp $ */
+/* $Id: dib24bpp.c,v 1.23.2.1 2004/04/09 20:03:16 navaraf Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdlib.h>
@@ -30,7 +30,7 @@
 #include "dib.h"
 
 VOID
-DIB_24BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c)
+DIB_24BPP_PutPixel(SURFOBJ *SurfObj, LONG x, LONG y, ULONG c)
 {
   PBYTE addr = SurfObj->pvScan0 + (y * SurfObj->lDelta) + (x << 1) + x;
   *(PUSHORT)(addr) = c & 0xFFFF;
@@ -38,14 +38,14 @@
 }
 
 ULONG
-DIB_24BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y)
+DIB_24BPP_GetPixel(SURFOBJ *SurfObj, LONG x, LONG y)
 {
   PBYTE addr = SurfObj->pvScan0 + y * SurfObj->lDelta + (x << 1) + x;
   return *(PUSHORT)(addr) + (*(addr + 2) << 16);
 }
 
 VOID
-DIB_24BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
+DIB_24BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
 {
   PBYTE addr = SurfObj->pvScan0 + y * SurfObj->lDelta + (x1 << 1) + x1;
   LONG cx = x1;
@@ -61,7 +61,7 @@
 }
 
 VOID
-DIB_24BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
+DIB_24BPP_VLine(SURFOBJ *SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
 {
   PBYTE addr = SurfObj->pvScan0 + y1 * SurfObj->lDelta + (x << 1) + x;
   LONG lDelta = SurfObj->lDelta;
@@ -250,7 +250,7 @@
 DIB_24BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
 		 SURFGDI *DestGDI,  SURFGDI *SourceGDI,
 		 PRECTL  DestRect,  POINTL  *SourcePoint,
-		 PBRUSHOBJ Brush, PPOINTL BrushOrigin,
+		 BRUSHOBJ *Brush,   POINTL BrushOrigin,
 		 XLATEOBJ *ColorTranslation, ULONG Rop4)
 {
    ULONG X, Y;
@@ -262,7 +262,7 @@
    /* Pattern brushes */
    PGDIBRUSHOBJ GdiBrush;
    HBITMAP PatternSurface = NULL;
-   PSURFOBJ PatternObj;
+   SURFOBJ *PatternObj;
    ULONG PatternWidth, PatternHeight;
 
    if (Rop4 == SRCCOPY)
@@ -295,7 +295,7 @@
          PatternSurface = BitmapToSurf(PatternBitmap, NULL);
          BITMAPOBJ_UnlockBitmap(GdiBrush->hbmPattern);
 
-         PatternObj = (PSURFOBJ)AccessUserObject((ULONG)PatternSurface);
+         PatternObj = (SURFOBJ*)AccessUserObject((ULONG)PatternSurface);
          PatternWidth = PatternObj->sizlBitmap.cx;
          PatternHeight = PatternObj->sizlBitmap.cy;
          
@@ -346,7 +346,7 @@
    }
 
    if (PatternSurface != NULL)
-      EngDeleteSurface(PatternSurface);
+      EngDeleteSurface((HSURF)PatternSurface);
   
    return TRUE;
 }
@@ -354,7 +354,7 @@
 BOOLEAN DIB_24BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                             SURFGDI *DestGDI, SURFGDI *SourceGDI,
                             RECTL* DestRect, RECTL *SourceRect,
-                            POINTL* MaskOrigin, POINTL* BrushOrigin,
+                            POINTL* MaskOrigin, POINTL BrushOrigin,
 			                XLATEOBJ *ColorTranslation, ULONG Mode)
 {
   DbgPrint("DIB_24BPP_StretchBlt: Source BPP: %u\n", SourceGDI->BitsPerPixel);

reactos/subsys/win32k/dib
dib32bpp.c 1.23 -> 1.23.2.1
diff -u -r1.23 -r1.23.2.1
--- dib32bpp.c	7 Apr 2004 15:37:50 -0000	1.23
+++ dib32bpp.c	9 Apr 2004 20:03:16 -0000	1.23.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: dib32bpp.c,v 1.23 2004/04/07 15:37:50 weiden Exp $ */
+/* $Id: dib32bpp.c,v 1.23.2.1 2004/04/09 20:03:16 navaraf Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdlib.h>
@@ -30,7 +30,7 @@
 #include "dib.h"
 
 VOID
-DIB_32BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c)
+DIB_32BPP_PutPixel(SURFOBJ *SurfObj, LONG x, LONG y, ULONG c)
 {
   PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta;
   PDWORD addr = (PDWORD)byteaddr + x;
@@ -39,7 +39,7 @@
 }
 
 ULONG
-DIB_32BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y)
+DIB_32BPP_GetPixel(SURFOBJ *SurfObj, LONG x, LONG y)
 {
   PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta;
   PDWORD addr = (PDWORD)byteaddr + x;
@@ -48,7 +48,7 @@
 }
 
 VOID
-DIB_32BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
+DIB_32BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
 {
   PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta;
   PDWORD addr = (PDWORD)byteaddr + x1;
@@ -62,7 +62,7 @@
 }
 
 VOID
-DIB_32BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
+DIB_32BPP_VLine(SURFOBJ *SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
 {
   PBYTE byteaddr = SurfObj->pvScan0 + y1 * SurfObj->lDelta;
   PDWORD addr = (PDWORD)byteaddr + x;
@@ -299,7 +299,7 @@
 DIB_32BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
 		 SURFGDI *DestGDI,  SURFGDI *SourceGDI,
 		 PRECTL  DestRect,  POINTL  *SourcePoint,
-		 PBRUSHOBJ Brush, PPOINTL BrushOrigin,
+		 BRUSHOBJ *Brush,   POINTL BrushOrigin,
 		 XLATEOBJ *ColorTranslation, ULONG Rop4)
 {
    ULONG X, Y;
@@ -311,7 +311,7 @@
    /* Pattern brushes */
    PGDIBRUSHOBJ GdiBrush;
    HBITMAP PatternSurface = NULL;
-   PSURFOBJ PatternObj;
+   SURFOBJ *PatternObj;
    ULONG PatternWidth, PatternHeight;
 
    if (Rop4 == SRCCOPY)
@@ -344,7 +344,7 @@
          PatternSurface = BitmapToSurf(PatternBitmap, NULL);
          BITMAPOBJ_UnlockBitmap(GdiBrush->hbmPattern);
 
-         PatternObj = (PSURFOBJ)AccessUserObject((ULONG)PatternSurface);
+         PatternObj = (SURFOBJ*)AccessUserObject((ULONG)PatternSurface);
          PatternWidth = PatternObj->sizlBitmap.cx;
          PatternHeight = PatternObj->sizlBitmap.cy;
          
@@ -395,7 +395,7 @@
    }
 
    if (PatternSurface != NULL)
-      EngDeleteSurface(PatternSurface);
+      EngDeleteSurface((HSURF)PatternSurface);
   
    return TRUE;
 }
@@ -517,7 +517,7 @@
 BOOLEAN DIB_32BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                             SURFGDI *DestGDI, SURFGDI *SourceGDI,
                             RECTL* DestRect, RECTL *SourceRect,
-                            POINTL* MaskOrigin, POINTL* BrushOrigin,
+                            POINTL* MaskOrigin, POINTL BrushOrigin,
 			                XLATEOBJ *ColorTranslation, ULONG Mode)
 {
   BYTE *SourceLine, *DestLine;

reactos/subsys/win32k/dib
dib4bpp.c 1.32 -> 1.32.2.1
diff -u -r1.32 -r1.32.2.1
--- dib4bpp.c	8 Apr 2004 09:44:21 -0000	1.32
+++ dib4bpp.c	9 Apr 2004 20:03:16 -0000	1.32.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: dib4bpp.c,v 1.32 2004/04/08 09:44:21 navaraf Exp $ */
+/* $Id: dib4bpp.c,v 1.32.2.1 2004/04/09 20:03:16 navaraf Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdlib.h>
@@ -30,21 +30,21 @@
 #include "dib.h"
 
 VOID
-DIB_4BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c)
+DIB_4BPP_PutPixel(SURFOBJ *SurfObj, LONG x, LONG y, ULONG c)
 {
    PBYTE addr = SurfObj->pvScan0 + (x>>1) + y * SurfObj->lDelta;
    *addr = (*addr & notmask[x&1]) | (c << ((1-(x&1))<<2));
 }
 
 ULONG
-DIB_4BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y)
+DIB_4BPP_GetPixel(SURFOBJ *SurfObj, LONG x, LONG y)
 {
    PBYTE addr = SurfObj->pvScan0 + (x>>1) + y * SurfObj->lDelta;
    return (*addr >> ((1-(x&1))<<2)) & 0x0f;
 }
 
 VOID
-DIB_4BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
+DIB_4BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
 {
   PBYTE  addr = SurfObj->pvScan0 + (x1>>1) + y * SurfObj->lDelta;
   LONG  cx = x1;
@@ -58,7 +58,7 @@
 }
 
 VOID
-DIB_4BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
+DIB_4BPP_VLine(SURFOBJ *SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
 {
   PBYTE  addr = SurfObj->pvScan0;
   int  lDelta = SurfObj->lDelta;
@@ -235,7 +235,7 @@
 DIB_4BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
 		SURFGDI *DestGDI,  SURFGDI *SourceGDI,
 		PRECTL  DestRect,  POINTL  *SourcePoint,
-		PBRUSHOBJ Brush, PPOINTL BrushOrigin,
+		BRUSHOBJ *Brush,   POINTL BrushOrigin,
 		XLATEOBJ *ColorTranslation, ULONG Rop4)
 {
    LONG i, j, sx, sy;
@@ -247,9 +247,8 @@
    /* Pattern brushes */
    PGDIBRUSHOBJ GdiBrush;
    HBITMAP PatternSurface = NULL;
-   PSURFOBJ PatternObj;
+   SURFOBJ *PatternObj;
    ULONG PatternWidth, PatternHeight;
-   POINTL PatternOrigin;
    static const ULONG ExpandSolidColor[16] = 
    {
       0x00000000 /* 0 */,
@@ -300,19 +299,10 @@
          PatternSurface = BitmapToSurf(PatternBitmap, NULL);
          BITMAPOBJ_UnlockBitmap(GdiBrush->hbmPattern);
 
-         PatternObj = (PSURFOBJ)AccessUserObject((ULONG)PatternSurface);
+         PatternObj = (SURFOBJ*)AccessUserObject((ULONG)PatternSurface);
          PatternWidth = PatternObj->sizlBitmap.cx;
          PatternHeight = PatternObj->sizlBitmap.cy;
 
-         if (BrushOrigin != NULL)
-         {
-            PatternOrigin = *BrushOrigin;
-         }
-         else
-         {
-            PatternOrigin.x = PatternOrigin.y = 0;
-         }
-         
          UsesPattern = TRUE;
       }
       else
@@ -332,7 +322,7 @@
       i = DestRect->left;
 
       if (UsesPattern)
-         PatternY = (j + PatternOrigin.y) % PatternHeight;
+         PatternY = (j + BrushOrigin.y) % PatternHeight;
 
       if (i & 0x1)
       {
@@ -345,7 +335,7 @@
 
          if (UsesPattern)
          {
-            Pattern = DIB_1BPP_GetPixel(PatternObj, (i + PatternOrigin.x) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack;
+            Pattern = DIB_1BPP_GetPixel(PatternObj, (i + BrushOrigin.x) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack;
          }				
 
          DIB_4BPP_PutPixel(DestSurf, i, j, DIB_DoRop(Rop4, Dest, Source, Pattern) & 0xF);
@@ -372,14 +362,14 @@
          }
          if (UsesPattern)
          {
-            Pattern = DIB_1BPP_GetPixel(PatternObj, (i + PatternOrigin.x + 1) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack;
-            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + PatternOrigin.x + 0) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 4;
-            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + PatternOrigin.x + 3) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 8;
-            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + PatternOrigin.x + 2) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 12;
-            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + PatternOrigin.x + 5) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 16;
-            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + PatternOrigin.x + 4) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 20;
-            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + PatternOrigin.x + 7) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 24;
-            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + PatternOrigin.x + 6) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 28;
+            Pattern = DIB_1BPP_GetPixel(PatternObj, (i + BrushOrigin.x + 1) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack;
+            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + BrushOrigin.x + 0) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 4;
+            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + BrushOrigin.x + 3) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 8;
+            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + BrushOrigin.x + 2) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 12;
+            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + BrushOrigin.x + 5) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 16;
+            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + BrushOrigin.x + 4) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 20;
+            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + BrushOrigin.x + 7) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 24;
+            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + BrushOrigin.x + 6) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 28;
          }
          *DestBits = DIB_DoRop(Rop4, Dest, Source, Pattern);	    
       }
@@ -394,14 +384,14 @@
          }
          if (UsesPattern)
          {
-            Pattern = DIB_1BPP_GetPixel(PatternObj, (i + PatternOrigin.x) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack;
+            Pattern = DIB_1BPP_GetPixel(PatternObj, (i + BrushOrigin.x) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack;
          }				
          DIB_4BPP_PutPixel(DestSurf, i, j, DIB_DoRop(Rop4, Dest, Source, Pattern) & 0xF);
       }	 
    }
 
    if (PatternSurface != NULL)
-      EngDeleteSurface(PatternSurface);
+      EngDeleteSurface((HSURF)PatternSurface);
 
    return TRUE;
 }
@@ -409,7 +399,7 @@
 BOOLEAN DIB_4BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                             SURFGDI *DestGDI, SURFGDI *SourceGDI,
                             RECTL* DestRect, RECTL *SourceRect,
-                            POINTL* MaskOrigin, POINTL* BrushOrigin,
+                            POINTL* MaskOrigin, POINTL BrushOrigin,
 			                XLATEOBJ *ColorTranslation, ULONG Mode)
 {
   DbgPrint("DIB_4BPP_StretchBlt: Source BPP: %u\n", SourceGDI->BitsPerPixel);

reactos/subsys/win32k/dib
dib8bpp.c 1.21 -> 1.21.2.1
diff -u -r1.21 -r1.21.2.1
--- dib8bpp.c	7 Apr 2004 15:37:50 -0000	1.21
+++ dib8bpp.c	9 Apr 2004 20:03:16 -0000	1.21.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: dib8bpp.c,v 1.21 2004/04/07 15:37:50 weiden Exp $ */
+/* $Id: dib8bpp.c,v 1.21.2.1 2004/04/09 20:03:16 navaraf Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdlib.h>
@@ -30,7 +30,7 @@
 #include "dib.h"
 
 VOID
-DIB_8BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c)
+DIB_8BPP_PutPixel(SURFOBJ *SurfObj, LONG x, LONG y, ULONG c)
 {
   PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta + x;
 
@@ -38,7 +38,7 @@
 }
 
 ULONG
-DIB_8BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y)
+DIB_8BPP_GetPixel(SURFOBJ *SurfObj, LONG x, LONG y)
 {
   PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta + x;
 
@@ -46,7 +46,7 @@
 }
 
 VOID
-DIB_8BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
+DIB_8BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
 {
   PBYTE byteaddr = SurfObj->pvScan0 + y * SurfObj->lDelta;
   PBYTE addr = byteaddr + x1;
@@ -60,7 +60,7 @@
 }
 
 VOID
-DIB_8BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
+DIB_8BPP_VLine(SURFOBJ *SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
 {
   PBYTE byteaddr = SurfObj->pvScan0 + y1 * SurfObj->lDelta;
   PBYTE addr = byteaddr + x;
@@ -273,7 +273,7 @@
 DIB_8BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
 		 SURFGDI *DestGDI,  SURFGDI *SourceGDI,
 		 PRECTL  DestRect,  POINTL  *SourcePoint,
-		 PBRUSHOBJ Brush, PPOINTL BrushOrigin,
+		 BRUSHOBJ *Brush,   POINTL BrushOrigin,
 		 XLATEOBJ *ColorTranslation, ULONG Rop4)
 {
    LONG i, j, k, sx, sy;
@@ -285,7 +285,7 @@
    /* Pattern brushes */
    PGDIBRUSHOBJ GdiBrush;
    HBITMAP PatternSurface = NULL;
-   PSURFOBJ PatternObj;
+   SURFOBJ *PatternObj;
    ULONG PatternWidth, PatternHeight;
 
    if (Rop4 == SRCCOPY)
@@ -318,7 +318,7 @@
          PatternSurface = BitmapToSurf(PatternBitmap, NULL);
          BITMAPOBJ_UnlockBitmap(GdiBrush->hbmPattern);
 
-         PatternObj = (PSURFOBJ)AccessUserObject((ULONG)PatternSurface);
+         PatternObj = (SURFOBJ*)AccessUserObject((ULONG)PatternSurface);
          PatternWidth = PatternObj->sizlBitmap.cx;
          PatternHeight = PatternObj->sizlBitmap.cy;
          
@@ -390,7 +390,7 @@
    }
 
    if (PatternSurface != NULL)
-      EngDeleteSurface(PatternSurface);
+      EngDeleteSurface((HSURF)PatternSurface);
 
    return TRUE;
 }
@@ -510,7 +510,7 @@
 BOOLEAN DIB_8BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                             SURFGDI *DestGDI, SURFGDI *SourceGDI,
                             RECTL* DestRect, RECTL *SourceRect,
-                            POINTL* MaskOrigin, POINTL* BrushOrigin,
+                            POINTL* MaskOrigin, POINTL BrushOrigin,
 			                XLATEOBJ *ColorTranslation, ULONG Mode)
 {
   BYTE *SourceLine, *DestLine;

reactos/subsys/win32k/eng
bitblt.c 1.47 -> 1.48
diff -u -r1.47 -r1.48
--- bitblt.c	7 Apr 2004 19:57:43 -0000	1.47
+++ bitblt.c	9 Apr 2004 20:03:16 -0000	1.48
@@ -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: bitblt.c,v 1.47 2004/04/07 19:57:43 navaraf Exp $
+/* $Id: bitblt.c,v 1.48 2004/04/09 20:03:16 navaraf Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -113,7 +113,7 @@
    /* Pattern brushes */
    PGDIBRUSHOBJ GdiBrush;
    HBITMAP PatternSurface = NULL;
-   PSURFOBJ PatternObj;
+   SURFOBJ *PatternObj;
    ULONG PatternWidth, PatternHeight, PatternY;
   
    if (Mask == NULL)
@@ -137,7 +137,7 @@
       PatternSurface = BitmapToSurf(PatternBitmap, Dest->hdev);
       BITMAPOBJ_UnlockBitmap(GdiBrush->hbmPattern);
 
-      PatternObj = (PSURFOBJ)AccessUserObject((ULONG)PatternSurface);
+      PatternObj = (SURFOBJ*)AccessUserObject((ULONG)PatternSurface);
       PatternWidth = PatternObj->sizlBitmap.cx;
       PatternHeight = PatternObj->sizlBitmap.cy;
    }
@@ -176,7 +176,7 @@
    }
 
    if (PatternSurface != NULL)
-      EngDeleteSurface(PatternSurface);
+      EngDeleteSurface((HSURF)PatternSurface);
 
    return TRUE;
 }
@@ -223,7 +223,16 @@
               POINTL* BrushOrigin,
               ROP4 Rop4)
 {
-  return OutputGDI->DIB_BitBlt(OutputObj, InputObj, OutputGDI, InputGDI, OutputRect, InputPoint, Brush, BrushOrigin, ColorTranslation, Rop4);
+  POINTL RealBrushOrigin;
+  if (BrushOrigin == NULL)
+    {
+      RealBrushOrigin.x = RealBrushOrigin.y = 0;
+    }
+  else
+    {
+      RealBrushOrigin = *BrushOrigin;
+    }
+  return OutputGDI->DIB_BitBlt(OutputObj, InputObj, OutputGDI, InputGDI, OutputRect, InputPoint, Brush, RealBrushOrigin, ColorTranslation, Rop4);
 }
 
 INT abs(INT nm);
@@ -600,7 +609,16 @@
                   POINTL* BrushOrigin,
                   ULONG Mode)
 {
-  return OutputGDI->DIB_StretchBlt(OutputObj, InputObj, OutputGDI, InputGDI, OutputRect, InputRect, MaskOrigin, BrushOrigin, ColorTranslation, Mode);
+  POINTL RealBrushOrigin;
+  if (BrushOrigin == NULL)
+    {
+      RealBrushOrigin.x = RealBrushOrigin.y = 0;
+    }
+  else
+    {
+      RealBrushOrigin = *BrushOrigin;
+    }
+  return OutputGDI->DIB_StretchBlt(OutputObj, InputObj, OutputGDI, InputGDI, OutputRect, InputRect, MaskOrigin, RealBrushOrigin, ColorTranslation, Mode);
 }
 
 

reactos/subsys/win32k/eng
clip.c 1.18 -> 1.19
diff -u -r1.18 -r1.19
--- clip.c	31 Dec 2003 14:43:48 -0000	1.18
+++ clip.c	9 Apr 2004 20:03:16 -0000	1.19
@@ -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: clip.c,v 1.18 2003/12/31 14:43:48 weiden Exp $
+/* $Id: clip.c,v 1.19 2004/04/09 20:03:16 navaraf Exp $
  * 
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:           ReactOS kernel
@@ -43,7 +43,7 @@
 }
 
 CLIPOBJ* STDCALL
-IntEngCreateClipRegion(ULONG count, PRECTL pRect, RECTL rcBounds)
+IntEngCreateClipRegion(ULONG count, PRECTL pRect, PRECTL rcBounds)
 {
   HCLIP hClip;
   CLIPGDI* clipInt;
@@ -68,7 +68,7 @@
 	  clipUser->iDComplexity = DC_COMPLEX;
 	  clipUser->iFComplexity = (count <= 4) ? FC_RECT4: FC_COMPLEX;
 	  clipUser->iMode = TC_RECTANGLES;
-	  RtlCopyMemory(&(clipUser->rclBounds), &rcBounds, sizeof(RECTL));
+	  RtlCopyMemory(&(clipUser->rclBounds), rcBounds, sizeof(RECTL));
 
 	  return clipUser;
 	}
@@ -80,20 +80,20 @@
       if (hClip)
 	{
 	  clipInt = (CLIPGDI *) AccessInternalObject(hClip);
-	  RtlCopyMemory(clipInt->EnumRects.arcl, &rcBounds, sizeof(RECTL));
+	  RtlCopyMemory(clipInt->EnumRects.arcl, rcBounds, sizeof(RECTL));
 	  clipInt->EnumRects.c = 1;
 	  clipInt->EnumOrder = CD_ANY;
 
 	  clipUser = (CLIPOBJ *) AccessUserObject(hClip);
 	  ASSERT(NULL != clipUser);
 
-	  clipUser->iDComplexity = ((rcBounds.top==rcBounds.bottom)
-	                            && (rcBounds.left==rcBounds.right))
+	  clipUser->iDComplexity = ((rcBounds->top==rcBounds->bottom)
+	                            && (rcBounds->left==rcBounds->right))
 	                           ? DC_TRIVIAL : DC_RECT;
 	  clipUser->iFComplexity = FC_RECT;
 	  clipUser->iMode = TC_RECTANGLES;
 	  DPRINT("IntEngCreateClipRegion: iDComplexity: %d\n", clipUser->iDComplexity);
-	  RtlCopyMemory(&(clipUser->rclBounds), &rcBounds, sizeof(RECTL));
+	  RtlCopyMemory(&(clipUser->rclBounds), rcBounds, sizeof(RECTL));
 	  return clipUser;
 	}
     }

reactos/subsys/win32k/eng
clip.h 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- clip.h	11 Aug 2003 21:10:49 -0000	1.5
+++ clip.h	9 Apr 2004 20:03:16 -0000	1.6
@@ -20,7 +20,7 @@
 #define __WIN32K_CLIP_H
 
 typedef ULONG HCLIP;
-CLIPOBJ* STDCALL IntEngCreateClipRegion( ULONG count, PRECTL pRect, RECTL rcBounds );
+CLIPOBJ* STDCALL IntEngCreateClipRegion( ULONG count, PRECTL pRect, PRECTL rcBounds );
 VOID STDCALL IntEngDeleteClipRegion(CLIPOBJ *ClipObj);
 
 

reactos/subsys/win32k/eng
copybits.c 1.22 -> 1.23
diff -u -r1.22 -r1.23
--- copybits.c	5 Mar 2004 09:02:41 -0000	1.22
+++ copybits.c	9 Apr 2004 20:03:16 -0000	1.23
@@ -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: copybits.c,v 1.22 2004/03/05 09:02:41 hbirr Exp $
+/* $Id: copybits.c,v 1.23 2004/04/09 20:03:16 navaraf Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -55,6 +55,7 @@
   POINTL    ptlTmp;
   RECT_ENUM RectEnum;
   BOOL      EnumMore;
+  POINTL BrushOrigin;
 
   MouseSafetyOnDrawStart(Source, SourceGDI, SourcePoint->x, SourcePoint->y,
                          (SourcePoint->x + abs(DestRect->right - DestRect->left)),
@@ -127,10 +128,12 @@
   SourceGDI = (PSURFGDI)AccessInternalObjectFromUserObject(Source);
   DestGDI   = (PSURFGDI)AccessInternalObjectFromUserObject(Dest);
 
+  BrushOrigin.x = BrushOrigin.y = 0;
+
   switch(clippingType)
     {
       case DC_TRIVIAL:
-        DestGDI->DIB_BitBlt(Dest, Source, DestGDI, SourceGDI, DestRect, SourcePoint, NULL, NULL, ColorTranslation, SRCCOPY);
+        DestGDI->DIB_BitBlt(Dest, Source, DestGDI, SourceGDI, DestRect, SourcePoint, NULL, BrushOrigin, ColorTranslation, SRCCOPY);
 
         MouseSafetyOnDrawEnd(Dest, DestGDI);
         MouseSafetyOnDrawEnd(Source, SourceGDI);
@@ -144,7 +147,7 @@
         ptlTmp.x = SourcePoint->x + rclTmp.left - DestRect->left;
         ptlTmp.y = SourcePoint->y + rclTmp.top  - DestRect->top;
 
-        DestGDI->DIB_BitBlt(Dest, Source, DestGDI, SourceGDI, &rclTmp, &ptlTmp, NULL, NULL, ColorTranslation, SRCCOPY);
+        DestGDI->DIB_BitBlt(Dest, Source, DestGDI, SourceGDI, &rclTmp, &ptlTmp, NULL, BrushOrigin, ColorTranslation, SRCCOPY);
 
         MouseSafetyOnDrawEnd(Dest, DestGDI);
         MouseSafetyOnDrawEnd(Source, SourceGDI);
@@ -170,7 +173,7 @@
               ptlTmp.y = SourcePoint->y + prcl->top - DestRect->top;
 
               if(!DestGDI->DIB_BitBlt(Dest, Source, DestGDI, SourceGDI,
-                                      prcl, &ptlTmp, NULL, NULL, ColorTranslation, SRCCOPY)) return FALSE;
+                                      prcl, &ptlTmp, NULL, BrushOrigin, ColorTranslation, SRCCOPY)) return FALSE;
 
               prcl++;
 

reactos/subsys/win32k/eng
event.c 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- event.c	8 Mar 2004 07:04:56 -0000	1.1
+++ event.c	9 Apr 2004 20:03:16 -0000	1.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: event.c,v 1.1 2004/03/08 07:04:56 dwelch Exp $
+/* $Id: event.c,v 1.2 2004/04/09 20:03:16 navaraf Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -27,6 +27,9 @@
  *        2/10/1999: Created
  */
 
+#include <stdarg.h>
+#include <windef.h>
+#include <winbase.h>
 #include <ddk/winddi.h>
 #include <ddk/ntddk.h>
 #include <include/eng.h>

reactos/subsys/win32k/eng
float.c 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- float.c	11 Mar 2004 21:38:58 -0000	1.1
+++ float.c	9 Apr 2004 20:03:16 -0000	1.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: float.c,v 1.1 2004/03/11 21:38:58 dwelch Exp $
+/* $Id: float.c,v 1.2 2004/04/09 20:03:16 navaraf Exp $
  * 
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:           ReactOS kernel
@@ -52,7 +52,7 @@
   return TRUE;
 }
 
-BOOL
+ULONG
 STDCALL
 EngSaveFloatingPointState(OUT VOID  *Buffer,
 			  IN ULONG  BufferSize)

reactos/subsys/win32k/eng
gradient.c 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- gradient.c	6 Apr 2004 21:53:48 -0000	1.7
+++ gradient.c	9 Apr 2004 20:03:16 -0000	1.8
@@ -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: gradient.c,v 1.7 2004/04/06 21:53:48 weiden Exp $
+/* $Id: gradient.c,v 1.8 2004/04/09 20:03:16 navaraf Exp $
  * 
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:           ReactOS kernel
@@ -93,7 +93,7 @@
   SURFOBJ *OutputObj;
   SURFGDI *OutputGDI;
   TRIVERTEX *v1, *v2;
-  RECT rcGradient, rcSG;
+  RECTL rcGradient, rcSG;
   RECT_ENUM RectEnum;
   BOOL EnumMore;
   ULONG i;
@@ -139,7 +139,7 @@
         EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
         for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom; i++)
         {
-          if(NtGdiIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
+          if(NtGdiIntersectRect(&FillRect, (PRECT)&RectEnum.arcl[i], (PRECT)&rcSG))
           {
             HVINITCOL(Red, 0);
             HVINITCOL(Green, 1);
@@ -166,7 +166,7 @@
       EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
       for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom; i++)
       {
-        if(NtGdiIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
+        if(NtGdiIntersectRect(&FillRect, (PRECT)&RectEnum.arcl[i], (PRECT)&rcSG))
         {
           HVINITCOL(Red, 0);
           HVINITCOL(Green, 1);
@@ -201,7 +201,7 @@
     EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
     for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom; i++)
     {
-      if(NtGdiIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
+      if(NtGdiIntersectRect(&FillRect, (PRECT)&RectEnum.arcl[i], (PRECT)&rcSG))
       {
         for(; FillRect.top < FillRect.bottom; FillRect.top++)
         {
@@ -337,7 +337,7 @@
   ULONG i;
   POINTL Translate;
   INTENG_ENTER_LEAVE EnterLeave;
-  RECT FillRect;
+  RECTL FillRect;
   ULONG Color;
   
   BOOL sx[NLINES];
@@ -382,7 +382,7 @@
       EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
       for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= prclExtents->bottom; i++)
       {
-        if(NtGdiIntersectRect(&FillRect, &RectEnum.arcl[i], prclExtents))
+        if(NtGdiIntersectRect((PRECT)&FillRect, (PRECT)&RectEnum.arcl[i], (PRECT)prclExtents))
         {
           BOOL InY;
           
@@ -430,7 +430,7 @@
     EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
     for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= prclExtents->bottom; i++)
     {
-      if(NtGdiIntersectRect(&FillRect, &RectEnum.arcl[i], prclExtents))
+      if(NtGdiIntersectRect((PRECT)&FillRect, (PRECT)&RectEnum.arcl[i], (PRECT)prclExtents))
       {
         S_INITLINE(v1, v3, 0);
         S_INITLINE(v1, v2, 1);

reactos/subsys/win32k/eng
lineto.c 1.31 -> 1.32
diff -u -r1.31 -r1.32
--- lineto.c	27 Mar 2004 00:35:02 -0000	1.31
+++ lineto.c	9 Apr 2004 20:03:16 -0000	1.32
@@ -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: lineto.c,v 1.31 2004/03/27 00:35:02 weiden Exp $
+ * $Id: lineto.c,v 1.32 2004/04/09 20:03:16 navaraf Exp $
  */
 
 #include <ddk/winddi.h>
@@ -502,9 +502,15 @@
 {
   BOOLEAN ret;
   SURFGDI *SurfGDI;
+  PGDIBRUSHOBJ GdiBrush;
   RECTL b;
 
-  if (Brush->logbrush.lbStyle == BS_NULL)
+  GdiBrush = CONTAINING_RECORD(
+     Brush,
+     GDIBRUSHOBJ,
+     BrushObject);
+
+  if (GdiBrush->flAttrs & GDIBRUSH_IS_NULL)
     return TRUE;
 
   /* No success yet */

reactos/subsys/win32k/eng
misc.c 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- misc.c	11 Feb 2004 19:26:51 -0000	1.4
+++ misc.c	9 Apr 2004 20:03:16 -0000	1.5
@@ -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.4 2004/02/11 19:26:51 weiden Exp $ */
+/* $Id: misc.c,v 1.5 2004/04/09 20:03:16 navaraf Exp $ */
 #include <ddk/winddi.h>
 #include <include/dib.h>
 #include <include/object.h>
@@ -110,7 +110,7 @@
       {
       EngDeleteClip(EnterLeave->TrivialClipObj);
       EngFreeMem((*OutputObj)->pvBits);
-      EngDeleteSurface(EnterLeave->OutputBitmap);
+      EngDeleteSurface((HSURF)EnterLeave->OutputBitmap);
       return FALSE;
       }
     EnterLeave->DestRect.left = DestRect->left;
@@ -182,7 +182,7 @@
         }
       }
     EngFreeMem(EnterLeave->OutputObj->pvBits);
-    EngDeleteSurface(EnterLeave->OutputBitmap);
+    EngDeleteSurface((HSURF)EnterLeave->OutputBitmap);
     EngDeleteClip(EnterLeave->TrivialClipObj);
     }
   else

reactos/subsys/win32k/eng
mouse.c 1.64 -> 1.65
diff -u -r1.64 -r1.65
--- mouse.c	15 Mar 2004 20:21:50 -0000	1.64
+++ mouse.c	9 Apr 2004 20:03:16 -0000	1.65
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: mouse.c,v 1.64 2004/03/15 20:21:50 navaraf Exp $
+/* $Id: mouse.c,v 1.65 2004/04/09 20:03:16 navaraf Exp $
  *
  * PROJECT:          ReactOS kernel
  * PURPOSE:          Mouse
@@ -30,7 +30,7 @@
 #include <windows.h>
 #include <ddk/ntddk.h>
 #include <ddk/ntddmou.h>
-#include <win32k/win32k.h>
+#include <ddk/winddi.h>
 #include <win32k/dc.h>
 #include "objects.h"
 #include "include/msgqueue.h"
@@ -54,7 +54,7 @@
 /* FUNCTIONS *****************************************************************/
 
 BOOL FASTCALL
-IntIsPrimarSurface(PSURFGDI SurfGDI);
+IntIsPrimarySurface(PSURFGDI SurfGDI);
 
 
 BOOL FASTCALL
@@ -84,7 +84,7 @@
 }
 
 INT STDCALL
-MouseSafetyOnDrawStart(PSURFOBJ SurfObj, PSURFGDI SurfGDI, LONG HazardX1,
+MouseSafetyOnDrawStart(SURFOBJ *SurfObj, PSURFGDI SurfGDI, LONG HazardX1,
 		       LONG HazardY1, LONG HazardX2, LONG HazardY2)
 /*
  * FUNCTION: Notify the mouse driver that drawing is about to begin in
@@ -113,7 +113,7 @@
       ObDereferenceObject(InputWindowStation);
       return(FALSE);
     }
-  if (!IntIsPrimarSurface(SurfGDI) || MouseEnabled == FALSE)
+  if (!IntIsPrimarySurface(SurfGDI) || MouseEnabled == FALSE)
     {
       ObDereferenceObject(InputWindowStation);
       return(FALSE);
@@ -176,7 +176,7 @@
 }
 
 INT FASTCALL
-MouseSafetyOnDrawEnd(PSURFOBJ SurfObj, PSURFGDI SurfGDI)
+MouseSafetyOnDrawEnd(SURFOBJ *SurfObj, SURFGDI *SurfGDI)
 /*
  * FUNCTION: Notify the mouse driver that drawing has finished on a surface.
  */
@@ -201,7 +201,7 @@
   }
   
   MouseEnabled = CurInfo->Enabled && CurInfo->ShowingCursor;
-  if (!IntIsPrimarSurface(SurfGDI) || MouseEnabled == FALSE)
+  if (!IntIsPrimarySurface(SurfGDI) || MouseEnabled == FALSE)
     {
       ExReleaseFastMutex(&CurInfo->CursorMutex);
       ObDereferenceObject(InputWindowStation);
@@ -243,7 +243,7 @@
   HDC hDC;
   PDC dc;
   BOOL res = FALSE;
-  PSURFOBJ SurfObj;
+  SURFOBJ *SurfObj;
   PSURFGDI SurfGDI;
   PSYSTEM_CURSORINFO CurInfo;
   MSG Msg;
@@ -269,7 +269,7 @@
       return FALSE;
     }
     dc = DC_LockDc(hDC);
-    SurfObj = (PSURFOBJ)AccessUserObject((ULONG) dc->Surface);
+    SurfObj = (SURFOBJ*)AccessUserObject((ULONG) dc->Surface);
     SurfGDI = (PSURFGDI)AccessInternalObject((ULONG) dc->Surface);
     DC_UnlockDc( hDC );
     IntCheckClipCursor(&X, &Y, CurInfo);
@@ -323,7 +323,7 @@
   LONG dScroll = 0;
   HDC hDC;
   PDC dc;
-  PSURFOBJ SurfObj;
+  SURFOBJ *SurfObj;
   PSURFGDI SurfGDI;
   MSG Msg;
   RECTL PointerRect;
@@ -349,7 +349,7 @@
     return;
 
   dc = DC_LockDc(hDC);
-  SurfObj = (PSURFOBJ)AccessUserObject((ULONG) dc->Surface);
+  SurfObj = (SURFOBJ*)AccessUserObject((ULONG) dc->Surface);
   SurfGDI = (PSURFGDI)AccessInternalObject((ULONG) dc->Surface);
   DC_UnlockDc( hDC );
 
@@ -499,7 +499,7 @@
 EnableMouse(HDC hDisplayDC)
 {
   PDC dc;
-  PSURFOBJ SurfObj;
+  SURFOBJ *SurfObj;
   PSURFGDI SurfGDI;
 
   if( hDisplayDC && InputWindowStation)
@@ -511,7 +511,7 @@
     }
     
     dc = DC_LockDc(hDisplayDC);
-    SurfObj = (PSURFOBJ)AccessUserObject((ULONG) dc->Surface);
+    SurfObj = (SURFOBJ*)AccessUserObject((ULONG) dc->Surface);
     SurfGDI = (PSURFGDI)AccessInternalObject((ULONG) dc->Surface);
     DC_UnlockDc( hDisplayDC );
     

reactos/subsys/win32k/eng
nls.c 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- nls.c	11 Jul 2003 15:59:37 -0000	1.2
+++ nls.c	9 Apr 2004 20:03:16 -0000	1.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: nls.c,v 1.2 2003/07/11 15:59:37 royce Exp $
+/* $Id: nls.c,v 1.3 2004/04/09 20:03:16 navaraf Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -31,7 +31,7 @@
 
 #include <ddk/winddi.h>
 #include <ddk/ntddk.h>
-
+#include <ntos.h>
 
 /* FUNCTIONS ****************************************************************/
 

reactos/subsys/win32k/eng
objects.h 1.29 -> 1.30
diff -u -r1.29 -r1.30
--- objects.h	6 Apr 2004 17:54:32 -0000	1.29
+++ objects.h	9 Apr 2004 20:03:16 -0000	1.30
@@ -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: objects.h,v 1.29 2004/04/06 17:54:32 weiden Exp $
+/* $Id: objects.h,v 1.30 2004/04/09 20:03:16 navaraf Exp $
  * 
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:           ReactOS kernel
@@ -157,12 +157,12 @@
 typedef BOOLEAN (*PFN_DIB_BitBlt)         (SURFOBJ * DestSurf, SURFOBJ * SourceSurf,
                                            PSURFGDI DestGDI,  PSURFGDI SourceGDI,
                                            RECTL *  DestRect, POINTL *  SourcePoint,
-				           BRUSHOBJ *BrushObj, POINTL BrushOrigin,
+				           BRUSHOBJ *BrushObj, POINTL BrushOrigin,
                                            XLATEOBJ *ColorTranslation, ULONG Rop4);
 typedef BOOLEAN (*PFN_DIB_StretchBlt)     (SURFOBJ * DestSurf, SURFOBJ * SourceSurf,
                                            PSURFGDI DestGDI,  PSURFGDI SourceGDI,
                                            RECTL *  DestRect, RECTL *  SourceRect,
-				           POINTL *MaskOrigin, POINTL BrushOrigin,
+				           POINTL *MaskOrigin, POINTL BrushOrigin,
                                            XLATEOBJ *ColorTranslation, ULONG Mode);
 typedef BOOLEAN (*PFN_DIB_TransparentBlt) (SURFOBJ *, SURFOBJ *, PSURFGDI, PSURFGDI,
                                            RECTL*  ,  POINTL  *, XLATEOBJ  *,ULONG);

reactos/subsys/win32k/eng
surface.c 1.36 -> 1.37
diff -u -r1.36 -r1.37
--- surface.c	6 Apr 2004 17:54:32 -0000	1.36
+++ surface.c	9 Apr 2004 20:03:16 -0000	1.37
@@ -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: surface.c,v 1.36 2004/04/06 17:54:32 weiden Exp $
+/* $Id: surface.c,v 1.37 2004/04/09 20:03:16 navaraf Exp $
  * 
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:           ReactOS kernel
@@ -111,7 +111,7 @@
 static BOOLEAN Dummy_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                             SURFGDI *DestGDI,  SURFGDI *SourceGDI,
                             RECTL*  DestRect,  POINTL  *SourcePoint,
-			                BRUSHOBJ* BrushObj, POINTL* BrushOrign,
+                            BRUSHOBJ* BrushObj, POINTL BrushOrign,
                             XLATEOBJ *ColorTranslation, ULONG Rop4)
 {
   return FALSE;
@@ -120,7 +120,7 @@
 static BOOLEAN Dummy_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                                 SURFGDI *DestGDI,  SURFGDI *SourceGDI,
                                 RECTL*  DestRect,  RECTL  *SourceRect,
-                                POINTL* MaskOrigin, POINTL* BrushOrign,
+                                POINTL* MaskOrigin, POINTL BrushOrign,
                                 XLATEOBJ *ColorTranslation, ULONG Mode)
 {
   return FALSE;

reactos/subsys/win32k/eng
transblt.c 1.16 -> 1.17
diff -u -r1.16 -r1.17
--- transblt.c	7 Apr 2004 22:17:36 -0000	1.16
+++ transblt.c	9 Apr 2004 20:03:18 -0000	1.17
@@ -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: transblt.c,v 1.16 2004/04/07 22:17:36 weiden Exp $
+/* $Id: transblt.c,v 1.17 2004/04/09 20:03:18 navaraf Exp $
  * 
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -47,10 +47,10 @@
 
 
 BOOL STDCALL
-EngTransparentBlt(PSURFOBJ Dest,
-		  PSURFOBJ Source,
-		  PCLIPOBJ Clip,
-		  PXLATEOBJ ColorTranslation,
+EngTransparentBlt(SURFOBJ *Dest,
+		  SURFOBJ *Source,
+		  CLIPOBJ *Clip,
+		  XLATEOBJ *ColorTranslation,
 		  PRECTL DestRect,
 		  PRECTL SourceRect,
 		  ULONG iTransColor,
@@ -217,10 +217,10 @@
 }
 
 BOOL FASTCALL
-IntEngTransparentBlt(PSURFOBJ Dest,
-                     PSURFOBJ Source,
-                     PCLIPOBJ Clip,
-                     PXLATEOBJ ColorTranslation,
+IntEngTransparentBlt(SURFOBJ *Dest,
+                     SURFOBJ *Source,
+                     CLIPOBJ *Clip,
+                     XLATEOBJ *ColorTranslation,
                      PRECTL DestRect,
                      PRECTL SourceRect,
                      ULONG iTransColor,

reactos/subsys/win32k/include
class.h 1.20 -> 1.21
diff -u -r1.20 -r1.21
--- class.h	24 Feb 2004 13:27:02 -0000	1.20
+++ class.h	9 Apr 2004 20:03:18 -0000	1.21
@@ -3,6 +3,7 @@
 
 #include <windows.h>
 #include <ddk/ntddk.h>
+#include <ddk/ntapi.h>
 #include <napi/win32.h>
 
 #define IS_ATOM(x) \

reactos/subsys/win32k/include
color.h 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- color.h	22 Dec 2003 15:30:21 -0000	1.7
+++ color.h	9 Apr 2004 20:03:18 -0000	1.8
@@ -1,9 +1,11 @@
 #ifndef _WIN32K_COLOR_H
 #define _WIN32K_COLOR_H
 
+#define NB_RESERVED_COLORS              20 /* number of fixed colors in system palette */
+
 const PALETTEENTRY* FASTCALL COLOR_GetSystemPaletteTemplate (VOID);
 COLORREF STDCALL COLOR_LookupNearestColor (PALETTEENTRY* palPalEntry, INT size, COLORREF color);
 INT STDCALL COLOR_PaletteLookupExactIndex (PALETTEENTRY* palPalEntry, INT size, COLORREF col);
-INT STDCALL COLOR_PaletteLookupPixel(PALETTEENTRY *palPalEntry, INT size, PXLATEOBJ XlateObj, COLORREF col, BOOL skipReserved);
+INT STDCALL COLOR_PaletteLookupPixel(PALETTEENTRY *palPalEntry, INT size, XLATEOBJ *XlateObj, COLORREF col, BOOL skipReserved);
 
 #endif /* _WIN32K_COLOR_H */

reactos/subsys/win32k/include
inteng.h 1.12 -> 1.13
diff -u -r1.12 -r1.13
--- inteng.h	6 Apr 2004 21:53:48 -0000	1.12
+++ inteng.h	9 Apr 2004 20:03:18 -0000	1.13
@@ -68,13 +68,13 @@
 	                           MIX mix);
 CLIPOBJ* STDCALL IntEngCreateClipRegion(ULONG count,
 					 PRECTL pRect,
-					 RECTL rcBounds);
+					 PRECTL rcBounds);
 
 BOOL FASTCALL
-IntEngTransparentBlt(PSURFOBJ Dest,
-                     PSURFOBJ Source,
-                     PCLIPOBJ Clip,
-                     PXLATEOBJ ColorTranslation,
+IntEngTransparentBlt(SURFOBJ *Dest,
+                     SURFOBJ *Source,
+                     CLIPOBJ *Clip,
+                     XLATEOBJ *ColorTranslation,
                      PRECTL DestRect,
                      PRECTL SourceRect,
                      ULONG iTransColor,

reactos/subsys/win32k/include
intgdi.h 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- intgdi.h	6 Apr 2004 17:54:32 -0000	1.9
+++ intgdi.h	9 Apr 2004 20:03:18 -0000	1.10
@@ -21,7 +21,7 @@
           INT  Width,
           INT  Height,
           DWORD  ROP,
-          PBRUSHOBJ BrushObj);
+          BRUSHOBJ *BrushObj);
 
 /* Pen functions */
 

reactos/subsys/win32k/include
palette.h 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- palette.h	20 Dec 2003 10:31:32 -0000	1.7
+++ palette.h	9 Apr 2004 20:03:18 -0000	1.8
@@ -1,6 +1,8 @@
 #ifndef _WIN32K_PALETTE_H
 #define _WIN32K_PALETTE_H
 
+#define NO_MAPPING
+
 #define PALETTE_FIXED    0x0001 /* read-only colormap - have to use XAllocColor (if not virtual) */
 #define PALETTE_VIRTUAL  0x0002 /* no mapping needed - pixel == pixel color */
 
@@ -14,8 +16,8 @@
 } ColorShifts;
 
 typedef struct _PALGDI {
-  PALOBJ		PalObj;
-
+  PALOBJ PalObj;
+  XLATEOBJ *logicalToSystem;
   HPALETTE Self;
   ULONG Mode; // PAL_INDEXED, PAL_BITFIELDS, PAL_RGB, PAL_BGR
   ULONG NumColors;
@@ -37,7 +39,9 @@
 
 HPALETTE FASTCALL PALETTE_Init (VOID);
 VOID     FASTCALL PALETTE_ValidateFlags (PALETTEENTRY* lpPalE, INT size);
+#ifndef NO_MAPPING
 INT      STDCALL  PALETTE_SetMapping(PALOBJ* palPtr, UINT uStart, UINT uNum, BOOL mapOnly);
+#endif
 INT      FASTCALL PALETTE_ToPhysical (PDC dc, COLORREF color);
 
 PPALETTEENTRY FASTCALL ReturnSystemPalette (VOID);

reactos/subsys/win32k/include
useratom.h 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- useratom.h	14 Dec 2003 17:59:17 -0000	1.1
+++ useratom.h	9 Apr 2004 20:03:18 -0000	1.2
@@ -2,6 +2,7 @@
 #define _WIN32K_USERATOM_H
 
 #include <windows.h>
+#include <ddk/ntapi.h>
 
 RTL_ATOM FASTCALL
 IntAddAtom(LPWSTR AtomName);

reactos/subsys/win32k/ldr
loader.c 1.14 -> 1.15
diff -u -r1.14 -r1.15
--- loader.c	7 Mar 2004 04:44:41 -0000	1.14
+++ loader.c	9 Apr 2004 20:03:18 -0000	1.15
@@ -16,16 +16,70 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: loader.c,v 1.14 2004/03/07 04:44:41 dwelch Exp $
+/* $Id: loader.c,v 1.15 2004/04/09 20:03:18 navaraf Exp $
  *
  */
 
 #include <ddk/ntddk.h>
 #include <ddk/winddi.h>
+#include <ddk/ntapi.h>
 
 #define NDEBUG
 #include <debug.h>
 
+#ifdef __USE_W32API
+PIMAGE_NT_HEADERS STDCALL
+RtlImageNtHeader(IN PVOID BaseAddress);
+#endif
+
+/*
+ * This is copied from ntdll...  It's needed for loading keyboard dlls.
+ */
+
+PVOID
+STDCALL
+RtlImageDirectoryEntryToData (
+	PVOID	BaseAddress,
+	BOOLEAN	bFlag,
+	ULONG	Directory,
+	PULONG	Size
+	)
+{
+	PIMAGE_NT_HEADERS NtHeader;
+	PIMAGE_SECTION_HEADER SectionHeader;
+	ULONG Va;
+	ULONG Count;
+
+	NtHeader = RtlImageNtHeader (BaseAddress);
+	if (NtHeader == NULL)
+		return NULL;
+
+	if (Directory >= NtHeader->OptionalHeader.NumberOfRvaAndSizes)
+		return NULL;
+
+	Va = NtHeader->OptionalHeader.DataDirectory[Directory].VirtualAddress;
+	if (Va == 0)
+		return NULL;
+
+	if (Size)
+		*Size = NtHeader->OptionalHeader.DataDirectory[Directory].Size;
+
+	if (bFlag)
+		return (PVOID)(BaseAddress + Va);
+
+	/* image mapped as ordinary file, we must find raw pointer */
+	SectionHeader = (PIMAGE_SECTION_HEADER)(NtHeader + 1);
+	Count = NtHeader->FileHeader.NumberOfSections;
+	while (Count--)
+	{
+		if (SectionHeader->VirtualAddress == Va)
+			return (PVOID)(BaseAddress + SectionHeader->PointerToRawData);
+		SectionHeader++;
+	}
+
+	return NULL;
+}
+
 /*
  * Blatantly stolen from ldr/utils.c in ntdll.  I can't link ntdll from
  * here, though.
@@ -147,52 +201,4 @@
   return (HANDLE)GdiDriverInfo.ModuleBase;
 }
 
-/*
- * This is copied from ntdll...  It's needed for loading keyboard dlls.
- */
-
-PVOID
-STDCALL
-RtlImageDirectoryEntryToData (
-	PVOID	BaseAddress,
-	BOOLEAN	bFlag,
-	ULONG	Directory,
-	PULONG	Size
-	)
-{
-	PIMAGE_NT_HEADERS NtHeader;
-	PIMAGE_SECTION_HEADER SectionHeader;
-	ULONG Va;
-	ULONG Count;
-
-	NtHeader = RtlImageNtHeader (BaseAddress);
-	if (NtHeader == NULL)
-		return NULL;
-
-	if (Directory >= NtHeader->OptionalHeader.NumberOfRvaAndSizes)
-		return NULL;
-
-	Va = NtHeader->OptionalHeader.DataDirectory[Directory].VirtualAddress;
-	if (Va == 0)
-		return NULL;
-
-	if (Size)
-		*Size = NtHeader->OptionalHeader.DataDirectory[Directory].Size;
-
-	if (bFlag)
-		return (PVOID)(BaseAddress + Va);
-
-	/* image mapped as ordinary file, we must find raw pointer */
-	SectionHeader = (PIMAGE_SECTION_HEADER)(NtHeader + 1);
-	Count = NtHeader->FileHeader.NumberOfSections;
-	while (Count--)
-	{
-		if (SectionHeader->VirtualAddress == Va)
-			return (PVOID)(BaseAddress + SectionHeader->PointerToRawData);
-		SectionHeader++;
-	}
-
-	return NULL;
-}
-
 /* EOF */

reactos/subsys/win32k/main
dllmain.c 1.67 -> 1.68
diff -u -r1.67 -r1.68
--- dllmain.c	24 Feb 2004 01:30:57 -0000	1.67
+++ dllmain.c	9 Apr 2004 20:03:18 -0000	1.68
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: dllmain.c,v 1.67 2004/02/24 01:30:57 weiden Exp $
+/* $Id: dllmain.c,v 1.68 2004/04/09 20:03:18 navaraf Exp $
  *
  *  Entry Point for win32k.sys
  */
@@ -26,6 +26,10 @@
 #include <windows.h>
 #define NTOS_MODE_KERNEL
 #include <ntos.h>
+
+#ifdef __USE_W32API
+#include <ddk/ddrawint.h>
+#endif
 #include <ddk/winddi.h>
 
 #include <win32k/win32k.h>
@@ -49,6 +53,25 @@
 #define NDEBUG
 #include <win32k/debug1.h>
 
+#ifdef __USE_W32API
+typedef NTSTATUS (STDCALL *PW32_PROCESS_CALLBACK)(
+   struct _EPROCESS *Process,
+   BOOLEAN Create);
+
+typedef NTSTATUS (STDCALL *PW32_THREAD_CALLBACK)(
+   struct _ETHREAD *Thread,
+   BOOLEAN Create);
+
+VOID STDCALL
+PsEstablishWin32Callouts(
+   PW32_PROCESS_CALLBACK W32ProcessCallback,
+   PW32_THREAD_CALLBACK W32ThreadCallback,
+   PVOID Param3,
+   PVOID Param4,
+   ULONG W32ThreadSize,
+   ULONG W32ProcessSize);
+#endif
+
 extern SSDT Win32kSSDT[];
 extern SSPT Win32kSSPT[];
 extern ULONG Win32kNumberOfSysCalls;

reactos/subsys/win32k
makefile 1.96 -> 1.97
diff -u -r1.96 -r1.97
--- makefile	11 Mar 2004 21:38:58 -0000	1.96
+++ makefile	9 Apr 2004 20:03:18 -0000	1.97
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.96 2004/03/11 21:38:58 dwelch Exp $
+# $Id: makefile,v 1.97 2004/04/09 20:03:18 navaraf Exp $
 
 PATH_TO_TOP = ../..
 
@@ -27,11 +27,9 @@
  -I$(PATH_TO_TOP)/ntoskrnl/include \
  -I$(FREETYPE_DIR)/include \
  -DUNICODE \
- -Wall -Werror
-
-# require os code to explicitly request A/W version of structs/functions
-#TARGET_CFLAGS += -D_DISABLE_TIDENTS -D__USE_W32API
-TARGET_CFLAGS += -D_DISABLE_TIDENTS
+ -Wall -Werror \
+ -D__USE_W32API -D_WIN32_WINNT=0x0500 \
+ -DWINVER=0x600 -D_WIN32K_
 
 TARGET_LFLAGS =\
  $(PATH_TO_TOP)/dk/nkm/lib/freetype.a \

reactos/subsys/win32k/misc
driver.c 1.37 -> 1.38
diff -u -r1.37 -r1.38
--- driver.c	6 Mar 2004 01:22:03 -0000	1.37
+++ driver.c	9 Apr 2004 20:03:19 -0000	1.38
@@ -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: driver.c,v 1.37 2004/03/06 01:22:03 navaraf Exp $
+/* $Id: driver.c,v 1.38 2004/04/09 20:03:19 navaraf Exp $
  * 
  * GDI Driver support routines
  * (mostly swiped from Wine)
@@ -33,6 +33,7 @@
 #include <wchar.h>
 #include <ddk/winddi.h>
 #include <ddk/ntddvid.h>
+#include <ddk/ntapi.h>
 #include <rosrtl/string.h>
 #include <include/tags.h>
 

reactos/subsys/win32k/ntuser
class.c 1.50 -> 1.51
diff -u -r1.50 -r1.51
--- class.c	5 Apr 2004 14:42:30 -0000	1.50
+++ class.c	9 Apr 2004 20:03:19 -0000	1.51
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: class.c,v 1.50 2004/04/05 14:42:30 weiden Exp $
+/* $Id: class.c,v 1.51 2004/04/09 20:03:19 navaraf Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -161,9 +161,11 @@
    NTSTATUS Status;
    RTL_ATOM Atom;
 
+   DPRINT("NtUserGetClassInfo(%S)\n", lpClassName);
    Status = ClassReferenceClassByNameOrAtom(&Class, lpClassName);
    if (!NT_SUCCESS(Status))
    {
+      DPRINT("Error (%x)\n", Status);
       SetLastNtError(Status);
       return 0;
    }
@@ -173,6 +175,7 @@
       lpWndClassEx->lpfnWndProc = Class->lpfnWndProcA;
    else
       lpWndClassEx->lpfnWndProc = Class->lpfnWndProcW;
+   DPRINT("%x\n", lpWndClassEx->lpfnWndProc);
    lpWndClassEx->cbClsExtra = Class->cbClsExtra;
    lpWndClassEx->cbWndExtra = Class->cbWndExtra;
    lpWndClassEx->hInstance = Class->hInstance;
@@ -414,6 +417,7 @@
   }
   if (!IS_ATOM(SafeClass.lpszClassName))
   {
+    DPRINT("NtUserRegisterClassExWOW(%S)\n", SafeClass.lpszClassName);
     /* FIXME - Safely copy/verify the buffer first!!! */
     Status = RtlAddAtomToAtomTable(WinStaObject->AtomTable,
       (LPWSTR)SafeClass.lpszClassName,
@@ -642,6 +646,8 @@
    PWNDCLASS_OBJECT Class;
    PWINSTATION_OBJECT WinStaObject;
   
+   DPRINT("NtUserUnregisterClass(%S)\n", ClassNameOrAtom);
+   
    if (!ClassNameOrAtom)
    {
       SetLastWin32Error(ERROR_INVALID_PARAMETER);

reactos/subsys/win32k/ntuser
desktop.c 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- desktop.c	21 Feb 2004 13:13:26 -0000	1.9
+++ desktop.c	9 Apr 2004 20:03:19 -0000	1.10
@@ -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.9 2004/02/21 13:13:26 navaraf Exp $
+ *  $Id: desktop.c,v 1.10 2004/04/09 20:03:19 navaraf Exp $
  *
  *  COPYRIGHT:        See COPYING in the top level directory
  *  PROJECT:          ReactOS kernel
@@ -30,11 +30,9 @@
 /* INCLUDES ******************************************************************/
 
 #define __WIN32K__
-#define NTOS_MODE_KERNEL
-#include <ntos.h>
 #include <ddk/ntddmou.h>
-#include <csrss/csrss.h>
 #include <win32k/win32k.h>
+#include <csrss/csrss.h>
 #include <include/winsta.h>
 #include <include/desktop.h>
 #include <include/object.h>
@@ -116,9 +114,9 @@
   if((Ret->right == -1) && ScreenDeviceContext)
   {
     PDC dc;
-    PSURFOBJ SurfObj;
+    SURFOBJ *SurfObj;
     dc = DC_LockDc(ScreenDeviceContext);
-    SurfObj = (PSURFOBJ)AccessUserObject((ULONG) dc->Surface);
+    SurfObj = (SURFOBJ*)AccessUserObject((ULONG) dc->Surface);
     if(SurfObj)
     {
       Ret->right = SurfObj->sizlBitmap.cx;
@@ -197,7 +195,7 @@
       return Status;
     }
 
-   Request->Header.DataSize = sizeof(CSRSS_API_REQUEST) - sizeof(LPC_MESSAGE);
+   Request->Header.DataSize = sizeof(CSRSS_API_REQUEST) - LPC_MESSAGE_BASE_SIZE;
    Request->Header.MessageSize = sizeof(CSRSS_API_REQUEST);
    
    Status = ZwRequestWaitReplyPort(WindowsApiPort,
@@ -347,7 +345,7 @@
     UserMode,
     dwDesiredAccess,
     NULL,
-    &Desktop);
+    (HANDLE*)&Desktop);
 
   if (NT_SUCCESS(Status))
     {
@@ -395,7 +393,7 @@
     STANDARD_RIGHTS_REQUIRED,
     0,
     NULL,
-    &Desktop);
+    (HANDLE*)&Desktop);
 
   DesktopObject->Self = (HANDLE)Desktop;
   
@@ -506,7 +504,7 @@
       UserMode,
       dwDesiredAccess,
       NULL,
-      &Desktop);
+      (HANDLE*)&Desktop);
 
    if (!NT_SUCCESS(Status))
    {
@@ -558,7 +556,7 @@
    /* Get a pointer to the desktop object */
 
    Status = IntValidateDesktopHandle(
-      InputDesktop,
+      InputDesktopHandle,
       UserMode,
       0,
       &Object);
@@ -578,7 +576,7 @@
       dwDesiredAccess,
       ExDesktopObjectType,
       UserMode,
-      &Desktop);
+      (HANDLE*)&Desktop);
 
    ObDereferenceObject(Object);
 

reactos/subsys/win32k/ntuser
misc.c 1.58 -> 1.59
diff -u -r1.58 -r1.59
--- misc.c	2 Apr 2004 22:16:09 -0000	1.58
+++ misc.c	9 Apr 2004 20:03:19 -0000	1.59
@@ -1,4 +1,4 @@
-/* $Id: misc.c,v 1.58 2004/04/02 22:16:09 weiden Exp $
+/* $Id: misc.c,v 1.59 2004/04/09 20:03:19 navaraf Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -665,14 +665,14 @@
       {
         HDC hDC;
         PDC dc;
-        PSURFOBJ SurfObj;
+        SURFOBJ *SurfObj;
         BOOL Ret = GradientCaptions;
         
         hDC = IntGetScreenDC();
         if(hDC)
         {
           dc = DC_LockDc(hDC);
-          SurfObj = (PSURFOBJ)AccessUserObject((ULONG) dc->Surface);
+          SurfObj = (SURFOBJ*)AccessUserObject((ULONG) dc->Surface);
           if(SurfObj)
             Ret = (SurfObj->iBitmapFormat > BMF_8BPP);
           DC_UnlockDc(hDC);

reactos/subsys/win32k/ntuser
msgqueue.c 1.81 -> 1.82
diff -u -r1.81 -r1.82
--- msgqueue.c	7 Apr 2004 21:12:08 -0000	1.81
+++ msgqueue.c	9 Apr 2004 20:03:19 -0000	1.82
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: msgqueue.c,v 1.81 2004/04/07 21:12:08 gvg Exp $
+/* $Id: msgqueue.c,v 1.82 2004/04/09 20:03:19 navaraf Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -246,7 +246,8 @@
 {
   PUSER_MESSAGE_QUEUE ThreadQueue;
   USHORT Msg = Message->Msg.message;
-  PWINDOW_OBJECT CaptureWin, Window = NULL;
+  PWINDOW_OBJECT Window = NULL;
+  HWND CaptureWin;
   POINT Point;
 
   if (Msg == WM_LBUTTONDOWN || 

reactos/subsys/win32k/ntuser
painting.c 1.79 -> 1.80
diff -u -r1.79 -r1.80
--- painting.c	23 Mar 2004 18:08:07 -0000	1.79
+++ painting.c	9 Apr 2004 20:03:19 -0000	1.80
@@ -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: painting.c,v 1.79 2004/03/23 18:08:07 weiden Exp $
+ *  $Id: painting.c,v 1.80 2004/04/09 20:03:19 navaraf Exp $
  *
  *  COPYRIGHT:        See COPYING in the top level directory
  *  PROJECT:          ReactOS kernel
@@ -54,6 +54,8 @@
 #define NDEBUG
 #include <win32k/debug1.h>
 
+#define DCX_USESTYLE 0x10000
+
 /* PRIVATE FUNCTIONS **********************************************************/
 
 VOID FASTCALL
@@ -755,7 +757,7 @@
    }
    else
    {
-      NtUserGetClientRect(Window, &lPs->rcPaint);
+      NtUserGetClientRect(Window->Self, &lPs->rcPaint);
    }
    IntUnLockWindowUpdate(Window);
 

reactos/subsys/win32k/ntuser
scrollbar.c 1.28 -> 1.29
diff -u -r1.28 -r1.29
--- scrollbar.c	27 Mar 2004 10:46:31 -0000	1.28
+++ scrollbar.c	9 Apr 2004 20:03:19 -0000	1.29
@@ -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: scrollbar.c,v 1.28 2004/03/27 10:46:31 gvg Exp $
+/* $Id: scrollbar.c,v 1.29 2004/04/09 20:03:19 navaraf Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -42,6 +42,9 @@
 #include <include/scroll.h>
 #include <include/painting.h>
 #include <include/tags.h>
+#ifdef __USE_W32API
+#include <oleacc.h>
+#endif
 
 #define NDEBUG
 #include <debug.h>

reactos/subsys/win32k/ntuser
timer.c 1.29 -> 1.30
diff -u -r1.29 -r1.30
--- timer.c	31 Mar 2004 18:37:12 -0000	1.29
+++ timer.c	9 Apr 2004 20:03:19 -0000	1.30
@@ -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: timer.c,v 1.29 2004/03/31 18:37:12 gvg Exp $
+/* $Id: timer.c,v 1.30 2004/04/09 20:03:19 navaraf Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -75,14 +75,22 @@
 BOOL FASTCALL
 IntInsertTimerAscendingOrder(PMSG_TIMER_ENTRY NewTimer)
 {
+  PLIST_ENTRY current;
 
-  InsertAscendingList(&TimerListHead,
-                      MSG_TIMER_ENTRY,
-                      ListEntry,                      
-                      NewTimer,
-                      Timeout.QuadPart);
-                      
-  return IsFirstEntry(&TimerListHead, &NewTimer->ListEntry);
+  current = TimerListHead.Flink;
+  while (current != &TimerListHead)
+  {
+    if (CONTAINING_RECORD(current, MSG_TIMER_ENTRY, ListEntry)->Timeout.QuadPart >=\
+        NewTimer->Timeout.QuadPart)
+    {
+      break;
+    }
+    current = current->Flink;
+  }
+
+  InsertTailList(current, &NewTimer->ListEntry);
+
+  return TimerListHead.Flink == &NewTimer->ListEntry;
 }
 
 

reactos/subsys/win32k/ntuser
windc.c 1.64 -> 1.65
diff -u -r1.64 -r1.65
--- windc.c	5 Apr 2004 21:26:30 -0000	1.64
+++ windc.c	9 Apr 2004 20:03:19 -0000	1.65
@@ -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: windc.c,v 1.64 2004/04/05 21:26:30 weiden Exp $
+/* $Id: windc.c,v 1.65 2004/04/09 20:03:19 navaraf Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -47,6 +47,8 @@
 #define NDEBUG
 #include <debug.h>
 
+#define DCX_USESTYLE 0x10000
+
 /* GLOBALS *******************************************************************/
 
 /* NOTE - I think we should store this per window station (including gdi objects) */
@@ -101,6 +103,25 @@
   return VisRgn;
 }
 
+/*
+ * NtUserGetWindowDC
+ *
+ * The NtUserGetWindowDC function retrieves the device context (DC) for the
+ * entire window, including title bar, menus, and scroll bars. A window device
+ * context permits painting anywhere in a window, because the origin of the
+ * device context is the upper-left corner of the window instead of the client
+ * area. 
+ *
+ * Status
+ *    @implemented
+ */
+
+DWORD STDCALL
+NtUserGetWindowDC(HWND hWnd)
+{
+   return (DWORD)NtUserGetDCEx(hWnd, 0, DCX_USESTYLE | DCX_WINDOW);
+}
+
 HDC STDCALL
 NtUserGetDC(HWND hWnd)
 {
@@ -565,7 +586,7 @@
 
   DceSetDrawable(Window, Dce->hDC, Flags, UpdateClipOrigin);
 
-  if (UpdateVisRgn)
+//  if (UpdateVisRgn)
     {
       DceUpdateVisRgn(Dce, Window, Flags);
     }

reactos/subsys/win32k/ntuser
window.c 1.209 -> 1.210
diff -u -r1.209 -r1.210
--- window.c	2 Apr 2004 23:54:26 -0000	1.209
+++ window.c	9 Apr 2004 20:03:19 -0000	1.210
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: window.c,v 1.209 2004/04/02 23:54:26 weiden Exp $
+/* $Id: window.c,v 1.210 2004/04/09 20:03:19 navaraf Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -2715,25 +2715,6 @@
 }
 
 /*
- * NtUserGetWindowDC
- *
- * The NtUserGetWindowDC function retrieves the device context (DC) for the
- * entire window, including title bar, menus, and scroll bars. A window device
- * context permits painting anywhere in a window, because the origin of the
- * device context is the upper-left corner of the window instead of the client
- * area. 
- *
- * Status
- *    @implemented
- */
-
-DWORD STDCALL
-NtUserGetWindowDC(HWND hWnd)
-{
-   return (DWORD)NtUserGetDCEx(hWnd, 0, DCX_USESTYLE | DCX_WINDOW);
-}
-
-/*
  * NtUserGetWindowLong
  *
  * The NtUserGetWindowLong function retrieves information about the specified

reactos/subsys/win32k/ntuser
winpos.c 1.108 -> 1.109
diff -u -r1.108 -r1.109
--- winpos.c	2 Apr 2004 20:51:08 -0000	1.108
+++ winpos.c	9 Apr 2004 20:03:19 -0000	1.109
@@ -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: winpos.c,v 1.108 2004/04/02 20:51:08 weiden Exp $
+/* $Id: winpos.c,v 1.109 2004/04/09 20:03:19 navaraf Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -177,7 +177,7 @@
 }
 
 VOID STATIC FASTCALL
-WinPosFindIconPos(HWND hWnd, POINT *Pos)
+WinPosFindIconPos(PWINDOW_OBJECT Window, POINT *Pos)
 {
   /* FIXME */
 }

reactos/subsys/win32k/ntuser
winsta.c 1.56 -> 1.57
diff -u -r1.56 -r1.57
--- winsta.c	19 Feb 2004 21:12:10 -0000	1.56
+++ winsta.c	9 Apr 2004 20:03:19 -0000	1.57
@@ -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: winsta.c,v 1.56 2004/02/19 21:12:10 weiden Exp $
+ *  $Id: winsta.c,v 1.57 2004/04/09 20:03:19 navaraf Exp $
  *
  *  COPYRIGHT:        See COPYING in the top level directory
  *  PROJECT:          ReactOS kernel
@@ -331,7 +331,7 @@
       UserMode,
       dwDesiredAccess,
       NULL,
-      &WindowStation);
+      (PVOID*)&WindowStation);
 
    if (NT_SUCCESS(Status))
    {
@@ -371,7 +371,7 @@
       STANDARD_RIGHTS_REQUIRED,
       0,
       NULL,
-      &WindowStation);
+      (PVOID*)&WindowStation);
 
    if (!NT_SUCCESS(Status))
    {
@@ -490,8 +490,7 @@
       UserMode,
       dwDesiredAccess,
       NULL,
-      &WindowStation);
-
+      (PVOID*)&WindowStation);
 
    if (!NT_SUCCESS(Status))
    {

reactos/subsys/win32k/objects
bitmaps.c 1.68 -> 1.69
diff -u -r1.68 -r1.69
--- bitmaps.c	6 Apr 2004 17:54:32 -0000	1.68
+++ bitmaps.c	9 Apr 2004 20:03:20 -0000	1.69
@@ -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: bitmaps.c,v 1.68 2004/04/06 17:54:32 weiden Exp $ */
+/* $Id: bitmaps.c,v 1.69 2004/04/09 20:03:20 navaraf Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdlib.h>
@@ -53,13 +53,13 @@
 {
 	PDC DCDest = NULL;
 	PDC DCSrc  = NULL;
-	PSURFOBJ SurfDest, SurfSrc;
+	SURFOBJ *SurfDest, *SurfSrc;
 	PSURFGDI SurfGDIDest, SurfGDISrc;
 	RECTL DestRect;
 	POINTL SourcePoint;
 	BOOL Status;
 	PPALGDI PalDestGDI, PalSourceGDI;
-	PXLATEOBJ XlateObj = NULL;
+	XLATEOBJ *XlateObj = NULL;
 	HPALETTE SourcePalette, DestPalette;
 	ULONG SourceMode, DestMode;
 	PGDIBRUSHOBJ BrushObj;
@@ -116,11 +116,11 @@
 	SourcePoint.y = YSrc;
 
 	/* Determine surfaces to be used in the bitblt */
-	SurfDest = (PSURFOBJ)AccessUserObject((ULONG)DCDest->Surface);
+	SurfDest = (SURFOBJ*)AccessUserObject((ULONG)DCDest->Surface);
 	SurfGDIDest = (PSURFGDI)AccessInternalObjectFromUserObject(SurfDest);
 	if (UsesSource)
 	{
-		SurfSrc  = (PSURFOBJ)AccessUserObject((ULONG)DCSrc->Surface);
+		SurfSrc  = (SURFOBJ*)AccessUserObject((ULONG)DCSrc->Surface);
 		SurfGDISrc  = (PSURFGDI)AccessInternalObjectFromUserObject(SurfSrc);
 	}
 	else
@@ -204,7 +204,7 @@
 	/* KB41464 details how to convert between mono and color */
 	if (DCDest->w.bitsPerPixel == 1)
 	{
-		XlateObj = (PXLATEOBJ)IntEngCreateMonoXlate(SourceMode, DestPalette,
+		XlateObj = (XLATEOBJ*)IntEngCreateMonoXlate(SourceMode, DestPalette,
 			SourcePalette, DCSrc->w.backgroundColor);
 	}
 	else if (UsesSource && 1 == DCSrc->w.bitsPerPixel)
@@ -216,7 +216,7 @@
 		Mono = EngCreatePalette(PAL_INDEXED, 2, Colors, 0, 0, 0);
 		if (NULL != Mono)
 		{
-			XlateObj = (PXLATEOBJ)IntEngCreateXlate(DestMode, PAL_INDEXED, DestPalette, Mono);
+			XlateObj = (XLATEOBJ*)IntEngCreateXlate(DestMode, PAL_INDEXED, DestPalette, Mono);
 		}
 		else
 		{
@@ -225,7 +225,7 @@
 	}
 	else
 	{
-		XlateObj = (PXLATEOBJ)IntEngCreateXlate(DestMode, SourceMode, DestPalette, SourcePalette);
+		XlateObj = (XLATEOBJ*)IntEngCreateXlate(DestMode, SourceMode, DestPalette, SourcePalette);
 	}
 	if (NULL == XlateObj)
 	{
@@ -279,9 +279,9 @@
 	COLORREF	TransColor)
 {
   PDC DCDest, DCSrc;
-  RECT rcDest, rcSrc;
-  PSURFOBJ SurfDest, SurfSrc;
-  PXLATEOBJ XlateObj;
+  RECTL rcDest, rcSrc;
+  SURFOBJ *SurfDest, *SurfSrc;
+  XLATEOBJ *XlateObj;
   HPALETTE SourcePalette, DestPalette;
   PPALGDI PalDestGDI, PalSourceGDI;
   USHORT PalDestMode, PalSrcMode;
@@ -351,18 +351,18 @@
   PALETTE_UnlockPalette(SourcePalette);
   
   /* Translate Transparent (RGB) Color to the source palette */
-  if((XlateObj = (PXLATEOBJ)IntEngCreateXlate(PalSrcMode, PAL_RGB, SourcePalette, NULL)))
+  if((XlateObj = (XLATEOBJ*)IntEngCreateXlate(PalSrcMode, PAL_RGB, SourcePalette, NULL)))
   {
     TransparentColor = XLATEOBJ_iXlate(XlateObj, (ULONG)TransColor);
     EngDeleteXlate(XlateObj);
   }
   
   /* Create the XLATE object to convert colors between source and destination */
-  XlateObj = (PXLATEOBJ)IntEngCreateXlate(PalDestMode, PalSrcMode, DestPalette, SourcePalette);
+  XlateObj = (XLATEOBJ*)IntEngCreateXlate(PalDestMode, PalSrcMode, DestPalette, SourcePalette);
   
-  SurfDest = (PSURFOBJ)AccessUserObject((ULONG)DCDest->Surface);
+  SurfDest = (SURFOBJ*)AccessUserObject((ULONG)DCDest->Surface);
   ASSERT(SurfDest);
-  SurfSrc = (PSURFOBJ)AccessUserObject((ULONG)DCSrc->Surface);
+  SurfSrc = (SURFOBJ*)AccessUserObject((ULONG)DCSrc->Surface);
   ASSERT(SurfSrc);
   
   rcDest.left = xDst;
@@ -625,11 +625,11 @@
 	COLORREF Result = (COLORREF)CLR_INVALID; // default to failure
 	BOOL bInRect = FALSE;
 	PSURFGDI Surface;
-	PSURFOBJ SurfaceObject;
+	SURFOBJ *SurfaceObject;
 	HPALETTE Pal;
 	PPALGDI PalGDI;
 	USHORT PalMode;
-	PXLATEOBJ XlateObj;
+	XLATEOBJ *XlateObj;
 
 	dc = DC_LockDc (hDC);
 
@@ -641,7 +641,7 @@
 	if ( IN_RECT(dc->CombinedClip->rclBounds,XPos,YPos) )
 	{
 		bInRect = TRUE;
-		SurfaceObject = (PSURFOBJ)AccessUserObject((ULONG)dc->Surface);
+		SurfaceObject = (SURFOBJ*)AccessUserObject((ULONG)dc->Surface);
 		ASSERT(SurfaceObject);
 		Surface = (PSURFGDI)AccessInternalObjectFromUserObject(SurfaceObject);
 		if ( Surface )
@@ -656,7 +656,7 @@
 				PalMode = PalGDI->Mode;
 				PALETTE_UnlockPalette(Pal);
 
-				XlateObj = (PXLATEOBJ)IntEngCreateXlate ( PAL_RGB, PalMode, NULL, Pal );
+				XlateObj = (XLATEOBJ*)IntEngCreateXlate ( PAL_RGB, PalMode, NULL, Pal );
 				if ( XlateObj )
 				{
 					// check if this DC has a DIB behind it...
@@ -1094,13 +1094,13 @@
 {
 	PDC DCDest = NULL;
 	PDC DCSrc  = NULL;
-	PSURFOBJ SurfDest, SurfSrc;
+	SURFOBJ *SurfDest, *SurfSrc;
 	PSURFGDI SurfGDIDest, SurfGDISrc;
 	RECTL DestRect;
 	RECTL SourceRect;
 	BOOL Status;
 	PPALGDI PalDestGDI, PalSourceGDI;
-	PXLATEOBJ XlateObj = NULL;
+	XLATEOBJ *XlateObj = NULL;
 	HPALETTE SourcePalette, DestPalette;
 	ULONG SourceMode, DestMode;
 	PGDIBRUSHOBJ BrushObj;
@@ -1163,11 +1163,11 @@
 	SourceRect.bottom = YOriginSrc+HeightSrc;
 
 	/* Determine surfaces to be used in the bitblt */
-	SurfDest = (PSURFOBJ)AccessUserObject((ULONG)DCDest->Surface);
+	SurfDest = (SURFOBJ*)AccessUserObject((ULONG)DCDest->Surface);
 	SurfGDIDest = (PSURFGDI)AccessInternalObjectFromUserObject(SurfDest);
 	if (UsesSource)
 	{
-		SurfSrc  = (PSURFOBJ)AccessUserObject((ULONG)DCSrc->Surface);
+		SurfSrc  = (SURFOBJ*)AccessUserObject((ULONG)DCSrc->Surface);
 		SurfGDISrc  = (PSURFGDI)AccessInternalObjectFromUserObject(SurfSrc);
 	}
 	else
@@ -1248,7 +1248,7 @@
 		PALETTE_UnlockPalette(DestPalette);
 	}
 
-	XlateObj = (PXLATEOBJ)IntEngCreateXlate(DestMode, SourceMode, DestPalette, SourcePalette);
+	XlateObj = (XLATEOBJ*)IntEngCreateXlate(DestMode, SourceMode, DestPalette, SourcePalette);
 	if (NULL == XlateObj)
 	{
 		if (UsesSource && hDCSrc != hDCDest)

reactos/subsys/win32k/objects
brush.c 1.33 -> 1.34
diff -u -r1.33 -r1.34
--- brush.c	5 Apr 2004 21:26:25 -0000	1.33
+++ brush.c	9 Apr 2004 20:03:20 -0000	1.34
@@ -17,7 +17,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: brush.c,v 1.33 2004/04/05 21:26:25 navaraf Exp $
+ * $Id: brush.c,v 1.34 2004/04/09 20:03:20 navaraf Exp $
  */
 
 #undef WIN32_LEAN_AND_MEAN
@@ -90,8 +90,8 @@
    DWORD ROP,
    PGDIBRUSHOBJ BrushObj)
 {
-   RECT DestRect;
-   PSURFOBJ SurfObj;
+   RECTL DestRect;
+   SURFOBJ *SurfObj;
    BOOL ret;
 
    SurfObj = (SURFOBJ *)AccessUserObject((ULONG)dc->Surface);

reactos/subsys/win32k/objects
cliprgn.c 1.30 -> 1.31
diff -u -r1.30 -r1.31
--- cliprgn.c	22 Mar 2004 20:14:29 -0000	1.30
+++ cliprgn.c	9 Apr 2004 20:03:20 -0000	1.31
@@ -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: cliprgn.c,v 1.30 2004/03/22 20:14:29 weiden Exp $ */
+/* $Id: cliprgn.c,v 1.31 2004/04/09 20:03:20 navaraf Exp $ */
 
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
@@ -85,7 +85,7 @@
 
   Dc->CombinedClip = IntEngCreateClipRegion(CombinedRegion->rdh.nCount,
                                             (PRECTL)CombinedRegion->Buffer,
-                                            CombinedRegion->rdh.rcBound);
+                                            (PRECTL)&CombinedRegion->rdh.rcBound);
   ASSERT(NULL != Dc->CombinedClip);
 
   RGNDATA_UnlockRgn(Combined);

reactos/subsys/win32k/objects
color.c 1.35 -> 1.36
diff -u -r1.35 -r1.36
--- color.c	27 Mar 2004 00:35:02 -0000	1.35
+++ color.c	9 Apr 2004 20:03:20 -0000	1.36
@@ -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: color.c,v 1.35 2004/03/27 00:35:02 weiden Exp $ */
+/* $Id: color.c,v 1.36 2004/04/09 20:03:20 navaraf Exp $ */
 
 // FIXME: Use PXLATEOBJ logicalToSystem instead of int *mapping
 
@@ -45,7 +45,9 @@
 int COLOR_gapFilled = 0;
 int COLOR_max = 256;
 
+#ifndef NO_MAPPING
 static HPALETTE hPrimaryPalette = 0; // used for WM_PALETTECHANGED
+#endif
 //static HPALETTE hLastRealizedPalette = 0; // UnrealizeObject() needs it
 
 const PALETTEENTRY COLOR_sysPalTemplate[NB_RESERVED_COLORS] =
@@ -142,7 +144,7 @@
   PalGDI = (PPALGDI) PALETTE_LockPalette(NewPalette);
 
   PALETTE_ValidateFlags(PalGDI->IndexedColors, PalGDI->NumColors);
-  PalGDI->PalObj.logicalToSystem = NULL;
+  PalGDI->logicalToSystem = NULL;
 
   PALETTE_UnlockPalette(NewPalette);
 
@@ -297,7 +299,7 @@
 */
 UINT STDCALL NtGdiRealizePalette(HDC hDC)
 {
-  PPALOBJ palPtr, sysPtr;
+  PALOBJ *palPtr, *sysPtr;
   PPALGDI palGDI, sysGDI;
   int realized = 0;
   PDC dc;
@@ -313,15 +315,19 @@
   SurfGDI = (PSURFGDI)AccessInternalObject((ULONG)dc->Surface);
   systemPalette = NtGdiGetStockObject((INT)DEFAULT_PALETTE);
   palGDI = PALETTE_LockPalette(dc->w.hPalette);
-  palPtr = (PPALOBJ) palGDI;
+  palPtr = (PALOBJ*) palGDI;
 
   // Step 1: Create mapping of system palette\DC palette
+#ifndef NO_MAPPING
   realized = PALETTE_SetMapping(palPtr, 0, palGDI->NumColors,
                (dc->w.hPalette != hPrimaryPalette) ||
                (dc->w.hPalette == NtGdiGetStockObject(DEFAULT_PALETTE)));
+#else
+  realized = 0;
+#endif
 
   sysGDI = PALETTE_LockPalette(systemPalette);
-  sysPtr = (PPALOBJ) sysGDI;
+  sysPtr = (PALOBJ*) sysGDI;
 
   // Step 2:
   // The RealizePalette function modifies the palette for the device associated with the specified device context. If the
@@ -350,7 +356,7 @@
   if(dc->w.flags != DC_MEMORY)
   {
     // Device managed DC
-    palPtr->logicalToSystem = IntEngCreateXlate(sysGDI->Mode, palGDI->Mode, systemPalette, dc->w.hPalette);
+    palGDI->logicalToSystem = IntEngCreateXlate(sysGDI->Mode, palGDI->Mode, systemPalette, dc->w.hPalette);
   }
 
   DC_UnlockDc(hDC);
@@ -361,10 +367,10 @@
 BOOL STDCALL NtGdiResizePalette(HPALETTE  hpal,
                         UINT  Entries)
 {
-/*  PPALOBJ palPtr = (PPALOBJ)AccessUserObject(hPal);
+/*  PALOBJ *palPtr = (PALOBJ*)AccessUserObject(hPal);
   UINT cPrevEnt, prevVer;
   INT prevsize, size = sizeof(LOGPALETTE) + (cEntries - 1) * sizeof(PALETTEENTRY);
-  PXLATEOBJ XlateObj = NULL;
+  XLATEOBJ *XlateObj = NULL;
 
   if(!palPtr) return FALSE;
   cPrevEnt = palPtr->logpalette->palNumEntries;
@@ -377,7 +383,7 @@
 
   if(XlateObj)
   {
-    PXLATEOBJ NewXlateObj = (int*) HeapReAlloc(GetProcessHeap(), 0, XlateObj, cEntries * sizeof(int));
+    XLATEOBJ *NewXlateObj = (int*) HeapReAlloc(GetProcessHeap(), 0, XlateObj, cEntries * sizeof(int));
     if(NewXlateObj == NULL)
     {
       ERR("Can not resize logicalToSystem -- out of memory!");
@@ -471,8 +477,8 @@
     }
   memcpy(&palGDI->IndexedColors[Start], pe, Entries * sizeof(PALETTEENTRY));
   PALETTE_ValidateFlags(palGDI->IndexedColors, palGDI->NumColors);
-  ExFreePool(palGDI->PalObj.logicalToSystem);
-  palGDI->PalObj.logicalToSystem = NULL;
+  ExFreePool(palGDI->logicalToSystem);
+  palGDI->logicalToSystem = NULL;
   PALETTE_UnlockPalette(hpal);
 
   return Entries;
@@ -505,7 +511,7 @@
 }
 
 INT STDCALL COLOR_PaletteLookupPixel(PALETTEENTRY *palPalEntry, INT size,
-                             PXLATEOBJ XlateObj, COLORREF col, BOOL skipReserved)
+                             XLATEOBJ *XlateObj, COLORREF col, BOOL skipReserved)
 {
   int i, best = 0, diff = 0x7fffffff;
   int r, g, b;

reactos/subsys/win32k/objects
cursoricon.c 1.52 -> 1.53
diff -u -r1.52 -r1.53
--- cursoricon.c	29 Mar 2004 06:38:50 -0000	1.52
+++ cursoricon.c	9 Apr 2004 20:03:20 -0000	1.53
@@ -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.52 2004/03/29 06:38:50 navaraf Exp $ */
+/* $Id: cursoricon.c,v 1.53 2004/04/09 20:03:20 navaraf Exp $ */
 
 #undef WIN32_LEAN_AND_MEAN
 
@@ -95,7 +95,7 @@
 IntSetCursor(PWINSTATION_OBJECT WinStaObject, PCURICON_OBJECT NewCursor,
    BOOL ForceChange)
 {
-   PSURFOBJ SurfObj;
+   SURFOBJ *SurfObj;
    PSURFGDI SurfGDI;
    SIZEL MouseSize;
    PDEVINFO DevInfo;
@@ -104,8 +104,8 @@
    PCURICON_OBJECT OldCursor;
    HCURSOR Ret = (HCURSOR)0;
    HBITMAP hMask = (HBITMAP)0, hColor = (HBITMAP)0;
-   PSURFOBJ soMask = NULL, soColor = NULL;
-   PXLATEOBJ XlateObj = NULL;
+   SURFOBJ *soMask = NULL, *soColor = NULL;
+   XLATEOBJ *XlateObj = NULL;
    RECTL PointerRect;
    HDC Screen;
   
@@ -134,7 +134,7 @@
          return Ret;
       }
   
-      SurfObj = (PSURFOBJ)AccessUserObject((ULONG) dc->Surface);
+      SurfObj = (SURFOBJ*)AccessUserObject((ULONG) dc->Surface);
       SurfGDI = (PSURFGDI)AccessInternalObject((ULONG) dc->Surface);
       DevInfo = dc->DevInfo;
       DC_UnlockDc(Screen);
@@ -206,7 +206,7 @@
             MouseSize.cx = MaskBmpObj->bitmap.bmWidth;
             MouseSize.cy = MaskBmpObj->bitmap.bmHeight;
             hMask = EngCreateBitmap(MouseSize, 4, BMF_1BPP, BMF_TOPDOWN, MaskBmpObj->bitmap.bmBits);
-            soMask = (PSURFOBJ)AccessUserObject((ULONG)hMask);
+            soMask = (SURFOBJ*)AccessUserObject((ULONG)hMask);
             BITMAPOBJ_UnlockBitmap(NewCursor->IconInfo.hbmMask);
           }
         }
@@ -256,11 +256,11 @@
     
     if(hMask)
     {
-      EngDeleteSurface(hMask);
+      EngDeleteSurface((HSURF)hMask);
     }
     if(hColor)
     {
-      EngDeleteSurface(hColor);
+      EngDeleteSurface((HSURF)hColor);
     }
     if(XlateObj)
     {
@@ -796,7 +796,7 @@
 /*
  * @implemented
  */
-HANDLE
+HICON
 STDCALL
 NtUserFindExistingCursorIcon(
   HMODULE hModule,

reactos/subsys/win32k/objects
dc.c 1.127 -> 1.128
diff -u -r1.127 -r1.128
--- dc.c	6 Apr 2004 07:43:33 -0000	1.127
+++ dc.c	9 Apr 2004 20:03:20 -0000	1.128
@@ -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: dc.c,v 1.127 2004/04/06 07:43:33 gvg Exp $
+/* $Id: dc.c,v 1.128 2004/04/09 20:03:20 navaraf Exp $
  *
  * DC.C - Device context functions
  *
@@ -25,14 +25,12 @@
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <ddk/ntddk.h>
-#include <ddk/ntddvid.h>
-
+#include <ddk/ntddvdeo.h>
 #include <internal/safe.h>
 #include <win32k/bitmaps.h>
 #include <win32k/brush.h>
 #include <win32k/cliprgn.h>
 #include <win32k/coord.h>
-#include <win32k/driver.h>
 #include <win32k/dc.h>
 #include <win32k/misc.h>
 #include <win32k/print.h>
@@ -215,7 +213,7 @@
   NewDC->w.hFirstBitmap = hBitmap;
   NewDC->GDIDevice      = OrigDC->GDIDevice;
   pb = BITMAPOBJ_LockBitmap(hBitmap);
-  NewDC->Surface = BitmapToSurf(pb, NewDC->GDIDevice);
+  NewDC->Surface = (HSURF)BitmapToSurf(pb, NewDC->GDIDevice);
   BITMAPOBJ_UnlockBitmap(hBitmap);
 
   NewDC->w.hPalette = OrigDC->w.hPalette;
@@ -469,7 +467,7 @@
 {
    PGD_ENABLEDRIVER GDEnableDriver;
    DRVENABLEDATA DED;
-   PSURFOBJ SurfObj;
+   SURFOBJ *SurfObj;
    PSURFGDI SurfGDI;
    UNICODE_STRING DriverFileNames;
    PWSTR CurrentName;
@@ -522,7 +520,7 @@
             /*  Call DDI driver's EnableDriver function  */
             RtlZeroMemory(&DED, sizeof(DED));
 
-            if (! GDEnableDriver(DDI_DRIVER_VERSION, sizeof(DED), &DED))
+            if (! GDEnableDriver(DDI_DRIVER_VERSION_NT5_01, sizeof(DED), &DED))
             {
                DPRINT("DrvEnableDriver failed for %S\n", CurrentName);
             }
@@ -637,7 +635,7 @@
       /* Complete initialization of the physical device */
       PrimarySurface.DriverFunctions.CompletePDev(
          PrimarySurface.PDev,
-	 &PrimarySurface);
+	 (HDEV)&PrimarySurface);
 
       DPRINT("calling DRIVER_ReferenceDriver\n");
 
@@ -658,7 +656,7 @@
          continue;
       }
 
-      SurfObj = (PSURFOBJ)AccessUserObject((ULONG) PrimarySurface.Handle);
+      SurfObj = (SURFOBJ*)AccessUserObject((ULONG) PrimarySurface.Handle);
       SurfObj->dhpdev = PrimarySurface.PDev;
       SurfGDI = (PSURFGDI)AccessInternalObject((ULONG) PrimarySurface.Handle);
       IntShowDesktop(
@@ -675,7 +673,7 @@
 IntDestroyPrimarySurface()
   {
 #if 0
-    PSURFOBJ SurfObj;
+    SURFOBJ *SurfObj;
     PSURFGDI SurfGDI;
 #endif
 
@@ -683,7 +681,7 @@
 
 #if 0
     DPRINT("Hiding mouse pointer\n" );
-    SurfObj = (PSURFOBJ)AccessUserObject((ULONG) PrimarySurface.Handle);
+    SurfObj = (SURFOBJ*)AccessUserObject((ULONG) PrimarySurface.Handle);
     SurfGDI = (PSURFGDI)AccessInternalObject((ULONG) PrimarySurface.Handle);
     SurfGDI->SetPointerShape(SurfObj, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0);
 #endif
@@ -749,7 +747,7 @@
 	 sizeof(NewDC->FillPatternSurfaces));
   NewDC->PDev = PrimarySurface.PDev;
   NewDC->Surface = PrimarySurface.Handle;
-  NewDC->GDIDevice = &PrimarySurface;
+  NewDC->GDIDevice = (HDEV)&PrimarySurface;
   NewDC->DriverFunctions = PrimarySurface.DriverFunctions;
 
   NewDC->DMW.dmSize = sizeof(NewDC->DMW);
@@ -1707,7 +1705,7 @@
   PDC dc;
   PGDIBRUSHOBJ pen;
   PGDIBRUSHOBJ brush;
-  PXLATEOBJ XlateObj;
+  XLATEOBJ *XlateObj;
   PPALGDI PalGDI;
   DWORD objectType;
   COLORREF *ColorMap;
@@ -1737,7 +1735,7 @@
         {
           Mode = PalGDI->Mode;
           PALETTE_UnlockPalette(dc->w.hPalette);
-          XlateObj = (PXLATEOBJ)IntEngCreateXlate(Mode, PAL_RGB, dc->w.hPalette, NULL);
+          XlateObj = (XLATEOBJ*)IntEngCreateXlate(Mode, PAL_RGB, dc->w.hPalette, NULL);
           if (NULL != XlateObj)
             {
               pen = PENOBJ_LockPen((HPEN) hGDIObj);
@@ -1783,7 +1781,7 @@
         {
 	  Mode = PalGDI->Mode;
           PALETTE_UnlockPalette(dc->w.hPalette);
-          XlateObj = (PXLATEOBJ)IntEngCreateXlate(Mode, PAL_RGB, dc->w.hPalette, NULL);
+          XlateObj = (XLATEOBJ*)IntEngCreateXlate(Mode, PAL_RGB, dc->w.hPalette, NULL);
           if (NULL != XlateObj)
             {
               brush = BRUSHOBJ_LockBrush((HBRUSH) hGDIObj);
@@ -1846,7 +1844,7 @@
       /* Release the old bitmap, lock the new one and convert it to a SURF */
       EngDeleteSurface(dc->Surface);
       dc->w.hBitmap = hGDIObj;
-      dc->Surface = BitmapToSurf(pb, dc->GDIDevice);
+      dc->Surface = (HSURF)BitmapToSurf(pb, dc->GDIDevice);
 
       // if we're working with a DIB, get the palette [fixme: only create if the selected palette is null]
       if(pb->dib)
@@ -2129,7 +2127,7 @@
 }
 
 BOOL FASTCALL
-IntIsPrimarSurface(PSURFGDI SurfGDI)
+IntIsPrimarySurface(PSURFGDI SurfGDI)
 {
    if (PrimarySurface.Handle == NULL)
      {

reactos/subsys/win32k/objects
dib.c 1.44 -> 1.45
diff -u -r1.44 -r1.45
--- dib.c	27 Mar 2004 00:35:02 -0000	1.44
+++ dib.c	9 Apr 2004 20:03:20 -0000	1.45
@@ -1,5 +1,5 @@
 /*
- * $Id: dib.c,v 1.44 2004/03/27 00:35:02 weiden Exp $
+ * $Id: dib.c,v 1.45 2004/04/09 20:03:20 navaraf Exp $
  *
  * ReactOS W32 Subsystem
  * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
@@ -101,12 +101,12 @@
   HBITMAP     SourceBitmap, DestBitmap;
   INT         result = 0;
   BOOL        copyBitsResult;
-  PSURFOBJ    DestSurf, SourceSurf;
+  SURFOBJ    *DestSurf, *SourceSurf;
   PSURFGDI    DestGDI;
   SIZEL       SourceSize;
   POINTL      ZeroPoint;
   RECTL       DestRect;
-  PXLATEOBJ   XlateObj;
+  XLATEOBJ   *XlateObj;
   PPALGDI     hDCPalette;
   //RGBQUAD  *lpRGB;
   HPALETTE    DDB_Palette, DIB_Palette;
@@ -129,7 +129,7 @@
   // Create a temporary surface for the destination bitmap
   DestBitmap = BitmapToSurf(bitmap, DC->GDIDevice);
 
-  DestSurf   = (PSURFOBJ) AccessUserObject( (ULONG)DestBitmap );
+  DestSurf   = (SURFOBJ*) AccessUserObject( (ULONG)DestBitmap );
   DestGDI    = (PSURFGDI) AccessInternalObject( (ULONG)DestBitmap );
 
   // Create source surface
@@ -151,14 +151,14 @@
                                  BitmapFormat(bmi->bmiHeader.biBitCount, bmi->bmiHeader.biCompression),
                                  0,
                                  (PVOID)vBits );
-  SourceSurf = (PSURFOBJ)AccessUserObject((ULONG)SourceBitmap);
+  SourceSurf = (SURFOBJ*)AccessUserObject((ULONG)SourceBitmap);
 
   // Destination palette obtained from the hDC
   hDCPalette = PALETTE_LockPalette(DC->DevInfo->hpalDefault);
   if (NULL == hDCPalette)
     {
-      EngDeleteSurface(SourceBitmap);
-      EngDeleteSurface(DestBitmap);
+      EngDeleteSurface((HSURF)SourceBitmap);
+      EngDeleteSurface((HSURF)DestBitmap);
       BITMAPOBJ_UnlockBitmap(hBitmap);
       SetLastWin32Error(ERROR_INVALID_HANDLE);
       return 0;
@@ -171,8 +171,8 @@
   DIB_Palette = BuildDIBPalette ( (PBITMAPINFO)bmi, (PINT)&DIB_Palette_Type );
   if (NULL == DIB_Palette)
     {
-      EngDeleteSurface(SourceBitmap);
-      EngDeleteSurface(DestBitmap);
+      EngDeleteSurface((HSURF)SourceBitmap);
+      EngDeleteSurface((HSURF)DestBitmap);
       BITMAPOBJ_UnlockBitmap(hBitmap);
       SetLastWin32Error(ERROR_NO_SYSTEM_RESOURCES);
       return 0;
@@ -183,8 +183,8 @@
   if (NULL == XlateObj)
     {
       PALETTE_FreePalette(DIB_Palette);
-      EngDeleteSurface(SourceBitmap);
-      EngDeleteSurface(DestBitmap);
+      EngDeleteSurface((HSURF)SourceBitmap);
+      EngDeleteSurface((HSURF)DestBitmap);
       BITMAPOBJ_UnlockBitmap(hBitmap);
       SetLastWin32Error(ERROR_NO_SYSTEM_RESOURCES);
       return 0;
@@ -211,8 +211,8 @@
   // Clean up
   EngDeleteXlate(XlateObj);
   PALETTE_FreePalette(DIB_Palette);
-  EngDeleteSurface(SourceBitmap);
-  EngDeleteSurface(DestBitmap);
+  EngDeleteSurface((HSURF)SourceBitmap);
+  EngDeleteSurface((HSURF)DestBitmap);
 
 //  if (ColorUse == DIB_PAL_COLORS)
 //    WinFree((LPSTR)lpRGB);

reactos/subsys/win32k/objects
fillshap.c 1.46 -> 1.47
diff -u -r1.46 -r1.47
--- fillshap.c	5 Apr 2004 21:26:25 -0000	1.46
+++ fillshap.c	9 Apr 2004 20:03:20 -0000	1.47
@@ -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: fillshap.c,v 1.46 2004/04/05 21:26:25 navaraf Exp $ */
+/* $Id: fillshap.c,v 1.47 2004/04/09 20:03:20 navaraf Exp $ */
 
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
@@ -104,10 +104,10 @@
 
 	for (CurrentPoint = 1; CurrentPoint < Count; ++CurrentPoint)
 	{
-	  DestRect.left     = MIN(DestRect.left, UnsafePoints[CurrentPoint].x);
-	  DestRect.right    = MAX(DestRect.right, UnsafePoints[CurrentPoint].x);
-	  DestRect.top      = MIN(DestRect.top, UnsafePoints[CurrentPoint].y);
-	  DestRect.bottom   = MAX(DestRect.bottom, UnsafePoints[CurrentPoint].y);
+	  DestRect.left     = min(DestRect.left, UnsafePoints[CurrentPoint].x);
+	  DestRect.right    = max(DestRect.right, UnsafePoints[CurrentPoint].x);
+	  DestRect.top      = min(DestRect.top, UnsafePoints[CurrentPoint].y);
+	  DestRect.bottom   = max(DestRect.bottom, UnsafePoints[CurrentPoint].y);
 	}
 
 #if 1
@@ -242,7 +242,7 @@
    int RadiusX, RadiusY;
    int Temp;
    PGDIBRUSHOBJ FillBrush, PenBrush;
-   PSURFOBJ SurfObj;
+   SURFOBJ *SurfObj;
    RECTL RectBounds;
    PDC dc;
    BOOL ret = TRUE, Cond1, Cond2;
@@ -285,7 +285,7 @@
       return FALSE;
    }
 
-   SurfObj = (PSURFOBJ)AccessUserObject((ULONG)dc->Surface);
+   SurfObj = (SURFOBJ*)AccessUserObject((ULONG)dc->Surface);
 
    nLeftRect += dc->w.DCOrgX;
    nRightRect += dc->w.DCOrgX - 1;
@@ -656,7 +656,7 @@
 #ifdef TODO
   PDC dc;
   RECTL RectBounds;
-  PSURFOBJ SurfObj;
+  SURFOBJ *SurfObj;
   BRUSHOBJ PenBrushObj;
   PBRUSHOBJ FillBrushObj;
   PSHAPEPOINT ShapePoints;
@@ -705,7 +705,7 @@
   RectBounds.top = Top;
   RectBounds.bottom = Bottom;
 
-  SurfObj = (PSURFOBJ) AccessUserObject((ULONG)dc->Surface);
+  SurfObj = (SURFOBJ*) AccessUserObject((ULONG)dc->Surface);
   HPenToBrushObj(&PenBrushObj, dc->w.hPen);
 
   /* Number of points for the circle is 4 * sqrt(2) * Radius, start
@@ -1427,7 +1427,7 @@
   Mode = PalDestGDI->Mode;
   PALETTE_UnlockPalette(dc->w.hPalette);
   
-  XlateObj = (PXLATEOBJ)IntEngCreateXlate(Mode, PAL_RGB, dc->w.hPalette, NULL);
+  XlateObj = (XLATEOBJ*)IntEngCreateXlate(Mode, PAL_RGB, dc->w.hPalette, NULL);
   ASSERT(XlateObj);
   
   Ret = IntEngGradientFill(SurfObj,

reactos/subsys/win32k/objects
gdiobj.c 1.65 -> 1.66
diff -u -r1.65 -r1.66
--- gdiobj.c	5 Apr 2004 21:26:25 -0000	1.65
+++ gdiobj.c	9 Apr 2004 20:03:20 -0000	1.66
@@ -19,7 +19,7 @@
 /*
  * GDIOBJ.C - GDI object manipulation routines
  *
- * $Id: gdiobj.c,v 1.65 2004/04/05 21:26:25 navaraf Exp $
+ * $Id: gdiobj.c,v 1.66 2004/04/09 20:03:20 navaraf Exp $
  *
  */
 
@@ -193,7 +193,7 @@
 
 #define NB_STOCK_OBJECTS (DEFAULT_GUI_FONT + 1)
 
-static HGDIOBJ *StockObjects[NB_STOCK_OBJECTS];
+static HGDIOBJ StockObjects[NB_STOCK_OBJECTS];
 static PGDI_HANDLE_TABLE  HandleTable = 0;
 static FAST_MUTEX  HandleTableMutex;
 static FAST_MUTEX  RefCountHandling;

reactos/subsys/win32k/objects
line.c 1.28 -> 1.29
diff -u -r1.28 -r1.29
--- line.c	5 Apr 2004 21:26:25 -0000	1.28
+++ line.c	9 Apr 2004 20:03:20 -0000	1.29
@@ -16,14 +16,14 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: line.c,v 1.28 2004/04/05 21:26:25 navaraf Exp $ */
+/* $Id: line.c,v 1.29 2004/04/09 20:03:20 navaraf Exp $ */
 
 // Some code from the WINE project source (www.winehq.com)
 
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
-#include <internal/safe.h>
 #include <ddk/ntddk.h>
+#include <internal/safe.h>
 #include <win32k/dc.h>
 #include <win32k/line.h>
 #include <win32k/path.h>
@@ -72,7 +72,7 @@
   SURFOBJ *SurfObj;
   BOOL     Ret;
   PGDIBRUSHOBJ PenBrushObj;
-  RECT     Bounds;
+  RECTL    Bounds;
 
   SurfObj = (SURFOBJ*)AccessUserObject ( (ULONG)dc->Surface );
   if (NULL == SurfObj)

reactos/subsys/win32k/objects
objconv.c 1.16 -> 1.17
diff -u -r1.16 -r1.17
--- objconv.c	5 Apr 2004 21:26:25 -0000	1.16
+++ objconv.c	9 Apr 2004 20:03:20 -0000	1.17
@@ -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: objconv.c,v 1.16 2004/04/05 21:26:25 navaraf Exp $ */
+/* $Id: objconv.c,v 1.17 2004/04/09 20:03:20 navaraf Exp $ */
 
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
@@ -60,7 +60,7 @@
     }
   if (NULL != BitmapHandle && NULL != GDIDevice)
     {
-      EngAssociateSurface(BitmapHandle, GDIDevice, 0);
+      EngAssociateSurface((HSURF)BitmapHandle, GDIDevice, 0);
     }
 
   return BitmapHandle;

reactos/subsys/win32k/objects
palette.c 1.16 -> 1.17
diff -u -r1.16 -r1.17
--- palette.c	27 Mar 2004 00:35:02 -0000	1.16
+++ palette.c	9 Apr 2004 20:03:20 -0000	1.17
@@ -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: palette.c,v 1.16 2004/03/27 00:35:02 weiden Exp $ */
+/* $Id: palette.c,v 1.17 2004/04/09 20:03:20 navaraf Exp $ */
 
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
@@ -31,8 +31,10 @@
 #include <include/color.h>
 #include <include/tags.h>
 
+#ifndef NO_MAPPING
 static int           PALETTE_firstFree = 0; 
 static unsigned char PALETTE_freeList[256];
+#endif
 
 int PALETTE_PaletteFlags     = 0;
 PALETTEENTRY *COLOR_sysPal   = NULL;
@@ -114,7 +116,9 @@
   int i;
   HPALETTE hpalette;
   PLOGPALETTE palPtr;
-  PPALOBJ palObj;
+#ifndef NO_MAPPING
+  PALOBJ *palObj;
+#endif
   const PALETTEENTRY* __sysPalTemplate = (const PALETTEENTRY*)COLOR_GetSystemPaletteTemplate();
 
   // create default palette (20 system colors)
@@ -134,7 +138,8 @@
   hpalette = NtGdiCreatePalette(palPtr);
   ExFreePool(palPtr);
 
-  palObj = (PPALOBJ)PALETTE_LockPalette(hpalette);
+#ifndef NO_MAPPING
+  palObj = (PALOBJ*)PALETTE_LockPalette(hpalette);
   if (palObj)
   {
     if (!(palObj->mapping = ExAllocatePool(NonPagedPool, sizeof(int) * 20)))
@@ -144,12 +149,14 @@
     }
     PALETTE_UnlockPalette(hpalette);
   }
+#endif
 
 /*  palette_size = visual->map_entries; */
 
   return hpalette;
 }
 
+#ifndef NO_MAPPING
 static void FASTCALL PALETTE_FormatSystemPalette(void)
 {
   // Build free list so we'd have an easy way to find
@@ -169,6 +176,7 @@
   }
   PALETTE_freeList[j] = 0;
 }
+#endif
 
 VOID FASTCALL PALETTE_ValidateFlags(PALETTEENTRY* lpPalE, INT size)
 {
@@ -177,9 +185,10 @@
     lpPalE[i].peFlags = PC_SYS_USED | (lpPalE[i].peFlags & 0x07);
 }
 
+#ifndef NO_MAPPING
 // Set the color-mapping table for selected palette. 
 // Return number of entries which mapping has changed.
-INT STDCALL PALETTE_SetMapping(PPALOBJ palPtr, UINT uStart, UINT uNum, BOOL mapOnly)
+INT STDCALL PALETTE_SetMapping(PALOBJ *palPtr, UINT uStart, UINT uNum, BOOL mapOnly)
 {
   char flag;
   int  prevMapping = (palPtr->mapping) ? 1 : 0;
@@ -287,5 +296,6 @@
   }
   return iRemapped;
 }
+#endif
 
 /* EOF */

reactos/subsys/win32k/objects
polyfill.c 1.12 -> 1.13
diff -u -r1.12 -r1.13
--- polyfill.c	19 Aug 2003 21:29:20 -0000	1.12
+++ polyfill.c	9 Apr 2004 20:03:20 -0000	1.13
@@ -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: polyfill.c,v 1.12 2003/08/19 21:29:20 royce Exp $
+/* $Id: polyfill.c,v 1.13 2004/04/09 20:03:20 navaraf Exp $
  *
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:           ReactOS kernel
@@ -170,7 +170,7 @@
 
   rc->xmajor = rc->absdx > rc->absdy;
 
-  rc->ErrorMax = MAX(rc->absdx,rc->absdy);
+  rc->ErrorMax = max(rc->absdx,rc->absdy);
 
   rc->Error += rc->ErrorMax / 2;
 
@@ -334,8 +334,8 @@
       pEdge->x += steps * pEdge->XDirection;
       pEdge->Error += steps * pEdge->absdy;
       ASSERT ( pEdge->Error < pEdge->ErrorMax );
-      pEdge->XIntercept[0] = MIN(x1,pEdge->x);
-      pEdge->XIntercept[1] = MAX(x1,pEdge->x);
+      pEdge->XIntercept[0] = min(x1,pEdge->x);
+      pEdge->XIntercept[1] = max(x1,pEdge->x);
     }
     else
     {
@@ -409,7 +409,7 @@
   int ScanLine,
   FILL_EDGE* ActiveHead,
   SURFOBJ *SurfObj,
-  PBRUSHOBJ BrushObj,
+  BRUSHOBJ *BrushObj,
   MIX RopMode )
 {
   FILL_EDGE *pLeft, *pRight;
@@ -457,7 +457,7 @@
   int ScanLine,
   FILL_EDGE* ActiveHead,
   SURFOBJ *SurfObj,
-  PBRUSHOBJ BrushObj,
+  BRUSHOBJ *BrushObj,
   MIX RopMode )
 {
   FILL_EDGE *pLeft, *pRight;
@@ -497,8 +497,8 @@
 	)
       {
 	// yup, just tack it on to our existing line
-	x1 = MIN(x1,newx1);
-	x2 = MAX(x2,newx2);
+	x1 = min(x1,newx1);
+	x2 = max(x2,newx2);
       }
       else
       {
@@ -555,7 +555,7 @@
 FillPolygon(
   PDC dc,
   SURFOBJ *SurfObj,
-  PBRUSHOBJ BrushObj,
+  BRUSHOBJ *BrushObj,
   MIX RopMode,
   CONST PPOINT Points,
   int Count,
@@ -572,7 +572,7 @@
     int ScanLine,
     FILL_EDGE* ActiveHead,
     SURFOBJ *SurfObj,
-    PBRUSHOBJ BrushObj,
+    BRUSHOBJ *BrushObj,
     MIX RopMode );
 
   //DPRINT("FillPolygon\n");

reactos/subsys/win32k/objects
print.c 1.15 -> 1.16
diff -u -r1.15 -r1.16
--- print.c	1 Mar 2004 19:25:33 -0000	1.15
+++ print.c	9 Apr 2004 20:03:20 -0000	1.16
@@ -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: print.c,v 1.15 2004/03/01 19:25:33 navaraf Exp $ */
+/* $Id: print.c,v 1.16 2004/04/09 20:03:20 navaraf Exp $ */
 
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
@@ -66,12 +66,12 @@
 INT
 STDCALL
 IntEngExtEscape(
-   HSURF  Surface,
-   INT    Escape,
-   INT    InSize,
-   LPVOID InData,
-   INT    OutSize,
-   LPVOID OutData)
+   SURFOBJ *Surface,
+   INT      Escape,
+   INT      InSize,
+   LPVOID   InData,
+   INT      OutSize,
+   LPVOID   OutData)
 {
    UNIMPLEMENTED;
    return -1;
@@ -87,7 +87,7 @@
    INT    OutSize,
    LPSTR  OutData)
 {
-   PSURFOBJ Surface = (PSURFOBJ)AccessUserObject((ULONG)dc->Surface);
+   SURFOBJ *Surface = (SURFOBJ*)AccessUserObject((ULONG)dc->Surface);
 
    if ( NULL == dc->DriverFunctions.Escape )
    {
@@ -197,7 +197,7 @@
 INT
 STDCALL
 NtGdiStartDoc(HDC  hDC,
-                  CONST PDOCINFOW  di)
+                  CONST LPDOCINFOW  di)
 {
   UNIMPLEMENTED;
 }

reactos/subsys/win32k/objects
region.c 1.47 -> 1.48
diff -u -r1.47 -r1.48
--- region.c	5 Apr 2004 21:26:25 -0000	1.47
+++ region.c	9 Apr 2004 20:03:20 -0000	1.48
@@ -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: region.c,v 1.47 2004/04/05 21:26:25 navaraf Exp $ */
+/* $Id: region.c,v 1.48 2004/04/09 20:03:20 navaraf Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <ddk/ntddk.h>
@@ -69,7 +69,7 @@
 /*
  *   Check to see if there is enough memory in the present region.
  */
-static inline int xmemcheck(ROSRGNDATA *reg, LPRECT *rect, LPRECT *firstrect ) {
+static inline int xmemcheck(ROSRGNDATA *reg, PRECT *rect, PRECT *firstrect ) {
 	if ( (reg->rdh.nCount+1)*sizeof( RECT ) >= reg->rdh.nRgnSize ) {
 		PRECT temp;
 		temp = ExAllocatePoolWithTag( PagedPool, (2 * (reg->rdh.nRgnSize)), TAG_REGION);
@@ -136,13 +136,13 @@
   {
     if (dst->rdh.nRgnSize < src->rdh.nCount * sizeof(RECT))
     {
-	  PCHAR temp;
+	  PRECT temp;
 
 	  temp = ExAllocatePoolWithTag(PagedPool, src->rdh.nCount * sizeof(RECT), TAG_REGION );
 	  if( !temp )
 		return FALSE;
 
-	  if( dst->Buffer && dst->Buffer != (char *) &dst->BuiltInRect )
+	  if( dst->Buffer && dst->Buffer != &dst->BuiltInRect )
 	  	ExFreePool( dst->Buffer );	//free the old buffer
 	  dst->Buffer = temp;
       dst->rdh.nRgnSize = src->rdh.nCount * sizeof(RECT);  //size of region buffer
@@ -217,7 +217,7 @@
     }
     else{
       xrect = ExAllocatePoolWithTag(PagedPool, rgnSrc->rdh.nCount * sizeof(RECT), TAG_REGION);
-	  if( rgnDst->Buffer && rgnDst->Buffer != (char *) &rgnDst->BuiltInRect )
+	  if( rgnDst->Buffer && rgnDst->Buffer != &rgnDst->BuiltInRect )
 	  	ExFreePool( rgnDst->Buffer ); //free the old buffer. will be assigned to xrect below.
 	}
 
@@ -245,7 +245,7 @@
       else
         RtlCopyMemory(xrect, rgnSrc->Buffer, rgnDst->rdh.nCount * sizeof(RECT));
 
-	  rgnDst->Buffer = (char*)xrect;
+	  rgnDst->Buffer = xrect;
     } else
       return FALSE;
   }
@@ -275,14 +275,14 @@
 
     if((rgnDst != rgnSrc) && (rgnDst->rdh.nCount < (i = (clipb - clipa))))
     {
-	  PCHAR temp;
+	  PRECT temp;
 	  temp = ExAllocatePoolWithTag( PagedPool, i * sizeof(RECT), TAG_REGION );
       if(!temp)
 	      return FALSE;
 
-	  if( rgnDst->Buffer && rgnDst->Buffer != (char *) &rgnDst->BuiltInRect )
+	  if( rgnDst->Buffer && rgnDst->Buffer != &rgnDst->BuiltInRect )
 	  	ExFreePool( rgnDst->Buffer ); //free the old buffer
-      (PRECT)rgnDst->Buffer = temp;
+      rgnDst->Buffer = temp;
       rgnDst->rdh.nCount = i;
 	  rgnDst->rdh.nRgnSize = i * sizeof(RECT);
     }
@@ -319,8 +319,8 @@
 
     rgnDst->rdh.nCount = j--;
     for(i = 0; i <= j; i++) // fixup top band
-      if(((PRECT)rgnDst->Buffer + i)->top < left)
-        ((PRECT)rgnDst->Buffer + i)->top = left;
+      if((rgnDst->Buffer + i)->top < left)
+        (rgnDst->Buffer + i)->top = left;
       else
         break;
 
@@ -341,7 +341,7 @@
 empty:
 	if(!rgnDst->Buffer)
 	{
-	  rgnDst->Buffer = (char*)ExAllocatePoolWithTag(PagedPool, RGN_DEFAULT_RECTS * sizeof(RECT), TAG_REGION);
+	  rgnDst->Buffer = (PRECT)ExAllocatePoolWithTag(PagedPool, RGN_DEFAULT_RECTS * sizeof(RECT), TAG_REGION);
 	  if(rgnDst->Buffer){
 	    rgnDst->rdh.nCount = RGN_DEFAULT_RECTS;
 		rgnDst->rdh.nRgnSize = RGN_DEFAULT_RECTS * sizeof(RECT);
@@ -814,7 +814,7 @@
 		    newReg->Buffer = ExAllocatePoolWithTag( PagedPool, newReg->rdh.nCount*sizeof(RECT), TAG_REGION );
 
 		    if (! newReg->Buffer)
-				newReg->Buffer = (char*)prev_rects;
+				newReg->Buffer = prev_rects;
 			else{
 				newReg->rdh.nRgnSize = newReg->rdh.nCount*sizeof(RECT);
 				RtlCopyMemory( newReg->Buffer, prev_rects, newReg->rdh.nRgnSize );
@@ -829,7 +829,7 @@
 		     * the region is empty
 		     */
 		    newReg->rdh.nRgnSize = sizeof(RECT);
-		    if (newReg->Buffer != (char *) &newReg->BuiltInRect)
+		    if (newReg->Buffer != &newReg->BuiltInRect)
 			ExFreePool( newReg->Buffer );
 		    newReg->Buffer = ExAllocatePoolWithTag( PagedPool, sizeof(RECT), TAG_REGION );
 			ASSERT( newReg->Buffer );
@@ -1405,7 +1405,7 @@
 {
     ROSRGNDATA region;
 
-    region.Buffer = (char*)(&(region.rdh.rcBound));
+    region.Buffer = &region.rdh.rcBound;
     region.rdh.nCount = 1;
     region.rdh.nRgnSize = sizeof( RECT );
     region.rdh.rcBound = *rect;
@@ -1484,7 +1484,7 @@
         {
           if (1 == n)
             {
-              pReg->Buffer = (char *) &pReg->BuiltInRect;
+              pReg->Buffer = &pReg->BuiltInRect;
             }
           else
             {
@@ -1515,7 +1515,7 @@
 BOOL FASTCALL RGNDATA_InternalDelete( PROSRGNDATA pRgn )
 {
   ASSERT(pRgn);
-  if(pRgn->Buffer && pRgn->Buffer != (char *) &pRgn->BuiltInRect)
+  if(pRgn->Buffer && pRgn->Buffer != &pRgn->BuiltInRect)
     ExFreePool(pRgn->Buffer);
   return TRUE;
 }
@@ -1867,7 +1867,7 @@
 {
   HBRUSH oldhBrush;
   PROSRGNDATA rgn;
-  PRECTL r;
+  PRECT r;
 
   if (NULL == (rgn = RGNDATA_LockRgn(hRgn)))
     {
@@ -1880,7 +1880,7 @@
       return FALSE;
     }
 
-  for (r = (PRECT) rgn->Buffer; r < ((PRECT) rgn->Buffer) + rgn->rdh.nCount; r++)
+  for (r = rgn->Buffer; r < rgn->Buffer + rgn->rdh.nCount; r++)
     {
       NtGdiPatBlt(hDC, r->left, r->top, r->right - r->left, r->bottom - r->top, PATCOPY);
     }
@@ -2038,7 +2038,7 @@
   }
 
   ClipRegion = IntEngCreateClipRegion (
-	  visrgn->rdh.nCount, (PRECTL)visrgn->Buffer, visrgn->rdh.rcBound );
+	  visrgn->rdh.nCount, (PRECTL)visrgn->Buffer, (PRECTL)&visrgn->rdh.rcBound );
   ASSERT( ClipRegion );
   pBrush = BRUSHOBJ_LockBrush(dc->w.hBrush);
   ASSERT(pBrush);

reactos/subsys/win32k/objects
text.c 1.88 -> 1.89
diff -u -r1.88 -r1.89
--- text.c	5 Apr 2004 21:26:25 -0000	1.88
+++ text.c	9 Apr 2004 20:03:20 -0000	1.89
@@ -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.88 2004/04/05 21:26:25 navaraf Exp $ */
+/* $Id: text.c,v 1.89 2004/04/09 20:03:20 navaraf Exp $ */
 
 
 #undef WIN32_LEAN_AND_MEAN
@@ -34,7 +34,7 @@
 #include <win32k/brush.h>
 #include <win32k/dc.h>
 #include <win32k/text.h>
-#include <win32k/kapi.h>
+#include <win32k/font.h>
 #include <include/error.h>
 #include <include/desktop.h>
 #include <ft2build.h>
@@ -144,13 +144,13 @@
   BOOL Ret;
   HDC hDC;
   PDC dc;
-  PSURFOBJ SurfObj;
+  SURFOBJ *SurfObj;
   Ret = RenderingEnabled;
   hDC = IntGetScreenDC();
   if(hDC)
   {
     dc = DC_LockDc(hDC);
-    SurfObj = (PSURFOBJ)AccessUserObject((ULONG) dc->Surface);
+    SurfObj = (SURFOBJ*)AccessUserObject((ULONG) dc->Surface);
     if(SurfObj)
       Ret = (SurfObj->iBitmapFormat >= BMF_8BPP);
     DC_UnlockDc(hDC);
@@ -187,7 +187,7 @@
 IntGdiAddFontResource(PUNICODE_STRING Filename, DWORD fl)
 {
   HFONT NewFont;
-  PFONTOBJ FontObj;
+  FONTOBJ *FontObj;
   PFONTGDI FontGDI;
   NTSTATUS Status;
   HANDLE FileHandle;
@@ -202,7 +202,7 @@
   PFONT_ENTRY entry;
 
   NewFont = (HFONT)CreateGDIHandle(sizeof( FONTGDI ), sizeof( FONTOBJ ));
-  FontObj = (PFONTOBJ) AccessUserObject( (ULONG) NewFont );
+  FontObj = (FONTOBJ*) AccessUserObject( (ULONG) NewFont );
   FontGDI = (PFONTGDI) AccessInternalObject( (ULONG) NewFont );
 
   //  Open the Module
@@ -420,7 +420,7 @@
 }
 
 static NTSTATUS STDCALL
-GetFontObjectsFromTextObj(PTEXTOBJ TextObj, HFONT *FontHandle, PFONTOBJ *FontObj, PFONTGDI *FontGDI)
+GetFontObjectsFromTextObj(PTEXTOBJ TextObj, HFONT *FontHandle, FONTOBJ **FontObj, PFONTGDI *FontGDI)
 {
   NTSTATUS Status = STATUS_SUCCESS;
 
@@ -1498,15 +1498,15 @@
    HBRUSH hBrushBg = NULL;
    PGDIBRUSHOBJ BrushBg = NULL;
    HBITMAP HSourceGlyph;
-   PSURFOBJ SourceGlyphSurf;
+   SURFOBJ *SourceGlyphSurf;
    SIZEL bitSize;
    FT_CharMap found = 0, charmap;
    INT yoff;
-   PFONTOBJ FontObj;
+   FONTOBJ *FontObj;
    PFONTGDI FontGDI;
    PTEXTOBJ TextObj;
    PPALGDI PalDestGDI;
-   PXLATEOBJ XlateObj, XlateObj2;
+   XLATEOBJ *XlateObj, *XlateObj2;
    ULONG Mode;
    FT_Render_Mode RenderMode;
    BOOLEAN Render;
@@ -1598,7 +1598,7 @@
 	   Mode = PalDestGDI->Mode;
 	   PALETTE_UnlockPalette(dc->w.hPalette);
    }
-   XlateObj = (PXLATEOBJ)IntEngCreateXlate(Mode, PAL_RGB, dc->w.hPalette, NULL);
+   XlateObj = (XLATEOBJ*)IntEngCreateXlate(Mode, PAL_RGB, dc->w.hPalette, NULL);
    hBrushFg = NtGdiCreateSolidBrush(XLATEOBJ_iXlate(XlateObj, dc->w.textColor));
    BrushFg = BRUSHOBJ_LockBrush(hBrushFg);
    if ((fuOptions & ETO_OPAQUE) || dc->w.backgroundMode == OPAQUE)
@@ -1614,7 +1614,7 @@
          goto fail;
       }
    }
-   XlateObj2 = (PXLATEOBJ)IntEngCreateXlate(PAL_RGB, Mode, NULL, dc->w.hPalette);
+   XlateObj2 = (XLATEOBJ*)IntEngCreateXlate(PAL_RGB, Mode, NULL, dc->w.hPalette);
   
    SourcePoint.x = 0;
    SourcePoint.y = 0;
@@ -1823,7 +1823,7 @@
        */
 
       HSourceGlyph = EngCreateBitmap(bitSize, pitch, (glyph->bitmap.pixel_mode == ft_pixel_mode_grays) ? BMF_8BPP : BMF_1BPP, 0, glyph->bitmap.buffer);
-      SourceGlyphSurf = (PSURFOBJ)AccessUserObject((ULONG) HSourceGlyph);
+      SourceGlyphSurf = (SURFOBJ*)AccessUserObject((ULONG) HSourceGlyph);
     
       /*
        * Use the font data as a mask to paint onto the DCs surface using a
@@ -1842,7 +1842,7 @@
          &BrushFg->BrushObject,
          &BrushOrigin);
 
-      EngDeleteSurface(HSourceGlyph);
+      EngDeleteSurface((HSURF)HSourceGlyph);
 
       if (NULL == Dx)
       {

reactos/subsys/win32k/stubs
stubs.c 1.28 -> 1.29
diff -u -r1.28 -r1.29
--- stubs.c	11 Mar 2004 21:38:58 -0000	1.28
+++ stubs.c	9 Apr 2004 20:03:20 -0000	1.29
@@ -320,7 +320,7 @@
 STDCALL
 EngGetFilePath(
 	IN  HANDLE h,
-	OUT WCHAR* pDest
+        OUT WCHAR (*pDest)[MAX_PATH+1]
 	)
 {
   // www.osr.com/ddk/graphics/gdifncs_5g2v.htm
@@ -879,7 +879,7 @@
 ULONG
 STDCALL
 FONTOBJ_cGetAllGlyphHandles (
-	IN PFONTOBJ  FontObj,
+	IN FONTOBJ  *FontObj,
 	IN HGLYPH   *Glyphs
 	)
 {
@@ -893,7 +893,7 @@
 ULONG
 STDCALL
 FONTOBJ_cGetGlyphs(
-	IN PFONTOBJ FontObj,
+	IN FONTOBJ *FontObj,
 	IN ULONG    Mode,
 	IN ULONG    NumGlyphs,
 	IN HGLYPH  *GlyphHandles,
@@ -909,7 +909,7 @@
  */
 IFIMETRICS*
 STDCALL
-FONTOBJ_pifi ( IN PFONTOBJ FontObj )
+FONTOBJ_pifi ( IN FONTOBJ *FontObj )
 {
   UNIMPLEMENTED;
   return NULL;
@@ -921,7 +921,7 @@
 PVOID
 STDCALL
 FONTOBJ_pvTrueTypeFontFile (
-	IN PFONTOBJ  FontObj,
+	IN FONTOBJ  *FontObj,
 	IN ULONG    *FileSize)
 {
   UNIMPLEMENTED;
@@ -933,7 +933,7 @@
  */
 XFORMOBJ*
 STDCALL
-FONTOBJ_pxoGetXform ( IN PFONTOBJ FontObj )
+FONTOBJ_pxoGetXform ( IN FONTOBJ *FontObj )
 {
   UNIMPLEMENTED;
   return NULL;
@@ -945,7 +945,7 @@
 VOID
 STDCALL
 FONTOBJ_vGetInfo (
-	IN  PFONTOBJ   FontObj,
+	IN  FONTOBJ   *FontObj,
 	IN  ULONG      InfoSize,
 	OUT PFONTINFO  FontInfo)
 {
@@ -1243,10 +1243,10 @@
  */
 FLATPTR STDCALL
 HeapVidMemAllocAligned(
-   IN VIDEOMEMORY *lpVidMem,
+   IN LPVIDMEM lpVidMem,
    IN DWORD dwWidth,
    IN DWORD dwHeight,
-   IN /*LPSURFACEALIGNMENT*/LPVOID lpAlignment,
+   IN LPSURFACEALIGNMENT lpAlignment,
    OUT LPLONG lpNewPitch)
 {
    UNIMPLEMENTED;

reactos/w32api/include/ddk
prntfont.h added at 1.1
diff -N prntfont.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ prntfont.h	9 Apr 2004 20:03:21 -0000	1.1
@@ -0,0 +1,291 @@
+/*
+ * prntfont.h
+ *
+ * Declarations for Windows NT printer driver font metrics
+ *
+ * This file is part of the w32api package.
+ *
+ * Contributors:
+ *   Created by Filip Navara <xnavara@volny.cz>
+ *
+ * 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 __PRNTFONT_H
+#define __PRNTFONT_H
+
+#ifndef TAG
+#define TAG(_a, _b, _c, _d) (ULONG) \
+	(((_a) << 0) + ((_b) << 8) + ((_c) << 16) + ((_d) << 24))
+#endif
+
+#define UNIFM_VERSION_1_0		0x10000
+#define UNI_GLYPHSETDATA_VERSION_1_0	0x10000
+
+#define UFM_SOFT	1
+#define UFM_CART        2
+#define UFM_SCALABLE    4
+
+#define DF_TYPE_HPINTELLIFONT	0
+#define DF_TYPE_TRUETYPE	1
+#define DF_TYPE_PST1		2
+#define DF_TYPE_CAPSL		3
+#define DF_TYPE_OEM1		4
+#define DF_TYPE_OEM2		5
+#define DF_NOITALIC		1
+#define DF_NOUNDER		2
+#define DF_XM_CR		4
+#define DF_NO_BOLD		8
+#define DF_NO_DOUBLE_UNDERLINE	16
+#define DF_NO_STRIKETHRU	32
+#define DF_BKSP_OK		64
+
+#define MTYPE_COMPOSE			1
+#define MTYPE_DIRECT			2
+#define MTYPE_PAIRED			4
+#define MTYPE_FORMAT_MASK		7
+#define MTYPE_SINGLE			8
+#define MTYPE_DOUBLE			16
+#define MTYPE_DOUBLEBYTECHAR_MASK	24
+#define MTYPE_REPLACE			32
+#define MTYPE_ADD			64
+#define MTYPE_DISABLE			128
+#define MTYPE_PREDEFIN_MASK		192
+
+#define CC_NOPRECNV	0x0000FFFF
+#define CC_DEFAULT	0
+#define CC_CP437	-1
+#define CC_CP850	-2
+#define CC_CP863	-3
+#define CC_BIG5		-10
+#define CC_ISC		-11
+#define CC_JIS		-12
+#define CC_JIS_ANK	-13
+#define CC_NS86		-14
+#define CC_TCA		-15
+#define CC_GB2312	-16
+#define CC_SJIS		-17
+#define CC_WANSUNG	-18
+
+#define UFF_FILE_MAGIC		TAG('1','F','F','U')
+#define UFF_VERSION_NUMBER	0x10001
+#define FONT_DIR_SORTED		1
+#define FONT_REC_SIG            TAG('C','E','R','F')
+#define WINNT_INSTALLER_SIG     TAG('I','F','T','N')
+
+#define FONT_FL_UFM             0x0001
+#define FONT_FL_IFI             0x0002
+#define FONT_FL_SOFTFONT        0x0004
+#define FONT_FL_PERMANENT_SF    0x0008
+#define FONT_FL_DEVICEFONT      0x0010
+#define FONT_FL_GLYPHSET_GTT    0x0020
+#define FONT_FL_GLYPHSET_RLE    0x0040
+#define FONT_FL_RESERVED        0x8000
+
+#define DATA_UFM_SIG        TAG('M','F','U','D')
+#define DATA_IFI_SIG        TAG('I','F','I','D')
+#define DATA_GTT_SIG        TAG('T','T','G','D')
+#define DATA_CTT_SIG        TAG('T','T','C','D')
+#define DATA_VAR_SIG        TAG('R','A','V','D')
+
+#define FG_CANCHANGE	128
+#define WM_FI_FILENAME	900
+
+#define GET_UNIDRVINFO(pUFM) ((PUNIDRVINFO)((ULONG_PTR)(pUFM) + (pUFM)->loUnidrvInfo))
+#define GET_IFIMETRICS(pUFM) ((IFIMETRICS*)((ULONG_PTR)(pUFM) + (pUFM)->loIFIMetrics))
+#define GET_EXTTEXTMETRIC(pUFM) ((EXTTEXTMETRIC*)((ULONG_PTR)(pUFM) + (pUFM)->loExtTextMetric))
+#define GET_WIDTHTABLE(pUFM) ((PWIDTHTABLE)((ULONG_PTR)(pUFM) + (pUFM)->loWidthTable))
+#define GET_KERNDATA(pUFM) ((PKERNDATA)((ULONG_PTR)(pUFM) + (pUFM)->loKernPair))
+#define GET_SELECT_CMD(pUni) ((PCHAR)(pUni) + (pUni)->SelectFont.loOffset)
+#define GET_UNSELECT_CMD(pUni) ((PCHAR)(pUni) + (pUni)->UnSelectFont.loOffset)
+#define GET_GLYPHRUN(pGTT) ((PGLYPHRUN)((ULONG_PTR)(pGTT) + ((PUNI_GLYPHSETDATA)pGTT)->loRunOffset))
+#define GET_CODEPAGEINFO(pGTT) ((PUNI_CODEPAGEINFO)((ULONG_PTR)(pGTT) + ((PUNI_GLYPHSETDATA)pGTT)->loCodePageOffset))
+#define GET_MAPTABLE(pGTT) ((PMAPTABLE)((ULONG_PTR)(pGTT) + ((PUNI_GLYPHSETDATA)pGTT)->loMapTableOffset))
+
+typedef struct _UNIFM_HDR
+{
+  DWORD  dwSize;
+  DWORD  dwVersion;
+  ULONG  ulDefaultCodepage;
+  LONG  lGlyphSetDataRCID;
+  DWORD  loUnidrvInfo;
+  DWORD  loIFIMetrics;
+  DWORD  loExtTextMetric;
+  DWORD  loWidthTable;
+  DWORD  loKernPair;
+  DWORD  dwReserved[2];
+} UNIFM_HDR, *PUNIFM_HDR;
+
+typedef struct _INVOC
+{
+  DWORD  dwCount;
+  DWORD  loOffset;
+} INVOC, *PINVOC;
+
+typedef struct _UNIDRVINFO
+{
+  DWORD  dwSize;
+  DWORD  flGenFlags;
+  WORD  wType;
+  WORD  fCaps;
+  WORD  wXRes;
+  WORD  wYRes;
+  SHORT  sYAdjust;
+  SHORT  sYMoved;
+  WORD  wPrivateData; 
+  SHORT  sShift; 
+  INVOC  SelectFont;
+  INVOC  UnSelectFont;
+  WORD  wReserved[4];
+} UNIDRVINFO, *PUNIDRVINFO;
+
+typedef struct _EXTTEXTMETRIC
+{
+  SHORT  emSize;
+  SHORT  emPointSize;
+  SHORT  emOrientation;
+  SHORT  emMasterHeight;
+  SHORT  emMinScale;
+  SHORT  emMaxScale;
+  SHORT  emMasterUnits;
+  SHORT  emCapHeight;
+  SHORT  emXHeight;
+  SHORT  emLowerCaseAscent;
+  SHORT  emLowerCaseDescent;
+  SHORT  emSlant;
+  SHORT  emSuperScript;
+  SHORT  emSubScript;
+  SHORT  emSuperScriptSize;
+  SHORT  emSubScriptSize;
+  SHORT  emUnderlineOffset;
+  SHORT  emUnderlineWidth;
+  SHORT  emDoubleUpperUnderlineOffset;
+  SHORT  emDoubleLowerUnderlineOffset;
+  SHORT  emDoubleUpperUnderlineWidth;
+  SHORT  emDoubleLowerUnderlineWidth;
+  SHORT  emStrikeOutOffset;
+  SHORT  emStrikeOutWidth;
+  WORD  emKernPairs;
+  WORD  emKernTracks;
+} EXTTEXTMETRIC, *PEXTTEXTMETRIC;
+
+typedef struct _WIDTHRUN
+{
+  WORD  wStartGlyph;
+  WORD  wGlyphCount;
+  DWORD  loCharWidthOffset;
+} WIDTHRUN, *PWIDTHRUN;
+
+typedef struct _WIDTHTABLE
+{
+  DWORD  dwSize;
+  DWORD  dwRunNum;
+  WIDTHRUN  WidthRun[1];
+} WIDTHTABLE, *PWIDTHTABLE;
+
+typedef struct _KERNDATA
+{
+  DWORD  dwSize;
+  DWORD  dwKernPairNum;
+  FD_KERNINGPAIR  KernPair[1];
+} KERNDATA, *PKERNDATA;
+
+typedef struct _UNI_GLYPHSETDATA
+{
+  DWORD  dwSize;
+  DWORD  dwVersion;
+  DWORD  dwFlags;
+  LONG  lPredefinedID;
+  DWORD  dwGlyphCount;
+  DWORD  dwRunCount;
+  DWORD  loRunOffset;
+  DWORD  dwCodePageCount;
+  DWORD  loCodePageOffset;
+  DWORD  loMapTableOffset;
+  DWORD  dwReserved[2];
+} UNI_GLYPHSETDATA, *PUNI_GLYPHSETDATA;
+
+typedef struct _UNI_CODEPAGEINFO
+{
+  DWORD  dwCodePage;
+  INVOC  SelectSymbolSet;
+  INVOC  UnSelectSymbolSet;
+} UNI_CODEPAGEINFO, *PUNI_CODEPAGEINFO;
+
+typedef struct _GLYPHRUN
+{
+  WCHAR  wcLow;
+  WORD  wGlyphCount;
+} GLYPHRUN, *PGLYPHRUN;
+
+typedef struct _TRANSDATA
+{
+  BYTE  ubCodePageID;
+  BYTE  ubType;
+  union
+  {
+    SHORT  sCode;
+    BYTE  ubCode;
+    BYTE  ubPairs[2];
+  } uCode;
+} TRANSDATA, *PTRANSDATA;
+
+typedef struct _MAPTABLE {
+  DWORD  dwSize;
+  DWORD  dwGlyphNum;
+  TRANSDATA  Trans[1];
+} MAPTABLE, *PMAPTABLE;
+
+typedef struct _UFF_FILEHEADER {
+  DWORD  dwSignature;
+  DWORD  dwVersion;
+  DWORD  dwSize;
+  DWORD  nFonts;
+  DWORD  nGlyphSets;
+  DWORD  nVarData;
+  DWORD  offFontDir;
+  DWORD  dwFlags;
+  DWORD  dwReserved[4];
+} UFF_FILEHEADER, *PUFF_FILEHEADER;
+
+typedef struct _UFF_FONTDIRECTORY {
+  DWORD  dwSignature;
+  WORD  wSize;
+  WORD  wFontID;
+  SHORT  sGlyphID;
+  WORD  wFlags;
+  DWORD  dwInstallerSig;
+  DWORD  offFontName;
+  DWORD  offCartridgeName;
+  DWORD  offFontData;
+  DWORD  offGlyphData;
+  DWORD  offVarData;
+} UFF_FONTDIRECTORY, *PUFF_FONTDIRECTORY;
+
+typedef struct _DATA_HEADER {
+  DWORD  dwSignature;
+  WORD  wSize;
+  WORD  wDataID;
+  DWORD  dwDataSize;
+  DWORD  dwReserved;
+} DATA_HEADER, *PDATA_HEADER;
+
+typedef struct _OEMFONTINSTPARAM {
+  DWORD  cbSize;
+  HANDLE  hPrinter;
+  HANDLE  hModule;
+  HANDLE  hHeap;
+  DWORD  dwFlags;
+  PWSTR  pFontInstallerName;
+} OEMFONTINSTPARAM, *POEMFONTINSTPARAM;
+
+#endif /* __PRNTFONT_H */

reactos/w32api/include/ddk
ntapi.h 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- ntapi.h	19 Mar 2004 21:33:48 -0000	1.2
+++ ntapi.h	9 Apr 2004 20:03:21 -0000	1.3
@@ -1930,9 +1930,6 @@
 ZwStopProfile(
   IN HANDLE  ProfileHandle);
 
-
-
-
 /* Local Procedure Call (LPC) */
 
 typedef struct _LPC_MESSAGE {
@@ -1946,6 +1943,8 @@
 	UCHAR  Data[ANYSIZE_ARRAY];
 } LPC_MESSAGE, *PLPC_MESSAGE;
 
+#define LPC_MESSAGE_BASE_SIZE	24
+
 typedef enum _LPC_TYPE {
 	LPC_NEW_MESSAGE,
 	LPC_REQUEST,

reactos/w32api/include/ddk
ntifs.h 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- ntifs.h	21 Feb 2004 09:20:38 -0000	1.1
+++ ntifs.h	9 Apr 2004 20:03:21 -0000	1.2
@@ -32,11 +32,11 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "ntapi.h"
 
+#pragma pack(push,4)
+
 #define VER_PRODUCTBUILD 10000
 
 #ifndef NTSYSAPI

reactos/w32api/include/ddk
winddi.h 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- winddi.h	21 Feb 2004 09:20:39 -0000	1.1
+++ winddi.h	9 Apr 2004 20:03:21 -0000	1.2
@@ -38,12 +38,9 @@
 #include "ntddk.h"
 #include <wingdi.h>
 
-#if 1
+#ifndef __DD_INCLUDED__
 /* FIXME: Some DirectDraw structures not added yet */
 typedef ULONG_PTR FLATPTR;
-typedef PVOID LPVIDMEM;
-typedef PVOID LPVMEMHEAP;
-typedef PVOID PGLYPHOS;
 typedef struct _DD_SURFACECALLBACKS {
 } DD_SURFACECALLBACKS, *PDD_SURFACECALLBACKS;
 typedef struct _DD_PALETTECALLBACKS {
@@ -52,10 +49,6 @@
 } DD_CALLBACKS, *PDD_CALLBACKS;
 typedef struct _DD_HALINFO {
 } DD_HALINFO, *PDD_HALINFO;
-typedef struct _DDSCAPS {
-} DDSCAPS, *PDDSCAPS;
-typedef struct _DDSCAPSEX {
-} DDSCAPSEX, *PDDSCAPSEX;
 typedef struct _VIDEOMEMORY {
 } VIDEOMEMORY, *LPVIDEOMEMORY;
 typedef struct _DD_DIRECTDRAW_GLOBAL {
@@ -64,6 +57,18 @@
 } DD_SURFACE_LOCAL, *PDD_SURFACE_LOCAL, *LPDD_SURFACE_LOCAL;
 #endif
 
+#ifndef __DDRAWI_INCLUDED__
+typedef PVOID LPVIDMEM;
+#endif
+
+#if !defined(__DD_INCLUDED__) && !defined(__DDRAWI_INCLUDED__)
+typedef struct _DDSCAPS {
+} DDSCAPS, *PDDSCAPS;
+typedef struct _DDSCAPSEX {
+} DDSCAPSEX, *PDDSCAPSEX;
+typedef PVOID LPVMEMHEAP;
+#endif
+
 #if defined(_WIN32K_)
 #define WIN32KAPI DECL_EXPORT
 #else
@@ -464,6 +469,13 @@
 
 DECLARE_HANDLE(HSEMAPHORE);
 
+typedef struct {
+  DWORD  nSize;
+  HDC  hdc;
+  PBYTE  pvEMF;
+  PBYTE  pvCurrentRecord;
+} EMFINFO, *PEMFINFO;
+
 typedef struct _ENGSAFESEMAPHORE {
   HSEMAPHORE  hsem;
   LONG  lCount;
@@ -2147,7 +2159,7 @@
   IN CLIPOBJ  *pco,
   IN XLATEOBJ  *pxlo,
   IN COLORADJUSTMENT  *pca,
-  IN POINTL  pptlHTOrg,
+  IN POINTL  *pptlHTOrg,
   IN RECTL  *prclDest,
   IN RECTL  *prclSrc,
   IN POINTL  *pptlMask,
@@ -2211,7 +2223,7 @@
   IN RECTL  *prclOpaque,
   IN BRUSHOBJ  *pboFore,
   IN BRUSHOBJ  *pboOpaque,
-  IN POINTL  pptlOrg,
+  IN POINTL  *pptlOrg,
   IN MIX  mix);
 
 WIN32KAPI
@@ -2490,7 +2502,7 @@
   IN ULONG  iMode,
   IN ULONG  cGlyph,
   IN HGLYPH  *phg,
-  OUT PVOID  **ppvGlyph);
+  OUT PVOID  *ppvGlyph);
 
 WIN32KAPI
 FD_GLYPHSET*
@@ -2684,7 +2696,7 @@
 STROBJ_bEnumPositionsOnly(
   IN STROBJ  *pstro,
   OUT ULONG  *pc,
-  OUT PGLYPHOS  **ppgpos);
+  OUT PGLYPHPOS  *ppgpos);
 
 WIN32KAPI
 BOOL

reactos/w32api/include/ddk
winddk.h 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- winddk.h	7 Apr 2004 15:33:55 -0000	1.6
+++ winddk.h	9 Apr 2004 20:03:21 -0000	1.7
@@ -4142,6 +4142,8 @@
   return Entry;
 }
 
+#if !defined(_WINBASE_H) || _WIN32_WINNT < 0x0501
+
 NTOSAPI
 PSLIST_ENTRY
 DDKFASTAPI
@@ -4155,6 +4157,8 @@
   IN PSLIST_HEADER  ListHead,
   IN PSLIST_ENTRY  ListEntry);
 
+#endif
+
 /*
  * USHORT
  * QueryDepthSList(

reactos/w32api/include
winbase.h 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- winbase.h	11 Mar 2004 20:05:11 -0000	1.2
+++ winbase.h	9 Apr 2004 20:03:21 -0000	1.3
@@ -1563,7 +1563,7 @@
 DWORD WINAPI SetCriticalSectionSpinCount(LPCRITICAL_SECTION,DWORD);
 BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
 BOOL WINAPI InitializeSid (PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
-#if (_WIN32_WINNT >= 0x0501)
+#if !defined(__WINDDK_H) && _WIN32_WINNT >= 0x0501
 VOID WINAPI InitializeSListHead(PSLIST_HEADER);
 #endif
 #ifndef __INTERLOCKED_DECLARED

reactos/w32api/include
wingdi.h 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- wingdi.h	21 Feb 2004 09:20:34 -0000	1.1
+++ wingdi.h	9 Apr 2004 20:03:21 -0000	1.2
@@ -2014,6 +2014,14 @@
 	DWORD nPalEntries;
 	SIZEL szlDevice;
 	SIZEL szlMillimeters;
+#if (WINVER >= 0x0400)
+	DWORD cbPixelFormat;
+	DWORD offPixelFormat;
+	DWORD bOpenGL;
+#endif
+#if (WINVER >= 0x0500)
+	SIZEL szlMicrometers;
+#endif
 } ENHMETAHEADER,*LPENHMETAHEADER;
 typedef struct tagMETARECORD {
 	DWORD rdSize;
@@ -2114,6 +2122,21 @@
 	short gmCellIncX;
 	short gmCellIncY;
 } GLYPHMETRICS,*LPGLYPHMETRICS;
+#if (_WIN32_WINNT >= 0x0500)
+typedef struct tagWCRANGE
+{
+    WCHAR  wcLow;
+    USHORT cGlyphs;
+} WCRANGE, *PWCRANGE, *LPWCRANGE;
+typedef struct tagGLYPHSET
+{
+	DWORD cbThis;
+	DWORD flAccel;
+	DWORD cGlyphsSupported;
+	DWORD cRanges;
+	WCRANGE ranges[1];
+} GLYPHSET, *PGLYPHSET, *LPGLYPHSET;
+#endif
 typedef struct tagKERNINGPAIR {
 	WORD wFirst;
 	WORD wSecond;
@@ -2210,7 +2233,7 @@
 	UINT uiFlags;
 	RECT rcl;
 	int *pdx;
-} POLYTEXTA, *PPOLYTEXTA;
+} POLYTEXTA, *PPOLYTEXTA, *LPPOLYTEXTA;
 typedef struct _POLYTEXTW {
 	int x;
 	int y;
@@ -2219,7 +2242,7 @@
 	UINT uiFlags;
 	RECT rcl;
 	int *pdx;
-} POLYTEXTW, *PPOLYTEXTW;
+} POLYTEXTW, *PPOLYTEXTW, *LPPOLYTEXTW;
 typedef struct tagPIXELFORMATDESCRIPTOR {
 	WORD nSize;
 	WORD nVersion;
@@ -2348,8 +2371,8 @@
 typedef struct tagENUMLOGFONTEXW {
 	LOGFONTW elfLogFont;
 	WCHAR elfFullName[LF_FULLFACESIZE];
-	BYTE elfStyle[LF_FACESIZE];
-	BYTE elfScript[LF_FACESIZE];
+	WCHAR elfStyle[LF_FACESIZE];
+	WCHAR elfScript[LF_FACESIZE];
 } ENUMLOGFONTEXW,*LPENUMLOGFONTEXW;
 typedef struct tagPOINTFX {
 	FIXED x;
@@ -2414,6 +2437,16 @@
 	DWORD dvNumAxes;
 	LONG dvValues[MM_MAX_NUMAXES];
 } DESIGNVECTOR, *PDESIGNVECTOR, FAR *LPDESIGNVECTOR;
+typedef struct tagENUMLOGFONTEXDVA
+{
+	ENUMLOGFONTEXA elfEnumLogfontEx;
+	DESIGNVECTOR elfDesignVector;
+} ENUMLOGFONTEXDVA, *PENUMLOGFONTEXDVA, *LPENUMLOGFONTEXDVA;
+typedef struct tagENUMLOGFONTEXDVW
+{
+	ENUMLOGFONTEXW elfEnumLogfontEx;
+	DESIGNVECTOR elfDesignVector;
+} ENUMLOGFONTEXDVW, *PENUMLOGFONTEXDVW, *LPENUMLOGFONTEXDVW;
 typedef USHORT COLOR16;
 typedef struct _TRIVERTEX {
 	LONG x;
@@ -2510,7 +2543,7 @@
 HBITMAP WINAPI CreateDIBitmap(HDC,const BITMAPINFOHEADER*,DWORD,PCVOID,const BITMAPINFO*,UINT);
 HBRUSH WINAPI CreateDIBPatternBrush(HGLOBAL,UINT);
 HBRUSH WINAPI CreateDIBPatternBrushPt(PCVOID,UINT);
-HBITMAP WINAPI CreateDIBSection(HDC,const BITMAPINFO*,UINT,void**,HANDLE,DWORD);
+HBITMAP WINAPI CreateDIBSection(HDC,const BITMAPINFO*,UINT,PVOID*,HANDLE,DWORD);
 HBITMAP WINAPI CreateDiscardableBitmap(HDC,int,int);
 HRGN WINAPI CreateEllipticRgn(int,int,int,int);
 HRGN WINAPI CreateEllipticRgnIndirect(LPCRECT);
@@ -2843,10 +2876,13 @@
 #define ICMENUMPROC ICMENUMPROCW
 #define FONTENUMPROC FONTENUMPROCW
 typedef DEVMODEW DEVMODE,*PDEVMODE,*LPDEVMODE;
+typedef ENUMLOGFONTEXDVW ENUMLOGFONTEXDV;
+typedef PENUMLOGFONTEXDVW PENUMLOGFONTEXDV;
+typedef LPENUMLOGFONTEXDVW LPENUMLOGFONTEXDV;
 typedef EXTLOGFONTW EXTLOGFONT,*PEXTLOGFONT,*LPEXTLOGFONT;
 typedef GCP_RESULTSW GCP_RESULTS,*LPGCP_RESULTS;
 typedef OUTLINETEXTMETRICW OUTLINETEXTMETRIC,*POUTLINETEXTMETRIC,*LPOUTLINETEXTMETRIC;
-typedef POLYTEXTW POLYTEXT;
+typedef POLYTEXTW POLYTEXT,*PPOLYTEXT,*LPPOLYTEXT;
 typedef LOGCOLORSPACEW LOGCOLORSPACE,*LPLOGCOLORSPACE;
 typedef NEWTEXTMETRICW NEWTEXTMETRIC,*PNEWTEXTMETRIC,*LPNEWTEXTMETRIC;
 typedef NEWTEXTMETRICEXW NEWTEXTMETRICEX;
@@ -2912,10 +2948,13 @@
 #define ICMENUMPROC ICMENUMPROCA
 #define FONTENUMPROC FONTENUMPROCA
 typedef DEVMODEA DEVMODE,*PDEVMODE,*LPDEVMODE;
+typedef ENUMLOGFONTEXDVA ENUMLOGFONTEXDV;
+typedef PENUMLOGFONTEXDVA PENUMLOGFONTEXDV;
+typedef LPENUMLOGFONTEXDVA LPENUMLOGFONTEXDV;
 typedef EXTLOGFONTA EXTLOGFONT,*PEXTLOGFONT,*LPEXTLOGFONT;
 typedef GCP_RESULTSA GCP_RESULTS,*LPGCP_RESULTS;
 typedef OUTLINETEXTMETRICA OUTLINETEXTMETRIC,*POUTLINETEXTMETRIC,*LPOUTLINETEXTMETRIC;
-typedef POLYTEXTA POLYTEXT;
+typedef POLYTEXTA POLYTEXT,*PPOLYTEXT,*LPPOLYTEXT;
 typedef LOGCOLORSPACEA LOGCOLORSPACE,*LPLOGCOLORSPACE;
 typedef NEWTEXTMETRICA NEWTEXTMETRIC,*PNEWTEXTMETRIC,*LPNEWTEXTMETRIC;
 typedef NEWTEXTMETRICEXA NEWTEXTMETRICEX;

reactos/w32api/include
winuser.h 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- winuser.h	11 Mar 2004 20:05:11 -0000	1.3
+++ winuser.h	9 Apr 2004 20:03:21 -0000	1.4
@@ -534,6 +534,7 @@
 #define SB_RIGHT	7
 #define SB_BOTTOM	7
 #define SB_TOP	6
+#define IS_INTRESOURCE(i) (((ULONG_PTR)(i) >> 16) == 0)
 #define MAKEINTRESOURCEA(i) (LPSTR)((DWORD)((WORD)(i)))
 #define MAKEINTRESOURCEW(i) (LPWSTR)((DWORD)((WORD)(i)))
 #ifndef XFree86Server
@@ -743,6 +744,9 @@
 #define MB_NOFOCUS 0x00008000
 #define MB_TYPEMASK 15
 #define MB_TOPMOST 0x40000
+#if (WINVER >= 0x0500)
+#define MB_CANCELTRYCONTINUE 6
+#endif
 
 #define IDOK 1
 #define IDCANCEL 2
@@ -1203,6 +1207,41 @@
 #define SPI_SETTOGGLEKEYS 53
 #define SPI_SETWHEELSCROLLLINES 105
 #define SPI_SETWORKAREA 47
+#if (WINVER >= 0x0500)
+#define SPI_GETDESKWALLPAPER 115
+#define SPI_GETMOUSESPEED 112
+#define SPI_GETSCREENSAVERRUNNING 114
+#define SPI_GETACTIVEWINDOWTRACKING 0x1000
+#define SPI_GETACTIVEWNDTRKZORDER 0x100C
+#define SPI_GETCOMBOBOXANIMATION 0x1004
+#define SPI_GETCURSORSHADOW 0x101A
+#define SPI_GETGRADIENTCAPTIONS 0x1008
+#define SPI_GETHOTTRACKING 0x100E
+#define SPI_GETKEYBOARDCUES 0x100A
+#define SPI_GETLISTBOXSMOOTHSCROLLING 0x1006
+#define SPI_GETMENUANIMATION 0x1002
+#define SPI_GETMENUFADE 0x1012
+#define SPI_GETMENUUNDERLINES 0x100A
+#define SPI_GETSELECTIONFADE 0x1014
+#define SPI_GETTOOLTIPANIMATION 0x1016
+#define SPI_GETTOOLTIPFADE 0x1018
+#define SPI_SETACTIVEWINDOWTRACKING 0x1001
+#define SPI_SETACTIVEWNDTRKZORDER 0x100D
+#define SPI_SETCOMBOBOXANIMATION 0x1005
+#define SPI_SETCURSORSHADOW 0x101B
+#define SPI_SETGRADIENTCAPTIONS 0x1009
+#define SPI_SETHOTTRACKING 0x100F
+#define SPI_SETKEYBOARDCUES 0x100B
+#define SPI_SETLISTBOXSMOOTHSCROLLING 0x1007
+#define SPI_SETMENUANIMATION 0x1003
+#define SPI_SETMENUFADE 0x1013
+#define SPI_SETMENUUNDERLINES 0x100B
+#define SPI_SETMOUSESPEED 113
+#define SPI_SETSELECTIONFADE 0x1015
+#define SPI_SETTOOLTIPANIMATION 0x1017
+#define SPI_SETTOOLTIPFADE 0x1019
+#endif
+
 #define SPIF_UPDATEINIFILE 1
 #define SPIF_SENDWININICHANGE 2
 #define SPIF_SENDCHANGE 2
@@ -1314,6 +1353,11 @@
 #define WM_NCMBUTTONDBLCLK 169
 #define WM_NCMBUTTONDOWN 167
 #define WM_NCMBUTTONUP 168
+#if (_WIN32_WINNT >= 0x0500)
+#define WM_NCXBUTTONDOWN 171
+#define WM_NCXBUTTONUP 172
+#define WM_NCXBUTTONDBLCLK 173
+#endif
 #define WM_NCMOUSEMOVE 160
 #define WM_NCPAINT 133
 #define WM_NCRBUTTONDBLCLK 166
@@ -1394,9 +1438,14 @@
 #define WM_MBUTTONDBLCLK 521
 #define WM_MOUSEWHEEL 522
 #define WM_MOUSEFIRST 512
-#define WM_MOUSELAST 522
-#define WM_MOUSEHOVER	0x2A1
-#define WM_MOUSELEAVE	0x2A3
+#if (_WIN32_WINNT >= 0x0500)
+#define WM_XBUTTONDOWN 523
+#define WM_XBUTTONUP 524
+#define WM_XBUTTONDBLCLK 525
+#define WM_MOUSELAST 525
+#endif
+#define WM_MOUSEHOVER 0x2A1
+#define WM_MOUSELEAVE 0x2A3
 #if (_WIN32_WINNT >= 0x0400)
 #define WHEEL_DELTA 120
 #define GET_WHEEL_DELTA_WPARAM(wparam) ((short)HIWORD (wparam))
@@ -1594,6 +1643,7 @@
 #define DCX_CLIPSIBLINGS 16
 #define DCX_CLIPCHILDREN 8
 #define DCX_NORESETATTRS 4
+#define DCX_INTERSECTUPDATE 0x200
 #define DCX_LOCKWINDOWUPDATE 0x400
 #define DCX_EXCLUDERGN 64
 #define DCX_INTERSECTRGN 128
@@ -1813,6 +1863,10 @@
 #define MK_SHIFT	4
 #define MK_CONTROL	8
 #define MK_MBUTTON	16
+#if(_WIN32_WINNT >= 0x0500)
+#define MK_XBUTTON1	0x0020
+#define MK_XBUTTON2	0x0040
+#endif
 #define TPM_CENTERALIGN 4
 #define TPM_LEFTALIGN 0
 #define TPM_RIGHTALIGN 8
@@ -1841,6 +1895,7 @@
 #define HELP_QUIT 2
 #define HELP_SETCONTENTS 5
 #define HELP_SETINDEX 5
+#define HELP_SETWINPOS 0x203
 #define HELP_CONTEXTMENU 0xa
 #define HELP_FINDER 0xb
 #define HELP_WM_HELP 0xc
@@ -3136,7 +3191,8 @@
 long WINAPI BroadcastSystemMessageExA(DWORD,LPDWORD,UINT,WPARAM,LPARAM,PBSMINFO);
 long WINAPI BroadcastSystemMessageExW(DWORD,LPDWORD,UINT,WPARAM,LPARAM,PBSMINFO);
 #endif /* (_WIN32_WINNT >= 0x0501) */
-BOOL WINAPI CallMsgFilter(PMSG,int);
+BOOL WINAPI CallMsgFilterA(LPMSG,INT);
+BOOL WINAPI CallMsgFilterW(LPMSG,INT);
 LRESULT WINAPI CallNextHookEx(HHOOK,int,WPARAM,LPARAM);
 LRESULT WINAPI CallWindowProcA(WNDPROC,HWND,UINT,WPARAM,LPARAM);
 LRESULT WINAPI CallWindowProcW(WNDPROC,HWND,UINT,WPARAM,LPARAM);
@@ -3491,6 +3547,7 @@
 BOOL WINAPI InsertMenuW(HMENU,UINT,UINT,UINT,LPCWSTR);
 BOOL WINAPI InsertMenuItemA(HMENU,UINT,BOOL,LPCMENUITEMINFOA);
 BOOL WINAPI InsertMenuItemW(HMENU,UINT,BOOL,LPCMENUITEMINFOW);
+INT WINAPI InternalGetWindowText(HWND,LPWSTR,INT);
 BOOL WINAPI IntersectRect(LPRECT,LPCRECT,LPCRECT);
 BOOL WINAPI InvalidateRect(HWND,LPCRECT,BOOL);
 BOOL WINAPI InvalidateRgn(HWND,HRGN,BOOL);
@@ -3710,7 +3767,7 @@
 BOOL WINAPI SetWindowPlacement(HWND hWnd,const WINDOWPLACEMENT*);
 BOOL WINAPI SetWindowPos(HWND,HWND,int,int,int,int,UINT);
 int WINAPI SetWindowRgn(HWND,HRGN,BOOL);
-HOOKPROC WINAPI SetWindowsHookA(int,HOOKPROC);
+HHOOK WINAPI SetWindowsHookA(int,HOOKPROC);
 HHOOK WINAPI SetWindowsHookExA(int,HOOKPROC,HINSTANCE,DWORD);
 HHOOK WINAPI SetWindowsHookExW(int,HOOKPROC,HINSTANCE,DWORD);
 BOOL WINAPI SetWindowTextA(HWND,LPCSTR);
@@ -3813,6 +3870,7 @@
 #define AppendMenu AppendMenuW
 #define BroadcastSystemMessage BroadcastSystemMessageW
 #define BroadcastSystemMessageEx BroadcastSystemMessageExW
+#define CallMsgFilter CallMsgFilterW
 #define CallWindowProc CallWindowProcW
 #define ChangeMenu ChangeMenuW
 #define CharLower CharLowerW
@@ -3977,6 +4035,7 @@
 #define AppendMenu AppendMenuA
 #define BroadcastSystemMessage BroadcastSystemMessageA
 #define BroadcastSystemMessageEx BroadcastSystemMessageExA
+#define CallMsgFilter CallMsgFilterA
 #define CallWindowProc CallWindowProcA
 #define ChangeMenu ChangeMenuA
 #define CharLower CharLowerA
CVSspam 0.2.8