mirror of
https://github.com/reactos/reactos.git
synced 2025-06-06 01:40:36 +00:00
72 lines
1.5 KiB
C
72 lines
1.5 KiB
C
/* $Id: dllmain.c,v 1.19 2001/05/02 12:33:42 jfilby Exp $
|
|
*
|
|
* Entry Point for win32k.sys
|
|
*/
|
|
|
|
#undef WIN32_LEAN_AND_MEAN
|
|
#define WIN32_NO_STATUS
|
|
#include <windows.h>
|
|
#include <ddk/ntddk.h>
|
|
#include <ddk/winddi.h>
|
|
#include <ddk/service.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"
|
|
|
|
/*
|
|
* This definition doesn't work
|
|
*/
|
|
// WINBOOL STDCALL DllMain(VOID)
|
|
NTSTATUS
|
|
STDCALL
|
|
DllMain (
|
|
IN PDRIVER_OBJECT DriverObject,
|
|
IN PUNICODE_STRING RegistryPath)
|
|
{
|
|
BOOLEAN Result;
|
|
|
|
DbgPrint("Win32 kernel mode driver\n");
|
|
|
|
/*
|
|
* Register user mode call interface
|
|
* (system service table index = 1)
|
|
*/
|
|
Result = KeAddSystemServiceTable (Win32kSSDT, NULL, NUMBER_OF_SYSCALLS, Win32kSSPT, 1);
|
|
if (Result == FALSE)
|
|
{
|
|
DbgPrint("Adding system services failed!\n");
|
|
return STATUS_UNSUCCESSFUL;
|
|
}
|
|
|
|
DbgPrint("System services added successfully!\n");
|
|
return STATUS_SUCCESS;
|
|
}
|
|
|
|
|
|
BOOLEAN
|
|
STDCALL
|
|
W32kInitialize (VOID)
|
|
{
|
|
DbgPrint("W32kInitialize\n");
|
|
|
|
// FIXME: Retrieve name from registry
|
|
EngLoadImage(L"\\SystemRoot\\system32\\drivers\\vidport.sys");
|
|
|
|
// Create surface used to draw the internal font onto
|
|
CreateCellCharSurface();
|
|
|
|
// Create stock objects, ie. precreated objects commonly used by win32 applications
|
|
CreateStockObjects();
|
|
|
|
// Initialize FreeType library
|
|
if(!InitFontSupport()) return FALSE;
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
/* EOF */
|