[ros-diffs] [fireball] 33990: - More NDK fixes. - Hackmove: Define NTDDI_VERSION in kernel32, otherwise it gets derived from WINVER version (and thus kernel32 becomes Vista). This allows to remove #undef NTDDI_VERSION from ndk/obtypes.h.

fireball at svn.reactos.org fireball at svn.reactos.org
Mon Jun 16 11:20:47 CEST 2008


Author: fireball
Date: Mon Jun 16 04:20:47 2008
New Revision: 33990

URL: http://svn.reactos.org/svn/reactos?rev=33990&view=rev
Log:
- More NDK fixes.
- Hackmove: Define NTDDI_VERSION in kernel32, otherwise it gets derived from WINVER version (and thus kernel32 becomes Vista). This allows to remove #undef NTDDI_VERSION from ndk/obtypes.h.

Modified:
    trunk/reactos/dll/win32/gdi32/objects/brush.c
    trunk/reactos/dll/win32/gdi32/objects/dc.c
    trunk/reactos/dll/win32/gdi32/objects/font.c
    trunk/reactos/dll/win32/gdi32/objects/text.c
    trunk/reactos/dll/win32/kernel32/kernel32.rbuild
    trunk/reactos/include/ndk/exfuncs.h
    trunk/reactos/include/ndk/extypes.h
    trunk/reactos/include/ndk/obtypes.h
    trunk/reactos/include/ndk/psfuncs.h
    trunk/reactos/include/ndk/pstypes.h
    trunk/reactos/include/ndk/umtypes.h

Modified: trunk/reactos/dll/win32/gdi32/objects/brush.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/brush.c?rev=33990&r1=33989&r2=33990&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/brush.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/objects/brush.c [iso-8859-1] Mon Jun 16 04:20:47 2008
@@ -317,7 +317,7 @@
 #endif
  if (!GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return FALSE;
 
- if (NtCurrentTeb()->GdiTebBatch.HDC == (ULONG) hdc)
+ if (NtCurrentTeb()->GdiTebBatch.HDC == hdc)
  {
     if (Dc_Attr->ulDirty_ & DC_MODE_DIRTY)
     {
@@ -390,7 +390,7 @@
     if ((nXOrg == Dc_Attr->ptlBrushOrigin.x) && (nYOrg == Dc_Attr->ptlBrushOrigin.y))
        return TRUE;
 
-    if(((pTeb->GdiTebBatch.HDC == 0) || (pTeb->GdiTebBatch.HDC == (ULONG)hdc)) &&
+    if(((pTeb->GdiTebBatch.HDC == NULL) || (pTeb->GdiTebBatch.HDC == hdc)) &&
        ((pTeb->GdiTebBatch.Offset + sizeof(GDIBSSETBRHORG)) <= GDIBATCHBUFSIZE) &&
        (!(Dc_Attr->ulDirty_ & DC_DIBSECTION)) )
     {
@@ -405,7 +405,7 @@
        pgSBO->ptlBrushOrigin = Dc_Attr->ptlBrushOrigin;
        
        pTeb->GdiTebBatch.Offset += sizeof(GDIBSSETBRHORG);
-       pTeb->GdiTebBatch.HDC = (ULONG)hdc;
+       pTeb->GdiTebBatch.HDC = hdc;
        pTeb->GdiBatchCount++;
        DPRINT("Loading the Flush!! COUNT-> %d\n", pTeb->GdiBatchCount);
 
@@ -420,4 +420,3 @@
  }
  return NtGdiSetBrushOrg(hdc,nXOrg,nYOrg,lppt);
 }
-

Modified: trunk/reactos/dll/win32/gdi32/objects/dc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/dc.c?rev=33990&r1=33989&r2=33990&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/dc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/objects/dc.c [iso-8859-1] Mon Jun 16 04:20:47 2008
@@ -994,7 +994,7 @@
 #endif
   if (!GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return 0;
 
-  if (NtCurrentTeb()->GdiTebBatch.HDC == (ULONG)hdc)
+  if (NtCurrentTeb()->GdiTebBatch.HDC == hdc)
   {
      if (Dc_Attr->ulDirty_ & DC_MODE_DIRTY)
      {
@@ -1041,7 +1041,7 @@
 
   if (iMode == Dc_Attr->iGraphicsMode) return iMode;
 
-  if (NtCurrentTeb()->GdiTebBatch.HDC == (ULONG)hdc)
+  if (NtCurrentTeb()->GdiTebBatch.HDC == hdc)
   {
      if (Dc_Attr->ulDirty_ & DC_MODE_DIRTY)
      {
@@ -1444,6 +1444,3 @@
 
     return NULL;
 }
-
-
-

Modified: trunk/reactos/dll/win32/gdi32/objects/font.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/font.c?rev=33990&r1=33989&r2=33990&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/font.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/objects/font.c [iso-8859-1] Mon Jun 16 04:20:47 2008
@@ -1714,7 +1714,7 @@
 #endif
   if (!GdiGetHandleUserData((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return GDI_ERROR;
 
-  if (NtCurrentTeb()->GdiTebBatch.HDC == (ULONG)hDC)
+  if (NtCurrentTeb()->GdiTebBatch.HDC == hDC)
   {
      if (Dc_Attr->ulDirty_ & DC_FONTTEXT_DIRTY)
      {

Modified: trunk/reactos/dll/win32/gdi32/objects/text.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/text.c?rev=33990&r1=33989&r2=33990&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/text.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/objects/text.c [iso-8859-1] Mon Jun 16 04:20:47 2008
@@ -472,7 +472,7 @@
 #endif
   if (!GdiGetHandleUserData((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return cExtra;
 
-  if (NtCurrentTeb()->GdiTebBatch.HDC == (ULONG)hDC)
+  if (NtCurrentTeb()->GdiTebBatch.HDC == hDC)
   {
      if (Dc_Attr->ulDirty_ & DC_FONTTEXT_DIRTY)
      {
@@ -629,7 +629,7 @@
 #endif
   if (!GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return FALSE;
 
-  if (NtCurrentTeb()->GdiTebBatch.HDC == (ULONG)hdc)
+  if (NtCurrentTeb()->GdiTebBatch.HDC == hdc)
   {
      if (Dc_Attr->ulDirty_ & DC_FONTTEXT_DIRTY)
      {
@@ -641,5 +641,3 @@
   Dc_Attr->lBreakExtra = extra;
   return TRUE;
 }
-
-

Modified: trunk/reactos/dll/win32/kernel32/kernel32.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/kernel32.rbuild?rev=33990&r1=33989&r2=33990&view=diff
==============================================================================
--- trunk/reactos/dll/win32/kernel32/kernel32.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/kernel32.rbuild [iso-8859-1] Mon Jun 16 04:20:47 2008
@@ -9,6 +9,7 @@
 		<define name="_WIN32_WINNT">0x0600</define>
 		<define name="__NO_CTYPE_INLINES" />
 		<define name="WINVER">0x609</define>
+		<define name="NTDDI_VERSION">0x05020100</define>
 		<dependency>errcodes</dependency>
 		<pch>k32.h</pch>
 		<directory name="debug">

Modified: trunk/reactos/include/ndk/exfuncs.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/exfuncs.h?rev=33990&r1=33989&r2=33990&view=diff
==============================================================================
--- trunk/reactos/include/ndk/exfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/exfuncs.h [iso-8859-1] Mon Jun 16 04:20:47 2008
@@ -25,6 +25,10 @@
 #include <umtypes.h>
 #include <pstypes.h>
 #include <extypes.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 //
 // Don't include WMI headers just for one define
@@ -1017,4 +1021,9 @@
     IN ULONG TraceHeaderLength,
     IN PEVENT_TRACE_HEADER TraceHeader
 );
+
+#ifdef __cplusplus
+}
 #endif
+
+#endif

Modified: trunk/reactos/include/ndk/extypes.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/extypes.h?rev=33990&r1=33989&r2=33990&view=diff
==============================================================================
--- trunk/reactos/include/ndk/extypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/extypes.h [iso-8859-1] Mon Jun 16 04:20:47 2008
@@ -855,24 +855,24 @@
     HANDLE InheritedFromUniqueProcessId;
     ULONG HandleCount;
     ULONG SessionId;
-    ULONG UniqueProcessKey;
+    ULONG_PTR PageDirectoryBase;
 
     //
     // This part corresponds to VM_COUNTERS_EX.
     // NOTE: *NOT* THE SAME AS VM_COUNTERS!
     //
-    ULONG PeakVirtualSize;
+    SIZE_T PeakVirtualSize;
     ULONG VirtualSize;
-    ULONG PageFaultCount;
-    ULONG PeakWorkingSetSize;
-    ULONG WorkingSetSize;
-    ULONG QuotaPeakPagedPoolUsage;
-    ULONG QuotaPagedPoolUsage;
-    ULONG QuotaPeakNonPagedPoolUsage;
-    ULONG QuotaNonPagedPoolUsage;
-    ULONG PagefileUsage;
-    ULONG PeakPagefileUsage;
-    ULONG PrivatePageCount;
+    SIZE_T PageFaultCount;
+    SIZE_T PeakWorkingSetSize;
+    SIZE_T WorkingSetSize;
+    SIZE_T QuotaPeakPagedPoolUsage;
+    SIZE_T QuotaPagedPoolUsage;
+    SIZE_T QuotaPeakNonPagedPoolUsage;
+    SIZE_T QuotaNonPagedPoolUsage;
+    SIZE_T PagefileUsage;
+    SIZE_T PeakPagefileUsage;
+    SIZE_T PrivatePageCount;
 
     //
     // This part corresponds to IO_COUNTERS

Modified: trunk/reactos/include/ndk/obtypes.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/obtypes.h?rev=33990&r1=33989&r2=33990&view=diff
==============================================================================
--- trunk/reactos/include/ndk/obtypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/obtypes.h [iso-8859-1] Mon Jun 16 04:20:47 2008
@@ -18,9 +18,6 @@
 
 #ifndef _OBTYPES_H
 #define _OBTYPES_H
-
-#undef NTDDI_VERSION
-#define NTDDI_VERSION NTDDI_WS03SP1
 
 //
 // Dependencies
@@ -299,6 +296,12 @@
     ULONG DefaultNonPagedPoolCharge;
 } OBJECT_TYPE_INFORMATION, *POBJECT_TYPE_INFORMATION;
 
+typedef struct _OBJECT_ALL_TYPES_INFORMATION
+{
+    ULONG NumberOfTypes;
+    //OBJECT_TYPE_INFORMATION TypeInformation[1];
+} OBJECT_ALL_TYPES_INFORMATION, *POBJECT_ALL_TYPES_INFORMATION;
+
 #ifdef NTOS_MODE_USER
 
 typedef struct _OBJECT_BASIC_INFORMATION

Modified: trunk/reactos/include/ndk/psfuncs.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/psfuncs.h?rev=33990&r1=33989&r2=33990&view=diff
==============================================================================
--- trunk/reactos/include/ndk/psfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/psfuncs.h [iso-8859-1] Mon Jun 16 04:20:47 2008
@@ -24,6 +24,10 @@
 //
 #include <umtypes.h>
 #include <pstypes.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 #ifndef NTOS_MODE_USER
 
@@ -744,4 +748,8 @@
     NTSTATUS ExitStatus
 );
 
-#endif
+#ifdef __cplusplus
+}
+#endif
+
+#endif

Modified: trunk/reactos/include/ndk/pstypes.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/pstypes.h?rev=33990&r1=33989&r2=33990&view=diff
==============================================================================
--- trunk/reactos/include/ndk/pstypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/pstypes.h [iso-8859-1] Mon Jun 16 04:20:47 2008
@@ -293,6 +293,12 @@
     ProcessCycleTime,
     ProcessPagePriority,
     ProcessInstrumentationCallback,
+    ProcessThreadStackAllocation,
+    ProcessWorkingSetWatchEx,
+    ProcessImageFileNameWin32,
+    ProcessImageFileMapping,
+    ProcessAffinityUpdateMode,
+    ProcessMemoryAllocationMode,
     MaxProcessInfoClass
 } PROCESSINFOCLASS;
 
@@ -680,7 +686,7 @@
 typedef struct _GDI_TEB_BATCH
 {
     ULONG Offset;
-    ULONG HDC;
+    HANDLE HDC;
     ULONG Buffer[0x136];
 } GDI_TEB_BATCH, *PGDI_TEB_BATCH;
 
@@ -735,7 +741,11 @@
     PVOID SystemReserved1[0x36];
     LONG ExceptionCode;
     struct _ACTIVATION_CONTEXT_STACK *ActivationContextStackPointer;
+#ifdef _WIN64
+    UCHAR SpareBytes1[24];
+#else
     UCHAR SpareBytes1[0x24];
+#endif
     ULONG TxFsContext;
     GDI_TEB_BATCH GdiTebBatch;
     CLIENT_ID RealClientId;
@@ -743,9 +753,9 @@
     ULONG GdiClientPID;
     ULONG GdiClientTID;
     PVOID GdiThreadLocalInfo;
-    ULONG Win32ClientInfo[62];
+    SIZE_T Win32ClientInfo[62];
     PVOID glDispatchTable[0xE9];
-    ULONG glReserved1[0x1D];
+    SIZE_T glReserved1[0x1D];
     PVOID glReserved2;
     PVOID glSectionInfo;
     PVOID glSection;
@@ -762,10 +772,17 @@
     PVOID ReservedForNtRpc;
     PVOID DbgSsReserved[0x2];
     ULONG HardErrorDisabled;
+#ifdef _WIN64
+    PVOID Instrumentation[11];
+#else
     PVOID Instrumentation[9];
+#endif
     GUID ActivityId;
     PVOID SubProcessTag;
     PVOID EtwTraceData;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+    PVOID EtwLocalData;
+#endif
     PVOID WinSockData;
     ULONG GdiBatchCount;
 #if (NTDDI_VERSION >= NTDDI_LONGHORN)

Modified: trunk/reactos/include/ndk/umtypes.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/umtypes.h?rev=33990&r1=33989&r2=33990&view=diff
==============================================================================
--- trunk/reactos/include/ndk/umtypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/umtypes.h [iso-8859-1] Mon Jun 16 04:20:47 2008
@@ -53,7 +53,9 @@
 //
 #ifndef _MANAGED
 #if defined(_M_IX86)
+#ifndef FASTCALL
 #define FASTCALL                        _fastcall
+#endif
 #else
 #define FASTCALL
 #endif



More information about the Ros-diffs mailing list