build win32k with NDK, finally\!

svn path=/trunk/; revision=16271
This commit is contained in:
Alex Ionescu 2005-06-25 20:05:56 +00:00
parent a01ddd88cf
commit c12e487549
44 changed files with 258 additions and 312 deletions

View file

@ -0,0 +1,23 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/halfuncs.h
* PURPOSE: Prototypes for exported HAL Functions not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _MMFUNCS_H
#define _MMFUNCS_H
/* DEPENDENCIES **************************************************************/
/* PROTOTYPES ****************************************************************/
NTSTATUS
STDCALL
MmUnmapViewOfSection(
struct _EPROCESS* Process,
PVOID BaseAddress
);
#endif

View file

@ -26,6 +26,7 @@
#include "ldrfuncs.h" /* Loader Functions */
#include "lpctypes.h" /* Local Procedure Call Types */
#include "mmtypes.h" /* Memory Manager Types */
#include "mmfuncs.h" /* Memory Manager Functions */
#include "obtypes.h" /* Object Manager Types */
#include "obfuncs.h" /* Object Manager Functions */
#include "potypes.h" /* Power Manager Types */

View file

@ -93,4 +93,14 @@ ObReferenceObjectByName (
OUT PVOID *Object
);
NTSTATUS
STDCALL
ObFindHandleForObject(
IN PEPROCESS Process,
IN PVOID Object,
IN POBJECT_TYPE ObjectType,
IN POBJECT_HANDLE_INFORMATION HandleInformation,
OUT PHANDLE Handle
);
#endif

View file

@ -115,6 +115,17 @@ typedef NTSTATUS
/* TYPES *********************************************************************/
/* FIXME: Does this match NT's? */
typedef struct _W32_OBJECT_CALLBACK
{
OB_OPEN_METHOD WinStaCreate;
OB_PARSE_METHOD WinStaParse;
OB_DELETE_METHOD WinStaDelete;
OB_FIND_METHOD WinStaFind;
OB_CREATE_METHOD DesktopCreate;
OB_DELETE_METHOD DesktopDelete;
} W32_OBJECT_CALLBACK, *PW32_OBJECT_CALLBACK;
typedef struct _OBJECT_BASIC_INFORMATION
{
ULONG Attributes;

View file

@ -10,6 +10,7 @@
#define _PSFUNCS_H
/* DEPENDENCIES **************************************************************/
#include "pstypes.h"
/* PROTOTYPES ****************************************************************/
@ -31,4 +32,19 @@ PsGetWin32Process(
VOID
);
VOID
STDCALL
PsEstablishWin32Callouts(
PW32_PROCESS_CALLBACK W32ProcessCallback,
PW32_THREAD_CALLBACK W32ThreadCallback,
PW32_OBJECT_CALLBACK W32ObjectCallback,
PVOID Param4,
ULONG W32ThreadSize,
ULONG W32ProcessSize
);
HANDLE
STDCALL
PsGetProcessId(struct _EPROCESS *Process);
#endif

View file

@ -6,6 +6,8 @@
#endif
#include <win32k/brush.h>
#include <win32k/callback.h>
#include <win32k/caret.h>
#include <win32k/cliprgn.h>
#include <win32k/color.h>
#include <win32k/cursoricon.h>

View file

@ -1,70 +1,6 @@
#ifndef __NTOSKRNL_INCLUDE_INTERNAL_EXECUTIVE_H
#define __NTOSKRNL_INCLUDE_INTERNAL_EXECUTIVE_H
typedef enum
{
wmCenter = 0,
wmTile,
wmStretch
} WALLPAPER_MODE;
typedef struct _WINSTATION_OBJECT
{
PVOID SharedHeap; /* points to kmode memory! */
CSHORT Type;
CSHORT Size;
KSPIN_LOCK Lock;
UNICODE_STRING Name;
LIST_ENTRY DesktopListHead;
PRTL_ATOM_TABLE AtomTable;
PVOID HandleTable;
HANDLE SystemMenuTemplate;
PVOID SystemCursor;
UINT CaretBlinkRate;
HANDLE ShellWindow;
HANDLE ShellListView;
/* Wallpaper */
HANDLE hbmWallpaper;
ULONG cxWallpaper, cyWallpaper;
WALLPAPER_MODE WallpaperMode;
ULONG Flags;
struct _DESKTOP_OBJECT* ActiveDesktop;
/* FIXME: Clipboard */
LIST_ENTRY HotKeyListHead;
FAST_MUTEX HotKeyListLock;
} WINSTATION_OBJECT, *PWINSTATION_OBJECT;
typedef struct _DESKTOP_OBJECT
{
PVOID DesktopHeap; /* points to kmode memory! */
CSHORT Type;
CSHORT Size;
LIST_ENTRY ListEntry;
KSPIN_LOCK Lock;
UNICODE_STRING Name;
/* Pointer to the associated window station. */
struct _WINSTATION_OBJECT *WindowStation;
/* Pointer to the active queue. */
PVOID ActiveMessageQueue;
/* Rectangle of the work area */
#ifdef __WIN32K__
RECT WorkArea;
#else
LONG WorkArea[4];
#endif
/* Handle of the desktop window. */
HANDLE DesktopWindow;
HANDLE PrevActiveWindow;
/* Thread blocking input */
PVOID BlockInputThread;
LIST_ENTRY ShellHookWindows;
} DESKTOP_OBJECT, *PDESKTOP_OBJECT;
/* GLOBAL VARIABLES *********************************************************/
extern TIME_ZONE_INFORMATION ExpTimeZoneInfo;

View file

@ -845,11 +845,8 @@ MmWritePageSectionView(PMADDRESS_SPACE AddressSpace,
NTSTATUS MmInitSectionImplementation(VOID);
NTSTATUS STDCALL
MmUnmapViewOfSection(struct _EPROCESS* Process, PVOID BaseAddress);
/* FIXME: it should be in ddk/mmfuncs.h */
NTSTATUS STDCALL
NTSTATUS
STDCALL
MmCreateSection (OUT PSECTION_OBJECT * SectionObject,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,

View file

@ -1,7 +0,0 @@
VOID NtInitializeEventImplementation(VOID);
VOID NtInitializeEventPairImplementation(VOID);
VOID NtInitializeSemaphoreImplementation(VOID);
VOID NtInitializeMutantImplementation(VOID);
VOID NtInitializeTimerImplementation(VOID);
NTSTATUS NiInitPort(VOID);
VOID NtInitializeProfileImplementation(VOID);

View file

@ -18,15 +18,6 @@ extern LCID PsDefaultSystemLocaleId;
#define FSRTL_FAST_IO_TOP_LEVEL_IRP (0x04)
#define FSRTL_MAX_TOP_LEVEL_IRP_FLAG (0x04)
typedef struct _W32_OBJECT_CALLBACK {
OB_OPEN_METHOD WinStaCreate;
OB_PARSE_METHOD WinStaParse;
OB_DELETE_METHOD WinStaDelete;
OB_FIND_METHOD WinStaFind;
OB_CREATE_METHOD DesktopCreate;
OB_DELETE_METHOD DesktopDelete;
} W32_OBJECT_CALLBACK, *PW32_OBJECT_CALLBACK;
#define PROCESS_STATE_TERMINATED (1)
#define PROCESS_STATE_ACTIVE (2)

View file

@ -1,6 +1,14 @@
#ifndef __INCLUDE_NTOSKRNL_H
#define __INCLUDE_NTOSKRNL_H
/*
* 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 ******************************************************************/
/* We are the Kernel */
#define NTKERNELAPI
/* include the ntoskrnl config.h file */
@ -37,5 +45,3 @@
/* Internal Headers */
#include "internal/ntoskrnl.h"
#endif /* INCLUDE_NTOSKRNL_H */

View file

@ -45,16 +45,18 @@ typedef struct _NTW32CALL_SAVED_STATE
/* FUNCTIONS ***************************************************************/
PW32THREAD STDCALL
struct _W32THREAD*
STDCALL
PsGetWin32Thread(VOID)
{
return(PsGetCurrentThread()->Tcb.Win32Thread);
}
PW32PROCESS STDCALL
struct _W32PROCESS*
STDCALL
PsGetWin32Process(VOID)
{
return (PW32PROCESS)PsGetCurrentProcess()->Win32Process;
return (struct _W32PROCESS*)PsGetCurrentProcess()->Win32Process;
}
NTSTATUS STDCALL

View file

@ -1,8 +1,6 @@
#ifndef _WIN32K_ACCELERATOR_H
#define _WIN32K_ACCELERATOR_H
#include <windows.h>
#include <ddk/ntddk.h>
#include <include/winsta.h>
#include <include/window.h>

View file

@ -1,9 +1,6 @@
#ifndef _WIN32K_CARET_H
#define _WIN32K_CARET_H
#include <windows.h>
#include <internal/ps.h>
#define IDCARETTIMER (0xffff)
BOOL FASTCALL

View file

@ -1,11 +1,6 @@
#ifndef _WIN32K_CLASS_H
#define _WIN32K_CLASS_H
#include <windows.h>
#include <ddk/ntddk.h>
#include <ddk/ntapi.h>
#include <napi/win32.h>
#define IS_ATOM(x) \
(((ULONG_PTR)(x) > 0x0) && ((ULONG_PTR)(x) < 0x10000))

View file

@ -1,8 +1,6 @@
#ifndef _WIN32K_CLIPBOARD_H
#define _WIN32K_CLIPBOARD_H
#include <windows.h>
UINT FASTCALL
IntEnumClipboardFormats(UINT format);

View file

@ -1,13 +1,33 @@
#ifndef _WIN32K_DESKTOP_H
#define _WIN32K_DESKTOP_H
#include <windows.h>
#include <ddk/ntddk.h>
#include <internal/ex.h>
#include <internal/ps.h>
#include "msgqueue.h"
#include "window.h"
typedef struct _DESKTOP_OBJECT
{
PVOID DesktopHeap; /* points to kmode memory! */
CSHORT Type;
CSHORT Size;
LIST_ENTRY ListEntry;
KSPIN_LOCK Lock;
UNICODE_STRING Name;
/* Pointer to the associated window station. */
struct _WINSTATION_OBJECT *WindowStation;
/* Pointer to the active queue. */
PVOID ActiveMessageQueue;
/* Rectangle of the work area */
RECT WorkArea;
/* Handle of the desktop window. */
HANDLE DesktopWindow;
HANDLE PrevActiveWindow;
/* Thread blocking input */
PVOID BlockInputThread;
LIST_ENTRY ShellHookWindows;
} DESKTOP_OBJECT, *PDESKTOP_OBJECT;
extern PDESKTOP_OBJECT InputDesktop;
extern HDESK InputDesktopHandle;
extern PWNDCLASS_OBJECT DesktopWindowClass;

View file

@ -1,9 +1,6 @@
#ifndef _WIN32K_GUICHECK_H
#define _WIN32K_GUICHECK_H
#include <windows.h>
#include <ddk/ntddk.h>
BOOL FASTCALL IntGraphicsCheck(BOOL Create);
BOOL FASTCALL IntCreatePrimarySurface();
VOID FASTCALL IntDestroyPrimarySurface();

View file

@ -1,9 +1,6 @@
#ifndef _WIN32K_HOOK_H
#define _WIN32K_HOOK_H
#include <windows.h>
#include <internal/ps.h>
#define HOOK_THREAD_REFERENCED (0x1)
typedef struct tagHOOK

View file

@ -1,8 +1,6 @@
#ifndef _WIN32K_HOTKEY_H
#define _WIN32K_HOTKEY_H
#include <windows.h>
#include <ddk/ntddk.h>
#include <include/winsta.h>
#include <include/window.h>

View file

@ -1,8 +1,6 @@
#ifndef _WIN32K_MENU_H
#define _WIN32K_MENU_H
#include <ddk/ntddk.h>
#include <napi/win32.h>
#include <win32k/menu.h>
#define IS_ATOM(x) \

View file

@ -1,8 +1,6 @@
#ifndef _WIN32K_MONITOR_H
#define _WIN32K_MONITOR_H
#include <windows.h>
struct GDIDEVICE;
/* monitor object */

View file

@ -3,7 +3,6 @@
#include "../eng/misc.h"
#include <include/winsta.h>
//#include <ddk/ntddmou.h>
INT INTERNAL_CALL MouseSafetyOnDrawStart(SURFOBJ *SurfObj, LONG HazardX1, LONG HazardY1, LONG HazardX2, LONG HazardY2);
INT INTERNAL_CALL MouseSafetyOnDrawEnd(SURFOBJ *SurfObj);

View file

@ -1,8 +1,6 @@
#ifndef _WIN32K_MSGQUEUE_H
#define _WIN32K_MSGQUEUE_H
#include <internal/ex.h>
#include <windows.h>
#include "caret.h"
#include "hook.h"

View file

@ -1,7 +1,6 @@
#ifndef _WIN32K_OBJECT_H
#define _WIN32K_OBJECT_H
#include <windows.h>
#include <win32k/gdiobj.h>
#include <win32k/bitmaps.h>
#include <win32k/pen.h>

View file

@ -1,8 +1,6 @@
#ifndef _WIN32K_PAINTING_H
#define _WIN32K_PAINTING_H
#include <windows.h>
#include <ddk/ntddk.h>
#include <include/class.h>
#include <include/msgqueue.h>
#include <include/window.h>

View file

@ -1,9 +1,6 @@
#ifndef _WIN32K_USERATOM_H
#define _WIN32K_USERATOM_H
#include <windows.h>
#include <ddk/ntapi.h>
RTL_ATOM FASTCALL
IntAddAtom(LPWSTR AtomName);
ULONG FASTCALL

View file

@ -11,7 +11,6 @@
#ifndef _WIN32K_VIS_H
#define _WIN32K_VIS_H
#include <internal/ex.h>
#include <include/window.h>
HRGN FASTCALL

View file

@ -0,0 +1,60 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Graphics Subsystem
* FILE: subsys/win32k/include/win32k.h
* PURPOSE: Internal Win32K Header
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
*/
/* INCLUDES ******************************************************************/
/* Internal Win32k Headers */
#include <include/ssec.h>
#include <include/accelerator.h>
#include <include/callback.h>
#include <include/caret.h>
#include <include/class.h>
#include <include/cleanup.h>
#include <include/clipboard.h>
#include <include/color.h>
#include <include/csr.h>
#include <include/cursoricon.h>
#include <include/dce.h>
#include <include/desktop.h>
#include <include/dib.h>
#include <include/eng.h>
#include <include/error.h>
#include <include/focus.h>
#include <include/guicheck.h>
#include <include/hook.h>
#include <include/hotkey.h>
#include <include/input.h>
#include <include/inteng.h>
#include <include/intgdi.h>
#include <include/menu.h>
#include <include/monitor.h>
#include <include/mouse.h>
#include <include/msgqueue.h>
#include <include/object.h>
#include <include/paint.h>
#include <include/painting.h>
#include <include/palette.h>
#include <include/path.h>
#include <include/prop.h>
#include <include/rect.h>
#include <include/scroll.h>
#include <include/surface.h>
#include <include/tags.h>
#include <include/text.h>
#include <include/timer.h>
#include <include/timer.h>
#include <include/useratom.h>
#include <include/vis.h>
#include <include/window.h>
#include <include/winpos.h>
#include <include/winsta.h>
#include <eng/objects.h>
#include <eng/misc.h>
#include <dib/dib.h>
/* EOF */

View file

@ -5,8 +5,6 @@ struct _PROPERTY;
struct _WINDOW_OBJECT;
typedef struct _WINDOW_OBJECT *PWINDOW_OBJECT;
#include <windows.h>
#include <ddk/ntddk.h>
#include <include/object.h>
#include <include/class.h>
#include <include/msgqueue.h>

View file

@ -1,10 +1,6 @@
#ifndef _WIN32K_WINSTA_H
#define _WIN32K_WINSTA_H
#include <windows.h>
#include <ddk/ntddk.h>
#include <internal/ex.h>
#include <internal/ps.h>
#include "msgqueue.h"
#define WINSTA_ROOT_NAME L"\\Windows\\WindowStations"
@ -14,6 +10,42 @@
#define WSS_LOCKED (1)
#define WSS_NOINTERACTIVE (2)
typedef enum
{
wmCenter = 0,
wmTile,
wmStretch
} WALLPAPER_MODE;
typedef struct _WINSTATION_OBJECT
{
PVOID SharedHeap; /* points to kmode memory! */
CSHORT Type;
CSHORT Size;
KSPIN_LOCK Lock;
UNICODE_STRING Name;
LIST_ENTRY DesktopListHead;
PRTL_ATOM_TABLE AtomTable;
PVOID HandleTable;
HANDLE SystemMenuTemplate;
PVOID SystemCursor;
UINT CaretBlinkRate;
HANDLE ShellWindow;
HANDLE ShellListView;
/* Wallpaper */
HANDLE hbmWallpaper;
ULONG cxWallpaper, cyWallpaper;
WALLPAPER_MODE WallpaperMode;
ULONG Flags;
struct _DESKTOP_OBJECT* ActiveDesktop;
/* FIXME: Clipboard */
LIST_ENTRY HotKeyListHead;
FAST_MUTEX HotKeyListLock;
} WINSTATION_OBJECT, *PWINSTATION_OBJECT;
extern WINSTATION_OBJECT *InputWindowStation;
extern PW32PROCESS LogonProcess;

View file

@ -20,7 +20,9 @@
*
* Entry Point for win32k.sys
*/
#include <win32k/ntddraw.h> /* FIXME: FIX THIS! */
#include <w32k.h>
#include <include/napi.h>
#define NDEBUG
#include <win32k/debug1.h>

View file

@ -1,56 +0,0 @@
/*
* ReactOS W32 Subsystem
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* ReactOS W32 Subsystem
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* Entry Point for win32k.sys
*/
#undef WIN32_LEAN_AND_MEAN
#define WIN32_NO_STATUS
#include <windows.h>
#define NTOS_MODE_KERNEL
#include <ntos.h>
#include <win32k/ntddraw.h>
#include <ddk/winddi.h>
#include <win32k/win32k.h>
/*
* NOTE: the table is actually in the file ./svctab.c,
* generated by iface/addsys/mktab.c + w32ksvc.db
*/
#include "svctab.c"

View file

@ -74,7 +74,7 @@ PGD_ENABLEDRIVER DRIVER_FindDDIDriver(LPCWSTR Name)
{
static WCHAR DefaultPath[] = L"\\SystemRoot\\System32\\";
static WCHAR DefaultExtension[] = L".DLL";
SYSTEM_LOAD_IMAGE GdiDriverInfo;
SYSTEM_GDI_DRIVER_INFORMATION GdiDriverInfo;
GRAPHICS_DRIVER *Driver = DriverList;
NTSTATUS Status;
WCHAR *FullName;
@ -140,8 +140,8 @@ PGD_ENABLEDRIVER DRIVER_FindDDIDriver(LPCWSTR Name)
}
/* If not, then load it */
RtlInitUnicodeString (&GdiDriverInfo.ModuleName, (LPWSTR)FullName);
Status = ZwSetSystemInformation (SystemLoadImage, &GdiDriverInfo, sizeof(SYSTEM_LOAD_IMAGE));
RtlInitUnicodeString (&GdiDriverInfo.DriverName, (LPWSTR)FullName);
Status = ZwSetSystemInformation (SystemLoadGdiDriverInformation, &GdiDriverInfo, sizeof(SYSTEM_GDI_DRIVER_INFORMATION));
ExFreePool(FullName);
if (!NT_SUCCESS(Status)) return NULL;

View file

@ -8,10 +8,11 @@
* REVISION HISTORY:
* 25-10-2003 PB Created
*/
/* FIXME: FOR THE LOVE OF GOD SOMEONE PLEASE FIX THIS FUCKFEST */
#include <ddk/ntddk.h>
#include <win32k/ntddraw.h>
#include <ddk/winddi.h>
#include <w32k.h>
#include <win32k/win32k.h>
#include <include/intddraw.h>
#include <win32k/gdiobj.h>

View file

@ -8,9 +8,11 @@
* REVISION HISTORY:
* 25-10-2003 PB Created
*/
/* FIXME: FOR THE LOVE OF GOD SOMEONE PLEASE FIX THIS FUCKFEST */
#include <ddk/ntddk.h>
#include <win32k/ntddraw.h>
#include <ddk/winddi.h>
#include <w32k.h>
#include <win32k/win32k.h>
#define NDEBUG

View file

@ -58,7 +58,7 @@ CsrNotify(PCSR_API_MESSAGE Request)
OldProcess = PsGetCurrentProcess();
if (CsrProcess != OldProcess)
{
KeAttachProcess(EPROCESS_TO_KPROCESS(CsrProcess));
KeAttachProcess(&CsrProcess->Pcb);
}
Status = ZwRequestWaitReplyPort(WindowsApiPort,
&Request->Header,
@ -132,7 +132,7 @@ CsrCloseHandle(HANDLE Handle)
OldProcess = PsGetCurrentProcess();
if (CsrProcess != OldProcess)
{
KeAttachProcess(EPROCESS_TO_KPROCESS(CsrProcess));
KeAttachProcess(&CsrProcess->Pcb);
}
Status = ZwClose(Handle);

View file

@ -30,19 +30,6 @@
/* INCLUDES ******************************************************************/
#include <w32k.h>
#if 0
/* not yet defined in w32api... */
NTSTATUS STDCALL
ObFindHandleForObject(IN PEPROCESS Process,
IN PVOID Object,
IN POBJECT_TYPE ObjectType,
IN POBJECT_HANDLE_INFORMATION HandleInformation,
OUT PHANDLE Handle);
#else
#define ObFindHandleForObject(Process, Object, ObjectType, HandleInformation, Handle) \
(STATUS_UNSUCCESSFUL)
#endif
/* GLOBALS *******************************************************************/
/* Currently active desktop */
@ -1359,7 +1346,7 @@ NtUserGetThreadDesktop(DWORD dwThreadId, DWORD Unknown1)
may be a bit safer (e.g. when the desktop is being destroyed */
/* switch into the context of the thread we're trying to get the desktop from,
so we can use the handle */
KeAttachProcess(EPROCESS_TO_KPROCESS(Thread->ThreadsProcess));
KeAttachProcess(&Thread->ThreadsProcess->Pcb);
Status = ObReferenceObjectByHandle(hThreadDesktop,
GENERIC_ALL,
ExDesktopObjectType,

View file

@ -1250,7 +1250,7 @@ IntCleanupMenus(struct _EPROCESS *Process, PW32PROCESS Win32Process)
CurrentProcess = PsGetCurrentProcess();
if (CurrentProcess != Process)
{
KeAttachProcess(EPROCESS_TO_KPROCESS(Process));
KeAttachProcess(&Process->Pcb);
}
IntLockProcessMenus(Win32Process);

View file

@ -22,27 +22,10 @@
* $Id$
*/
#include <w32k.h>
#include <ddk/ntddk.h>
#define NDEBUG
#include <debug.h>
#include <pseh.h>
#ifdef __USE_W32API
/* F*(&#$ header mess!!!! */
HANDLE
STDCALL PsGetProcessId(
PEPROCESS Process
);
/* ditto */
ULONG STDCALL
KeRosGetStackFrames ( PULONG Frames, ULONG FrameCount );
#endif /* __USE_W32API */
#define GDI_ENTRY_TO_INDEX(ht, e) \
(((ULONG_PTR)(e) - (ULONG_PTR)&((ht)->Entries[0])) / sizeof(GDI_TABLE_ENTRY))
#define GDI_HANDLE_GET_ENTRY(HandleTable, h) \
@ -656,7 +639,7 @@ GDI_CleanupForProcess (struct _EPROCESS *Process)
CurrentProcess = PsGetCurrentProcess();
if (CurrentProcess != Process)
{
KeAttachProcess(EPROCESS_TO_KPROCESS(Process));
KeAttachProcess(&Process->Pcb);
}
W32Process = (PW32PROCESS)Process->Win32Process;
ASSERT(W32Process);

View file

@ -1,92 +1,56 @@
/*
* Precompiled headers for win32k.sys
* 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)
*/
#define __WIN32K__
#define NTOS_MODE_KERNEL
/* INCLUDES ******************************************************************/
#include <malloc.h>
/* We are Win32K */
#define __WIN32K__
/* ReactOS Config */
#include <roscfg.h>
/* DDK/NDK/SDK Headers */
#include <ddk/ntddk.h>
#include <ddk/ntifs.h>
#include <ddk/winddi.h>
#include <ddk/ntddmou.h>
#include <windows.h> /* FIXME ? */
#include <windowsx.h> /* FIXME ? */
#include <ndk/ntndk.h>
#include <napi/win32.h> /* FIXME */
/* FIXME: ReactOS will be R-Rated if I really write what I'm about to */
NTSTATUS
STDCALL
MmCopyFromCaller(PVOID Dest, const VOID *Src, ULONG NumberOfBytes);
NTSTATUS
STDCALL
MmCopyToCaller(PVOID Dest, const VOID *Src, ULONG NumberOfBytes);
/* SEH Support with PSEH */
#include <pseh.h>
#include <roscfg.h>
#include <roskrnl.h>
#include <ddk/winddi.h>
#include <ddk/ntddk.h>
#include <ddk/ntddmou.h>
#include <win32k/win32k.h>
#include <win32k/callback.h>
#include <win32k/caret.h>
/* CSRSS Header */
#include <csrss/csrss.h>
#include <internal/ntoskrnl.h>
#include <internal/mm.h>
#include <internal/ke.h>
#include <internal/ob.h>
#include <internal/safe.h>
#include <internal/ps.h>
#include <napi/win32.h>
#include <ntos.h>
#include <math.h>
#include <float.h>
#include <windows.h>
#include <windowsx.h>
/* FIXME: ROSRTL */
#include <rosrtl/string.h>
#include <include/ssec.h>
#include <include/accelerator.h>
#include <include/callback.h>
#include <include/caret.h>
#include <include/class.h>
#include <include/cleanup.h>
#include <include/clipboard.h>
#include <include/color.h>
#include <include/csr.h>
#include <include/cursoricon.h>
#include <include/dce.h>
#include <include/desktop.h>
#include <include/dib.h>
#include <include/eng.h>
#include <include/error.h>
#include <include/focus.h>
#include <include/guicheck.h>
#include <include/hook.h>
#include <include/hotkey.h>
#include <include/input.h>
#include <include/inteng.h>
#include <include/intgdi.h>
#include <include/menu.h>
#include <include/monitor.h>
#include <include/mouse.h>
#include <include/msgqueue.h>
#include <include/object.h>
#include <include/paint.h>
#include <include/painting.h>
#include <include/palette.h>
#include <include/path.h>
#include <include/prop.h>
#include <include/rect.h>
#include <include/scroll.h>
#include <include/surface.h>
#include <include/tags.h>
#include <include/text.h>
#include <include/timer.h>
#include <include/timer.h>
#include <include/useratom.h>
#include <include/vis.h>
#include <include/window.h>
#include <include/winpos.h>
#include <include/winsta.h>
/* Helper Header */
#include <reactos/helper.h>
#include <eng/objects.h>
#include <eng/misc.h>
/* External Win32K Header */
#include <win32k/win32k.h>
#include <dib/dib.h>
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
/* Internal Win32K Header */
#include "include/win32k.h"
/* FIXME: This is totally wrong, why was it like this?? */
#define NDEBUG
#include <win32k/debug1.h>
#include <debug.h>

View file

@ -50,7 +50,6 @@
</directory>
<directory name="main">
<file>dllmain.c</file>
<file>svctabm.c</file>
</directory>
<directory name="misc">
<file>driver.c</file>

View file

@ -43,7 +43,7 @@ clean: nci_clean
# WIN32K.SYS
WIN32K_SVC_DB = $(NCI_BASE_)w32ksvc.db
WIN32K_SERVICE_TABLE = subsys$(SEP)win32k$(SEP)main$(SEP)svctab.c
WIN32K_SERVICE_TABLE = subsys$(SEP)win32k$(SEP)include$(SEP)napi.h
WIN32K_GDI_STUBS = lib$(SEP)gdi32$(SEP)misc$(SEP)win32k.S
WIN32K_USER_STUBS = lib$(SEP)user32$(SEP)misc$(SEP)win32k.S

View file

@ -527,7 +527,7 @@ int main(int argc, char* argv[])
WriteFileHeader(Files[NtosKernelStubs],
"System Call Stubs for Native API",
argv[NtosKernelStubs + 1]);
fputs("#include <internal/i386/segment.h>\n\n", Files[NtosKernelStubs]);
fputs("#include <ndk/i386/segment.h>\n\n", Files[NtosKernelStubs]);
WriteFileHeader(Files[Win32kGdiStubs],
"System Call Stubs for Native API",