modified base/shell/explorer/explorer.rbuild

The TDM build of gcc 4.3.2 is affected by PR 27067 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27067), apparently due to a missing MinGW-only patch - work around it in the linker

modified   dll/directx/ddraw/d3d/DirectD3D_main.c
modified   dll/directx/ddraw/Ddraw/ddraw_displaymode.c
modified   dll/directx/ddraw/Ddraw/ddraw_main.c
modified   dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c
modified   dll/directx/ddraw/Ddraw/GetCaps.c
modified   dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c
modified   dll/directx/ddraw/main.c
modified   dll/directx/ddraw/Surface/createsurface.c
   <pseh/pseh.h> already included in rosdraw.h

modified   dll/win32/advapi32/misc/trace.c
   Silence a warning reported by gcc 4.3.2 (possibly incorrectly, but it's just a stub anyway)

modified   ntoskrnl/include/internal/ntoskrnl.h
added      ntoskrnl/include/internal/probe.h
replaced   ntoskrnl/include/ntoskrnl.h
added      ntoskrnl/include/precomp.h
modified   ntoskrnl/ntoskrnl-generic.rbuild
added      subsystems/win32/win32k/pch.h
replaced   subsystems/win32/win32k/w32k.h
modified   subsystems/win32/win32k/win32k.rbuild
   gcc 4.3.2-tdm-1 doesn't like PSEH in precompiled headers. Shuffle things around a bit to remove PSEH from precompiled headers

svn path=/trunk/; revision=37757
This commit is contained in:
KJK::Hyperion 2008-11-30 05:49:18 +00:00
parent b43e021fa7
commit feee728349
17 changed files with 275 additions and 406 deletions

View file

@ -63,6 +63,7 @@
<file>explorer.cpp</file>
<file>i386-stub-win32.c</file>
<file>explorer.rc</file>
<linkerflag>--enable-stdcall-fixup</linkerflag>
</module>
<installfile installbase=".">explorer-cfg-template.xml</installfile>
<directory name="notifyhook">

View file

@ -20,10 +20,6 @@
#include <string.h>
/* PSEH for SEH Support */
#include <pseh/pseh.h>
HRESULT WINAPI
Main_DirectDraw_GetCaps( LPDDRAWI_DIRECTDRAW_INT This, LPDDCAPS pDriverCaps,
LPDDCAPS pHELCaps)

View file

@ -21,8 +21,6 @@
#include <string.h>
/* PSEH for SEH Support */
#include <pseh/pseh.h>
/* For DirectDraw 4 - 6 */
HRESULT WINAPI
Main_DirectDraw_GetDeviceIdentifier(LPDDRAWI_DIRECTDRAW_INT This,

View file

@ -11,9 +11,6 @@
#include "rosdraw.h"
/* PSEH for SEH Support */
#include <pseh/pseh.h>
HRESULT WINAPI
Main_DirectDraw_EnumDisplayModes(LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags,
LPDDSURFACEDESC pDDSD, LPVOID pContext, LPDDENUMMODESCALLBACK pCallback)

View file

@ -20,11 +20,6 @@
#include <string.h>
/* PSEH for SEH Support */
#include <pseh/pseh.h>
LPDDRAWI_DIRECTDRAW_INT
internal_directdraw_int_alloc(LPDDRAWI_DIRECTDRAW_INT This)
{

View file

@ -10,9 +10,6 @@
#include "rosdraw.h"
/* PSEH for SEH Support */
#include <pseh/pseh.h>
HRESULT WINAPI
Main_DirectDraw_SetCooperativeLevel (LPDDRAWI_DIRECTDRAW_INT This, HWND hwnd, DWORD cooplevel)
{

View file

@ -9,10 +9,6 @@
*/
#include "rosdraw.h"
/* PSEH for SEH Support */
#include <pseh/pseh.h>
/*
* All parameters must have been checked if they are valid before they are passed to Internal_CreateSurface.
* If not please fix the code in the functions which call Internal_CreateSurface.
@ -77,8 +73,8 @@ Internal_CreateSurface( LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD,
}
/*
* program does not need set the DDSD_LPSURFACE,
* if they forget set it, the ddraw will autoamtic
* program does not need set the DDSD_LPSURFACE,
* if they forget set it, the ddraw will autoamtic
* set it for system memory.
*/
if ( ((pDDSD->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY) == DDSCAPS_SYSTEMMEMORY) &&
@ -285,28 +281,28 @@ Internal_CreateSurface( LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD,
DxHeapMemFree(slist_gbl);
*ppSurf = (LPDDRAWI_DDRAWSURFACE_INT) &slist_int[0]->lpVtbl;
return DD_OK;
cleanup:
for(count = 0; count < num_of_surf; count++)
{
if (slist_more[count] != NULL)
if (slist_more[count] != NULL)
DxHeapMemFree(slist_more[count]);
if (slist_gbl[count] != NULL)
if (slist_gbl[count] != NULL)
DxHeapMemFree(slist_gbl[count]);
if (slist_lcl[count] != NULL)
if (slist_lcl[count] != NULL)
DxHeapMemFree(slist_lcl[count]);
if (slist_int[count] != NULL)
if (slist_int[count] != NULL)
DxHeapMemFree(slist_int[count]);
}
if (slist_more != NULL)
if (slist_more != NULL)
DxHeapMemFree(slist_more);
if (slist_gbl != NULL)
if (slist_gbl != NULL)
DxHeapMemFree(slist_gbl);
if (slist_lcl != NULL)
if (slist_lcl != NULL)
DxHeapMemFree(slist_lcl);
if (slist_int != NULL)
if (slist_int != NULL)
DxHeapMemFree(slist_int);
return ret;

View file

@ -2,24 +2,21 @@
#include <string.h>
/* PSEH for SEH Support */
#include <pseh/pseh.h>
HRESULT WINAPI
HRESULT WINAPI
Main_D3D_QueryInterface(LPDIRECT3D iface, REFIID riid, LPVOID * ppvObj)
{
DX_WINDBG_trace();
DX_STUB;
}
ULONG WINAPI
ULONG WINAPI
Main_D3D_AddRef(LPDIRECT3D iface)
{
DX_WINDBG_trace();
DX_STUB;
}
ULONG WINAPI
ULONG WINAPI
Main_D3D_Release(LPDIRECT3D iface)
{
DX_WINDBG_trace();
@ -33,35 +30,35 @@ Main_D3D_Initialize(LPDIRECT3D iface, REFIID refiid)
DX_STUB;
}
HRESULT WINAPI
HRESULT WINAPI
Main_D3D_EnumDevices(LPDIRECT3D iface, LPD3DENUMDEVICESCALLBACK Callback, LPVOID Context)
{
DX_WINDBG_trace();
DX_STUB;
}
HRESULT WINAPI
HRESULT WINAPI
Main_D3D_CreateLight(LPDIRECT3D iface, LPDIRECT3DLIGHT* Light,IUnknown* pUnkOuter)
{
DX_WINDBG_trace();
DX_STUB;
}
HRESULT WINAPI
HRESULT WINAPI
Main_D3D_CreateMaterial(LPDIRECT3D iface,LPDIRECT3DMATERIAL* Direct3DLight,IUnknown* pUnkOuter)
{
DX_WINDBG_trace();
DX_STUB;
}
HRESULT WINAPI
HRESULT WINAPI
Main_D3D_CreateViewport(LPDIRECT3D iface, LPDIRECT3DVIEWPORT* Viewport,IUnknown* pUnkOuter)
{
DX_WINDBG_trace();
DX_STUB;
}
HRESULT WINAPI
HRESULT WINAPI
Main_D3D_FindDevice(LPDIRECT3D iface, LPD3DFINDDEVICESEARCH D3DDFS, LPD3DFINDDEVICERESULT D3DFDR)
{
DX_WINDBG_trace();

View file

@ -13,9 +13,6 @@
#include "rosdraw.h"
HMODULE hDllModule = 0;
/* PSEH for SEH Support */
#include <pseh/pseh.h>
CRITICAL_SECTION ddcs;
// This function is exported by the dll
@ -26,8 +23,8 @@ typedef struct
LPVOID lpContext;
} DirectDrawEnumerateProcData;
BOOL
CALLBACK
BOOL
CALLBACK
TranslateCallbackA(GUID *lpGUID,
LPSTR lpDriverDescription,
LPSTR lpDriverName,
@ -180,8 +177,8 @@ DirectDrawCreateEx(LPGUID lpGUID,
return retVal;
}
HRESULT
WINAPI
HRESULT
WINAPI
DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback,
LPVOID lpContext)
{
@ -297,7 +294,7 @@ DirectDrawEnumerateExW(LPDDENUMCALLBACKEXW lpCallback,
for more info about this command see msdn documentation
The buffer start with D3DHAL_DP2COMMAND struct afer that follows either one struct or
The buffer start with D3DHAL_DP2COMMAND struct afer that follows either one struct or
no struct at at all
example for command D3DDP2OP_VIEWPORTINFO

View file

@ -27,7 +27,7 @@ GetTraceLoggerHandle(
)
{
DPRINT1("GetTraceLoggerHandle stub()\n");
return (TRACEHANDLE)INVALID_HANDLE_VALUE;
return HandleToUlong(INVALID_HANDLE_VALUE); /* BUGBUG: should we use HandleToLong instead? */
}

View file

@ -106,117 +106,6 @@ typedef struct _INFORMATION_CLASS_INFO
#define IQS(TypeQuery, TypeSet, AlignmentQuery, AlignmentSet, Flags) \
{ sizeof(TypeQuery), sizeof(TypeSet), sizeof(AlignmentQuery), sizeof(AlignmentSet), Flags }
static
__inline
NTSTATUS
DefaultSetInfoBufferCheck(ULONG Class,
const INFORMATION_CLASS_INFO *ClassList,
ULONG ClassListEntries,
PVOID Buffer,
ULONG BufferLength,
KPROCESSOR_MODE PreviousMode)
{
NTSTATUS Status = STATUS_SUCCESS;
if (Class < ClassListEntries)
{
if (!(ClassList[Class].Flags & ICIF_SET))
{
Status = STATUS_INVALID_INFO_CLASS;
}
else if (ClassList[Class].RequiredSizeSET > 0 &&
BufferLength != ClassList[Class].RequiredSizeSET)
{
if (!(ClassList[Class].Flags & ICIF_SET_SIZE_VARIABLE))
{
Status = STATUS_INFO_LENGTH_MISMATCH;
}
}
if (NT_SUCCESS(Status))
{
if (PreviousMode != KernelMode)
{
_SEH2_TRY
{
ProbeForRead(Buffer,
BufferLength,
ClassList[Class].AlignmentSET);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
}
}
}
else
Status = STATUS_INVALID_INFO_CLASS;
return Status;
}
static
__inline
NTSTATUS
DefaultQueryInfoBufferCheck(ULONG Class,
const INFORMATION_CLASS_INFO *ClassList,
ULONG ClassListEntries,
PVOID Buffer,
ULONG BufferLength,
PULONG ReturnLength,
KPROCESSOR_MODE PreviousMode)
{
NTSTATUS Status = STATUS_SUCCESS;
if (Class < ClassListEntries)
{
if (!(ClassList[Class].Flags & ICIF_QUERY))
{
Status = STATUS_INVALID_INFO_CLASS;
}
else if (ClassList[Class].RequiredSizeQUERY > 0 &&
BufferLength != ClassList[Class].RequiredSizeQUERY)
{
if (!(ClassList[Class].Flags & ICIF_QUERY_SIZE_VARIABLE))
{
Status = STATUS_INFO_LENGTH_MISMATCH;
}
}
if (NT_SUCCESS(Status))
{
if (PreviousMode != KernelMode)
{
_SEH2_TRY
{
if (Buffer != NULL)
{
ProbeForWrite(Buffer,
BufferLength,
ClassList[Class].AlignmentQUERY);
}
if (ReturnLength != NULL)
{
ProbeForWriteUlong(ReturnLength);
}
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
}
}
}
else
Status = STATUS_INVALID_INFO_CLASS;
return Status;
}
/*
* Use IsPointerOffset to test whether a pointer should be interpreted as an offset
* or as a pointer
@ -250,6 +139,7 @@ C_ASSERT(FIELD_OFFSET(KTHREAD, CallbackStack) == KTHREAD_CALLBACK_STACK);
C_ASSERT(FIELD_OFFSET(KTHREAD, ApcState.Process) == KTHREAD_APCSTATE_PROCESS);
C_ASSERT(FIELD_OFFSET(KPROCESS, DirectoryTableBase) == KPROCESS_DIRECTORY_TABLE_BASE);
C_ASSERT(FIELD_OFFSET(KPCR, Tib.ExceptionList) == KPCR_EXCEPTION_LIST);
C_ASSERT(FIELD_OFFSET(KPCR, Self) == KPCR_SELF);
#ifdef _M_IX86
C_ASSERT(FIELD_OFFSET(KPCR, IRR) == KPCR_IRR);

View file

@ -1,101 +1,4 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Kernel
* FILE: ntoskrnl/include/ntoskrnl.h
* PURPOSE: Main Kernel Header
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
*/
#include "precomp.h"
/* INCLUDES ******************************************************************/
/* Version Data */
#undef __MSVCRT__
#include <psdk/ntverp.h>
/* DDK/IFS/NDK Headers */
#ifdef _MSC_VER
#include <excpt.h>
#include <ntdef.h>
#undef DECLSPEC_IMPORT
#define DECLSPEC_IMPORT
#endif
#include <ntifs.h>
#include <wdmguid.h>
#include <arc/arc.h>
#include <ntndk.h>
#undef TEXT
#define TEXT(s) L##s
#include <regstr.h>
/* FIXME: Temporary until CC Ros is gone */
#include <ccros.h>
#include <rosldr.h>
/* Disk Dump Driver Header */
#include <diskdump/diskdump.h>
/* C Headers */
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <malloc.h>
#include <wchar.h>
/* SEH support with PSEH */
#include <pseh/pseh.h>
#include <pseh/pseh2.h>
/* ReactOS Headers */
#include <reactos/buildno.h>
#include <reactos/bugcodes.h>
#define ExRaiseStatus RtlRaiseStatus
/* Headers that shouldn't be precompiled due to GCC bugs */
#include <reactos/probe.h>
/* SetupLDR Support */
#include <arc/setupblk.h>
/* KD Support */
#define NOEXTAPI
#include <windbgkd.h>
#include <wdbgexts.h>
#include <kddll.h>
#ifndef _WINKD_
#include <reactos/rossym.h>
#endif
/* PNP GUIDs */
#include <umpnpmgr/sysguid.h>
/* Helper Header */
#include <reactos/helper.h>
/* Internal Headers */
#include "internal/ntoskrnl.h"
#include "config.h"
//
// Define the internal versions of external and public global data
//
#define IoFileObjectType _IoFileObjectType
#define PsThreadType _PsThreadType
#define PsProcessType _PsProcessType
#define ExEventObjectType _ExEventObjectType
#define ExSemaphoreObjectType _ExSemaphoreObjectType
#define KdDebuggerEnabled _KdDebuggerEnabled
#define KdDebuggerNotPresent _KdDebuggerNotPresent
#define NlsOemLeadByteInfo _NlsOemLeadByteInfo
extern PUSHORT _NlsOemLeadByteInfo;
#define FsRtlLegalAnsiCharacterArray _FsRtlLegalAnsiCharacterArray
#undef LEGAL_ANSI_CHARACTER_ARRAY
#undef NLS_MB_CODE_PAGE_TAG
#undef NLS_OEM_LEAD_BYTE_INFO
#define LEGAL_ANSI_CHARACTER_ARRAY FsRtlLegalAnsiCharacterArray
#define NLS_MB_CODE_PAGE_TAG NlsMbOemCodePageTag
#define NLS_OEM_LEAD_BYTE_INFO _NlsOemLeadByteInfo
#undef KD_DEBUGGER_ENABLED
#undef KD_DEBUGGER_NOT_PRESENT
#define KD_DEBUGGER_ENABLED KdDebuggerEnabled
#define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
#define HalDispatchTable _HalDispatchTable
#undef HALDISPATCH
#define HALDISPATCH (&HalDispatchTable)

View file

@ -0,0 +1,100 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Kernel
* FILE: ntoskrnl/include/ntoskrnl.h
* PURPOSE: Main Kernel Header
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
*/
/* INCLUDES ******************************************************************/
/* Version Data */
#undef __MSVCRT__
#include <psdk/ntverp.h>
/* DDK/IFS/NDK Headers */
#ifdef _MSC_VER
#include <excpt.h>
#include <ntdef.h>
#undef DECLSPEC_IMPORT
#define DECLSPEC_IMPORT
#endif
#include <ntifs.h>
#include <wdmguid.h>
#include <arc/arc.h>
#include <ntndk.h>
#undef TEXT
#define TEXT(s) L##s
#include <regstr.h>
/* FIXME: Temporary until CC Ros is gone */
#include <ccros.h>
#include <rosldr.h>
/* Disk Dump Driver Header */
#include <diskdump/diskdump.h>
/* C Headers */
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <malloc.h>
#include <wchar.h>
/* SEH support with PSEH */
#include <pseh/pseh.h>
#include <pseh/pseh2.h>
/* ReactOS Headers */
#include <reactos/buildno.h>
#include <reactos/bugcodes.h>
/* SetupLDR Support */
#include <arc/setupblk.h>
/* KD Support */
#define NOEXTAPI
#include <windbgkd.h>
#include <wdbgexts.h>
#include <kddll.h>
#ifndef _WINKD_
#include <reactos/rossym.h>
#endif
/* PNP GUIDs */
#include <umpnpmgr/sysguid.h>
/* Helper Header */
#include <reactos/helper.h>
/* Internal Headers */
#include "internal/ntoskrnl.h"
#include "config.h"
//
// Define the internal versions of external and public global data
//
#define IoFileObjectType _IoFileObjectType
#define PsThreadType _PsThreadType
#define PsProcessType _PsProcessType
#define ExEventObjectType _ExEventObjectType
#define ExSemaphoreObjectType _ExSemaphoreObjectType
#define KdDebuggerEnabled _KdDebuggerEnabled
#define KdDebuggerNotPresent _KdDebuggerNotPresent
#define NlsOemLeadByteInfo _NlsOemLeadByteInfo
extern PUSHORT _NlsOemLeadByteInfo;
#define FsRtlLegalAnsiCharacterArray _FsRtlLegalAnsiCharacterArray
#undef LEGAL_ANSI_CHARACTER_ARRAY
#undef NLS_MB_CODE_PAGE_TAG
#undef NLS_OEM_LEAD_BYTE_INFO
#define LEGAL_ANSI_CHARACTER_ARRAY FsRtlLegalAnsiCharacterArray
#define NLS_MB_CODE_PAGE_TAG NlsMbOemCodePageTag
#define NLS_OEM_LEAD_BYTE_INFO _NlsOemLeadByteInfo
#undef KD_DEBUGGER_ENABLED
#undef KD_DEBUGGER_NOT_PRESENT
#define KD_DEBUGGER_ENABLED KdDebuggerEnabled
#define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
#define HalDispatchTable _HalDispatchTable
#undef HALDISPATCH
#define HALDISPATCH (&HalDispatchTable)
#define ExRaiseStatus RtlRaiseStatus

View file

@ -35,7 +35,7 @@
<dependency>bugcodes</dependency>
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
<directory name="include">
<pch>ntoskrnl.h</pch>
<pch>precomp.h</pch>
</directory>
-->
<directory name="ke">

View file

@ -0,0 +1,142 @@
#ifndef __W32K_H
#define __W32K_H
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Graphics Subsystem
* FILE: subsys/win32k/w32k.h
* PURPOSE: Main Win32K Header
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
*/
/* INCLUDES ******************************************************************/
#define _NO_COM
/* DDK/NDK/SDK Headers */
#include <ddk/ntddk.h>
#include <ddk/ntddmou.h>
#include <ddk/ntifs.h>
#include <ddk/tvout.h>
#include <ndk/ntndk.h>
/* Win32 Headers */
/* FIXME: Defines in winbase.h that we need... */
typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
#define WINBASEAPI
#define STARTF_USESIZE 2
#define STARTF_USEPOSITION 4
#include <stdarg.h>
#include <windef.h>
#include <winerror.h>
#include <wingdi.h>
#include <winddi.h>
#include <winuser.h>
#include <prntfont.h>
#include <dde.h>
#include <wincon.h>
#define _NOCSECT_TYPE
#include <ddrawi.h>
/* SEH Support with PSEH */
#include <pseh/pseh.h>
/* CSRSS Header */
#include <csrss/csrss.h>
/* Helper Header */
#include <reactos/helper.h>
/* Public Win32K Headers */
#include <win32k/callback.h>
#include <win32k/ntusrtyp.h>
#include <win32k/ntuser.h>
#include <win32k/ntgdityp.h>
#include <win32k/ntgdibad.h>
#include <ntgdi.h>
/* Internal Win32K Header */
#include "include/win32k.h"
/* Undocumented stuff */
typedef DRIVEROBJ *PDRIVEROBJ;
#define WM_SYSTIMER 280
#ifndef M_PI
#define M_PI 3.14159265358979323846f
#define M_PI_2 1.57079632679489661923
#endif
/* User heap */
extern HANDLE GlobalUserHeap;
PWIN32HEAP
UserCreateHeap(OUT PSECTION_OBJECT *SectionObject,
IN OUT PVOID *SystemBase,
IN SIZE_T HeapSize);
static __inline PVOID
UserHeapAlloc(SIZE_T Bytes)
{
return RtlAllocateHeap(GlobalUserHeap,
HEAP_NO_SERIALIZE,
Bytes);
}
static __inline BOOL
UserHeapFree(PVOID lpMem)
{
return RtlFreeHeap(GlobalUserHeap,
HEAP_NO_SERIALIZE,
lpMem);
}
static __inline PVOID
UserHeapReAlloc(PVOID lpMem,
SIZE_T Bytes)
{
#if 0
/* NOTE: ntoskrnl doesn't export RtlReAllocateHeap... */
return RtlReAllocateHeap(GlobalUserHeap,
HEAP_NO_SERIALIZE,
lpMem,
Bytes);
#else
SIZE_T PrevSize;
PVOID pNew;
PrevSize = RtlSizeHeap(GlobalUserHeap,
HEAP_NO_SERIALIZE,
lpMem);
if (PrevSize == Bytes)
return lpMem;
pNew = RtlAllocateHeap(GlobalUserHeap,
HEAP_NO_SERIALIZE,
Bytes);
if (pNew != NULL)
{
if (PrevSize < Bytes)
Bytes = PrevSize;
RtlCopyMemory(pNew,
lpMem,
Bytes);
RtlFreeHeap(GlobalUserHeap,
HEAP_NO_SERIALIZE,
lpMem);
}
return pNew;
#endif
}
static __inline PVOID
UserHeapAddressToUser(PVOID lpMem)
{
PW32PROCESS W32Process = PsGetCurrentProcessWin32Process();
return (PVOID)(((ULONG_PTR)lpMem - (ULONG_PTR)GlobalUserHeap) +
(ULONG_PTR)W32Process->HeapMappings.UserMapping);
}
#endif /* __W32K_H */

View file

@ -1,145 +1,5 @@
#ifndef __W32K_H
#define __W32K_H
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Graphics Subsystem
* FILE: subsys/win32k/w32k.h
* PURPOSE: Main Win32K Header
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
*/
/* INCLUDES ******************************************************************/
#define _NO_COM
/* DDK/NDK/SDK Headers */
#include <ddk/ntddk.h>
#include <ddk/ntddmou.h>
#include <ddk/ntifs.h>
#include <ddk/tvout.h>
#include <ndk/ntndk.h>
/* Win32 Headers */
/* FIXME: Defines in winbase.h that we need... */
typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
#define WINBASEAPI
#define STARTF_USESIZE 2
#define STARTF_USEPOSITION 4
#include <stdarg.h>
#include <windef.h>
#include <winerror.h>
#include <wingdi.h>
#include <winddi.h>
#include <winuser.h>
#include <prntfont.h>
#include <dde.h>
#include <wincon.h>
#define _NOCSECT_TYPE
#include <ddrawi.h>
/* SEH Support with PSEH */
#include <pseh/pseh.h>
/* CSRSS Header */
#include <csrss/csrss.h>
/* Helper Header */
#include <reactos/helper.h>
#include "pch.h"
/* Headers that shouldn't be precompiled due to GCC bugs */
/* Probe and capture */
#include <reactos/probe.h>
/* Public Win32K Headers */
#include <win32k/callback.h>
#include <win32k/ntusrtyp.h>
#include <win32k/ntuser.h>
#include <win32k/ntgdityp.h>
#include <win32k/ntgdibad.h>
#include <ntgdi.h>
/* Internal Win32K Header */
#include "include/win32k.h"
/* Undocumented stuff */
typedef DRIVEROBJ *PDRIVEROBJ;
#define WM_SYSTIMER 280
#ifndef M_PI
#define M_PI 3.14159265358979323846f
#define M_PI_2 1.57079632679489661923
#endif
/* User heap */
extern HANDLE GlobalUserHeap;
PWIN32HEAP
UserCreateHeap(OUT PSECTION_OBJECT *SectionObject,
IN OUT PVOID *SystemBase,
IN SIZE_T HeapSize);
static __inline PVOID
UserHeapAlloc(SIZE_T Bytes)
{
return RtlAllocateHeap(GlobalUserHeap,
HEAP_NO_SERIALIZE,
Bytes);
}
static __inline BOOL
UserHeapFree(PVOID lpMem)
{
return RtlFreeHeap(GlobalUserHeap,
HEAP_NO_SERIALIZE,
lpMem);
}
static __inline PVOID
UserHeapReAlloc(PVOID lpMem,
SIZE_T Bytes)
{
#if 0
/* NOTE: ntoskrnl doesn't export RtlReAllocateHeap... */
return RtlReAllocateHeap(GlobalUserHeap,
HEAP_NO_SERIALIZE,
lpMem,
Bytes);
#else
SIZE_T PrevSize;
PVOID pNew;
PrevSize = RtlSizeHeap(GlobalUserHeap,
HEAP_NO_SERIALIZE,
lpMem);
if (PrevSize == Bytes)
return lpMem;
pNew = RtlAllocateHeap(GlobalUserHeap,
HEAP_NO_SERIALIZE,
Bytes);
if (pNew != NULL)
{
if (PrevSize < Bytes)
Bytes = PrevSize;
RtlCopyMemory(pNew,
lpMem,
Bytes);
RtlFreeHeap(GlobalUserHeap,
HEAP_NO_SERIALIZE,
lpMem);
}
return pNew;
#endif
}
static __inline PVOID
UserHeapAddressToUser(PVOID lpMem)
{
PW32PROCESS W32Process = PsGetCurrentProcessWin32Process();
return (PVOID)(((ULONG_PTR)lpMem - (ULONG_PTR)GlobalUserHeap) +
(ULONG_PTR)W32Process->HeapMappings.UserMapping);
}
#endif /* __W32K_H */

View file

@ -11,7 +11,7 @@
<include base="ReactOS">include/reactos/drivers</include>
<define name="LANGPACK" />
<define name="_WIN32K_" />
<pch>w32k.h</pch>
<pch>pch.h</pch>
<directory name="dib" root="intermediate">
<file>dib8gen.c</file>