Release 980809
Sat Aug 8 19:11:46 1998 Marcus Meissner <marcus@jet.franken.de>
* [*/*]
Added some missing WINAPI and some missing prototypes for
functions.
* [controls/static.c]
Got rid of the MODULE32_LookupHMODULE error showing up for every
message box.
* [windows/winproc.c]
WM_NOTIFY 16->32 mapping (AOL Instant Messenger or however it is called).
* [misc/winsock.c]
hostent/servent/protoent should not use the same static buffers.
(has broken nt3.15 finger.exe which does hp=gethostbyname(), then
getservbyname("finger","tcp") and the references hp->h_addr_list[0]).
Sat Aug 8 13:21:24 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/server.h] [tools/make_requests] [server/request.c]
[server/trace.c]
Automated part of the client/server request code generation.
Added tracing of client/server communication.
* [scheduler/*.c] [server/process.c]
Added support for server-side handles.
* [scheduler/thread.c]
Added DLL_THREAD_ATTACH/DETACH notifications.
* [configure.in]
Added check for -lsocket.
* [windows/winproc.c]
Return the thunk address in WINPROC_GetProc if the function types
don't match.
Sat Aug 8 02:44:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [windows/winproc.c][windows/win.c][windows/message.c]
Documentation for CallWindowProc, SetWindowLong, DispatchMessage,
WaitMessage, GetMessage, and PeekMessage.
Sat Aug 8 01:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [controls/commctrl.c][controls/widgets.c][include/builtin32.h]
[include/commctrl.h][relay32/builtin32.c][relay32/comctl32.spec]
[tools/build.c] [relay32/shell32.spec]
Added the functionality of the LibMain function. The common
controls are properly initialized now.
* [controls/treeview.c][memory/atom.c][scheduler/thread.c][windows/class.c]
[windows/msgbox.c][windows/win.c]
Put TRACE in, put SetLastError() in.
* [include/interfaces.h]
Added IClassFactory::LockServer.
* [include/ole2.h]
Added struct for LPOLEMENUGROUPWIDTHS32, HOLEMENU32.
* [include/shell.h][include/shlobj.h][misc/shell.c][ole/folders.c]
Reorganized and many structs and classes (IShellBrowser,IShellView)
added. shell32.dll should work in many cases now.
Started SHGetFileInfoA implementeation, rewrote SHGetPathFromIDList32A.
New Shell32LibMain started ShellIconCache Implementation.
* [misc/shellord.c]
Rewrote ILCombine, ILGetSize
New stubs SHFind_InitMenuPopup, FileMenu_Create, ShellExecuteEx,
SHSetInstanceExplorer, SHGetInstanceExplorer, SHFreeUnusedLibraries.
* [include/winerror.h]
Class and window related error codes added.
* [memory/heap.c]
Changed lstrlen32A to strlen to get rid of milions of TRACE lines.
* [misc/ddeml.c]
First lines for DdeCreateStringHandle32A / DdeFreeStringHandle32.
* [misc/network.c][relay32/mpr.spec]
Fixed some bugs, changed ordinals.
* [windows/class.c]
Workarounds for incorrect hInstance handling. Fixes parts of
MSWord95/Excel95 and Money95.
Thu Aug 6 21:05:35 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [windows/nonclient.c][misc/tweak.c][include/tweak.h]
[documentation/win95look]
Removed some tweak variables. They are no longer needed.
* [files/dos_fs.c]
Added check for null pointer in DOSFS_GetDevice().
* [controls/tooltips.c][include/commctrl.h]
Improved tooltips.
* [controls/status.c][include/commctrl.h]
Cleaned up code and added tooltip support.
* [controls/toolbar.c][include/commctrl.h]
Added tooltip support.
* [documentation/common_controls]
Updated.
Thu Aug 6 00:05:22 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [include/ver.h] [misc/ver.c]
Write VIF_BUFFTOOSMALL, not VIF_BUFTOSMALL.
* [debugger/hash.c] [debugger/stabs.c]
Make debug output more friendly for posting.
* [files/file.c]
Partial implementation of OF_SHARE_EXCLUSIVE.
Needed for Quicklogic/QuickChip (InstallShield).
* [files/profile.c]
When a cached-only entry is found, return it.
* [graphics/x11drv/xfont.c]
Accept a space as delimiter for a fontname and inhibit overrun
(Make xplasim.ex from the Phillips Coolrunner CPLD suite proceed).
* [miscemu/main.c]
Delay setting IF1632_CallLargeStack after loading the executables.
Stops fpgaexp.exe from the Viewlogic FPGA suite from crashing when
showing the Blinker error Message Box.
* [misc/network.c]
Make WNetGetConnection16 recognise a CDROM as a local drive.
* [multimedia/mmsystem.c]
Preliminary check for MCI_ALL_DEVICE_ID in MCI_Close by a FIXME.
Tue Aug 4 21:15:23 1998 James Juran <jrj120@psu.edu>
* [ole/ole2nls.c]
Fixed bug in CompareString32A. strcmp() doesn't necessarily
return -1, 0, or 1, which the previous code depended on.
Changed name of is_punctuation to OLE2NLS_isPunctuation.
Made NORM_IGNOREWIDTH not print a FIXME message in
LCMapString32A.
Other debugging messages, documentation, and code cleanups.
* [objects/font.c] [relay32/gdi32.spec] [include/winerror.h]
Added stub for GetFontData32, and added GDI_ERROR constant
to winerror.h.
Tue Aug 4 07:44:43 1998 Ove Kaaven <ovek@arcticnet.no>
* [multimedia/mmio.c]
Implemented mmioSetBuffer, mmioAdvance, mmioAscend, and
mmioCreateChunk to the best of my knowledge. But watch out,
there's bound to be bugs in there...
* [include/mmsystem.h] [multimedia/mmsystem.c]
Hacked in support for 32-bit multimedia function callbacks.
* [AUTHORS] [misc/shell.c]
Selfishly credited my authorship. Hopefully I'm excused.
* [include/dosexe.h] [include/module.h] [loader/dos/*]
[loader/module.c] [loader/task.c] [Makefile.in]
[configure.in] [Makefile.in]
Added DOS EXE (MZ) loader and virtual machine. Task
structure integration thanks to Ulrich Weigand.
* [files/dos_fs.c]
Work around a null pointer dereference if ioctlGetDeviceInfo-ing
a FILE_DupUnixHandle'd file (i.e. GetStdHandle'd).
* [include/miscemu.h] [include/winnt.h] [loader/main.c]
[memory/global.c] [msdos/dpmi.c] [msdos/dosmem.c]
Added support for DOS memory images, and added
DOSMEM_ResizeBlock() and DOSMEM_Available().
* [msdos/int21.c]
Added support for the DOS virtual machine, tweaked handle
assignment to avoid stdio clashes, forced INT21_FindNext to exit
wildcardless searches after finding one entry, added AH=7, 8, 9,
C, 48, 49, 4A, and 7160 CL=1 (Get Short Filename), and made the
long filename calls only respond if running with with -winver
win95.
* [objects/cursoricon.c]
DestroyCursor32 and DestroyIcon32 should now free the objects
(hopefully) correctly.
Sun Aug 2 21:42:09 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*] [include/psdrv.h]
Added PPD file parsing - at the moment it reads a file called
default.ppd from the directory in which you start Wine. Page sizes
other than A4 should now work (landscape may not). All fonts that are
present on your printer (according to the PPD) should be available,
providing you have the AFM files. Fonts should now be the correct size.
Graphics is still basically lines only. See graphics/psdrv/README .
* [misc/printdrv.c]
Yet more Drv[Get/Set]PrinterData fixes.
Fri Jul 31 21:33:22 1998 Per Lindström <pelinstr@algonet.se>
* [relay32/crtdll.spec] [misc/crtdll.c]
Added stub for freopen, _findfirst, _findnext, _fstat and _read.
* [files/directory.c]
Modified warning message.
Wed Jul 29 11:25:28 1998 Luiz Otavio L. Zorzella <zorzella@nr.conexware.com>
* [objects/font.c]
Added stub for GetFontData.
* [multimedia/msvideo.c]
Created this file to hold the msvideo.dll calls (and maybe also
msvfw32.dll).
* [objects/cursoricon.c]
Added search in Global Heap for cursor when trying to destroy it
with DestroyCursor16. This test should be done in many (all?)
other functions that use FreeResource.
* [controls/treeview.c] [include/commctrl.h]
Minor correction in name and addition of many placeholders for TVM
messages in TREEVIEW_WindowProc.
* [msdos/dpmi.c]
Fixed a bug in DPMI_xrealloc where in a copy of a memory region
"A" of size "a" to a region "B" of size "b", "b" bytes were being
copied, instead of "a", as the new version does. This both
increases speed, as well as avoids segfaults.
1998-08-09 14:47:43 +02:00
|
|
|
/*
|
|
|
|
* DOS Virtual Machine
|
|
|
|
*
|
2008-10-18 19:21:31 +02:00
|
|
|
* Copyright 1998 Ove KÃ¥ven
|
2010-01-04 14:31:01 +01:00
|
|
|
* Copyright 2002 Jukka Heinonen
|
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 Jürgen 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
|
|
|
*
|
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
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* Note: This code hasn't been completely cleaned up yet.
|
Release 980809
Sat Aug 8 19:11:46 1998 Marcus Meissner <marcus@jet.franken.de>
* [*/*]
Added some missing WINAPI and some missing prototypes for
functions.
* [controls/static.c]
Got rid of the MODULE32_LookupHMODULE error showing up for every
message box.
* [windows/winproc.c]
WM_NOTIFY 16->32 mapping (AOL Instant Messenger or however it is called).
* [misc/winsock.c]
hostent/servent/protoent should not use the same static buffers.
(has broken nt3.15 finger.exe which does hp=gethostbyname(), then
getservbyname("finger","tcp") and the references hp->h_addr_list[0]).
Sat Aug 8 13:21:24 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/server.h] [tools/make_requests] [server/request.c]
[server/trace.c]
Automated part of the client/server request code generation.
Added tracing of client/server communication.
* [scheduler/*.c] [server/process.c]
Added support for server-side handles.
* [scheduler/thread.c]
Added DLL_THREAD_ATTACH/DETACH notifications.
* [configure.in]
Added check for -lsocket.
* [windows/winproc.c]
Return the thunk address in WINPROC_GetProc if the function types
don't match.
Sat Aug 8 02:44:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [windows/winproc.c][windows/win.c][windows/message.c]
Documentation for CallWindowProc, SetWindowLong, DispatchMessage,
WaitMessage, GetMessage, and PeekMessage.
Sat Aug 8 01:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [controls/commctrl.c][controls/widgets.c][include/builtin32.h]
[include/commctrl.h][relay32/builtin32.c][relay32/comctl32.spec]
[tools/build.c] [relay32/shell32.spec]
Added the functionality of the LibMain function. The common
controls are properly initialized now.
* [controls/treeview.c][memory/atom.c][scheduler/thread.c][windows/class.c]
[windows/msgbox.c][windows/win.c]
Put TRACE in, put SetLastError() in.
* [include/interfaces.h]
Added IClassFactory::LockServer.
* [include/ole2.h]
Added struct for LPOLEMENUGROUPWIDTHS32, HOLEMENU32.
* [include/shell.h][include/shlobj.h][misc/shell.c][ole/folders.c]
Reorganized and many structs and classes (IShellBrowser,IShellView)
added. shell32.dll should work in many cases now.
Started SHGetFileInfoA implementeation, rewrote SHGetPathFromIDList32A.
New Shell32LibMain started ShellIconCache Implementation.
* [misc/shellord.c]
Rewrote ILCombine, ILGetSize
New stubs SHFind_InitMenuPopup, FileMenu_Create, ShellExecuteEx,
SHSetInstanceExplorer, SHGetInstanceExplorer, SHFreeUnusedLibraries.
* [include/winerror.h]
Class and window related error codes added.
* [memory/heap.c]
Changed lstrlen32A to strlen to get rid of milions of TRACE lines.
* [misc/ddeml.c]
First lines for DdeCreateStringHandle32A / DdeFreeStringHandle32.
* [misc/network.c][relay32/mpr.spec]
Fixed some bugs, changed ordinals.
* [windows/class.c]
Workarounds for incorrect hInstance handling. Fixes parts of
MSWord95/Excel95 and Money95.
Thu Aug 6 21:05:35 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [windows/nonclient.c][misc/tweak.c][include/tweak.h]
[documentation/win95look]
Removed some tweak variables. They are no longer needed.
* [files/dos_fs.c]
Added check for null pointer in DOSFS_GetDevice().
* [controls/tooltips.c][include/commctrl.h]
Improved tooltips.
* [controls/status.c][include/commctrl.h]
Cleaned up code and added tooltip support.
* [controls/toolbar.c][include/commctrl.h]
Added tooltip support.
* [documentation/common_controls]
Updated.
Thu Aug 6 00:05:22 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [include/ver.h] [misc/ver.c]
Write VIF_BUFFTOOSMALL, not VIF_BUFTOSMALL.
* [debugger/hash.c] [debugger/stabs.c]
Make debug output more friendly for posting.
* [files/file.c]
Partial implementation of OF_SHARE_EXCLUSIVE.
Needed for Quicklogic/QuickChip (InstallShield).
* [files/profile.c]
When a cached-only entry is found, return it.
* [graphics/x11drv/xfont.c]
Accept a space as delimiter for a fontname and inhibit overrun
(Make xplasim.ex from the Phillips Coolrunner CPLD suite proceed).
* [miscemu/main.c]
Delay setting IF1632_CallLargeStack after loading the executables.
Stops fpgaexp.exe from the Viewlogic FPGA suite from crashing when
showing the Blinker error Message Box.
* [misc/network.c]
Make WNetGetConnection16 recognise a CDROM as a local drive.
* [multimedia/mmsystem.c]
Preliminary check for MCI_ALL_DEVICE_ID in MCI_Close by a FIXME.
Tue Aug 4 21:15:23 1998 James Juran <jrj120@psu.edu>
* [ole/ole2nls.c]
Fixed bug in CompareString32A. strcmp() doesn't necessarily
return -1, 0, or 1, which the previous code depended on.
Changed name of is_punctuation to OLE2NLS_isPunctuation.
Made NORM_IGNOREWIDTH not print a FIXME message in
LCMapString32A.
Other debugging messages, documentation, and code cleanups.
* [objects/font.c] [relay32/gdi32.spec] [include/winerror.h]
Added stub for GetFontData32, and added GDI_ERROR constant
to winerror.h.
Tue Aug 4 07:44:43 1998 Ove Kaaven <ovek@arcticnet.no>
* [multimedia/mmio.c]
Implemented mmioSetBuffer, mmioAdvance, mmioAscend, and
mmioCreateChunk to the best of my knowledge. But watch out,
there's bound to be bugs in there...
* [include/mmsystem.h] [multimedia/mmsystem.c]
Hacked in support for 32-bit multimedia function callbacks.
* [AUTHORS] [misc/shell.c]
Selfishly credited my authorship. Hopefully I'm excused.
* [include/dosexe.h] [include/module.h] [loader/dos/*]
[loader/module.c] [loader/task.c] [Makefile.in]
[configure.in] [Makefile.in]
Added DOS EXE (MZ) loader and virtual machine. Task
structure integration thanks to Ulrich Weigand.
* [files/dos_fs.c]
Work around a null pointer dereference if ioctlGetDeviceInfo-ing
a FILE_DupUnixHandle'd file (i.e. GetStdHandle'd).
* [include/miscemu.h] [include/winnt.h] [loader/main.c]
[memory/global.c] [msdos/dpmi.c] [msdos/dosmem.c]
Added support for DOS memory images, and added
DOSMEM_ResizeBlock() and DOSMEM_Available().
* [msdos/int21.c]
Added support for the DOS virtual machine, tweaked handle
assignment to avoid stdio clashes, forced INT21_FindNext to exit
wildcardless searches after finding one entry, added AH=7, 8, 9,
C, 48, 49, 4A, and 7160 CL=1 (Get Short Filename), and made the
long filename calls only respond if running with with -winver
win95.
* [objects/cursoricon.c]
DestroyCursor32 and DestroyIcon32 should now free the objects
(hopefully) correctly.
Sun Aug 2 21:42:09 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*] [include/psdrv.h]
Added PPD file parsing - at the moment it reads a file called
default.ppd from the directory in which you start Wine. Page sizes
other than A4 should now work (landscape may not). All fonts that are
present on your printer (according to the PPD) should be available,
providing you have the AFM files. Fonts should now be the correct size.
Graphics is still basically lines only. See graphics/psdrv/README .
* [misc/printdrv.c]
Yet more Drv[Get/Set]PrinterData fixes.
Fri Jul 31 21:33:22 1998 Per Lindström <pelinstr@algonet.se>
* [relay32/crtdll.spec] [misc/crtdll.c]
Added stub for freopen, _findfirst, _findnext, _fstat and _read.
* [files/directory.c]
Modified warning message.
Wed Jul 29 11:25:28 1998 Luiz Otavio L. Zorzella <zorzella@nr.conexware.com>
* [objects/font.c]
Added stub for GetFontData.
* [multimedia/msvideo.c]
Created this file to hold the msvideo.dll calls (and maybe also
msvfw32.dll).
* [objects/cursoricon.c]
Added search in Global Heap for cursor when trying to destroy it
with DestroyCursor16. This test should be done in many (all?)
other functions that use FreeResource.
* [controls/treeview.c] [include/commctrl.h]
Minor correction in name and addition of many placeholders for TVM
messages in TREEVIEW_WindowProc.
* [msdos/dpmi.c]
Fixed a bug in DPMI_xrealloc where in a copy of a memory region
"A" of size "a" to a region "B" of size "b", "b" bytes were being
copied, instead of "a", as the new version does. This both
increases speed, as well as avoids segfaults.
1998-08-09 14:47:43 +02:00
|
|
|
*/
|
|
|
|
|
1999-10-25 00:13:47 +02:00
|
|
|
#include "config.h"
|
2003-11-26 23:29:30 +01:00
|
|
|
#include "wine/port.h"
|
1999-10-25 00:13:47 +02:00
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
Release 980809
Sat Aug 8 19:11:46 1998 Marcus Meissner <marcus@jet.franken.de>
* [*/*]
Added some missing WINAPI and some missing prototypes for
functions.
* [controls/static.c]
Got rid of the MODULE32_LookupHMODULE error showing up for every
message box.
* [windows/winproc.c]
WM_NOTIFY 16->32 mapping (AOL Instant Messenger or however it is called).
* [misc/winsock.c]
hostent/servent/protoent should not use the same static buffers.
(has broken nt3.15 finger.exe which does hp=gethostbyname(), then
getservbyname("finger","tcp") and the references hp->h_addr_list[0]).
Sat Aug 8 13:21:24 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/server.h] [tools/make_requests] [server/request.c]
[server/trace.c]
Automated part of the client/server request code generation.
Added tracing of client/server communication.
* [scheduler/*.c] [server/process.c]
Added support for server-side handles.
* [scheduler/thread.c]
Added DLL_THREAD_ATTACH/DETACH notifications.
* [configure.in]
Added check for -lsocket.
* [windows/winproc.c]
Return the thunk address in WINPROC_GetProc if the function types
don't match.
Sat Aug 8 02:44:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [windows/winproc.c][windows/win.c][windows/message.c]
Documentation for CallWindowProc, SetWindowLong, DispatchMessage,
WaitMessage, GetMessage, and PeekMessage.
Sat Aug 8 01:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [controls/commctrl.c][controls/widgets.c][include/builtin32.h]
[include/commctrl.h][relay32/builtin32.c][relay32/comctl32.spec]
[tools/build.c] [relay32/shell32.spec]
Added the functionality of the LibMain function. The common
controls are properly initialized now.
* [controls/treeview.c][memory/atom.c][scheduler/thread.c][windows/class.c]
[windows/msgbox.c][windows/win.c]
Put TRACE in, put SetLastError() in.
* [include/interfaces.h]
Added IClassFactory::LockServer.
* [include/ole2.h]
Added struct for LPOLEMENUGROUPWIDTHS32, HOLEMENU32.
* [include/shell.h][include/shlobj.h][misc/shell.c][ole/folders.c]
Reorganized and many structs and classes (IShellBrowser,IShellView)
added. shell32.dll should work in many cases now.
Started SHGetFileInfoA implementeation, rewrote SHGetPathFromIDList32A.
New Shell32LibMain started ShellIconCache Implementation.
* [misc/shellord.c]
Rewrote ILCombine, ILGetSize
New stubs SHFind_InitMenuPopup, FileMenu_Create, ShellExecuteEx,
SHSetInstanceExplorer, SHGetInstanceExplorer, SHFreeUnusedLibraries.
* [include/winerror.h]
Class and window related error codes added.
* [memory/heap.c]
Changed lstrlen32A to strlen to get rid of milions of TRACE lines.
* [misc/ddeml.c]
First lines for DdeCreateStringHandle32A / DdeFreeStringHandle32.
* [misc/network.c][relay32/mpr.spec]
Fixed some bugs, changed ordinals.
* [windows/class.c]
Workarounds for incorrect hInstance handling. Fixes parts of
MSWord95/Excel95 and Money95.
Thu Aug 6 21:05:35 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [windows/nonclient.c][misc/tweak.c][include/tweak.h]
[documentation/win95look]
Removed some tweak variables. They are no longer needed.
* [files/dos_fs.c]
Added check for null pointer in DOSFS_GetDevice().
* [controls/tooltips.c][include/commctrl.h]
Improved tooltips.
* [controls/status.c][include/commctrl.h]
Cleaned up code and added tooltip support.
* [controls/toolbar.c][include/commctrl.h]
Added tooltip support.
* [documentation/common_controls]
Updated.
Thu Aug 6 00:05:22 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [include/ver.h] [misc/ver.c]
Write VIF_BUFFTOOSMALL, not VIF_BUFTOSMALL.
* [debugger/hash.c] [debugger/stabs.c]
Make debug output more friendly for posting.
* [files/file.c]
Partial implementation of OF_SHARE_EXCLUSIVE.
Needed for Quicklogic/QuickChip (InstallShield).
* [files/profile.c]
When a cached-only entry is found, return it.
* [graphics/x11drv/xfont.c]
Accept a space as delimiter for a fontname and inhibit overrun
(Make xplasim.ex from the Phillips Coolrunner CPLD suite proceed).
* [miscemu/main.c]
Delay setting IF1632_CallLargeStack after loading the executables.
Stops fpgaexp.exe from the Viewlogic FPGA suite from crashing when
showing the Blinker error Message Box.
* [misc/network.c]
Make WNetGetConnection16 recognise a CDROM as a local drive.
* [multimedia/mmsystem.c]
Preliminary check for MCI_ALL_DEVICE_ID in MCI_Close by a FIXME.
Tue Aug 4 21:15:23 1998 James Juran <jrj120@psu.edu>
* [ole/ole2nls.c]
Fixed bug in CompareString32A. strcmp() doesn't necessarily
return -1, 0, or 1, which the previous code depended on.
Changed name of is_punctuation to OLE2NLS_isPunctuation.
Made NORM_IGNOREWIDTH not print a FIXME message in
LCMapString32A.
Other debugging messages, documentation, and code cleanups.
* [objects/font.c] [relay32/gdi32.spec] [include/winerror.h]
Added stub for GetFontData32, and added GDI_ERROR constant
to winerror.h.
Tue Aug 4 07:44:43 1998 Ove Kaaven <ovek@arcticnet.no>
* [multimedia/mmio.c]
Implemented mmioSetBuffer, mmioAdvance, mmioAscend, and
mmioCreateChunk to the best of my knowledge. But watch out,
there's bound to be bugs in there...
* [include/mmsystem.h] [multimedia/mmsystem.c]
Hacked in support for 32-bit multimedia function callbacks.
* [AUTHORS] [misc/shell.c]
Selfishly credited my authorship. Hopefully I'm excused.
* [include/dosexe.h] [include/module.h] [loader/dos/*]
[loader/module.c] [loader/task.c] [Makefile.in]
[configure.in] [Makefile.in]
Added DOS EXE (MZ) loader and virtual machine. Task
structure integration thanks to Ulrich Weigand.
* [files/dos_fs.c]
Work around a null pointer dereference if ioctlGetDeviceInfo-ing
a FILE_DupUnixHandle'd file (i.e. GetStdHandle'd).
* [include/miscemu.h] [include/winnt.h] [loader/main.c]
[memory/global.c] [msdos/dpmi.c] [msdos/dosmem.c]
Added support for DOS memory images, and added
DOSMEM_ResizeBlock() and DOSMEM_Available().
* [msdos/int21.c]
Added support for the DOS virtual machine, tweaked handle
assignment to avoid stdio clashes, forced INT21_FindNext to exit
wildcardless searches after finding one entry, added AH=7, 8, 9,
C, 48, 49, 4A, and 7160 CL=1 (Get Short Filename), and made the
long filename calls only respond if running with with -winver
win95.
* [objects/cursoricon.c]
DestroyCursor32 and DestroyIcon32 should now free the objects
(hopefully) correctly.
Sun Aug 2 21:42:09 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*] [include/psdrv.h]
Added PPD file parsing - at the moment it reads a file called
default.ppd from the directory in which you start Wine. Page sizes
other than A4 should now work (landscape may not). All fonts that are
present on your printer (according to the PPD) should be available,
providing you have the AFM files. Fonts should now be the correct size.
Graphics is still basically lines only. See graphics/psdrv/README .
* [misc/printdrv.c]
Yet more Drv[Get/Set]PrinterData fixes.
Fri Jul 31 21:33:22 1998 Per Lindström <pelinstr@algonet.se>
* [relay32/crtdll.spec] [misc/crtdll.c]
Added stub for freopen, _findfirst, _findnext, _fstat and _read.
* [files/directory.c]
Modified warning message.
Wed Jul 29 11:25:28 1998 Luiz Otavio L. Zorzella <zorzella@nr.conexware.com>
* [objects/font.c]
Added stub for GetFontData.
* [multimedia/msvideo.c]
Created this file to hold the msvideo.dll calls (and maybe also
msvfw32.dll).
* [objects/cursoricon.c]
Added search in Global Heap for cursor when trying to destroy it
with DestroyCursor16. This test should be done in many (all?)
other functions that use FreeResource.
* [controls/treeview.c] [include/commctrl.h]
Minor correction in name and addition of many placeholders for TVM
messages in TREEVIEW_WindowProc.
* [msdos/dpmi.c]
Fixed a bug in DPMI_xrealloc where in a copy of a memory region
"A" of size "a" to a region "B" of size "b", "b" bytes were being
copied, instead of "a", as the new version does. This both
increases speed, as well as avoids segfaults.
1998-08-09 14:47:43 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <signal.h>
|
2002-08-17 02:43:16 +02:00
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
# include <unistd.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_TIME_H
|
|
|
|
# include <sys/time.h>
|
|
|
|
#endif
|
Release 980809
Sat Aug 8 19:11:46 1998 Marcus Meissner <marcus@jet.franken.de>
* [*/*]
Added some missing WINAPI and some missing prototypes for
functions.
* [controls/static.c]
Got rid of the MODULE32_LookupHMODULE error showing up for every
message box.
* [windows/winproc.c]
WM_NOTIFY 16->32 mapping (AOL Instant Messenger or however it is called).
* [misc/winsock.c]
hostent/servent/protoent should not use the same static buffers.
(has broken nt3.15 finger.exe which does hp=gethostbyname(), then
getservbyname("finger","tcp") and the references hp->h_addr_list[0]).
Sat Aug 8 13:21:24 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/server.h] [tools/make_requests] [server/request.c]
[server/trace.c]
Automated part of the client/server request code generation.
Added tracing of client/server communication.
* [scheduler/*.c] [server/process.c]
Added support for server-side handles.
* [scheduler/thread.c]
Added DLL_THREAD_ATTACH/DETACH notifications.
* [configure.in]
Added check for -lsocket.
* [windows/winproc.c]
Return the thunk address in WINPROC_GetProc if the function types
don't match.
Sat Aug 8 02:44:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [windows/winproc.c][windows/win.c][windows/message.c]
Documentation for CallWindowProc, SetWindowLong, DispatchMessage,
WaitMessage, GetMessage, and PeekMessage.
Sat Aug 8 01:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [controls/commctrl.c][controls/widgets.c][include/builtin32.h]
[include/commctrl.h][relay32/builtin32.c][relay32/comctl32.spec]
[tools/build.c] [relay32/shell32.spec]
Added the functionality of the LibMain function. The common
controls are properly initialized now.
* [controls/treeview.c][memory/atom.c][scheduler/thread.c][windows/class.c]
[windows/msgbox.c][windows/win.c]
Put TRACE in, put SetLastError() in.
* [include/interfaces.h]
Added IClassFactory::LockServer.
* [include/ole2.h]
Added struct for LPOLEMENUGROUPWIDTHS32, HOLEMENU32.
* [include/shell.h][include/shlobj.h][misc/shell.c][ole/folders.c]
Reorganized and many structs and classes (IShellBrowser,IShellView)
added. shell32.dll should work in many cases now.
Started SHGetFileInfoA implementeation, rewrote SHGetPathFromIDList32A.
New Shell32LibMain started ShellIconCache Implementation.
* [misc/shellord.c]
Rewrote ILCombine, ILGetSize
New stubs SHFind_InitMenuPopup, FileMenu_Create, ShellExecuteEx,
SHSetInstanceExplorer, SHGetInstanceExplorer, SHFreeUnusedLibraries.
* [include/winerror.h]
Class and window related error codes added.
* [memory/heap.c]
Changed lstrlen32A to strlen to get rid of milions of TRACE lines.
* [misc/ddeml.c]
First lines for DdeCreateStringHandle32A / DdeFreeStringHandle32.
* [misc/network.c][relay32/mpr.spec]
Fixed some bugs, changed ordinals.
* [windows/class.c]
Workarounds for incorrect hInstance handling. Fixes parts of
MSWord95/Excel95 and Money95.
Thu Aug 6 21:05:35 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [windows/nonclient.c][misc/tweak.c][include/tweak.h]
[documentation/win95look]
Removed some tweak variables. They are no longer needed.
* [files/dos_fs.c]
Added check for null pointer in DOSFS_GetDevice().
* [controls/tooltips.c][include/commctrl.h]
Improved tooltips.
* [controls/status.c][include/commctrl.h]
Cleaned up code and added tooltip support.
* [controls/toolbar.c][include/commctrl.h]
Added tooltip support.
* [documentation/common_controls]
Updated.
Thu Aug 6 00:05:22 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [include/ver.h] [misc/ver.c]
Write VIF_BUFFTOOSMALL, not VIF_BUFTOSMALL.
* [debugger/hash.c] [debugger/stabs.c]
Make debug output more friendly for posting.
* [files/file.c]
Partial implementation of OF_SHARE_EXCLUSIVE.
Needed for Quicklogic/QuickChip (InstallShield).
* [files/profile.c]
When a cached-only entry is found, return it.
* [graphics/x11drv/xfont.c]
Accept a space as delimiter for a fontname and inhibit overrun
(Make xplasim.ex from the Phillips Coolrunner CPLD suite proceed).
* [miscemu/main.c]
Delay setting IF1632_CallLargeStack after loading the executables.
Stops fpgaexp.exe from the Viewlogic FPGA suite from crashing when
showing the Blinker error Message Box.
* [misc/network.c]
Make WNetGetConnection16 recognise a CDROM as a local drive.
* [multimedia/mmsystem.c]
Preliminary check for MCI_ALL_DEVICE_ID in MCI_Close by a FIXME.
Tue Aug 4 21:15:23 1998 James Juran <jrj120@psu.edu>
* [ole/ole2nls.c]
Fixed bug in CompareString32A. strcmp() doesn't necessarily
return -1, 0, or 1, which the previous code depended on.
Changed name of is_punctuation to OLE2NLS_isPunctuation.
Made NORM_IGNOREWIDTH not print a FIXME message in
LCMapString32A.
Other debugging messages, documentation, and code cleanups.
* [objects/font.c] [relay32/gdi32.spec] [include/winerror.h]
Added stub for GetFontData32, and added GDI_ERROR constant
to winerror.h.
Tue Aug 4 07:44:43 1998 Ove Kaaven <ovek@arcticnet.no>
* [multimedia/mmio.c]
Implemented mmioSetBuffer, mmioAdvance, mmioAscend, and
mmioCreateChunk to the best of my knowledge. But watch out,
there's bound to be bugs in there...
* [include/mmsystem.h] [multimedia/mmsystem.c]
Hacked in support for 32-bit multimedia function callbacks.
* [AUTHORS] [misc/shell.c]
Selfishly credited my authorship. Hopefully I'm excused.
* [include/dosexe.h] [include/module.h] [loader/dos/*]
[loader/module.c] [loader/task.c] [Makefile.in]
[configure.in] [Makefile.in]
Added DOS EXE (MZ) loader and virtual machine. Task
structure integration thanks to Ulrich Weigand.
* [files/dos_fs.c]
Work around a null pointer dereference if ioctlGetDeviceInfo-ing
a FILE_DupUnixHandle'd file (i.e. GetStdHandle'd).
* [include/miscemu.h] [include/winnt.h] [loader/main.c]
[memory/global.c] [msdos/dpmi.c] [msdos/dosmem.c]
Added support for DOS memory images, and added
DOSMEM_ResizeBlock() and DOSMEM_Available().
* [msdos/int21.c]
Added support for the DOS virtual machine, tweaked handle
assignment to avoid stdio clashes, forced INT21_FindNext to exit
wildcardless searches after finding one entry, added AH=7, 8, 9,
C, 48, 49, 4A, and 7160 CL=1 (Get Short Filename), and made the
long filename calls only respond if running with with -winver
win95.
* [objects/cursoricon.c]
DestroyCursor32 and DestroyIcon32 should now free the objects
(hopefully) correctly.
Sun Aug 2 21:42:09 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*] [include/psdrv.h]
Added PPD file parsing - at the moment it reads a file called
default.ppd from the directory in which you start Wine. Page sizes
other than A4 should now work (landscape may not). All fonts that are
present on your printer (according to the PPD) should be available,
providing you have the AFM files. Fonts should now be the correct size.
Graphics is still basically lines only. See graphics/psdrv/README .
* [misc/printdrv.c]
Yet more Drv[Get/Set]PrinterData fixes.
Fri Jul 31 21:33:22 1998 Per Lindström <pelinstr@algonet.se>
* [relay32/crtdll.spec] [misc/crtdll.c]
Added stub for freopen, _findfirst, _findnext, _fstat and _read.
* [files/directory.c]
Modified warning message.
Wed Jul 29 11:25:28 1998 Luiz Otavio L. Zorzella <zorzella@nr.conexware.com>
* [objects/font.c]
Added stub for GetFontData.
* [multimedia/msvideo.c]
Created this file to hold the msvideo.dll calls (and maybe also
msvfw32.dll).
* [objects/cursoricon.c]
Added search in Global Heap for cursor when trying to destroy it
with DestroyCursor16. This test should be done in many (all?)
other functions that use FreeResource.
* [controls/treeview.c] [include/commctrl.h]
Minor correction in name and addition of many placeholders for TVM
messages in TREEVIEW_WindowProc.
* [msdos/dpmi.c]
Fixed a bug in DPMI_xrealloc where in a copy of a memory region
"A" of size "a" to a region "B" of size "b", "b" bytes were being
copied, instead of "a", as the new version does. This both
increases speed, as well as avoids segfaults.
1998-08-09 14:47:43 +02:00
|
|
|
#include <sys/types.h>
|
1999-02-17 14:51:06 +01:00
|
|
|
|
|
|
|
#include "wine/winbase16.h"
|
1999-11-14 00:54:04 +01:00
|
|
|
#include "wine/exception.h"
|
2000-02-10 20:03:02 +01:00
|
|
|
#include "windef.h"
|
2000-07-29 16:34:45 +02:00
|
|
|
#include "winbase.h"
|
2008-03-01 11:57:00 +01:00
|
|
|
#include "winternl.h"
|
2000-02-10 20:03:02 +01:00
|
|
|
#include "wingdi.h"
|
1999-03-25 11:53:08 +01:00
|
|
|
#include "winuser.h"
|
2003-09-17 22:23:33 +02:00
|
|
|
#include "wownt32.h"
|
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 Jürgen 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
|
|
|
#include "winnt.h"
|
2000-07-29 16:34:45 +02:00
|
|
|
#include "wincon.h"
|
2000-03-18 23:12:33 +01:00
|
|
|
|
Release 980809
Sat Aug 8 19:11:46 1998 Marcus Meissner <marcus@jet.franken.de>
* [*/*]
Added some missing WINAPI and some missing prototypes for
functions.
* [controls/static.c]
Got rid of the MODULE32_LookupHMODULE error showing up for every
message box.
* [windows/winproc.c]
WM_NOTIFY 16->32 mapping (AOL Instant Messenger or however it is called).
* [misc/winsock.c]
hostent/servent/protoent should not use the same static buffers.
(has broken nt3.15 finger.exe which does hp=gethostbyname(), then
getservbyname("finger","tcp") and the references hp->h_addr_list[0]).
Sat Aug 8 13:21:24 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/server.h] [tools/make_requests] [server/request.c]
[server/trace.c]
Automated part of the client/server request code generation.
Added tracing of client/server communication.
* [scheduler/*.c] [server/process.c]
Added support for server-side handles.
* [scheduler/thread.c]
Added DLL_THREAD_ATTACH/DETACH notifications.
* [configure.in]
Added check for -lsocket.
* [windows/winproc.c]
Return the thunk address in WINPROC_GetProc if the function types
don't match.
Sat Aug 8 02:44:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [windows/winproc.c][windows/win.c][windows/message.c]
Documentation for CallWindowProc, SetWindowLong, DispatchMessage,
WaitMessage, GetMessage, and PeekMessage.
Sat Aug 8 01:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [controls/commctrl.c][controls/widgets.c][include/builtin32.h]
[include/commctrl.h][relay32/builtin32.c][relay32/comctl32.spec]
[tools/build.c] [relay32/shell32.spec]
Added the functionality of the LibMain function. The common
controls are properly initialized now.
* [controls/treeview.c][memory/atom.c][scheduler/thread.c][windows/class.c]
[windows/msgbox.c][windows/win.c]
Put TRACE in, put SetLastError() in.
* [include/interfaces.h]
Added IClassFactory::LockServer.
* [include/ole2.h]
Added struct for LPOLEMENUGROUPWIDTHS32, HOLEMENU32.
* [include/shell.h][include/shlobj.h][misc/shell.c][ole/folders.c]
Reorganized and many structs and classes (IShellBrowser,IShellView)
added. shell32.dll should work in many cases now.
Started SHGetFileInfoA implementeation, rewrote SHGetPathFromIDList32A.
New Shell32LibMain started ShellIconCache Implementation.
* [misc/shellord.c]
Rewrote ILCombine, ILGetSize
New stubs SHFind_InitMenuPopup, FileMenu_Create, ShellExecuteEx,
SHSetInstanceExplorer, SHGetInstanceExplorer, SHFreeUnusedLibraries.
* [include/winerror.h]
Class and window related error codes added.
* [memory/heap.c]
Changed lstrlen32A to strlen to get rid of milions of TRACE lines.
* [misc/ddeml.c]
First lines for DdeCreateStringHandle32A / DdeFreeStringHandle32.
* [misc/network.c][relay32/mpr.spec]
Fixed some bugs, changed ordinals.
* [windows/class.c]
Workarounds for incorrect hInstance handling. Fixes parts of
MSWord95/Excel95 and Money95.
Thu Aug 6 21:05:35 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [windows/nonclient.c][misc/tweak.c][include/tweak.h]
[documentation/win95look]
Removed some tweak variables. They are no longer needed.
* [files/dos_fs.c]
Added check for null pointer in DOSFS_GetDevice().
* [controls/tooltips.c][include/commctrl.h]
Improved tooltips.
* [controls/status.c][include/commctrl.h]
Cleaned up code and added tooltip support.
* [controls/toolbar.c][include/commctrl.h]
Added tooltip support.
* [documentation/common_controls]
Updated.
Thu Aug 6 00:05:22 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [include/ver.h] [misc/ver.c]
Write VIF_BUFFTOOSMALL, not VIF_BUFTOSMALL.
* [debugger/hash.c] [debugger/stabs.c]
Make debug output more friendly for posting.
* [files/file.c]
Partial implementation of OF_SHARE_EXCLUSIVE.
Needed for Quicklogic/QuickChip (InstallShield).
* [files/profile.c]
When a cached-only entry is found, return it.
* [graphics/x11drv/xfont.c]
Accept a space as delimiter for a fontname and inhibit overrun
(Make xplasim.ex from the Phillips Coolrunner CPLD suite proceed).
* [miscemu/main.c]
Delay setting IF1632_CallLargeStack after loading the executables.
Stops fpgaexp.exe from the Viewlogic FPGA suite from crashing when
showing the Blinker error Message Box.
* [misc/network.c]
Make WNetGetConnection16 recognise a CDROM as a local drive.
* [multimedia/mmsystem.c]
Preliminary check for MCI_ALL_DEVICE_ID in MCI_Close by a FIXME.
Tue Aug 4 21:15:23 1998 James Juran <jrj120@psu.edu>
* [ole/ole2nls.c]
Fixed bug in CompareString32A. strcmp() doesn't necessarily
return -1, 0, or 1, which the previous code depended on.
Changed name of is_punctuation to OLE2NLS_isPunctuation.
Made NORM_IGNOREWIDTH not print a FIXME message in
LCMapString32A.
Other debugging messages, documentation, and code cleanups.
* [objects/font.c] [relay32/gdi32.spec] [include/winerror.h]
Added stub for GetFontData32, and added GDI_ERROR constant
to winerror.h.
Tue Aug 4 07:44:43 1998 Ove Kaaven <ovek@arcticnet.no>
* [multimedia/mmio.c]
Implemented mmioSetBuffer, mmioAdvance, mmioAscend, and
mmioCreateChunk to the best of my knowledge. But watch out,
there's bound to be bugs in there...
* [include/mmsystem.h] [multimedia/mmsystem.c]
Hacked in support for 32-bit multimedia function callbacks.
* [AUTHORS] [misc/shell.c]
Selfishly credited my authorship. Hopefully I'm excused.
* [include/dosexe.h] [include/module.h] [loader/dos/*]
[loader/module.c] [loader/task.c] [Makefile.in]
[configure.in] [Makefile.in]
Added DOS EXE (MZ) loader and virtual machine. Task
structure integration thanks to Ulrich Weigand.
* [files/dos_fs.c]
Work around a null pointer dereference if ioctlGetDeviceInfo-ing
a FILE_DupUnixHandle'd file (i.e. GetStdHandle'd).
* [include/miscemu.h] [include/winnt.h] [loader/main.c]
[memory/global.c] [msdos/dpmi.c] [msdos/dosmem.c]
Added support for DOS memory images, and added
DOSMEM_ResizeBlock() and DOSMEM_Available().
* [msdos/int21.c]
Added support for the DOS virtual machine, tweaked handle
assignment to avoid stdio clashes, forced INT21_FindNext to exit
wildcardless searches after finding one entry, added AH=7, 8, 9,
C, 48, 49, 4A, and 7160 CL=1 (Get Short Filename), and made the
long filename calls only respond if running with with -winver
win95.
* [objects/cursoricon.c]
DestroyCursor32 and DestroyIcon32 should now free the objects
(hopefully) correctly.
Sun Aug 2 21:42:09 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*] [include/psdrv.h]
Added PPD file parsing - at the moment it reads a file called
default.ppd from the directory in which you start Wine. Page sizes
other than A4 should now work (landscape may not). All fonts that are
present on your printer (according to the PPD) should be available,
providing you have the AFM files. Fonts should now be the correct size.
Graphics is still basically lines only. See graphics/psdrv/README .
* [misc/printdrv.c]
Yet more Drv[Get/Set]PrinterData fixes.
Fri Jul 31 21:33:22 1998 Per Lindström <pelinstr@algonet.se>
* [relay32/crtdll.spec] [misc/crtdll.c]
Added stub for freopen, _findfirst, _findnext, _fstat and _read.
* [files/directory.c]
Modified warning message.
Wed Jul 29 11:25:28 1998 Luiz Otavio L. Zorzella <zorzella@nr.conexware.com>
* [objects/font.c]
Added stub for GetFontData.
* [multimedia/msvideo.c]
Created this file to hold the msvideo.dll calls (and maybe also
msvfw32.dll).
* [objects/cursoricon.c]
Added search in Global Heap for cursor when trying to destroy it
with DestroyCursor16. This test should be done in many (all?)
other functions that use FreeResource.
* [controls/treeview.c] [include/commctrl.h]
Minor correction in name and addition of many placeholders for TVM
messages in TREEVIEW_WindowProc.
* [msdos/dpmi.c]
Fixed a bug in DPMI_xrealloc where in a copy of a memory region
"A" of size "a" to a region "B" of size "b", "b" bytes were being
copied, instead of "a", as the new version does. This both
increases speed, as well as avoids segfaults.
1998-08-09 14:47:43 +02:00
|
|
|
#include "dosexe.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
2002-12-13 00:34:01 +01:00
|
|
|
#include "excpt.h"
|
1998-10-21 19:20:48 +02:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(int);
|
2005-09-30 12:34:32 +02:00
|
|
|
#ifdef MZ_SUPPORTED
|
2010-01-08 23:32:20 +01:00
|
|
|
WINE_DECLARE_DEBUG_CHANNEL(module);
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DECLARE_DEBUG_CHANNEL(relay);
|
2005-09-30 12:34:32 +02:00
|
|
|
#endif
|
1999-04-19 16:56:29 +02:00
|
|
|
|
2001-12-04 20:54:44 +01:00
|
|
|
WORD DOSVM_psp = 0;
|
|
|
|
WORD DOSVM_retval = 0;
|
|
|
|
|
2010-01-04 14:31:01 +01:00
|
|
|
/*
|
|
|
|
* Wine DOS memory layout above 640k:
|
|
|
|
*
|
|
|
|
* a0000 - affff : VGA graphics (vga.c)
|
|
|
|
* b0000 - bffff : Monochrome text (unused)
|
|
|
|
* b8000 - bffff : VGA text (vga.c)
|
|
|
|
* c0000 - cffff : EMS frame (int67.c)
|
|
|
|
* d0000 - effff : Free memory for UMBs (himem.c)
|
|
|
|
* f0000 - fffff : BIOS stuff (msdos/dosmem.c)
|
|
|
|
* 100000 -10ffff : High memory area (unused)
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Table of real mode segments and protected mode selectors
|
|
|
|
* for code stubs and other miscellaneous storage.
|
|
|
|
*/
|
|
|
|
struct DPMI_segments *DOSVM_dpmi_segments = NULL;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* First and last address available for upper memory blocks.
|
|
|
|
*/
|
|
|
|
#define DOSVM_UMB_BOTTOM 0xd0000
|
|
|
|
#define DOSVM_UMB_TOP 0xeffff
|
|
|
|
|
|
|
|
/*
|
|
|
|
* First free address for upper memory blocks.
|
|
|
|
*/
|
|
|
|
static DWORD DOSVM_umb_free = DOSVM_UMB_BOTTOM;
|
1998-10-11 14:15:18 +02:00
|
|
|
|
1999-03-25 11:53:08 +01:00
|
|
|
|
2000-09-24 22:47:50 +02:00
|
|
|
typedef struct _DOSEVENT {
|
|
|
|
int irq,priority;
|
2001-01-25 23:23:08 +01:00
|
|
|
DOSRELAY relay;
|
2000-09-24 22:47:50 +02:00
|
|
|
void *data;
|
|
|
|
struct _DOSEVENT *next;
|
|
|
|
} DOSEVENT, *LPDOSEVENT;
|
|
|
|
|
|
|
|
static struct _DOSEVENT *pending_event, *current_event;
|
2002-04-01 22:56:15 +02:00
|
|
|
static HANDLE event_notifier;
|
2000-09-24 22:47:50 +02:00
|
|
|
|
2003-08-13 01:50:54 +02:00
|
|
|
static CRITICAL_SECTION qcrit;
|
|
|
|
static CRITICAL_SECTION_DEBUG critsect_debug =
|
|
|
|
{
|
|
|
|
0, 0, &qcrit,
|
|
|
|
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
|
2005-09-09 12:19:44 +02:00
|
|
|
0, 0, { (DWORD_PTR)(__FILE__ ": qcrit") }
|
2003-08-13 01:50:54 +02:00
|
|
|
};
|
|
|
|
static CRITICAL_SECTION qcrit = { &critsect_debug, -1, 0, 0, 0, 0 };
|
|
|
|
|
2003-06-16 03:17:30 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* DOSVM_HasPendingEvents
|
|
|
|
*
|
|
|
|
* Return true if there are pending events that are not
|
|
|
|
* blocked by currently active event.
|
|
|
|
*/
|
|
|
|
static BOOL DOSVM_HasPendingEvents( void )
|
|
|
|
{
|
|
|
|
if (!pending_event)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
if (!current_event)
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
if (pending_event->priority < current_event->priority)
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
1999-03-25 11:53:08 +01:00
|
|
|
|
2003-06-20 23:27:49 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* DOSVM_SendOneEvent
|
|
|
|
*
|
|
|
|
* Process single pending event.
|
|
|
|
*
|
|
|
|
* This function should be called with queue critical section locked.
|
|
|
|
* The function temporarily releases the critical section if it is
|
|
|
|
* possible that internal interrupt handler or user procedure will
|
|
|
|
* be called. This is because we may otherwise get a deadlock if
|
|
|
|
* another thread is waiting for the same critical section.
|
|
|
|
*/
|
|
|
|
static void DOSVM_SendOneEvent( CONTEXT86 *context )
|
1999-03-25 11:53:08 +01:00
|
|
|
{
|
2003-06-20 23:27:49 +02:00
|
|
|
LPDOSEVENT event = pending_event;
|
1999-03-25 11:53:08 +01:00
|
|
|
|
2003-06-20 23:27:49 +02:00
|
|
|
/* Remove from pending events list. */
|
2000-09-24 22:47:50 +02:00
|
|
|
pending_event = event->next;
|
2003-06-20 23:27:49 +02:00
|
|
|
|
|
|
|
/* Process active event. */
|
|
|
|
if (event->irq >= 0)
|
|
|
|
{
|
|
|
|
BYTE intnum = (event->irq < 8) ?
|
|
|
|
(event->irq + 8) : (event->irq - 8 + 0x70);
|
|
|
|
|
|
|
|
/* Event is an IRQ, move it to current events list. */
|
|
|
|
event->next = current_event;
|
|
|
|
current_event = event;
|
|
|
|
|
|
|
|
TRACE( "Dispatching IRQ %d.\n", event->irq );
|
|
|
|
|
|
|
|
if (ISV86(context))
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Note that if DOSVM_HardwareInterruptRM calls an internal
|
|
|
|
* interrupt directly, current_event might be cleared
|
|
|
|
* (and event freed) in this call.
|
|
|
|
*/
|
|
|
|
LeaveCriticalSection(&qcrit);
|
|
|
|
DOSVM_HardwareInterruptRM( context, intnum );
|
|
|
|
EnterCriticalSection(&qcrit);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* This routine only modifies current context so it is
|
|
|
|
* not necessary to release critical section.
|
|
|
|
*/
|
|
|
|
DOSVM_HardwareInterruptPM( context, intnum );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Callback event. */
|
|
|
|
TRACE( "Dispatching callback event.\n" );
|
|
|
|
|
2003-06-23 05:35:51 +02:00
|
|
|
if (ISV86(context))
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Call relay immediately in real mode.
|
|
|
|
*/
|
|
|
|
LeaveCriticalSection(&qcrit);
|
|
|
|
(*event->relay)( context, event->data );
|
|
|
|
EnterCriticalSection(&qcrit);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Force return to relay code. We do not want to
|
|
|
|
* call relay directly because we may be inside a signal handler.
|
|
|
|
*/
|
|
|
|
DOSVM_BuildCallFrame( context, event->relay, event->data );
|
|
|
|
}
|
2003-06-20 23:27:49 +02:00
|
|
|
|
2009-02-11 21:35:04 +01:00
|
|
|
HeapFree(GetProcessHeap(), 0, event);
|
1999-03-25 11:53:08 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-06-20 23:27:49 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* DOSVM_SendQueuedEvents
|
|
|
|
*
|
2003-06-23 05:35:51 +02:00
|
|
|
* As long as context instruction pointer stays unmodified,
|
|
|
|
* process all pending events that are not blocked by currently
|
|
|
|
* active event.
|
|
|
|
*
|
|
|
|
* This routine assumes that caller has already cleared TEB.vm86_pending
|
|
|
|
* and checked that interrupts are enabled.
|
2003-06-20 23:27:49 +02:00
|
|
|
*/
|
2003-06-23 05:35:51 +02:00
|
|
|
void DOSVM_SendQueuedEvents( CONTEXT86 *context )
|
|
|
|
{
|
|
|
|
DWORD old_cs = context->SegCs;
|
|
|
|
DWORD old_ip = context->Eip;
|
|
|
|
|
2003-06-20 23:27:49 +02:00
|
|
|
EnterCriticalSection(&qcrit);
|
|
|
|
|
2006-10-03 14:04:49 +02:00
|
|
|
TRACE( "Called in %s mode %s events pending (time=%d)\n",
|
2003-06-20 23:27:49 +02:00
|
|
|
ISV86(context) ? "real" : "protected",
|
|
|
|
DOSVM_HasPendingEvents() ? "with" : "without",
|
|
|
|
GetTickCount() );
|
2006-10-03 14:04:49 +02:00
|
|
|
TRACE( "cs:ip=%04x:%08x, ss:sp=%04x:%08x\n",
|
2003-06-20 23:27:49 +02:00
|
|
|
context->SegCs, context->Eip, context->SegSs, context->Esp);
|
|
|
|
|
2003-06-23 05:35:51 +02:00
|
|
|
while (context->SegCs == old_cs &&
|
|
|
|
context->Eip == old_ip &&
|
|
|
|
DOSVM_HasPendingEvents())
|
2003-06-20 23:27:49 +02:00
|
|
|
{
|
|
|
|
DOSVM_SendOneEvent(context);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Event handling may have turned pending events flag on.
|
|
|
|
* We disable it here because this prevents some
|
|
|
|
* unnecessary calls to this function.
|
|
|
|
*/
|
2008-03-01 11:57:00 +01:00
|
|
|
get_vm86_teb_info()->vm86_pending = 0;
|
2003-06-20 23:27:49 +02:00
|
|
|
}
|
|
|
|
|
2003-06-24 04:24:54 +02:00
|
|
|
#ifdef MZ_SUPPORTED
|
|
|
|
|
2003-06-20 23:27:49 +02:00
|
|
|
if (DOSVM_HasPendingEvents())
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Interrupts disabled, but there are still
|
|
|
|
* pending events, make sure that pending flag is turned on.
|
|
|
|
*/
|
|
|
|
TRACE( "Another event is pending, setting VIP flag.\n" );
|
2008-03-01 11:57:00 +01:00
|
|
|
get_vm86_teb_info()->vm86_pending |= VIP_MASK;
|
2003-06-20 23:27:49 +02:00
|
|
|
}
|
|
|
|
|
2003-06-24 04:24:54 +02:00
|
|
|
#else
|
|
|
|
|
|
|
|
FIXME("No DOS .exe file support on this platform (yet)\n");
|
|
|
|
|
|
|
|
#endif /* MZ_SUPPORTED */
|
|
|
|
|
2003-06-20 23:27:49 +02:00
|
|
|
LeaveCriticalSection(&qcrit);
|
1999-03-25 11:53:08 +01:00
|
|
|
}
|
|
|
|
|
2003-06-20 23:27:49 +02:00
|
|
|
|
2003-06-24 04:24:54 +02:00
|
|
|
#ifdef MZ_SUPPORTED
|
2001-04-27 20:03:09 +02:00
|
|
|
/***********************************************************************
|
2010-01-04 16:29:19 +01:00
|
|
|
* DOSVM_QueueEvent
|
2001-04-27 20:03:09 +02:00
|
|
|
*/
|
2010-01-04 13:44:22 +01:00
|
|
|
void DOSVM_QueueEvent( INT irq, INT priority, DOSRELAY relay, LPVOID data)
|
1999-03-25 11:53:08 +01:00
|
|
|
{
|
|
|
|
LPDOSEVENT event, cur, prev;
|
2003-06-20 23:27:49 +02:00
|
|
|
BOOL old_pending;
|
1999-03-25 11:53:08 +01:00
|
|
|
|
2003-05-02 22:12:52 +02:00
|
|
|
if (MZ_Current()) {
|
2009-02-11 21:35:04 +01:00
|
|
|
event = HeapAlloc(GetProcessHeap(), 0, sizeof(DOSEVENT));
|
1999-03-25 11:53:08 +01:00
|
|
|
if (!event) {
|
2001-12-04 20:54:44 +01:00
|
|
|
ERR("out of memory allocating event entry\n");
|
1999-03-25 11:53:08 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
event->irq = irq; event->priority = priority;
|
|
|
|
event->relay = relay; event->data = data;
|
|
|
|
|
2003-02-12 02:26:05 +01:00
|
|
|
EnterCriticalSection(&qcrit);
|
2003-06-20 23:27:49 +02:00
|
|
|
old_pending = DOSVM_HasPendingEvents();
|
|
|
|
|
1999-03-25 11:53:08 +01:00
|
|
|
/* insert event into linked list, in order *after*
|
|
|
|
* all earlier events of higher or equal priority */
|
2000-09-24 22:47:50 +02:00
|
|
|
cur = pending_event; prev = NULL;
|
1999-03-25 11:53:08 +01:00
|
|
|
while (cur && cur->priority<=priority) {
|
|
|
|
prev = cur;
|
|
|
|
cur = cur->next;
|
|
|
|
}
|
|
|
|
event->next = cur;
|
|
|
|
if (prev) prev->next = event;
|
2000-09-24 22:47:50 +02:00
|
|
|
else pending_event = event;
|
2002-01-06 19:34:02 +01:00
|
|
|
|
2003-06-20 23:27:49 +02:00
|
|
|
if (!old_pending && DOSVM_HasPendingEvents()) {
|
2006-10-03 14:04:49 +02:00
|
|
|
TRACE("new event queued, signalling (time=%d)\n", GetTickCount());
|
2003-06-20 23:27:49 +02:00
|
|
|
|
|
|
|
/* Alert VM86 thread about the new event. */
|
2002-01-06 19:34:02 +01:00
|
|
|
kill(dosvm_pid,SIGUSR2);
|
2003-06-20 23:27:49 +02:00
|
|
|
|
|
|
|
/* Wake up DOSVM_Wait so that it can serve pending events. */
|
|
|
|
SetEvent(event_notifier);
|
1999-03-25 11:53:08 +01:00
|
|
|
} else {
|
2006-10-03 14:04:49 +02:00
|
|
|
TRACE("new event queued (time=%d)\n", GetTickCount());
|
1999-03-25 11:53:08 +01:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2002-01-06 19:34:02 +01:00
|
|
|
LeaveCriticalSection(&qcrit);
|
2000-07-29 16:34:45 +02:00
|
|
|
} else {
|
|
|
|
/* DOS subsystem not running */
|
|
|
|
/* (this probably means that we're running a win16 app
|
|
|
|
* which uses DPMI to thunk down to DOS services) */
|
|
|
|
if (irq<0) {
|
|
|
|
/* callback event, perform it with dummy context */
|
|
|
|
CONTEXT86 context;
|
|
|
|
memset(&context,0,sizeof(context));
|
2000-09-24 22:47:50 +02:00
|
|
|
(*relay)(&context,data);
|
2000-07-29 16:34:45 +02:00
|
|
|
} else {
|
2002-05-24 23:17:59 +02:00
|
|
|
ERR("IRQ without DOS task: should not happen\n");
|
2000-07-29 16:34:45 +02:00
|
|
|
}
|
1999-03-25 11:53:08 +01:00
|
|
|
}
|
1998-12-24 17:23:01 +01:00
|
|
|
}
|
|
|
|
|
2000-09-24 22:47:50 +02:00
|
|
|
static void DOSVM_ProcessConsole(void)
|
2000-07-29 16:34:45 +02:00
|
|
|
{
|
|
|
|
INPUT_RECORD msg;
|
|
|
|
DWORD res;
|
2002-10-29 00:51:27 +01:00
|
|
|
BYTE scan, ascii;
|
2000-07-29 16:34:45 +02:00
|
|
|
|
|
|
|
if (ReadConsoleInputA(GetStdHandle(STD_INPUT_HANDLE),&msg,1,&res)) {
|
|
|
|
switch (msg.EventType) {
|
|
|
|
case KEY_EVENT:
|
|
|
|
scan = msg.Event.KeyEvent.wVirtualScanCode;
|
2002-10-29 00:51:27 +01:00
|
|
|
ascii = msg.Event.KeyEvent.uChar.AsciiChar;
|
|
|
|
TRACE("scan %02x, ascii %02x\n", scan, ascii);
|
|
|
|
|
|
|
|
/* set the "break" (release) flag if key released */
|
2000-07-29 16:34:45 +02:00
|
|
|
if (!msg.Event.KeyEvent.bKeyDown) scan |= 0x80;
|
|
|
|
|
|
|
|
/* check whether extended bit is set,
|
|
|
|
* and if so, queue the extension prefix */
|
|
|
|
if (msg.Event.KeyEvent.dwControlKeyState & ENHANCED_KEY) {
|
2001-12-04 20:54:44 +01:00
|
|
|
DOSVM_Int09SendScan(0xE0,0);
|
2000-07-29 16:34:45 +02:00
|
|
|
}
|
2002-10-29 00:51:27 +01:00
|
|
|
DOSVM_Int09SendScan(scan, ascii);
|
2000-07-29 16:34:45 +02:00
|
|
|
break;
|
2002-03-19 03:05:57 +01:00
|
|
|
case MOUSE_EVENT:
|
|
|
|
DOSVM_Int33Console(&msg.Event.MouseEvent);
|
|
|
|
break;
|
|
|
|
case WINDOW_BUFFER_SIZE_EVENT:
|
|
|
|
FIXME("unhandled WINDOW_BUFFER_SIZE_EVENT.\n");
|
|
|
|
break;
|
|
|
|
case MENU_EVENT:
|
|
|
|
FIXME("unhandled MENU_EVENT.\n");
|
|
|
|
break;
|
|
|
|
case FOCUS_EVENT:
|
|
|
|
FIXME("unhandled FOCUS_EVENT.\n");
|
|
|
|
break;
|
2000-07-29 16:34:45 +02:00
|
|
|
default:
|
2002-03-19 03:05:57 +01:00
|
|
|
FIXME("unknown console event: %d\n", msg.EventType);
|
2000-07-29 16:34:45 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-09-24 22:47:50 +02:00
|
|
|
static void DOSVM_ProcessMessage(MSG *msg)
|
1999-03-25 11:53:08 +01:00
|
|
|
{
|
|
|
|
BYTE scan = 0;
|
|
|
|
|
2007-05-24 16:41:17 +02:00
|
|
|
TRACE("got message %04x, wparam=%08lx, lparam=%08lx\n",msg->message,msg->wParam,msg->lParam);
|
1999-03-25 11:53:08 +01:00
|
|
|
if ((msg->message>=WM_MOUSEFIRST)&&
|
|
|
|
(msg->message<=WM_MOUSELAST)) {
|
2001-12-04 20:54:44 +01:00
|
|
|
DOSVM_Int33Message(msg->message,msg->wParam,msg->lParam);
|
1999-03-25 11:53:08 +01:00
|
|
|
} else {
|
|
|
|
switch (msg->message) {
|
|
|
|
case WM_KEYUP:
|
|
|
|
scan = 0x80;
|
|
|
|
case WM_KEYDOWN:
|
|
|
|
scan |= (msg->lParam >> 16) & 0x7f;
|
|
|
|
|
|
|
|
/* check whether extended bit is set,
|
|
|
|
* and if so, queue the extension prefix */
|
|
|
|
if (msg->lParam & 0x1000000) {
|
|
|
|
/* FIXME: some keys (function keys) have
|
|
|
|
* extended bit set even when they shouldn't,
|
|
|
|
* should check for them */
|
2001-12-04 20:54:44 +01:00
|
|
|
DOSVM_Int09SendScan(0xE0,0);
|
1999-03-25 11:53:08 +01:00
|
|
|
}
|
2001-12-04 20:54:44 +01:00
|
|
|
DOSVM_Int09SendScan(scan,0);
|
1999-03-25 11:53:08 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-05-02 22:12:52 +02:00
|
|
|
|
2001-04-27 20:03:09 +02:00
|
|
|
/***********************************************************************
|
2003-05-02 22:12:52 +02:00
|
|
|
* DOSVM_Wait
|
|
|
|
*
|
|
|
|
* Wait for asynchronous events. This routine temporarily enables
|
|
|
|
* interrupts and waits until some asynchronous event has been
|
|
|
|
* processed.
|
2001-04-27 20:03:09 +02:00
|
|
|
*/
|
2010-01-04 13:44:22 +01:00
|
|
|
void DOSVM_Wait( CONTEXT86 *waitctx )
|
1999-05-22 12:40:15 +02:00
|
|
|
{
|
2003-06-16 03:17:30 +02:00
|
|
|
if (DOSVM_HasPendingEvents())
|
2000-11-08 23:47:53 +01:00
|
|
|
{
|
2003-05-02 22:12:52 +02:00
|
|
|
CONTEXT86 context = *waitctx;
|
2003-06-16 03:17:30 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* If DOSVM_Wait is called from protected mode we emulate
|
|
|
|
* interrupt reflection and convert context into real mode context.
|
|
|
|
* This is actually the correct thing to do as long as DOSVM_Wait
|
|
|
|
* is only called from those interrupt functions that DPMI reflects
|
|
|
|
* to real mode.
|
|
|
|
*
|
|
|
|
* FIXME: Need to think about where to place real mode stack.
|
|
|
|
* FIXME: If DOSVM_Wait calls are nested stack gets corrupted.
|
|
|
|
* Can this really happen?
|
|
|
|
*/
|
|
|
|
if (!ISV86(&context))
|
|
|
|
{
|
2003-08-25 03:01:01 +02:00
|
|
|
context.EFlags |= V86_FLAG;
|
2003-06-16 03:17:30 +02:00
|
|
|
context.SegSs = 0xffff;
|
|
|
|
context.Esp = 0;
|
|
|
|
}
|
|
|
|
|
2003-06-20 23:27:49 +02:00
|
|
|
context.EFlags |= VIF_MASK;
|
2003-06-06 20:09:14 +02:00
|
|
|
context.SegCs = 0;
|
|
|
|
context.Eip = 0;
|
|
|
|
|
2000-12-27 03:35:57 +01:00
|
|
|
DOSVM_SendQueuedEvents(&context);
|
2003-06-06 20:09:14 +02:00
|
|
|
|
|
|
|
if(context.SegCs || context.Eip)
|
|
|
|
DPMI_CallRMProc( &context, NULL, 0, TRUE );
|
1999-05-22 12:40:15 +02:00
|
|
|
}
|
2000-11-08 23:47:53 +01:00
|
|
|
else
|
2003-05-02 22:12:52 +02:00
|
|
|
{
|
|
|
|
HANDLE objs[2];
|
|
|
|
int objc = DOSVM_IsWin16() ? 2 : 1;
|
|
|
|
DWORD waitret;
|
|
|
|
|
|
|
|
objs[0] = event_notifier;
|
|
|
|
objs[1] = GetStdHandle(STD_INPUT_HANDLE);
|
|
|
|
|
|
|
|
waitret = MsgWaitForMultipleObjects( objc, objs, FALSE,
|
|
|
|
INFINITE, QS_ALLINPUT );
|
|
|
|
|
|
|
|
if (waitret == WAIT_OBJECT_0)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* New pending event has been queued, we ignore it
|
|
|
|
* here because it will be processed on next call to
|
|
|
|
* DOSVM_Wait.
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
else if (objc == 2 && waitret == WAIT_OBJECT_0 + 1)
|
|
|
|
{
|
|
|
|
DOSVM_ProcessConsole();
|
|
|
|
}
|
|
|
|
else if (waitret == WAIT_OBJECT_0 + objc)
|
|
|
|
{
|
|
|
|
MSG msg;
|
|
|
|
while (PeekMessageA(&msg,0,0,0,PM_REMOVE|PM_NOYIELD))
|
|
|
|
{
|
|
|
|
/* got a message */
|
|
|
|
DOSVM_ProcessMessage(&msg);
|
|
|
|
/* we don't need a TranslateMessage here */
|
|
|
|
DispatchMessageA(&msg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-10-03 14:04:49 +02:00
|
|
|
ERR_(module)( "dosvm wait error=%d\n", GetLastError() );
|
2003-05-02 22:12:52 +02:00
|
|
|
}
|
2000-07-29 16:34:45 +02:00
|
|
|
}
|
1999-05-22 12:40:15 +02:00
|
|
|
}
|
|
|
|
|
2003-05-02 22:12:52 +02:00
|
|
|
|
2010-01-04 13:44:22 +01:00
|
|
|
DWORD DOSVM_Loop( HANDLE hThread )
|
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 Jürgen 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
|
|
|
{
|
2002-05-05 22:22:39 +02:00
|
|
|
HANDLE objs[2];
|
2008-05-07 17:32:23 +02:00
|
|
|
int count = 0;
|
2002-01-06 19:34:02 +01:00
|
|
|
MSG msg;
|
|
|
|
DWORD waitret;
|
|
|
|
|
2008-05-07 17:32:23 +02:00
|
|
|
objs[count++] = hThread;
|
|
|
|
if (GetConsoleMode( GetStdHandle(STD_INPUT_HANDLE), NULL ))
|
|
|
|
objs[count++] = GetStdHandle(STD_INPUT_HANDLE);
|
2002-05-05 22:22:39 +02:00
|
|
|
|
2002-01-06 19:34:02 +01:00
|
|
|
for(;;) {
|
2002-03-19 03:05:57 +01:00
|
|
|
TRACE_(int)("waiting for action\n");
|
2008-05-07 17:32:23 +02:00
|
|
|
waitret = MsgWaitForMultipleObjects(count, objs, FALSE, INFINITE, QS_ALLINPUT);
|
2002-03-19 03:05:57 +01:00
|
|
|
if (waitret == WAIT_OBJECT_0) {
|
2002-05-05 22:22:39 +02:00
|
|
|
DWORD rv;
|
|
|
|
if(!GetExitCodeThread(hThread, &rv)) {
|
|
|
|
ERR("Failed to get thread exit code!\n");
|
|
|
|
rv = 0;
|
|
|
|
}
|
|
|
|
return rv;
|
|
|
|
}
|
2008-05-07 17:32:23 +02:00
|
|
|
else if (waitret == WAIT_OBJECT_0 + count) {
|
2002-03-19 03:05:57 +01:00
|
|
|
while (PeekMessageA(&msg,0,0,0,PM_REMOVE)) {
|
|
|
|
if (msg.hwnd) {
|
|
|
|
/* it's a window message */
|
|
|
|
DOSVM_ProcessMessage(&msg);
|
|
|
|
DispatchMessageA(&msg);
|
|
|
|
} else {
|
|
|
|
/* it's a thread message */
|
|
|
|
switch (msg.message) {
|
|
|
|
case WM_QUIT:
|
|
|
|
/* stop this madness!! */
|
|
|
|
return 0;
|
|
|
|
case WM_USER:
|
|
|
|
/* run passed procedure in this thread */
|
|
|
|
/* (sort of like APC, but we signal the completion) */
|
|
|
|
{
|
|
|
|
DOS_SPC *spc = (DOS_SPC *)msg.lParam;
|
2002-09-21 03:21:00 +02:00
|
|
|
TRACE_(int)("calling %p with arg %08lx\n", spc->proc, spc->arg);
|
2002-03-19 03:05:57 +01:00
|
|
|
(spc->proc)(spc->arg);
|
2007-05-24 16:41:17 +02:00
|
|
|
TRACE_(int)("done, signalling event %lx\n", msg.wParam);
|
2002-10-19 01:48:57 +02:00
|
|
|
SetEvent( (HANDLE)msg.wParam );
|
2002-03-19 03:05:57 +01:00
|
|
|
}
|
|
|
|
break;
|
2003-06-13 18:28:49 +02:00
|
|
|
default:
|
|
|
|
DispatchMessageA(&msg);
|
2002-03-19 03:05:57 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2008-05-07 17:32:23 +02:00
|
|
|
else if (waitret == WAIT_OBJECT_0 + 1)
|
|
|
|
{
|
|
|
|
DOSVM_ProcessConsole();
|
|
|
|
}
|
2002-03-19 03:05:57 +01:00
|
|
|
else
|
|
|
|
{
|
|
|
|
ERR_(int)("MsgWaitForMultipleObjects returned unexpected value.\n");
|
|
|
|
return 0;
|
2002-01-06 19:34:02 +01:00
|
|
|
}
|
1998-11-01 13:41:19 +01:00
|
|
|
}
|
2002-01-06 19:34:02 +01:00
|
|
|
}
|
|
|
|
|
2008-02-15 16:19:29 +01:00
|
|
|
static LONG WINAPI exception_handler(EXCEPTION_POINTERS *eptr)
|
2002-01-06 19:34:02 +01:00
|
|
|
{
|
2008-02-15 16:19:29 +01:00
|
|
|
EXCEPTION_RECORD *rec = eptr->ExceptionRecord;
|
|
|
|
CONTEXT *context = eptr->ContextRecord;
|
2003-03-04 03:16:20 +01:00
|
|
|
int arg = rec->ExceptionInformation[0];
|
|
|
|
BOOL ret;
|
2002-01-06 19:34:02 +01:00
|
|
|
|
|
|
|
switch(rec->ExceptionCode) {
|
|
|
|
case EXCEPTION_VM86_INTx:
|
2006-10-03 14:04:49 +02:00
|
|
|
TRACE_(relay)("Call DOS int 0x%02x ret=%04x:%04x\n"
|
|
|
|
" eax=%08x ebx=%08x ecx=%08x edx=%08x esi=%08x edi=%08x\n"
|
|
|
|
" ebp=%08x esp=%08x ds=%04x es=%04x fs=%04x gs=%04x flags=%08x\n",
|
2005-01-03 21:04:54 +01:00
|
|
|
arg, context->SegCs, context->Eip,
|
|
|
|
context->Eax, context->Ebx, context->Ecx, context->Edx, context->Esi, context->Edi,
|
|
|
|
context->Ebp, context->Esp, context->SegDs, context->SegEs, context->SegFs, context->SegGs,
|
|
|
|
context->EFlags );
|
2003-03-04 03:16:20 +01:00
|
|
|
ret = DOSVM_EmulateInterruptRM( context, arg );
|
2006-10-03 14:04:49 +02:00
|
|
|
TRACE_(relay)("Ret DOS int 0x%02x ret=%04x:%04x\n"
|
|
|
|
" eax=%08x ebx=%08x ecx=%08x edx=%08x esi=%08x edi=%08x\n"
|
|
|
|
" ebp=%08x esp=%08x ds=%04x es=%04x fs=%04x gs=%04x flags=%08x\n",
|
2005-01-03 21:04:54 +01:00
|
|
|
arg, context->SegCs, context->Eip,
|
|
|
|
context->Eax, context->Ebx, context->Ecx, context->Edx, context->Esi, context->Edi,
|
|
|
|
context->Ebp, context->Esp, context->SegDs, context->SegEs,
|
|
|
|
context->SegFs, context->SegGs, context->EFlags );
|
2003-03-04 03:16:20 +01:00
|
|
|
return ret ? EXCEPTION_CONTINUE_EXECUTION : EXCEPTION_EXECUTE_HANDLER;
|
2002-01-06 19:34:02 +01:00
|
|
|
|
|
|
|
case EXCEPTION_VM86_STI:
|
|
|
|
/* case EXCEPTION_VM86_PICRETURN: */
|
2003-06-20 23:27:49 +02:00
|
|
|
if (!ISV86(context))
|
|
|
|
ERR( "Protected mode STI caught by real mode handler!\n" );
|
2002-01-06 19:34:02 +01:00
|
|
|
DOSVM_SendQueuedEvents(context);
|
|
|
|
return EXCEPTION_CONTINUE_EXECUTION;
|
2004-08-04 21:08:19 +02:00
|
|
|
|
|
|
|
case EXCEPTION_SINGLE_STEP:
|
|
|
|
ret = DOSVM_EmulateInterruptRM( context, 1 );
|
|
|
|
return ret ? EXCEPTION_CONTINUE_EXECUTION : EXCEPTION_EXECUTE_HANDLER;
|
|
|
|
|
|
|
|
case EXCEPTION_BREAKPOINT:
|
|
|
|
ret = DOSVM_EmulateInterruptRM( context, 3 );
|
|
|
|
return ret ? EXCEPTION_CONTINUE_EXECUTION : EXCEPTION_EXECUTE_HANDLER;
|
|
|
|
|
1999-03-25 11:53:08 +01:00
|
|
|
}
|
2002-01-06 19:34:02 +01:00
|
|
|
return EXCEPTION_CONTINUE_SEARCH;
|
|
|
|
}
|
|
|
|
|
2010-01-04 13:44:22 +01:00
|
|
|
INT DOSVM_Enter( CONTEXT86 *context )
|
2002-01-06 19:34:02 +01:00
|
|
|
{
|
2008-05-07 17:33:50 +02:00
|
|
|
INT ret = 0;
|
2003-08-25 03:01:01 +02:00
|
|
|
if (!ISV86(context))
|
|
|
|
ERR( "Called with protected mode context!\n" );
|
2003-07-08 23:11:52 +02:00
|
|
|
|
2002-01-06 19:34:02 +01:00
|
|
|
__TRY
|
|
|
|
{
|
2008-05-07 17:33:50 +02:00
|
|
|
if (!WOWCallback16Ex( 0, WCB16_REGS, 0, NULL, (DWORD *)context )) ret = -1;
|
|
|
|
TRACE_(module)( "ret %d err %u\n", ret, GetLastError() );
|
2000-07-29 16:34:45 +02:00
|
|
|
}
|
2002-01-06 19:34:02 +01:00
|
|
|
__EXCEPT(exception_handler)
|
|
|
|
{
|
|
|
|
TRACE_(module)( "leaving vm86 mode\n" );
|
1999-03-25 11:53:08 +01:00
|
|
|
}
|
2002-01-06 19:34:02 +01:00
|
|
|
__ENDTRY
|
2003-05-02 22:12:52 +02:00
|
|
|
|
2008-05-07 17:33:50 +02:00
|
|
|
return ret;
|
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 Jürgen 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-04-27 20:03:09 +02:00
|
|
|
/***********************************************************************
|
2010-01-04 16:29:19 +01:00
|
|
|
* DOSVM_PIC_ioport_out
|
2001-04-27 20:03:09 +02:00
|
|
|
*/
|
2010-01-04 13:44:22 +01:00
|
|
|
void DOSVM_PIC_ioport_out( WORD port, BYTE val)
|
1999-03-25 11:53:08 +01:00
|
|
|
{
|
2003-09-02 01:55:53 +02:00
|
|
|
if (port != 0x20)
|
|
|
|
{
|
|
|
|
FIXME( "Unsupported PIC port %04x\n", port );
|
|
|
|
}
|
|
|
|
else if (val == 0x20 || (val >= 0x60 && val <= 0x67))
|
|
|
|
{
|
|
|
|
EnterCriticalSection(&qcrit);
|
|
|
|
|
|
|
|
if (!current_event)
|
|
|
|
{
|
|
|
|
WARN( "%s without active IRQ\n",
|
|
|
|
val == 0x20 ? "EOI" : "Specific EOI" );
|
|
|
|
}
|
|
|
|
else if (val != 0x20 && val - 0x60 != current_event->irq)
|
|
|
|
{
|
|
|
|
WARN( "Specific EOI but current IRQ %d is not %d\n",
|
|
|
|
current_event->irq, val - 0x60 );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
LPDOSEVENT event = current_event;
|
|
|
|
|
|
|
|
TRACE( "Received %s for current IRQ %d, clearing event\n",
|
|
|
|
val == 0x20 ? "EOI" : "Specific EOI", event->irq );
|
|
|
|
|
|
|
|
current_event = event->next;
|
|
|
|
if (event->relay)
|
|
|
|
(*event->relay)(NULL,event->data);
|
2009-02-11 21:35:04 +01:00
|
|
|
HeapFree(GetProcessHeap(), 0, event);
|
2003-09-02 01:55:53 +02:00
|
|
|
|
|
|
|
if (DOSVM_HasPendingEvents())
|
|
|
|
{
|
|
|
|
TRACE( "Another event pending, setting pending flag\n" );
|
2008-03-01 11:57:00 +01:00
|
|
|
get_vm86_teb_info()->vm86_pending |= VIP_MASK;
|
2003-09-02 01:55:53 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
LeaveCriticalSection(&qcrit);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
FIXME( "Unrecognized PIC command %02x\n", val );
|
1999-03-25 11:53:08 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Release 980913
Fri Sep 11 13:14:35 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c] [include/file.h]
Fixed SetFilePointer to allow negative positions as in DOS.
* [graphics/ddraw.c]
Added some methods to IDirect3D.
* [ole/compobj.c] [if1632/compobj.spec]
Added/implemented CoCreateStandardMalloc16,
CoGetClassObject, CoCreateInstance,
LookupETask, SetETask, CoGetState16.
* [loader/task.c]
MakeProcInstance: return 0 if func == NULL.
* [*/*] [tools/winapi-check]
Added zillions of missing WINAPI's and __cdecl's.
(oops, several caused by myself)
Wrote script for automated checking.
* [if1632/compobj.spec]
Many stub names.
* [misc/ddeml.c] [ole/compobj.c]
Some stubs.
Tue Sep 9 21:36:48 1998 Anders Carlsson <anders.carlsson@linux.nu>
* [dlls/comctl32/Makefile.in] [dlls/comctl32/commctrl.c]
[dlls/comctl32/tab.c] [include/commctrl.h] [include/tab.h]
Added preliminary tab control support.
Sat Sep 5 16:27:20 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*]
More changes to the PostScript driver:
Implemented pens and solid brushes.
Colour/greyscale for fonts, pens and brushes.
To get coloured output you need to have *ColorDevice set to true
in your PPD, otherwise you'll get greyscale.
Landscape mode now works, as does non-A4 page sizes.
Encoding of fonts to ANSI is better, Symbol works again.
* [objects/dc.c] [include/gdi.h] [*/*]
Moved dc->w.{text,background}Pixel to X11DRV_PDEVICE where they
belong.
Sat Sep 5 05:12:09 1998 Ove Kaaven <ovek@arcticnet.no>
* [include/dosexe.h] [include/miscemu.h] [include/msdos.h]
[loader/dos/dosvm.c] [loader/dos/module.c] [msdos/dpmi.c]
[msdos/int2f.c] [msdos/interrupts.c]
Fixed portability. Adapted some code to make it easier to
integrate the DOS subsystem with the DPMI subsystem, made
the DPMI simulated real-mode interrupts be handled the V86
way. Added support for .COM files. Made int2f DPMI check
fail, to avoid pkunzip crashing in attempting to use DPMI.
Generally moved stuff around a little.
It is now technically possible to load several DOS programs
into the same memory space. Not tested, though.
Fri Sep 4 21:40:45 1998 Marcus Meissner <marcus@jet.franken.de>
* [if1632/kernel.spec]
Changed 500-53x stubnames accordingly to nt3.51 krnl386.exe.
* [win32/except.c]
Fixed one bad program behaviour, (deleting SEH while in
first walk). RtlUnwind is broken too I think (it should unwind
on success, not while walking the exception chain).
* [ole/ole2nls.c]
Get*DefaultLCID returns 0x400|id. expected by one application.
* [if1632/snoop.c]
Handle non-standard SP returns more graceful.
* [windows/class.c]
hinstances are mostly irrelevant for win32.
* [memory/string.c] [misc/registry.c]
lstrcmpi32W: use toupper for characters < 0x100. (speedup hack
for registry.c)
Some small speedup hacks for registry.c
Thu Sep 3 20:40:16 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [Makefile.in][configure][configure.in][dlls/Makefile.in]
[dlls/comctl32/Makefile.in]
Created dlls/comctl32 and moved the common controls stuff to it.
* [misc/version.c]
Removed COMCTL32_DllGetVersion. The fixed function is part
of the common controls stuff.
* [dlls/comctl32/*.c][include/commctrl.h]
Added structure size tests.
* [dlls/comctl32/toolbar.c]
Fixed a bug in TOOLBAR_GetMaxWidth().
* [dlls/comctl32/animate.c][include/animate.h]
[dlls/comctl32/comboex.c][include/comboex.h]
[dlls/comctl32/hotkey.c][include/hotkey.h]
[dlls/comctl32/listview.c][include/listview.h]
[dlls/comctl32/commctrl.c][include/commctrl.h]
New files. Added Animation, ComboBoxEx, Hotkey and
Listview control dummies.
* [dlls/comctl32/tooltips.c]
Fixed a display bug and font selection.
* [dlls/comctl32/comctl32undoc.c][include/commctrl.h]
Added missing DPA functions. Fixed bugs and published the
function prototypes.
* [documentation/common_controls]
Updated.
Wed Sep 2 15:43:45 1998 Patrik Stridvall <ps@leissner.se>
* [AUTHORS] [include/authors.h]
Added myself as a Wine author.
* [memory/virtual.c] [objects/dc.c]
Fixed runtime errors for Solaris.
* [misc/ddeml.c] [objects/gdiobj.c]
Minor fixes.
* [win32/device.c]
Added stubs for IFSMgr VxDCall and
a partial implementation of IFSMgr DeviceIo.
* [relay32/Makefile.in] [relay32/builtin32.c] [relay32/imm32.spec]
[relay32/msnet32.spec] [relay32/oledlg.spec]
Added new spec files for IMM32.DLL, MSNET32.DLL, OLEDLG.DLL.
* [misc/Makefile.in] [misc/imm.c] [include/imm.h]
Added news files for implementation of IMM32.DLL.
All functions return 0 as is correct for all Western Languages.
* [ole/Makefile.in] [ole/oledlg.c] [include/oledlg.h]
Added new files for implementation of OLEDLG.DLL.
Added stubs with FIXME:s for all functions.
Wed Sep 2 10:50:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [dlls/shell32/contmenu.c][dlls/shell32/shellole.c]
[dlls/shell32/shlfolder.c][dlls/shell32/shlview.c]
[documentation/shell32][include/shell.h]
Clean up, bugfixes.
* [dlls/shell32/enumidlist.c]
Fileattributes implemented.
* [dlls/shell32/pidl.c]
Class pidlmgr splited into functions, structures changed,
some functions rewritten.
* [dlls/shell32/shell32_main.c]
Small changes and bugfixes SHGetFileInfoA, SHGetSpecialFolderLocation.
* [dlls/shell32/shellord.c][relay32/shell32.spec]
Parameter documented, implemented SHCloneSpecialIDList.
Stub improved ShellExecuteEx32A.
New stubs SHFind_InitMenuPopup, FileMenu_InitMenuPopup,
FileMenu_Create, FileMenu_TrackPopupMenuEx, SHWinHelp,
SHRunConrolPanel, DAD_ShowDragImage, FileMenu_Destroy,
SHGetDataFromIDListA, SHFileOperationA.
* [include/winnls.h][include/ole2nls.c]
TIME_FORCE24HOURFORMAT, TIME_NOTIMEMARKER implemented
in OLE_GetFormatA, GetTimeFormat32A.
* [win32/code_page.c]
WideCharToMultiByte: parameter checking and returning of strlen
implemented.
* [windows/keyboard.c][windows/defwnd.c]
Debug messages added.
* [windows/win.c]
WIN_SetWindowLong GWL_STYLE and GWL_EXSTYLE implemented.
* [controls/menu.c]
Missing line added.
* [include/winerror.h]
Macros for SUCCEEDED and FAILED added.
Mon Aug 31 00:55:31 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [loader/module.c]
Bugfix: LoadModule16 should *not* call LoadModule32.
* [files/dos_fs.c]
Bugfix: don't crash if given directory doesn't exist.
Sat Aug 29 15:00:49 1998 Turchanov Sergey <turchanov@usa.net>
* [include/mmsystem.h][multimedia/mmsystem.c][relay32/winmm.spec]
Almost completed implementation of [snd]PlaySound (except
flags SND_ALIAS_ID and SND_APPLICATION).
* [if1632/user.spec][windows/winpos.c]
Added SetWindowRgn16 stub.
Sat Aug 29 02:53:31 1998 Alexander Lukyanov <lav@long.yar.ru>
* [files/drive.c]
GetDriveType32A: return DRIVE_DOESNOTEXIST in case of non
existent drive.
* [msdos/int21.c]
INT21_FindFirstFCB: check drive validity to prevent oops.
* [win32/file.c]
CreateFile32A: duplicate STD_{INPUT,OUTPUT}_HANDLE.
* [files/dos_fs.c]
Make DOSFS_OpenDir treat "" as "/".
DOSFS_OpenDevice: duplicate STD_{INPUT,OUTPUT}_HANDLE.
* [windows/dialog.c]
GetNextDlgTabItem32: use last/first item instead of first/last
when hwndCtrl==0. This fixes initial focus.
Sat Aug 29 02:46:32 1998 Adrian Harvey <adrian@select.com.au>
* [include/process.h] [include/process.c]
Renamed PROCESS_SELF to CURRENT_PROCESS_PSEUDOHANDLE in line
with thread constant, and Win32 documentation (which calls it
a pseudohandle.) Made GetCurrentProcess actually use this
constant instead of the value.
* [include/process.h] [include/thread.h] [scheduler/thread.c]
[scheduler/process.c] [scheduler/handle.c]
Modify HANDLE_GetObjPtr to understand about
CURRENT_THREAD_PSEUDOHANDLE and CURRENT_PROCESS_PSEUDOHANDLE.
This allows DuplicateHandle to do the correct thing with these
handles. Removed now duplicate functionality from THREAD_GetPtr
and PROCESS_GetPtr.
* [loader/ne/segment.c]
Fixed two places where HFILE32s were being created and passed to
16-bit code. This should unbreak NE self-loading code.
Added two casts to remove compile time warnings.
Fri Aug 28 21:04:13 1998 Joseph Pranevich <knight@baltimore.wwaves.com>
* [msdos/dosmem.c] [msdos/int2f.c]
Added beginnings of DOS error table.
* [msdos/int1a.c]
Stub for subfunction 0xb0.
* [msdos/int10.c] [loader/dos/dosvm.c]
INT 10 support completely rewritten and lots of debugging
added. Now, DOS apps that use INT 10 to write to the screen will
work. (Beyond Zork does, at least. Somewhat.)
* [include/miscemu.h] [msdos/dosmem.c] [msdos/int21.c]
Another shot at getting MS's generic error message facility
right.
* [msdos/int21.c]
Command.Com wanted to set its own PSP address. I let it.
Wed Aug 26 12:26:20 1998 Matthew Toseland <Matthew.Toseland@btinternet.com>
* [include/file.h] [misc/lzexpand.c]
Fixed LZCopy16 by fixing HFILE16/HFILE32 convertor macros so don't
convert lzw handles.
Tue Aug 25 22:22:55 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [misc/registry.c]
In RegEnumvalue, ivalue == 0 is a legal request and should
return the first entry.
* [msdos/int21.c]
Add handling for Int21-48/49 in Win16. Makes blinker demo work.
* [windows/winproc.c]
Add Msg32A<->Msg32W translation for LB_ADDSTRING.
Tue Aug 25 21:03:31 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [windows/win.c]
Fix for SetParent(): MS Windows 3.11 does not clear the WS_CHILD
flag when a child window is reparented to the desktop window.
Mon Aug 24 20:55:22 1998 Berend Reitsma <berend at asset-control dot com>
* [controls/menu.c]
Menus created with SetMenuItemInfo and InsertMenuItem should
work now.
Sun Aug 23 23:23:23 1998 Alex Korobka <korobka@ams.sunysb.edu>
* [controls/combo.c]
Added CB_GETITEMHEIGHT.
* [windows/winpos.c]
WM_NCHITTEST, SWP_FRAMECHANGED bugfixes.
Sat Aug 22 21:15:29 1998 Alex Priem <alexp@sci.kun.nl>
* [files/profile.c] [include/windows.h]
Added GetPrivateProfileSectionNames[AW],GetPrivateProfileSectionW,
GetPrivateProfileStructW, GetProfileSectionW,
WriteProfileSection[AW], WritePrivateProfileStructW.
1998-09-13 18:32:00 +02:00
|
|
|
#else /* !MZ_SUPPORTED */
|
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 Jürgen 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-07-02 21:59:40 +02:00
|
|
|
/***********************************************************************
|
2010-01-04 16:29:19 +01:00
|
|
|
* DOSVM_Enter
|
2001-07-02 21:59:40 +02:00
|
|
|
*/
|
2010-01-04 13:44:22 +01:00
|
|
|
INT DOSVM_Enter( CONTEXT86 *context )
|
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 Jürgen 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
|
|
|
{
|
2008-05-07 17:33:50 +02:00
|
|
|
SetLastError( ERROR_NOT_SUPPORTED );
|
|
|
|
return -1;
|
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 Jürgen 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-07-02 21:59:40 +02:00
|
|
|
/***********************************************************************
|
2010-01-04 16:29:19 +01:00
|
|
|
* DOSVM_Wait
|
2001-07-02 21:59:40 +02:00
|
|
|
*/
|
2010-01-04 13:44:22 +01:00
|
|
|
void DOSVM_Wait( CONTEXT86 *waitctx ) { }
|
2001-07-02 21:59:40 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2010-01-04 16:29:19 +01:00
|
|
|
* DOSVM_PIC_ioport_out
|
2001-07-02 21:59:40 +02:00
|
|
|
*/
|
2010-01-04 13:44:22 +01:00
|
|
|
void DOSVM_PIC_ioport_out( WORD port, BYTE val) {}
|
2001-07-02 21:59:40 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2010-01-04 16:29:19 +01:00
|
|
|
* DOSVM_QueueEvent
|
2001-07-02 21:59:40 +02:00
|
|
|
*/
|
2010-01-04 13:44:22 +01:00
|
|
|
void DOSVM_QueueEvent( INT irq, INT priority, DOSRELAY relay, LPVOID data)
|
2000-07-29 16:34:45 +02:00
|
|
|
{
|
|
|
|
if (irq<0) {
|
|
|
|
/* callback event, perform it with dummy context */
|
|
|
|
CONTEXT86 context;
|
|
|
|
memset(&context,0,sizeof(context));
|
2000-09-24 22:47:50 +02:00
|
|
|
(*relay)(&context,data);
|
2000-07-29 16:34:45 +02:00
|
|
|
} else {
|
2002-05-24 23:17:59 +02:00
|
|
|
ERR("IRQ without DOS task: should not happen\n");
|
2000-07-29 16:34:45 +02:00
|
|
|
}
|
|
|
|
}
|
1998-11-01 13:41:19 +01:00
|
|
|
|
2003-06-24 04:24:54 +02:00
|
|
|
#endif /* MZ_SUPPORTED */
|
2001-11-08 18:06:40 +01:00
|
|
|
|
2001-12-04 20:54:44 +01:00
|
|
|
|
2003-06-23 05:35:51 +02:00
|
|
|
/**********************************************************************
|
|
|
|
* DOSVM_AcknowledgeIRQ
|
|
|
|
*
|
|
|
|
* This routine should be called by all internal IRQ handlers.
|
|
|
|
*/
|
|
|
|
void WINAPI DOSVM_AcknowledgeIRQ( CONTEXT86 *context )
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Send EOI to PIC.
|
|
|
|
*/
|
|
|
|
DOSVM_PIC_ioport_out( 0x20, 0x20 );
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Protected mode IRQ handlers are supposed
|
|
|
|
* to turn VIF flag on before they return.
|
|
|
|
*/
|
|
|
|
if (!ISV86(context))
|
2008-03-01 11:57:00 +01:00
|
|
|
get_vm86_teb_info()->dpmi_vif = 1;
|
2003-06-23 05:35:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-01-04 14:31:01 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* DOSVM_AllocUMB
|
|
|
|
*
|
|
|
|
* Allocate upper memory block (UMB) from upper memory.
|
|
|
|
* Returned pointer is aligned to 16-byte (paragraph) boundary.
|
|
|
|
*
|
|
|
|
* This routine is only for allocating static storage for
|
|
|
|
* Wine internal uses. Allocated memory can be accessed from
|
|
|
|
* real mode, memory is taken from area already mapped and reserved
|
|
|
|
* by Wine and the allocation has very little memory and speed
|
|
|
|
* overhead. Use of this routine also preserves precious DOS
|
|
|
|
* conventional memory.
|
|
|
|
*/
|
|
|
|
static LPVOID DOSVM_AllocUMB( DWORD size )
|
|
|
|
{
|
|
|
|
LPVOID ptr = (LPVOID)DOSVM_umb_free;
|
|
|
|
|
|
|
|
size = ((size + 15) >> 4) << 4;
|
|
|
|
|
|
|
|
if(DOSVM_umb_free + size - 1 > DOSVM_UMB_TOP) {
|
|
|
|
ERR("Out of upper memory area.\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
DOSVM_umb_free += size;
|
|
|
|
return ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* alloc_selector
|
|
|
|
*
|
|
|
|
* Allocate a selector corresponding to a real mode address.
|
|
|
|
* size must be < 64k.
|
|
|
|
*/
|
|
|
|
static WORD alloc_selector( void *base, DWORD size, unsigned char flags )
|
|
|
|
{
|
|
|
|
WORD sel = wine_ldt_alloc_entries( 1 );
|
|
|
|
|
|
|
|
if (sel)
|
|
|
|
{
|
|
|
|
LDT_ENTRY entry;
|
|
|
|
wine_ldt_set_base( &entry, base );
|
|
|
|
wine_ldt_set_limit( &entry, size - 1 );
|
|
|
|
wine_ldt_set_flags( &entry, flags );
|
|
|
|
wine_ldt_set_entry( sel, &entry );
|
|
|
|
}
|
|
|
|
return sel;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* DOSVM_AllocCodeUMB
|
|
|
|
*
|
|
|
|
* Allocate upper memory block for storing code stubs.
|
|
|
|
* Initializes real mode segment and 16-bit protected mode selector
|
|
|
|
* for the allocated code block.
|
|
|
|
*
|
|
|
|
* FIXME: should allocate a single PM selector for the whole UMB range.
|
|
|
|
*/
|
|
|
|
static LPVOID DOSVM_AllocCodeUMB( DWORD size, WORD *segment, WORD *selector )
|
|
|
|
{
|
|
|
|
LPVOID ptr = DOSVM_AllocUMB( size );
|
|
|
|
|
|
|
|
if (segment)
|
|
|
|
*segment = (DWORD)ptr >> 4;
|
|
|
|
|
|
|
|
if (selector)
|
|
|
|
*selector = alloc_selector( ptr, size, WINE_LDT_FLAGS_CODE );
|
|
|
|
|
|
|
|
return ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* DOSVM_AllocDataUMB
|
|
|
|
*
|
|
|
|
* Allocate upper memory block for storing data.
|
|
|
|
* Initializes real mode segment and 16-bit protected mode selector
|
|
|
|
* for the allocated data block.
|
|
|
|
*/
|
|
|
|
LPVOID DOSVM_AllocDataUMB( DWORD size, WORD *segment, WORD *selector )
|
|
|
|
{
|
|
|
|
LPVOID ptr = DOSVM_AllocUMB( size );
|
|
|
|
|
|
|
|
if (segment)
|
|
|
|
*segment = (DWORD)ptr >> 4;
|
|
|
|
|
|
|
|
if (selector)
|
|
|
|
*selector = alloc_selector( ptr, size, WINE_LDT_FLAGS_DATA );
|
|
|
|
|
|
|
|
return ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* DOSVM_InitSegments
|
|
|
|
*
|
|
|
|
* Initializes DOSVM_dpmi_segments. Allocates required memory and
|
|
|
|
* sets up segments and selectors for accessing the memory.
|
|
|
|
*/
|
2010-01-05 14:26:05 +01:00
|
|
|
void DOSVM_InitSegments(void)
|
2010-01-04 14:31:01 +01:00
|
|
|
{
|
|
|
|
LPSTR ptr;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
static const char wrap_code[]={
|
|
|
|
0xCD,0x31, /* int $0x31 */
|
|
|
|
0xCB /* lret */
|
|
|
|
};
|
|
|
|
|
|
|
|
static const char enter_xms[]=
|
|
|
|
{
|
|
|
|
/* XMS hookable entry point */
|
|
|
|
0xEB,0x03, /* jmp entry */
|
|
|
|
0x90,0x90,0x90, /* nop;nop;nop */
|
|
|
|
/* entry: */
|
|
|
|
/* real entry point */
|
|
|
|
/* for simplicity, we'll just use the same hook as DPMI below */
|
|
|
|
0xCD,0x31, /* int $0x31 */
|
|
|
|
0xCB /* lret */
|
|
|
|
};
|
|
|
|
|
|
|
|
static const char enter_pm[]=
|
|
|
|
{
|
|
|
|
0x50, /* pushw %ax */
|
|
|
|
0x52, /* pushw %dx */
|
|
|
|
0x55, /* pushw %bp */
|
|
|
|
0x89,0xE5, /* movw %sp,%bp */
|
|
|
|
/* get return CS */
|
|
|
|
0x8B,0x56,0x08, /* movw 8(%bp),%dx */
|
|
|
|
/* just call int 31 here to get into protected mode... */
|
|
|
|
/* it'll check whether it was called from dpmi_seg... */
|
|
|
|
0xCD,0x31, /* int $0x31 */
|
|
|
|
/* we are now in the context of a 16-bit relay call */
|
|
|
|
/* need to fixup our stack;
|
|
|
|
* 16-bit relay return address will be lost,
|
|
|
|
* but we won't worry quite yet
|
|
|
|
*/
|
|
|
|
0x8E,0xD0, /* movw %ax,%ss */
|
|
|
|
0x66,0x0F,0xB7,0xE5, /* movzwl %bp,%esp */
|
|
|
|
/* set return CS */
|
|
|
|
0x89,0x56,0x08, /* movw %dx,8(%bp) */
|
|
|
|
0x5D, /* popw %bp */
|
|
|
|
0x5A, /* popw %dx */
|
|
|
|
0x58, /* popw %ax */
|
|
|
|
0xfb, /* sti, enable and check virtual interrupts */
|
|
|
|
0xCB /* lret */
|
|
|
|
};
|
|
|
|
|
|
|
|
static const char relay[]=
|
|
|
|
{
|
|
|
|
0xca, 0x04, 0x00, /* 16-bit far return and pop 4 bytes (relay void* arg) */
|
|
|
|
0xcd, 0x31, /* int 31 */
|
|
|
|
0xfb, 0x66, 0xcb /* sti and 32-bit far return */
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Allocate pointer array.
|
|
|
|
*/
|
|
|
|
DOSVM_dpmi_segments = DOSVM_AllocUMB( sizeof(struct DPMI_segments) );
|
|
|
|
|
|
|
|
/*
|
|
|
|
* RM / offset 0: Exit from real mode.
|
|
|
|
* RM / offset 2: Points to lret opcode.
|
|
|
|
*/
|
|
|
|
ptr = DOSVM_AllocCodeUMB( sizeof(wrap_code),
|
|
|
|
&DOSVM_dpmi_segments->wrap_seg, 0 );
|
|
|
|
memcpy( ptr, wrap_code, sizeof(wrap_code) );
|
|
|
|
|
|
|
|
/*
|
|
|
|
* RM / offset 0: XMS driver entry.
|
|
|
|
*/
|
|
|
|
ptr = DOSVM_AllocCodeUMB( sizeof(enter_xms),
|
|
|
|
&DOSVM_dpmi_segments->xms_seg, 0 );
|
|
|
|
memcpy( ptr, enter_xms, sizeof(enter_xms) );
|
|
|
|
|
|
|
|
/*
|
|
|
|
* RM / offset 0: Switch to DPMI.
|
|
|
|
* PM / offset 8: DPMI raw mode switch.
|
|
|
|
*/
|
|
|
|
ptr = DOSVM_AllocCodeUMB( sizeof(enter_pm),
|
|
|
|
&DOSVM_dpmi_segments->dpmi_seg,
|
|
|
|
&DOSVM_dpmi_segments->dpmi_sel );
|
|
|
|
memcpy( ptr, enter_pm, sizeof(enter_pm) );
|
|
|
|
|
|
|
|
/*
|
|
|
|
* PM / offset N*6: Interrupt N in DPMI32.
|
|
|
|
*/
|
|
|
|
ptr = DOSVM_AllocCodeUMB( 6 * 256,
|
|
|
|
0, &DOSVM_dpmi_segments->int48_sel );
|
|
|
|
for(i=0; i<256; i++) {
|
|
|
|
/*
|
|
|
|
* Each 32-bit interrupt handler is 6 bytes:
|
|
|
|
* 0xCD,<i> = int <i> (nested 16-bit interrupt)
|
|
|
|
* 0x66,0xCA,0x04,0x00 = ret 4 (32-bit far return and pop 4 bytes / eflags)
|
|
|
|
*/
|
|
|
|
ptr[i * 6 + 0] = 0xCD;
|
|
|
|
ptr[i * 6 + 1] = i;
|
|
|
|
ptr[i * 6 + 2] = 0x66;
|
|
|
|
ptr[i * 6 + 3] = 0xCA;
|
|
|
|
ptr[i * 6 + 4] = 0x04;
|
|
|
|
ptr[i * 6 + 5] = 0x00;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* PM / offset N*5: Interrupt N in 16-bit protected mode.
|
|
|
|
*/
|
|
|
|
ptr = DOSVM_AllocCodeUMB( 5 * 256,
|
|
|
|
0, &DOSVM_dpmi_segments->int16_sel );
|
|
|
|
for(i=0; i<256; i++) {
|
|
|
|
/*
|
|
|
|
* Each 16-bit interrupt handler is 5 bytes:
|
|
|
|
* 0xCD,<i> = int <i> (interrupt)
|
|
|
|
* 0xCA,0x02,0x00 = ret 2 (16-bit far return and pop 2 bytes / eflags)
|
|
|
|
*/
|
|
|
|
ptr[i * 5 + 0] = 0xCD;
|
|
|
|
ptr[i * 5 + 1] = i;
|
|
|
|
ptr[i * 5 + 2] = 0xCA;
|
|
|
|
ptr[i * 5 + 3] = 0x02;
|
|
|
|
ptr[i * 5 + 4] = 0x00;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* PM / offset 0: Stub where __wine_call_from_16_regs returns.
|
|
|
|
* PM / offset 3: Stub which swaps back to 32-bit application code/stack.
|
|
|
|
* PM / offset 5: Stub which enables interrupts
|
|
|
|
*/
|
|
|
|
ptr = DOSVM_AllocCodeUMB( sizeof(relay),
|
|
|
|
0, &DOSVM_dpmi_segments->relay_code_sel);
|
|
|
|
memcpy( ptr, relay, sizeof(relay) );
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Space for 16-bit stack used by relay code.
|
|
|
|
*/
|
|
|
|
ptr = DOSVM_AllocDataUMB( DOSVM_RELAY_DATA_SIZE,
|
|
|
|
0, &DOSVM_dpmi_segments->relay_data_sel);
|
|
|
|
memset( ptr, 0, DOSVM_RELAY_DATA_SIZE );
|
|
|
|
|
|
|
|
/*
|
|
|
|
* As we store code in UMB we should make sure it is executable
|
|
|
|
*/
|
|
|
|
VirtualProtect((void *)DOSVM_UMB_BOTTOM, DOSVM_UMB_TOP - DOSVM_UMB_BOTTOM, PAGE_EXECUTE_READWRITE, NULL);
|
|
|
|
|
2010-01-05 14:26:05 +01:00
|
|
|
event_notifier = CreateEventW(NULL, FALSE, FALSE, NULL);
|
2001-11-08 18:06:40 +01:00
|
|
|
}
|