mirror of
https://github.com/reactos/wine.git
synced 2025-03-04 18:57:07 +00:00

Sun Feb 15 12:02:59 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [graphics/x11drv/*.c] [objects/*.c] A few X11 critical section optimizations, mostly with XGet/PutPixel. * [scheduler/sysdeps.c] [misc/main.c] Make sure X11 critical section is available before any Xlib call. * [if1632/relay.c] [tools/build.c] Yet another attempt at fixing Catch/Throw. * [loader/pe_image.c] Fixed broken PE DLL loading. * [include/winnt.h] [scheduler/handle.c] [scheduler/*.c] Implemented handle access rights. Added Get/SetHandleInformation. Sun Feb 15 09:45:23 1997 Andreas Mohr <100.30936@germany.net> * [misc/winsock.c] Fixed bug in WSACleanup which lead to crashes in WINSOCK_HandleIO. * [graphics/fontengine.c] [include/font.h] Minor improvements. * [memory/global.c] Implemented GlobalEntryHandle. * [misc/toolhelp.c] Fixed a memory bug in Notify*register. * [misc/w32scomb.c] Improved Get16DLLAddress. * [objects/gdiobj.c] Implemented GdiSeeGdiDo. Sat Feb 14 14:57:39 1998 John Richardson <jrichard@zko.dec.com> * [win32/console.c] Added the console implementation, AllocConsole, FreeConsole, CONSOLE_InheritConsole. * [documentation/console] Some documentation on the console. * [include/winerror.h] Added some error defines. * [scheduler/k32obj.c] Registered the scheduler ops. Fri Feb 13 19:35:35 1998 James Moody <013263m@dragon.acadiau.ca> * [ole/ole2nls.c] Some English language fixes for missing values. * [controls/listbox.c] Fix to allow an empty listbox to deselect all items. * [relay32/user32.spec] [windows/keyboard.c] CreateAcceleratorTableA stub method. * [windows/sysmetrics.c] Added missing SM_CXCURSOR & SM_CYCURSOR initializers. * [windows/message.c] PostThreadMessage32A stub method. Fri Feb 13 17:12:24 1998 Jim Peterson <jspeter@roanoke.infi.net> * [libtest/hello3res.rc] [libtest/hello3.c] [libtest/Makefile.in] Updated the 'hello3' test so that it functions properly again. Fri Feb 13 14:08:07 1998 Martin Boehme <boehme@informatik.mu-luebeck.de> * [graphics/mapping.c] Fixed the embarrassing bugs I introduced into DPtoLP and LPtoDP. * [windows/scroll.c] Prevent ScrollWindow32 from sending WM_ERASEBKGND. Thu Feb 12 22:46:53 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [objects/metafile] [include/ldt.h] Fix to cope with records longer than 64K. * [windows/clipboard.c] Clean up bitmaps and metapicts properly. Mon Feb 3 21:52:18 1998 Karl Backström <karl_b@geocities.com> * [programs/winhelp/Sw.rc] [resources/sysres_Sw.rc] Minor update of Swedish language support.
182 lines
4.0 KiB
C
182 lines
4.0 KiB
C
/*
|
|
* Main initialization code
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
#include <fcntl.h>
|
|
#include <unistd.h>
|
|
#include <string.h>
|
|
#include <errno.h>
|
|
#include "windows.h"
|
|
#include "module.h"
|
|
#include "selectors.h"
|
|
#include "bitmap.h"
|
|
#include "comm.h"
|
|
#include "win.h"
|
|
#include "menu.h"
|
|
#include "atom.h"
|
|
#include "dialog.h"
|
|
#include "drive.h"
|
|
#include "queue.h"
|
|
#include "sysmetrics.h"
|
|
#include "file.h"
|
|
#include "gdi.h"
|
|
#include "heap.h"
|
|
#include "keyboard.h"
|
|
#include "miscemu.h"
|
|
#include "neexe.h"
|
|
#include "options.h"
|
|
#include "spy.h"
|
|
#include "task.h"
|
|
#include "tweak.h"
|
|
#include "user.h"
|
|
#include "dce.h"
|
|
#include "shell.h"
|
|
#include "winproc.h"
|
|
#include "stddebug.h"
|
|
#include "debug.h"
|
|
|
|
|
|
int __winelib = 1; /* Winelib run-time flag */
|
|
|
|
/***********************************************************************
|
|
* Kernel initialisation routine
|
|
*/
|
|
BOOL32 MAIN_KernelInit(void)
|
|
{
|
|
extern BOOL32 EVENT_Init(void);
|
|
|
|
/* Initialize signal handling */
|
|
if (!SIGNAL_Init()) return FALSE;
|
|
|
|
/* Load the configuration file */
|
|
if (!PROFILE_LoadWineIni()) return FALSE;
|
|
|
|
/* Initialize DOS memory */
|
|
if (!DOSMEM_Init()) return FALSE;
|
|
|
|
/* Initialise DOS drives */
|
|
if (!DRIVE_Init()) return FALSE;
|
|
|
|
/* Initialise DOS directories */
|
|
if (!DIR_Init()) return FALSE;
|
|
|
|
/* Initialize tasks */
|
|
if (!TASK_Init()) return FALSE;
|
|
|
|
/* Initialize event handling */
|
|
if (!EVENT_Init()) return FALSE;
|
|
|
|
/* Initialize communications */
|
|
COMM_Init();
|
|
|
|
/* Initialize IO-port permissions */
|
|
IO_port_init();
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
/***********************************************************************
|
|
* USER (and GDI) initialisation routine
|
|
*/
|
|
BOOL32 MAIN_UserInit(void)
|
|
{
|
|
extern BOOL32 WIDGETS_Init(void);
|
|
|
|
int queueSize;
|
|
|
|
/* Create USER and GDI heap */
|
|
if (!USER_HeapSel)
|
|
{
|
|
USER_HeapSel = GlobalAlloc16( GMEM_FIXED, 0x10000 );
|
|
LocalInit( USER_HeapSel, 0, 0xffff );
|
|
}
|
|
if (!GDI_HeapSel)
|
|
{
|
|
GDI_HeapSel = GlobalAlloc16( GMEM_FIXED, GDI_HEAP_SIZE );
|
|
LocalInit( GDI_HeapSel, 0, GDI_HEAP_SIZE-1 );
|
|
}
|
|
|
|
/* Initialize Wine tweaks */
|
|
if (!TWEAK_Init()) return FALSE;
|
|
|
|
/* Initialize OEM Bitmaps */
|
|
if (!OBM_Init()) return FALSE;
|
|
|
|
/* registry initialisation */
|
|
SHELL_LoadRegistry();
|
|
|
|
/* Global atom table initialisation */
|
|
if (!ATOM_Init()) return FALSE;
|
|
|
|
/* GDI initialisation */
|
|
if (!GDI_Init()) return FALSE;
|
|
|
|
/* Initialize system colors and metrics*/
|
|
SYSMETRICS_Init();
|
|
SYSCOLOR_Init();
|
|
|
|
/* Create the DCEs */
|
|
DCE_Init();
|
|
|
|
/* Initialize keyboard */
|
|
if (!KEYBOARD_Init()) return FALSE;
|
|
|
|
/* Initialize window procedures */
|
|
if (!WINPROC_Init()) return FALSE;
|
|
|
|
/* Initialize built-in window classes */
|
|
if (!WIDGETS_Init()) return FALSE;
|
|
|
|
/* Initialize dialog manager */
|
|
if (!DIALOG_Init()) return FALSE;
|
|
|
|
/* Initialize menus */
|
|
if (!MENU_Init()) return FALSE;
|
|
|
|
/* Create desktop window */
|
|
if (!WIN_CreateDesktopWindow()) return FALSE;
|
|
|
|
/* Initialize message spying */
|
|
if (!SPY_Init()) return FALSE;
|
|
|
|
/* Check wine.conf for old/bad entries */
|
|
if (!TWEAK_CheckConfiguration()) return FALSE;
|
|
|
|
/* Create system message queue */
|
|
queueSize = GetProfileInt32A( "windows", "TypeAhead", 120 );
|
|
if (!QUEUE_CreateSysMsgQueue( queueSize )) return FALSE;
|
|
|
|
/* Set double click time */
|
|
SetDoubleClickTime32( GetProfileInt32A("windows","DoubleClickSpeed",452) );
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
/***********************************************************************
|
|
* Winelib initialisation routine
|
|
*/
|
|
BOOL32 MAIN_WinelibInit( int *argc, char *argv[] )
|
|
{
|
|
extern BOOL32 PROCESS_Init(void);
|
|
|
|
/* Create the initial process */
|
|
if (!PROCESS_Init()) return FALSE;
|
|
|
|
/* Parse command line arguments */
|
|
MAIN_WineInit( argc, argv );
|
|
|
|
/* Initialize the kernel */
|
|
if (!MAIN_KernelInit()) return FALSE;
|
|
|
|
/* Initialize all the USER stuff */
|
|
if (!MAIN_UserInit()) return FALSE;
|
|
|
|
return TRUE;
|
|
}
|