2003-05-18 17:16:18 +00:00
|
|
|
/*
|
|
|
|
* ReactOS W32 Subsystem
|
2005-01-06 23:12:59 +00:00
|
|
|
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ReactOS Team
|
2003-05-18 17:16:18 +00:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
2005-01-03 00:46:42 +00:00
|
|
|
/* $Id$
|
2002-07-13 21:37:27 +00:00
|
|
|
*
|
1999-05-22 23:55:56 +00:00
|
|
|
* Entry Point for win32k.sys
|
|
|
|
*/
|
2005-06-29 07:09:25 +00:00
|
|
|
|
2004-05-10 17:07:20 +00:00
|
|
|
#include <w32k.h>
|
2005-06-29 07:09:25 +00:00
|
|
|
#include <win32k/ntddraw.h>
|
2005-06-25 20:05:56 +00:00
|
|
|
#include <include/napi.h>
|
2004-11-20 16:46:06 +00:00
|
|
|
|
|
|
|
#define NDEBUG
|
|
|
|
#include <debug.h>
|
2002-07-13 21:37:27 +00:00
|
|
|
|
2004-12-12 01:40:39 +00:00
|
|
|
BOOL INTERNAL_CALL GDI_CleanupForProcess (struct _EPROCESS *Process);
|
|
|
|
|
2002-07-04 19:56:38 +00:00
|
|
|
extern SSDT Win32kSSDT[];
|
|
|
|
extern SSPT Win32kSSPT[];
|
|
|
|
extern ULONG Win32kNumberOfSysCalls;
|
1999-07-12 23:26:57 +00:00
|
|
|
|
2005-02-18 01:57:32 +00:00
|
|
|
PSHARED_SECTION_POOL SessionSharedSectionPool = NULL;
|
|
|
|
|
2005-06-26 18:00:22 +00:00
|
|
|
NTSTATUS
|
|
|
|
STDCALL
|
|
|
|
Win32kProcessCallback(struct _EPROCESS *Process,
|
|
|
|
BOOLEAN Create)
|
2003-06-20 16:26:53 +00:00
|
|
|
{
|
2005-06-26 18:00:22 +00:00
|
|
|
PW32PROCESS Win32Process;
|
|
|
|
|
|
|
|
/* Get the Win32 Process */
|
|
|
|
Win32Process = PsGetProcessWin32Process(Process);
|
|
|
|
|
|
|
|
/* Allocate one if needed */
|
|
|
|
if (!Win32Process)
|
|
|
|
{
|
|
|
|
/* FIXME - lock the process */
|
|
|
|
Win32Process = ExAllocatePoolWithTag(NonPagedPool,
|
|
|
|
sizeof(W32PROCESS),
|
|
|
|
TAG('W', '3', '2', 'p'));
|
|
|
|
|
|
|
|
if (Win32Process == NULL) return STATUS_NO_MEMORY;
|
|
|
|
|
|
|
|
RtlZeroMemory(Win32Process, sizeof(W32PROCESS));
|
|
|
|
|
|
|
|
PsSetProcessWin32Process(Process, Win32Process);
|
|
|
|
/* FIXME - unlock the process */
|
|
|
|
}
|
2005-05-08 02:11:54 +00:00
|
|
|
|
2003-06-20 16:26:53 +00:00
|
|
|
if (Create)
|
|
|
|
{
|
2004-11-20 16:46:06 +00:00
|
|
|
DPRINT("Creating W32 process PID:%d at IRQ level: %lu\n", Process->UniqueProcessId, KeGetCurrentIrql());
|
2003-06-20 16:26:53 +00:00
|
|
|
|
|
|
|
InitializeListHead(&Win32Process->ClassListHead);
|
|
|
|
ExInitializeFastMutex(&Win32Process->ClassListLock);
|
2005-05-08 02:11:54 +00:00
|
|
|
|
2003-07-31 23:11:38 +00:00
|
|
|
InitializeListHead(&Win32Process->MenuListHead);
|
2005-05-08 02:11:54 +00:00
|
|
|
ExInitializeFastMutex(&Win32Process->MenuListLock);
|
2003-06-20 16:26:53 +00:00
|
|
|
|
2003-12-12 23:49:48 +00:00
|
|
|
InitializeListHead(&Win32Process->PrivateFontListHead);
|
|
|
|
ExInitializeFastMutex(&Win32Process->PrivateFontListLock);
|
2005-05-08 02:11:54 +00:00
|
|
|
|
2005-01-06 23:12:59 +00:00
|
|
|
InitializeListHead(&Win32Process->DriverObjListHead);
|
|
|
|
ExInitializeFastMutex(&Win32Process->DriverObjListLock);
|
|
|
|
|
2003-10-09 06:13:05 +00:00
|
|
|
Win32Process->KeyboardLayout = W32kGetDefaultKeyLayout();
|
2005-05-08 02:11:54 +00:00
|
|
|
|
2005-02-18 01:57:32 +00:00
|
|
|
if(Process->Peb != NULL)
|
|
|
|
{
|
|
|
|
/* map the gdi handle table to user land */
|
|
|
|
Process->Peb->GdiSharedHandleTable = GDI_MapHandleTable(Process);
|
|
|
|
}
|
2005-05-08 02:11:54 +00:00
|
|
|
|
2004-05-21 10:09:31 +00:00
|
|
|
/* setup process flags */
|
|
|
|
Win32Process->Flags = 0;
|
2003-06-20 16:26:53 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-11-20 16:46:06 +00:00
|
|
|
DPRINT("Destroying W32 process PID:%d at IRQ level: %lu\n", Process->UniqueProcessId, KeGetCurrentIrql());
|
|
|
|
IntRemoveProcessWndProcHandles((HANDLE)Process->UniqueProcessId);
|
2003-08-19 11:48:50 +00:00
|
|
|
IntCleanupMenus(Process, Win32Process);
|
2003-12-13 22:38:29 +00:00
|
|
|
IntCleanupCurIcons(Process, Win32Process);
|
2005-01-06 23:12:59 +00:00
|
|
|
IntEngCleanupDriverObjs(Process, Win32Process);
|
2004-11-16 16:29:21 +00:00
|
|
|
CleanupMonitorImpl();
|
2003-08-18 13:37:54 +00:00
|
|
|
|
2005-01-06 23:12:59 +00:00
|
|
|
|
2004-12-12 01:40:39 +00:00
|
|
|
GDI_CleanupForProcess(Process);
|
2004-12-24 17:45:59 +00:00
|
|
|
|
|
|
|
IntGraphicsCheck(FALSE);
|
2005-05-08 02:11:54 +00:00
|
|
|
|
2004-05-01 16:43:15 +00:00
|
|
|
/*
|
|
|
|
* Deregister logon application automatically
|
|
|
|
*/
|
|
|
|
if(LogonProcess == Win32Process)
|
|
|
|
{
|
|
|
|
LogonProcess = NULL;
|
|
|
|
}
|
2003-06-20 16:26:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return STATUS_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-06-26 18:00:22 +00:00
|
|
|
NTSTATUS
|
|
|
|
STDCALL
|
|
|
|
Win32kThreadCallback(struct _ETHREAD *Thread,
|
|
|
|
BOOLEAN Create)
|
2003-06-20 16:26:53 +00:00
|
|
|
{
|
2005-06-26 18:00:22 +00:00
|
|
|
struct _EPROCESS *Process;
|
|
|
|
PW32THREAD Win32Thread;
|
|
|
|
|
|
|
|
Process = Thread->ThreadsProcess;
|
|
|
|
|
|
|
|
/* Get the Win32 Thread */
|
|
|
|
Win32Thread = PsGetThreadWin32Thread(Thread);
|
|
|
|
|
|
|
|
/* Allocate one if needed */
|
|
|
|
if (!Win32Thread)
|
|
|
|
{
|
|
|
|
/* FIXME - lock the process */
|
|
|
|
Win32Thread = ExAllocatePoolWithTag(NonPagedPool,
|
|
|
|
sizeof(W32THREAD),
|
|
|
|
TAG('W', '3', '2', 't'));
|
2003-06-20 16:26:53 +00:00
|
|
|
|
2005-06-26 18:00:22 +00:00
|
|
|
if (Win32Thread == NULL) return STATUS_NO_MEMORY;
|
|
|
|
|
|
|
|
RtlZeroMemory(Win32Thread, sizeof(W32THREAD));
|
|
|
|
|
|
|
|
PsSetThreadWin32Thread(Thread, Win32Thread);
|
|
|
|
/* FIXME - unlock the process */
|
|
|
|
}
|
2003-06-20 16:26:53 +00:00
|
|
|
if (Create)
|
|
|
|
{
|
2004-11-20 16:46:06 +00:00
|
|
|
HWINSTA hWinSta = NULL;
|
|
|
|
HDESK hDesk = NULL;
|
|
|
|
NTSTATUS Status;
|
|
|
|
PUNICODE_STRING DesktopPath;
|
|
|
|
PRTL_USER_PROCESS_PARAMETERS ProcessParams = (Process->Peb ? Process->Peb->ProcessParameters : NULL);
|
|
|
|
|
|
|
|
DPRINT("Creating W32 thread TID:%d at IRQ level: %lu\n", Thread->Cid.UniqueThread, KeGetCurrentIrql());
|
2005-05-08 02:11:54 +00:00
|
|
|
|
2004-11-20 16:46:06 +00:00
|
|
|
/*
|
|
|
|
* inherit the thread desktop and process window station (if not yet inherited) from the process startup
|
|
|
|
* info structure. See documentation of CreateProcess()
|
|
|
|
*/
|
|
|
|
DesktopPath = (ProcessParams ? ((ProcessParams->DesktopInfo.Length > 0) ? &ProcessParams->DesktopInfo : NULL) : NULL);
|
|
|
|
Status = IntParseDesktopPath(Process,
|
|
|
|
DesktopPath,
|
|
|
|
&hWinSta,
|
|
|
|
&hDesk);
|
|
|
|
if(NT_SUCCESS(Status))
|
|
|
|
{
|
|
|
|
if(hWinSta != NULL)
|
|
|
|
{
|
|
|
|
if(Process != CsrProcess)
|
|
|
|
{
|
|
|
|
HWINSTA hProcessWinSta = (HWINSTA)InterlockedCompareExchangePointer((PVOID)&Process->Win32WindowStation, (PVOID)hWinSta, NULL);
|
|
|
|
if(hProcessWinSta != NULL)
|
|
|
|
{
|
|
|
|
/* our process is already assigned to a different window station, we don't need the handle anymore */
|
|
|
|
NtClose(hWinSta);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
NtClose(hWinSta);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-04-09 17:10:25 +00:00
|
|
|
if (hDesk != NULL)
|
2004-11-20 16:46:06 +00:00
|
|
|
{
|
2005-04-09 17:10:25 +00:00
|
|
|
Status = ObReferenceObjectByHandle(hDesk,
|
|
|
|
0,
|
|
|
|
ExDesktopObjectType,
|
|
|
|
KernelMode,
|
|
|
|
(PVOID*)&Win32Thread->Desktop,
|
|
|
|
NULL);
|
2004-11-20 16:46:06 +00:00
|
|
|
NtClose(hDesk);
|
2005-04-09 17:10:25 +00:00
|
|
|
if(!NT_SUCCESS(Status))
|
|
|
|
{
|
|
|
|
DPRINT1("Unable to reference thread desktop handle 0x%x\n", hDesk);
|
|
|
|
Win32Thread->Desktop = NULL;
|
|
|
|
}
|
2004-11-20 16:46:06 +00:00
|
|
|
}
|
|
|
|
}
|
2004-02-05 20:09:10 +00:00
|
|
|
Win32Thread->IsExiting = FALSE;
|
2003-10-16 22:07:37 +00:00
|
|
|
IntDestroyCaret(Win32Thread);
|
2003-11-18 23:33:31 +00:00
|
|
|
Win32Thread->MessageQueue = MsqCreateMessageQueue(Thread);
|
2003-10-09 06:13:05 +00:00
|
|
|
Win32Thread->KeyboardLayout = W32kGetDefaultKeyLayout();
|
2003-11-19 13:19:40 +00:00
|
|
|
Win32Thread->MessagePumpHookValue = 0;
|
2003-06-20 16:26:53 +00:00
|
|
|
InitializeListHead(&Win32Thread->WindowListHead);
|
|
|
|
ExInitializeFastMutex(&Win32Thread->WindowListLock);
|
2004-05-22 21:12:15 +00:00
|
|
|
InitializeListHead(&Win32Thread->W32CallbackListHead);
|
2003-06-20 16:26:53 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-11-20 16:46:06 +00:00
|
|
|
DPRINT("Destroying W32 thread TID:%d at IRQ level: %lu\n", Thread->Cid.UniqueThread, KeGetCurrentIrql());
|
2003-06-20 16:26:53 +00:00
|
|
|
|
2004-02-05 20:09:10 +00:00
|
|
|
Win32Thread->IsExiting = TRUE;
|
2003-12-12 14:22:37 +00:00
|
|
|
HOOK_DestroyThreadHooks(Thread);
|
2003-11-03 18:52:21 +00:00
|
|
|
UnregisterThreadHotKeys(Thread);
|
2003-06-25 22:37:07 +00:00
|
|
|
DestroyThreadWindows(Thread);
|
2004-04-29 20:26:35 +00:00
|
|
|
IntBlockInput(Win32Thread, FALSE);
|
2004-05-22 16:48:50 +00:00
|
|
|
MsqDestroyMessageQueue(Win32Thread->MessageQueue);
|
2004-05-22 21:12:15 +00:00
|
|
|
IntCleanupThreadCallbacks(Win32Thread);
|
2004-11-20 16:46:06 +00:00
|
|
|
if(Win32Thread->Desktop != NULL)
|
|
|
|
{
|
|
|
|
ObDereferenceObject(Win32Thread->Desktop);
|
|
|
|
}
|
2003-06-20 16:26:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return STATUS_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2005-05-14 18:03:31 +00:00
|
|
|
/* Only used in ntuser/input.c KeyboardThreadMain(). If it's
|
|
|
|
not called there anymore, please delete */
|
|
|
|
NTSTATUS
|
|
|
|
Win32kInitWin32Thread(PETHREAD Thread)
|
|
|
|
{
|
|
|
|
PEPROCESS Process;
|
|
|
|
|
|
|
|
Process = Thread->ThreadsProcess;
|
|
|
|
|
|
|
|
if (Process->Win32Process == NULL)
|
|
|
|
{
|
|
|
|
/* FIXME - lock the process */
|
|
|
|
Process->Win32Process = ExAllocatePool(NonPagedPool, sizeof(W32PROCESS));
|
|
|
|
|
|
|
|
if (Process->Win32Process == NULL)
|
|
|
|
return STATUS_NO_MEMORY;
|
|
|
|
|
|
|
|
RtlZeroMemory(Process->Win32Process, sizeof(W32PROCESS));
|
|
|
|
/* FIXME - unlock the process */
|
|
|
|
|
|
|
|
Win32kProcessCallback(Process, TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Thread->Tcb.Win32Thread == NULL)
|
|
|
|
{
|
|
|
|
Thread->Tcb.Win32Thread = ExAllocatePool (NonPagedPool, sizeof(W32THREAD));
|
|
|
|
if (Thread->Tcb.Win32Thread == NULL)
|
|
|
|
return STATUS_NO_MEMORY;
|
|
|
|
|
|
|
|
RtlZeroMemory(Thread->Tcb.Win32Thread, sizeof(W32THREAD));
|
|
|
|
|
|
|
|
Win32kThreadCallback(Thread, TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
return(STATUS_SUCCESS);
|
|
|
|
}
|
|
|
|
|
2003-06-20 16:26:53 +00:00
|
|
|
|
1999-11-02 08:55:45 +00:00
|
|
|
/*
|
|
|
|
* This definition doesn't work
|
|
|
|
*/
|
2003-11-03 18:52:21 +00:00
|
|
|
NTSTATUS STDCALL
|
2005-05-16 12:34:01 +00:00
|
|
|
DriverEntry (
|
2001-03-31 15:35:08 +00:00
|
|
|
IN PDRIVER_OBJECT DriverObject,
|
|
|
|
IN PUNICODE_STRING RegistryPath)
|
1999-07-12 23:26:57 +00:00
|
|
|
{
|
2001-06-12 17:51:51 +00:00
|
|
|
NTSTATUS Status;
|
2001-03-31 15:35:08 +00:00
|
|
|
BOOLEAN Result;
|
2005-06-26 18:00:22 +00:00
|
|
|
W32_CALLOUT_DATA CalloutData;
|
2000-02-21 22:44:37 +00:00
|
|
|
|
2001-03-31 15:35:08 +00:00
|
|
|
/*
|
|
|
|
* Register user mode call interface
|
|
|
|
* (system service table index = 1)
|
|
|
|
*/
|
2003-06-20 16:26:53 +00:00
|
|
|
Result = KeAddSystemServiceTable (Win32kSSDT,
|
|
|
|
NULL,
|
|
|
|
Win32kNumberOfSysCalls,
|
|
|
|
Win32kSSPT,
|
|
|
|
1);
|
2001-03-31 15:35:08 +00:00
|
|
|
if (Result == FALSE)
|
2003-06-20 16:26:53 +00:00
|
|
|
{
|
2004-11-20 16:46:06 +00:00
|
|
|
DPRINT1("Adding system services failed!\n");
|
2003-06-20 16:26:53 +00:00
|
|
|
return STATUS_UNSUCCESSFUL;
|
|
|
|
}
|
2005-05-08 02:11:54 +00:00
|
|
|
|
2005-06-26 18:00:22 +00:00
|
|
|
/*
|
|
|
|
* Register Object Manager Callbacks
|
|
|
|
*/
|
|
|
|
CalloutData.WinStaCreate = IntWinStaObjectOpen;
|
|
|
|
CalloutData.WinStaParse = IntWinStaObjectParse;
|
|
|
|
CalloutData.WinStaDelete = IntWinStaObjectDelete;
|
|
|
|
CalloutData.WinStaFind = IntWinStaObjectFind;
|
|
|
|
CalloutData.DesktopCreate = IntDesktopObjectCreate;
|
|
|
|
CalloutData.DesktopDelete = IntDesktopObjectDelete;
|
|
|
|
CalloutData.W32ProcessCallout = Win32kProcessCallback;
|
|
|
|
CalloutData.W32ThreadCallout = Win32kThreadCallback;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Register our per-process and per-thread structures.
|
|
|
|
*/
|
|
|
|
PsEstablishWin32Callouts(&CalloutData);
|
2005-05-08 02:11:54 +00:00
|
|
|
|
2005-02-18 01:57:32 +00:00
|
|
|
Status = IntUserCreateSharedSectionPool(48 * 1024 * 1024, /* 48 MB by default */
|
|
|
|
&SessionSharedSectionPool);
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
|
|
|
DPRINT1("Failed to initialize the shared section pool: Status 0x%x\n", Status);
|
|
|
|
}
|
2005-05-08 02:11:54 +00:00
|
|
|
|
2001-06-12 17:51:51 +00:00
|
|
|
Status = InitWindowStationImpl();
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
2004-11-20 16:46:06 +00:00
|
|
|
DPRINT1("Failed to initialize window station implementation!\n");
|
2001-06-12 17:51:51 +00:00
|
|
|
return STATUS_UNSUCCESSFUL;
|
|
|
|
}
|
|
|
|
|
|
|
|
Status = InitClassImpl();
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
2004-11-20 16:46:06 +00:00
|
|
|
DPRINT1("Failed to initialize window class implementation!\n");
|
2001-06-12 17:51:51 +00:00
|
|
|
return STATUS_UNSUCCESSFUL;
|
|
|
|
}
|
|
|
|
|
2003-11-23 11:39:48 +00:00
|
|
|
Status = InitDesktopImpl();
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
2004-11-20 16:46:06 +00:00
|
|
|
DPRINT1("Failed to initialize desktop implementation!\n");
|
2003-11-23 11:39:48 +00:00
|
|
|
return STATUS_UNSUCCESSFUL;
|
|
|
|
}
|
|
|
|
|
2001-06-12 17:51:51 +00:00
|
|
|
Status = InitWindowImpl();
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
2004-11-20 16:46:06 +00:00
|
|
|
DPRINT1("Failed to initialize window implementation!\n");
|
2001-06-12 17:51:51 +00:00
|
|
|
return STATUS_UNSUCCESSFUL;
|
|
|
|
}
|
2003-11-03 18:52:21 +00:00
|
|
|
|
2003-07-31 23:11:38 +00:00
|
|
|
Status = InitMenuImpl();
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
2004-11-20 16:46:06 +00:00
|
|
|
DPRINT1("Failed to initialize menu implementation!\n");
|
2003-07-31 23:11:38 +00:00
|
|
|
return STATUS_UNSUCCESSFUL;
|
2003-11-03 18:52:21 +00:00
|
|
|
}
|
|
|
|
|
2002-01-27 01:11:24 +00:00
|
|
|
Status = InitInputImpl();
|
2002-01-13 22:52:08 +00:00
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
2004-11-20 16:46:06 +00:00
|
|
|
DPRINT1("Failed to initialize input implementation.\n");
|
2002-01-13 22:52:08 +00:00
|
|
|
return(Status);
|
|
|
|
}
|
|
|
|
|
2003-11-24 00:22:53 +00:00
|
|
|
Status = InitKeyboardImpl();
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
2004-11-20 16:46:06 +00:00
|
|
|
DPRINT1("Failed to initialize keyboard implementation.\n");
|
2003-11-24 00:22:53 +00:00
|
|
|
return(Status);
|
|
|
|
}
|
|
|
|
|
2004-11-16 16:29:21 +00:00
|
|
|
Status = InitMonitorImpl();
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
|
|
|
DbgPrint("Failed to initialize monitor implementation!\n");
|
|
|
|
return STATUS_UNSUCCESSFUL;
|
|
|
|
}
|
|
|
|
|
2002-01-13 22:52:08 +00:00
|
|
|
Status = MsqInitializeImpl();
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
2004-11-20 16:46:06 +00:00
|
|
|
DPRINT1("Failed to initialize message queue implementation.\n");
|
2002-01-13 22:52:08 +00:00
|
|
|
return(Status);
|
|
|
|
}
|
|
|
|
|
2003-04-02 23:19:28 +00:00
|
|
|
Status = InitTimerImpl();
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
2004-11-20 16:46:06 +00:00
|
|
|
DPRINT1("Failed to initialize timer implementation.\n");
|
2003-04-02 23:19:28 +00:00
|
|
|
return(Status);
|
|
|
|
}
|
|
|
|
|
2003-12-07 12:59:34 +00:00
|
|
|
Status = InitAcceleratorImpl();
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
2004-11-20 16:46:06 +00:00
|
|
|
DPRINT1("Failed to initialize accelerator implementation.\n");
|
2003-12-07 12:59:34 +00:00
|
|
|
return(Status);
|
|
|
|
}
|
|
|
|
|
2004-08-08 17:57:34 +00:00
|
|
|
Status = InitGuiCheckImpl();
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
2004-11-20 16:46:06 +00:00
|
|
|
DPRINT1("Failed to initialize GUI check implementation.\n");
|
2004-08-08 17:57:34 +00:00
|
|
|
return(Status);
|
|
|
|
}
|
|
|
|
|
2003-12-03 21:50:50 +00:00
|
|
|
InitGdiObjectHandleTable ();
|
|
|
|
|
|
|
|
/* Initialize FreeType library */
|
|
|
|
if (! InitFontSupport())
|
|
|
|
{
|
|
|
|
DPRINT1("Unable to initialize font support\n");
|
|
|
|
return STATUS_UNSUCCESSFUL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Create stock objects, ie. precreated objects commonly
|
|
|
|
used by win32 applications */
|
|
|
|
CreateStockObjects();
|
2004-12-12 01:40:39 +00:00
|
|
|
CreateSysColorObjects();
|
2005-05-08 02:11:54 +00:00
|
|
|
|
2001-03-31 15:35:08 +00:00
|
|
|
return STATUS_SUCCESS;
|
2000-02-21 22:44:37 +00:00
|
|
|
}
|
2000-02-20 22:52:50 +00:00
|
|
|
|
2000-02-22 20:53:11 +00:00
|
|
|
|
2003-11-03 18:52:21 +00:00
|
|
|
BOOLEAN STDCALL
|
2003-08-19 11:48:50 +00:00
|
|
|
Win32kInitialize (VOID)
|
2000-02-22 20:53:11 +00:00
|
|
|
{
|
2001-03-31 15:35:08 +00:00
|
|
|
return TRUE;
|
2000-02-22 20:53:11 +00:00
|
|
|
}
|
|
|
|
|
2000-02-20 22:52:50 +00:00
|
|
|
/* EOF */
|