Author: fireball Date: Tue Jul 22 06:42:33 2008 New Revision: 34681
URL: http://svn.reactos.org/svn/reactos?rev=34681&view=rev Log: - Implement a minimal DriverEntry (the first called function). - Add a syscall table and register it. - Further improve win32k.h to actually include all what's needed, and still compile with MSVC just fine (but using ReactOS's psk/ntgdi.h instead of MS's PSDK). - Doesn't link since 660+ syscalls are not stubbed. - Some fixes in the VC project file.
Modified: branches/nwin32/subsystems/win32/win32k/gre/init.c branches/nwin32/subsystems/win32/win32k/include/win32k.h branches/nwin32/subsystems/win32/win32k/win32k_vc9.vcproj
Modified: branches/nwin32/subsystems/win32/win32k/gre/init.c URL: http://svn.reactos.org/svn/reactos/branches/nwin32/subsystems/win32/win32k/g... ============================================================================== --- branches/nwin32/subsystems/win32/win32k/gre/init.c [iso-8859-1] (original) +++ branches/nwin32/subsystems/win32/win32k/gre/init.c [iso-8859-1] Tue Jul 22 06:42:33 2008 @@ -3,12 +3,16 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: subsystems/win32/win32k/gre/init.c * PURPOSE: Driver Initialization - * PROGRAMMERS: Stefan Ginsberg (stefan__100__@hotmail.com) + * PROGRAMMERS: Aleksey Bragin (aleksey@reactos.org) */
/* INCLUDES ******************************************************************/
#include <win32k.h> + +/* System service call table */ +#include <include/napi.h> + #define NDEBUG #include <debug.h>
@@ -17,8 +21,21 @@ NTSTATUS NTAPI DriverEntry(IN PDRIVER_OBJECT DriverObject, - PUNICODE_STRING RegistryPath) + PUNICODE_STRING RegistryPath) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + DPRINT1("Win32k initialization: DO %p, RegPath %wZ\n", DriverObject, + RegistryPath); + + /* Add system service table */ + if (!KeAddSystemServiceTable(Win32kSSDT, + NULL, + Win32kNumberOfSysCalls, + Win32kSSPT, + 1)) + { + DPRINT1("Error adding system service table!\n"); + return STATUS_UNSUCCESSFUL; + } + + return STATUS_SUCCESS; }
Modified: branches/nwin32/subsystems/win32/win32k/include/win32k.h URL: http://svn.reactos.org/svn/reactos/branches/nwin32/subsystems/win32/win32k/i... ============================================================================== --- branches/nwin32/subsystems/win32/win32k/include/win32k.h [iso-8859-1] (original) +++ branches/nwin32/subsystems/win32/win32k/include/win32k.h [iso-8859-1] Tue Jul 22 06:42:33 2008 @@ -69,9 +69,6 @@ #include <win32k/callback.h> #include <win32k/ntusrtyp.h> #include <win32k/ntuser.h> - -/* FIXME */ -#if 0 #include <win32k/ntgdityp.h> -#include <ntgdi.h> -#endif +#define LANGPACK +#include <psdk/ntgdi.h>
Modified: branches/nwin32/subsystems/win32/win32k/win32k_vc9.vcproj URL: http://svn.reactos.org/svn/reactos/branches/nwin32/subsystems/win32/win32k/w... ============================================================================== --- branches/nwin32/subsystems/win32/win32k/win32k_vc9.vcproj [iso-8859-1] (original) +++ branches/nwin32/subsystems/win32/win32k/win32k_vc9.vcproj [iso-8859-1] Tue Jul 22 06:42:33 2008 @@ -41,7 +41,7 @@ Name="VCCLCompilerTool" Optimization="0" WholeProgramOptimization="false" - AdditionalIncludeDirectories="./;include;include;../../../include/reactos/subsys;../../../.;../../../include;../../../include;../../../include/dxsdk;../../../include/dxsdk;../../../include/ndk;../../../include/reactos;../../../include/reactos;../../../include/reactos/mc;../../../include/reactos/libs;......\obj-i386\include;......\obj-i386\include\reactos" + AdditionalIncludeDirectories="./;include;../../../include/reactos/subsys;../../../.;../../../include;../../../include/dxsdk;../../../include/ndk;../../../include/reactos;../../../include/reactos/mc;../../../include/reactos/libs;"......\obj-i386\include";"......\obj-i386\include\reactos";"......\obj-i386\subsystems\win32\win32k"" PreprocessorDefinitions=";DBG=1;KDBG=1;STDCALL=__stdcall;_CRT_SECURE_NO_WARNINGS;_DEBUG;_M_IX86;_SEH_ENABLE_TRACE;_USRDLL;_WIN32K_;_WINDOWS;_X86_;__REACTOS__;__i386__" MinimalRebuild="false" BasicRuntimeChecks="0" @@ -52,7 +52,7 @@ PrecompiledHeaderThrough="win32k.h" WarningLevel="3" Detect64BitPortabilityProblems="false" - DebugInformationFormat="4" + DebugInformationFormat="3" CallingConvention="2" CompileAs="1" ForcedIncludeFiles="warning.h"