1997-01-01 18:29:55 +01:00
|
|
|
/*
|
|
|
|
* Win32 processes
|
|
|
|
*
|
1998-04-13 14:21:30 +02:00
|
|
|
* Copyright 1996, 1998 Alexandre Julliard
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
1997-01-01 18:29:55 +01:00
|
|
|
*/
|
|
|
|
|
2002-04-26 21:05:15 +02:00
|
|
|
#include "config.h"
|
|
|
|
#include "wine/port.h"
|
|
|
|
|
1997-01-01 18:29:55 +01:00
|
|
|
#include <assert.h>
|
2000-05-01 18:24:22 +02:00
|
|
|
#include <ctype.h>
|
2003-05-20 21:21:43 +02:00
|
|
|
#include <locale.h>
|
2000-05-01 18:24:22 +02:00
|
|
|
#include <errno.h>
|
2000-01-25 02:40:27 +01:00
|
|
|
#include <fcntl.h>
|
2002-06-13 23:57:38 +02:00
|
|
|
#include <signal.h>
|
Release 970112
Sat Jan 11 18:17:59 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [controls/menu.c]
Updated to new Win32 types.
* [controls/listbox.c]
Fixed Winfile extended selection bug.
* [files/directory.c]
Changed DIR_SearchPath to return both long and short file names.
* [files/dos_fs.c]
Implemented VFAT ioctl to retrieve the original short filenames
from a VFAT filesystem (Linux only for now).
Replaced DOSFS_GetUnixFileName()/DOSFS_GetDosTrueName() by
DOS_GetFullName().
Properly implemented GetShortPathName() and GetFullPathName().
Made all functions re-entrant.
* [files/file.c] [misc/main.c]
Replaced -allowreadonly option by -failreadonly. The default is
now to report success when opening a read-only file for writing.
* [objects/metafile.c]
Fixed bug in DIB bitmaps pointer calculation.
* [scheduler/process.c]
Implemented environment strings and Get/SetStdHandle with process
environment block.
* [tools/build.c]
Rewrote BuildContext32() to avoid instructions that may not be
supported by all assemblers.
Fri Jan 10 17:11:09 1997 David Faure <david.faure@ifhamy.insa-lyon.fr>
* [windows/event.c]
Created table keyc2vkey, which associate a vkey(+extended bit) to
any keycode. Changed EVENT_event_to_vkey to use this table to
return the correct vkey. Changed EVENT_ToAscii to get the keycode
from this table too. Assigned OEM specific vkeys arbitrarily.
Fri Jan 10 09:26:17 1997 John Harvey <john@division.co.uk>
* [misc/winsock.c] [misc/winsoc_async.c]
Fixed svr4 header files.
Changed bzero() to memset().
* [tools/fnt2bdf.c]
Removed bcopy() and used memcpy() instead.
* [debugger/msc.c]
Include string.h instead of strings.h
* [debugger/stabs.c]
Include string.h instead of strings.h.
Define __ELF__ for svr4 systems.
* [loader/signal.c]
Use wait() instead of wait4() which doesnt exist on Unixware.
* [memory/global.c]
Use sysconf() instead of getpagesize() for svr4 systems.
Thu Jan 9 21:07:20 1997 Robert Pouliot <krynos@clic.net>
* [Make.rules.in] [Makefile.in] [make_os2.sh] [rc/Makefile.in]
[tools/Makefile.in] [documentation/wine_os2.txt]
Patches for OS/2 support. Note that it doesn't compile yet.
Tue Jan 7 20:03:53 1997 Eric Youngdale <eric@sub2304.jic.com>
* [debugger/*]
Many more debugger improvements (see debugger/README for details).
Tue Jan 7 15:12:21 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [windows/graphics.c] [objects/text.c] [graphics/x11drv/*]
[graphics/metafiledrv/*]
Moved some device dependent code into the resp. subdirs.
* [include/gdi.h] [include/metafiledrv.h] [include/x11drv.h]
Prototypes added,
DC_FUNCTIONS: GetPixel added, some unnecessary functions removed.
* [objects/region.c]
CreatePolyPolygonRgn32 added.
* [files/dos_fs.c]
QueryDosDevice added.
* [misc/lstr.c]
FormatMessage: broken heap management fixed.
* [scheduler/process.c] [scheduler/thread.c]
Get/SetThreadPriority/PriorityClass added.
Mon Jan 6 21:55:30 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [misc/keyboard.c]
ToAscii : Use EVENT_ToAscii instead.
* [windows/event.c]
keypad_key : Do not convert XK_Mode_switch to VK_MENU; recognize
keypad cursor keys.
EVENT_event_to_vkey : New function, to transform a X keycode
into a MSwin vkey + extended bit.
EVENT_ToAscii : New function, to transform a vkey + extended bit
(+ key state table) into ascii char(s), using XLookupString, and
recognizing dead chars.
EVENT_key : Transform AltGr into Ctrl+Alt sequence; call
EVENT_event_to_vkey for keycode to vkey conversion; fixed
previous, context and extended bits.
* [windows/keyboard.c]
Include stddebug.h, to get -debugmsg messages.
GetKeyState : Handle VK_MBUTTON case.
GetKeyboardState, SetKeyboardState : Debugging messages added.
* [windows/message.c]
TranslateMessage : Handle dead chars.
Mon Jan 6 20:10:11 1997 Dominik Strasser <bm424953@muenchen.org>
* [if1632/crtdll.spec] [misc/crtdll.c]
C++ functions new/delete/set_new_handler implemented.
Mon Jan 6 15:48:15 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl>
* [controls/edit.c] [include/windows.h]
Moved the edit control to 32 bits.
Included new (win95) message definitions in windows.h
Implemented EM_SCROLLCARET, EM_SETMARGINS, EM_GETMARGINS,
EM_GETLIMITTEXT, EM_POSFROMCHAR, EM_CHARFROMPOS.
Broke EM_SETWORDBREAKPROC (internal wordwrap still works).
Fixed some bugs, introduced a couple of others.
Text buffer is now initially in 32-bit heap.
* [controls/EDIT.TODO] [controls/combo.c] [controls/widgets.c]
[if1632/wprocs.spec] [library/miscstubs.c] [windows/defdlg.c]
[misc/commdlg.c]
Updated to work with 32-bit edit control.
Sat Jan 4 22:07:27 1997 O.Flebbe <O.Flebbe@science-computing.uni-tuebingen.de>
* [loader/pe_image.c]
Use mmap rather then malloc. Better workaround for clean
segments.
1997-01-12 19:32:19 +01:00
|
|
|
#include <stdlib.h>
|
2000-04-15 23:00:55 +02:00
|
|
|
#include <stdio.h>
|
Release 970112
Sat Jan 11 18:17:59 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [controls/menu.c]
Updated to new Win32 types.
* [controls/listbox.c]
Fixed Winfile extended selection bug.
* [files/directory.c]
Changed DIR_SearchPath to return both long and short file names.
* [files/dos_fs.c]
Implemented VFAT ioctl to retrieve the original short filenames
from a VFAT filesystem (Linux only for now).
Replaced DOSFS_GetUnixFileName()/DOSFS_GetDosTrueName() by
DOS_GetFullName().
Properly implemented GetShortPathName() and GetFullPathName().
Made all functions re-entrant.
* [files/file.c] [misc/main.c]
Replaced -allowreadonly option by -failreadonly. The default is
now to report success when opening a read-only file for writing.
* [objects/metafile.c]
Fixed bug in DIB bitmaps pointer calculation.
* [scheduler/process.c]
Implemented environment strings and Get/SetStdHandle with process
environment block.
* [tools/build.c]
Rewrote BuildContext32() to avoid instructions that may not be
supported by all assemblers.
Fri Jan 10 17:11:09 1997 David Faure <david.faure@ifhamy.insa-lyon.fr>
* [windows/event.c]
Created table keyc2vkey, which associate a vkey(+extended bit) to
any keycode. Changed EVENT_event_to_vkey to use this table to
return the correct vkey. Changed EVENT_ToAscii to get the keycode
from this table too. Assigned OEM specific vkeys arbitrarily.
Fri Jan 10 09:26:17 1997 John Harvey <john@division.co.uk>
* [misc/winsock.c] [misc/winsoc_async.c]
Fixed svr4 header files.
Changed bzero() to memset().
* [tools/fnt2bdf.c]
Removed bcopy() and used memcpy() instead.
* [debugger/msc.c]
Include string.h instead of strings.h
* [debugger/stabs.c]
Include string.h instead of strings.h.
Define __ELF__ for svr4 systems.
* [loader/signal.c]
Use wait() instead of wait4() which doesnt exist on Unixware.
* [memory/global.c]
Use sysconf() instead of getpagesize() for svr4 systems.
Thu Jan 9 21:07:20 1997 Robert Pouliot <krynos@clic.net>
* [Make.rules.in] [Makefile.in] [make_os2.sh] [rc/Makefile.in]
[tools/Makefile.in] [documentation/wine_os2.txt]
Patches for OS/2 support. Note that it doesn't compile yet.
Tue Jan 7 20:03:53 1997 Eric Youngdale <eric@sub2304.jic.com>
* [debugger/*]
Many more debugger improvements (see debugger/README for details).
Tue Jan 7 15:12:21 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [windows/graphics.c] [objects/text.c] [graphics/x11drv/*]
[graphics/metafiledrv/*]
Moved some device dependent code into the resp. subdirs.
* [include/gdi.h] [include/metafiledrv.h] [include/x11drv.h]
Prototypes added,
DC_FUNCTIONS: GetPixel added, some unnecessary functions removed.
* [objects/region.c]
CreatePolyPolygonRgn32 added.
* [files/dos_fs.c]
QueryDosDevice added.
* [misc/lstr.c]
FormatMessage: broken heap management fixed.
* [scheduler/process.c] [scheduler/thread.c]
Get/SetThreadPriority/PriorityClass added.
Mon Jan 6 21:55:30 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [misc/keyboard.c]
ToAscii : Use EVENT_ToAscii instead.
* [windows/event.c]
keypad_key : Do not convert XK_Mode_switch to VK_MENU; recognize
keypad cursor keys.
EVENT_event_to_vkey : New function, to transform a X keycode
into a MSwin vkey + extended bit.
EVENT_ToAscii : New function, to transform a vkey + extended bit
(+ key state table) into ascii char(s), using XLookupString, and
recognizing dead chars.
EVENT_key : Transform AltGr into Ctrl+Alt sequence; call
EVENT_event_to_vkey for keycode to vkey conversion; fixed
previous, context and extended bits.
* [windows/keyboard.c]
Include stddebug.h, to get -debugmsg messages.
GetKeyState : Handle VK_MBUTTON case.
GetKeyboardState, SetKeyboardState : Debugging messages added.
* [windows/message.c]
TranslateMessage : Handle dead chars.
Mon Jan 6 20:10:11 1997 Dominik Strasser <bm424953@muenchen.org>
* [if1632/crtdll.spec] [misc/crtdll.c]
C++ functions new/delete/set_new_handler implemented.
Mon Jan 6 15:48:15 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl>
* [controls/edit.c] [include/windows.h]
Moved the edit control to 32 bits.
Included new (win95) message definitions in windows.h
Implemented EM_SCROLLCARET, EM_SETMARGINS, EM_GETMARGINS,
EM_GETLIMITTEXT, EM_POSFROMCHAR, EM_CHARFROMPOS.
Broke EM_SETWORDBREAKPROC (internal wordwrap still works).
Fixed some bugs, introduced a couple of others.
Text buffer is now initially in 32-bit heap.
* [controls/EDIT.TODO] [controls/combo.c] [controls/widgets.c]
[if1632/wprocs.spec] [library/miscstubs.c] [windows/defdlg.c]
[misc/commdlg.c]
Updated to work with 32-bit edit control.
Sat Jan 4 22:07:27 1997 O.Flebbe <O.Flebbe@science-computing.uni-tuebingen.de>
* [loader/pe_image.c]
Use mmap rather then malloc. Better workaround for clean
segments.
1997-01-12 19:32:19 +01:00
|
|
|
#include <string.h>
|
2002-08-17 02:43:16 +02:00
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
# include <unistd.h>
|
|
|
|
#endif
|
1999-06-06 16:47:50 +02:00
|
|
|
#include "wine/winbase16.h"
|
2001-12-17 23:10:24 +01:00
|
|
|
#include "wine/winuser16.h"
|
1999-12-04 05:04:58 +01:00
|
|
|
#include "wine/exception.h"
|
2000-11-10 02:38:28 +01:00
|
|
|
#include "wine/library.h"
|
2000-10-03 06:19:16 +02:00
|
|
|
#include "drive.h"
|
1997-08-04 18:34:36 +02:00
|
|
|
#include "module.h"
|
Release 970112
Sat Jan 11 18:17:59 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [controls/menu.c]
Updated to new Win32 types.
* [controls/listbox.c]
Fixed Winfile extended selection bug.
* [files/directory.c]
Changed DIR_SearchPath to return both long and short file names.
* [files/dos_fs.c]
Implemented VFAT ioctl to retrieve the original short filenames
from a VFAT filesystem (Linux only for now).
Replaced DOSFS_GetUnixFileName()/DOSFS_GetDosTrueName() by
DOS_GetFullName().
Properly implemented GetShortPathName() and GetFullPathName().
Made all functions re-entrant.
* [files/file.c] [misc/main.c]
Replaced -allowreadonly option by -failreadonly. The default is
now to report success when opening a read-only file for writing.
* [objects/metafile.c]
Fixed bug in DIB bitmaps pointer calculation.
* [scheduler/process.c]
Implemented environment strings and Get/SetStdHandle with process
environment block.
* [tools/build.c]
Rewrote BuildContext32() to avoid instructions that may not be
supported by all assemblers.
Fri Jan 10 17:11:09 1997 David Faure <david.faure@ifhamy.insa-lyon.fr>
* [windows/event.c]
Created table keyc2vkey, which associate a vkey(+extended bit) to
any keycode. Changed EVENT_event_to_vkey to use this table to
return the correct vkey. Changed EVENT_ToAscii to get the keycode
from this table too. Assigned OEM specific vkeys arbitrarily.
Fri Jan 10 09:26:17 1997 John Harvey <john@division.co.uk>
* [misc/winsock.c] [misc/winsoc_async.c]
Fixed svr4 header files.
Changed bzero() to memset().
* [tools/fnt2bdf.c]
Removed bcopy() and used memcpy() instead.
* [debugger/msc.c]
Include string.h instead of strings.h
* [debugger/stabs.c]
Include string.h instead of strings.h.
Define __ELF__ for svr4 systems.
* [loader/signal.c]
Use wait() instead of wait4() which doesnt exist on Unixware.
* [memory/global.c]
Use sysconf() instead of getpagesize() for svr4 systems.
Thu Jan 9 21:07:20 1997 Robert Pouliot <krynos@clic.net>
* [Make.rules.in] [Makefile.in] [make_os2.sh] [rc/Makefile.in]
[tools/Makefile.in] [documentation/wine_os2.txt]
Patches for OS/2 support. Note that it doesn't compile yet.
Tue Jan 7 20:03:53 1997 Eric Youngdale <eric@sub2304.jic.com>
* [debugger/*]
Many more debugger improvements (see debugger/README for details).
Tue Jan 7 15:12:21 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [windows/graphics.c] [objects/text.c] [graphics/x11drv/*]
[graphics/metafiledrv/*]
Moved some device dependent code into the resp. subdirs.
* [include/gdi.h] [include/metafiledrv.h] [include/x11drv.h]
Prototypes added,
DC_FUNCTIONS: GetPixel added, some unnecessary functions removed.
* [objects/region.c]
CreatePolyPolygonRgn32 added.
* [files/dos_fs.c]
QueryDosDevice added.
* [misc/lstr.c]
FormatMessage: broken heap management fixed.
* [scheduler/process.c] [scheduler/thread.c]
Get/SetThreadPriority/PriorityClass added.
Mon Jan 6 21:55:30 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [misc/keyboard.c]
ToAscii : Use EVENT_ToAscii instead.
* [windows/event.c]
keypad_key : Do not convert XK_Mode_switch to VK_MENU; recognize
keypad cursor keys.
EVENT_event_to_vkey : New function, to transform a X keycode
into a MSwin vkey + extended bit.
EVENT_ToAscii : New function, to transform a vkey + extended bit
(+ key state table) into ascii char(s), using XLookupString, and
recognizing dead chars.
EVENT_key : Transform AltGr into Ctrl+Alt sequence; call
EVENT_event_to_vkey for keycode to vkey conversion; fixed
previous, context and extended bits.
* [windows/keyboard.c]
Include stddebug.h, to get -debugmsg messages.
GetKeyState : Handle VK_MBUTTON case.
GetKeyboardState, SetKeyboardState : Debugging messages added.
* [windows/message.c]
TranslateMessage : Handle dead chars.
Mon Jan 6 20:10:11 1997 Dominik Strasser <bm424953@muenchen.org>
* [if1632/crtdll.spec] [misc/crtdll.c]
C++ functions new/delete/set_new_handler implemented.
Mon Jan 6 15:48:15 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl>
* [controls/edit.c] [include/windows.h]
Moved the edit control to 32 bits.
Included new (win95) message definitions in windows.h
Implemented EM_SCROLLCARET, EM_SETMARGINS, EM_GETMARGINS,
EM_GETLIMITTEXT, EM_POSFROMCHAR, EM_CHARFROMPOS.
Broke EM_SETWORDBREAKPROC (internal wordwrap still works).
Fixed some bugs, introduced a couple of others.
Text buffer is now initially in 32-bit heap.
* [controls/EDIT.TODO] [controls/combo.c] [controls/widgets.c]
[if1632/wprocs.spec] [library/miscstubs.c] [windows/defdlg.c]
[misc/commdlg.c]
Updated to work with 32-bit edit control.
Sat Jan 4 22:07:27 1997 O.Flebbe <O.Flebbe@science-computing.uni-tuebingen.de>
* [loader/pe_image.c]
Use mmap rather then malloc. Better workaround for clean
segments.
1997-01-12 19:32:19 +01:00
|
|
|
#include "file.h"
|
2002-05-22 23:32:49 +02:00
|
|
|
#include "heap.h"
|
1997-06-16 19:43:53 +02:00
|
|
|
#include "thread.h"
|
1997-01-01 18:29:55 +01:00
|
|
|
#include "winerror.h"
|
2001-11-24 00:04:58 +01:00
|
|
|
#include "wincon.h"
|
2001-07-19 02:39:09 +02:00
|
|
|
#include "wine/server.h"
|
1999-10-23 16:15:33 +02:00
|
|
|
#include "options.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
2003-06-21 04:07:10 +02:00
|
|
|
#include "../kernel/kernel_private.h"
|
1997-01-01 18:29:55 +01:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(process);
|
2003-05-20 21:21:43 +02:00
|
|
|
WINE_DECLARE_DEBUG_CHANNEL(server);
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DECLARE_DEBUG_CHANNEL(relay);
|
2002-06-04 19:48:41 +02:00
|
|
|
WINE_DECLARE_DEBUG_CHANNEL(snoop);
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DECLARE_DEBUG_CHANNEL(win32);
|
1999-04-19 16:56:29 +02:00
|
|
|
|
2000-12-11 04:48:15 +01:00
|
|
|
/* Win32 process database */
|
|
|
|
typedef struct _PDB
|
|
|
|
{
|
|
|
|
LONG header[2]; /* 00 Kernel object header */
|
|
|
|
HMODULE module; /* 08 Main exe module (NT) */
|
2003-07-01 05:38:56 +02:00
|
|
|
PPEB_LDR_DATA LdrData; /* 0c Pointer to loader information */
|
|
|
|
RTL_USER_PROCESS_PARAMETERS *ProcessParameters; /* 10 Process parameters */
|
2000-12-11 04:48:15 +01:00
|
|
|
DWORD unknown2; /* 14 Unknown */
|
|
|
|
HANDLE heap; /* 18 Default process heap */
|
|
|
|
HANDLE mem_context; /* 1c Process memory context */
|
|
|
|
DWORD flags; /* 20 Flags */
|
|
|
|
void *pdb16; /* 24 DOS PSP */
|
|
|
|
WORD PSP_sel; /* 28 Selector to DOS PSP */
|
|
|
|
WORD imte; /* 2a IMTE for the process module */
|
|
|
|
WORD threads; /* 2c Number of threads */
|
|
|
|
WORD running_threads; /* 2e Number of running threads */
|
|
|
|
WORD free_lib_count; /* 30 Recursion depth of FreeLibrary calls */
|
|
|
|
WORD ring0_threads; /* 32 Number of ring 0 threads */
|
|
|
|
HANDLE system_heap; /* 34 System heap to allocate handles */
|
|
|
|
HTASK task; /* 38 Win16 task */
|
|
|
|
void *mem_map_files; /* 3c Pointer to mem-mapped files */
|
|
|
|
struct _ENVDB *env_db; /* 40 Environment database */
|
|
|
|
void *handle_table; /* 44 Handle table */
|
|
|
|
struct _PDB *parent; /* 48 Parent process */
|
|
|
|
void *modref_list; /* 4c MODREF list */
|
|
|
|
void *thread_list; /* 50 List of threads */
|
|
|
|
void *debuggee_CB; /* 54 Debuggee context block */
|
|
|
|
void *local_heap_free; /* 58 Head of local heap free list */
|
|
|
|
DWORD unknown4; /* 5c Unknown */
|
|
|
|
CRITICAL_SECTION crit_section; /* 60 Critical section */
|
|
|
|
DWORD unknown5[3]; /* 78 Unknown */
|
|
|
|
void *console; /* 84 Console */
|
|
|
|
DWORD tls_bits[2]; /* 88 TLS in-use bits */
|
|
|
|
DWORD process_dword; /* 90 Unknown */
|
|
|
|
struct _PDB *group; /* 94 Process group */
|
|
|
|
void *exe_modref; /* 98 MODREF for the process EXE */
|
|
|
|
void *top_filter; /* 9c Top exception filter */
|
|
|
|
DWORD priority; /* a0 Priority level */
|
|
|
|
HANDLE heap_list; /* a4 Head of process heap list */
|
|
|
|
void *heap_handles; /* a8 Head of heap handles list */
|
|
|
|
DWORD unknown6; /* ac Unknown */
|
|
|
|
void *console_provider; /* b0 Console provider (??) */
|
|
|
|
WORD env_selector; /* b4 Selector to process environment */
|
|
|
|
WORD error_mode; /* b6 Error mode */
|
|
|
|
HANDLE load_done_evt; /* b8 Event for process loading done */
|
|
|
|
void *UTState; /* bc Head of Univeral Thunk list */
|
|
|
|
DWORD unknown8; /* c0 Unknown (NT) */
|
|
|
|
LCID locale; /* c4 Locale to be queried by GetThreadLocale (NT) */
|
|
|
|
} PDB;
|
|
|
|
|
2000-08-10 00:33:42 +02:00
|
|
|
PDB current_process;
|
Release 980104
Sat Jan 3 17:15:56 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/db_disasm.c]
Added cpuid and cmpxchg instructions.
* [if1632/builtin.c] [relay32/builtin32.c]
Fixed broken -dll option with Win32 DLLs.
* [include/heap.h]
Added SYSTEM_LOCK/SYSTEM_UNLOCK macros.
* [configure.in] [misc/lstr.c]
Added check for wctype.h.
Commented out --enable-ipc option (IPC code has been broken for a
long time anyway).
* [scheduler/critsection.c] [scheduler/event.c]
[scheduler/mutex.c] [scheduler/semaphore.c]
Implemented Win32 synchronization objects.
* [scheduler/synchro.c]
Implemented WaitForMultipleObjects and related functions.
* [scheduler/thread.c]
If possible, use clone() in CreateThread().
* [scheduler/thread.c] [scheduler/process.c]
Made thread and process waitable objects.
Thread and process id values are now different from the pointers
they represent.
* [win32/k32obj.c]
Moved to scheduler directory.
Added function table for waiting operations on objects.
* [files/file.c] [memory/virtual.c]
Added new K32OBJ function table.
Sun Jan 1 16:48:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed my patch for GetTempFileName16() as needed.
It was ...Name32A() that didn't work properly, not ...Name16().
* [graphics/x11drv/brush.c]
Fixed a BadMatch error.
* [msdos/int21.c]
Fixed INT21_FindNextFCB() to get correct volume labels e.g.
in "file open" dialog.
* [multimedia/joystick.c] [relay32/winmm.spec]
Stub JoyGetPosEx().
* [scheduler/process.c] [relay32/kernel32.spec]
Implemented RegisterServiceProcess().
Wed Dec 31 11:14:43 1997 Lawson Whitney <lawson_whitney@juno.com>
* [if1632/kernel.spec] [if1632/relay.c]
Define CallProcEx32w - Thanks to Marcus Meissner for his excellent
CallProc32W.
* [loader/module.c]
Take a shot at defining FreeLibrary32W.
Sun Dec 28 12:44:04 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [controls/menu.c]
Menu modification from WM_INITMENUPOPUP message fixed.
Menu items now can have different wID and hSubMenu (Win95 behavior).
* [misc/cpu.c]
Improved IsProcessorFeaturePresent.
Sun Dec 28 03:21:08 1997 Ove Kaaven <ovek@main.arcticnet.no>
* [include/winsock.h] [misc/winsock.c]
Fixed WS_SOL_SOCKET for setsockopt(), and made select() return
empty fd_sets if timeout.
* [objects/palette.c]
AnimatePalette() bailed out if entire palette is animated. Fixed.
* [objects/dib.c]
Added some code to SetDIBitsToDevice() and its helpers to fix
some offseting problems.
* [objects/cursoricon.c]
Made CreateCursor32() convert the instance handle properly. Made
DestroyCursor() return correct success status.
Wed Dec 24 17:56:34 1997 Dimitrie O. Paun <dimi@cs.toronto.edu>
* [windows/syscolor.c]
Added definition of GetSysColorPen16/32. This function does not
exist in the Win32 API but is a very close (and natural) relative
to GetSysColorBrush function. Moreover, it is *very* much used
within Wine since there are a lot of places where we need to draw
lines with the standard colors.
* [controls/button.c] [controls/combo.c] [controls/icontitle.c]
[controls/menu.c] [controls/progress.c] [controls/scroll.c]
[controls/updown.c] [graphics/painting.c] [misc/tweak.c]
[windows/defwnd.c] [windows/graphics.c] [windows/nonclient.c]
Replaced references to sysColorObjects with the appropriate
call to GetSysColorBrush32/GetSysColorPen32. There is no need to
expose the implementation of these functions, even within Wine.
This makes the code easier to understand, debug, maintain.
* [controls/uitools.c]
Modified most of the functions in this file to use the now
standard pens (i.e. GetSysColorPen32). These functions made
*heavy* use of standard pens so I expect a lot less
CreatePen/DeleteObject calls can do only good...:)
Plus some minor modifications (*no* functional changes though).
* [controls/updown.c]
Used the new DrawFrameControl32 function to paint the control.
I also deleted UDDOWN_DrawArrow since it was no longer required.
Tue Dec 23 00:03:33 1997 Steinar Hamre <steinarh@stud.fim.ntnu.no>
* [configure.in]
Added check for -lw.
* [include/wintypes.h] [tools/build.c]
Changes to make the assembly understandable for even sun as.
".ascii" -> ".string", "call %foo" -> "call *%foo",
"pushw/popw %[cdes]s" written out to ".byte 0x66\npushl/popl %[cdes]s".
* [memory/ldt.c]
#ifdef added so <sys/seg.h> will not be included on Solaris.
Mon Dec 22 18:55:19 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [configure.in]
Added XF86DGA check.
* [multimedia/dsound.c][relay32/dsound.spec][include/dsound.h]
Started DirectSound. Only stubs for now.
* [graphics/ddraw.c][include/ddraw.h][relay32/ddraw.spec]
Started to implement DirectDraw. Mostly stubs, some
testcases work. Requires the XF86DGA extension to XFree86.
(check demo/blizdemo.exe from the Diablo CD-ROM).
* [files/drive.c]
Return correct "CDFS" fsname so Diablo is a bit happier.
Sun Dec 21 21:45:48 1997 Kevin Cozens <kcozens@interlog.com>
* [misc/registry.c]
Fixed bugs in the routines which read the Windows '95 registry
files. Added extra information regarding the format of the Windows
'95 registry files.
1998-01-04 18:49:09 +01:00
|
|
|
|
2003-07-01 05:38:56 +02:00
|
|
|
static RTL_USER_PROCESS_PARAMETERS process_pmts;
|
|
|
|
static PEB_LDR_DATA process_ldr;
|
2003-05-08 05:47:00 +02:00
|
|
|
|
2000-08-31 03:59:51 +02:00
|
|
|
static char main_exe_name[MAX_PATH];
|
2001-08-06 19:48:17 +02:00
|
|
|
static char *main_exe_name_ptr = main_exe_name;
|
2001-01-05 05:08:07 +01:00
|
|
|
static HANDLE main_exe_file;
|
2002-05-23 21:40:18 +02:00
|
|
|
static unsigned int server_startticks;
|
1999-07-30 20:05:07 +02:00
|
|
|
|
2002-07-31 21:19:36 +02:00
|
|
|
int main_create_flags = 0;
|
|
|
|
|
2003-06-18 05:23:22 +02:00
|
|
|
/* dlls/ntdll/env.c */
|
|
|
|
extern BOOL init_user_process_pmts( size_t, char*, size_t );
|
|
|
|
extern BOOL build_command_line( char **argv );
|
|
|
|
|
2002-06-04 19:48:41 +02:00
|
|
|
extern void RELAY_InitDebugLists(void);
|
2003-05-20 21:21:43 +02:00
|
|
|
extern void SHELL_LoadRegistry(void);
|
2003-04-20 04:46:44 +02:00
|
|
|
extern void VERSION_Init( const char *appname );
|
2000-12-12 01:50:19 +01:00
|
|
|
|
2002-05-22 23:32:49 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* get_basename
|
|
|
|
*/
|
|
|
|
inline static const char *get_basename( const char *name )
|
|
|
|
{
|
|
|
|
char *p;
|
|
|
|
|
|
|
|
if ((p = strrchr( name, '/' ))) name = p + 1;
|
|
|
|
if ((p = strrchr( name, '\\' ))) name = p + 1;
|
|
|
|
return name;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-08-14 23:12:58 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* open_builtin_exe_file
|
|
|
|
*
|
|
|
|
* Open an exe file for a builtin exe.
|
|
|
|
*/
|
2003-07-03 20:23:10 +02:00
|
|
|
static void *open_builtin_exe_file( const char *name, char *error, int error_size,
|
|
|
|
int test_only, int *file_exists )
|
2002-08-14 23:12:58 +02:00
|
|
|
{
|
|
|
|
char exename[MAX_PATH], *p;
|
|
|
|
const char *basename = get_basename(name);
|
|
|
|
|
|
|
|
if (strlen(basename) >= sizeof(exename)) return NULL;
|
|
|
|
strcpy( exename, basename );
|
|
|
|
for (p = exename; *p; p++) *p = FILE_tolower(*p);
|
2003-07-03 20:23:10 +02:00
|
|
|
return wine_dll_load_main_exe( exename, error, error_size, test_only, file_exists );
|
2002-08-14 23:12:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-05-22 23:32:49 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* open_exe_file
|
|
|
|
*
|
2002-08-14 23:12:58 +02:00
|
|
|
* Open a specific exe file, taking load order into account.
|
2002-05-22 23:32:49 +02:00
|
|
|
* Returns the file handle or 0 for a builtin exe.
|
|
|
|
*/
|
|
|
|
static HANDLE open_exe_file( const char *name )
|
|
|
|
{
|
|
|
|
enum loadorder_type loadorder[LOADORDER_NTYPES];
|
2002-08-14 23:12:58 +02:00
|
|
|
char buffer[MAX_PATH];
|
2002-05-22 23:32:49 +02:00
|
|
|
HANDLE handle;
|
2003-07-03 20:23:10 +02:00
|
|
|
int i, file_exists;
|
2002-05-22 23:32:49 +02:00
|
|
|
|
2002-08-14 23:12:58 +02:00
|
|
|
TRACE("looking for %s\n", debugstr_a(name) );
|
|
|
|
|
|
|
|
if ((handle = CreateFileA( name, GENERIC_READ, FILE_SHARE_READ,
|
|
|
|
NULL, OPEN_EXISTING, 0, 0 )) == INVALID_HANDLE_VALUE)
|
|
|
|
{
|
|
|
|
/* file doesn't exist, check for builtin */
|
|
|
|
if (!FILE_contains_path( name )) goto error;
|
|
|
|
if (!MODULE_GetBuiltinPath( name, "", buffer, sizeof(buffer) )) goto error;
|
|
|
|
name = buffer;
|
|
|
|
}
|
|
|
|
|
2002-05-22 23:32:49 +02:00
|
|
|
MODULE_GetLoadOrder( loadorder, name, TRUE );
|
|
|
|
|
|
|
|
for(i = 0; i < LOADORDER_NTYPES; i++)
|
|
|
|
{
|
|
|
|
if (loadorder[i] == LOADORDER_INVALID) break;
|
|
|
|
switch(loadorder[i])
|
|
|
|
{
|
|
|
|
case LOADORDER_DLL:
|
|
|
|
TRACE( "Trying native exe %s\n", debugstr_a(name) );
|
2002-08-14 23:12:58 +02:00
|
|
|
if (handle != INVALID_HANDLE_VALUE) return handle;
|
2002-05-22 23:32:49 +02:00
|
|
|
break;
|
|
|
|
case LOADORDER_BI:
|
|
|
|
TRACE( "Trying built-in exe %s\n", debugstr_a(name) );
|
2003-07-03 20:23:10 +02:00
|
|
|
open_builtin_exe_file( name, NULL, 0, 1, &file_exists );
|
|
|
|
if (file_exists)
|
2002-08-14 23:12:58 +02:00
|
|
|
{
|
|
|
|
if (handle != INVALID_HANDLE_VALUE) CloseHandle(handle);
|
|
|
|
return 0;
|
|
|
|
}
|
2002-05-22 23:32:49 +02:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2002-08-14 23:12:58 +02:00
|
|
|
if (handle != INVALID_HANDLE_VALUE) CloseHandle(handle);
|
|
|
|
|
|
|
|
error:
|
|
|
|
SetLastError( ERROR_FILE_NOT_FOUND );
|
2002-05-22 23:32:49 +02:00
|
|
|
return INVALID_HANDLE_VALUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* find_exe_file
|
|
|
|
*
|
|
|
|
* Open an exe file, and return the full name and file handle.
|
|
|
|
* Returns FALSE if file could not be found.
|
|
|
|
* If file exists but cannot be opened, returns TRUE and set handle to INVALID_HANDLE_VALUE.
|
|
|
|
* If file is a builtin exe, returns TRUE and sets handle to 0.
|
|
|
|
*/
|
|
|
|
static BOOL find_exe_file( const char *name, char *buffer, int buflen, HANDLE *handle )
|
|
|
|
{
|
|
|
|
enum loadorder_type loadorder[LOADORDER_NTYPES];
|
2003-07-03 20:23:10 +02:00
|
|
|
int i, file_exists;
|
2002-05-22 23:32:49 +02:00
|
|
|
|
|
|
|
TRACE("looking for %s\n", debugstr_a(name) );
|
|
|
|
|
2002-08-14 23:12:58 +02:00
|
|
|
if (!SearchPathA( NULL, name, ".exe", buflen, buffer, NULL ) &&
|
|
|
|
!MODULE_GetBuiltinPath( name, ".exe", buffer, buflen ))
|
2002-05-22 23:32:49 +02:00
|
|
|
{
|
2002-08-14 23:12:58 +02:00
|
|
|
/* no builtin found, try native without extension in case it is a Unix app */
|
2002-05-22 23:32:49 +02:00
|
|
|
|
2002-08-14 23:12:58 +02:00
|
|
|
if (SearchPathA( NULL, name, NULL, buflen, buffer, NULL ))
|
|
|
|
{
|
|
|
|
TRACE( "Trying native/Unix binary %s\n", debugstr_a(buffer) );
|
|
|
|
if ((*handle = CreateFileA( buffer, GENERIC_READ, FILE_SHARE_READ,
|
|
|
|
NULL, OPEN_EXISTING, 0, 0 )) != INVALID_HANDLE_VALUE)
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
return FALSE;
|
2002-05-22 23:32:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
MODULE_GetLoadOrder( loadorder, buffer, TRUE );
|
2002-08-14 23:12:58 +02:00
|
|
|
|
|
|
|
for(i = 0; i < LOADORDER_NTYPES; i++)
|
2002-05-22 23:32:49 +02:00
|
|
|
{
|
2002-08-14 23:12:58 +02:00
|
|
|
if (loadorder[i] == LOADORDER_INVALID) break;
|
|
|
|
switch(loadorder[i])
|
2002-05-22 23:32:49 +02:00
|
|
|
{
|
2002-08-14 23:12:58 +02:00
|
|
|
case LOADORDER_DLL:
|
|
|
|
TRACE( "Trying native exe %s\n", debugstr_a(buffer) );
|
|
|
|
if ((*handle = CreateFileA( buffer, GENERIC_READ, FILE_SHARE_READ,
|
|
|
|
NULL, OPEN_EXISTING, 0, 0 )) != INVALID_HANDLE_VALUE)
|
|
|
|
return TRUE;
|
|
|
|
if (GetLastError() != ERROR_FILE_NOT_FOUND) return TRUE;
|
|
|
|
break;
|
|
|
|
case LOADORDER_BI:
|
2002-05-22 23:32:49 +02:00
|
|
|
TRACE( "Trying built-in exe %s\n", debugstr_a(buffer) );
|
2003-07-03 20:23:10 +02:00
|
|
|
open_builtin_exe_file( buffer, NULL, 0, 1, &file_exists );
|
|
|
|
if (file_exists)
|
2002-05-22 23:32:49 +02:00
|
|
|
{
|
|
|
|
*handle = 0;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
break;
|
2002-08-14 23:12:58 +02:00
|
|
|
default:
|
|
|
|
break;
|
2002-05-22 23:32:49 +02:00
|
|
|
}
|
|
|
|
}
|
2002-08-14 23:12:58 +02:00
|
|
|
SetLastError( ERROR_FILE_NOT_FOUND );
|
2002-05-22 23:32:49 +02:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1998-01-18 19:01:49 +01:00
|
|
|
/***********************************************************************
|
2000-07-16 20:21:34 +02:00
|
|
|
* process_init
|
|
|
|
*
|
|
|
|
* Main process initialisation code
|
1998-01-18 19:01:49 +01:00
|
|
|
*/
|
2000-07-16 20:21:34 +02:00
|
|
|
static BOOL process_init( char *argv[] )
|
1998-01-18 19:01:49 +01:00
|
|
|
{
|
2000-08-30 02:00:48 +02:00
|
|
|
BOOL ret;
|
2002-03-29 19:28:56 +01:00
|
|
|
size_t info_size = 0;
|
1998-01-18 19:01:49 +01:00
|
|
|
|
2003-05-20 21:21:43 +02:00
|
|
|
setbuf(stdout,NULL);
|
|
|
|
setbuf(stderr,NULL);
|
|
|
|
setlocale(LC_CTYPE,"");
|
|
|
|
|
2000-07-16 20:21:34 +02:00
|
|
|
/* store the program name */
|
|
|
|
argv0 = argv[0];
|
|
|
|
|
1999-02-21 19:35:27 +01:00
|
|
|
/* Fill the initial process structure */
|
2003-07-01 05:38:56 +02:00
|
|
|
current_process.threads = 1;
|
|
|
|
current_process.running_threads = 1;
|
|
|
|
current_process.ring0_threads = 1;
|
|
|
|
current_process.group = ¤t_process;
|
|
|
|
current_process.priority = 8; /* Normal */
|
2003-06-18 05:23:22 +02:00
|
|
|
current_process.ProcessParameters = &process_pmts;
|
2003-07-01 05:38:56 +02:00
|
|
|
current_process.LdrData = &process_ldr;
|
|
|
|
InitializeListHead(&process_ldr.InLoadOrderModuleList);
|
|
|
|
InitializeListHead(&process_ldr.InMemoryOrderModuleList);
|
|
|
|
InitializeListHead(&process_ldr.InInitializationOrderModuleList);
|
2000-05-01 18:24:22 +02:00
|
|
|
|
|
|
|
/* Setup the server connection */
|
2001-03-01 23:13:49 +01:00
|
|
|
CLIENT_InitServer();
|
1999-02-21 19:35:27 +01:00
|
|
|
|
2000-05-01 18:24:22 +02:00
|
|
|
/* Retrieve startup info from the server */
|
2001-11-30 19:46:42 +01:00
|
|
|
SERVER_START_REQ( init_process )
|
2000-08-30 02:00:48 +02:00
|
|
|
{
|
2000-11-14 02:54:49 +01:00
|
|
|
req->ldt_copy = &wine_ldt_copy;
|
2001-11-30 19:46:42 +01:00
|
|
|
if ((ret = !wine_server_call_err( req )))
|
2000-08-30 02:00:48 +02:00
|
|
|
{
|
2002-05-22 23:32:49 +02:00
|
|
|
main_exe_file = reply->exe_file;
|
|
|
|
main_create_flags = reply->create_flags;
|
|
|
|
info_size = reply->info_size;
|
|
|
|
server_startticks = reply->server_start;
|
2003-06-18 05:23:22 +02:00
|
|
|
process_pmts.hStdInput = reply->hstdin;
|
|
|
|
process_pmts.hStdOutput = reply->hstdout;
|
|
|
|
process_pmts.hStdError = reply->hstderr;
|
2000-08-30 02:00:48 +02:00
|
|
|
}
|
|
|
|
}
|
2001-11-30 19:46:42 +01:00
|
|
|
SERVER_END_REQ;
|
2000-08-30 02:00:48 +02:00
|
|
|
if (!ret) return FALSE;
|
2000-05-01 18:24:22 +02:00
|
|
|
|
2001-02-23 02:37:05 +01:00
|
|
|
/* Create the process heap */
|
2000-08-10 00:33:42 +02:00
|
|
|
current_process.heap = HeapCreate( HEAP_GROWABLE, 0, 0 );
|
1999-02-28 14:27:56 +01:00
|
|
|
|
2003-06-21 04:07:10 +02:00
|
|
|
if (info_size == 0)
|
2001-11-24 00:04:58 +01:00
|
|
|
{
|
2003-06-21 04:07:10 +02:00
|
|
|
/* This is wine specific: we have no parent (we're started from unix)
|
|
|
|
* so, create a simple console with bare handles to unix stdio
|
|
|
|
* input & output streams (aka simple console)
|
2001-11-24 00:04:58 +01:00
|
|
|
*/
|
2003-06-18 05:23:22 +02:00
|
|
|
wine_server_fd_to_handle( 0, GENERIC_READ|SYNCHRONIZE, TRUE, &process_pmts.hStdInput );
|
|
|
|
wine_server_fd_to_handle( 1, GENERIC_WRITE|SYNCHRONIZE, TRUE, &process_pmts.hStdOutput );
|
|
|
|
wine_server_fd_to_handle( 1, GENERIC_WRITE|SYNCHRONIZE, TRUE, &process_pmts.hStdError );
|
2001-11-24 00:04:58 +01:00
|
|
|
}
|
2003-06-21 04:07:10 +02:00
|
|
|
else
|
|
|
|
{
|
2003-08-19 03:05:17 +02:00
|
|
|
/* convert value from server:
|
|
|
|
* + 0 => INVALID_HANDLE_VALUE
|
|
|
|
* + console handle need to be mapped
|
|
|
|
*/
|
2003-06-21 04:07:10 +02:00
|
|
|
if (!process_pmts.hStdInput)
|
|
|
|
process_pmts.hStdInput = INVALID_HANDLE_VALUE;
|
|
|
|
else if (VerifyConsoleIoHandle(console_handle_map(process_pmts.hStdInput)))
|
|
|
|
process_pmts.hStdInput = console_handle_map(process_pmts.hStdInput);
|
|
|
|
if (!process_pmts.hStdOutput)
|
|
|
|
process_pmts.hStdOutput = INVALID_HANDLE_VALUE;
|
|
|
|
else if (VerifyConsoleIoHandle(console_handle_map(process_pmts.hStdOutput)))
|
|
|
|
process_pmts.hStdOutput = console_handle_map(process_pmts.hStdOutput);
|
|
|
|
if (!process_pmts.hStdError)
|
|
|
|
process_pmts.hStdError = INVALID_HANDLE_VALUE;
|
|
|
|
else if (VerifyConsoleIoHandle(console_handle_map(process_pmts.hStdError)))
|
|
|
|
process_pmts.hStdError = console_handle_map(process_pmts.hStdError);
|
|
|
|
}
|
2001-11-24 00:04:58 +01:00
|
|
|
|
2000-04-15 23:00:55 +02:00
|
|
|
/* Copy the parent environment */
|
2003-06-18 05:23:22 +02:00
|
|
|
if (!init_user_process_pmts( info_size, main_exe_name, sizeof(main_exe_name) ))
|
2002-03-29 19:28:56 +01:00
|
|
|
return FALSE;
|
1999-03-21 20:26:25 +01:00
|
|
|
|
2000-07-16 20:21:34 +02:00
|
|
|
/* Parse command line arguments */
|
2002-05-24 23:20:27 +02:00
|
|
|
OPTIONS_ParseOptions( !info_size ? argv : NULL );
|
2000-07-16 20:21:34 +02:00
|
|
|
|
2003-05-15 06:20:42 +02:00
|
|
|
/* <hack: to be changed later on> */
|
|
|
|
process_pmts.CurrentDirectoryName.Length = 3 * sizeof(WCHAR);
|
|
|
|
process_pmts.CurrentDirectoryName.MaximumLength = RtlGetLongestNtPathLength() * sizeof(WCHAR);
|
2003-06-18 05:23:22 +02:00
|
|
|
process_pmts.CurrentDirectoryName.Buffer = RtlAllocateHeap( GetProcessHeap(), 0, process_pmts.CurrentDirectoryName.MaximumLength);
|
2003-05-15 06:20:42 +02:00
|
|
|
process_pmts.CurrentDirectoryName.Buffer[0] = 'C';
|
|
|
|
process_pmts.CurrentDirectoryName.Buffer[1] = ':';
|
|
|
|
process_pmts.CurrentDirectoryName.Buffer[2] = '\\';
|
|
|
|
process_pmts.CurrentDirectoryName.Buffer[3] = '\0';
|
|
|
|
/* </hack: to be changed later on> */
|
|
|
|
|
2003-05-20 21:21:43 +02:00
|
|
|
/* initialise DOS drives */
|
|
|
|
if (!DRIVE_Init()) return FALSE;
|
|
|
|
|
|
|
|
/* initialise DOS directories */
|
|
|
|
if (!DIR_Init()) return FALSE;
|
|
|
|
|
|
|
|
/* registry initialisation */
|
|
|
|
SHELL_LoadRegistry();
|
|
|
|
|
|
|
|
/* global boot finished, the rest is process-local */
|
|
|
|
CLIENT_BootDone( TRACE_ON(server) );
|
2002-06-04 19:48:41 +02:00
|
|
|
if (TRACE_ON(relay) || TRACE_ON(snoop)) RELAY_InitDebugLists();
|
2001-11-24 00:04:58 +01:00
|
|
|
|
2003-05-20 21:21:43 +02:00
|
|
|
return TRUE;
|
1998-01-18 19:01:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-04-15 23:00:55 +02:00
|
|
|
/***********************************************************************
|
2000-05-29 23:25:10 +02:00
|
|
|
* start_process
|
2000-04-15 23:00:55 +02:00
|
|
|
*
|
2000-05-29 23:25:10 +02:00
|
|
|
* Startup routine of a new process. Runs on the new process stack.
|
2000-04-15 23:00:55 +02:00
|
|
|
*/
|
2003-06-27 06:08:04 +02:00
|
|
|
static void start_process( void *arg )
|
2000-04-15 23:00:55 +02:00
|
|
|
{
|
2003-06-27 06:08:04 +02:00
|
|
|
__TRY
|
2000-11-08 05:33:20 +01:00
|
|
|
{
|
2003-06-27 06:08:04 +02:00
|
|
|
LPTHREAD_START_ROUTINE entry;
|
|
|
|
HANDLE main_file = main_exe_file;
|
|
|
|
IMAGE_NT_HEADERS *nt;
|
|
|
|
PEB *peb = NtCurrentTeb()->Peb;
|
2000-06-07 05:49:41 +02:00
|
|
|
|
2003-06-27 06:08:04 +02:00
|
|
|
if (main_file)
|
|
|
|
{
|
|
|
|
UINT drive_type = GetDriveTypeA( main_exe_name );
|
|
|
|
/* don't keep the file handle open on removable media */
|
|
|
|
if (drive_type == DRIVE_REMOVABLE || drive_type == DRIVE_CDROM) main_file = 0;
|
|
|
|
}
|
2001-10-25 21:52:12 +02:00
|
|
|
|
2003-06-27 06:08:04 +02:00
|
|
|
/* Retrieve entry point address */
|
|
|
|
nt = RtlImageNtHeader( peb->ImageBaseAddress );
|
|
|
|
entry = (LPTHREAD_START_ROUTINE)((char*)peb->ImageBaseAddress +
|
|
|
|
nt->OptionalHeader.AddressOfEntryPoint);
|
|
|
|
|
|
|
|
/* Install signal handlers; this cannot be done before, since we cannot
|
|
|
|
* send exceptions to the debugger before the create process event that
|
|
|
|
* is sent by REQ_INIT_PROCESS_DONE.
|
|
|
|
* We do need the handlers in place by the time the request is over, so
|
|
|
|
* we set them up here. If we segfault between here and the server call
|
|
|
|
* something is very wrong... */
|
|
|
|
if (!SIGNAL_Init()) goto error;
|
|
|
|
|
|
|
|
/* Signal the parent process to continue */
|
|
|
|
SERVER_START_REQ( init_process_done )
|
|
|
|
{
|
|
|
|
req->module = peb->ImageBaseAddress;
|
|
|
|
req->module_size = nt->OptionalHeader.SizeOfImage;
|
|
|
|
req->entry = entry;
|
|
|
|
/* API requires a double indirection */
|
|
|
|
req->name = &main_exe_name_ptr;
|
|
|
|
req->exe_file = main_file;
|
|
|
|
req->gui = (nt->OptionalHeader.Subsystem != IMAGE_SUBSYSTEM_WINDOWS_CUI);
|
|
|
|
wine_server_add_data( req, main_exe_name, strlen(main_exe_name) );
|
|
|
|
wine_server_call( req );
|
|
|
|
peb->BeingDebugged = reply->debugged;
|
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
2000-06-07 05:49:41 +02:00
|
|
|
|
2003-06-27 06:08:04 +02:00
|
|
|
/* create the main modref and load dependencies */
|
|
|
|
if (!PE_CreateModule( peb->ImageBaseAddress, main_exe_name, 0, 0, FALSE )) goto error;
|
2000-11-08 05:33:20 +01:00
|
|
|
|
2003-06-27 06:08:04 +02:00
|
|
|
if (main_exe_file) CloseHandle( main_exe_file ); /* we no longer need it */
|
2001-10-25 21:52:12 +02:00
|
|
|
|
2003-06-27 06:08:04 +02:00
|
|
|
MODULE_DllProcessAttach( NULL, (LPVOID)1 );
|
2000-06-07 05:49:41 +02:00
|
|
|
|
2003-06-27 06:08:04 +02:00
|
|
|
if (TRACE_ON(relay))
|
|
|
|
DPRINTF( "%04lx:Starting process %s (entryproc=%p)\n",
|
|
|
|
GetCurrentThreadId(), main_exe_name, entry );
|
|
|
|
if (peb->BeingDebugged) DbgBreakPoint();
|
|
|
|
SetLastError(0); /* clear error code */
|
|
|
|
ExitThread( entry( NtCurrentTeb()->Peb ) );
|
2000-06-07 05:49:41 +02:00
|
|
|
|
2003-06-27 06:08:04 +02:00
|
|
|
error:
|
|
|
|
ExitProcess( GetLastError() );
|
|
|
|
}
|
|
|
|
__EXCEPT(UnhandledExceptionFilter)
|
|
|
|
{
|
|
|
|
TerminateThread( GetCurrentThread(), GetExceptionCode() );
|
|
|
|
}
|
|
|
|
__ENDTRY
|
2000-05-29 23:25:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2003-04-27 02:47:58 +02:00
|
|
|
* __wine_process_init
|
2000-05-29 23:25:10 +02:00
|
|
|
*
|
|
|
|
* Wine initialisation: load and start the main exe file.
|
|
|
|
*/
|
2003-04-27 02:47:58 +02:00
|
|
|
void __wine_process_init( int argc, char *argv[] )
|
2000-05-29 23:25:10 +02:00
|
|
|
{
|
2003-02-19 04:42:38 +01:00
|
|
|
char error[1024], *p;
|
2000-11-08 05:33:20 +01:00
|
|
|
DWORD stack_size = 0;
|
2003-07-03 20:23:10 +02:00
|
|
|
int file_exists;
|
2000-05-29 23:25:10 +02:00
|
|
|
|
|
|
|
/* Initialize everything */
|
2000-07-16 20:21:34 +02:00
|
|
|
if (!process_init( argv )) exit(1);
|
2000-05-29 23:25:10 +02:00
|
|
|
|
2002-05-17 01:16:01 +02:00
|
|
|
argv++; /* remove argv[0] (wine itself) */
|
2000-05-29 23:25:10 +02:00
|
|
|
|
2002-11-21 04:45:01 +01:00
|
|
|
TRACE( "starting process name=%s file=%p argv[0]=%s\n",
|
2002-05-22 23:32:49 +02:00
|
|
|
debugstr_a(main_exe_name), main_exe_file, debugstr_a(argv[0]) );
|
|
|
|
|
2000-08-31 03:59:51 +02:00
|
|
|
if (!main_exe_name[0])
|
2000-05-29 23:25:10 +02:00
|
|
|
{
|
2002-05-17 01:16:01 +02:00
|
|
|
if (!argv[0]) OPTIONS_Usage();
|
2000-05-29 23:25:10 +02:00
|
|
|
|
2002-05-22 23:32:49 +02:00
|
|
|
if (!find_exe_file( argv[0], main_exe_name, sizeof(main_exe_name), &main_exe_file ))
|
2000-05-29 23:25:10 +02:00
|
|
|
{
|
2002-05-17 01:16:01 +02:00
|
|
|
MESSAGE( "%s: cannot find '%s'\n", argv0, argv[0] );
|
2002-05-22 23:32:49 +02:00
|
|
|
ExitProcess(1);
|
2000-05-29 23:25:10 +02:00
|
|
|
}
|
2002-05-22 23:32:49 +02:00
|
|
|
if (main_exe_file == INVALID_HANDLE_VALUE)
|
2000-05-29 23:25:10 +02:00
|
|
|
{
|
|
|
|
MESSAGE( "%s: cannot open '%s'\n", argv0, main_exe_name );
|
2002-05-22 23:32:49 +02:00
|
|
|
ExitProcess(1);
|
2000-05-29 23:25:10 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-05-22 23:32:49 +02:00
|
|
|
if (!main_exe_file) /* no file handle -> Winelib app */
|
2000-05-29 23:25:10 +02:00
|
|
|
{
|
2002-05-22 23:32:49 +02:00
|
|
|
TRACE( "starting Winelib app %s\n", debugstr_a(main_exe_name) );
|
2003-07-03 20:23:10 +02:00
|
|
|
if (open_builtin_exe_file( main_exe_name, error, sizeof(error), 0, &file_exists ))
|
2002-05-22 23:32:49 +02:00
|
|
|
goto found;
|
|
|
|
MESSAGE( "%s: cannot open builtin library for '%s': %s\n", argv0, main_exe_name, error );
|
|
|
|
ExitProcess(1);
|
2000-11-08 05:33:20 +01:00
|
|
|
}
|
2003-04-20 04:46:44 +02:00
|
|
|
VERSION_Init( main_exe_name );
|
2000-05-29 23:25:10 +02:00
|
|
|
|
2002-05-22 23:32:49 +02:00
|
|
|
switch( MODULE_GetBinaryType( main_exe_file ))
|
|
|
|
{
|
|
|
|
case BINARY_PE_EXE:
|
|
|
|
TRACE( "starting Win32 binary %s\n", debugstr_a(main_exe_name) );
|
|
|
|
if ((current_process.module = PE_LoadImage( main_exe_file, main_exe_name, 0 ))) goto found;
|
|
|
|
MESSAGE( "%s: could not load '%s' as Win32 binary\n", argv0, main_exe_name );
|
|
|
|
ExitProcess(1);
|
|
|
|
case BINARY_PE_DLL:
|
|
|
|
MESSAGE( "%s: '%s' is a DLL, not an executable\n", argv0, main_exe_name );
|
|
|
|
ExitProcess(1);
|
2002-07-22 22:35:11 +02:00
|
|
|
case BINARY_UNKNOWN:
|
|
|
|
/* check for .com extension */
|
|
|
|
if (!(p = strrchr( main_exe_name, '.' )) || FILE_strcasecmp( p, ".com" ))
|
|
|
|
{
|
|
|
|
MESSAGE( "%s: cannot determine executable type for '%s'\n", argv0, main_exe_name );
|
|
|
|
ExitProcess(1);
|
|
|
|
}
|
|
|
|
/* fall through */
|
2002-05-22 23:32:49 +02:00
|
|
|
case BINARY_WIN16:
|
|
|
|
case BINARY_DOS:
|
|
|
|
TRACE( "starting Win16/DOS binary %s\n", debugstr_a(main_exe_name) );
|
2003-04-27 02:47:58 +02:00
|
|
|
CloseHandle( main_exe_file );
|
2002-05-22 23:32:49 +02:00
|
|
|
main_exe_file = 0;
|
2003-04-27 02:47:58 +02:00
|
|
|
argv--;
|
|
|
|
argv[0] = "winevdm.exe";
|
2003-07-03 20:23:10 +02:00
|
|
|
if (open_builtin_exe_file( "winevdm.exe", error, sizeof(error), 0, &file_exists ))
|
2003-04-27 02:47:58 +02:00
|
|
|
goto found;
|
|
|
|
MESSAGE( "%s: trying to run '%s', cannot open builtin library for 'winevdm.exe': %s\n",
|
|
|
|
argv0, main_exe_name, error );
|
|
|
|
ExitProcess(1);
|
2002-05-22 23:32:49 +02:00
|
|
|
case BINARY_OS216:
|
|
|
|
MESSAGE( "%s: '%s' is an OS/2 binary, not supported\n", argv0, main_exe_name );
|
|
|
|
ExitProcess(1);
|
|
|
|
case BINARY_UNIX_EXE:
|
|
|
|
MESSAGE( "%s: '%s' is a Unix binary, not supported\n", argv0, main_exe_name );
|
|
|
|
ExitProcess(1);
|
|
|
|
case BINARY_UNIX_LIB:
|
|
|
|
{
|
|
|
|
DOS_FULL_NAME full_name;
|
|
|
|
const char *name = main_exe_name;
|
2002-08-27 03:13:58 +02:00
|
|
|
UNICODE_STRING nameW;
|
2002-05-22 23:32:49 +02:00
|
|
|
|
|
|
|
TRACE( "starting Winelib app %s\n", debugstr_a(main_exe_name) );
|
2002-08-27 03:13:58 +02:00
|
|
|
RtlCreateUnicodeStringFromAsciiz(&nameW, name);
|
|
|
|
if (DOSFS_GetFullName( nameW.Buffer, TRUE, &full_name )) name = full_name.long_name;
|
|
|
|
RtlFreeUnicodeString(&nameW);
|
2002-05-22 23:32:49 +02:00
|
|
|
CloseHandle( main_exe_file );
|
|
|
|
main_exe_file = 0;
|
2002-07-31 19:53:42 +02:00
|
|
|
if (wine_dlopen( name, RTLD_NOW, error, sizeof(error) ))
|
|
|
|
{
|
|
|
|
if ((p = strrchr( main_exe_name, '.' )) && !strcmp( p, ".so" )) *p = 0;
|
|
|
|
goto found;
|
|
|
|
}
|
2002-05-22 23:32:49 +02:00
|
|
|
MESSAGE( "%s: could not load '%s': %s\n", argv0, main_exe_name, error );
|
|
|
|
ExitProcess(1);
|
|
|
|
}
|
|
|
|
}
|
2000-11-10 02:38:28 +01:00
|
|
|
|
|
|
|
found:
|
2001-06-08 00:29:03 +02:00
|
|
|
/* build command line */
|
2003-06-18 05:23:22 +02:00
|
|
|
if (!build_command_line( argv )) goto error;
|
2001-06-08 00:29:03 +02:00
|
|
|
|
|
|
|
/* create 32-bit module for main exe */
|
|
|
|
if (!(current_process.module = BUILTIN32_LoadExeModule( current_process.module ))) goto error;
|
2002-08-09 21:57:38 +02:00
|
|
|
stack_size = RtlImageNtHeader(current_process.module)->OptionalHeader.SizeOfStackReserve;
|
2001-06-08 00:29:03 +02:00
|
|
|
|
2000-11-08 05:33:20 +01:00
|
|
|
/* allocate main thread stack */
|
2001-02-28 06:29:50 +01:00
|
|
|
if (!THREAD_InitStack( NtCurrentTeb(), stack_size )) goto error;
|
2000-11-08 05:33:20 +01:00
|
|
|
|
|
|
|
/* switch to the new stack */
|
2003-08-30 00:23:42 +02:00
|
|
|
wine_switch_to_stack( start_process, NULL, NtCurrentTeb()->Tib.StackBase );
|
2000-05-29 23:25:10 +02:00
|
|
|
|
2000-04-15 23:00:55 +02:00
|
|
|
error:
|
|
|
|
ExitProcess( GetLastError() );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-05-01 18:24:22 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* build_argv
|
|
|
|
*
|
|
|
|
* Build an argv array from a command-line.
|
|
|
|
* The command-line is modified to insert nulls.
|
2000-05-29 23:25:10 +02:00
|
|
|
* 'reserved' is the number of args to reserve before the first one.
|
2000-05-01 18:24:22 +02:00
|
|
|
*/
|
2000-05-29 23:25:10 +02:00
|
|
|
static char **build_argv( char *cmdline, int reserved )
|
2000-05-01 18:24:22 +02:00
|
|
|
{
|
2001-09-20 21:05:11 +02:00
|
|
|
int argc;
|
|
|
|
char** argv;
|
|
|
|
char *arg,*s,*d;
|
|
|
|
int in_quotes,bcount;
|
|
|
|
|
|
|
|
argc=reserved+1;
|
|
|
|
bcount=0;
|
|
|
|
in_quotes=0;
|
|
|
|
s=cmdline;
|
|
|
|
while (1) {
|
|
|
|
if (*s=='\0' || ((*s==' ' || *s=='\t') && !in_quotes)) {
|
|
|
|
/* space */
|
|
|
|
argc++;
|
|
|
|
/* skip the remaining spaces */
|
|
|
|
while (*s==' ' || *s=='\t') {
|
|
|
|
s++;
|
|
|
|
}
|
|
|
|
if (*s=='\0')
|
|
|
|
break;
|
|
|
|
bcount=0;
|
|
|
|
continue;
|
|
|
|
} else if (*s=='\\') {
|
|
|
|
/* '\', count them */
|
|
|
|
bcount++;
|
|
|
|
} else if ((*s=='"') && ((bcount & 1)==0)) {
|
|
|
|
/* unescaped '"' */
|
|
|
|
in_quotes=!in_quotes;
|
|
|
|
bcount=0;
|
|
|
|
} else {
|
|
|
|
/* a regular character */
|
|
|
|
bcount=0;
|
2000-05-29 23:25:10 +02:00
|
|
|
}
|
2001-09-20 21:05:11 +02:00
|
|
|
s++;
|
2000-05-29 23:25:10 +02:00
|
|
|
}
|
2001-09-20 21:05:11 +02:00
|
|
|
argv=malloc(argc*sizeof(*argv));
|
|
|
|
if (!argv)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
arg=d=s=cmdline;
|
|
|
|
bcount=0;
|
|
|
|
in_quotes=0;
|
|
|
|
argc=reserved;
|
|
|
|
while (*s) {
|
|
|
|
if ((*s==' ' || *s=='\t') && !in_quotes) {
|
|
|
|
/* Close the argument and copy it */
|
|
|
|
*d=0;
|
|
|
|
argv[argc++]=arg;
|
|
|
|
|
|
|
|
/* skip the remaining spaces */
|
|
|
|
do {
|
|
|
|
s++;
|
|
|
|
} while (*s==' ' || *s=='\t');
|
|
|
|
|
|
|
|
/* Start with a new argument */
|
|
|
|
arg=d=s;
|
|
|
|
bcount=0;
|
|
|
|
} else if (*s=='\\') {
|
|
|
|
/* '\\' */
|
|
|
|
*d++=*s++;
|
|
|
|
bcount++;
|
|
|
|
} else if (*s=='"') {
|
|
|
|
/* '"' */
|
|
|
|
if ((bcount & 1)==0) {
|
2002-06-01 01:06:46 +02:00
|
|
|
/* Preceeded by an even number of '\', this is half that
|
2001-09-20 21:05:11 +02:00
|
|
|
* number of '\', plus a '"' which we discard.
|
|
|
|
*/
|
|
|
|
d-=bcount/2;
|
|
|
|
s++;
|
|
|
|
in_quotes=!in_quotes;
|
|
|
|
} else {
|
2002-06-01 01:06:46 +02:00
|
|
|
/* Preceeded by an odd number of '\', this is half that
|
2001-09-20 21:05:11 +02:00
|
|
|
* number of '\' followed by a '"'
|
|
|
|
*/
|
|
|
|
d=d-bcount/2-1;
|
|
|
|
*d++='"';
|
|
|
|
s++;
|
2000-05-29 23:25:10 +02:00
|
|
|
}
|
2001-09-20 21:05:11 +02:00
|
|
|
bcount=0;
|
|
|
|
} else {
|
|
|
|
/* a regular character */
|
|
|
|
*d++=*s++;
|
|
|
|
bcount=0;
|
2000-05-29 23:25:10 +02:00
|
|
|
}
|
2000-05-01 18:24:22 +02:00
|
|
|
}
|
2001-09-20 21:05:11 +02:00
|
|
|
if (*arg) {
|
|
|
|
*d='\0';
|
|
|
|
argv[argc++]=arg;
|
|
|
|
}
|
|
|
|
argv[argc]=NULL;
|
|
|
|
|
2000-05-01 18:24:22 +02:00
|
|
|
return argv;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* build_envp
|
|
|
|
*
|
|
|
|
* Build the environment of a new child process.
|
|
|
|
*/
|
2000-10-03 06:19:16 +02:00
|
|
|
static char **build_envp( const char *env, const char *extra_env )
|
2000-05-01 18:24:22 +02:00
|
|
|
{
|
|
|
|
const char *p;
|
|
|
|
char **envp;
|
2000-10-03 06:19:16 +02:00
|
|
|
int count = 0;
|
2000-05-01 18:24:22 +02:00
|
|
|
|
2000-10-03 06:19:16 +02:00
|
|
|
if (extra_env) for (p = extra_env; *p; count++) p += strlen(p) + 1;
|
|
|
|
for (p = env; *p; count++) p += strlen(p) + 1;
|
2000-05-01 18:24:22 +02:00
|
|
|
count += 3;
|
2000-10-03 06:19:16 +02:00
|
|
|
|
2000-05-01 18:24:22 +02:00
|
|
|
if ((envp = malloc( count * sizeof(*envp) )))
|
|
|
|
{
|
|
|
|
extern char **environ;
|
|
|
|
char **envptr = envp;
|
|
|
|
char **unixptr = environ;
|
2000-10-03 06:19:16 +02:00
|
|
|
/* first the extra strings */
|
|
|
|
if (extra_env) for (p = extra_env; *p; p += strlen(p) + 1) *envptr++ = (char *)p;
|
|
|
|
/* then put PATH, HOME and WINEPREFIX from the unix env */
|
2000-05-01 18:24:22 +02:00
|
|
|
for (unixptr = environ; unixptr && *unixptr; unixptr++)
|
|
|
|
if (!memcmp( *unixptr, "PATH=", 5 ) ||
|
|
|
|
!memcmp( *unixptr, "HOME=", 5 ) ||
|
|
|
|
!memcmp( *unixptr, "WINEPREFIX=", 11 )) *envptr++ = *unixptr;
|
|
|
|
/* now put the Windows environment strings */
|
|
|
|
for (p = env; *p; p += strlen(p) + 1)
|
|
|
|
{
|
2002-10-09 20:35:01 +02:00
|
|
|
if (!memcmp( p, "PATH=", 5 )) /* store PATH as WINEPATH */
|
|
|
|
{
|
|
|
|
char *winepath = malloc( strlen(p) + 5 );
|
|
|
|
strcpy( winepath, "WINE" );
|
|
|
|
strcpy( winepath + 4, p );
|
|
|
|
*envptr++ = winepath;
|
|
|
|
}
|
|
|
|
else if (memcmp( p, "HOME=", 5 ) &&
|
|
|
|
memcmp( p, "WINEPATH=", 9 ) &&
|
|
|
|
memcmp( p, "WINEPREFIX=", 11 )) *envptr++ = (char *)p;
|
2000-05-01 18:24:22 +02:00
|
|
|
}
|
|
|
|
*envptr = 0;
|
|
|
|
}
|
|
|
|
return envp;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2000-09-03 01:18:16 +02:00
|
|
|
* exec_wine_binary
|
2000-05-01 18:24:22 +02:00
|
|
|
*
|
|
|
|
* Locate the Wine binary to exec for a new Win32 process.
|
|
|
|
*/
|
|
|
|
static void exec_wine_binary( char **argv, char **envp )
|
|
|
|
{
|
|
|
|
const char *path, *pos, *ptr;
|
|
|
|
|
2000-10-25 22:28:22 +02:00
|
|
|
/* first, try for a WINELOADER environment variable */
|
|
|
|
argv[0] = getenv("WINELOADER");
|
|
|
|
if (argv[0])
|
|
|
|
execve( argv[0], argv, envp );
|
|
|
|
|
|
|
|
/* next, try bin directory */
|
2000-05-01 18:24:22 +02:00
|
|
|
argv[0] = BINDIR "/wine";
|
|
|
|
execve( argv[0], argv, envp );
|
|
|
|
|
|
|
|
/* now try the path of argv0 of the current binary */
|
2000-07-16 20:21:34 +02:00
|
|
|
if (!(argv[0] = malloc( strlen(full_argv0) + 6 ))) return;
|
|
|
|
if ((ptr = strrchr( full_argv0, '/' )))
|
2000-05-01 18:24:22 +02:00
|
|
|
{
|
2000-07-16 20:21:34 +02:00
|
|
|
memcpy( argv[0], full_argv0, ptr - full_argv0 );
|
|
|
|
strcpy( argv[0] + (ptr - full_argv0), "/wine" );
|
2000-05-01 18:24:22 +02:00
|
|
|
execve( argv[0], argv, envp );
|
|
|
|
}
|
|
|
|
free( argv[0] );
|
|
|
|
|
|
|
|
/* now search in the Unix path */
|
|
|
|
if ((path = getenv( "PATH" )))
|
|
|
|
{
|
|
|
|
if (!(argv[0] = malloc( strlen(path) + 6 ))) return;
|
|
|
|
pos = path;
|
|
|
|
for (;;)
|
|
|
|
{
|
|
|
|
while (*pos == ':') pos++;
|
|
|
|
if (!*pos) break;
|
|
|
|
if (!(ptr = strchr( pos, ':' ))) ptr = pos + strlen(pos);
|
|
|
|
memcpy( argv[0], pos, ptr - pos );
|
|
|
|
strcpy( argv[0] + (ptr - pos), "/wine" );
|
|
|
|
execve( argv[0], argv, envp );
|
|
|
|
pos = ptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
free( argv[0] );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* fork_and_exec
|
|
|
|
*
|
2003-02-24 21:51:50 +01:00
|
|
|
* Fork and exec a new Unix binary, checking for errors.
|
2000-05-01 18:24:22 +02:00
|
|
|
*/
|
2000-07-16 17:42:22 +02:00
|
|
|
static int fork_and_exec( const char *filename, char *cmdline,
|
|
|
|
const char *env, const char *newdir )
|
2000-05-01 18:24:22 +02:00
|
|
|
{
|
|
|
|
int fd[2];
|
|
|
|
int pid, err;
|
2000-10-03 06:19:16 +02:00
|
|
|
|
2003-02-24 21:51:50 +01:00
|
|
|
if (!env) env = GetEnvironmentStringsA();
|
2000-05-01 18:24:22 +02:00
|
|
|
|
|
|
|
if (pipe(fd) == -1)
|
|
|
|
{
|
|
|
|
FILE_SetDosError();
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
fcntl( fd[1], F_SETFD, 1 ); /* set close on exec */
|
|
|
|
if (!(pid = fork())) /* child */
|
|
|
|
{
|
2003-02-24 21:51:50 +01:00
|
|
|
char **argv = build_argv( cmdline, 0 );
|
|
|
|
char **envp = build_envp( env, NULL );
|
2000-05-01 18:24:22 +02:00
|
|
|
close( fd[0] );
|
2000-07-16 17:42:22 +02:00
|
|
|
|
2002-06-13 23:57:38 +02:00
|
|
|
/* Reset signals that we previously set to SIG_IGN */
|
|
|
|
signal( SIGPIPE, SIG_DFL );
|
|
|
|
signal( SIGCHLD, SIG_DFL );
|
|
|
|
|
2000-10-03 06:19:16 +02:00
|
|
|
if (newdir) chdir(newdir);
|
2000-07-16 17:42:22 +02:00
|
|
|
|
2003-02-24 21:51:50 +01:00
|
|
|
if (argv && envp) execve( filename, argv, envp );
|
2000-05-01 18:24:22 +02:00
|
|
|
err = errno;
|
|
|
|
write( fd[1], &err, sizeof(err) );
|
|
|
|
_exit(1);
|
|
|
|
}
|
|
|
|
close( fd[1] );
|
|
|
|
if ((pid != -1) && (read( fd[0], &err, sizeof(err) ) > 0)) /* exec failed */
|
|
|
|
{
|
|
|
|
errno = err;
|
|
|
|
pid = -1;
|
|
|
|
}
|
|
|
|
if (pid == -1) FILE_SetDosError();
|
|
|
|
close( fd[0] );
|
|
|
|
return pid;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2002-05-22 23:32:49 +02:00
|
|
|
* create_process
|
2000-05-29 23:25:10 +02:00
|
|
|
*
|
|
|
|
* Create a new process. If hFile is a valid handle we have an exe
|
2002-05-22 23:32:49 +02:00
|
|
|
* file, otherwise it is a Winelib app.
|
2000-05-01 18:24:22 +02:00
|
|
|
*/
|
2002-05-22 23:32:49 +02:00
|
|
|
static BOOL create_process( HANDLE hFile, LPCSTR filename, LPSTR cmd_line, LPCSTR env,
|
|
|
|
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
|
|
|
BOOL inherit, DWORD flags, LPSTARTUPINFOA startup,
|
|
|
|
LPPROCESS_INFORMATION info, LPCSTR unixdir )
|
2000-05-01 18:24:22 +02:00
|
|
|
{
|
2002-05-24 23:20:27 +02:00
|
|
|
BOOL ret, success = FALSE;
|
2001-01-26 01:22:26 +01:00
|
|
|
HANDLE process_info;
|
2002-03-29 19:28:56 +01:00
|
|
|
startup_info_t startup_info;
|
2003-02-24 21:51:50 +01:00
|
|
|
char *extra_env = NULL;
|
|
|
|
int startfd[2];
|
|
|
|
int execfd[2];
|
|
|
|
pid_t pid;
|
|
|
|
int err;
|
2003-06-18 05:23:22 +02:00
|
|
|
char dummy = 0;
|
2003-02-24 21:51:50 +01:00
|
|
|
|
|
|
|
if (!env)
|
|
|
|
{
|
|
|
|
env = GetEnvironmentStringsA();
|
|
|
|
extra_env = DRIVE_BuildEnv();
|
|
|
|
}
|
|
|
|
|
|
|
|
/* create the synchronization pipes */
|
|
|
|
|
|
|
|
if (pipe( startfd ) == -1)
|
|
|
|
{
|
|
|
|
FILE_SetDosError();
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
if (pipe( execfd ) == -1)
|
|
|
|
{
|
|
|
|
close( startfd[0] );
|
|
|
|
close( startfd[1] );
|
|
|
|
FILE_SetDosError();
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
fcntl( execfd[1], F_SETFD, 1 ); /* set close on exec */
|
|
|
|
|
|
|
|
/* create the child process */
|
|
|
|
|
|
|
|
if (!(pid = fork())) /* child */
|
|
|
|
{
|
|
|
|
char **argv = build_argv( cmd_line, 1 );
|
|
|
|
char **envp = build_envp( env, extra_env );
|
|
|
|
|
|
|
|
close( startfd[1] );
|
|
|
|
close( execfd[0] );
|
|
|
|
|
|
|
|
/* wait for parent to tell us to start */
|
|
|
|
if (read( startfd[0], &dummy, 1 ) != 1) _exit(1);
|
|
|
|
|
|
|
|
close( startfd[0] );
|
|
|
|
/* Reset signals that we previously set to SIG_IGN */
|
|
|
|
signal( SIGPIPE, SIG_DFL );
|
|
|
|
signal( SIGCHLD, SIG_DFL );
|
|
|
|
|
|
|
|
if (unixdir) chdir(unixdir);
|
|
|
|
|
|
|
|
if (argv && envp) exec_wine_binary( argv, envp );
|
|
|
|
|
|
|
|
err = errno;
|
|
|
|
write( execfd[1], &err, sizeof(err) );
|
|
|
|
_exit(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* this is the parent */
|
|
|
|
|
|
|
|
close( startfd[0] );
|
|
|
|
close( execfd[1] );
|
|
|
|
if (extra_env) HeapFree( GetProcessHeap(), 0, extra_env );
|
|
|
|
if (pid == -1)
|
|
|
|
{
|
|
|
|
close( startfd[1] );
|
|
|
|
close( execfd[0] );
|
|
|
|
FILE_SetDosError();
|
|
|
|
return FALSE;
|
|
|
|
}
|
2000-05-01 18:24:22 +02:00
|
|
|
|
2002-03-29 19:28:56 +01:00
|
|
|
/* fill the startup info structure */
|
|
|
|
|
|
|
|
startup_info.size = sizeof(startup_info);
|
|
|
|
/* startup_info.filename_len is set below */
|
|
|
|
startup_info.cmdline_len = cmd_line ? strlen(cmd_line) : 0;
|
|
|
|
startup_info.desktop_len = startup->lpDesktop ? strlen(startup->lpDesktop) : 0;
|
|
|
|
startup_info.title_len = startup->lpTitle ? strlen(startup->lpTitle) : 0;
|
|
|
|
startup_info.x = startup->dwX;
|
|
|
|
startup_info.y = startup->dwY;
|
|
|
|
startup_info.cx = startup->dwXSize;
|
|
|
|
startup_info.cy = startup->dwYSize;
|
|
|
|
startup_info.x_chars = startup->dwXCountChars;
|
|
|
|
startup_info.y_chars = startup->dwYCountChars;
|
|
|
|
startup_info.attribute = startup->dwFillAttribute;
|
|
|
|
startup_info.cmd_show = startup->wShowWindow;
|
|
|
|
startup_info.flags = startup->dwFlags;
|
|
|
|
|
2000-08-31 03:59:51 +02:00
|
|
|
/* create the process on the server side */
|
2000-07-16 17:42:22 +02:00
|
|
|
|
2001-11-30 19:46:42 +01:00
|
|
|
SERVER_START_REQ( new_process )
|
2000-06-02 00:48:39 +02:00
|
|
|
{
|
2001-11-30 19:46:42 +01:00
|
|
|
char buf[MAX_PATH];
|
2002-03-29 19:28:56 +01:00
|
|
|
LPCSTR nameptr;
|
2001-11-30 19:46:42 +01:00
|
|
|
|
2000-08-31 03:59:51 +02:00
|
|
|
req->inherit_all = inherit;
|
|
|
|
req->create_flags = flags;
|
2003-02-24 21:51:50 +01:00
|
|
|
req->unix_pid = pid;
|
2000-08-31 03:59:51 +02:00
|
|
|
req->exe_file = hFile;
|
|
|
|
if (startup->dwFlags & STARTF_USESTDHANDLES)
|
|
|
|
{
|
|
|
|
req->hstdin = startup->hStdInput;
|
|
|
|
req->hstdout = startup->hStdOutput;
|
|
|
|
req->hstderr = startup->hStdError;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
req->hstdin = GetStdHandle( STD_INPUT_HANDLE );
|
|
|
|
req->hstdout = GetStdHandle( STD_OUTPUT_HANDLE );
|
|
|
|
req->hstderr = GetStdHandle( STD_ERROR_HANDLE );
|
|
|
|
}
|
|
|
|
|
2003-06-21 04:07:10 +02:00
|
|
|
if ((flags & (CREATE_NEW_CONSOLE | DETACHED_PROCESS)) != 0)
|
|
|
|
{
|
|
|
|
/* this is temporary (for console handles). We have no way to control that the handle is invalid in child process otherwise */
|
|
|
|
if (is_console_handle(req->hstdin)) req->hstdin = INVALID_HANDLE_VALUE;
|
|
|
|
if (is_console_handle(req->hstdout)) req->hstdout = INVALID_HANDLE_VALUE;
|
|
|
|
if (is_console_handle(req->hstderr)) req->hstderr = INVALID_HANDLE_VALUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (is_console_handle(req->hstdin)) req->hstdin = console_handle_unmap(req->hstdin);
|
|
|
|
if (is_console_handle(req->hstdout)) req->hstdout = console_handle_unmap(req->hstdout);
|
|
|
|
if (is_console_handle(req->hstderr)) req->hstderr = console_handle_unmap(req->hstderr);
|
|
|
|
}
|
|
|
|
|
2002-05-22 23:32:49 +02:00
|
|
|
if (GetLongPathNameA( filename, buf, MAX_PATH ))
|
|
|
|
nameptr = buf;
|
|
|
|
else
|
|
|
|
nameptr = filename;
|
|
|
|
|
2002-03-29 19:28:56 +01:00
|
|
|
startup_info.filename_len = strlen(nameptr);
|
|
|
|
wine_server_add_data( req, &startup_info, sizeof(startup_info) );
|
|
|
|
wine_server_add_data( req, nameptr, startup_info.filename_len );
|
|
|
|
wine_server_add_data( req, cmd_line, startup_info.cmdline_len );
|
|
|
|
wine_server_add_data( req, startup->lpDesktop, startup_info.desktop_len );
|
|
|
|
wine_server_add_data( req, startup->lpTitle, startup_info.title_len );
|
|
|
|
|
2001-11-30 19:46:42 +01:00
|
|
|
ret = !wine_server_call_err( req );
|
|
|
|
process_info = reply->info;
|
2000-06-02 00:48:39 +02:00
|
|
|
}
|
2001-11-30 19:46:42 +01:00
|
|
|
SERVER_END_REQ;
|
2000-05-01 18:24:22 +02:00
|
|
|
|
2003-02-24 21:51:50 +01:00
|
|
|
if (!ret)
|
|
|
|
{
|
|
|
|
close( startfd[1] );
|
|
|
|
close( execfd[0] );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* tell child to start and wait for it to exec */
|
2000-05-01 18:24:22 +02:00
|
|
|
|
2003-02-24 21:51:50 +01:00
|
|
|
write( startfd[1], &dummy, 1 );
|
|
|
|
close( startfd[1] );
|
|
|
|
|
|
|
|
if (read( execfd[0], &err, sizeof(err) ) > 0) /* exec failed */
|
2001-11-06 23:27:41 +01:00
|
|
|
{
|
2003-02-24 21:51:50 +01:00
|
|
|
errno = err;
|
|
|
|
FILE_SetDosError();
|
|
|
|
close( execfd[0] );
|
2001-11-06 23:27:41 +01:00
|
|
|
CloseHandle( process_info );
|
|
|
|
return FALSE;
|
|
|
|
}
|
2000-05-01 18:24:22 +02:00
|
|
|
|
2001-01-26 01:22:26 +01:00
|
|
|
/* wait for the new process info to be ready */
|
|
|
|
|
2002-05-24 23:20:27 +02:00
|
|
|
WaitForSingleObject( process_info, INFINITE );
|
|
|
|
SERVER_START_REQ( get_new_process_info )
|
2000-08-30 02:00:48 +02:00
|
|
|
{
|
2002-05-24 23:20:27 +02:00
|
|
|
req->info = process_info;
|
|
|
|
req->pinherit = (psa && (psa->nLength >= sizeof(*psa)) && psa->bInheritHandle);
|
|
|
|
req->tinherit = (tsa && (tsa->nLength >= sizeof(*tsa)) && tsa->bInheritHandle);
|
|
|
|
if ((ret = !wine_server_call_err( req )))
|
2000-08-30 02:00:48 +02:00
|
|
|
{
|
2002-05-24 23:20:27 +02:00
|
|
|
info->dwProcessId = (DWORD)reply->pid;
|
|
|
|
info->dwThreadId = (DWORD)reply->tid;
|
|
|
|
info->hProcess = reply->phandle;
|
|
|
|
info->hThread = reply->thandle;
|
|
|
|
success = reply->success;
|
2000-08-30 02:00:48 +02:00
|
|
|
}
|
|
|
|
}
|
2002-05-24 23:20:27 +02:00
|
|
|
SERVER_END_REQ;
|
2000-05-01 18:24:22 +02:00
|
|
|
|
2002-05-24 23:20:27 +02:00
|
|
|
if (ret && !success) /* new process failed to start */
|
2000-05-01 18:24:22 +02:00
|
|
|
{
|
2002-05-24 23:20:27 +02:00
|
|
|
DWORD exitcode;
|
|
|
|
if (GetExitCodeProcess( info->hProcess, &exitcode )) SetLastError( exitcode );
|
|
|
|
CloseHandle( info->hThread );
|
|
|
|
CloseHandle( info->hProcess );
|
|
|
|
ret = FALSE;
|
2000-05-01 18:24:22 +02:00
|
|
|
}
|
2002-05-24 23:20:27 +02:00
|
|
|
CloseHandle( process_info );
|
|
|
|
return ret;
|
2000-05-01 18:24:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-04-27 02:47:58 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* create_vdm_process
|
|
|
|
*
|
|
|
|
* Create a new VDM process for a 16-bit or DOS application.
|
|
|
|
*/
|
|
|
|
static BOOL create_vdm_process( LPCSTR filename, LPSTR cmd_line, LPCSTR env,
|
|
|
|
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
|
|
|
BOOL inherit, DWORD flags, LPSTARTUPINFOA startup,
|
|
|
|
LPPROCESS_INFORMATION info, LPCSTR unixdir )
|
|
|
|
{
|
|
|
|
BOOL ret;
|
|
|
|
LPSTR new_cmd_line = HeapAlloc( GetProcessHeap(), 0, strlen(filename) + strlen(cmd_line) + 30 );
|
|
|
|
|
|
|
|
if (!new_cmd_line)
|
|
|
|
{
|
|
|
|
SetLastError( ERROR_OUTOFMEMORY );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
sprintf( new_cmd_line, "winevdm.exe --app-name \"%s\" %s", filename, cmd_line );
|
|
|
|
ret = create_process( 0, "winevdm.exe", new_cmd_line, env, psa, tsa, inherit,
|
|
|
|
flags, startup, info, unixdir );
|
|
|
|
HeapFree( GetProcessHeap(), 0, new_cmd_line );
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-05-22 23:32:49 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* get_file_name
|
|
|
|
*
|
|
|
|
* Helper for CreateProcess: retrieve the file name to load from the
|
|
|
|
* app name and command line. Store the file name in buffer, and
|
|
|
|
* return a possibly modified command line.
|
|
|
|
* Also returns a handle to the opened file if it's a Windows binary.
|
|
|
|
*/
|
|
|
|
static LPSTR get_file_name( LPCSTR appname, LPSTR cmdline, LPSTR buffer,
|
|
|
|
int buflen, HANDLE *handle )
|
|
|
|
{
|
|
|
|
char *name, *pos, *ret = NULL;
|
|
|
|
const char *p;
|
|
|
|
|
|
|
|
/* if we have an app name, everything is easy */
|
|
|
|
|
|
|
|
if (appname)
|
|
|
|
{
|
|
|
|
/* use the unmodified app name as file name */
|
|
|
|
lstrcpynA( buffer, appname, buflen );
|
|
|
|
*handle = open_exe_file( buffer );
|
2002-10-17 20:24:36 +02:00
|
|
|
if (!(ret = cmdline) || !cmdline[0])
|
2002-05-22 23:32:49 +02:00
|
|
|
{
|
|
|
|
/* no command-line, create one */
|
|
|
|
if ((ret = HeapAlloc( GetProcessHeap(), 0, strlen(appname) + 3 )))
|
|
|
|
sprintf( ret, "\"%s\"", appname );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!cmdline)
|
|
|
|
{
|
|
|
|
SetLastError( ERROR_INVALID_PARAMETER );
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* first check for a quoted file name */
|
|
|
|
|
|
|
|
if ((cmdline[0] == '"') && ((p = strchr( cmdline + 1, '"' ))))
|
|
|
|
{
|
|
|
|
int len = p - cmdline - 1;
|
|
|
|
/* extract the quoted portion as file name */
|
|
|
|
if (!(name = HeapAlloc( GetProcessHeap(), 0, len + 1 ))) return NULL;
|
|
|
|
memcpy( name, cmdline + 1, len );
|
|
|
|
name[len] = 0;
|
|
|
|
|
|
|
|
if (find_exe_file( name, buffer, buflen, handle ))
|
|
|
|
ret = cmdline; /* no change necessary */
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* now try the command-line word by word */
|
|
|
|
|
|
|
|
if (!(name = HeapAlloc( GetProcessHeap(), 0, strlen(cmdline) + 1 ))) return NULL;
|
|
|
|
pos = name;
|
|
|
|
p = cmdline;
|
|
|
|
|
|
|
|
while (*p)
|
|
|
|
{
|
|
|
|
do *pos++ = *p++; while (*p && *p != ' ');
|
|
|
|
*pos = 0;
|
|
|
|
if (find_exe_file( name, buffer, buflen, handle ))
|
|
|
|
{
|
|
|
|
ret = cmdline;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!ret || !strchr( name, ' ' )) goto done; /* no change necessary */
|
|
|
|
|
|
|
|
/* now build a new command-line with quotes */
|
|
|
|
|
|
|
|
if (!(ret = HeapAlloc( GetProcessHeap(), 0, strlen(cmdline) + 3 ))) goto done;
|
|
|
|
sprintf( ret, "\"%s\"%s", name, p );
|
|
|
|
|
|
|
|
done:
|
|
|
|
HeapFree( GetProcessHeap(), 0, name );
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* CreateProcessA (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI CreateProcessA( LPCSTR app_name, LPSTR cmd_line, LPSECURITY_ATTRIBUTES process_attr,
|
|
|
|
LPSECURITY_ATTRIBUTES thread_attr, BOOL inherit,
|
|
|
|
DWORD flags, LPVOID env, LPCSTR cur_dir,
|
|
|
|
LPSTARTUPINFOA startup_info, LPPROCESS_INFORMATION info )
|
|
|
|
{
|
|
|
|
BOOL retv = FALSE;
|
|
|
|
HANDLE hFile = 0;
|
|
|
|
const char *unixdir = NULL;
|
|
|
|
DOS_FULL_NAME full_dir;
|
|
|
|
char name[MAX_PATH];
|
|
|
|
LPSTR tidy_cmdline;
|
2002-07-23 23:02:31 +02:00
|
|
|
char *p;
|
2002-05-22 23:32:49 +02:00
|
|
|
|
|
|
|
/* Process the AppName and/or CmdLine to get module name and path */
|
|
|
|
|
|
|
|
TRACE("app %s cmdline %s\n", debugstr_a(app_name), debugstr_a(cmd_line) );
|
|
|
|
|
|
|
|
if (!(tidy_cmdline = get_file_name( app_name, cmd_line, name, sizeof(name), &hFile )))
|
|
|
|
return FALSE;
|
|
|
|
if (hFile == INVALID_HANDLE_VALUE) goto done;
|
|
|
|
|
|
|
|
/* Warn if unsupported features are used */
|
|
|
|
|
|
|
|
if (flags & NORMAL_PRIORITY_CLASS)
|
|
|
|
FIXME("(%s,...): NORMAL_PRIORITY_CLASS ignored\n", name);
|
|
|
|
if (flags & IDLE_PRIORITY_CLASS)
|
|
|
|
FIXME("(%s,...): IDLE_PRIORITY_CLASS ignored\n", name);
|
|
|
|
if (flags & HIGH_PRIORITY_CLASS)
|
|
|
|
FIXME("(%s,...): HIGH_PRIORITY_CLASS ignored\n", name);
|
|
|
|
if (flags & REALTIME_PRIORITY_CLASS)
|
|
|
|
FIXME("(%s,...): REALTIME_PRIORITY_CLASS ignored\n", name);
|
|
|
|
if (flags & CREATE_NEW_PROCESS_GROUP)
|
|
|
|
FIXME("(%s,...): CREATE_NEW_PROCESS_GROUP ignored\n", name);
|
|
|
|
if (flags & CREATE_UNICODE_ENVIRONMENT)
|
|
|
|
FIXME("(%s,...): CREATE_UNICODE_ENVIRONMENT ignored\n", name);
|
|
|
|
if (flags & CREATE_SEPARATE_WOW_VDM)
|
|
|
|
FIXME("(%s,...): CREATE_SEPARATE_WOW_VDM ignored\n", name);
|
|
|
|
if (flags & CREATE_SHARED_WOW_VDM)
|
|
|
|
FIXME("(%s,...): CREATE_SHARED_WOW_VDM ignored\n", name);
|
|
|
|
if (flags & CREATE_DEFAULT_ERROR_MODE)
|
|
|
|
FIXME("(%s,...): CREATE_DEFAULT_ERROR_MODE ignored\n", name);
|
|
|
|
if (flags & CREATE_NO_WINDOW)
|
|
|
|
FIXME("(%s,...): CREATE_NO_WINDOW ignored\n", name);
|
|
|
|
if (flags & PROFILE_USER)
|
|
|
|
FIXME("(%s,...): PROFILE_USER ignored\n", name);
|
|
|
|
if (flags & PROFILE_KERNEL)
|
|
|
|
FIXME("(%s,...): PROFILE_KERNEL ignored\n", name);
|
|
|
|
if (flags & PROFILE_SERVER)
|
|
|
|
FIXME("(%s,...): PROFILE_SERVER ignored\n", name);
|
|
|
|
if (startup_info->lpDesktop)
|
|
|
|
FIXME("(%s,...): startup_info->lpDesktop %s ignored\n",
|
|
|
|
name, debugstr_a(startup_info->lpDesktop));
|
|
|
|
if (startup_info->dwFlags & STARTF_RUNFULLSCREEN)
|
|
|
|
FIXME("(%s,...): STARTF_RUNFULLSCREEN ignored\n", name);
|
|
|
|
if (startup_info->dwFlags & STARTF_FORCEONFEEDBACK)
|
|
|
|
FIXME("(%s,...): STARTF_FORCEONFEEDBACK ignored\n", name);
|
|
|
|
if (startup_info->dwFlags & STARTF_FORCEOFFFEEDBACK)
|
|
|
|
FIXME("(%s,...): STARTF_FORCEOFFFEEDBACK ignored\n", name);
|
|
|
|
if (startup_info->dwFlags & STARTF_USEHOTKEY)
|
|
|
|
FIXME("(%s,...): STARTF_USEHOTKEY ignored\n", name);
|
|
|
|
|
|
|
|
if (cur_dir)
|
|
|
|
{
|
2002-08-27 03:13:58 +02:00
|
|
|
UNICODE_STRING cur_dirW;
|
|
|
|
RtlCreateUnicodeStringFromAsciiz(&cur_dirW, cur_dir);
|
|
|
|
if (DOSFS_GetFullName( cur_dirW.Buffer, TRUE, &full_dir ))
|
2002-05-22 23:32:49 +02:00
|
|
|
unixdir = full_dir.long_name;
|
2002-08-27 03:13:58 +02:00
|
|
|
RtlFreeUnicodeString(&cur_dirW);
|
2002-05-22 23:32:49 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2002-08-27 03:13:58 +02:00
|
|
|
WCHAR buf[MAX_PATH];
|
|
|
|
if (GetCurrentDirectoryW(MAX_PATH, buf))
|
2002-05-22 23:32:49 +02:00
|
|
|
{
|
|
|
|
if (DOSFS_GetFullName( buf, TRUE, &full_dir )) unixdir = full_dir.long_name;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
info->hThread = info->hProcess = 0;
|
|
|
|
info->dwProcessId = info->dwThreadId = 0;
|
|
|
|
|
|
|
|
/* Determine executable type */
|
|
|
|
|
|
|
|
if (!hFile) /* builtin exe */
|
|
|
|
{
|
|
|
|
TRACE( "starting %s as Winelib app\n", debugstr_a(name) );
|
|
|
|
retv = create_process( 0, name, tidy_cmdline, env, process_attr, thread_attr,
|
|
|
|
inherit, flags, startup_info, info, unixdir );
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
switch( MODULE_GetBinaryType( hFile ))
|
|
|
|
{
|
|
|
|
case BINARY_PE_EXE:
|
2003-04-27 02:47:58 +02:00
|
|
|
TRACE( "starting %s as Win32 binary\n", debugstr_a(name) );
|
2002-05-22 23:32:49 +02:00
|
|
|
retv = create_process( hFile, name, tidy_cmdline, env, process_attr, thread_attr,
|
|
|
|
inherit, flags, startup_info, info, unixdir );
|
|
|
|
break;
|
2003-04-27 02:47:58 +02:00
|
|
|
case BINARY_WIN16:
|
|
|
|
case BINARY_DOS:
|
|
|
|
TRACE( "starting %s as Win16/DOS binary\n", debugstr_a(name) );
|
|
|
|
retv = create_vdm_process( name, tidy_cmdline, env, process_attr, thread_attr,
|
|
|
|
inherit, flags, startup_info, info, unixdir );
|
|
|
|
break;
|
2002-05-22 23:32:49 +02:00
|
|
|
case BINARY_OS216:
|
|
|
|
FIXME( "%s is OS/2 binary, not supported\n", debugstr_a(name) );
|
|
|
|
SetLastError( ERROR_BAD_EXE_FORMAT );
|
|
|
|
break;
|
|
|
|
case BINARY_PE_DLL:
|
|
|
|
TRACE( "not starting %s since it is a dll\n", debugstr_a(name) );
|
|
|
|
SetLastError( ERROR_BAD_EXE_FORMAT );
|
|
|
|
break;
|
|
|
|
case BINARY_UNIX_LIB:
|
|
|
|
TRACE( "%s is a Unix library, starting as Winelib app\n", debugstr_a(name) );
|
|
|
|
retv = create_process( hFile, name, tidy_cmdline, env, process_attr, thread_attr,
|
|
|
|
inherit, flags, startup_info, info, unixdir );
|
|
|
|
break;
|
|
|
|
case BINARY_UNKNOWN:
|
2002-12-04 00:28:15 +01:00
|
|
|
/* check for .com or .bat extension */
|
|
|
|
if ((p = strrchr( name, '.' )))
|
2002-07-23 23:02:31 +02:00
|
|
|
{
|
2002-12-04 00:28:15 +01:00
|
|
|
if (!FILE_strcasecmp( p, ".com" ))
|
|
|
|
{
|
|
|
|
TRACE( "starting %s as DOS binary\n", debugstr_a(name) );
|
2003-04-27 02:47:58 +02:00
|
|
|
retv = create_vdm_process( name, tidy_cmdline, env, process_attr, thread_attr,
|
|
|
|
inherit, flags, startup_info, info, unixdir );
|
2002-12-04 00:28:15 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (!FILE_strcasecmp( p, ".bat" ))
|
|
|
|
{
|
|
|
|
char comspec[MAX_PATH];
|
|
|
|
if (GetEnvironmentVariableA("COMSPEC", comspec, sizeof(comspec)))
|
|
|
|
{
|
2003-05-20 01:16:12 +02:00
|
|
|
char *newcmdline;
|
2002-12-04 00:28:15 +01:00
|
|
|
if ((newcmdline = HeapAlloc( GetProcessHeap(), 0,
|
2003-05-20 01:16:12 +02:00
|
|
|
strlen(comspec) + 4 + strlen(tidy_cmdline) + 1)))
|
2002-12-04 00:28:15 +01:00
|
|
|
{
|
2003-05-20 01:16:12 +02:00
|
|
|
sprintf( newcmdline, "%s /c %s", comspec, tidy_cmdline);
|
2002-12-04 00:28:15 +01:00
|
|
|
TRACE( "starting %s as batch binary: %s\n",
|
|
|
|
debugstr_a(name), debugstr_a(newcmdline) );
|
|
|
|
retv = CreateProcessA( comspec, newcmdline, process_attr, thread_attr,
|
|
|
|
inherit, flags, env, cur_dir, startup_info, info );
|
|
|
|
HeapFree( GetProcessHeap(), 0, newcmdline );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2002-07-23 23:02:31 +02:00
|
|
|
}
|
|
|
|
/* fall through */
|
|
|
|
case BINARY_UNIX_EXE:
|
2002-05-22 23:32:49 +02:00
|
|
|
{
|
2002-08-27 03:13:58 +02:00
|
|
|
/* unknown file, try as unix executable */
|
|
|
|
UNICODE_STRING nameW;
|
2002-05-22 23:32:49 +02:00
|
|
|
DOS_FULL_NAME full_name;
|
|
|
|
const char *unixfilename = name;
|
|
|
|
|
|
|
|
TRACE( "starting %s as Unix binary\n", debugstr_a(name) );
|
2002-08-27 03:13:58 +02:00
|
|
|
|
|
|
|
RtlCreateUnicodeStringFromAsciiz(&nameW, name);
|
|
|
|
if (DOSFS_GetFullName( nameW.Buffer, TRUE, &full_name )) unixfilename = full_name.long_name;
|
|
|
|
RtlFreeUnicodeString(&nameW);
|
2002-05-22 23:32:49 +02:00
|
|
|
retv = (fork_and_exec( unixfilename, tidy_cmdline, env, unixdir ) != -1);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
CloseHandle( hFile );
|
|
|
|
|
|
|
|
done:
|
|
|
|
if (tidy_cmdline != cmd_line) HeapFree( GetProcessHeap(), 0, tidy_cmdline );
|
|
|
|
return retv;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* CreateProcessW (KERNEL32.@)
|
|
|
|
* NOTES
|
|
|
|
* lpReserved is not converted
|
|
|
|
*/
|
|
|
|
BOOL WINAPI CreateProcessW( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_ATTRIBUTES process_attr,
|
|
|
|
LPSECURITY_ATTRIBUTES thread_attr, BOOL inherit, DWORD flags,
|
|
|
|
LPVOID env, LPCWSTR cur_dir, LPSTARTUPINFOW startup_info,
|
|
|
|
LPPROCESS_INFORMATION info )
|
|
|
|
{
|
|
|
|
BOOL ret;
|
|
|
|
STARTUPINFOA StartupInfoA;
|
|
|
|
|
|
|
|
LPSTR app_nameA = HEAP_strdupWtoA (GetProcessHeap(),0,app_name);
|
|
|
|
LPSTR cmd_lineA = HEAP_strdupWtoA (GetProcessHeap(),0,cmd_line);
|
|
|
|
LPSTR cur_dirA = HEAP_strdupWtoA (GetProcessHeap(),0,cur_dir);
|
|
|
|
|
|
|
|
memcpy (&StartupInfoA, startup_info, sizeof(STARTUPINFOA));
|
|
|
|
StartupInfoA.lpDesktop = HEAP_strdupWtoA (GetProcessHeap(),0,startup_info->lpDesktop);
|
|
|
|
StartupInfoA.lpTitle = HEAP_strdupWtoA (GetProcessHeap(),0,startup_info->lpTitle);
|
|
|
|
|
|
|
|
TRACE_(win32)("(%s,%s,...)\n", debugstr_w(app_name), debugstr_w(cmd_line));
|
|
|
|
|
|
|
|
if (startup_info->lpReserved)
|
|
|
|
FIXME_(win32)("StartupInfo.lpReserved is used, please report (%s)\n",
|
|
|
|
debugstr_w(startup_info->lpReserved));
|
|
|
|
|
|
|
|
ret = CreateProcessA( app_nameA, cmd_lineA, process_attr, thread_attr,
|
|
|
|
inherit, flags, env, cur_dirA, &StartupInfoA, info );
|
|
|
|
|
|
|
|
HeapFree( GetProcessHeap(), 0, cur_dirA );
|
|
|
|
HeapFree( GetProcessHeap(), 0, cmd_lineA );
|
|
|
|
HeapFree( GetProcessHeap(), 0, StartupInfoA.lpDesktop );
|
|
|
|
HeapFree( GetProcessHeap(), 0, StartupInfoA.lpTitle );
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1997-01-01 18:29:55 +01:00
|
|
|
/***********************************************************************
|
2001-02-15 00:11:17 +01:00
|
|
|
* ExitProcess (KERNEL32.@)
|
1997-01-01 18:29:55 +01:00
|
|
|
*/
|
1997-08-24 18:00:30 +02:00
|
|
|
void WINAPI ExitProcess( DWORD status )
|
1997-01-01 18:29:55 +01:00
|
|
|
{
|
2003-03-04 05:36:56 +01:00
|
|
|
LdrShutdownProcess();
|
2001-02-27 03:09:16 +01:00
|
|
|
SERVER_START_REQ( terminate_process )
|
2000-08-30 02:00:48 +02:00
|
|
|
{
|
|
|
|
/* send the exit code to the server */
|
|
|
|
req->handle = GetCurrentProcess();
|
|
|
|
req->exit_code = status;
|
2001-11-30 19:46:42 +01:00
|
|
|
wine_server_call( req );
|
2000-08-30 02:00:48 +02:00
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
2000-05-29 23:25:10 +02:00
|
|
|
exit( status );
|
1997-01-01 18:29:55 +01:00
|
|
|
}
|
|
|
|
|
Release 980822
Sat Aug 22 17:46:19 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [include/dosexe.h] [include/module.h] [include/pe_image.h]
[include/process.h] [include/windows.h] [loader/dos/module.c]
[loader/module.c] [loader/ne/module.c] [loader/pe_image.c]
[scheduler/process.c] [win32/process.c]
Partially implemented CreateProcess32.
* [win32/device.c] [relay32/kernel32.spec] [scheduler/k32obj.c]
[misc/registry.c] [win32/file.c]
Partially implemented VxDCall (VMM registry services).
* [files/dos_fs.c]
DOSFS_FindNext made thread-safe.
* [include/sig_context.h] [include/syslevel.h] [loader/signal.c]
[scheduler/syslevel.c] [tools/build.c]
Replaced CALLTO16_Current_fs by SYSLEVEL_Win16CurrentTeb.
* [win32/kernel32.c]
Bugfix: QT_Thunk/FT_Thunk should return 'long' in DX:AX, not EAX.
* [if1632/relay.c] [relay32/builtin32.c] [windows/msgbox.c]
[msdos/int20.c] [msdos/int21.c]
Use ExitProcess instead of TASK_KillCurrentTask.
* [include/task.h] [include/thread.h] [loader/task.c]
[scheduler/thread.c] [include/queue.h] [windows/message.c]
[windows/queue.c] [windows/win.c]
Prevent Win32 threads from entering the TASK_Reschedule loop.
(Note: Win32 messaging still doesn't work correctly; this patch
is just preventing the system from crashing when Win32 threads
call messaging functions. Messages will probably still get lost.)
* [scheduler/critsection.c]
Deactivated the use of SEM_UNDO for the SYSTEM_LOCK semaphore;
for some reason, this leads to problems after threads terminate...
Sat Aug 22 15:00:00 1998 Jrgen Schmied <juergen.schmied@metronet.de>
* [include/authors.h]
New file, includes all names of the developer (former shell.c)
* [Makefile.in][configure][configure.in][dlls/Makefile.in]
[dlls/shell32/Makefile.in][shres.rc]
Created dlls/shell32 and moved the shell32 stuff in it.
Started to create internal resources.
* [dlls/shell32/*]
Split the shell32 implementation into smaller files.
New classes: IContextMenu, IExtractIcon, IShellView.
Implemented Shell_GetImageList().
shell32 links to comctl32 now dynamically so it can use
internal/external implementations.
* [documentation/internal-dll] [documentation/shell32]
New, could anybody do a spellcheck?
* [include/commctrl.h]
Many new LV constants, structures, functions.
* [controls/comctl32undoc.c]
Rewrote the DSA* functions.
* [windows/winpos.c]
SetShellWindow32, GetShellWindow32.
Sat Aug 22 14:02:15 1998 Alexander Lukyanov <lav@long.yar.ru>
* [loader/resource.c]
Mark last accelerator as such in LoadAccelerators32W.
* [relay32/shell32.spec] [misc/shell.c]
Add stubs for SHGetSpecialFolderPath[AW].
Sat Aug 22 02:07:42 1998 Adrian Harvey <adrian@select.com.au>
* [include/file.h] [file/file.c] [msdos/int21.c] [msdos/vxd.c]
[misc/lzexpand.c] [win32/kernel32.c] [documentation/filehandles]
Fixed file handle handling. Created universal HFILE16 to HFILE32
translation macro from msdos/int21 code by Ove Kaaven.
Used macro in all Win16 functions so that win32 handles are translated
to avoid DOS/Win16 stdxx handles.
Removed handle translation from int21.c where Win16 functions are
called. Changed remaining calls to use new macro names.
Documented filehandle handling and differences between win 16 & 32.
Fri Aug 21 20:32:49 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [server/process.c] [server/thread.c]
Implemented object wait queues and synchronization.
Fri Aug 21 18:40:02 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*]
DEVMODE dmPaper{Width|Length} fields are in 0.1mm.
Select a 100 pixel default font in CreateDC.
Thu Aug 20 22:47:39 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [objects/bitmap.c]
Handle bits=32 in SetBitmapBits32 and GetBitmapBits32.
* [msdos/int21.c]
Add handling of Int21 0A and 37.
* [misc/commdlg.c]
Use MapHModuleLS and MapHModuleSL when translating HINSTANCE16 to
HINSTANCE32 and vice versa.
* [win32/file.c]
CreateFile32A: Abort if filename == NULL.
Thu Aug 20 12:28:31 1998 Marcus Meissner <marcus@jet.franken.de>
* [*/*]
Lots of missing prototypes added, some parameter types adapted to match
SDK.
* [debugger/stabs.c]
Don't loop forever if we don't find wine or one of the libxxx.so.
* [loader/ne/module.c]
Implemented MapHModuleLS,MapHModuleSL,MapHinstLS,MapHinstSL.
* [misc/network.c]
Implemented WNetGetUser32A.
* [misc/shellord.c]
Implemented ILRemoveLastID.
* [multimedia/dsound.c]
Fixed StarCraft memory leak.
* [graphics/ddraw.c]
Removed some unnecessary simple relaying functions, tried polishing
up the Xlib implementation (still doesn't work), temp. removed Xshm
code (to be remerged with working Xlib code).
Tue Aug 18 22:29:17 1998 Ove Kaaven <ovek@arcticnet.no>
* [multimedia/mmio.c] [multimedia/mmsystem.c]
Fixed most mmio bugs, fully implementing mmioSetBuffer
buffering, ability to read memory files, and the
sndPlaySound() SND_MEMORY flag. Most mmio-using programs
now work fine.
* [include/dosexe.h] [include/miscemu.h] [include/module.h]
[loader/module.c] [loader/task.c] [msdos/dosmem.c]
Improved DOS VM flexibility and portability somewhat. (Did
I get the #ifdefs right this time, BSD-ers?)
* [msdos/int21.c]
Made "Get Current PSP address" work as expected in a DOS VM.
* [loader/dos/*]
Began improving flexibility and portability somewhat. It
should be easier to add DPMI RMCB callbacks now. The
DOS VM no longer leaves big files lying around in /tmp
after a crash.
Tue Aug 18 12:38:31 1998 Turchanov Sergey <turchanov@usa.net>
* [relay32/winmm.spec]
This patch allows WinAmp to play WAV files (at least in PCM
format).
Sun Aug 16 05:34:13 1998 Pablo Saratxaga <srtxg@chanae.alphanet.ch>
* [windows/keyboard.c]
Corrected keyboard code to properly handle keys : ? ~ and "
on non US keyboards.
Sat Aug 15 18:47:14 1998 Brian Craft <bcboy@dorothy.wanglab.brandeis.edu>
* [windows/win.c]
Fixed severe bug in EnumChildWindwos().
Thu Aug 13 21:05:35 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [controls/tooltips.c]
Fixed some bugs. Added subclassing support.
* [controls/toolbar.c]
Improved tooltip integration. Fixed some bugs.
* [controls/commctrl.c]
Changed control registration and added some documentation.
Fixed ShowHideMenuCtl.
* [controls/rebar.c][include/rebar.h][include/commctrl.h]
Improved rebar implementation (still no display).
* [controls/pager.c][include/pager.h][include/commctrl.h]
Improved pager implementation (still no display).
* [misc/imagelist.c]
Fixed a bug.
* [documentation/common_controls]
Updated.
Sun Aug 9 19:50:20 1998 James Juran <jrj120@psu.edu>
* [Makefile.in] [documentation/Makefile.in]
[programs/Makefile.in] [programs/*/Makefile.in]
Added uninstall rules, cleaned up install rules a little bit.
Sun Aug 9 13:21:35 1998 Andreas Mohr <100.30936@germany.net>
* [loader/ne/module.c] [if1632/kernel.spec]
Added the undocumented HIWORD of GetModuleHandle (hFirstModule).
* [loader/ne/segment.c]
Wine forgot to set some NE_SEGFLAGS_*.
Combined with another loader change, this fixed the
"BLINKER -- error in loading module" or ghost MessageBox problem
that about 1% of all Windows programs have.
Some BLINKER programs still don't work, though.
But I'm working on it, with great help from Blinkinc.
* [loader/task.c]
InitTask needs to decrement the SP register by two as Win95 does.
Sun Aug 9 02:41:28 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [if1632/kernel.spec] [relay32/kernel32.spec] [scheduler/syslevel.c]
[loader/main.c] [win32/ordinals.c] [include/syslevel.h]
[scheduler/Makefile.in]
Implemented Win95 'syslevel' routines (including Win16Lock).
* [if1632/relay.c] [if1632/thunk.c] [tools/build.c] [loader/task.c]
[loader/ne/segment.c] [win32/kernel32.c] [memory/selector.c]
[include/stackframe.h] [include/thread.h]
16-bit %fs handling revised. Use Win16Lock where appropriate.
* [include/thread.h] [scheduler/synchro.c] [windows/message.c]
[windows/queue.c] [win32/process.c]
Implemented MsgWaitForMultipleObjects.
* [files/change.c] [files/Makefile.in] [scheduler/k32obj.c]
[win32/newfns.c]
Implemented (dummy) file change notification objects.
* [debugger/dbg.y] [scheduler/process.c] [scheduler/thread.c]
[include/process.h] [include/thread.h]
Suspend all threads except current when hitting debugger break point.
* [objects/dib.c]
Bugfix for CreateDIBSection.
1998-08-22 21:03:56 +02:00
|
|
|
/******************************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* TerminateProcess (KERNEL32.@)
|
Release 980822
Sat Aug 22 17:46:19 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [include/dosexe.h] [include/module.h] [include/pe_image.h]
[include/process.h] [include/windows.h] [loader/dos/module.c]
[loader/module.c] [loader/ne/module.c] [loader/pe_image.c]
[scheduler/process.c] [win32/process.c]
Partially implemented CreateProcess32.
* [win32/device.c] [relay32/kernel32.spec] [scheduler/k32obj.c]
[misc/registry.c] [win32/file.c]
Partially implemented VxDCall (VMM registry services).
* [files/dos_fs.c]
DOSFS_FindNext made thread-safe.
* [include/sig_context.h] [include/syslevel.h] [loader/signal.c]
[scheduler/syslevel.c] [tools/build.c]
Replaced CALLTO16_Current_fs by SYSLEVEL_Win16CurrentTeb.
* [win32/kernel32.c]
Bugfix: QT_Thunk/FT_Thunk should return 'long' in DX:AX, not EAX.
* [if1632/relay.c] [relay32/builtin32.c] [windows/msgbox.c]
[msdos/int20.c] [msdos/int21.c]
Use ExitProcess instead of TASK_KillCurrentTask.
* [include/task.h] [include/thread.h] [loader/task.c]
[scheduler/thread.c] [include/queue.h] [windows/message.c]
[windows/queue.c] [windows/win.c]
Prevent Win32 threads from entering the TASK_Reschedule loop.
(Note: Win32 messaging still doesn't work correctly; this patch
is just preventing the system from crashing when Win32 threads
call messaging functions. Messages will probably still get lost.)
* [scheduler/critsection.c]
Deactivated the use of SEM_UNDO for the SYSTEM_LOCK semaphore;
for some reason, this leads to problems after threads terminate...
Sat Aug 22 15:00:00 1998 Jrgen Schmied <juergen.schmied@metronet.de>
* [include/authors.h]
New file, includes all names of the developer (former shell.c)
* [Makefile.in][configure][configure.in][dlls/Makefile.in]
[dlls/shell32/Makefile.in][shres.rc]
Created dlls/shell32 and moved the shell32 stuff in it.
Started to create internal resources.
* [dlls/shell32/*]
Split the shell32 implementation into smaller files.
New classes: IContextMenu, IExtractIcon, IShellView.
Implemented Shell_GetImageList().
shell32 links to comctl32 now dynamically so it can use
internal/external implementations.
* [documentation/internal-dll] [documentation/shell32]
New, could anybody do a spellcheck?
* [include/commctrl.h]
Many new LV constants, structures, functions.
* [controls/comctl32undoc.c]
Rewrote the DSA* functions.
* [windows/winpos.c]
SetShellWindow32, GetShellWindow32.
Sat Aug 22 14:02:15 1998 Alexander Lukyanov <lav@long.yar.ru>
* [loader/resource.c]
Mark last accelerator as such in LoadAccelerators32W.
* [relay32/shell32.spec] [misc/shell.c]
Add stubs for SHGetSpecialFolderPath[AW].
Sat Aug 22 02:07:42 1998 Adrian Harvey <adrian@select.com.au>
* [include/file.h] [file/file.c] [msdos/int21.c] [msdos/vxd.c]
[misc/lzexpand.c] [win32/kernel32.c] [documentation/filehandles]
Fixed file handle handling. Created universal HFILE16 to HFILE32
translation macro from msdos/int21 code by Ove Kaaven.
Used macro in all Win16 functions so that win32 handles are translated
to avoid DOS/Win16 stdxx handles.
Removed handle translation from int21.c where Win16 functions are
called. Changed remaining calls to use new macro names.
Documented filehandle handling and differences between win 16 & 32.
Fri Aug 21 20:32:49 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [server/process.c] [server/thread.c]
Implemented object wait queues and synchronization.
Fri Aug 21 18:40:02 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*]
DEVMODE dmPaper{Width|Length} fields are in 0.1mm.
Select a 100 pixel default font in CreateDC.
Thu Aug 20 22:47:39 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [objects/bitmap.c]
Handle bits=32 in SetBitmapBits32 and GetBitmapBits32.
* [msdos/int21.c]
Add handling of Int21 0A and 37.
* [misc/commdlg.c]
Use MapHModuleLS and MapHModuleSL when translating HINSTANCE16 to
HINSTANCE32 and vice versa.
* [win32/file.c]
CreateFile32A: Abort if filename == NULL.
Thu Aug 20 12:28:31 1998 Marcus Meissner <marcus@jet.franken.de>
* [*/*]
Lots of missing prototypes added, some parameter types adapted to match
SDK.
* [debugger/stabs.c]
Don't loop forever if we don't find wine or one of the libxxx.so.
* [loader/ne/module.c]
Implemented MapHModuleLS,MapHModuleSL,MapHinstLS,MapHinstSL.
* [misc/network.c]
Implemented WNetGetUser32A.
* [misc/shellord.c]
Implemented ILRemoveLastID.
* [multimedia/dsound.c]
Fixed StarCraft memory leak.
* [graphics/ddraw.c]
Removed some unnecessary simple relaying functions, tried polishing
up the Xlib implementation (still doesn't work), temp. removed Xshm
code (to be remerged with working Xlib code).
Tue Aug 18 22:29:17 1998 Ove Kaaven <ovek@arcticnet.no>
* [multimedia/mmio.c] [multimedia/mmsystem.c]
Fixed most mmio bugs, fully implementing mmioSetBuffer
buffering, ability to read memory files, and the
sndPlaySound() SND_MEMORY flag. Most mmio-using programs
now work fine.
* [include/dosexe.h] [include/miscemu.h] [include/module.h]
[loader/module.c] [loader/task.c] [msdos/dosmem.c]
Improved DOS VM flexibility and portability somewhat. (Did
I get the #ifdefs right this time, BSD-ers?)
* [msdos/int21.c]
Made "Get Current PSP address" work as expected in a DOS VM.
* [loader/dos/*]
Began improving flexibility and portability somewhat. It
should be easier to add DPMI RMCB callbacks now. The
DOS VM no longer leaves big files lying around in /tmp
after a crash.
Tue Aug 18 12:38:31 1998 Turchanov Sergey <turchanov@usa.net>
* [relay32/winmm.spec]
This patch allows WinAmp to play WAV files (at least in PCM
format).
Sun Aug 16 05:34:13 1998 Pablo Saratxaga <srtxg@chanae.alphanet.ch>
* [windows/keyboard.c]
Corrected keyboard code to properly handle keys : ? ~ and "
on non US keyboards.
Sat Aug 15 18:47:14 1998 Brian Craft <bcboy@dorothy.wanglab.brandeis.edu>
* [windows/win.c]
Fixed severe bug in EnumChildWindwos().
Thu Aug 13 21:05:35 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [controls/tooltips.c]
Fixed some bugs. Added subclassing support.
* [controls/toolbar.c]
Improved tooltip integration. Fixed some bugs.
* [controls/commctrl.c]
Changed control registration and added some documentation.
Fixed ShowHideMenuCtl.
* [controls/rebar.c][include/rebar.h][include/commctrl.h]
Improved rebar implementation (still no display).
* [controls/pager.c][include/pager.h][include/commctrl.h]
Improved pager implementation (still no display).
* [misc/imagelist.c]
Fixed a bug.
* [documentation/common_controls]
Updated.
Sun Aug 9 19:50:20 1998 James Juran <jrj120@psu.edu>
* [Makefile.in] [documentation/Makefile.in]
[programs/Makefile.in] [programs/*/Makefile.in]
Added uninstall rules, cleaned up install rules a little bit.
Sun Aug 9 13:21:35 1998 Andreas Mohr <100.30936@germany.net>
* [loader/ne/module.c] [if1632/kernel.spec]
Added the undocumented HIWORD of GetModuleHandle (hFirstModule).
* [loader/ne/segment.c]
Wine forgot to set some NE_SEGFLAGS_*.
Combined with another loader change, this fixed the
"BLINKER -- error in loading module" or ghost MessageBox problem
that about 1% of all Windows programs have.
Some BLINKER programs still don't work, though.
But I'm working on it, with great help from Blinkinc.
* [loader/task.c]
InitTask needs to decrement the SP register by two as Win95 does.
Sun Aug 9 02:41:28 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [if1632/kernel.spec] [relay32/kernel32.spec] [scheduler/syslevel.c]
[loader/main.c] [win32/ordinals.c] [include/syslevel.h]
[scheduler/Makefile.in]
Implemented Win95 'syslevel' routines (including Win16Lock).
* [if1632/relay.c] [if1632/thunk.c] [tools/build.c] [loader/task.c]
[loader/ne/segment.c] [win32/kernel32.c] [memory/selector.c]
[include/stackframe.h] [include/thread.h]
16-bit %fs handling revised. Use Win16Lock where appropriate.
* [include/thread.h] [scheduler/synchro.c] [windows/message.c]
[windows/queue.c] [win32/process.c]
Implemented MsgWaitForMultipleObjects.
* [files/change.c] [files/Makefile.in] [scheduler/k32obj.c]
[win32/newfns.c]
Implemented (dummy) file change notification objects.
* [debugger/dbg.y] [scheduler/process.c] [scheduler/thread.c]
[include/process.h] [include/thread.h]
Suspend all threads except current when hitting debugger break point.
* [objects/dib.c]
Bugfix for CreateDIBSection.
1998-08-22 21:03:56 +02:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI TerminateProcess( HANDLE handle, DWORD exit_code )
|
Release 980822
Sat Aug 22 17:46:19 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [include/dosexe.h] [include/module.h] [include/pe_image.h]
[include/process.h] [include/windows.h] [loader/dos/module.c]
[loader/module.c] [loader/ne/module.c] [loader/pe_image.c]
[scheduler/process.c] [win32/process.c]
Partially implemented CreateProcess32.
* [win32/device.c] [relay32/kernel32.spec] [scheduler/k32obj.c]
[misc/registry.c] [win32/file.c]
Partially implemented VxDCall (VMM registry services).
* [files/dos_fs.c]
DOSFS_FindNext made thread-safe.
* [include/sig_context.h] [include/syslevel.h] [loader/signal.c]
[scheduler/syslevel.c] [tools/build.c]
Replaced CALLTO16_Current_fs by SYSLEVEL_Win16CurrentTeb.
* [win32/kernel32.c]
Bugfix: QT_Thunk/FT_Thunk should return 'long' in DX:AX, not EAX.
* [if1632/relay.c] [relay32/builtin32.c] [windows/msgbox.c]
[msdos/int20.c] [msdos/int21.c]
Use ExitProcess instead of TASK_KillCurrentTask.
* [include/task.h] [include/thread.h] [loader/task.c]
[scheduler/thread.c] [include/queue.h] [windows/message.c]
[windows/queue.c] [windows/win.c]
Prevent Win32 threads from entering the TASK_Reschedule loop.
(Note: Win32 messaging still doesn't work correctly; this patch
is just preventing the system from crashing when Win32 threads
call messaging functions. Messages will probably still get lost.)
* [scheduler/critsection.c]
Deactivated the use of SEM_UNDO for the SYSTEM_LOCK semaphore;
for some reason, this leads to problems after threads terminate...
Sat Aug 22 15:00:00 1998 Jrgen Schmied <juergen.schmied@metronet.de>
* [include/authors.h]
New file, includes all names of the developer (former shell.c)
* [Makefile.in][configure][configure.in][dlls/Makefile.in]
[dlls/shell32/Makefile.in][shres.rc]
Created dlls/shell32 and moved the shell32 stuff in it.
Started to create internal resources.
* [dlls/shell32/*]
Split the shell32 implementation into smaller files.
New classes: IContextMenu, IExtractIcon, IShellView.
Implemented Shell_GetImageList().
shell32 links to comctl32 now dynamically so it can use
internal/external implementations.
* [documentation/internal-dll] [documentation/shell32]
New, could anybody do a spellcheck?
* [include/commctrl.h]
Many new LV constants, structures, functions.
* [controls/comctl32undoc.c]
Rewrote the DSA* functions.
* [windows/winpos.c]
SetShellWindow32, GetShellWindow32.
Sat Aug 22 14:02:15 1998 Alexander Lukyanov <lav@long.yar.ru>
* [loader/resource.c]
Mark last accelerator as such in LoadAccelerators32W.
* [relay32/shell32.spec] [misc/shell.c]
Add stubs for SHGetSpecialFolderPath[AW].
Sat Aug 22 02:07:42 1998 Adrian Harvey <adrian@select.com.au>
* [include/file.h] [file/file.c] [msdos/int21.c] [msdos/vxd.c]
[misc/lzexpand.c] [win32/kernel32.c] [documentation/filehandles]
Fixed file handle handling. Created universal HFILE16 to HFILE32
translation macro from msdos/int21 code by Ove Kaaven.
Used macro in all Win16 functions so that win32 handles are translated
to avoid DOS/Win16 stdxx handles.
Removed handle translation from int21.c where Win16 functions are
called. Changed remaining calls to use new macro names.
Documented filehandle handling and differences between win 16 & 32.
Fri Aug 21 20:32:49 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [server/process.c] [server/thread.c]
Implemented object wait queues and synchronization.
Fri Aug 21 18:40:02 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*]
DEVMODE dmPaper{Width|Length} fields are in 0.1mm.
Select a 100 pixel default font in CreateDC.
Thu Aug 20 22:47:39 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [objects/bitmap.c]
Handle bits=32 in SetBitmapBits32 and GetBitmapBits32.
* [msdos/int21.c]
Add handling of Int21 0A and 37.
* [misc/commdlg.c]
Use MapHModuleLS and MapHModuleSL when translating HINSTANCE16 to
HINSTANCE32 and vice versa.
* [win32/file.c]
CreateFile32A: Abort if filename == NULL.
Thu Aug 20 12:28:31 1998 Marcus Meissner <marcus@jet.franken.de>
* [*/*]
Lots of missing prototypes added, some parameter types adapted to match
SDK.
* [debugger/stabs.c]
Don't loop forever if we don't find wine or one of the libxxx.so.
* [loader/ne/module.c]
Implemented MapHModuleLS,MapHModuleSL,MapHinstLS,MapHinstSL.
* [misc/network.c]
Implemented WNetGetUser32A.
* [misc/shellord.c]
Implemented ILRemoveLastID.
* [multimedia/dsound.c]
Fixed StarCraft memory leak.
* [graphics/ddraw.c]
Removed some unnecessary simple relaying functions, tried polishing
up the Xlib implementation (still doesn't work), temp. removed Xshm
code (to be remerged with working Xlib code).
Tue Aug 18 22:29:17 1998 Ove Kaaven <ovek@arcticnet.no>
* [multimedia/mmio.c] [multimedia/mmsystem.c]
Fixed most mmio bugs, fully implementing mmioSetBuffer
buffering, ability to read memory files, and the
sndPlaySound() SND_MEMORY flag. Most mmio-using programs
now work fine.
* [include/dosexe.h] [include/miscemu.h] [include/module.h]
[loader/module.c] [loader/task.c] [msdos/dosmem.c]
Improved DOS VM flexibility and portability somewhat. (Did
I get the #ifdefs right this time, BSD-ers?)
* [msdos/int21.c]
Made "Get Current PSP address" work as expected in a DOS VM.
* [loader/dos/*]
Began improving flexibility and portability somewhat. It
should be easier to add DPMI RMCB callbacks now. The
DOS VM no longer leaves big files lying around in /tmp
after a crash.
Tue Aug 18 12:38:31 1998 Turchanov Sergey <turchanov@usa.net>
* [relay32/winmm.spec]
This patch allows WinAmp to play WAV files (at least in PCM
format).
Sun Aug 16 05:34:13 1998 Pablo Saratxaga <srtxg@chanae.alphanet.ch>
* [windows/keyboard.c]
Corrected keyboard code to properly handle keys : ? ~ and "
on non US keyboards.
Sat Aug 15 18:47:14 1998 Brian Craft <bcboy@dorothy.wanglab.brandeis.edu>
* [windows/win.c]
Fixed severe bug in EnumChildWindwos().
Thu Aug 13 21:05:35 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [controls/tooltips.c]
Fixed some bugs. Added subclassing support.
* [controls/toolbar.c]
Improved tooltip integration. Fixed some bugs.
* [controls/commctrl.c]
Changed control registration and added some documentation.
Fixed ShowHideMenuCtl.
* [controls/rebar.c][include/rebar.h][include/commctrl.h]
Improved rebar implementation (still no display).
* [controls/pager.c][include/pager.h][include/commctrl.h]
Improved pager implementation (still no display).
* [misc/imagelist.c]
Fixed a bug.
* [documentation/common_controls]
Updated.
Sun Aug 9 19:50:20 1998 James Juran <jrj120@psu.edu>
* [Makefile.in] [documentation/Makefile.in]
[programs/Makefile.in] [programs/*/Makefile.in]
Added uninstall rules, cleaned up install rules a little bit.
Sun Aug 9 13:21:35 1998 Andreas Mohr <100.30936@germany.net>
* [loader/ne/module.c] [if1632/kernel.spec]
Added the undocumented HIWORD of GetModuleHandle (hFirstModule).
* [loader/ne/segment.c]
Wine forgot to set some NE_SEGFLAGS_*.
Combined with another loader change, this fixed the
"BLINKER -- error in loading module" or ghost MessageBox problem
that about 1% of all Windows programs have.
Some BLINKER programs still don't work, though.
But I'm working on it, with great help from Blinkinc.
* [loader/task.c]
InitTask needs to decrement the SP register by two as Win95 does.
Sun Aug 9 02:41:28 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [if1632/kernel.spec] [relay32/kernel32.spec] [scheduler/syslevel.c]
[loader/main.c] [win32/ordinals.c] [include/syslevel.h]
[scheduler/Makefile.in]
Implemented Win95 'syslevel' routines (including Win16Lock).
* [if1632/relay.c] [if1632/thunk.c] [tools/build.c] [loader/task.c]
[loader/ne/segment.c] [win32/kernel32.c] [memory/selector.c]
[include/stackframe.h] [include/thread.h]
16-bit %fs handling revised. Use Win16Lock where appropriate.
* [include/thread.h] [scheduler/synchro.c] [windows/message.c]
[windows/queue.c] [win32/process.c]
Implemented MsgWaitForMultipleObjects.
* [files/change.c] [files/Makefile.in] [scheduler/k32obj.c]
[win32/newfns.c]
Implemented (dummy) file change notification objects.
* [debugger/dbg.y] [scheduler/process.c] [scheduler/thread.c]
[include/process.h] [include/thread.h]
Suspend all threads except current when hitting debugger break point.
* [objects/dib.c]
Bugfix for CreateDIBSection.
1998-08-22 21:03:56 +02:00
|
|
|
{
|
2000-08-30 02:00:48 +02:00
|
|
|
NTSTATUS status = NtTerminateProcess( handle, exit_code );
|
|
|
|
if (status) SetLastError( RtlNtStatusToDosError(status) );
|
|
|
|
return !status;
|
Release 980822
Sat Aug 22 17:46:19 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [include/dosexe.h] [include/module.h] [include/pe_image.h]
[include/process.h] [include/windows.h] [loader/dos/module.c]
[loader/module.c] [loader/ne/module.c] [loader/pe_image.c]
[scheduler/process.c] [win32/process.c]
Partially implemented CreateProcess32.
* [win32/device.c] [relay32/kernel32.spec] [scheduler/k32obj.c]
[misc/registry.c] [win32/file.c]
Partially implemented VxDCall (VMM registry services).
* [files/dos_fs.c]
DOSFS_FindNext made thread-safe.
* [include/sig_context.h] [include/syslevel.h] [loader/signal.c]
[scheduler/syslevel.c] [tools/build.c]
Replaced CALLTO16_Current_fs by SYSLEVEL_Win16CurrentTeb.
* [win32/kernel32.c]
Bugfix: QT_Thunk/FT_Thunk should return 'long' in DX:AX, not EAX.
* [if1632/relay.c] [relay32/builtin32.c] [windows/msgbox.c]
[msdos/int20.c] [msdos/int21.c]
Use ExitProcess instead of TASK_KillCurrentTask.
* [include/task.h] [include/thread.h] [loader/task.c]
[scheduler/thread.c] [include/queue.h] [windows/message.c]
[windows/queue.c] [windows/win.c]
Prevent Win32 threads from entering the TASK_Reschedule loop.
(Note: Win32 messaging still doesn't work correctly; this patch
is just preventing the system from crashing when Win32 threads
call messaging functions. Messages will probably still get lost.)
* [scheduler/critsection.c]
Deactivated the use of SEM_UNDO for the SYSTEM_LOCK semaphore;
for some reason, this leads to problems after threads terminate...
Sat Aug 22 15:00:00 1998 Jrgen Schmied <juergen.schmied@metronet.de>
* [include/authors.h]
New file, includes all names of the developer (former shell.c)
* [Makefile.in][configure][configure.in][dlls/Makefile.in]
[dlls/shell32/Makefile.in][shres.rc]
Created dlls/shell32 and moved the shell32 stuff in it.
Started to create internal resources.
* [dlls/shell32/*]
Split the shell32 implementation into smaller files.
New classes: IContextMenu, IExtractIcon, IShellView.
Implemented Shell_GetImageList().
shell32 links to comctl32 now dynamically so it can use
internal/external implementations.
* [documentation/internal-dll] [documentation/shell32]
New, could anybody do a spellcheck?
* [include/commctrl.h]
Many new LV constants, structures, functions.
* [controls/comctl32undoc.c]
Rewrote the DSA* functions.
* [windows/winpos.c]
SetShellWindow32, GetShellWindow32.
Sat Aug 22 14:02:15 1998 Alexander Lukyanov <lav@long.yar.ru>
* [loader/resource.c]
Mark last accelerator as such in LoadAccelerators32W.
* [relay32/shell32.spec] [misc/shell.c]
Add stubs for SHGetSpecialFolderPath[AW].
Sat Aug 22 02:07:42 1998 Adrian Harvey <adrian@select.com.au>
* [include/file.h] [file/file.c] [msdos/int21.c] [msdos/vxd.c]
[misc/lzexpand.c] [win32/kernel32.c] [documentation/filehandles]
Fixed file handle handling. Created universal HFILE16 to HFILE32
translation macro from msdos/int21 code by Ove Kaaven.
Used macro in all Win16 functions so that win32 handles are translated
to avoid DOS/Win16 stdxx handles.
Removed handle translation from int21.c where Win16 functions are
called. Changed remaining calls to use new macro names.
Documented filehandle handling and differences between win 16 & 32.
Fri Aug 21 20:32:49 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [server/process.c] [server/thread.c]
Implemented object wait queues and synchronization.
Fri Aug 21 18:40:02 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*]
DEVMODE dmPaper{Width|Length} fields are in 0.1mm.
Select a 100 pixel default font in CreateDC.
Thu Aug 20 22:47:39 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [objects/bitmap.c]
Handle bits=32 in SetBitmapBits32 and GetBitmapBits32.
* [msdos/int21.c]
Add handling of Int21 0A and 37.
* [misc/commdlg.c]
Use MapHModuleLS and MapHModuleSL when translating HINSTANCE16 to
HINSTANCE32 and vice versa.
* [win32/file.c]
CreateFile32A: Abort if filename == NULL.
Thu Aug 20 12:28:31 1998 Marcus Meissner <marcus@jet.franken.de>
* [*/*]
Lots of missing prototypes added, some parameter types adapted to match
SDK.
* [debugger/stabs.c]
Don't loop forever if we don't find wine or one of the libxxx.so.
* [loader/ne/module.c]
Implemented MapHModuleLS,MapHModuleSL,MapHinstLS,MapHinstSL.
* [misc/network.c]
Implemented WNetGetUser32A.
* [misc/shellord.c]
Implemented ILRemoveLastID.
* [multimedia/dsound.c]
Fixed StarCraft memory leak.
* [graphics/ddraw.c]
Removed some unnecessary simple relaying functions, tried polishing
up the Xlib implementation (still doesn't work), temp. removed Xshm
code (to be remerged with working Xlib code).
Tue Aug 18 22:29:17 1998 Ove Kaaven <ovek@arcticnet.no>
* [multimedia/mmio.c] [multimedia/mmsystem.c]
Fixed most mmio bugs, fully implementing mmioSetBuffer
buffering, ability to read memory files, and the
sndPlaySound() SND_MEMORY flag. Most mmio-using programs
now work fine.
* [include/dosexe.h] [include/miscemu.h] [include/module.h]
[loader/module.c] [loader/task.c] [msdos/dosmem.c]
Improved DOS VM flexibility and portability somewhat. (Did
I get the #ifdefs right this time, BSD-ers?)
* [msdos/int21.c]
Made "Get Current PSP address" work as expected in a DOS VM.
* [loader/dos/*]
Began improving flexibility and portability somewhat. It
should be easier to add DPMI RMCB callbacks now. The
DOS VM no longer leaves big files lying around in /tmp
after a crash.
Tue Aug 18 12:38:31 1998 Turchanov Sergey <turchanov@usa.net>
* [relay32/winmm.spec]
This patch allows WinAmp to play WAV files (at least in PCM
format).
Sun Aug 16 05:34:13 1998 Pablo Saratxaga <srtxg@chanae.alphanet.ch>
* [windows/keyboard.c]
Corrected keyboard code to properly handle keys : ? ~ and "
on non US keyboards.
Sat Aug 15 18:47:14 1998 Brian Craft <bcboy@dorothy.wanglab.brandeis.edu>
* [windows/win.c]
Fixed severe bug in EnumChildWindwos().
Thu Aug 13 21:05:35 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [controls/tooltips.c]
Fixed some bugs. Added subclassing support.
* [controls/toolbar.c]
Improved tooltip integration. Fixed some bugs.
* [controls/commctrl.c]
Changed control registration and added some documentation.
Fixed ShowHideMenuCtl.
* [controls/rebar.c][include/rebar.h][include/commctrl.h]
Improved rebar implementation (still no display).
* [controls/pager.c][include/pager.h][include/commctrl.h]
Improved pager implementation (still no display).
* [misc/imagelist.c]
Fixed a bug.
* [documentation/common_controls]
Updated.
Sun Aug 9 19:50:20 1998 James Juran <jrj120@psu.edu>
* [Makefile.in] [documentation/Makefile.in]
[programs/Makefile.in] [programs/*/Makefile.in]
Added uninstall rules, cleaned up install rules a little bit.
Sun Aug 9 13:21:35 1998 Andreas Mohr <100.30936@germany.net>
* [loader/ne/module.c] [if1632/kernel.spec]
Added the undocumented HIWORD of GetModuleHandle (hFirstModule).
* [loader/ne/segment.c]
Wine forgot to set some NE_SEGFLAGS_*.
Combined with another loader change, this fixed the
"BLINKER -- error in loading module" or ghost MessageBox problem
that about 1% of all Windows programs have.
Some BLINKER programs still don't work, though.
But I'm working on it, with great help from Blinkinc.
* [loader/task.c]
InitTask needs to decrement the SP register by two as Win95 does.
Sun Aug 9 02:41:28 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [if1632/kernel.spec] [relay32/kernel32.spec] [scheduler/syslevel.c]
[loader/main.c] [win32/ordinals.c] [include/syslevel.h]
[scheduler/Makefile.in]
Implemented Win95 'syslevel' routines (including Win16Lock).
* [if1632/relay.c] [if1632/thunk.c] [tools/build.c] [loader/task.c]
[loader/ne/segment.c] [win32/kernel32.c] [memory/selector.c]
[include/stackframe.h] [include/thread.h]
16-bit %fs handling revised. Use Win16Lock where appropriate.
* [include/thread.h] [scheduler/synchro.c] [windows/message.c]
[windows/queue.c] [win32/process.c]
Implemented MsgWaitForMultipleObjects.
* [files/change.c] [files/Makefile.in] [scheduler/k32obj.c]
[win32/newfns.c]
Implemented (dummy) file change notification objects.
* [debugger/dbg.y] [scheduler/process.c] [scheduler/thread.c]
[include/process.h] [include/thread.h]
Suspend all threads except current when hitting debugger break point.
* [objects/dib.c]
Bugfix for CreateDIBSection.
1998-08-22 21:03:56 +02:00
|
|
|
}
|
|
|
|
|
1999-04-01 13:43:05 +02:00
|
|
|
|
Release 980503
Thu Apr 30 16:28:12 1998 James Juran <jrj120@psu.edu>
* [scheduler/process.c]
Implemented GetExitCodeProcess. The code is a direct translation
of GetExitCodeThread.
Mon Apr 27 22:20:25 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [loader/pe_image.c]
Unload dummy module when PE_LoadLibraryEx32A fails with
PE_LoadImage (makes Encarta 98 installer proceed).
* [files/drive.c]
Make GetDriveType16 return DRIVE_REMOVABLE for TYPE_CDROM.
Make GetCurrentDirectory32 behave like the code does and not
like the help describes.
* [files/profile.c]
Revoke recent change in PROFILE_GetSection and try better
handling of special case.
* [include/windows.h]
Change definition of ACCEL32.
* [misc/commdlg.c]
Replace the GetXXXFilename32 macros by normal code.
Fix two reported bugs in my changes to commdlg.
* [windows/win.c]
Add a hook to catch bogus WM_SIZE messages by emitting a warning
in the appropriate case.
* [objects/bitmap.c]
Reject unreasonbable large size arguments in
CreateCompatibleBitmap32 and add an fixme for that situation.
Sun Apr 26 18:30:07 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/ldt.h] [debugger/*.c] [miscemu/instr.c]
Added IS_SELECTOR_SYSTEM and IS_SELECTOR_32BIT macros.
Make instruction emulation support system selectors.
* [loader/*.c]
Started moving NE specific functions to the new loader/ne
directory.
* [memory/environ.c]
Enforce the 127 chars limit only when creating the environment of
a Win16 process.
Sun Apr 26 12:22:23 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed an incredible typo in CopyFile32A that made it unusable
since a rewrite in 970112 (!!).
* [files/directory.c]
Fixed GetTempPath32A/W to include trailing backslash.
* [misc/ver.c]
Make find_pe_resource "work" with corrupt files.
* [misc/wsprintf.c]
Altered WPRINTF_ParseFormatA/W to treat invalid format chars
as normal output, too.
* [msdos/dpmi.c]
Implemented "Allocate/Free real mode callback" (0x0303/0x0304).
Cross your fingers if you need to use it ;) (completely untested)
Implemented "Call real mode proc with far return" (0x0301, tested).
* [msdos/int21.c]
Fixed ioctlGenericBlkDevReq/0x60.
* [relay32/dplayx.spec] [relay32/builtin32.c] [relay32/Makefile.in]
Added built-in DPLAYX.DLL.
* [windows/win.c]
Fixed GetWindowWord()/GWW_HWNDPARENT to return the window's owner
if it has no parent (SDK).
Sat Apr 25 15:09:53 1998 M.T.Fortescue <mark@mtfhpc.demon.co.uk>
* [debugger/db_disasm.c]
Fixed disassemble bug for no-display option and 'lock',
'repne' and 'repe' prefixes.
* [debugger/registers.c]
Added textual flag description output on 'info regs'.
Sat Apr 25 14:18:26 1998 Matthew Becker <mbecker@glasscity.net>
* [*/*.c]
Added stubs and/or documentation for the following functions:
LookupPrivilegeValue, OpenService, ControlService, RegGetKeySecurity,
StartService, SetComputerName, DeleteService, CloseServiceHandle,
OpenProcessToken, OpenSCManager, DeregisterEventSource,
WaitForDebugEvent, WaitForInputIdle, RegisterEventSource,
SetDebugErrorLevel, SetConsoleCursorPosition, ChoosePixelFormat,
SetPixelFormat, GetPixelFormat, DescribePixelFormat, SwapBuffers,
PolyBezier, AbortPath, DestroyAcceleratorTable, HeapWalk,
DdeInitialize, DdeUninitialize, DdeConnectList, DdeDisconnectList,
DdeCreateStringHandle, DdePostAdvise, DdeGetData, DdeNameService,
DdeGetLastError, WNetGetDirectoryType, EnumPrinters, RegFlushKey,
RegGetKeySecurity, DllGetClassObject, DllCanUnloadNow, CreateBitmap,
CreateCompatibleBitmap, CreateBitmapIndirect, GetBitmapBits,
SetBitmapBits, LoadImage, CopyImage, LoadBitmap, DrawIcon,
CreateDiscardableBitmap, SetDIBits, GetCharABCWidths, LoadTypeLib,
SetConsoleCtrlHandler, CreateConsoleScreenBuffer, ReadConsoleInput,
GetConsoleCursorInfo, SetConsoleCursorInfo, SetConsoleWindowInfo,
SetConsoleTextAttribute, SetConsoleScreenBufferSize,
FillConsoleOutputCharacter, FillConsoleOutputAttribute,
CreateMailslot, GetMailslotInfo, GetCompressedFileSize,
GetProcessWindowStation, GetThreadDesktop, SetDebugErrorLevel,
WaitForDebugEvent, SetComputerName, CreateMDIWindow.
Thu Apr 23 23:54:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [include/windows.h] [objects/enhmetafile.c] [relay32/gdi32.spec]
Implement CopyEnhMetaFile, Get/SetEnhMetaFileBits, other fixes.
* [include/windows.h] [objects/metafile.c] [relay32/gdi32.spec]
32-bit metafile fixes, implement EnumMetaFile32, GetMetaFileBitsEx.
* [objects/font.c] [graphics/x11drv/xfont.c] [graphics/x11drv/text.c]
Some rotated text support for X11R6 displays.
* [win32/newfns.c] [ole/ole2nls.c]
Moved GetNumberFormat32A.
Wed Apr 22 17:38:20 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [misc/network.c]
Changed some function documentation to the new style.
* [misc/network.c] [include/windows.h] [if1632/user.spec]
[relay32/mpr.spec] [misc/mpr.c]
Added stubs for some Win32 network functions; renamed some
16-bit ones with 32-bit counterparts, as well as
WNetGetDirectoryType; moved the stubs in misc/mpr.c (three of
them!) to misc/network.c.
* [ole/compobj.c] [ole/storage.c] [ole/ole2disp.c]
[ole/ole2nls.c] [ole/folders.c] [ole/moniker.c] [ole/ole2.c]
[graphics/fontengine.c] [graphics/ddraw.c] [graphics/env.c]
[graphics/driver.c] [graphics/escape.c]
Changed fprintf's to proper debug-macros.
* [include/winnls.h]
Added some flags (for internal use).
* [ole/ole2nls.c]
Added the Unicode core function, and worked out a way to hide
the commonality of the core.
* [relay32/kernel32.spec]
Added support for GetDate/Time32A/W.
Wed Apr 22 09:16:03 1998 Gordon Chaffee <chaffee@cs.berkeley.edu>
* [win32/code_page.c]
Fixed problem with MultiByteToWideChar that was introduced in
last release. Made MultiByteToWideChar more compatible with Win32.
* [graphics/x11drv/graphics.c]
Fixed problem with drawing arcs.
Tue Apr 21 11:24:58 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [ole/ole2nls.c]
Move stuff from 0x409 case to Lang_En.
* [relay32/user32.spec] [windows/winpos.c]
Added stubs for GetWindowRgn32 and SetWindowRgn32. Makes Office
Paperclip happy.
Tue Apr 21 11:16:16 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [loader/pe_image.c]
If image is relocated, TLS addresses need to be adjusted.
* [debugger/*.c]
Generalized tests for 32-bit segments.
Tue Apr 21 02:04:59 1998 James Juran <jrj120@psu.edu>
* [misc/*.c] [miscemu/*.c] [msdos/*.c] [if1632/*.c]
[include/*.h] [loader/*.c] [memory/*.c] [multimedia/*.c]
[objects/*.c]
Almost all fprintf statements converted to appropriate
debug messages.
* [README]
Updated "GETTING MORE INFORMATION" section to include WineHQ.
* [documentation/debugger]
Fixed typo.
* [windows/defwnd.c]
Added function documentation.
Sun Apr 19 16:30:58 1998 Marcus Meissner <marcus@mud.de>
* [Make.rules.in]
Added lint target (using lclint).
* [relay32/oleaut32.spec][relay32/Makefile.in][ole/typelib.c]
[ole/ole2disp.c]
Added oleaut32 spec, added some SysString functions.
* [if1632/signal.c]
Added printing of faultaddress in Linux (using CR2 debug register).
* [configure.in]
Added <sys/types.h> for statfs checks.
* [loader/*.c][debugger/break.c][debugger/hash.c]
Started to split win32/win16 module handling, preparing support
for other binary formats (like ELF).
Sat Apr 18 10:07:41 1998 Rein Klazes <rklazes@casema.net>
* [misc/registry.c]
Fixed a bug that made RegQueryValuexxx returning
incorrect registry values.
Fri Apr 17 22:59:22 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/lstr.c]
FormatMessage32*: remove linefeed when nolinefeed set;
check for target underflow.
Fri Apr 17 00:38:14 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/crtdll.c]
Implement xlat_file_ptr for CRT stdin/stdout/stderr address
translation.
Wed Apr 15 20:43:56 1998 Jim Peterson <jspeter@birch.ee.vt.edu>
* [controls/menu.c]
Added 'odaction' parameter to MENU_DrawMenuItem() and redirected
WM_DRAWITEM messages to GetWindow(hwnd,GW_OWNER).
Tue Apr 14 16:17:55 1998 Berend Reitsma <berend@united-info.com>
* [graphics/metafiledrv/init.c] [graphics/painting.c]
[graphics/win16drv/init.c] [graphics/x11drv/graphics.c]
[graphics/x11drv/init.c] [include/gdi.h] [include/x11drv.h]
[relay32/gdi32.spec]
Added PolyPolyline routine.
* [windows/winproc.c]
Changed WINPROC_GetProc() to return proc instead of &(jmp proc).
1998-05-03 21:01:20 +02:00
|
|
|
/***********************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* GetExitCodeProcess [KERNEL32.@]
|
Release 980503
Thu Apr 30 16:28:12 1998 James Juran <jrj120@psu.edu>
* [scheduler/process.c]
Implemented GetExitCodeProcess. The code is a direct translation
of GetExitCodeThread.
Mon Apr 27 22:20:25 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [loader/pe_image.c]
Unload dummy module when PE_LoadLibraryEx32A fails with
PE_LoadImage (makes Encarta 98 installer proceed).
* [files/drive.c]
Make GetDriveType16 return DRIVE_REMOVABLE for TYPE_CDROM.
Make GetCurrentDirectory32 behave like the code does and not
like the help describes.
* [files/profile.c]
Revoke recent change in PROFILE_GetSection and try better
handling of special case.
* [include/windows.h]
Change definition of ACCEL32.
* [misc/commdlg.c]
Replace the GetXXXFilename32 macros by normal code.
Fix two reported bugs in my changes to commdlg.
* [windows/win.c]
Add a hook to catch bogus WM_SIZE messages by emitting a warning
in the appropriate case.
* [objects/bitmap.c]
Reject unreasonbable large size arguments in
CreateCompatibleBitmap32 and add an fixme for that situation.
Sun Apr 26 18:30:07 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/ldt.h] [debugger/*.c] [miscemu/instr.c]
Added IS_SELECTOR_SYSTEM and IS_SELECTOR_32BIT macros.
Make instruction emulation support system selectors.
* [loader/*.c]
Started moving NE specific functions to the new loader/ne
directory.
* [memory/environ.c]
Enforce the 127 chars limit only when creating the environment of
a Win16 process.
Sun Apr 26 12:22:23 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed an incredible typo in CopyFile32A that made it unusable
since a rewrite in 970112 (!!).
* [files/directory.c]
Fixed GetTempPath32A/W to include trailing backslash.
* [misc/ver.c]
Make find_pe_resource "work" with corrupt files.
* [misc/wsprintf.c]
Altered WPRINTF_ParseFormatA/W to treat invalid format chars
as normal output, too.
* [msdos/dpmi.c]
Implemented "Allocate/Free real mode callback" (0x0303/0x0304).
Cross your fingers if you need to use it ;) (completely untested)
Implemented "Call real mode proc with far return" (0x0301, tested).
* [msdos/int21.c]
Fixed ioctlGenericBlkDevReq/0x60.
* [relay32/dplayx.spec] [relay32/builtin32.c] [relay32/Makefile.in]
Added built-in DPLAYX.DLL.
* [windows/win.c]
Fixed GetWindowWord()/GWW_HWNDPARENT to return the window's owner
if it has no parent (SDK).
Sat Apr 25 15:09:53 1998 M.T.Fortescue <mark@mtfhpc.demon.co.uk>
* [debugger/db_disasm.c]
Fixed disassemble bug for no-display option and 'lock',
'repne' and 'repe' prefixes.
* [debugger/registers.c]
Added textual flag description output on 'info regs'.
Sat Apr 25 14:18:26 1998 Matthew Becker <mbecker@glasscity.net>
* [*/*.c]
Added stubs and/or documentation for the following functions:
LookupPrivilegeValue, OpenService, ControlService, RegGetKeySecurity,
StartService, SetComputerName, DeleteService, CloseServiceHandle,
OpenProcessToken, OpenSCManager, DeregisterEventSource,
WaitForDebugEvent, WaitForInputIdle, RegisterEventSource,
SetDebugErrorLevel, SetConsoleCursorPosition, ChoosePixelFormat,
SetPixelFormat, GetPixelFormat, DescribePixelFormat, SwapBuffers,
PolyBezier, AbortPath, DestroyAcceleratorTable, HeapWalk,
DdeInitialize, DdeUninitialize, DdeConnectList, DdeDisconnectList,
DdeCreateStringHandle, DdePostAdvise, DdeGetData, DdeNameService,
DdeGetLastError, WNetGetDirectoryType, EnumPrinters, RegFlushKey,
RegGetKeySecurity, DllGetClassObject, DllCanUnloadNow, CreateBitmap,
CreateCompatibleBitmap, CreateBitmapIndirect, GetBitmapBits,
SetBitmapBits, LoadImage, CopyImage, LoadBitmap, DrawIcon,
CreateDiscardableBitmap, SetDIBits, GetCharABCWidths, LoadTypeLib,
SetConsoleCtrlHandler, CreateConsoleScreenBuffer, ReadConsoleInput,
GetConsoleCursorInfo, SetConsoleCursorInfo, SetConsoleWindowInfo,
SetConsoleTextAttribute, SetConsoleScreenBufferSize,
FillConsoleOutputCharacter, FillConsoleOutputAttribute,
CreateMailslot, GetMailslotInfo, GetCompressedFileSize,
GetProcessWindowStation, GetThreadDesktop, SetDebugErrorLevel,
WaitForDebugEvent, SetComputerName, CreateMDIWindow.
Thu Apr 23 23:54:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [include/windows.h] [objects/enhmetafile.c] [relay32/gdi32.spec]
Implement CopyEnhMetaFile, Get/SetEnhMetaFileBits, other fixes.
* [include/windows.h] [objects/metafile.c] [relay32/gdi32.spec]
32-bit metafile fixes, implement EnumMetaFile32, GetMetaFileBitsEx.
* [objects/font.c] [graphics/x11drv/xfont.c] [graphics/x11drv/text.c]
Some rotated text support for X11R6 displays.
* [win32/newfns.c] [ole/ole2nls.c]
Moved GetNumberFormat32A.
Wed Apr 22 17:38:20 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [misc/network.c]
Changed some function documentation to the new style.
* [misc/network.c] [include/windows.h] [if1632/user.spec]
[relay32/mpr.spec] [misc/mpr.c]
Added stubs for some Win32 network functions; renamed some
16-bit ones with 32-bit counterparts, as well as
WNetGetDirectoryType; moved the stubs in misc/mpr.c (three of
them!) to misc/network.c.
* [ole/compobj.c] [ole/storage.c] [ole/ole2disp.c]
[ole/ole2nls.c] [ole/folders.c] [ole/moniker.c] [ole/ole2.c]
[graphics/fontengine.c] [graphics/ddraw.c] [graphics/env.c]
[graphics/driver.c] [graphics/escape.c]
Changed fprintf's to proper debug-macros.
* [include/winnls.h]
Added some flags (for internal use).
* [ole/ole2nls.c]
Added the Unicode core function, and worked out a way to hide
the commonality of the core.
* [relay32/kernel32.spec]
Added support for GetDate/Time32A/W.
Wed Apr 22 09:16:03 1998 Gordon Chaffee <chaffee@cs.berkeley.edu>
* [win32/code_page.c]
Fixed problem with MultiByteToWideChar that was introduced in
last release. Made MultiByteToWideChar more compatible with Win32.
* [graphics/x11drv/graphics.c]
Fixed problem with drawing arcs.
Tue Apr 21 11:24:58 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [ole/ole2nls.c]
Move stuff from 0x409 case to Lang_En.
* [relay32/user32.spec] [windows/winpos.c]
Added stubs for GetWindowRgn32 and SetWindowRgn32. Makes Office
Paperclip happy.
Tue Apr 21 11:16:16 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [loader/pe_image.c]
If image is relocated, TLS addresses need to be adjusted.
* [debugger/*.c]
Generalized tests for 32-bit segments.
Tue Apr 21 02:04:59 1998 James Juran <jrj120@psu.edu>
* [misc/*.c] [miscemu/*.c] [msdos/*.c] [if1632/*.c]
[include/*.h] [loader/*.c] [memory/*.c] [multimedia/*.c]
[objects/*.c]
Almost all fprintf statements converted to appropriate
debug messages.
* [README]
Updated "GETTING MORE INFORMATION" section to include WineHQ.
* [documentation/debugger]
Fixed typo.
* [windows/defwnd.c]
Added function documentation.
Sun Apr 19 16:30:58 1998 Marcus Meissner <marcus@mud.de>
* [Make.rules.in]
Added lint target (using lclint).
* [relay32/oleaut32.spec][relay32/Makefile.in][ole/typelib.c]
[ole/ole2disp.c]
Added oleaut32 spec, added some SysString functions.
* [if1632/signal.c]
Added printing of faultaddress in Linux (using CR2 debug register).
* [configure.in]
Added <sys/types.h> for statfs checks.
* [loader/*.c][debugger/break.c][debugger/hash.c]
Started to split win32/win16 module handling, preparing support
for other binary formats (like ELF).
Sat Apr 18 10:07:41 1998 Rein Klazes <rklazes@casema.net>
* [misc/registry.c]
Fixed a bug that made RegQueryValuexxx returning
incorrect registry values.
Fri Apr 17 22:59:22 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/lstr.c]
FormatMessage32*: remove linefeed when nolinefeed set;
check for target underflow.
Fri Apr 17 00:38:14 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/crtdll.c]
Implement xlat_file_ptr for CRT stdin/stdout/stderr address
translation.
Wed Apr 15 20:43:56 1998 Jim Peterson <jspeter@birch.ee.vt.edu>
* [controls/menu.c]
Added 'odaction' parameter to MENU_DrawMenuItem() and redirected
WM_DRAWITEM messages to GetWindow(hwnd,GW_OWNER).
Tue Apr 14 16:17:55 1998 Berend Reitsma <berend@united-info.com>
* [graphics/metafiledrv/init.c] [graphics/painting.c]
[graphics/win16drv/init.c] [graphics/x11drv/graphics.c]
[graphics/x11drv/init.c] [include/gdi.h] [include/x11drv.h]
[relay32/gdi32.spec]
Added PolyPolyline routine.
* [windows/winproc.c]
Changed WINPROC_GetProc() to return proc instead of &(jmp proc).
1998-05-03 21:01:20 +02:00
|
|
|
*
|
|
|
|
* Gets termination status of specified process
|
2002-06-01 01:06:46 +02:00
|
|
|
*
|
Release 980503
Thu Apr 30 16:28:12 1998 James Juran <jrj120@psu.edu>
* [scheduler/process.c]
Implemented GetExitCodeProcess. The code is a direct translation
of GetExitCodeThread.
Mon Apr 27 22:20:25 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [loader/pe_image.c]
Unload dummy module when PE_LoadLibraryEx32A fails with
PE_LoadImage (makes Encarta 98 installer proceed).
* [files/drive.c]
Make GetDriveType16 return DRIVE_REMOVABLE for TYPE_CDROM.
Make GetCurrentDirectory32 behave like the code does and not
like the help describes.
* [files/profile.c]
Revoke recent change in PROFILE_GetSection and try better
handling of special case.
* [include/windows.h]
Change definition of ACCEL32.
* [misc/commdlg.c]
Replace the GetXXXFilename32 macros by normal code.
Fix two reported bugs in my changes to commdlg.
* [windows/win.c]
Add a hook to catch bogus WM_SIZE messages by emitting a warning
in the appropriate case.
* [objects/bitmap.c]
Reject unreasonbable large size arguments in
CreateCompatibleBitmap32 and add an fixme for that situation.
Sun Apr 26 18:30:07 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/ldt.h] [debugger/*.c] [miscemu/instr.c]
Added IS_SELECTOR_SYSTEM and IS_SELECTOR_32BIT macros.
Make instruction emulation support system selectors.
* [loader/*.c]
Started moving NE specific functions to the new loader/ne
directory.
* [memory/environ.c]
Enforce the 127 chars limit only when creating the environment of
a Win16 process.
Sun Apr 26 12:22:23 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed an incredible typo in CopyFile32A that made it unusable
since a rewrite in 970112 (!!).
* [files/directory.c]
Fixed GetTempPath32A/W to include trailing backslash.
* [misc/ver.c]
Make find_pe_resource "work" with corrupt files.
* [misc/wsprintf.c]
Altered WPRINTF_ParseFormatA/W to treat invalid format chars
as normal output, too.
* [msdos/dpmi.c]
Implemented "Allocate/Free real mode callback" (0x0303/0x0304).
Cross your fingers if you need to use it ;) (completely untested)
Implemented "Call real mode proc with far return" (0x0301, tested).
* [msdos/int21.c]
Fixed ioctlGenericBlkDevReq/0x60.
* [relay32/dplayx.spec] [relay32/builtin32.c] [relay32/Makefile.in]
Added built-in DPLAYX.DLL.
* [windows/win.c]
Fixed GetWindowWord()/GWW_HWNDPARENT to return the window's owner
if it has no parent (SDK).
Sat Apr 25 15:09:53 1998 M.T.Fortescue <mark@mtfhpc.demon.co.uk>
* [debugger/db_disasm.c]
Fixed disassemble bug for no-display option and 'lock',
'repne' and 'repe' prefixes.
* [debugger/registers.c]
Added textual flag description output on 'info regs'.
Sat Apr 25 14:18:26 1998 Matthew Becker <mbecker@glasscity.net>
* [*/*.c]
Added stubs and/or documentation for the following functions:
LookupPrivilegeValue, OpenService, ControlService, RegGetKeySecurity,
StartService, SetComputerName, DeleteService, CloseServiceHandle,
OpenProcessToken, OpenSCManager, DeregisterEventSource,
WaitForDebugEvent, WaitForInputIdle, RegisterEventSource,
SetDebugErrorLevel, SetConsoleCursorPosition, ChoosePixelFormat,
SetPixelFormat, GetPixelFormat, DescribePixelFormat, SwapBuffers,
PolyBezier, AbortPath, DestroyAcceleratorTable, HeapWalk,
DdeInitialize, DdeUninitialize, DdeConnectList, DdeDisconnectList,
DdeCreateStringHandle, DdePostAdvise, DdeGetData, DdeNameService,
DdeGetLastError, WNetGetDirectoryType, EnumPrinters, RegFlushKey,
RegGetKeySecurity, DllGetClassObject, DllCanUnloadNow, CreateBitmap,
CreateCompatibleBitmap, CreateBitmapIndirect, GetBitmapBits,
SetBitmapBits, LoadImage, CopyImage, LoadBitmap, DrawIcon,
CreateDiscardableBitmap, SetDIBits, GetCharABCWidths, LoadTypeLib,
SetConsoleCtrlHandler, CreateConsoleScreenBuffer, ReadConsoleInput,
GetConsoleCursorInfo, SetConsoleCursorInfo, SetConsoleWindowInfo,
SetConsoleTextAttribute, SetConsoleScreenBufferSize,
FillConsoleOutputCharacter, FillConsoleOutputAttribute,
CreateMailslot, GetMailslotInfo, GetCompressedFileSize,
GetProcessWindowStation, GetThreadDesktop, SetDebugErrorLevel,
WaitForDebugEvent, SetComputerName, CreateMDIWindow.
Thu Apr 23 23:54:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [include/windows.h] [objects/enhmetafile.c] [relay32/gdi32.spec]
Implement CopyEnhMetaFile, Get/SetEnhMetaFileBits, other fixes.
* [include/windows.h] [objects/metafile.c] [relay32/gdi32.spec]
32-bit metafile fixes, implement EnumMetaFile32, GetMetaFileBitsEx.
* [objects/font.c] [graphics/x11drv/xfont.c] [graphics/x11drv/text.c]
Some rotated text support for X11R6 displays.
* [win32/newfns.c] [ole/ole2nls.c]
Moved GetNumberFormat32A.
Wed Apr 22 17:38:20 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [misc/network.c]
Changed some function documentation to the new style.
* [misc/network.c] [include/windows.h] [if1632/user.spec]
[relay32/mpr.spec] [misc/mpr.c]
Added stubs for some Win32 network functions; renamed some
16-bit ones with 32-bit counterparts, as well as
WNetGetDirectoryType; moved the stubs in misc/mpr.c (three of
them!) to misc/network.c.
* [ole/compobj.c] [ole/storage.c] [ole/ole2disp.c]
[ole/ole2nls.c] [ole/folders.c] [ole/moniker.c] [ole/ole2.c]
[graphics/fontengine.c] [graphics/ddraw.c] [graphics/env.c]
[graphics/driver.c] [graphics/escape.c]
Changed fprintf's to proper debug-macros.
* [include/winnls.h]
Added some flags (for internal use).
* [ole/ole2nls.c]
Added the Unicode core function, and worked out a way to hide
the commonality of the core.
* [relay32/kernel32.spec]
Added support for GetDate/Time32A/W.
Wed Apr 22 09:16:03 1998 Gordon Chaffee <chaffee@cs.berkeley.edu>
* [win32/code_page.c]
Fixed problem with MultiByteToWideChar that was introduced in
last release. Made MultiByteToWideChar more compatible with Win32.
* [graphics/x11drv/graphics.c]
Fixed problem with drawing arcs.
Tue Apr 21 11:24:58 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [ole/ole2nls.c]
Move stuff from 0x409 case to Lang_En.
* [relay32/user32.spec] [windows/winpos.c]
Added stubs for GetWindowRgn32 and SetWindowRgn32. Makes Office
Paperclip happy.
Tue Apr 21 11:16:16 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [loader/pe_image.c]
If image is relocated, TLS addresses need to be adjusted.
* [debugger/*.c]
Generalized tests for 32-bit segments.
Tue Apr 21 02:04:59 1998 James Juran <jrj120@psu.edu>
* [misc/*.c] [miscemu/*.c] [msdos/*.c] [if1632/*.c]
[include/*.h] [loader/*.c] [memory/*.c] [multimedia/*.c]
[objects/*.c]
Almost all fprintf statements converted to appropriate
debug messages.
* [README]
Updated "GETTING MORE INFORMATION" section to include WineHQ.
* [documentation/debugger]
Fixed typo.
* [windows/defwnd.c]
Added function documentation.
Sun Apr 19 16:30:58 1998 Marcus Meissner <marcus@mud.de>
* [Make.rules.in]
Added lint target (using lclint).
* [relay32/oleaut32.spec][relay32/Makefile.in][ole/typelib.c]
[ole/ole2disp.c]
Added oleaut32 spec, added some SysString functions.
* [if1632/signal.c]
Added printing of faultaddress in Linux (using CR2 debug register).
* [configure.in]
Added <sys/types.h> for statfs checks.
* [loader/*.c][debugger/break.c][debugger/hash.c]
Started to split win32/win16 module handling, preparing support
for other binary formats (like ELF).
Sat Apr 18 10:07:41 1998 Rein Klazes <rklazes@casema.net>
* [misc/registry.c]
Fixed a bug that made RegQueryValuexxx returning
incorrect registry values.
Fri Apr 17 22:59:22 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/lstr.c]
FormatMessage32*: remove linefeed when nolinefeed set;
check for target underflow.
Fri Apr 17 00:38:14 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/crtdll.c]
Implement xlat_file_ptr for CRT stdin/stdout/stderr address
translation.
Wed Apr 15 20:43:56 1998 Jim Peterson <jspeter@birch.ee.vt.edu>
* [controls/menu.c]
Added 'odaction' parameter to MENU_DrawMenuItem() and redirected
WM_DRAWITEM messages to GetWindow(hwnd,GW_OWNER).
Tue Apr 14 16:17:55 1998 Berend Reitsma <berend@united-info.com>
* [graphics/metafiledrv/init.c] [graphics/painting.c]
[graphics/win16drv/init.c] [graphics/x11drv/graphics.c]
[graphics/x11drv/init.c] [include/gdi.h] [include/x11drv.h]
[relay32/gdi32.spec]
Added PolyPolyline routine.
* [windows/winproc.c]
Changed WINPROC_GetProc() to return proc instead of &(jmp proc).
1998-05-03 21:01:20 +02:00
|
|
|
* RETURNS
|
|
|
|
* Success: TRUE
|
|
|
|
* Failure: FALSE
|
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI GetExitCodeProcess(
|
2000-12-02 00:58:28 +01:00
|
|
|
HANDLE hProcess, /* [in] handle to the process */
|
|
|
|
LPDWORD lpExitCode) /* [out] address to receive termination status */
|
Release 980503
Thu Apr 30 16:28:12 1998 James Juran <jrj120@psu.edu>
* [scheduler/process.c]
Implemented GetExitCodeProcess. The code is a direct translation
of GetExitCodeThread.
Mon Apr 27 22:20:25 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [loader/pe_image.c]
Unload dummy module when PE_LoadLibraryEx32A fails with
PE_LoadImage (makes Encarta 98 installer proceed).
* [files/drive.c]
Make GetDriveType16 return DRIVE_REMOVABLE for TYPE_CDROM.
Make GetCurrentDirectory32 behave like the code does and not
like the help describes.
* [files/profile.c]
Revoke recent change in PROFILE_GetSection and try better
handling of special case.
* [include/windows.h]
Change definition of ACCEL32.
* [misc/commdlg.c]
Replace the GetXXXFilename32 macros by normal code.
Fix two reported bugs in my changes to commdlg.
* [windows/win.c]
Add a hook to catch bogus WM_SIZE messages by emitting a warning
in the appropriate case.
* [objects/bitmap.c]
Reject unreasonbable large size arguments in
CreateCompatibleBitmap32 and add an fixme for that situation.
Sun Apr 26 18:30:07 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/ldt.h] [debugger/*.c] [miscemu/instr.c]
Added IS_SELECTOR_SYSTEM and IS_SELECTOR_32BIT macros.
Make instruction emulation support system selectors.
* [loader/*.c]
Started moving NE specific functions to the new loader/ne
directory.
* [memory/environ.c]
Enforce the 127 chars limit only when creating the environment of
a Win16 process.
Sun Apr 26 12:22:23 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed an incredible typo in CopyFile32A that made it unusable
since a rewrite in 970112 (!!).
* [files/directory.c]
Fixed GetTempPath32A/W to include trailing backslash.
* [misc/ver.c]
Make find_pe_resource "work" with corrupt files.
* [misc/wsprintf.c]
Altered WPRINTF_ParseFormatA/W to treat invalid format chars
as normal output, too.
* [msdos/dpmi.c]
Implemented "Allocate/Free real mode callback" (0x0303/0x0304).
Cross your fingers if you need to use it ;) (completely untested)
Implemented "Call real mode proc with far return" (0x0301, tested).
* [msdos/int21.c]
Fixed ioctlGenericBlkDevReq/0x60.
* [relay32/dplayx.spec] [relay32/builtin32.c] [relay32/Makefile.in]
Added built-in DPLAYX.DLL.
* [windows/win.c]
Fixed GetWindowWord()/GWW_HWNDPARENT to return the window's owner
if it has no parent (SDK).
Sat Apr 25 15:09:53 1998 M.T.Fortescue <mark@mtfhpc.demon.co.uk>
* [debugger/db_disasm.c]
Fixed disassemble bug for no-display option and 'lock',
'repne' and 'repe' prefixes.
* [debugger/registers.c]
Added textual flag description output on 'info regs'.
Sat Apr 25 14:18:26 1998 Matthew Becker <mbecker@glasscity.net>
* [*/*.c]
Added stubs and/or documentation for the following functions:
LookupPrivilegeValue, OpenService, ControlService, RegGetKeySecurity,
StartService, SetComputerName, DeleteService, CloseServiceHandle,
OpenProcessToken, OpenSCManager, DeregisterEventSource,
WaitForDebugEvent, WaitForInputIdle, RegisterEventSource,
SetDebugErrorLevel, SetConsoleCursorPosition, ChoosePixelFormat,
SetPixelFormat, GetPixelFormat, DescribePixelFormat, SwapBuffers,
PolyBezier, AbortPath, DestroyAcceleratorTable, HeapWalk,
DdeInitialize, DdeUninitialize, DdeConnectList, DdeDisconnectList,
DdeCreateStringHandle, DdePostAdvise, DdeGetData, DdeNameService,
DdeGetLastError, WNetGetDirectoryType, EnumPrinters, RegFlushKey,
RegGetKeySecurity, DllGetClassObject, DllCanUnloadNow, CreateBitmap,
CreateCompatibleBitmap, CreateBitmapIndirect, GetBitmapBits,
SetBitmapBits, LoadImage, CopyImage, LoadBitmap, DrawIcon,
CreateDiscardableBitmap, SetDIBits, GetCharABCWidths, LoadTypeLib,
SetConsoleCtrlHandler, CreateConsoleScreenBuffer, ReadConsoleInput,
GetConsoleCursorInfo, SetConsoleCursorInfo, SetConsoleWindowInfo,
SetConsoleTextAttribute, SetConsoleScreenBufferSize,
FillConsoleOutputCharacter, FillConsoleOutputAttribute,
CreateMailslot, GetMailslotInfo, GetCompressedFileSize,
GetProcessWindowStation, GetThreadDesktop, SetDebugErrorLevel,
WaitForDebugEvent, SetComputerName, CreateMDIWindow.
Thu Apr 23 23:54:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [include/windows.h] [objects/enhmetafile.c] [relay32/gdi32.spec]
Implement CopyEnhMetaFile, Get/SetEnhMetaFileBits, other fixes.
* [include/windows.h] [objects/metafile.c] [relay32/gdi32.spec]
32-bit metafile fixes, implement EnumMetaFile32, GetMetaFileBitsEx.
* [objects/font.c] [graphics/x11drv/xfont.c] [graphics/x11drv/text.c]
Some rotated text support for X11R6 displays.
* [win32/newfns.c] [ole/ole2nls.c]
Moved GetNumberFormat32A.
Wed Apr 22 17:38:20 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [misc/network.c]
Changed some function documentation to the new style.
* [misc/network.c] [include/windows.h] [if1632/user.spec]
[relay32/mpr.spec] [misc/mpr.c]
Added stubs for some Win32 network functions; renamed some
16-bit ones with 32-bit counterparts, as well as
WNetGetDirectoryType; moved the stubs in misc/mpr.c (three of
them!) to misc/network.c.
* [ole/compobj.c] [ole/storage.c] [ole/ole2disp.c]
[ole/ole2nls.c] [ole/folders.c] [ole/moniker.c] [ole/ole2.c]
[graphics/fontengine.c] [graphics/ddraw.c] [graphics/env.c]
[graphics/driver.c] [graphics/escape.c]
Changed fprintf's to proper debug-macros.
* [include/winnls.h]
Added some flags (for internal use).
* [ole/ole2nls.c]
Added the Unicode core function, and worked out a way to hide
the commonality of the core.
* [relay32/kernel32.spec]
Added support for GetDate/Time32A/W.
Wed Apr 22 09:16:03 1998 Gordon Chaffee <chaffee@cs.berkeley.edu>
* [win32/code_page.c]
Fixed problem with MultiByteToWideChar that was introduced in
last release. Made MultiByteToWideChar more compatible with Win32.
* [graphics/x11drv/graphics.c]
Fixed problem with drawing arcs.
Tue Apr 21 11:24:58 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [ole/ole2nls.c]
Move stuff from 0x409 case to Lang_En.
* [relay32/user32.spec] [windows/winpos.c]
Added stubs for GetWindowRgn32 and SetWindowRgn32. Makes Office
Paperclip happy.
Tue Apr 21 11:16:16 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [loader/pe_image.c]
If image is relocated, TLS addresses need to be adjusted.
* [debugger/*.c]
Generalized tests for 32-bit segments.
Tue Apr 21 02:04:59 1998 James Juran <jrj120@psu.edu>
* [misc/*.c] [miscemu/*.c] [msdos/*.c] [if1632/*.c]
[include/*.h] [loader/*.c] [memory/*.c] [multimedia/*.c]
[objects/*.c]
Almost all fprintf statements converted to appropriate
debug messages.
* [README]
Updated "GETTING MORE INFORMATION" section to include WineHQ.
* [documentation/debugger]
Fixed typo.
* [windows/defwnd.c]
Added function documentation.
Sun Apr 19 16:30:58 1998 Marcus Meissner <marcus@mud.de>
* [Make.rules.in]
Added lint target (using lclint).
* [relay32/oleaut32.spec][relay32/Makefile.in][ole/typelib.c]
[ole/ole2disp.c]
Added oleaut32 spec, added some SysString functions.
* [if1632/signal.c]
Added printing of faultaddress in Linux (using CR2 debug register).
* [configure.in]
Added <sys/types.h> for statfs checks.
* [loader/*.c][debugger/break.c][debugger/hash.c]
Started to split win32/win16 module handling, preparing support
for other binary formats (like ELF).
Sat Apr 18 10:07:41 1998 Rein Klazes <rklazes@casema.net>
* [misc/registry.c]
Fixed a bug that made RegQueryValuexxx returning
incorrect registry values.
Fri Apr 17 22:59:22 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/lstr.c]
FormatMessage32*: remove linefeed when nolinefeed set;
check for target underflow.
Fri Apr 17 00:38:14 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/crtdll.c]
Implement xlat_file_ptr for CRT stdin/stdout/stderr address
translation.
Wed Apr 15 20:43:56 1998 Jim Peterson <jspeter@birch.ee.vt.edu>
* [controls/menu.c]
Added 'odaction' parameter to MENU_DrawMenuItem() and redirected
WM_DRAWITEM messages to GetWindow(hwnd,GW_OWNER).
Tue Apr 14 16:17:55 1998 Berend Reitsma <berend@united-info.com>
* [graphics/metafiledrv/init.c] [graphics/painting.c]
[graphics/win16drv/init.c] [graphics/x11drv/graphics.c]
[graphics/x11drv/init.c] [include/gdi.h] [include/x11drv.h]
[relay32/gdi32.spec]
Added PolyPolyline routine.
* [windows/winproc.c]
Changed WINPROC_GetProc() to return proc instead of &(jmp proc).
1998-05-03 21:01:20 +02:00
|
|
|
{
|
2000-08-30 02:00:48 +02:00
|
|
|
BOOL ret;
|
2001-02-27 03:09:16 +01:00
|
|
|
SERVER_START_REQ( get_process_info )
|
1999-06-26 10:43:26 +02:00
|
|
|
{
|
2000-08-30 02:00:48 +02:00
|
|
|
req->handle = hProcess;
|
2001-11-30 19:46:42 +01:00
|
|
|
ret = !wine_server_call_err( req );
|
|
|
|
if (ret && lpExitCode) *lpExitCode = reply->exit_code;
|
1999-06-26 10:43:26 +02:00
|
|
|
}
|
2000-08-30 02:00:48 +02:00
|
|
|
SERVER_END_REQ;
|
1999-06-26 10:43:26 +02:00
|
|
|
return ret;
|
Release 980503
Thu Apr 30 16:28:12 1998 James Juran <jrj120@psu.edu>
* [scheduler/process.c]
Implemented GetExitCodeProcess. The code is a direct translation
of GetExitCodeThread.
Mon Apr 27 22:20:25 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [loader/pe_image.c]
Unload dummy module when PE_LoadLibraryEx32A fails with
PE_LoadImage (makes Encarta 98 installer proceed).
* [files/drive.c]
Make GetDriveType16 return DRIVE_REMOVABLE for TYPE_CDROM.
Make GetCurrentDirectory32 behave like the code does and not
like the help describes.
* [files/profile.c]
Revoke recent change in PROFILE_GetSection and try better
handling of special case.
* [include/windows.h]
Change definition of ACCEL32.
* [misc/commdlg.c]
Replace the GetXXXFilename32 macros by normal code.
Fix two reported bugs in my changes to commdlg.
* [windows/win.c]
Add a hook to catch bogus WM_SIZE messages by emitting a warning
in the appropriate case.
* [objects/bitmap.c]
Reject unreasonbable large size arguments in
CreateCompatibleBitmap32 and add an fixme for that situation.
Sun Apr 26 18:30:07 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/ldt.h] [debugger/*.c] [miscemu/instr.c]
Added IS_SELECTOR_SYSTEM and IS_SELECTOR_32BIT macros.
Make instruction emulation support system selectors.
* [loader/*.c]
Started moving NE specific functions to the new loader/ne
directory.
* [memory/environ.c]
Enforce the 127 chars limit only when creating the environment of
a Win16 process.
Sun Apr 26 12:22:23 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed an incredible typo in CopyFile32A that made it unusable
since a rewrite in 970112 (!!).
* [files/directory.c]
Fixed GetTempPath32A/W to include trailing backslash.
* [misc/ver.c]
Make find_pe_resource "work" with corrupt files.
* [misc/wsprintf.c]
Altered WPRINTF_ParseFormatA/W to treat invalid format chars
as normal output, too.
* [msdos/dpmi.c]
Implemented "Allocate/Free real mode callback" (0x0303/0x0304).
Cross your fingers if you need to use it ;) (completely untested)
Implemented "Call real mode proc with far return" (0x0301, tested).
* [msdos/int21.c]
Fixed ioctlGenericBlkDevReq/0x60.
* [relay32/dplayx.spec] [relay32/builtin32.c] [relay32/Makefile.in]
Added built-in DPLAYX.DLL.
* [windows/win.c]
Fixed GetWindowWord()/GWW_HWNDPARENT to return the window's owner
if it has no parent (SDK).
Sat Apr 25 15:09:53 1998 M.T.Fortescue <mark@mtfhpc.demon.co.uk>
* [debugger/db_disasm.c]
Fixed disassemble bug for no-display option and 'lock',
'repne' and 'repe' prefixes.
* [debugger/registers.c]
Added textual flag description output on 'info regs'.
Sat Apr 25 14:18:26 1998 Matthew Becker <mbecker@glasscity.net>
* [*/*.c]
Added stubs and/or documentation for the following functions:
LookupPrivilegeValue, OpenService, ControlService, RegGetKeySecurity,
StartService, SetComputerName, DeleteService, CloseServiceHandle,
OpenProcessToken, OpenSCManager, DeregisterEventSource,
WaitForDebugEvent, WaitForInputIdle, RegisterEventSource,
SetDebugErrorLevel, SetConsoleCursorPosition, ChoosePixelFormat,
SetPixelFormat, GetPixelFormat, DescribePixelFormat, SwapBuffers,
PolyBezier, AbortPath, DestroyAcceleratorTable, HeapWalk,
DdeInitialize, DdeUninitialize, DdeConnectList, DdeDisconnectList,
DdeCreateStringHandle, DdePostAdvise, DdeGetData, DdeNameService,
DdeGetLastError, WNetGetDirectoryType, EnumPrinters, RegFlushKey,
RegGetKeySecurity, DllGetClassObject, DllCanUnloadNow, CreateBitmap,
CreateCompatibleBitmap, CreateBitmapIndirect, GetBitmapBits,
SetBitmapBits, LoadImage, CopyImage, LoadBitmap, DrawIcon,
CreateDiscardableBitmap, SetDIBits, GetCharABCWidths, LoadTypeLib,
SetConsoleCtrlHandler, CreateConsoleScreenBuffer, ReadConsoleInput,
GetConsoleCursorInfo, SetConsoleCursorInfo, SetConsoleWindowInfo,
SetConsoleTextAttribute, SetConsoleScreenBufferSize,
FillConsoleOutputCharacter, FillConsoleOutputAttribute,
CreateMailslot, GetMailslotInfo, GetCompressedFileSize,
GetProcessWindowStation, GetThreadDesktop, SetDebugErrorLevel,
WaitForDebugEvent, SetComputerName, CreateMDIWindow.
Thu Apr 23 23:54:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [include/windows.h] [objects/enhmetafile.c] [relay32/gdi32.spec]
Implement CopyEnhMetaFile, Get/SetEnhMetaFileBits, other fixes.
* [include/windows.h] [objects/metafile.c] [relay32/gdi32.spec]
32-bit metafile fixes, implement EnumMetaFile32, GetMetaFileBitsEx.
* [objects/font.c] [graphics/x11drv/xfont.c] [graphics/x11drv/text.c]
Some rotated text support for X11R6 displays.
* [win32/newfns.c] [ole/ole2nls.c]
Moved GetNumberFormat32A.
Wed Apr 22 17:38:20 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [misc/network.c]
Changed some function documentation to the new style.
* [misc/network.c] [include/windows.h] [if1632/user.spec]
[relay32/mpr.spec] [misc/mpr.c]
Added stubs for some Win32 network functions; renamed some
16-bit ones with 32-bit counterparts, as well as
WNetGetDirectoryType; moved the stubs in misc/mpr.c (three of
them!) to misc/network.c.
* [ole/compobj.c] [ole/storage.c] [ole/ole2disp.c]
[ole/ole2nls.c] [ole/folders.c] [ole/moniker.c] [ole/ole2.c]
[graphics/fontengine.c] [graphics/ddraw.c] [graphics/env.c]
[graphics/driver.c] [graphics/escape.c]
Changed fprintf's to proper debug-macros.
* [include/winnls.h]
Added some flags (for internal use).
* [ole/ole2nls.c]
Added the Unicode core function, and worked out a way to hide
the commonality of the core.
* [relay32/kernel32.spec]
Added support for GetDate/Time32A/W.
Wed Apr 22 09:16:03 1998 Gordon Chaffee <chaffee@cs.berkeley.edu>
* [win32/code_page.c]
Fixed problem with MultiByteToWideChar that was introduced in
last release. Made MultiByteToWideChar more compatible with Win32.
* [graphics/x11drv/graphics.c]
Fixed problem with drawing arcs.
Tue Apr 21 11:24:58 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [ole/ole2nls.c]
Move stuff from 0x409 case to Lang_En.
* [relay32/user32.spec] [windows/winpos.c]
Added stubs for GetWindowRgn32 and SetWindowRgn32. Makes Office
Paperclip happy.
Tue Apr 21 11:16:16 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [loader/pe_image.c]
If image is relocated, TLS addresses need to be adjusted.
* [debugger/*.c]
Generalized tests for 32-bit segments.
Tue Apr 21 02:04:59 1998 James Juran <jrj120@psu.edu>
* [misc/*.c] [miscemu/*.c] [msdos/*.c] [if1632/*.c]
[include/*.h] [loader/*.c] [memory/*.c] [multimedia/*.c]
[objects/*.c]
Almost all fprintf statements converted to appropriate
debug messages.
* [README]
Updated "GETTING MORE INFORMATION" section to include WineHQ.
* [documentation/debugger]
Fixed typo.
* [windows/defwnd.c]
Added function documentation.
Sun Apr 19 16:30:58 1998 Marcus Meissner <marcus@mud.de>
* [Make.rules.in]
Added lint target (using lclint).
* [relay32/oleaut32.spec][relay32/Makefile.in][ole/typelib.c]
[ole/ole2disp.c]
Added oleaut32 spec, added some SysString functions.
* [if1632/signal.c]
Added printing of faultaddress in Linux (using CR2 debug register).
* [configure.in]
Added <sys/types.h> for statfs checks.
* [loader/*.c][debugger/break.c][debugger/hash.c]
Started to split win32/win16 module handling, preparing support
for other binary formats (like ELF).
Sat Apr 18 10:07:41 1998 Rein Klazes <rklazes@casema.net>
* [misc/registry.c]
Fixed a bug that made RegQueryValuexxx returning
incorrect registry values.
Fri Apr 17 22:59:22 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/lstr.c]
FormatMessage32*: remove linefeed when nolinefeed set;
check for target underflow.
Fri Apr 17 00:38:14 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/crtdll.c]
Implement xlat_file_ptr for CRT stdin/stdout/stderr address
translation.
Wed Apr 15 20:43:56 1998 Jim Peterson <jspeter@birch.ee.vt.edu>
* [controls/menu.c]
Added 'odaction' parameter to MENU_DrawMenuItem() and redirected
WM_DRAWITEM messages to GetWindow(hwnd,GW_OWNER).
Tue Apr 14 16:17:55 1998 Berend Reitsma <berend@united-info.com>
* [graphics/metafiledrv/init.c] [graphics/painting.c]
[graphics/win16drv/init.c] [graphics/x11drv/graphics.c]
[graphics/x11drv/init.c] [include/gdi.h] [include/x11drv.h]
[relay32/gdi32.spec]
Added PolyPolyline routine.
* [windows/winproc.c]
Changed WINPROC_GetProc() to return proc instead of &(jmp proc).
1998-05-03 21:01:20 +02:00
|
|
|
}
|
Release 980614
Sun Jun 15 10:30:35 1998 Andreas Mohr <100.30936@germany.net>
* [files/dos_fs.c] [files/file.c] [if1632/wprocs.spec]
[misc/aspi.c]
Added support for scanners that need Adaptec's ASPI2DOS.
* [graphics/env.c] [misc/printerdrv.c] [graphics/win16drv/init.c]
[if1632/gdi.spec] [include/gdi.h]
Enhanced printer support (especially Win95):
Drv[GS]etPrinterData, [GS]etEnvironment; added AbortProc handling.
* [misc/tapi32.c] [relay32/tapi32.spec]
Added some stubs.
* [configure.in] [graphics/fontengine.c] [include/windows.h]
[misc/comm.c] [misc/w32skrnl.c] [misc/win32s16.c]
Made Wine compile on HP-UX (just for fun ;)
* [controls/menu.c] [include/windows.h]
Complete rewrite of EnableMenuItem32.
Free Agent 32 still doesn't work :(
* [misc/version.c] [if1632/kernel.spec] [include/winbase.h]
Implemented GetVersionEx16.
* [misc/network.c] [if1632/user.spec]
Fixed arguments of WNetGetPropertyText.
* [misc/version.c] [relay32/comctl32.spec] [relay32/oleaut32.spec]
Implemented COMCTL32_DllGetVersion, OaBuildVersion.
* [win32/file.c]
Fixed UNC handling of CreateFile32.
Sat Jun 13 22:35:12 1998 Douglas Ridgway <ridgway@winehq.com>
* [Makefile.in] [Make.rules.in]
Added pattern for CVS merge files to 'make clean'
* [ole/olecli.c] [windows/scroll.c] [windows/grahics.c]
Add some DC handle unlocking. (When hdc's are always unlocked,
they can be made moveable.)
* [documentation/wine.texinfo]
Started a Wine Design chapter with discussion of
graphics driver model.
Sat Jun 13 11:19:25 1998 David Luyer <luyer@ucs.uwa.edu.au>
* [misc/main.c] [relay32/relay386.c]
Added new option -debugmsg +relay=.... or -debugmsg -relay=...
Fri Jun 12 22:56:09 1998 Marcus Meissner <marcus@jet.franken.de>
* [relay32/snoop.c][relay32/builtin.c][loader/pe_image.c]
Added inter win32 dll snooping. Use -debugmsg +snoop.
Number of arguments and string references are autodetected.
Some small bugfixes in the PE loader.
* [misc/system.c]
Disabled SystemTimers. They do not work with the current
%fs handling in the 32->16 relaycode. (helps labview)
* [msdos/dpmi.c][msdos/int2f.c][files/drive.c]
Added a monoton linear increasing memory allocator for DPMI (required
for LabView, HAFAS, ...)
mscdex handling in emulated realmode interrupts (for mcicda.drv)
allocate logical drives only once. (helps Myst)
* [files/profile.c]
Handle ^Z as space. Found on CDROMS (helps Myst Installer).
* [multimedia/mmio.c]
mmio* partially updated to win32. No funny additions.
* [windows/driver.c]
Added win32 driver handling (will be used for win32 multimedia/
msvideo drivers).
* [win32/device.c]
Added device handling (K32OBJ_DEVICE_IOCTL). Implemented
VTDAPI.5 (used by win95' WINMM.timeGetTime())
Fri Jun 12 18:01:18 1998 Rein Klazes <rklazes@casema.net>
* [ole/compobj.c relay32/ole32.spec]
Add a stub for CoLockObjectExternal32.
* [objects/clipping.c]
Fix in IntersectClipRect(), when there is no initial clipping
region.
* [graphics/x11drv/graphics.c]
Corrected several "one-off" errors for the Ellipse, Rectangle
and RoundRectangle (especially small ones) draw routines.
Arc and friends still have to be done.
Fri Jun 12 06:23:19 1998 Matthew Becker <mbecker@glasscity.net>
* [misc/ntdll.c]
Fixed some of the parameter counts.
* [misc/registry.c]
General cleanup, documentation.
Standard keys are allowed to be 'closed' and succeed.
* [misc/shell.c]
Check for correct return values from Reg* functions.
* [win32/newfns.c]
Added stubs for OpenDesktopA, SetThreadDesktop, and
SetUserObjectInformationA.
Wed Jun 10 20:28:08 1998 James Juran <jrj120@psu.edu>
* [debugger/break.c]
Fixed bug introduced in 980503 that broke the -debug command
line option for PE executable files.
* [configure.in] [include/acconfig.h] [include/debugtools.h]
[documentation/debug-msgs]
Added 'configure' options to compile out debugging messages.
Use --disable-debug to disable all debugging messages, and
--disable-trace to just disable TRACE messages. This results
in a stripped executable that is 15-20% smaller. This option
is very much untested--don't expect it to work.
* [documentation/debug-msgs] [documentation/debugging]
Minor updates.
* [*/*.c]
Fixed some compile warnings. This also includes the
compile_warnings_trivial patch from WineHQ.
Tue Jun 10 22:00:18 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [windows/sysmetrics.c][include/sysmetrics.h]
Fixed some Win95 values.
* [windows/nonclient.c][include/windows.h]
Fixed some Win95 drawing bugs.
Added extended window style flags (WS_EX_xxx).
* [misc/printdrv.c][relay32/winspool.spec]
Added stubs for DeletePrinterDriver32A, DeleteMonitor32A
and DeletePort32A.
* [windows/mdi.c][include/windows.h][relay32/user32.spec]
Added stubs for CascadeWindows and TileWindows.
* [controls/toolbar.c][include/toolbar.h]
Fixed a few bugs and implemented new features.
* [misc/shellord.c][relay32/shell32.spec]
Added stubs for SHELL32_60, SHELL32_61 and SHELL32_184.
* [controls/comctl32undoc.c][relay32/comctl32.spec]
New file comctl32undoc.c. Contains undocumented functions
of COMCTL32.DLL. These functions are needed to run EXPLORER.EXE
IEXPLORE.EXE and TASKMAN.EXE.
* [controls/status.c]
Added text alignment.
Tue Jun 8 22:00:00 1998 Bertho Stultiens <bertho@akhphd.au.dk>
* [programs/*/Makefile.in]
Changed the rules to use wrc as resource compiler but
passing the source through gcc first for macro expansion.
* [programs/*/*.rc]
Added #include "windows.h" for the resource compiler in the
appropriate files.
* [tools/wrc/wrc.[ch]] [tools/wrc/writeres.c]
Added commandline option -A for autoregister code.
Corrected the underscore problem by checking the proper define
from config.h.
Sun Jun 7 22:09:29 1998 Pascal Cuoq <pcuoq@ens-lyon.fr>
* [ole/ole2nls.c] [memory/string.c]
Improved LCMapString32A, and changed CompareString32A,
lstrcmp, lstrcmpi to use it.
Sat Jun 6 19:00:50 1998 Martin Strmberg <ams@ludd.luth.se>
* [include/winnt.h]
Added typedefs for security and tokens.
Sat Jun 6 12:26:31 1998 Morten Welinder <terra@diku.dk>
* [objects/text.c]
Use debugstr_an in DrawText16.
* [loader/resource.c]
Use debugres_w in FindResourceEx32W. Avoid crashing during
debug when wm is NULL.
* [if1632/relay.c]
In RELAY_DebugCallTo16, send output to the right place and
avoid side effects in macro arguments.
Wed Jun 3 20:56:03 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [controls/scroll.c] [windows/nonclient.c]
Fix several off by one errors in scrollbar painting.
Tue Jun 2 23:58:59 1998 Insomnia (Stea Greene) <insomnia@core.binghamton.edu>
* [graphics/dsound.c]
Rewrote mixer code to handle panning and volume for 16->16, 16->8,
8->16, and 8->8 bit mixes. Conforms to DirectX's "logarithmic
hearing scale" as specified in M$VC docs. Still does not handle
mixing of different frequencies (I am still working on that).
Tested 16->16 extensively with StarCraft. Other mixing combinations
untested but should work fine. Still kind of a work in progress,
so be warned.
Tue Jun 2 03:31:33 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [tools/wrc/utils.c]
dup_basename: fix to strip directory.
Mon Jun 1 20:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [include/windows.h] [objects/cursoricon.c] [relay32/user32.spec]
Added stubs LoadCursorFromFileW and LoadCursorFromFileA.
1998-06-14 17:24:15 +02:00
|
|
|
|
1999-01-19 18:48:23 +01:00
|
|
|
|
1999-06-22 13:43:42 +02:00
|
|
|
/***********************************************************************
|
2001-02-15 00:11:17 +01:00
|
|
|
* SetErrorMode (KERNEL32.@)
|
1999-06-22 13:43:42 +02:00
|
|
|
*/
|
|
|
|
UINT WINAPI SetErrorMode( UINT mode )
|
|
|
|
{
|
2000-08-10 00:33:42 +02:00
|
|
|
UINT old = current_process.error_mode;
|
|
|
|
current_process.error_mode = mode;
|
1999-06-22 13:43:42 +02:00
|
|
|
return old;
|
|
|
|
}
|
2000-04-11 22:01:59 +02:00
|
|
|
|
2000-12-11 04:48:15 +01:00
|
|
|
|
2002-05-23 21:40:18 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* GetTickCount (KERNEL32.@)
|
|
|
|
*
|
|
|
|
* Returns the number of milliseconds, modulo 2^32, since the start
|
|
|
|
* of the wineserver.
|
|
|
|
*/
|
|
|
|
DWORD WINAPI GetTickCount(void)
|
|
|
|
{
|
|
|
|
struct timeval t;
|
|
|
|
gettimeofday( &t, NULL );
|
|
|
|
return ((t.tv_sec * 1000) + (t.tv_usec / 1000)) - server_startticks;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-12-11 04:48:15 +01:00
|
|
|
/**********************************************************************
|
2001-02-15 00:11:17 +01:00
|
|
|
* TlsAlloc [KERNEL32.@] Allocates a TLS index.
|
2000-12-11 04:48:15 +01:00
|
|
|
*
|
|
|
|
* Allocates a thread local storage index
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: TLS Index
|
|
|
|
* Failure: 0xFFFFFFFF
|
|
|
|
*/
|
|
|
|
DWORD WINAPI TlsAlloc( void )
|
|
|
|
{
|
|
|
|
DWORD i, mask, ret = 0;
|
|
|
|
DWORD *bits = current_process.tls_bits;
|
|
|
|
RtlAcquirePebLock();
|
|
|
|
if (*bits == 0xffffffff)
|
|
|
|
{
|
|
|
|
bits++;
|
|
|
|
ret = 32;
|
|
|
|
if (*bits == 0xffffffff)
|
|
|
|
{
|
|
|
|
RtlReleasePebLock();
|
|
|
|
SetLastError( ERROR_NO_MORE_ITEMS );
|
|
|
|
return 0xffffffff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (i = 0, mask = 1; i < 32; i++, mask <<= 1) if (!(*bits & mask)) break;
|
|
|
|
*bits |= mask;
|
|
|
|
RtlReleasePebLock();
|
2003-08-28 01:14:29 +02:00
|
|
|
NtCurrentTeb()->TlsSlots[ret+i] = 0; /* clear the value */
|
2000-12-11 04:48:15 +01:00
|
|
|
return ret + i;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
2001-02-15 00:11:17 +01:00
|
|
|
* TlsFree [KERNEL32.@] Releases a TLS index.
|
2000-12-11 04:48:15 +01:00
|
|
|
*
|
|
|
|
* Releases a thread local storage index, making it available for reuse
|
2002-06-01 01:06:46 +02:00
|
|
|
*
|
2000-12-11 04:48:15 +01:00
|
|
|
* RETURNS
|
|
|
|
* Success: TRUE
|
|
|
|
* Failure: FALSE
|
|
|
|
*/
|
|
|
|
BOOL WINAPI TlsFree(
|
|
|
|
DWORD index) /* [in] TLS Index to free */
|
|
|
|
{
|
|
|
|
DWORD mask = (1 << (index & 31));
|
|
|
|
DWORD *bits = current_process.tls_bits;
|
|
|
|
if (index >= 64)
|
|
|
|
{
|
|
|
|
SetLastError( ERROR_INVALID_PARAMETER );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
if (index >= 32) bits++;
|
|
|
|
RtlAcquirePebLock();
|
|
|
|
if (!(*bits & mask)) /* already free? */
|
|
|
|
{
|
|
|
|
RtlReleasePebLock();
|
|
|
|
SetLastError( ERROR_INVALID_PARAMETER );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
*bits &= ~mask;
|
2003-09-08 21:02:01 +02:00
|
|
|
NtSetInformationThread( GetCurrentThread(), ThreadZeroTlsCell, &index, sizeof(index) );
|
2000-12-11 04:48:15 +01:00
|
|
|
RtlReleasePebLock();
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
2001-02-15 00:11:17 +01:00
|
|
|
* TlsGetValue [KERNEL32.@] Gets value in a thread's TLS slot
|
2000-12-11 04:48:15 +01:00
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: Value stored in calling thread's TLS slot for index
|
|
|
|
* Failure: 0 and GetLastError returns NO_ERROR
|
|
|
|
*/
|
|
|
|
LPVOID WINAPI TlsGetValue(
|
|
|
|
DWORD index) /* [in] TLS index to retrieve value for */
|
|
|
|
{
|
|
|
|
if (index >= 64)
|
|
|
|
{
|
|
|
|
SetLastError( ERROR_INVALID_PARAMETER );
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
SetLastError( ERROR_SUCCESS );
|
2003-08-28 01:14:29 +02:00
|
|
|
return NtCurrentTeb()->TlsSlots[index];
|
2000-12-11 04:48:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
2001-02-15 00:11:17 +01:00
|
|
|
* TlsSetValue [KERNEL32.@] Stores a value in the thread's TLS slot.
|
2000-12-11 04:48:15 +01:00
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: TRUE
|
|
|
|
* Failure: FALSE
|
|
|
|
*/
|
|
|
|
BOOL WINAPI TlsSetValue(
|
|
|
|
DWORD index, /* [in] TLS index to set value for */
|
|
|
|
LPVOID value) /* [in] Value to be stored */
|
|
|
|
{
|
|
|
|
if (index >= 64)
|
|
|
|
{
|
|
|
|
SetLastError( ERROR_INVALID_PARAMETER );
|
|
|
|
return FALSE;
|
|
|
|
}
|
2003-08-28 01:14:29 +02:00
|
|
|
NtCurrentTeb()->TlsSlots[index] = value;
|
2000-12-11 04:48:15 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|