Release 971116
Sun Nov 16 07:42:44 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c] [windows/clipboard.c] [windows/nonclient.c]
Bug fixes.
* [misc/shell.c] [resources/*]
New "About" dialog.
Sat Nov 15 17:30:18 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure.in] [Makefile.in]
Replaced --with-library option by --disable-emulator. The default
is now to build both the library and the emulator.
Renamed --with options to --enable to follow autoconf guidelines.
* [loader/main.c] [miscemu/main.c] (New file)
Split initialization in WinelibInit/EmulatorInit.
* [loader/*.c]
Removed all remaining #ifdef's WINELIB.
* [controls/widgets.c] [windows/mdi.c]
Converted MDIClientWndProc to 32-bit.
* [debugger/break.c] [if1632/signal.c] [include/selectors.h]
[scheduler/thread.c]
Code and data selector values are now computed at run-time.
* [library/libres.c]
Moved to loader/ directory.
* [misc/main.c] [misc/version.c] (New file)
Moved all version stuff to version.c. Cleaned up a bit.
* [msdos/dpmi.c]
Update the REALMODECALL structure on return from real-mode
interrupt.
* [windows/event.c] [windows/keyboard.c]
Changed the way event coordinates are determined. Don't rely on
the ConfigureNotify event values. This should fix all problems
with cursor position in -desktop and -managed modes.
Sat Nov 15 16:09:36 1997 Slaven Rezic <eserte@cs.tu-berlin.de>
* [controls/button.c]
(BUTTON_CheckAutoRadioButton): Prevent possible endless loop.
Wed Nov 12 03:42:45 1997 Chris Faherty <chrisf@america.com>
* [misc/ver.c]
Changed VerInstall32A to assume srcdir as destination if destdir
is blank. This was causing alot of DLL installation into SYSTEM
directory to fail.
* [loader/ne_image.c]
NE_LoadSegment buffer[100] was too small and getting overruns.
Changed it to buffer[200].
Sat Nov 8 06:09:57 1997 Len White <phreak@cgocable.net>
* [misc/ddeml.c] [include/ddeml.h] [if1632/ddeml.spec]
Added stub functions DdeConnectList(), DdeQueryNextServer(),
DdeDisconnectList(), DdeSetUserHandle(), DdeAbandonTransaction(),
DdePostAdvise(), DdeCreateDataHandle(), DdeAddData(), DdeGetData(),
DdeAccessData(), DdeUnaccessData(), DdeEnableCallback(),
DdeCmpStringHandles().
Fri Nov 7 19:44:26 1997 Olaf Flebbe <o.flebbe@science-computing.de>
* [files/directory.c]
Fix typo in directory.c [broke loading of cdplayer on nt40]
* [misc/main.c]
Implemented -winver nt40.
* [loader/resource.c] [user32.spec]
Stubs for CopyAcceleratorTable, Destroy AcceleratorTable.
Thu Nov 6 22:37:04 1997 Morten Welinder <welinder@rentec.com>
* [files/drive.c]
(GetDiskFreeSpace32A): Cap at 2GB.
* [include/windows.h]
Prototype DrawIconEx and CreateDIBSection32.
Define OBM_RADIOCHECK.
Add DI_* macros.
* [objects/dib.c] [if1632/gdi.spec]
CreateDIBSection is a WINAPI. Renamed to CreateDIBSection32.
Implement CreateDIBSection16.
* [if1632/user.spec] [if1632/user32.spec]
Add DrawIconEx.
* [objects/cursoricon.c]
(CopyIcon32): Fix bogus implementation.
* [objects/bitmap.c]
(CopyBitmap32): New function.
(CopyImage32): Do bitmaps.
* [graphics/x11drv/text.c]
(X11DRV_ExtTextOut): Change ascent and descent default to avoid
zero-thinkness overstrike line.
* [include/debugstr.h] [misc/debugstr.c]
New files.
* [msdos/dpmi.c]
Don't prototype do_mscdex. In INT_Int31Handler, handle real-mode
int 0x21, ah=0x52.
* [msdos/int2f.c]
Add dummys for 0x1681 and 0x1682.
* [misc/registry.c]
Fix memory leaks in RegDeleteKey32W.
* [objects/text.c]
In TEXT_NextLine, fix another off-by-one bug.
* [include/bitmaps/obm_radiocheck]
New file. (It a small circle used to radio-button menu items
when selected.)
* [objects/oembitmap.c]
Add obm_radiocheck.
* [include/windows.h] [if1632/user32.spec] [controls/menu.c]
[if1632/user.spec]
Define CheckMenuRadioItem{16,32}. Define GetMenuItemRect{16,32}.
Wed Nov 5 11:30:14 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [misc/main.c]
Auto adjust versions depending on binary.
Tue Nov 4 15:21:00 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [controls/listbox.c]
Paint full background in listbox items with tab stops enabled.
* [if1632/thunk.c]
Copy some more message parameter structures (DRAWITEMSTRUCT16,
COMPAREITEMSTRUCT16) to the stack segment to fix broken programs
that need this.
* [windows/dce.c]
Only clip sibling windows when the parent has the WS_CLIPSIBLINGS
style set.
* [windows/focus.c]
Make order of events in FOCUS_SwitchFocus() reflect API docs.
* [windows/defdlg.c]
Fix problem with loss of focus in some dialogs.
* [win32/code_page.c]
Fix return value for MultiByteToWideChar().
* [BUGS]
BCW now works.
1997-11-16 10:38:29 -07:00
|
|
|
/*
|
|
|
|
* Emulator initialisation code
|
|
|
|
*
|
2002-03-09 16:29:33 -07:00
|
|
|
* Copyright 2000 Alexandre Julliard
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library 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
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 05:49:52 -07:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
Release 971116
Sun Nov 16 07:42:44 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c] [windows/clipboard.c] [windows/nonclient.c]
Bug fixes.
* [misc/shell.c] [resources/*]
New "About" dialog.
Sat Nov 15 17:30:18 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure.in] [Makefile.in]
Replaced --with-library option by --disable-emulator. The default
is now to build both the library and the emulator.
Renamed --with options to --enable to follow autoconf guidelines.
* [loader/main.c] [miscemu/main.c] (New file)
Split initialization in WinelibInit/EmulatorInit.
* [loader/*.c]
Removed all remaining #ifdef's WINELIB.
* [controls/widgets.c] [windows/mdi.c]
Converted MDIClientWndProc to 32-bit.
* [debugger/break.c] [if1632/signal.c] [include/selectors.h]
[scheduler/thread.c]
Code and data selector values are now computed at run-time.
* [library/libres.c]
Moved to loader/ directory.
* [misc/main.c] [misc/version.c] (New file)
Moved all version stuff to version.c. Cleaned up a bit.
* [msdos/dpmi.c]
Update the REALMODECALL structure on return from real-mode
interrupt.
* [windows/event.c] [windows/keyboard.c]
Changed the way event coordinates are determined. Don't rely on
the ConfigureNotify event values. This should fix all problems
with cursor position in -desktop and -managed modes.
Sat Nov 15 16:09:36 1997 Slaven Rezic <eserte@cs.tu-berlin.de>
* [controls/button.c]
(BUTTON_CheckAutoRadioButton): Prevent possible endless loop.
Wed Nov 12 03:42:45 1997 Chris Faherty <chrisf@america.com>
* [misc/ver.c]
Changed VerInstall32A to assume srcdir as destination if destdir
is blank. This was causing alot of DLL installation into SYSTEM
directory to fail.
* [loader/ne_image.c]
NE_LoadSegment buffer[100] was too small and getting overruns.
Changed it to buffer[200].
Sat Nov 8 06:09:57 1997 Len White <phreak@cgocable.net>
* [misc/ddeml.c] [include/ddeml.h] [if1632/ddeml.spec]
Added stub functions DdeConnectList(), DdeQueryNextServer(),
DdeDisconnectList(), DdeSetUserHandle(), DdeAbandonTransaction(),
DdePostAdvise(), DdeCreateDataHandle(), DdeAddData(), DdeGetData(),
DdeAccessData(), DdeUnaccessData(), DdeEnableCallback(),
DdeCmpStringHandles().
Fri Nov 7 19:44:26 1997 Olaf Flebbe <o.flebbe@science-computing.de>
* [files/directory.c]
Fix typo in directory.c [broke loading of cdplayer on nt40]
* [misc/main.c]
Implemented -winver nt40.
* [loader/resource.c] [user32.spec]
Stubs for CopyAcceleratorTable, Destroy AcceleratorTable.
Thu Nov 6 22:37:04 1997 Morten Welinder <welinder@rentec.com>
* [files/drive.c]
(GetDiskFreeSpace32A): Cap at 2GB.
* [include/windows.h]
Prototype DrawIconEx and CreateDIBSection32.
Define OBM_RADIOCHECK.
Add DI_* macros.
* [objects/dib.c] [if1632/gdi.spec]
CreateDIBSection is a WINAPI. Renamed to CreateDIBSection32.
Implement CreateDIBSection16.
* [if1632/user.spec] [if1632/user32.spec]
Add DrawIconEx.
* [objects/cursoricon.c]
(CopyIcon32): Fix bogus implementation.
* [objects/bitmap.c]
(CopyBitmap32): New function.
(CopyImage32): Do bitmaps.
* [graphics/x11drv/text.c]
(X11DRV_ExtTextOut): Change ascent and descent default to avoid
zero-thinkness overstrike line.
* [include/debugstr.h] [misc/debugstr.c]
New files.
* [msdos/dpmi.c]
Don't prototype do_mscdex. In INT_Int31Handler, handle real-mode
int 0x21, ah=0x52.
* [msdos/int2f.c]
Add dummys for 0x1681 and 0x1682.
* [misc/registry.c]
Fix memory leaks in RegDeleteKey32W.
* [objects/text.c]
In TEXT_NextLine, fix another off-by-one bug.
* [include/bitmaps/obm_radiocheck]
New file. (It a small circle used to radio-button menu items
when selected.)
* [objects/oembitmap.c]
Add obm_radiocheck.
* [include/windows.h] [if1632/user32.spec] [controls/menu.c]
[if1632/user.spec]
Define CheckMenuRadioItem{16,32}. Define GetMenuItemRect{16,32}.
Wed Nov 5 11:30:14 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [misc/main.c]
Auto adjust versions depending on binary.
Tue Nov 4 15:21:00 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [controls/listbox.c]
Paint full background in listbox items with tab stops enabled.
* [if1632/thunk.c]
Copy some more message parameter structures (DRAWITEMSTRUCT16,
COMPAREITEMSTRUCT16) to the stack segment to fix broken programs
that need this.
* [windows/dce.c]
Only clip sibling windows when the parent has the WS_CLIPSIBLINGS
style set.
* [windows/focus.c]
Make order of events in FOCUS_SwitchFocus() reflect API docs.
* [windows/defdlg.c]
Fix problem with loss of focus in some dialogs.
* [win32/code_page.c]
Fix return value for MultiByteToWideChar().
* [BUGS]
BCW now works.
1997-11-16 10:38:29 -07:00
|
|
|
*/
|
|
|
|
|
2006-10-12 05:55:52 -07:00
|
|
|
#include "config.h"
|
|
|
|
|
2021-10-19 09:53:26 -07:00
|
|
|
#include <fcntl.h>
|
2020-09-08 00:55:38 -07:00
|
|
|
#include <pthread.h>
|
2003-04-26 17:47:58 -07:00
|
|
|
#include <stdio.h>
|
2003-05-21 20:41:43 -07:00
|
|
|
#include <stdlib.h>
|
2021-10-19 09:53:26 -07:00
|
|
|
#include <string.h>
|
2024-04-11 12:24:55 -07:00
|
|
|
#include <sys/mman.h>
|
2021-10-19 09:53:26 -07:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <dlfcn.h>
|
2021-10-23 01:15:14 -07:00
|
|
|
#include <limits.h>
|
|
|
|
#ifdef HAVE_SYS_SYSCTL_H
|
|
|
|
# include <sys/sysctl.h>
|
|
|
|
#endif
|
2006-10-12 05:55:52 -07:00
|
|
|
|
2004-05-28 13:59:22 -07:00
|
|
|
#include "main.h"
|
|
|
|
|
2024-04-11 12:24:55 -07:00
|
|
|
#if defined(__APPLE__) && defined(__x86_64__) && !defined(HAVE_WINE_PRELOADER)
|
|
|
|
|
|
|
|
/* Not using the preloader on x86_64:
|
|
|
|
* Reserve the same areas as the preloader does, but using zero-fill sections
|
|
|
|
* (the only way to prevent system frameworks from using them, including allocations
|
|
|
|
* before main() runs).
|
|
|
|
*/
|
|
|
|
__asm__(".zerofill WINE_RESERVE,WINE_RESERVE");
|
|
|
|
static char __wine_reserve[0x1fffff000] __attribute__((section("WINE_RESERVE, WINE_RESERVE")));
|
|
|
|
|
|
|
|
__asm__(".zerofill WINE_TOP_DOWN,WINE_TOP_DOWN");
|
|
|
|
static char __wine_top_down[0x001ff0000] __attribute__((section("WINE_TOP_DOWN, WINE_TOP_DOWN")));
|
|
|
|
|
|
|
|
static const struct wine_preload_info preload_info[] =
|
|
|
|
{
|
|
|
|
{ __wine_reserve, sizeof(__wine_reserve) }, /* 0x1000 - 0x200000000: low 8GB */
|
|
|
|
{ __wine_top_down, sizeof(__wine_top_down) }, /* 0x7ff000000000 - 0x7ff001ff0000: top-down allocations + virtual heap */
|
|
|
|
{ 0, 0 } /* end of list */
|
|
|
|
};
|
|
|
|
|
|
|
|
const __attribute((visibility("default"))) struct wine_preload_info *wine_main_preload_info = preload_info;
|
|
|
|
|
|
|
|
static void init_reserved_areas(void)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; wine_main_preload_info[i].size != 0; i++)
|
|
|
|
{
|
|
|
|
/* Match how the preloader maps reserved areas: */
|
|
|
|
mmap(wine_main_preload_info[i].addr, wine_main_preload_info[i].size, PROT_NONE,
|
|
|
|
MAP_FIXED | MAP_NORESERVE | MAP_PRIVATE | MAP_ANON, -1, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
2004-05-28 13:59:22 -07:00
|
|
|
/* the preloader will set this variable */
|
2023-11-08 02:27:08 -07:00
|
|
|
const __attribute((visibility("default"))) struct wine_preload_info *wine_main_preload_info = NULL;
|
2006-10-12 05:55:52 -07:00
|
|
|
|
2024-04-11 12:24:55 -07:00
|
|
|
static void init_reserved_areas(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2020-05-14 06:43:56 -07:00
|
|
|
/* canonicalize path and return its directory name */
|
|
|
|
static char *realpath_dirname( const char *name )
|
|
|
|
{
|
|
|
|
char *p, *fullpath = realpath( name, NULL );
|
|
|
|
|
|
|
|
if (fullpath)
|
|
|
|
{
|
|
|
|
p = strrchr( fullpath, '/' );
|
|
|
|
if (p == fullpath) p++;
|
|
|
|
if (p) *p = 0;
|
|
|
|
}
|
|
|
|
return fullpath;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* if string ends with tail, remove it */
|
|
|
|
static char *remove_tail( const char *str, const char *tail )
|
|
|
|
{
|
|
|
|
size_t len = strlen( str );
|
|
|
|
size_t tail_len = strlen( tail );
|
|
|
|
char *ret;
|
|
|
|
|
|
|
|
if (len < tail_len) return NULL;
|
|
|
|
if (strcmp( str + len - tail_len, tail )) return NULL;
|
|
|
|
ret = malloc( len - tail_len + 1 );
|
|
|
|
memcpy( ret, str, len - tail_len );
|
|
|
|
ret[len - tail_len] = 0;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* build a path from the specified dir and name */
|
|
|
|
static char *build_path( const char *dir, const char *name )
|
|
|
|
{
|
|
|
|
size_t len = strlen( dir );
|
|
|
|
char *ret = malloc( len + strlen( name ) + 2 );
|
|
|
|
|
|
|
|
memcpy( ret, dir, len );
|
|
|
|
if (len && ret[len - 1] != '/') ret[len++] = '/';
|
|
|
|
strcpy( ret + len, name );
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2024-06-25 02:58:36 -07:00
|
|
|
/* build a path with the relative dir from 'from' to 'dest' appended to base */
|
|
|
|
static char *build_relative_path( const char *base, const char *from, const char *dest )
|
|
|
|
{
|
|
|
|
const char *start;
|
|
|
|
char *ret;
|
|
|
|
unsigned int dotdots = 0;
|
|
|
|
|
|
|
|
for (;;)
|
|
|
|
{
|
|
|
|
while (*from == '/') from++;
|
|
|
|
while (*dest == '/') dest++;
|
|
|
|
start = dest; /* save start of next path element */
|
|
|
|
if (!*from) break;
|
|
|
|
|
|
|
|
while (*from && *from != '/' && *from == *dest) { from++; dest++; }
|
|
|
|
if ((!*from || *from == '/') && (!*dest || *dest == '/')) continue;
|
|
|
|
|
|
|
|
do /* count remaining elements in 'from' */
|
|
|
|
{
|
|
|
|
dotdots++;
|
|
|
|
while (*from && *from != '/') from++;
|
|
|
|
while (*from == '/') from++;
|
|
|
|
}
|
|
|
|
while (*from);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = malloc( strlen(base) + 3 * dotdots + strlen(start) + 2 );
|
|
|
|
strcpy( ret, base );
|
|
|
|
while (dotdots--) strcat( ret, "/.." );
|
|
|
|
|
|
|
|
if (!start[0]) return ret;
|
|
|
|
strcat( ret, "/" );
|
|
|
|
strcat( ret, start );
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2020-05-14 06:43:56 -07:00
|
|
|
static const char *get_self_exe( char *argv0 )
|
|
|
|
{
|
|
|
|
#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
|
|
|
return "/proc/self/exe";
|
|
|
|
#elif defined (__FreeBSD__) || defined(__DragonFly__)
|
2021-10-23 01:15:14 -07:00
|
|
|
static int pathname[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
|
|
|
|
size_t path_size = PATH_MAX;
|
|
|
|
char *path = malloc( path_size );
|
2022-10-27 16:02:44 -07:00
|
|
|
if (path && !sysctl( pathname, sizeof(pathname)/sizeof(pathname[0]), path, &path_size, NULL, 0 ))
|
2021-10-23 01:15:14 -07:00
|
|
|
return path;
|
|
|
|
free( path );
|
|
|
|
#endif
|
|
|
|
|
2020-05-14 06:43:56 -07:00
|
|
|
if (!strchr( argv0, '/' )) /* search in PATH */
|
|
|
|
{
|
|
|
|
char *p, *path = getenv( "PATH" );
|
|
|
|
|
|
|
|
if (!path || !(path = strdup(path))) return NULL;
|
|
|
|
for (p = strtok( path, ":" ); p; p = strtok( NULL, ":" ))
|
|
|
|
{
|
|
|
|
char *name = build_path( p, argv0 );
|
2020-08-19 13:57:06 -07:00
|
|
|
if (!access( name, X_OK ))
|
|
|
|
{
|
|
|
|
free( path );
|
|
|
|
return name;
|
|
|
|
}
|
2020-05-14 06:43:56 -07:00
|
|
|
free( name );
|
|
|
|
}
|
|
|
|
free( path );
|
2020-08-19 13:57:06 -07:00
|
|
|
return NULL;
|
2020-05-14 06:43:56 -07:00
|
|
|
}
|
|
|
|
return argv0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void *try_dlopen( const char *dir, const char *name )
|
|
|
|
{
|
|
|
|
char *path = build_path( dir, name );
|
|
|
|
void *handle = dlopen( path, RTLD_NOW );
|
|
|
|
free( path );
|
|
|
|
return handle;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void *load_ntdll( char *argv0 )
|
|
|
|
{
|
2021-04-28 02:40:39 -07:00
|
|
|
#ifdef __i386__
|
|
|
|
#define SO_DIR "i386-unix/"
|
|
|
|
#elif defined(__x86_64__)
|
|
|
|
#define SO_DIR "x86_64-unix/"
|
|
|
|
#elif defined(__arm__)
|
|
|
|
#define SO_DIR "arm-unix/"
|
|
|
|
#elif defined(__aarch64__)
|
|
|
|
#define SO_DIR "aarch64-unix/"
|
|
|
|
#else
|
|
|
|
#define SO_DIR ""
|
|
|
|
#endif
|
2020-05-14 06:43:56 -07:00
|
|
|
const char *self = get_self_exe( argv0 );
|
|
|
|
char *path, *p;
|
|
|
|
void *handle = NULL;
|
|
|
|
|
|
|
|
if (self && ((path = realpath_dirname( self ))))
|
|
|
|
{
|
|
|
|
if ((p = remove_tail( path, "/loader" )))
|
|
|
|
handle = try_dlopen( p, "dlls/ntdll/ntdll.so" );
|
2024-06-25 02:58:36 -07:00
|
|
|
else if ((p = build_relative_path( path, BINDIR, LIBDIR )))
|
|
|
|
handle = try_dlopen( p, "wine/" SO_DIR "ntdll.so" );
|
|
|
|
free( p );
|
2020-05-14 06:43:56 -07:00
|
|
|
free( path );
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!handle && (path = getenv( "WINEDLLPATH" )))
|
|
|
|
{
|
|
|
|
path = strdup( path );
|
|
|
|
for (p = strtok( path, ":" ); p; p = strtok( NULL, ":" ))
|
|
|
|
{
|
2021-04-28 02:40:39 -07:00
|
|
|
handle = try_dlopen( p, SO_DIR "ntdll.so" );
|
|
|
|
if (!handle) handle = try_dlopen( p, "ntdll.so" );
|
2020-05-14 06:43:56 -07:00
|
|
|
if (handle) break;
|
|
|
|
}
|
|
|
|
free( path );
|
|
|
|
}
|
|
|
|
|
2024-06-25 02:58:36 -07:00
|
|
|
if (!handle && !self) handle = try_dlopen( LIBDIR, "wine/" SO_DIR "ntdll.so" );
|
2020-05-14 06:43:56 -07:00
|
|
|
|
|
|
|
return handle;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
Release 971116
Sun Nov 16 07:42:44 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c] [windows/clipboard.c] [windows/nonclient.c]
Bug fixes.
* [misc/shell.c] [resources/*]
New "About" dialog.
Sat Nov 15 17:30:18 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure.in] [Makefile.in]
Replaced --with-library option by --disable-emulator. The default
is now to build both the library and the emulator.
Renamed --with options to --enable to follow autoconf guidelines.
* [loader/main.c] [miscemu/main.c] (New file)
Split initialization in WinelibInit/EmulatorInit.
* [loader/*.c]
Removed all remaining #ifdef's WINELIB.
* [controls/widgets.c] [windows/mdi.c]
Converted MDIClientWndProc to 32-bit.
* [debugger/break.c] [if1632/signal.c] [include/selectors.h]
[scheduler/thread.c]
Code and data selector values are now computed at run-time.
* [library/libres.c]
Moved to loader/ directory.
* [misc/main.c] [misc/version.c] (New file)
Moved all version stuff to version.c. Cleaned up a bit.
* [msdos/dpmi.c]
Update the REALMODECALL structure on return from real-mode
interrupt.
* [windows/event.c] [windows/keyboard.c]
Changed the way event coordinates are determined. Don't rely on
the ConfigureNotify event values. This should fix all problems
with cursor position in -desktop and -managed modes.
Sat Nov 15 16:09:36 1997 Slaven Rezic <eserte@cs.tu-berlin.de>
* [controls/button.c]
(BUTTON_CheckAutoRadioButton): Prevent possible endless loop.
Wed Nov 12 03:42:45 1997 Chris Faherty <chrisf@america.com>
* [misc/ver.c]
Changed VerInstall32A to assume srcdir as destination if destdir
is blank. This was causing alot of DLL installation into SYSTEM
directory to fail.
* [loader/ne_image.c]
NE_LoadSegment buffer[100] was too small and getting overruns.
Changed it to buffer[200].
Sat Nov 8 06:09:57 1997 Len White <phreak@cgocable.net>
* [misc/ddeml.c] [include/ddeml.h] [if1632/ddeml.spec]
Added stub functions DdeConnectList(), DdeQueryNextServer(),
DdeDisconnectList(), DdeSetUserHandle(), DdeAbandonTransaction(),
DdePostAdvise(), DdeCreateDataHandle(), DdeAddData(), DdeGetData(),
DdeAccessData(), DdeUnaccessData(), DdeEnableCallback(),
DdeCmpStringHandles().
Fri Nov 7 19:44:26 1997 Olaf Flebbe <o.flebbe@science-computing.de>
* [files/directory.c]
Fix typo in directory.c [broke loading of cdplayer on nt40]
* [misc/main.c]
Implemented -winver nt40.
* [loader/resource.c] [user32.spec]
Stubs for CopyAcceleratorTable, Destroy AcceleratorTable.
Thu Nov 6 22:37:04 1997 Morten Welinder <welinder@rentec.com>
* [files/drive.c]
(GetDiskFreeSpace32A): Cap at 2GB.
* [include/windows.h]
Prototype DrawIconEx and CreateDIBSection32.
Define OBM_RADIOCHECK.
Add DI_* macros.
* [objects/dib.c] [if1632/gdi.spec]
CreateDIBSection is a WINAPI. Renamed to CreateDIBSection32.
Implement CreateDIBSection16.
* [if1632/user.spec] [if1632/user32.spec]
Add DrawIconEx.
* [objects/cursoricon.c]
(CopyIcon32): Fix bogus implementation.
* [objects/bitmap.c]
(CopyBitmap32): New function.
(CopyImage32): Do bitmaps.
* [graphics/x11drv/text.c]
(X11DRV_ExtTextOut): Change ascent and descent default to avoid
zero-thinkness overstrike line.
* [include/debugstr.h] [misc/debugstr.c]
New files.
* [msdos/dpmi.c]
Don't prototype do_mscdex. In INT_Int31Handler, handle real-mode
int 0x21, ah=0x52.
* [msdos/int2f.c]
Add dummys for 0x1681 and 0x1682.
* [misc/registry.c]
Fix memory leaks in RegDeleteKey32W.
* [objects/text.c]
In TEXT_NextLine, fix another off-by-one bug.
* [include/bitmaps/obm_radiocheck]
New file. (It a small circle used to radio-button menu items
when selected.)
* [objects/oembitmap.c]
Add obm_radiocheck.
* [include/windows.h] [if1632/user32.spec] [controls/menu.c]
[if1632/user.spec]
Define CheckMenuRadioItem{16,32}. Define GetMenuItemRect{16,32}.
Wed Nov 5 11:30:14 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [misc/main.c]
Auto adjust versions depending on binary.
Tue Nov 4 15:21:00 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [controls/listbox.c]
Paint full background in listbox items with tab stops enabled.
* [if1632/thunk.c]
Copy some more message parameter structures (DRAWITEMSTRUCT16,
COMPAREITEMSTRUCT16) to the stack segment to fix broken programs
that need this.
* [windows/dce.c]
Only clip sibling windows when the parent has the WS_CLIPSIBLINGS
style set.
* [windows/focus.c]
Make order of events in FOCUS_SwitchFocus() reflect API docs.
* [windows/defdlg.c]
Fix problem with loss of focus in some dialogs.
* [win32/code_page.c]
Fix return value for MultiByteToWideChar().
* [BUGS]
BCW now works.
1997-11-16 10:38:29 -07:00
|
|
|
/**********************************************************************
|
|
|
|
* main
|
|
|
|
*/
|
|
|
|
int main( int argc, char *argv[] )
|
|
|
|
{
|
2020-05-14 06:43:56 -07:00
|
|
|
void *handle;
|
2004-05-28 13:59:22 -07:00
|
|
|
|
2024-04-11 12:24:55 -07:00
|
|
|
init_reserved_areas();
|
|
|
|
|
2020-05-17 02:11:28 -07:00
|
|
|
if ((handle = load_ntdll( argv[0] )))
|
|
|
|
{
|
2024-07-29 16:54:09 -07:00
|
|
|
void (*init_func)(int, char **) = dlsym( handle, "__wine_main" );
|
|
|
|
if (init_func) init_func( argc, argv );
|
2020-05-17 02:11:28 -07:00
|
|
|
fprintf( stderr, "wine: __wine_main function not found in ntdll.so\n" );
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
2020-09-08 00:55:38 -07:00
|
|
|
fprintf( stderr, "wine: could not load ntdll.so: %s\n", dlerror() );
|
|
|
|
pthread_detach( pthread_self() ); /* force importing libpthread for OpenGL */
|
2003-04-26 17:47:58 -07:00
|
|
|
exit(1);
|
Release 971116
Sun Nov 16 07:42:44 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c] [windows/clipboard.c] [windows/nonclient.c]
Bug fixes.
* [misc/shell.c] [resources/*]
New "About" dialog.
Sat Nov 15 17:30:18 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure.in] [Makefile.in]
Replaced --with-library option by --disable-emulator. The default
is now to build both the library and the emulator.
Renamed --with options to --enable to follow autoconf guidelines.
* [loader/main.c] [miscemu/main.c] (New file)
Split initialization in WinelibInit/EmulatorInit.
* [loader/*.c]
Removed all remaining #ifdef's WINELIB.
* [controls/widgets.c] [windows/mdi.c]
Converted MDIClientWndProc to 32-bit.
* [debugger/break.c] [if1632/signal.c] [include/selectors.h]
[scheduler/thread.c]
Code and data selector values are now computed at run-time.
* [library/libres.c]
Moved to loader/ directory.
* [misc/main.c] [misc/version.c] (New file)
Moved all version stuff to version.c. Cleaned up a bit.
* [msdos/dpmi.c]
Update the REALMODECALL structure on return from real-mode
interrupt.
* [windows/event.c] [windows/keyboard.c]
Changed the way event coordinates are determined. Don't rely on
the ConfigureNotify event values. This should fix all problems
with cursor position in -desktop and -managed modes.
Sat Nov 15 16:09:36 1997 Slaven Rezic <eserte@cs.tu-berlin.de>
* [controls/button.c]
(BUTTON_CheckAutoRadioButton): Prevent possible endless loop.
Wed Nov 12 03:42:45 1997 Chris Faherty <chrisf@america.com>
* [misc/ver.c]
Changed VerInstall32A to assume srcdir as destination if destdir
is blank. This was causing alot of DLL installation into SYSTEM
directory to fail.
* [loader/ne_image.c]
NE_LoadSegment buffer[100] was too small and getting overruns.
Changed it to buffer[200].
Sat Nov 8 06:09:57 1997 Len White <phreak@cgocable.net>
* [misc/ddeml.c] [include/ddeml.h] [if1632/ddeml.spec]
Added stub functions DdeConnectList(), DdeQueryNextServer(),
DdeDisconnectList(), DdeSetUserHandle(), DdeAbandonTransaction(),
DdePostAdvise(), DdeCreateDataHandle(), DdeAddData(), DdeGetData(),
DdeAccessData(), DdeUnaccessData(), DdeEnableCallback(),
DdeCmpStringHandles().
Fri Nov 7 19:44:26 1997 Olaf Flebbe <o.flebbe@science-computing.de>
* [files/directory.c]
Fix typo in directory.c [broke loading of cdplayer on nt40]
* [misc/main.c]
Implemented -winver nt40.
* [loader/resource.c] [user32.spec]
Stubs for CopyAcceleratorTable, Destroy AcceleratorTable.
Thu Nov 6 22:37:04 1997 Morten Welinder <welinder@rentec.com>
* [files/drive.c]
(GetDiskFreeSpace32A): Cap at 2GB.
* [include/windows.h]
Prototype DrawIconEx and CreateDIBSection32.
Define OBM_RADIOCHECK.
Add DI_* macros.
* [objects/dib.c] [if1632/gdi.spec]
CreateDIBSection is a WINAPI. Renamed to CreateDIBSection32.
Implement CreateDIBSection16.
* [if1632/user.spec] [if1632/user32.spec]
Add DrawIconEx.
* [objects/cursoricon.c]
(CopyIcon32): Fix bogus implementation.
* [objects/bitmap.c]
(CopyBitmap32): New function.
(CopyImage32): Do bitmaps.
* [graphics/x11drv/text.c]
(X11DRV_ExtTextOut): Change ascent and descent default to avoid
zero-thinkness overstrike line.
* [include/debugstr.h] [misc/debugstr.c]
New files.
* [msdos/dpmi.c]
Don't prototype do_mscdex. In INT_Int31Handler, handle real-mode
int 0x21, ah=0x52.
* [msdos/int2f.c]
Add dummys for 0x1681 and 0x1682.
* [misc/registry.c]
Fix memory leaks in RegDeleteKey32W.
* [objects/text.c]
In TEXT_NextLine, fix another off-by-one bug.
* [include/bitmaps/obm_radiocheck]
New file. (It a small circle used to radio-button menu items
when selected.)
* [objects/oembitmap.c]
Add obm_radiocheck.
* [include/windows.h] [if1632/user32.spec] [controls/menu.c]
[if1632/user.spec]
Define CheckMenuRadioItem{16,32}. Define GetMenuItemRect{16,32}.
Wed Nov 5 11:30:14 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [misc/main.c]
Auto adjust versions depending on binary.
Tue Nov 4 15:21:00 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [controls/listbox.c]
Paint full background in listbox items with tab stops enabled.
* [if1632/thunk.c]
Copy some more message parameter structures (DRAWITEMSTRUCT16,
COMPAREITEMSTRUCT16) to the stack segment to fix broken programs
that need this.
* [windows/dce.c]
Only clip sibling windows when the parent has the WS_CLIPSIBLINGS
style set.
* [windows/focus.c]
Make order of events in FOCUS_SwitchFocus() reflect API docs.
* [windows/defdlg.c]
Fix problem with loss of focus in some dialogs.
* [win32/code_page.c]
Fix return value for MultiByteToWideChar().
* [BUGS]
BCW now works.
1997-11-16 10:38:29 -07:00
|
|
|
}
|