Sweden-Number/dlls/ntdll/relay.c

1368 lines
46 KiB
C
Raw Normal View History

Release 971221 Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com> * [Make.rules.in] [Makefile.in] [documentation/Makefile.in] [documentation/README.documentation] First cut at Wine API documentation. No longer install reference manual by default. Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net> * [files/file.c] Fixed GetTempFileName16() to use current path of requested drive as needed. * [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec] [if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec] Added misc DLLs needed by various apps. Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no> * [if1632/gdi32.spec] [include/windows.h] [objects/palette.c] Inserted empty stub for CreateHalftonePalette. Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [windows/mdi.c] Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel(). * [graphics/metafiledrv/init.c] DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore fix cleanup of MetaDCs in CloseMetaFile(); they now actually get removed from the GDI heap! * [graphics/x11drv/xfont.c] Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce the number of bold-italic matches. Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk> * [graphics/painting.c] Included an implementation of DrawState * [if1632/thunk.c] Changed many fprintfs into dprintf_thunk * [include/cache.h] [graphics/cache.c] New files to hold cached handles to regulary used GDI object. * [include/windows.h] Added DRAWSTATExx typedefs Added DSS_DEFAULT define for DrawState * [objects/text.c] New implementation of GrayString() * [controls/uitools.c] Implemented DrawFrameControl() functions Changed DrawEdge() behaviour to win95 implementation Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de> * [graphics/path.c] [include/path.h] [graphics/painting.c] [if1632/gdi32.spec] [include/gdi.h] [include/windows.h] [objects/dc.c] Added preliminary support for GDI paths. * [objects/dc.c] Added DC_Init_DC_INFO function for initializing WIN_DC_INFO structure. * [include/windows.h] [include/gdi.h] [objects/gdiobj.c] Added DEFAULT_GUI_FONT. * [include/winerror.h] Added a few error codes. * [memory/heap.c] Changed HeapAlloc to make the correct calls to SetLastError (now conforms to NT's behaviour). * [windows/win.c] Changed WIN_CreateWindowEx to allow child windows with zero width / height. Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [if1632/*] [relay32/*] Moved all 32-bit relay stuff to relay32/ * [fi1632/thunk.c] [win32/kernel32.c] Moved all KERNEL32 ordinal functions to kernel32.c * [memory/selector.c] Initialize selectors in AllocSelectorArray. * [tools/build.c] Generate C instead of assembly for Win32 relays. Fixed stack corruption in CallTo16 functions, found by Bertho Stultiens. Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net> * [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec] Added built-in OLE2THK.DLL. * [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c] [misc/toolhelp.c] Added stubs for StackTraceFirst(), StackTraceCSIPFirst(), StackTraceNext(), UTSelectorOffsetToLinear() and UTLinearToSelectorOffset(). Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [misc/winsock.c] 32-bit API fixes for reported problems (thanks to Marcus and David). * [graphics/x11drv/xfont.c] Little tweak in point size calculation. * [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c] [windows/winproc.c] [windows/win.c] Bug fixes. Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de> * [files/dos_fs.c] OpenFile with empty filename and OF_PARSE returns current dir. * [misc/commdlg.c] Ignore initial dir if bogus. * [files/file.c] Locking an identic region in a file must not be an error. * [misc/lstr.c] Use wide char ctype functions. Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> * [file/drive.c] First attempt for GetDiskFreeSpaceEx. Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [loader/pe_resource.c] Fixed wrongly appearing menus problem (only use default lookups in last resource subtree). * [multimedia/*.c] Added win32 support for time* and joy* lowlevel drivers, (not excessively tested), some misc fixes and cleanups. * [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c] [include/interfaces.h][include/shlobj.h] Added some more undocumented SHELL32 functions, some shell folder interface stubs added, SHGetMalloc, SHGetDesktopFolder, SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added, IMalloc, IUnknown implemented. * [windows/msgbox.c] Implemented MessageBoxIndirect*, some internal changes. * [if1632/thunk.c] KERNEL_431 implemented. * [objects/gdiobj.c] GetCurrentObject implemented. Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu> * [objects/dib.c] Fix a couple small DIB problems. * [controls/edit.c] Fix a typo. * [files/dos_fs.c] Try normal readdir in case fs is specified as vfat but isn't. * [files/profile.c] Implementation of WritePrivateProfileSection32A from Uwe Bonnes. * [misc/printdrv.c] OpenPrinter32A stub, helps Word97 start. * [objects/text.c] Fixup implementation of GetTextCharsetInfo. * [scheduler/process.c] Fix environment variable expansion. * [win32/code_page.c] Make MultiByteToWideChar and WideCharToMultiByte conform in return values and error conditions to those in Windows NT 4.0. * [windows/message.c] Fix broadcasting problems in Win32. The Win32 docs say to use HWND_TOPMOST to broadcast to all Win32 Windows. * [memory/virtual.c] [loader/pe_image.c] Do not map in VirtualAlloc if address is specified and space is not available. This is required by Win32. * [include/pen.h] [include/x11drv.h] [objects/dc.c] [objects/pen.c] [graphics/x11drv/pen.c] Support for ExtCreatePen. Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk> * [*/*.c] [*/*.h] Add lots of prototypes. * [if1632/kernel32.spec][include/windows.h][include/winnt.h] [misc/cpu.c] Define IsProcessorFeaturePresent. * [misc/crtdll.c] (CRTDLL__getcwd): Allocate enough memory for the terminating zero. * [misc/ver.c] Improve check for null component in _find_data[AW]. Plug leaks in VerQueryValue*. * [win32/console.c][if1632/kernel32.spec] Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32. * [windows/message.c][if1632/user32.spec][include/windows.h] Define SendMessageTimeout*. * [graphics/x11drv/xfont.c] Change algorithm of __genericCheckSum to be alignment safe. * [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c] Include winsock.h early to avoid Solaris problem. * [include/windows.h] Undef FSHIFT before we define it. * [rc/winerc.c] Include <fcntl.h> instead of <sys/fcntl.h>. * [files/file.c] Use strerror in FILE_SetDosError if available. * [include/config.h.in] [configure.in] Check for strerror. * [objects/gdiobj.c] Make static font structures aligned. Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net> * [win32/console.c] [if1632/kernel32.spec] [include/windows.h] Added stub for GetNumberOfConsoleMouseButtons. Added stub for PeekConsoleInput(A,W). Fixed parameter list for WriteConsole(A,W). GetNumberOfConsoleInputEvents now returns 0 events instead of 1 (since low-level console functions are not yet supported). GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
/*
* Win32 relay and snoop functions
Release 971221 Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com> * [Make.rules.in] [Makefile.in] [documentation/Makefile.in] [documentation/README.documentation] First cut at Wine API documentation. No longer install reference manual by default. Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net> * [files/file.c] Fixed GetTempFileName16() to use current path of requested drive as needed. * [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec] [if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec] Added misc DLLs needed by various apps. Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no> * [if1632/gdi32.spec] [include/windows.h] [objects/palette.c] Inserted empty stub for CreateHalftonePalette. Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [windows/mdi.c] Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel(). * [graphics/metafiledrv/init.c] DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore fix cleanup of MetaDCs in CloseMetaFile(); they now actually get removed from the GDI heap! * [graphics/x11drv/xfont.c] Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce the number of bold-italic matches. Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk> * [graphics/painting.c] Included an implementation of DrawState * [if1632/thunk.c] Changed many fprintfs into dprintf_thunk * [include/cache.h] [graphics/cache.c] New files to hold cached handles to regulary used GDI object. * [include/windows.h] Added DRAWSTATExx typedefs Added DSS_DEFAULT define for DrawState * [objects/text.c] New implementation of GrayString() * [controls/uitools.c] Implemented DrawFrameControl() functions Changed DrawEdge() behaviour to win95 implementation Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de> * [graphics/path.c] [include/path.h] [graphics/painting.c] [if1632/gdi32.spec] [include/gdi.h] [include/windows.h] [objects/dc.c] Added preliminary support for GDI paths. * [objects/dc.c] Added DC_Init_DC_INFO function for initializing WIN_DC_INFO structure. * [include/windows.h] [include/gdi.h] [objects/gdiobj.c] Added DEFAULT_GUI_FONT. * [include/winerror.h] Added a few error codes. * [memory/heap.c] Changed HeapAlloc to make the correct calls to SetLastError (now conforms to NT's behaviour). * [windows/win.c] Changed WIN_CreateWindowEx to allow child windows with zero width / height. Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [if1632/*] [relay32/*] Moved all 32-bit relay stuff to relay32/ * [fi1632/thunk.c] [win32/kernel32.c] Moved all KERNEL32 ordinal functions to kernel32.c * [memory/selector.c] Initialize selectors in AllocSelectorArray. * [tools/build.c] Generate C instead of assembly for Win32 relays. Fixed stack corruption in CallTo16 functions, found by Bertho Stultiens. Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net> * [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec] Added built-in OLE2THK.DLL. * [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c] [misc/toolhelp.c] Added stubs for StackTraceFirst(), StackTraceCSIPFirst(), StackTraceNext(), UTSelectorOffsetToLinear() and UTLinearToSelectorOffset(). Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [misc/winsock.c] 32-bit API fixes for reported problems (thanks to Marcus and David). * [graphics/x11drv/xfont.c] Little tweak in point size calculation. * [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c] [windows/winproc.c] [windows/win.c] Bug fixes. Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de> * [files/dos_fs.c] OpenFile with empty filename and OF_PARSE returns current dir. * [misc/commdlg.c] Ignore initial dir if bogus. * [files/file.c] Locking an identic region in a file must not be an error. * [misc/lstr.c] Use wide char ctype functions. Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> * [file/drive.c] First attempt for GetDiskFreeSpaceEx. Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [loader/pe_resource.c] Fixed wrongly appearing menus problem (only use default lookups in last resource subtree). * [multimedia/*.c] Added win32 support for time* and joy* lowlevel drivers, (not excessively tested), some misc fixes and cleanups. * [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c] [include/interfaces.h][include/shlobj.h] Added some more undocumented SHELL32 functions, some shell folder interface stubs added, SHGetMalloc, SHGetDesktopFolder, SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added, IMalloc, IUnknown implemented. * [windows/msgbox.c] Implemented MessageBoxIndirect*, some internal changes. * [if1632/thunk.c] KERNEL_431 implemented. * [objects/gdiobj.c] GetCurrentObject implemented. Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu> * [objects/dib.c] Fix a couple small DIB problems. * [controls/edit.c] Fix a typo. * [files/dos_fs.c] Try normal readdir in case fs is specified as vfat but isn't. * [files/profile.c] Implementation of WritePrivateProfileSection32A from Uwe Bonnes. * [misc/printdrv.c] OpenPrinter32A stub, helps Word97 start. * [objects/text.c] Fixup implementation of GetTextCharsetInfo. * [scheduler/process.c] Fix environment variable expansion. * [win32/code_page.c] Make MultiByteToWideChar and WideCharToMultiByte conform in return values and error conditions to those in Windows NT 4.0. * [windows/message.c] Fix broadcasting problems in Win32. The Win32 docs say to use HWND_TOPMOST to broadcast to all Win32 Windows. * [memory/virtual.c] [loader/pe_image.c] Do not map in VirtualAlloc if address is specified and space is not available. This is required by Win32. * [include/pen.h] [include/x11drv.h] [objects/dc.c] [objects/pen.c] [graphics/x11drv/pen.c] Support for ExtCreatePen. Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk> * [*/*.c] [*/*.h] Add lots of prototypes. * [if1632/kernel32.spec][include/windows.h][include/winnt.h] [misc/cpu.c] Define IsProcessorFeaturePresent. * [misc/crtdll.c] (CRTDLL__getcwd): Allocate enough memory for the terminating zero. * [misc/ver.c] Improve check for null component in _find_data[AW]. Plug leaks in VerQueryValue*. * [win32/console.c][if1632/kernel32.spec] Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32. * [windows/message.c][if1632/user32.spec][include/windows.h] Define SendMessageTimeout*. * [graphics/x11drv/xfont.c] Change algorithm of __genericCheckSum to be alignment safe. * [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c] Include winsock.h early to avoid Solaris problem. * [include/windows.h] Undef FSHIFT before we define it. * [rc/winerc.c] Include <fcntl.h> instead of <sys/fcntl.h>. * [files/file.c] Use strerror in FILE_SetDosError if available. * [include/config.h.in] [configure.in] Check for strerror. * [objects/gdiobj.c] Make static font structures aligned. Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net> * [win32/console.c] [if1632/kernel32.spec] [include/windows.h] Added stub for GetNumberOfConsoleMouseButtons. Added stub for PeekConsoleInput(A,W). Fixed parameter list for WriteConsole(A,W). GetNumberOfConsoleInputEvents now returns 0 events instead of 1 (since low-level console functions are not yet supported). GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
*
* Copyright 1997 Alexandre Julliard
* Copyright 1998 Marcus Meissner
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Release 971221 Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com> * [Make.rules.in] [Makefile.in] [documentation/Makefile.in] [documentation/README.documentation] First cut at Wine API documentation. No longer install reference manual by default. Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net> * [files/file.c] Fixed GetTempFileName16() to use current path of requested drive as needed. * [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec] [if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec] Added misc DLLs needed by various apps. Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no> * [if1632/gdi32.spec] [include/windows.h] [objects/palette.c] Inserted empty stub for CreateHalftonePalette. Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [windows/mdi.c] Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel(). * [graphics/metafiledrv/init.c] DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore fix cleanup of MetaDCs in CloseMetaFile(); they now actually get removed from the GDI heap! * [graphics/x11drv/xfont.c] Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce the number of bold-italic matches. Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk> * [graphics/painting.c] Included an implementation of DrawState * [if1632/thunk.c] Changed many fprintfs into dprintf_thunk * [include/cache.h] [graphics/cache.c] New files to hold cached handles to regulary used GDI object. * [include/windows.h] Added DRAWSTATExx typedefs Added DSS_DEFAULT define for DrawState * [objects/text.c] New implementation of GrayString() * [controls/uitools.c] Implemented DrawFrameControl() functions Changed DrawEdge() behaviour to win95 implementation Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de> * [graphics/path.c] [include/path.h] [graphics/painting.c] [if1632/gdi32.spec] [include/gdi.h] [include/windows.h] [objects/dc.c] Added preliminary support for GDI paths. * [objects/dc.c] Added DC_Init_DC_INFO function for initializing WIN_DC_INFO structure. * [include/windows.h] [include/gdi.h] [objects/gdiobj.c] Added DEFAULT_GUI_FONT. * [include/winerror.h] Added a few error codes. * [memory/heap.c] Changed HeapAlloc to make the correct calls to SetLastError (now conforms to NT's behaviour). * [windows/win.c] Changed WIN_CreateWindowEx to allow child windows with zero width / height. Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [if1632/*] [relay32/*] Moved all 32-bit relay stuff to relay32/ * [fi1632/thunk.c] [win32/kernel32.c] Moved all KERNEL32 ordinal functions to kernel32.c * [memory/selector.c] Initialize selectors in AllocSelectorArray. * [tools/build.c] Generate C instead of assembly for Win32 relays. Fixed stack corruption in CallTo16 functions, found by Bertho Stultiens. Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net> * [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec] Added built-in OLE2THK.DLL. * [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c] [misc/toolhelp.c] Added stubs for StackTraceFirst(), StackTraceCSIPFirst(), StackTraceNext(), UTSelectorOffsetToLinear() and UTLinearToSelectorOffset(). Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [misc/winsock.c] 32-bit API fixes for reported problems (thanks to Marcus and David). * [graphics/x11drv/xfont.c] Little tweak in point size calculation. * [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c] [windows/winproc.c] [windows/win.c] Bug fixes. Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de> * [files/dos_fs.c] OpenFile with empty filename and OF_PARSE returns current dir. * [misc/commdlg.c] Ignore initial dir if bogus. * [files/file.c] Locking an identic region in a file must not be an error. * [misc/lstr.c] Use wide char ctype functions. Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> * [file/drive.c] First attempt for GetDiskFreeSpaceEx. Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [loader/pe_resource.c] Fixed wrongly appearing menus problem (only use default lookups in last resource subtree). * [multimedia/*.c] Added win32 support for time* and joy* lowlevel drivers, (not excessively tested), some misc fixes and cleanups. * [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c] [include/interfaces.h][include/shlobj.h] Added some more undocumented SHELL32 functions, some shell folder interface stubs added, SHGetMalloc, SHGetDesktopFolder, SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added, IMalloc, IUnknown implemented. * [windows/msgbox.c] Implemented MessageBoxIndirect*, some internal changes. * [if1632/thunk.c] KERNEL_431 implemented. * [objects/gdiobj.c] GetCurrentObject implemented. Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu> * [objects/dib.c] Fix a couple small DIB problems. * [controls/edit.c] Fix a typo. * [files/dos_fs.c] Try normal readdir in case fs is specified as vfat but isn't. * [files/profile.c] Implementation of WritePrivateProfileSection32A from Uwe Bonnes. * [misc/printdrv.c] OpenPrinter32A stub, helps Word97 start. * [objects/text.c] Fixup implementation of GetTextCharsetInfo. * [scheduler/process.c] Fix environment variable expansion. * [win32/code_page.c] Make MultiByteToWideChar and WideCharToMultiByte conform in return values and error conditions to those in Windows NT 4.0. * [windows/message.c] Fix broadcasting problems in Win32. The Win32 docs say to use HWND_TOPMOST to broadcast to all Win32 Windows. * [memory/virtual.c] [loader/pe_image.c] Do not map in VirtualAlloc if address is specified and space is not available. This is required by Win32. * [include/pen.h] [include/x11drv.h] [objects/dc.c] [objects/pen.c] [graphics/x11drv/pen.c] Support for ExtCreatePen. Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk> * [*/*.c] [*/*.h] Add lots of prototypes. * [if1632/kernel32.spec][include/windows.h][include/winnt.h] [misc/cpu.c] Define IsProcessorFeaturePresent. * [misc/crtdll.c] (CRTDLL__getcwd): Allocate enough memory for the terminating zero. * [misc/ver.c] Improve check for null component in _find_data[AW]. Plug leaks in VerQueryValue*. * [win32/console.c][if1632/kernel32.spec] Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32. * [windows/message.c][if1632/user32.spec][include/windows.h] Define SendMessageTimeout*. * [graphics/x11drv/xfont.c] Change algorithm of __genericCheckSum to be alignment safe. * [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c] Include winsock.h early to avoid Solaris problem. * [include/windows.h] Undef FSHIFT before we define it. * [rc/winerc.c] Include <fcntl.h> instead of <sys/fcntl.h>. * [files/file.c] Use strerror in FILE_SetDosError if available. * [include/config.h.in] [configure.in] Check for strerror. * [objects/gdiobj.c] Make static font structures aligned. Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net> * [win32/console.c] [if1632/kernel32.spec] [include/windows.h] Added stub for GetNumberOfConsoleMouseButtons. Added stub for PeekConsoleInput(A,W). Fixed parameter list for WriteConsole(A,W). GetNumberOfConsoleInputEvents now returns 0 events instead of 1 (since low-level console functions are not yet supported). GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
*/
#include <assert.h>
Release 980614 Sun Jun 15 10:30:35 1998 Andreas Mohr <100.30936@germany.net> * [files/dos_fs.c] [files/file.c] [if1632/wprocs.spec] [misc/aspi.c] Added support for scanners that need Adaptec's ASPI2DOS. * [graphics/env.c] [misc/printerdrv.c] [graphics/win16drv/init.c] [if1632/gdi.spec] [include/gdi.h] Enhanced printer support (especially Win95): Drv[GS]etPrinterData, [GS]etEnvironment; added AbortProc handling. * [misc/tapi32.c] [relay32/tapi32.spec] Added some stubs. * [configure.in] [graphics/fontengine.c] [include/windows.h] [misc/comm.c] [misc/w32skrnl.c] [misc/win32s16.c] Made Wine compile on HP-UX (just for fun ;) * [controls/menu.c] [include/windows.h] Complete rewrite of EnableMenuItem32. Free Agent 32 still doesn't work :( * [misc/version.c] [if1632/kernel.spec] [include/winbase.h] Implemented GetVersionEx16. * [misc/network.c] [if1632/user.spec] Fixed arguments of WNetGetPropertyText. * [misc/version.c] [relay32/comctl32.spec] [relay32/oleaut32.spec] Implemented COMCTL32_DllGetVersion, OaBuildVersion. * [win32/file.c] Fixed UNC handling of CreateFile32. Sat Jun 13 22:35:12 1998 Douglas Ridgway <ridgway@winehq.com> * [Makefile.in] [Make.rules.in] Added pattern for CVS merge files to 'make clean' * [ole/olecli.c] [windows/scroll.c] [windows/grahics.c] Add some DC handle unlocking. (When hdc's are always unlocked, they can be made moveable.) * [documentation/wine.texinfo] Started a Wine Design chapter with discussion of graphics driver model. Sat Jun 13 11:19:25 1998 David Luyer <luyer@ucs.uwa.edu.au> * [misc/main.c] [relay32/relay386.c] Added new option -debugmsg +relay=.... or -debugmsg -relay=... Fri Jun 12 22:56:09 1998 Marcus Meissner <marcus@jet.franken.de> * [relay32/snoop.c][relay32/builtin.c][loader/pe_image.c] Added inter win32 dll snooping. Use -debugmsg +snoop. Number of arguments and string references are autodetected. Some small bugfixes in the PE loader. * [misc/system.c] Disabled SystemTimers. They do not work with the current %fs handling in the 32->16 relaycode. (helps labview) * [msdos/dpmi.c][msdos/int2f.c][files/drive.c] Added a monoton linear increasing memory allocator for DPMI (required for LabView, HAFAS, ...) mscdex handling in emulated realmode interrupts (for mcicda.drv) allocate logical drives only once. (helps Myst) * [files/profile.c] Handle ^Z as space. Found on CDROMS (helps Myst Installer). * [multimedia/mmio.c] mmio* partially updated to win32. No funny additions. * [windows/driver.c] Added win32 driver handling (will be used for win32 multimedia/ msvideo drivers). * [win32/device.c] Added device handling (K32OBJ_DEVICE_IOCTL). Implemented VTDAPI.5 (used by win95' WINMM.timeGetTime()) Fri Jun 12 18:01:18 1998 Rein Klazes <rklazes@casema.net> * [ole/compobj.c relay32/ole32.spec] Add a stub for CoLockObjectExternal32. * [objects/clipping.c] Fix in IntersectClipRect(), when there is no initial clipping region. * [graphics/x11drv/graphics.c] Corrected several "one-off" errors for the Ellipse, Rectangle and RoundRectangle (especially small ones) draw routines. Arc and friends still have to be done. Fri Jun 12 06:23:19 1998 Matthew Becker <mbecker@glasscity.net> * [misc/ntdll.c] Fixed some of the parameter counts. * [misc/registry.c] General cleanup, documentation. Standard keys are allowed to be 'closed' and succeed. * [misc/shell.c] Check for correct return values from Reg* functions. * [win32/newfns.c] Added stubs for OpenDesktopA, SetThreadDesktop, and SetUserObjectInformationA. Wed Jun 10 20:28:08 1998 James Juran <jrj120@psu.edu> * [debugger/break.c] Fixed bug introduced in 980503 that broke the -debug command line option for PE executable files. * [configure.in] [include/acconfig.h] [include/debugtools.h] [documentation/debug-msgs] Added 'configure' options to compile out debugging messages. Use --disable-debug to disable all debugging messages, and --disable-trace to just disable TRACE messages. This results in a stripped executable that is 15-20% smaller. This option is very much untested--don't expect it to work. * [documentation/debug-msgs] [documentation/debugging] Minor updates. * [*/*.c] Fixed some compile warnings. This also includes the compile_warnings_trivial patch from WineHQ. Tue Jun 10 22:00:18 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [windows/sysmetrics.c][include/sysmetrics.h] Fixed some Win95 values. * [windows/nonclient.c][include/windows.h] Fixed some Win95 drawing bugs. Added extended window style flags (WS_EX_xxx). * [misc/printdrv.c][relay32/winspool.spec] Added stubs for DeletePrinterDriver32A, DeleteMonitor32A and DeletePort32A. * [windows/mdi.c][include/windows.h][relay32/user32.spec] Added stubs for CascadeWindows and TileWindows. * [controls/toolbar.c][include/toolbar.h] Fixed a few bugs and implemented new features. * [misc/shellord.c][relay32/shell32.spec] Added stubs for SHELL32_60, SHELL32_61 and SHELL32_184. * [controls/comctl32undoc.c][relay32/comctl32.spec] New file comctl32undoc.c. Contains undocumented functions of COMCTL32.DLL. These functions are needed to run EXPLORER.EXE IEXPLORE.EXE and TASKMAN.EXE. * [controls/status.c] Added text alignment. Tue Jun 8 22:00:00 1998 Bertho Stultiens <bertho@akhphd.au.dk> * [programs/*/Makefile.in] Changed the rules to use wrc as resource compiler but passing the source through gcc first for macro expansion. * [programs/*/*.rc] Added #include "windows.h" for the resource compiler in the appropriate files. * [tools/wrc/wrc.[ch]] [tools/wrc/writeres.c] Added commandline option -A for autoregister code. Corrected the underscore problem by checking the proper define from config.h. Sun Jun 7 22:09:29 1998 Pascal Cuoq <pcuoq@ens-lyon.fr> * [ole/ole2nls.c] [memory/string.c] Improved LCMapString32A, and changed CompareString32A, lstrcmp, lstrcmpi to use it. Sat Jun 6 19:00:50 1998 Martin Strmberg <ams@ludd.luth.se> * [include/winnt.h] Added typedefs for security and tokens. Sat Jun 6 12:26:31 1998 Morten Welinder <terra@diku.dk> * [objects/text.c] Use debugstr_an in DrawText16. * [loader/resource.c] Use debugres_w in FindResourceEx32W. Avoid crashing during debug when wm is NULL. * [if1632/relay.c] In RELAY_DebugCallTo16, send output to the right place and avoid side effects in macro arguments. Wed Jun 3 20:56:03 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk> * [controls/scroll.c] [windows/nonclient.c] Fix several off by one errors in scrollbar painting. Tue Jun 2 23:58:59 1998 Insomnia (Stea Greene) <insomnia@core.binghamton.edu> * [graphics/dsound.c] Rewrote mixer code to handle panning and volume for 16->16, 16->8, 8->16, and 8->8 bit mixes. Conforms to DirectX's "logarithmic hearing scale" as specified in M$VC docs. Still does not handle mixing of different frequencies (I am still working on that). Tested 16->16 extensively with StarCraft. Other mixing combinations untested but should work fine. Still kind of a work in progress, so be warned. Tue Jun 2 03:31:33 1998 Alexander V. Lukyanov <lav@long.yar.ru> * [tools/wrc/utils.c] dup_basename: fix to strip directory. Mon Jun 1 20:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de> * [include/windows.h] [objects/cursoricon.c] [relay32/user32.spec] Added stubs LoadCursorFromFileW and LoadCursorFromFileA.
1998-06-14 17:24:15 +02:00
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winternl.h"
#include "wine/exception.h"
#include "ntdll_misc.h"
#include "wine/debug.h"
Release 971221 Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com> * [Make.rules.in] [Makefile.in] [documentation/Makefile.in] [documentation/README.documentation] First cut at Wine API documentation. No longer install reference manual by default. Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net> * [files/file.c] Fixed GetTempFileName16() to use current path of requested drive as needed. * [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec] [if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec] Added misc DLLs needed by various apps. Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no> * [if1632/gdi32.spec] [include/windows.h] [objects/palette.c] Inserted empty stub for CreateHalftonePalette. Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [windows/mdi.c] Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel(). * [graphics/metafiledrv/init.c] DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore fix cleanup of MetaDCs in CloseMetaFile(); they now actually get removed from the GDI heap! * [graphics/x11drv/xfont.c] Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce the number of bold-italic matches. Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk> * [graphics/painting.c] Included an implementation of DrawState * [if1632/thunk.c] Changed many fprintfs into dprintf_thunk * [include/cache.h] [graphics/cache.c] New files to hold cached handles to regulary used GDI object. * [include/windows.h] Added DRAWSTATExx typedefs Added DSS_DEFAULT define for DrawState * [objects/text.c] New implementation of GrayString() * [controls/uitools.c] Implemented DrawFrameControl() functions Changed DrawEdge() behaviour to win95 implementation Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de> * [graphics/path.c] [include/path.h] [graphics/painting.c] [if1632/gdi32.spec] [include/gdi.h] [include/windows.h] [objects/dc.c] Added preliminary support for GDI paths. * [objects/dc.c] Added DC_Init_DC_INFO function for initializing WIN_DC_INFO structure. * [include/windows.h] [include/gdi.h] [objects/gdiobj.c] Added DEFAULT_GUI_FONT. * [include/winerror.h] Added a few error codes. * [memory/heap.c] Changed HeapAlloc to make the correct calls to SetLastError (now conforms to NT's behaviour). * [windows/win.c] Changed WIN_CreateWindowEx to allow child windows with zero width / height. Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [if1632/*] [relay32/*] Moved all 32-bit relay stuff to relay32/ * [fi1632/thunk.c] [win32/kernel32.c] Moved all KERNEL32 ordinal functions to kernel32.c * [memory/selector.c] Initialize selectors in AllocSelectorArray. * [tools/build.c] Generate C instead of assembly for Win32 relays. Fixed stack corruption in CallTo16 functions, found by Bertho Stultiens. Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net> * [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec] Added built-in OLE2THK.DLL. * [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c] [misc/toolhelp.c] Added stubs for StackTraceFirst(), StackTraceCSIPFirst(), StackTraceNext(), UTSelectorOffsetToLinear() and UTLinearToSelectorOffset(). Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [misc/winsock.c] 32-bit API fixes for reported problems (thanks to Marcus and David). * [graphics/x11drv/xfont.c] Little tweak in point size calculation. * [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c] [windows/winproc.c] [windows/win.c] Bug fixes. Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de> * [files/dos_fs.c] OpenFile with empty filename and OF_PARSE returns current dir. * [misc/commdlg.c] Ignore initial dir if bogus. * [files/file.c] Locking an identic region in a file must not be an error. * [misc/lstr.c] Use wide char ctype functions. Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> * [file/drive.c] First attempt for GetDiskFreeSpaceEx. Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [loader/pe_resource.c] Fixed wrongly appearing menus problem (only use default lookups in last resource subtree). * [multimedia/*.c] Added win32 support for time* and joy* lowlevel drivers, (not excessively tested), some misc fixes and cleanups. * [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c] [include/interfaces.h][include/shlobj.h] Added some more undocumented SHELL32 functions, some shell folder interface stubs added, SHGetMalloc, SHGetDesktopFolder, SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added, IMalloc, IUnknown implemented. * [windows/msgbox.c] Implemented MessageBoxIndirect*, some internal changes. * [if1632/thunk.c] KERNEL_431 implemented. * [objects/gdiobj.c] GetCurrentObject implemented. Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu> * [objects/dib.c] Fix a couple small DIB problems. * [controls/edit.c] Fix a typo. * [files/dos_fs.c] Try normal readdir in case fs is specified as vfat but isn't. * [files/profile.c] Implementation of WritePrivateProfileSection32A from Uwe Bonnes. * [misc/printdrv.c] OpenPrinter32A stub, helps Word97 start. * [objects/text.c] Fixup implementation of GetTextCharsetInfo. * [scheduler/process.c] Fix environment variable expansion. * [win32/code_page.c] Make MultiByteToWideChar and WideCharToMultiByte conform in return values and error conditions to those in Windows NT 4.0. * [windows/message.c] Fix broadcasting problems in Win32. The Win32 docs say to use HWND_TOPMOST to broadcast to all Win32 Windows. * [memory/virtual.c] [loader/pe_image.c] Do not map in VirtualAlloc if address is specified and space is not available. This is required by Win32. * [include/pen.h] [include/x11drv.h] [objects/dc.c] [objects/pen.c] [graphics/x11drv/pen.c] Support for ExtCreatePen. Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk> * [*/*.c] [*/*.h] Add lots of prototypes. * [if1632/kernel32.spec][include/windows.h][include/winnt.h] [misc/cpu.c] Define IsProcessorFeaturePresent. * [misc/crtdll.c] (CRTDLL__getcwd): Allocate enough memory for the terminating zero. * [misc/ver.c] Improve check for null component in _find_data[AW]. Plug leaks in VerQueryValue*. * [win32/console.c][if1632/kernel32.spec] Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32. * [windows/message.c][if1632/user32.spec][include/windows.h] Define SendMessageTimeout*. * [graphics/x11drv/xfont.c] Change algorithm of __genericCheckSum to be alignment safe. * [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c] Include winsock.h early to avoid Solaris problem. * [include/windows.h] Undef FSHIFT before we define it. * [rc/winerc.c] Include <fcntl.h> instead of <sys/fcntl.h>. * [files/file.c] Use strerror in FILE_SetDosError if available. * [include/config.h.in] [configure.in] Check for strerror. * [objects/gdiobj.c] Make static font structures aligned. Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net> * [win32/console.c] [if1632/kernel32.spec] [include/windows.h] Added stub for GetNumberOfConsoleMouseButtons. Added stub for PeekConsoleInput(A,W). Fixed parameter list for WriteConsole(A,W). GetNumberOfConsoleInputEvents now returns 0 events instead of 1 (since low-level console functions are not yet supported). GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
WINE_DEFAULT_DEBUG_CHANNEL(relay);
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
struct relay_descr /* descriptor for a module */
{
ULONG_PTR magic; /* signature */
void *relay_call; /* functions to call from relay thunks */
void *private; /* reserved for the relay code private data */
const char *entry_point_base; /* base address of entry point thunks */
const unsigned int *entry_point_offsets; /* offsets of entry points thunks */
const char *args_string; /* string describing the arguments */
};
struct relay_descr_rva /* RVA to the descriptor for PE dlls */
{
DWORD magic;
DWORD descr;
};
#define RELAY_DESCR_MAGIC 0xdeb90002
#define IS_INTARG(x) (((ULONG_PTR)(x) >> 16) == 0)
/* private data built at dll load time */
struct relay_entry_point
{
void *orig_func; /* original entry point function */
const char *name; /* function name (if any) */
};
struct relay_private_data
{
HMODULE module; /* module handle of this dll */
unsigned int base; /* ordinal base */
char dllname[40]; /* dll name (without .dll extension) */
struct relay_entry_point entry_points[1]; /* list of dll entry points */
};
static const WCHAR **debug_relay_excludelist;
static const WCHAR **debug_relay_includelist;
static const WCHAR **debug_snoop_excludelist;
static const WCHAR **debug_snoop_includelist;
static const WCHAR **debug_from_relay_excludelist;
static const WCHAR **debug_from_relay_includelist;
static const WCHAR **debug_from_snoop_excludelist;
static const WCHAR **debug_from_snoop_includelist;
static RTL_RUN_ONCE init_once = RTL_RUN_ONCE_INIT;
/* compare an ASCII and a Unicode string without depending on the current codepage */
static inline int strcmpAW( const char *strA, const WCHAR *strW )
{
while (*strA && ((unsigned char)*strA == *strW)) { strA++; strW++; }
return (unsigned char)*strA - *strW;
}
Release 980628 Sun Jun 28 18:37:02 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [if1632/signal.c] [miscemu/instr.c] [memory/virtual.c] Moved page-fault handling to INSTR_EmulateInstruction. * [scheduler/thread.c] Added locking and check for own thread in Suspend/ResumeThread. Sat Jun 27 21:25:21 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [objects/dib.c] [objects/bitmap.c] [objects/oembitmap.c] [graphics/x11drv/bitblt.c] [include/bitmap.h] Improved DIB section handling using page fault handlers. (Note: This patch includes code contributed by Matthew J. Francis.) * [memory/virtual.c] [if1632/signal.c] [include/global.h] Page Fault handler support added. * [if1632/signal.c] [loader/signal.c] [tools/build.c] [misc/system.c] [misc/winsock_dns.c] [include/sig_context.h] [include/thread.h] 16-bit %fs handling improved: Always preserve 16-bit %fs value, always restore 32-bit %fs value for signal handlers. * [if1632/thunk.c] [loader/module.c] [misc/callback.c] [windows/user.c] [loader/ne/resource.c] [include/callback.h] [include/module.h] [if1632/kernel.spec] [if1632/wprocs.spec] Resource Handler function pointer stored as 16-bit SEGPTR. * [loader/task.c] [windows/win.c] [windows/winpos.c] [if1632/user.spec] [if1632/kernel.spec] [loader/ne/module.c] Some minor incompatibilities fixed (Win32s relies on those): GetExePtr, IsWindow16 should set ES on return; WINPOS_SendNCCalcSize should cope with having the WINDOWPOS structure trashed; the OFSTRUCT in the NE module image should be placed *last*. * [include/windows.h] Missing prototype for FlushViewOfFile. * [loader/task.c] Bugfix: Command line should *not* start with a blank. * [loader/ne/segment.c] Bugfix: Fixups to offset 0 were never applied. * [misc/lstr.c] Use debugstr_a in OutputDebugString16. * [msdos/dpmi.c] Stub for int 31 BL=2f AX=7a20 (NetWare: Get VLM Call Address) added. * [msdos/int21.c] Stub for int 21 AX=440d CL=6f (get drive map information) added. Fri Jun 26 18:08:30 1998 Rein Klazes <rklazes@casema.net> * [windows/winpos.c] Fix small buglet that mixed up maximized and minimized windows. * [include/x11drv.h] [objects/dc.c] [graphics/x11drv/pen.c] [graphics/x11drv/graphics.c] Fix some bugs with lines joining styles. Draws rectangles with thick pens now correctly. Fri Jun 26 16:22:23 1998 James Juran <jrj120@psu.edu> * [misc/shell.c] Fixed bug I introduced last release in InternalExtractIcon. * [win32/file.c] Added documentation for CreateFile32A. * [documentation/wine.man] Updated manpage. * [ChangeLog] Added my entry from last release. Fri Jun 26 13:33:30 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk> * [graphics/psdrv/*] [if1632/wineps.spec] [include/psdrv.h] [include/print.h] [objects/gdiobj.c] First stages of an internal Postscript driver. See graphics/psdrv/README . Should print text (badly) from win3.1 notepad, write and winword6. * [documentation/printing] Some notes on printing. * [controls/edit.c] Strip off WS_BORDER in WM_NCREATE, edit draws its own rectangle. EC_USEFONTINFO seems to be used as a left/right value for EM_SETMARGINS and not as an action as the docs say. This actually makes more sense. Scroll the caret back to zero after a WM_SETTEXT. Fri Jun 26 10:56:25 1998 Marcus Meissner <marcus@jet.franken.de> * [if1632/snoop.c] Added win16 inter-dll snooping. * [win32/ordinals.c] KERNEL_485 is GetProcessDword. * [include/xmalloc.h][include/bitmap.h][misc/xmalloc.c] Added xcalloc so we 0 initialize XImages. Fixes/Hides the 'junk around MOPYFish'. * [misc/ntdll.c] Some stubs added. Thu Jun 25 15:22:43 1998 Adrian Harvey <adrian@select.com.au> * [scheduler/thread.c] Implemented SuspendThread and ResumeThread. Thu Jun 25 00:55:03 1998 Peter Hunnisett <hunnise@nortel.ca> * [include/debug.h,dplay.h,dsound.h][multimedia/dsound.c,dplay.c] [relay32/dplayx.spec,dplay.spec][multimedia/Makefile.in] [documentation/status/directplay] Added preliminary support for DirectPlay & DirectPlayLobby. Moved the preliminary stubs put in the dsound files into two new files dplay.h and dplay.c. Added new debug channel (dplay) for this. Created new document to keep track of implementation. * [include/winioctl.h][win32/device.c] Added some framework in DeviceIoControl to, in the future, support the "builtin" windows dwIoControlCodes. Added new header file winioctl.h . * [multimedia/mmsystem.c] Added slightly improved debugging information for PlaySound. Wed Jun 24 12:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de> * [files/profile.c][graphics/x11drv/xfont.c][loader/module.c] Changed lstrcmpi32A to strcasecmp, lstrncmpi32A to strncasecmp, lstrcpy32A to strcpy, lstrlen32A to strlen, lstrcmp32A to strcmp because it's not necessary to support locale on such places. It causes a huge overhead and even fails sometimes * [include/oleauto.h][include/winerror.h] Added some ole-related constants. * [misc/shell.c] SHELL32_DllGetClassObject, SHGetSpecialFolderLocation, SHGetPathFromIDList improved the stubs * [ole/folders.c] IShellFolder* functions rewrote the stubs so don't crash and give something sensible back, started implementation of. * [ole/typelib.c][relay32/oleaut32.spec] LoadTypeLib32, RegisterTypeLib stub. * [ole/ole2nls.c] Fixed a buffer overrun in CompareString32A. Test for a bad pointer in LCMapString32A (happens in winhlp32 while building a index for searching). * [relay32/oleaut32.spec] [ole/typelib.c] Added stub for LoadTypeLib (ole32) to make excel95 happy. Tue Jun 23 22:47:09 1998 Alex Priem <alexp@sci.kun.nl> * [files/profile.c] [relay32/kernel32.spec] Added WritePrivateProfileStructA, GetPrivateProfileStructA, GetPrivateProfileSectionNames16. Tue Jun 23 01:34:43 1998 Pascal Cuoq <pcuoq@ens-lyon.fr> * [ole/ole2nls.c] GetStringTypeEx32A: Implemented CT_CTYPE2 and CT_CTYPE3 cases. LCMapString32A: Map final '\0' for '\0'-terminated strings. * [misc/shellord.c] [files/profile.c] [graphics/driver.c] [loader/module.c] [msdos/int21.c] [windows/driver.c] [files/drive.c] Changed lstrcmpi32A -> strcasecmp. Should be OK in these places. Sat Jun 20 23:40:00 1998 Bertho Stultiens <bertho@akhphd.au.dk> * [tools/wrc/] Wrc version 1.0.2 (20-Jun-1998). Please revert to the file tools/wrc/CHANGES for details. Sat Jun 20 14:58:00 1998 Marcel Baur <mbaur@g26.ethz.ch> * [ole/ole2nls.c] [ole/nls/*] Added the first 57 nls files, most are not yet complete. Wed Jun 17 11:16:54 1998 David Luyer <luyer@ucs.uwa.edu.au> * [relay32/relay386.c] [if1632/relay.c] Move debug_relay_(include|exclude)_list handling into seperate function RELAY_ShowDebugmsgsRelay(). Include checking of this for 16 bit calls (originally only 32-bit calls). * [relay32/snoop.c] [misc/main.c] Add debug_snoop_(include|exclude)_list as per the relay stuff. Fix typo and add information on -debugmsg +/-relay=... in help on -debugmsg. Refer to availability of snoop too. Tue Jun 10 22:00:18 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [controls/header.c][include/header.h][include/commctrl.h] Added owner draw support. * [windows/nonclient.c][windows/sysmetics.c] Fixed menu bar height for Win95 look. Split NC_AdjustRect95() into NC_AdjustRectOuter95() and NC_AdjustRectInner95 to fix a menu bar bug. Improved Win95 look. * [controls/progress.c] Improved drawing code. Borders will be drawn by non-client code. * [controls/updown.c] Changed memory allocation and fixed some bugs. * [controls/toolbar.c] Fixed TB_BUTTONSTRUCTSIZE bug in MFC programs. Several improvements. * [misc/shell.c] Added stub for BrowseForFoldersA(). * [misc/shellord.c] Added stub for SHELL32_147(). * [controls/comctl32undoc.c] Minor changes. * [documentation/common_controls] New File: Documentation about development status, undocumented features and functions of the common controls.
1998-06-28 20:40:26 +02:00
/***********************************************************************
* build_list
Release 980628 Sun Jun 28 18:37:02 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [if1632/signal.c] [miscemu/instr.c] [memory/virtual.c] Moved page-fault handling to INSTR_EmulateInstruction. * [scheduler/thread.c] Added locking and check for own thread in Suspend/ResumeThread. Sat Jun 27 21:25:21 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [objects/dib.c] [objects/bitmap.c] [objects/oembitmap.c] [graphics/x11drv/bitblt.c] [include/bitmap.h] Improved DIB section handling using page fault handlers. (Note: This patch includes code contributed by Matthew J. Francis.) * [memory/virtual.c] [if1632/signal.c] [include/global.h] Page Fault handler support added. * [if1632/signal.c] [loader/signal.c] [tools/build.c] [misc/system.c] [misc/winsock_dns.c] [include/sig_context.h] [include/thread.h] 16-bit %fs handling improved: Always preserve 16-bit %fs value, always restore 32-bit %fs value for signal handlers. * [if1632/thunk.c] [loader/module.c] [misc/callback.c] [windows/user.c] [loader/ne/resource.c] [include/callback.h] [include/module.h] [if1632/kernel.spec] [if1632/wprocs.spec] Resource Handler function pointer stored as 16-bit SEGPTR. * [loader/task.c] [windows/win.c] [windows/winpos.c] [if1632/user.spec] [if1632/kernel.spec] [loader/ne/module.c] Some minor incompatibilities fixed (Win32s relies on those): GetExePtr, IsWindow16 should set ES on return; WINPOS_SendNCCalcSize should cope with having the WINDOWPOS structure trashed; the OFSTRUCT in the NE module image should be placed *last*. * [include/windows.h] Missing prototype for FlushViewOfFile. * [loader/task.c] Bugfix: Command line should *not* start with a blank. * [loader/ne/segment.c] Bugfix: Fixups to offset 0 were never applied. * [misc/lstr.c] Use debugstr_a in OutputDebugString16. * [msdos/dpmi.c] Stub for int 31 BL=2f AX=7a20 (NetWare: Get VLM Call Address) added. * [msdos/int21.c] Stub for int 21 AX=440d CL=6f (get drive map information) added. Fri Jun 26 18:08:30 1998 Rein Klazes <rklazes@casema.net> * [windows/winpos.c] Fix small buglet that mixed up maximized and minimized windows. * [include/x11drv.h] [objects/dc.c] [graphics/x11drv/pen.c] [graphics/x11drv/graphics.c] Fix some bugs with lines joining styles. Draws rectangles with thick pens now correctly. Fri Jun 26 16:22:23 1998 James Juran <jrj120@psu.edu> * [misc/shell.c] Fixed bug I introduced last release in InternalExtractIcon. * [win32/file.c] Added documentation for CreateFile32A. * [documentation/wine.man] Updated manpage. * [ChangeLog] Added my entry from last release. Fri Jun 26 13:33:30 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk> * [graphics/psdrv/*] [if1632/wineps.spec] [include/psdrv.h] [include/print.h] [objects/gdiobj.c] First stages of an internal Postscript driver. See graphics/psdrv/README . Should print text (badly) from win3.1 notepad, write and winword6. * [documentation/printing] Some notes on printing. * [controls/edit.c] Strip off WS_BORDER in WM_NCREATE, edit draws its own rectangle. EC_USEFONTINFO seems to be used as a left/right value for EM_SETMARGINS and not as an action as the docs say. This actually makes more sense. Scroll the caret back to zero after a WM_SETTEXT. Fri Jun 26 10:56:25 1998 Marcus Meissner <marcus@jet.franken.de> * [if1632/snoop.c] Added win16 inter-dll snooping. * [win32/ordinals.c] KERNEL_485 is GetProcessDword. * [include/xmalloc.h][include/bitmap.h][misc/xmalloc.c] Added xcalloc so we 0 initialize XImages. Fixes/Hides the 'junk around MOPYFish'. * [misc/ntdll.c] Some stubs added. Thu Jun 25 15:22:43 1998 Adrian Harvey <adrian@select.com.au> * [scheduler/thread.c] Implemented SuspendThread and ResumeThread. Thu Jun 25 00:55:03 1998 Peter Hunnisett <hunnise@nortel.ca> * [include/debug.h,dplay.h,dsound.h][multimedia/dsound.c,dplay.c] [relay32/dplayx.spec,dplay.spec][multimedia/Makefile.in] [documentation/status/directplay] Added preliminary support for DirectPlay & DirectPlayLobby. Moved the preliminary stubs put in the dsound files into two new files dplay.h and dplay.c. Added new debug channel (dplay) for this. Created new document to keep track of implementation. * [include/winioctl.h][win32/device.c] Added some framework in DeviceIoControl to, in the future, support the "builtin" windows dwIoControlCodes. Added new header file winioctl.h . * [multimedia/mmsystem.c] Added slightly improved debugging information for PlaySound. Wed Jun 24 12:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de> * [files/profile.c][graphics/x11drv/xfont.c][loader/module.c] Changed lstrcmpi32A to strcasecmp, lstrncmpi32A to strncasecmp, lstrcpy32A to strcpy, lstrlen32A to strlen, lstrcmp32A to strcmp because it's not necessary to support locale on such places. It causes a huge overhead and even fails sometimes * [include/oleauto.h][include/winerror.h] Added some ole-related constants. * [misc/shell.c] SHELL32_DllGetClassObject, SHGetSpecialFolderLocation, SHGetPathFromIDList improved the stubs * [ole/folders.c] IShellFolder* functions rewrote the stubs so don't crash and give something sensible back, started implementation of. * [ole/typelib.c][relay32/oleaut32.spec] LoadTypeLib32, RegisterTypeLib stub. * [ole/ole2nls.c] Fixed a buffer overrun in CompareString32A. Test for a bad pointer in LCMapString32A (happens in winhlp32 while building a index for searching). * [relay32/oleaut32.spec] [ole/typelib.c] Added stub for LoadTypeLib (ole32) to make excel95 happy. Tue Jun 23 22:47:09 1998 Alex Priem <alexp@sci.kun.nl> * [files/profile.c] [relay32/kernel32.spec] Added WritePrivateProfileStructA, GetPrivateProfileStructA, GetPrivateProfileSectionNames16. Tue Jun 23 01:34:43 1998 Pascal Cuoq <pcuoq@ens-lyon.fr> * [ole/ole2nls.c] GetStringTypeEx32A: Implemented CT_CTYPE2 and CT_CTYPE3 cases. LCMapString32A: Map final '\0' for '\0'-terminated strings. * [misc/shellord.c] [files/profile.c] [graphics/driver.c] [loader/module.c] [msdos/int21.c] [windows/driver.c] [files/drive.c] Changed lstrcmpi32A -> strcasecmp. Should be OK in these places. Sat Jun 20 23:40:00 1998 Bertho Stultiens <bertho@akhphd.au.dk> * [tools/wrc/] Wrc version 1.0.2 (20-Jun-1998). Please revert to the file tools/wrc/CHANGES for details. Sat Jun 20 14:58:00 1998 Marcel Baur <mbaur@g26.ethz.ch> * [ole/ole2nls.c] [ole/nls/*] Added the first 57 nls files, most are not yet complete. Wed Jun 17 11:16:54 1998 David Luyer <luyer@ucs.uwa.edu.au> * [relay32/relay386.c] [if1632/relay.c] Move debug_relay_(include|exclude)_list handling into seperate function RELAY_ShowDebugmsgsRelay(). Include checking of this for 16 bit calls (originally only 32-bit calls). * [relay32/snoop.c] [misc/main.c] Add debug_snoop_(include|exclude)_list as per the relay stuff. Fix typo and add information on -debugmsg +/-relay=... in help on -debugmsg. Refer to availability of snoop too. Tue Jun 10 22:00:18 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [controls/header.c][include/header.h][include/commctrl.h] Added owner draw support. * [windows/nonclient.c][windows/sysmetics.c] Fixed menu bar height for Win95 look. Split NC_AdjustRect95() into NC_AdjustRectOuter95() and NC_AdjustRectInner95 to fix a menu bar bug. Improved Win95 look. * [controls/progress.c] Improved drawing code. Borders will be drawn by non-client code. * [controls/updown.c] Changed memory allocation and fixed some bugs. * [controls/toolbar.c] Fixed TB_BUTTONSTRUCTSIZE bug in MFC programs. Several improvements. * [misc/shell.c] Added stub for BrowseForFoldersA(). * [misc/shellord.c] Added stub for SHELL32_147(). * [controls/comctl32undoc.c] Minor changes. * [documentation/common_controls] New File: Documentation about development status, undocumented features and functions of the common controls.
1998-06-28 20:40:26 +02:00
*
* Build a function list from a ';'-separated string.
Release 980628 Sun Jun 28 18:37:02 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [if1632/signal.c] [miscemu/instr.c] [memory/virtual.c] Moved page-fault handling to INSTR_EmulateInstruction. * [scheduler/thread.c] Added locking and check for own thread in Suspend/ResumeThread. Sat Jun 27 21:25:21 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [objects/dib.c] [objects/bitmap.c] [objects/oembitmap.c] [graphics/x11drv/bitblt.c] [include/bitmap.h] Improved DIB section handling using page fault handlers. (Note: This patch includes code contributed by Matthew J. Francis.) * [memory/virtual.c] [if1632/signal.c] [include/global.h] Page Fault handler support added. * [if1632/signal.c] [loader/signal.c] [tools/build.c] [misc/system.c] [misc/winsock_dns.c] [include/sig_context.h] [include/thread.h] 16-bit %fs handling improved: Always preserve 16-bit %fs value, always restore 32-bit %fs value for signal handlers. * [if1632/thunk.c] [loader/module.c] [misc/callback.c] [windows/user.c] [loader/ne/resource.c] [include/callback.h] [include/module.h] [if1632/kernel.spec] [if1632/wprocs.spec] Resource Handler function pointer stored as 16-bit SEGPTR. * [loader/task.c] [windows/win.c] [windows/winpos.c] [if1632/user.spec] [if1632/kernel.spec] [loader/ne/module.c] Some minor incompatibilities fixed (Win32s relies on those): GetExePtr, IsWindow16 should set ES on return; WINPOS_SendNCCalcSize should cope with having the WINDOWPOS structure trashed; the OFSTRUCT in the NE module image should be placed *last*. * [include/windows.h] Missing prototype for FlushViewOfFile. * [loader/task.c] Bugfix: Command line should *not* start with a blank. * [loader/ne/segment.c] Bugfix: Fixups to offset 0 were never applied. * [misc/lstr.c] Use debugstr_a in OutputDebugString16. * [msdos/dpmi.c] Stub for int 31 BL=2f AX=7a20 (NetWare: Get VLM Call Address) added. * [msdos/int21.c] Stub for int 21 AX=440d CL=6f (get drive map information) added. Fri Jun 26 18:08:30 1998 Rein Klazes <rklazes@casema.net> * [windows/winpos.c] Fix small buglet that mixed up maximized and minimized windows. * [include/x11drv.h] [objects/dc.c] [graphics/x11drv/pen.c] [graphics/x11drv/graphics.c] Fix some bugs with lines joining styles. Draws rectangles with thick pens now correctly. Fri Jun 26 16:22:23 1998 James Juran <jrj120@psu.edu> * [misc/shell.c] Fixed bug I introduced last release in InternalExtractIcon. * [win32/file.c] Added documentation for CreateFile32A. * [documentation/wine.man] Updated manpage. * [ChangeLog] Added my entry from last release. Fri Jun 26 13:33:30 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk> * [graphics/psdrv/*] [if1632/wineps.spec] [include/psdrv.h] [include/print.h] [objects/gdiobj.c] First stages of an internal Postscript driver. See graphics/psdrv/README . Should print text (badly) from win3.1 notepad, write and winword6. * [documentation/printing] Some notes on printing. * [controls/edit.c] Strip off WS_BORDER in WM_NCREATE, edit draws its own rectangle. EC_USEFONTINFO seems to be used as a left/right value for EM_SETMARGINS and not as an action as the docs say. This actually makes more sense. Scroll the caret back to zero after a WM_SETTEXT. Fri Jun 26 10:56:25 1998 Marcus Meissner <marcus@jet.franken.de> * [if1632/snoop.c] Added win16 inter-dll snooping. * [win32/ordinals.c] KERNEL_485 is GetProcessDword. * [include/xmalloc.h][include/bitmap.h][misc/xmalloc.c] Added xcalloc so we 0 initialize XImages. Fixes/Hides the 'junk around MOPYFish'. * [misc/ntdll.c] Some stubs added. Thu Jun 25 15:22:43 1998 Adrian Harvey <adrian@select.com.au> * [scheduler/thread.c] Implemented SuspendThread and ResumeThread. Thu Jun 25 00:55:03 1998 Peter Hunnisett <hunnise@nortel.ca> * [include/debug.h,dplay.h,dsound.h][multimedia/dsound.c,dplay.c] [relay32/dplayx.spec,dplay.spec][multimedia/Makefile.in] [documentation/status/directplay] Added preliminary support for DirectPlay & DirectPlayLobby. Moved the preliminary stubs put in the dsound files into two new files dplay.h and dplay.c. Added new debug channel (dplay) for this. Created new document to keep track of implementation. * [include/winioctl.h][win32/device.c] Added some framework in DeviceIoControl to, in the future, support the "builtin" windows dwIoControlCodes. Added new header file winioctl.h . * [multimedia/mmsystem.c] Added slightly improved debugging information for PlaySound. Wed Jun 24 12:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de> * [files/profile.c][graphics/x11drv/xfont.c][loader/module.c] Changed lstrcmpi32A to strcasecmp, lstrncmpi32A to strncasecmp, lstrcpy32A to strcpy, lstrlen32A to strlen, lstrcmp32A to strcmp because it's not necessary to support locale on such places. It causes a huge overhead and even fails sometimes * [include/oleauto.h][include/winerror.h] Added some ole-related constants. * [misc/shell.c] SHELL32_DllGetClassObject, SHGetSpecialFolderLocation, SHGetPathFromIDList improved the stubs * [ole/folders.c] IShellFolder* functions rewrote the stubs so don't crash and give something sensible back, started implementation of. * [ole/typelib.c][relay32/oleaut32.spec] LoadTypeLib32, RegisterTypeLib stub. * [ole/ole2nls.c] Fixed a buffer overrun in CompareString32A. Test for a bad pointer in LCMapString32A (happens in winhlp32 while building a index for searching). * [relay32/oleaut32.spec] [ole/typelib.c] Added stub for LoadTypeLib (ole32) to make excel95 happy. Tue Jun 23 22:47:09 1998 Alex Priem <alexp@sci.kun.nl> * [files/profile.c] [relay32/kernel32.spec] Added WritePrivateProfileStructA, GetPrivateProfileStructA, GetPrivateProfileSectionNames16. Tue Jun 23 01:34:43 1998 Pascal Cuoq <pcuoq@ens-lyon.fr> * [ole/ole2nls.c] GetStringTypeEx32A: Implemented CT_CTYPE2 and CT_CTYPE3 cases. LCMapString32A: Map final '\0' for '\0'-terminated strings. * [misc/shellord.c] [files/profile.c] [graphics/driver.c] [loader/module.c] [msdos/int21.c] [windows/driver.c] [files/drive.c] Changed lstrcmpi32A -> strcasecmp. Should be OK in these places. Sat Jun 20 23:40:00 1998 Bertho Stultiens <bertho@akhphd.au.dk> * [tools/wrc/] Wrc version 1.0.2 (20-Jun-1998). Please revert to the file tools/wrc/CHANGES for details. Sat Jun 20 14:58:00 1998 Marcel Baur <mbaur@g26.ethz.ch> * [ole/ole2nls.c] [ole/nls/*] Added the first 57 nls files, most are not yet complete. Wed Jun 17 11:16:54 1998 David Luyer <luyer@ucs.uwa.edu.au> * [relay32/relay386.c] [if1632/relay.c] Move debug_relay_(include|exclude)_list handling into seperate function RELAY_ShowDebugmsgsRelay(). Include checking of this for 16 bit calls (originally only 32-bit calls). * [relay32/snoop.c] [misc/main.c] Add debug_snoop_(include|exclude)_list as per the relay stuff. Fix typo and add information on -debugmsg +/-relay=... in help on -debugmsg. Refer to availability of snoop too. Tue Jun 10 22:00:18 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [controls/header.c][include/header.h][include/commctrl.h] Added owner draw support. * [windows/nonclient.c][windows/sysmetics.c] Fixed menu bar height for Win95 look. Split NC_AdjustRect95() into NC_AdjustRectOuter95() and NC_AdjustRectInner95 to fix a menu bar bug. Improved Win95 look. * [controls/progress.c] Improved drawing code. Borders will be drawn by non-client code. * [controls/updown.c] Changed memory allocation and fixed some bugs. * [controls/toolbar.c] Fixed TB_BUTTONSTRUCTSIZE bug in MFC programs. Several improvements. * [misc/shell.c] Added stub for BrowseForFoldersA(). * [misc/shellord.c] Added stub for SHELL32_147(). * [controls/comctl32undoc.c] Minor changes. * [documentation/common_controls] New File: Documentation about development status, undocumented features and functions of the common controls.
1998-06-28 20:40:26 +02:00
*/
static const WCHAR **build_list( const WCHAR *buffer )
{
int count = 1;
const WCHAR *p = buffer;
const WCHAR **ret;
while ((p = wcschr( p, ';' )))
{
count++;
p++;
Release 980628 Sun Jun 28 18:37:02 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [if1632/signal.c] [miscemu/instr.c] [memory/virtual.c] Moved page-fault handling to INSTR_EmulateInstruction. * [scheduler/thread.c] Added locking and check for own thread in Suspend/ResumeThread. Sat Jun 27 21:25:21 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [objects/dib.c] [objects/bitmap.c] [objects/oembitmap.c] [graphics/x11drv/bitblt.c] [include/bitmap.h] Improved DIB section handling using page fault handlers. (Note: This patch includes code contributed by Matthew J. Francis.) * [memory/virtual.c] [if1632/signal.c] [include/global.h] Page Fault handler support added. * [if1632/signal.c] [loader/signal.c] [tools/build.c] [misc/system.c] [misc/winsock_dns.c] [include/sig_context.h] [include/thread.h] 16-bit %fs handling improved: Always preserve 16-bit %fs value, always restore 32-bit %fs value for signal handlers. * [if1632/thunk.c] [loader/module.c] [misc/callback.c] [windows/user.c] [loader/ne/resource.c] [include/callback.h] [include/module.h] [if1632/kernel.spec] [if1632/wprocs.spec] Resource Handler function pointer stored as 16-bit SEGPTR. * [loader/task.c] [windows/win.c] [windows/winpos.c] [if1632/user.spec] [if1632/kernel.spec] [loader/ne/module.c] Some minor incompatibilities fixed (Win32s relies on those): GetExePtr, IsWindow16 should set ES on return; WINPOS_SendNCCalcSize should cope with having the WINDOWPOS structure trashed; the OFSTRUCT in the NE module image should be placed *last*. * [include/windows.h] Missing prototype for FlushViewOfFile. * [loader/task.c] Bugfix: Command line should *not* start with a blank. * [loader/ne/segment.c] Bugfix: Fixups to offset 0 were never applied. * [misc/lstr.c] Use debugstr_a in OutputDebugString16. * [msdos/dpmi.c] Stub for int 31 BL=2f AX=7a20 (NetWare: Get VLM Call Address) added. * [msdos/int21.c] Stub for int 21 AX=440d CL=6f (get drive map information) added. Fri Jun 26 18:08:30 1998 Rein Klazes <rklazes@casema.net> * [windows/winpos.c] Fix small buglet that mixed up maximized and minimized windows. * [include/x11drv.h] [objects/dc.c] [graphics/x11drv/pen.c] [graphics/x11drv/graphics.c] Fix some bugs with lines joining styles. Draws rectangles with thick pens now correctly. Fri Jun 26 16:22:23 1998 James Juran <jrj120@psu.edu> * [misc/shell.c] Fixed bug I introduced last release in InternalExtractIcon. * [win32/file.c] Added documentation for CreateFile32A. * [documentation/wine.man] Updated manpage. * [ChangeLog] Added my entry from last release. Fri Jun 26 13:33:30 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk> * [graphics/psdrv/*] [if1632/wineps.spec] [include/psdrv.h] [include/print.h] [objects/gdiobj.c] First stages of an internal Postscript driver. See graphics/psdrv/README . Should print text (badly) from win3.1 notepad, write and winword6. * [documentation/printing] Some notes on printing. * [controls/edit.c] Strip off WS_BORDER in WM_NCREATE, edit draws its own rectangle. EC_USEFONTINFO seems to be used as a left/right value for EM_SETMARGINS and not as an action as the docs say. This actually makes more sense. Scroll the caret back to zero after a WM_SETTEXT. Fri Jun 26 10:56:25 1998 Marcus Meissner <marcus@jet.franken.de> * [if1632/snoop.c] Added win16 inter-dll snooping. * [win32/ordinals.c] KERNEL_485 is GetProcessDword. * [include/xmalloc.h][include/bitmap.h][misc/xmalloc.c] Added xcalloc so we 0 initialize XImages. Fixes/Hides the 'junk around MOPYFish'. * [misc/ntdll.c] Some stubs added. Thu Jun 25 15:22:43 1998 Adrian Harvey <adrian@select.com.au> * [scheduler/thread.c] Implemented SuspendThread and ResumeThread. Thu Jun 25 00:55:03 1998 Peter Hunnisett <hunnise@nortel.ca> * [include/debug.h,dplay.h,dsound.h][multimedia/dsound.c,dplay.c] [relay32/dplayx.spec,dplay.spec][multimedia/Makefile.in] [documentation/status/directplay] Added preliminary support for DirectPlay & DirectPlayLobby. Moved the preliminary stubs put in the dsound files into two new files dplay.h and dplay.c. Added new debug channel (dplay) for this. Created new document to keep track of implementation. * [include/winioctl.h][win32/device.c] Added some framework in DeviceIoControl to, in the future, support the "builtin" windows dwIoControlCodes. Added new header file winioctl.h . * [multimedia/mmsystem.c] Added slightly improved debugging information for PlaySound. Wed Jun 24 12:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de> * [files/profile.c][graphics/x11drv/xfont.c][loader/module.c] Changed lstrcmpi32A to strcasecmp, lstrncmpi32A to strncasecmp, lstrcpy32A to strcpy, lstrlen32A to strlen, lstrcmp32A to strcmp because it's not necessary to support locale on such places. It causes a huge overhead and even fails sometimes * [include/oleauto.h][include/winerror.h] Added some ole-related constants. * [misc/shell.c] SHELL32_DllGetClassObject, SHGetSpecialFolderLocation, SHGetPathFromIDList improved the stubs * [ole/folders.c] IShellFolder* functions rewrote the stubs so don't crash and give something sensible back, started implementation of. * [ole/typelib.c][relay32/oleaut32.spec] LoadTypeLib32, RegisterTypeLib stub. * [ole/ole2nls.c] Fixed a buffer overrun in CompareString32A. Test for a bad pointer in LCMapString32A (happens in winhlp32 while building a index for searching). * [relay32/oleaut32.spec] [ole/typelib.c] Added stub for LoadTypeLib (ole32) to make excel95 happy. Tue Jun 23 22:47:09 1998 Alex Priem <alexp@sci.kun.nl> * [files/profile.c] [relay32/kernel32.spec] Added WritePrivateProfileStructA, GetPrivateProfileStructA, GetPrivateProfileSectionNames16. Tue Jun 23 01:34:43 1998 Pascal Cuoq <pcuoq@ens-lyon.fr> * [ole/ole2nls.c] GetStringTypeEx32A: Implemented CT_CTYPE2 and CT_CTYPE3 cases. LCMapString32A: Map final '\0' for '\0'-terminated strings. * [misc/shellord.c] [files/profile.c] [graphics/driver.c] [loader/module.c] [msdos/int21.c] [windows/driver.c] [files/drive.c] Changed lstrcmpi32A -> strcasecmp. Should be OK in these places. Sat Jun 20 23:40:00 1998 Bertho Stultiens <bertho@akhphd.au.dk> * [tools/wrc/] Wrc version 1.0.2 (20-Jun-1998). Please revert to the file tools/wrc/CHANGES for details. Sat Jun 20 14:58:00 1998 Marcel Baur <mbaur@g26.ethz.ch> * [ole/ole2nls.c] [ole/nls/*] Added the first 57 nls files, most are not yet complete. Wed Jun 17 11:16:54 1998 David Luyer <luyer@ucs.uwa.edu.au> * [relay32/relay386.c] [if1632/relay.c] Move debug_relay_(include|exclude)_list handling into seperate function RELAY_ShowDebugmsgsRelay(). Include checking of this for 16 bit calls (originally only 32-bit calls). * [relay32/snoop.c] [misc/main.c] Add debug_snoop_(include|exclude)_list as per the relay stuff. Fix typo and add information on -debugmsg +/-relay=... in help on -debugmsg. Refer to availability of snoop too. Tue Jun 10 22:00:18 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [controls/header.c][include/header.h][include/commctrl.h] Added owner draw support. * [windows/nonclient.c][windows/sysmetics.c] Fixed menu bar height for Win95 look. Split NC_AdjustRect95() into NC_AdjustRectOuter95() and NC_AdjustRectInner95 to fix a menu bar bug. Improved Win95 look. * [controls/progress.c] Improved drawing code. Borders will be drawn by non-client code. * [controls/updown.c] Changed memory allocation and fixed some bugs. * [controls/toolbar.c] Fixed TB_BUTTONSTRUCTSIZE bug in MFC programs. Several improvements. * [misc/shell.c] Added stub for BrowseForFoldersA(). * [misc/shellord.c] Added stub for SHELL32_147(). * [controls/comctl32undoc.c] Minor changes. * [documentation/common_controls] New File: Documentation about development status, undocumented features and functions of the common controls.
1998-06-28 20:40:26 +02:00
}
/* allocate count+1 pointers, plus the space for a copy of the string */
if ((ret = RtlAllocateHeap( GetProcessHeap(), 0,
(count+1) * sizeof(WCHAR*) + (wcslen(buffer)+1) * sizeof(WCHAR) )))
{
WCHAR *str = (WCHAR *)(ret + count + 1);
2011-10-20 02:02:38 +02:00
WCHAR *q = str;
wcscpy( str, buffer );
count = 0;
for (;;)
{
2011-10-20 02:02:38 +02:00
ret[count++] = q;
if (!(q = wcschr( q, ';' ))) break;
2011-10-20 02:02:38 +02:00
*q++ = 0;
}
ret[count++] = NULL;
Release 980628 Sun Jun 28 18:37:02 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [if1632/signal.c] [miscemu/instr.c] [memory/virtual.c] Moved page-fault handling to INSTR_EmulateInstruction. * [scheduler/thread.c] Added locking and check for own thread in Suspend/ResumeThread. Sat Jun 27 21:25:21 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [objects/dib.c] [objects/bitmap.c] [objects/oembitmap.c] [graphics/x11drv/bitblt.c] [include/bitmap.h] Improved DIB section handling using page fault handlers. (Note: This patch includes code contributed by Matthew J. Francis.) * [memory/virtual.c] [if1632/signal.c] [include/global.h] Page Fault handler support added. * [if1632/signal.c] [loader/signal.c] [tools/build.c] [misc/system.c] [misc/winsock_dns.c] [include/sig_context.h] [include/thread.h] 16-bit %fs handling improved: Always preserve 16-bit %fs value, always restore 32-bit %fs value for signal handlers. * [if1632/thunk.c] [loader/module.c] [misc/callback.c] [windows/user.c] [loader/ne/resource.c] [include/callback.h] [include/module.h] [if1632/kernel.spec] [if1632/wprocs.spec] Resource Handler function pointer stored as 16-bit SEGPTR. * [loader/task.c] [windows/win.c] [windows/winpos.c] [if1632/user.spec] [if1632/kernel.spec] [loader/ne/module.c] Some minor incompatibilities fixed (Win32s relies on those): GetExePtr, IsWindow16 should set ES on return; WINPOS_SendNCCalcSize should cope with having the WINDOWPOS structure trashed; the OFSTRUCT in the NE module image should be placed *last*. * [include/windows.h] Missing prototype for FlushViewOfFile. * [loader/task.c] Bugfix: Command line should *not* start with a blank. * [loader/ne/segment.c] Bugfix: Fixups to offset 0 were never applied. * [misc/lstr.c] Use debugstr_a in OutputDebugString16. * [msdos/dpmi.c] Stub for int 31 BL=2f AX=7a20 (NetWare: Get VLM Call Address) added. * [msdos/int21.c] Stub for int 21 AX=440d CL=6f (get drive map information) added. Fri Jun 26 18:08:30 1998 Rein Klazes <rklazes@casema.net> * [windows/winpos.c] Fix small buglet that mixed up maximized and minimized windows. * [include/x11drv.h] [objects/dc.c] [graphics/x11drv/pen.c] [graphics/x11drv/graphics.c] Fix some bugs with lines joining styles. Draws rectangles with thick pens now correctly. Fri Jun 26 16:22:23 1998 James Juran <jrj120@psu.edu> * [misc/shell.c] Fixed bug I introduced last release in InternalExtractIcon. * [win32/file.c] Added documentation for CreateFile32A. * [documentation/wine.man] Updated manpage. * [ChangeLog] Added my entry from last release. Fri Jun 26 13:33:30 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk> * [graphics/psdrv/*] [if1632/wineps.spec] [include/psdrv.h] [include/print.h] [objects/gdiobj.c] First stages of an internal Postscript driver. See graphics/psdrv/README . Should print text (badly) from win3.1 notepad, write and winword6. * [documentation/printing] Some notes on printing. * [controls/edit.c] Strip off WS_BORDER in WM_NCREATE, edit draws its own rectangle. EC_USEFONTINFO seems to be used as a left/right value for EM_SETMARGINS and not as an action as the docs say. This actually makes more sense. Scroll the caret back to zero after a WM_SETTEXT. Fri Jun 26 10:56:25 1998 Marcus Meissner <marcus@jet.franken.de> * [if1632/snoop.c] Added win16 inter-dll snooping. * [win32/ordinals.c] KERNEL_485 is GetProcessDword. * [include/xmalloc.h][include/bitmap.h][misc/xmalloc.c] Added xcalloc so we 0 initialize XImages. Fixes/Hides the 'junk around MOPYFish'. * [misc/ntdll.c] Some stubs added. Thu Jun 25 15:22:43 1998 Adrian Harvey <adrian@select.com.au> * [scheduler/thread.c] Implemented SuspendThread and ResumeThread. Thu Jun 25 00:55:03 1998 Peter Hunnisett <hunnise@nortel.ca> * [include/debug.h,dplay.h,dsound.h][multimedia/dsound.c,dplay.c] [relay32/dplayx.spec,dplay.spec][multimedia/Makefile.in] [documentation/status/directplay] Added preliminary support for DirectPlay & DirectPlayLobby. Moved the preliminary stubs put in the dsound files into two new files dplay.h and dplay.c. Added new debug channel (dplay) for this. Created new document to keep track of implementation. * [include/winioctl.h][win32/device.c] Added some framework in DeviceIoControl to, in the future, support the "builtin" windows dwIoControlCodes. Added new header file winioctl.h . * [multimedia/mmsystem.c] Added slightly improved debugging information for PlaySound. Wed Jun 24 12:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de> * [files/profile.c][graphics/x11drv/xfont.c][loader/module.c] Changed lstrcmpi32A to strcasecmp, lstrncmpi32A to strncasecmp, lstrcpy32A to strcpy, lstrlen32A to strlen, lstrcmp32A to strcmp because it's not necessary to support locale on such places. It causes a huge overhead and even fails sometimes * [include/oleauto.h][include/winerror.h] Added some ole-related constants. * [misc/shell.c] SHELL32_DllGetClassObject, SHGetSpecialFolderLocation, SHGetPathFromIDList improved the stubs * [ole/folders.c] IShellFolder* functions rewrote the stubs so don't crash and give something sensible back, started implementation of. * [ole/typelib.c][relay32/oleaut32.spec] LoadTypeLib32, RegisterTypeLib stub. * [ole/ole2nls.c] Fixed a buffer overrun in CompareString32A. Test for a bad pointer in LCMapString32A (happens in winhlp32 while building a index for searching). * [relay32/oleaut32.spec] [ole/typelib.c] Added stub for LoadTypeLib (ole32) to make excel95 happy. Tue Jun 23 22:47:09 1998 Alex Priem <alexp@sci.kun.nl> * [files/profile.c] [relay32/kernel32.spec] Added WritePrivateProfileStructA, GetPrivateProfileStructA, GetPrivateProfileSectionNames16. Tue Jun 23 01:34:43 1998 Pascal Cuoq <pcuoq@ens-lyon.fr> * [ole/ole2nls.c] GetStringTypeEx32A: Implemented CT_CTYPE2 and CT_CTYPE3 cases. LCMapString32A: Map final '\0' for '\0'-terminated strings. * [misc/shellord.c] [files/profile.c] [graphics/driver.c] [loader/module.c] [msdos/int21.c] [windows/driver.c] [files/drive.c] Changed lstrcmpi32A -> strcasecmp. Should be OK in these places. Sat Jun 20 23:40:00 1998 Bertho Stultiens <bertho@akhphd.au.dk> * [tools/wrc/] Wrc version 1.0.2 (20-Jun-1998). Please revert to the file tools/wrc/CHANGES for details. Sat Jun 20 14:58:00 1998 Marcel Baur <mbaur@g26.ethz.ch> * [ole/ole2nls.c] [ole/nls/*] Added the first 57 nls files, most are not yet complete. Wed Jun 17 11:16:54 1998 David Luyer <luyer@ucs.uwa.edu.au> * [relay32/relay386.c] [if1632/relay.c] Move debug_relay_(include|exclude)_list handling into seperate function RELAY_ShowDebugmsgsRelay(). Include checking of this for 16 bit calls (originally only 32-bit calls). * [relay32/snoop.c] [misc/main.c] Add debug_snoop_(include|exclude)_list as per the relay stuff. Fix typo and add information on -debugmsg +/-relay=... in help on -debugmsg. Refer to availability of snoop too. Tue Jun 10 22:00:18 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [controls/header.c][include/header.h][include/commctrl.h] Added owner draw support. * [windows/nonclient.c][windows/sysmetics.c] Fixed menu bar height for Win95 look. Split NC_AdjustRect95() into NC_AdjustRectOuter95() and NC_AdjustRectInner95 to fix a menu bar bug. Improved Win95 look. * [controls/progress.c] Improved drawing code. Borders will be drawn by non-client code. * [controls/updown.c] Changed memory allocation and fixed some bugs. * [controls/toolbar.c] Fixed TB_BUTTONSTRUCTSIZE bug in MFC programs. Several improvements. * [misc/shell.c] Added stub for BrowseForFoldersA(). * [misc/shellord.c] Added stub for SHELL32_147(). * [controls/comctl32undoc.c] Minor changes. * [documentation/common_controls] New File: Documentation about development status, undocumented features and functions of the common controls.
1998-06-28 20:40:26 +02:00
}
return ret;
}
/***********************************************************************
* load_list_value
*
* Load a function list from a registry value.
*/
static const WCHAR **load_list( HKEY hkey, const WCHAR *value )
{
char initial_buffer[4096];
char *buffer = initial_buffer;
DWORD count;
NTSTATUS status;
UNICODE_STRING name;
const WCHAR **list = NULL;
RtlInitUnicodeString( &name, value );
status = NtQueryValueKey( hkey, &name, KeyValuePartialInformation, buffer, sizeof(initial_buffer), &count );
if (status == STATUS_BUFFER_OVERFLOW)
{
buffer = RtlAllocateHeap( GetProcessHeap(), 0, count );
status = NtQueryValueKey( hkey, &name, KeyValuePartialInformation, buffer, count, &count );
}
if (status == STATUS_SUCCESS)
{
WCHAR *str = (WCHAR *)((KEY_VALUE_PARTIAL_INFORMATION *)buffer)->Data;
list = build_list( str );
if (list) TRACE( "%s = %s\n", debugstr_w(value), debugstr_w(str) );
}
if (buffer != initial_buffer) RtlFreeHeap( GetProcessHeap(), 0, buffer );
return list;
}
/***********************************************************************
* init_debug_lists
*
* Build the relay include/exclude function lists.
*/
static DWORD WINAPI init_debug_lists( RTL_RUN_ONCE *once, void *param, void **context )
{
OBJECT_ATTRIBUTES attr;
UNICODE_STRING name;
HANDLE root, hkey;
RtlOpenCurrentUser( KEY_ALL_ACCESS, &root );
attr.Length = sizeof(attr);
attr.RootDirectory = root;
attr.ObjectName = &name;
attr.Attributes = 0;
attr.SecurityDescriptor = NULL;
attr.SecurityQualityOfService = NULL;
RtlInitUnicodeString( &name, L"Software\\Wine\\Debug" );
/* @@ Wine registry key: HKCU\Software\Wine\Debug */
if (NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr )) hkey = 0;
NtClose( root );
if (!hkey) return TRUE;
debug_relay_includelist = load_list( hkey, L"RelayInclude" );
debug_relay_excludelist = load_list( hkey, L"RelayExclude" );
debug_snoop_includelist = load_list( hkey, L"SnoopInclude" );
debug_snoop_excludelist = load_list( hkey, L"SnoopExclude" );
debug_from_relay_includelist = load_list( hkey, L"RelayFromInclude" );
debug_from_relay_excludelist = load_list( hkey, L"RelayFromExclude" );
debug_from_snoop_includelist = load_list( hkey, L"SnoopFromInclude" );
debug_from_snoop_excludelist = load_list( hkey, L"SnoopFromExclude" );
NtClose( hkey );
return TRUE;
Release 980628 Sun Jun 28 18:37:02 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [if1632/signal.c] [miscemu/instr.c] [memory/virtual.c] Moved page-fault handling to INSTR_EmulateInstruction. * [scheduler/thread.c] Added locking and check for own thread in Suspend/ResumeThread. Sat Jun 27 21:25:21 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [objects/dib.c] [objects/bitmap.c] [objects/oembitmap.c] [graphics/x11drv/bitblt.c] [include/bitmap.h] Improved DIB section handling using page fault handlers. (Note: This patch includes code contributed by Matthew J. Francis.) * [memory/virtual.c] [if1632/signal.c] [include/global.h] Page Fault handler support added. * [if1632/signal.c] [loader/signal.c] [tools/build.c] [misc/system.c] [misc/winsock_dns.c] [include/sig_context.h] [include/thread.h] 16-bit %fs handling improved: Always preserve 16-bit %fs value, always restore 32-bit %fs value for signal handlers. * [if1632/thunk.c] [loader/module.c] [misc/callback.c] [windows/user.c] [loader/ne/resource.c] [include/callback.h] [include/module.h] [if1632/kernel.spec] [if1632/wprocs.spec] Resource Handler function pointer stored as 16-bit SEGPTR. * [loader/task.c] [windows/win.c] [windows/winpos.c] [if1632/user.spec] [if1632/kernel.spec] [loader/ne/module.c] Some minor incompatibilities fixed (Win32s relies on those): GetExePtr, IsWindow16 should set ES on return; WINPOS_SendNCCalcSize should cope with having the WINDOWPOS structure trashed; the OFSTRUCT in the NE module image should be placed *last*. * [include/windows.h] Missing prototype for FlushViewOfFile. * [loader/task.c] Bugfix: Command line should *not* start with a blank. * [loader/ne/segment.c] Bugfix: Fixups to offset 0 were never applied. * [misc/lstr.c] Use debugstr_a in OutputDebugString16. * [msdos/dpmi.c] Stub for int 31 BL=2f AX=7a20 (NetWare: Get VLM Call Address) added. * [msdos/int21.c] Stub for int 21 AX=440d CL=6f (get drive map information) added. Fri Jun 26 18:08:30 1998 Rein Klazes <rklazes@casema.net> * [windows/winpos.c] Fix small buglet that mixed up maximized and minimized windows. * [include/x11drv.h] [objects/dc.c] [graphics/x11drv/pen.c] [graphics/x11drv/graphics.c] Fix some bugs with lines joining styles. Draws rectangles with thick pens now correctly. Fri Jun 26 16:22:23 1998 James Juran <jrj120@psu.edu> * [misc/shell.c] Fixed bug I introduced last release in InternalExtractIcon. * [win32/file.c] Added documentation for CreateFile32A. * [documentation/wine.man] Updated manpage. * [ChangeLog] Added my entry from last release. Fri Jun 26 13:33:30 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk> * [graphics/psdrv/*] [if1632/wineps.spec] [include/psdrv.h] [include/print.h] [objects/gdiobj.c] First stages of an internal Postscript driver. See graphics/psdrv/README . Should print text (badly) from win3.1 notepad, write and winword6. * [documentation/printing] Some notes on printing. * [controls/edit.c] Strip off WS_BORDER in WM_NCREATE, edit draws its own rectangle. EC_USEFONTINFO seems to be used as a left/right value for EM_SETMARGINS and not as an action as the docs say. This actually makes more sense. Scroll the caret back to zero after a WM_SETTEXT. Fri Jun 26 10:56:25 1998 Marcus Meissner <marcus@jet.franken.de> * [if1632/snoop.c] Added win16 inter-dll snooping. * [win32/ordinals.c] KERNEL_485 is GetProcessDword. * [include/xmalloc.h][include/bitmap.h][misc/xmalloc.c] Added xcalloc so we 0 initialize XImages. Fixes/Hides the 'junk around MOPYFish'. * [misc/ntdll.c] Some stubs added. Thu Jun 25 15:22:43 1998 Adrian Harvey <adrian@select.com.au> * [scheduler/thread.c] Implemented SuspendThread and ResumeThread. Thu Jun 25 00:55:03 1998 Peter Hunnisett <hunnise@nortel.ca> * [include/debug.h,dplay.h,dsound.h][multimedia/dsound.c,dplay.c] [relay32/dplayx.spec,dplay.spec][multimedia/Makefile.in] [documentation/status/directplay] Added preliminary support for DirectPlay & DirectPlayLobby. Moved the preliminary stubs put in the dsound files into two new files dplay.h and dplay.c. Added new debug channel (dplay) for this. Created new document to keep track of implementation. * [include/winioctl.h][win32/device.c] Added some framework in DeviceIoControl to, in the future, support the "builtin" windows dwIoControlCodes. Added new header file winioctl.h . * [multimedia/mmsystem.c] Added slightly improved debugging information for PlaySound. Wed Jun 24 12:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de> * [files/profile.c][graphics/x11drv/xfont.c][loader/module.c] Changed lstrcmpi32A to strcasecmp, lstrncmpi32A to strncasecmp, lstrcpy32A to strcpy, lstrlen32A to strlen, lstrcmp32A to strcmp because it's not necessary to support locale on such places. It causes a huge overhead and even fails sometimes * [include/oleauto.h][include/winerror.h] Added some ole-related constants. * [misc/shell.c] SHELL32_DllGetClassObject, SHGetSpecialFolderLocation, SHGetPathFromIDList improved the stubs * [ole/folders.c] IShellFolder* functions rewrote the stubs so don't crash and give something sensible back, started implementation of. * [ole/typelib.c][relay32/oleaut32.spec] LoadTypeLib32, RegisterTypeLib stub. * [ole/ole2nls.c] Fixed a buffer overrun in CompareString32A. Test for a bad pointer in LCMapString32A (happens in winhlp32 while building a index for searching). * [relay32/oleaut32.spec] [ole/typelib.c] Added stub for LoadTypeLib (ole32) to make excel95 happy. Tue Jun 23 22:47:09 1998 Alex Priem <alexp@sci.kun.nl> * [files/profile.c] [relay32/kernel32.spec] Added WritePrivateProfileStructA, GetPrivateProfileStructA, GetPrivateProfileSectionNames16. Tue Jun 23 01:34:43 1998 Pascal Cuoq <pcuoq@ens-lyon.fr> * [ole/ole2nls.c] GetStringTypeEx32A: Implemented CT_CTYPE2 and CT_CTYPE3 cases. LCMapString32A: Map final '\0' for '\0'-terminated strings. * [misc/shellord.c] [files/profile.c] [graphics/driver.c] [loader/module.c] [msdos/int21.c] [windows/driver.c] [files/drive.c] Changed lstrcmpi32A -> strcasecmp. Should be OK in these places. Sat Jun 20 23:40:00 1998 Bertho Stultiens <bertho@akhphd.au.dk> * [tools/wrc/] Wrc version 1.0.2 (20-Jun-1998). Please revert to the file tools/wrc/CHANGES for details. Sat Jun 20 14:58:00 1998 Marcel Baur <mbaur@g26.ethz.ch> * [ole/ole2nls.c] [ole/nls/*] Added the first 57 nls files, most are not yet complete. Wed Jun 17 11:16:54 1998 David Luyer <luyer@ucs.uwa.edu.au> * [relay32/relay386.c] [if1632/relay.c] Move debug_relay_(include|exclude)_list handling into seperate function RELAY_ShowDebugmsgsRelay(). Include checking of this for 16 bit calls (originally only 32-bit calls). * [relay32/snoop.c] [misc/main.c] Add debug_snoop_(include|exclude)_list as per the relay stuff. Fix typo and add information on -debugmsg +/-relay=... in help on -debugmsg. Refer to availability of snoop too. Tue Jun 10 22:00:18 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [controls/header.c][include/header.h][include/commctrl.h] Added owner draw support. * [windows/nonclient.c][windows/sysmetics.c] Fixed menu bar height for Win95 look. Split NC_AdjustRect95() into NC_AdjustRectOuter95() and NC_AdjustRectInner95 to fix a menu bar bug. Improved Win95 look. * [controls/progress.c] Improved drawing code. Borders will be drawn by non-client code. * [controls/updown.c] Changed memory allocation and fixed some bugs. * [controls/toolbar.c] Fixed TB_BUTTONSTRUCTSIZE bug in MFC programs. Several improvements. * [misc/shell.c] Added stub for BrowseForFoldersA(). * [misc/shellord.c] Added stub for SHELL32_147(). * [controls/comctl32undoc.c] Minor changes. * [documentation/common_controls] New File: Documentation about development status, undocumented features and functions of the common controls.
1998-06-28 20:40:26 +02:00
}
/***********************************************************************
* check_list
*
* Check if a given module and function is in the list.
*/
static BOOL check_list( const WCHAR *module, int ordinal, const char *func, const WCHAR *const *list )
{
char ord_str[10];
sprintf( ord_str, "%d", ordinal );
for(; *list; list++)
{
const WCHAR *p = wcsrchr( *list, '.' );
if (p && p > *list) /* check module and function */
{
int len = p - *list;
if (wcsnicmp( module, *list, len - 1 ) || module[len]) continue;
if (p[1] == '*' && !p[2]) return TRUE;
if (!strcmpAW( ord_str, p + 1 )) return TRUE;
if (func && !strcmpAW( func, p + 1 )) return TRUE;
}
else /* function only */
{
if (func && !strcmpAW( func, *list )) return TRUE;
}
}
return FALSE;
}
/***********************************************************************
* check_relay_include
*
* Check if a given function must be included in the relay output.
*/
static BOOL check_relay_include( const WCHAR *module, int ordinal, const char *func )
{
if (debug_relay_excludelist && check_list( module, ordinal, func, debug_relay_excludelist ))
return FALSE;
if (debug_relay_includelist && !check_list( module, ordinal, func, debug_relay_includelist ))
return FALSE;
return TRUE;
}
/***********************************************************************
* check_from_module
*
* Check if calls from a given module must be included in the relay/snoop output,
* given the exclusion and inclusion lists.
*/
static BOOL check_from_module( const WCHAR **includelist, const WCHAR **excludelist, const WCHAR *module )
{
const WCHAR **listitem;
BOOL show;
if (!module) return TRUE;
if (!includelist && !excludelist) return TRUE;
if (excludelist)
{
show = TRUE;
listitem = excludelist;
}
else
{
show = FALSE;
listitem = includelist;
}
for(; *listitem; listitem++)
{
int len;
if (!wcsicmp( *listitem, module )) return !show;
len = wcslen( *listitem );
if (!wcsnicmp( *listitem, module, len ) && !wcsicmp( module + len, L".dll" ))
return !show;
}
return show;
}
static BOOL is_ret_val( char type )
{
return type >= 'A' && type <= 'Z';
}
static const char *func_name( struct relay_private_data *data, unsigned int ordinal )
{
struct relay_entry_point *entry_point = data->entry_points + ordinal;
if (entry_point->name)
return wine_dbg_sprintf( "%s.%s", data->dllname, entry_point->name );
else
return wine_dbg_sprintf( "%s.%u", data->dllname, data->base + ordinal );
}
static void trace_string_a( INT_PTR ptr )
{
if (!IS_INTARG( ptr )) TRACE( "%08Ix %s", ptr, debugstr_a( (char *)ptr ));
else TRACE( "%08Ix", ptr );
}
static void trace_string_w( INT_PTR ptr )
{
if (!IS_INTARG( ptr )) TRACE( "%08Ix %s", ptr, debugstr_w( (WCHAR *)ptr ));
else TRACE( "%08Ix", ptr );
}
#ifdef __i386__
/***********************************************************************
* relay_trace_entry
*/
DECLSPEC_HIDDEN void * WINAPI relay_trace_entry( struct relay_descr *descr, unsigned int idx,
const DWORD *stack, unsigned int *nb_args )
{
WORD ordinal = LOWORD(idx);
const char *arg_types = descr->args_string + HIWORD(idx);
struct relay_private_data *data = descr->private;
struct relay_entry_point *entry_point = data->entry_points + ordinal;
unsigned int i, pos;
TRACE( "\1Call %s(", func_name( data, ordinal ));
for (i = pos = 0; !is_ret_val( arg_types[i] ); i++)
{
switch (arg_types[i])
{
case 'j': /* int64 */
TRACE( "%x%08x", stack[pos+1], stack[pos] );
pos += 2;
break;
case 'k': /* int128 */
TRACE( "{%08x,%08x,%08x,%08x}", stack[pos], stack[pos+1], stack[pos+2], stack[pos+3] );
pos += 4;
break;
case 's': /* str */
trace_string_a( stack[pos++] );
break;
case 'w': /* wstr */
trace_string_w( stack[pos++] );
break;
case 'f': /* float */
TRACE( "%g", *(const float *)&stack[pos++] );
break;
case 'd': /* double */
TRACE( "%g", *(const double *)&stack[pos] );
pos += 2;
break;
case 'i': /* long */
default:
TRACE( "%08x", stack[pos++] );
break;
}
if (!is_ret_val( arg_types[i+1] )) TRACE( "," );
}
*nb_args = pos;
if (arg_types[0] == 't')
{
*nb_args |= 0x80000000; /* thiscall/fastcall */
if (arg_types[1] == 't') *nb_args |= 0x40000000; /* fastcall */
}
TRACE( ") ret=%08x\n", stack[-1] );
return entry_point->orig_func;
}
/***********************************************************************
* relay_trace_exit
*/
DECLSPEC_HIDDEN void WINAPI relay_trace_exit( struct relay_descr *descr, unsigned int idx,
void *retaddr, LONGLONG retval )
{
const char *arg_types = descr->args_string + HIWORD(idx);
TRACE( "\1Ret %s()", func_name( descr->private, LOWORD(idx) ));
while (!is_ret_val( *arg_types )) arg_types++;
if (*arg_types == 'J') /* int64 return value */
TRACE( " retval=%08x%08x ret=%08x\n",
(UINT)(retval >> 32), (UINT)retval, (UINT)retaddr );
else
TRACE( " retval=%08x ret=%08x\n", (UINT)retval, (UINT)retaddr );
}
extern LONGLONG WINAPI relay_call( struct relay_descr *descr, unsigned int idx );
__ASM_STDCALL_FUNC( relay_call, 8,
"pushl %ebp\n\t"
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
__ASM_CFI(".cfi_rel_offset %ebp,0\n\t")
"movl %esp,%ebp\n\t"
__ASM_CFI(".cfi_def_cfa_register %ebp\n\t")
"pushl %esi\n\t"
__ASM_CFI(".cfi_rel_offset %esi,-4\n\t")
"pushl %edi\n\t"
__ASM_CFI(".cfi_rel_offset %edi,-8\n\t")
"pushl %ecx\n\t"
__ASM_CFI(".cfi_rel_offset %ecx,-12\n\t")
/* trace the parameters */
"pushl %eax\n\t"
"pushl %esp\n\t" /* number of args return ptr */
"leal 20(%ebp),%esi\n\t" /* stack */
"pushl %esi\n\t"
"pushl 12(%ebp)\n\t"
"pushl 8(%ebp)\n\t"
"call " __ASM_STDCALL("relay_trace_entry",16) "\n\t"
/* copy the arguments*/
"movzwl -16(%ebp),%ecx\n\t" /* number of args */
"jecxz 1f\n\t"
"leal 0(,%ecx,4),%edx\n\t"
"subl %edx,%esp\n\t"
"andl $~15,%esp\n\t"
"movl %esp,%edi\n\t"
"cld\n\t"
"rep; movsl\n\t"
"testl $0x80000000,-16(%ebp)\n\t" /* thiscall */
"jz 1f\n\t"
"popl %ecx\n\t"
"testl $0x40000000,-16(%ebp)\n\t" /* fastcall */
"jz 1f\n\t"
"popl %edx\n"
/* call the entry point */
"1:\tcall *%eax\n\t"
"movl %eax,%esi\n\t"
"movl %edx,%edi\n\t"
/* trace the return value */
"leal -20(%ebp),%esp\n\t"
"pushl %edx\n\t"
"pushl %eax\n\t"
"pushl 16(%ebp)\n\t"
"pushl 12(%ebp)\n\t"
"pushl 8(%ebp)\n\t"
"call " __ASM_STDCALL("relay_trace_exit",20) "\n\t"
/* restore return value and return */
"leal -12(%ebp),%esp\n\t"
"movl %esi,%eax\n\t"
"movl %edi,%edx\n\t"
"popl %ecx\n\t"
__ASM_CFI(".cfi_same_value %ecx\n\t")
"popl %edi\n\t"
__ASM_CFI(".cfi_same_value %edi\n\t")
"popl %esi\n\t"
__ASM_CFI(".cfi_same_value %esi\n\t")
"popl %ebp\n\t"
__ASM_CFI(".cfi_def_cfa %esp,4\n\t")
__ASM_CFI(".cfi_same_value %ebp\n\t")
"ret $8" )
#elif defined(__arm__)
/***********************************************************************
* relay_trace_entry
*/
DECLSPEC_HIDDEN void * WINAPI relay_trace_entry( struct relay_descr *descr, unsigned int idx,
const DWORD *stack, unsigned int *nb_args )
{
WORD ordinal = LOWORD(idx);
const char *arg_types = descr->args_string + HIWORD(idx);
struct relay_private_data *data = descr->private;
struct relay_entry_point *entry_point = data->entry_points + ordinal;
unsigned int i, pos;
#ifndef __SOFTFP__
unsigned int float_pos = 0, double_pos = 0;
const union fpregs { float s[16]; double d[8]; } *fpstack = (const union fpregs *)stack - 1;
#endif
TRACE( "\1Call %s(", func_name( data, ordinal ));
for (i = pos = 0; !is_ret_val( arg_types[i] ); i++)
{
switch (arg_types[i])
{
case 'j': /* int64 */
pos = (pos + 1) & ~1;
TRACE( "%x%08x", stack[pos+1], stack[pos] );
pos += 2;
break;
case 'k': /* int128 */
TRACE( "{%08x,%08x,%08x,%08x}", stack[pos], stack[pos+1], stack[pos+2], stack[pos+3] );
pos += 4;
break;
case 's': /* str */
trace_string_a( stack[pos++] );
break;
case 'w': /* wstr */
trace_string_w( stack[pos++] );
break;
case 'f': /* float */
#ifndef __SOFTFP__
if (!(float_pos % 2)) float_pos = max( float_pos, double_pos * 2 );
if (float_pos < 16)
{
TRACE( "%g", fpstack->s[float_pos++] );
break;
}
#endif
TRACE( "%g", *(const float *)&stack[pos++] );
break;
case 'd': /* double */
#ifndef __SOFTFP__
double_pos = max( (float_pos + 1) / 2, double_pos );
if (double_pos < 8)
{
TRACE( "%g", fpstack->d[double_pos++] );
break;
}
#endif
pos = (pos + 1) & ~1;
TRACE( "%g", *(const double *)&stack[pos] );
pos += 2;
break;
case 'i': /* long */
default:
TRACE( "%08x", stack[pos++] );
break;
}
if (!is_ret_val( arg_types[i+1] )) TRACE( "," );
}
#ifndef __SOFTFP__
if (float_pos || double_pos)
{
pos |= 0x80000000;
stack = (const DWORD *)fpstack; /* retaddr is below the fp regs */
}
#endif
*nb_args = pos;
TRACE( ") ret=%08x\n", stack[-1] );
return entry_point->orig_func;
}
/***********************************************************************
* relay_trace_exit
*/
DECLSPEC_HIDDEN void WINAPI relay_trace_exit( struct relay_descr *descr, unsigned int idx,
DWORD retaddr, LONGLONG retval )
{
const char *arg_types = descr->args_string + HIWORD(idx);
TRACE( "\1Ret %s()", func_name( descr->private, LOWORD(idx) ));
while (!is_ret_val( *arg_types )) arg_types++;
if (*arg_types == 'J') /* int64 return value */
TRACE( " retval=%08x%08x ret=%08x\n",
(UINT)(retval >> 32), (UINT)retval, retaddr );
else
TRACE( " retval=%08x ret=%08x\n", (UINT)retval, retaddr );
}
extern LONGLONG WINAPI relay_call( struct relay_descr *descr, unsigned int idx, const DWORD *stack );
__ASM_GLOBAL_FUNC( relay_call,
".arm\n\t"
"push {r4-r8,lr}\n\t"
"sub sp, #16\n\t"
"mov r6, r2\n\t"
"add r3, sp, #12\n\t"
"mov r7, r0\n\t"
"mov r8, r1\n\t"
"bl " __ASM_NAME("relay_trace_entry") "\n\t"
"mov ip, r0\n\t" /* entry point */
"mov r5, sp\n\t"
"ldr r1, [sp, #12]\n\t" /* number of args */
"lsl r3, r1, #2\n\t"
"subs r3, #16\n\t" /* first 4 args are in registers */
"ble 2f\n\t"
"sub sp, r3\n\t"
"and sp, #~7\n"
"add r2, r6, #16\n\t" /* skip r0-r3 */
"1:\tsubs r3, r3, #4\n\t"
"ldr r0, [r2, r3]\n\t"
"str r0, [sp, r3]\n\t"
"bgt 1b\n"
"2:\t"
#ifndef __SOFTFP__
"tst r1, #0x80000000\n\t"
"ldm r6, {r0-r3}\n\t"
"vldmdbne r6!, {s0-s15}\n\t"
#else
"ldm r6, {r0-r3}\n\t"
#endif
"blx ip\n\t"
"mov sp, r5\n\t"
"ldr r2, [r6, #-4]\n\t" /* retaddr */
"mov r4, r0\n\t"
"mov r5, r1\n\t"
"mov r0, r7\n\t"
"mov r1, r8\n\t"
"str r4, [sp]\n\t"
"str r5, [sp, #4]\n\t"
#ifndef __SOFTFP__
"vstr d0, [sp, #8]\n\t" /* preserve floating point retval */
"bl " __ASM_NAME("relay_trace_exit") "\n\t"
"vldr d0, [sp, #8]\n\t"
#else
"bl " __ASM_NAME("relay_trace_exit") "\n\t"
#endif
"mov r0, r4\n\t"
"mov r1, r5\n\t"
"add sp, #16\n\t"
"pop {r4-r8,pc}" )
#elif defined(__aarch64__)
/***********************************************************************
* relay_trace_entry
*/
DECLSPEC_HIDDEN void * WINAPI relay_trace_entry( struct relay_descr *descr, unsigned int idx,
const INT_PTR *stack, unsigned int *nb_args )
{
WORD ordinal = LOWORD(idx);
const char *arg_types = descr->args_string + HIWORD(idx);
struct relay_private_data *data = descr->private;
struct relay_entry_point *entry_point = data->entry_points + ordinal;
unsigned int i;
TRACE( "\1Call %s(", func_name( data, ordinal ));
for (i = 0; !is_ret_val( arg_types[i] ); i++)
{
switch (arg_types[i])
{
case 's': /* str */
trace_string_a( stack[i] );
break;
case 'w': /* wstr */
trace_string_w( stack[i] );
break;
case 'i': /* long */
default:
TRACE( "%08zx", stack[i] );
break;
}
if (!is_ret_val( arg_types[i + 1] )) TRACE( "," );
}
*nb_args = i;
TRACE( ") ret=%08zx\n", stack[-1] );
return entry_point->orig_func;
}
/***********************************************************************
* relay_trace_exit
*/
DECLSPEC_HIDDEN void WINAPI relay_trace_exit( struct relay_descr *descr, unsigned int idx,
INT_PTR retaddr, INT_PTR retval )
{
TRACE( "\1Ret %s() retval=%08zx ret=%08zx\n",
func_name( descr->private, LOWORD(idx) ), retval, retaddr );
}
extern LONGLONG CDECL call_entry_point( void *func, int nb_args, const INT_PTR *args );
__ASM_GLOBAL_FUNC( call_entry_point,
"stp x29, x30, [SP,#-16]!\n\t"
"stp x19, x20, [SP,#-16]!\n\t"
"mov x29, SP\n\t"
"mov x19, x2\n\t"
"ldp x8, x9, [x19, #-32]\n\t"
"mov x9, x0\n\t"
"cbz w1, 2f\n\t"
"mov w10, w1\n\t"
"mov x11, x2\n\t"
"mov x12, #0\n\t"
"ldp x0, x1, [x11], #16\n\t"
"add w12, w12, #2\n\t"
"cmp w12, w10\n\t"
"b.hs 2f\n\t"
"ldp x2, x3, [x11], #16\n\t"
"add w12, w12, #2\n\t"
"cmp w12, w10\n\t"
"b.hs 2f\n\t"
"ldp x4, x5, [x11], #16\n\t"
"add w12, w12, #2\n\t"
"cmp w12, w10\n\t"
"b.hs 2f\n\t"
"ldp x6, x7, [x11], #16\n\t"
"add w12, w12, #2\n\t"
"cmp w12, w10\n\t"
"b.hs 2f\n\t"
"sub w12, w10, #8\n\t"
"lsl w12, w12, #3\n\t"
"sub SP, SP, w12, uxtw\n\t"
"tbz w12, #3, 1f\n\t"
"sub SP, SP, #8\n\t"
"1: sub w12, w12, #8\n\t"
"ldr x13, [x11, x12]\n\t"
"str x13, [SP, x12]\n\t"
"cbnz w12, 1b\n\t"
"2: blr x9\n\t"
"mov SP, x29\n\t"
"ldp x19, x20, [SP], #16\n\t"
"ldp x29, x30, [SP], #16\n\t"
"ret\n" )
static LONGLONG WINAPI relay_call( struct relay_descr *descr, unsigned int idx, const INT_PTR *stack )
{
unsigned int nb_args;
void *func = relay_trace_entry( descr, idx, stack, &nb_args );
LONGLONG ret = call_entry_point( func, nb_args, stack );
relay_trace_exit( descr, idx, stack[-1], ret );
return ret;
}
#elif defined(__x86_64__)
/***********************************************************************
* relay_trace_entry
*/
DECLSPEC_HIDDEN void * WINAPI relay_trace_entry( struct relay_descr *descr, unsigned int idx,
const INT_PTR *stack, unsigned int *nb_args )
{
WORD ordinal = LOWORD(idx);
const char *arg_types = descr->args_string + HIWORD(idx);
struct relay_private_data *data = descr->private;
struct relay_entry_point *entry_point = data->entry_points + ordinal;
unsigned int i;
TRACE( "\1Call %s(", func_name( data, ordinal ));
for (i = 0; !is_ret_val( arg_types[i] ); i++)
{
switch (arg_types[i])
{
case 's': /* str */
trace_string_a( stack[i] );
break;
case 'w': /* wstr */
trace_string_w( stack[i] );
break;
case 'f': /* float */
TRACE( "%g", *(const float *)&stack[i] );
break;
case 'd': /* double */
TRACE( "%g", *(const double *)&stack[i] );
break;
case 'i': /* long */
default:
TRACE( "%08zx", stack[i] );
break;
}
if (!is_ret_val( arg_types[i+1] )) TRACE( "," );
}
*nb_args = i;
TRACE( ") ret=%08zx\n", stack[-1] );
return entry_point->orig_func;
}
/***********************************************************************
* relay_trace_exit
*/
DECLSPEC_HIDDEN void WINAPI relay_trace_exit( struct relay_descr *descr, unsigned int idx,
INT_PTR retaddr, INT_PTR retval )
{
TRACE( "\1Ret %s() retval=%08zx ret=%08zx\n",
func_name( descr->private, LOWORD(idx) ), retval, retaddr );
}
extern INT_PTR WINAPI relay_call( struct relay_descr *descr, unsigned int idx, const INT_PTR *stack );
__ASM_GLOBAL_FUNC( relay_call,
"pushq %rbp\n\t"
__ASM_SEH(".seh_pushreg %rbp\n\t")
__ASM_CFI(".cfi_adjust_cfa_offset 8\n\t")
__ASM_CFI(".cfi_rel_offset %rbp,0\n\t")
"movq %rsp,%rbp\n\t"
__ASM_SEH(".seh_setframe %rbp,0\n\t")
__ASM_SEH(".seh_endprologue\n\t")
__ASM_CFI(".cfi_def_cfa_register %rbp\n\t")
"leaq -0x48(%rbp),%rsp\n\t"
"andq $~15,%rsp\n\t"
"movq %rcx,-32(%rbp)\n\t"
__ASM_CFI(".cfi_rel_offset %rcx,-32\n\t")
"movq %rdx,-24(%rbp)\n\t"
__ASM_CFI(".cfi_rel_offset %rdx,-24\n\t")
"movq %rsi,-16(%rbp)\n\t"
__ASM_CFI(".cfi_rel_offset %rsi,-16\n\t")
"movq %rdi,-8(%rbp)\n\t"
__ASM_CFI(".cfi_rel_offset %rdi,-8\n\t")
/* trace the parameters */
"leaq 24(%rbp),%r8\n\t" /* stack */
"leaq -40(%rbp),%r9\n\t"
"call " __ASM_NAME("relay_trace_entry") "\n\t"
/* copy the arguments */
"movl -40(%rbp),%edx\n\t" /* number of args */
"movq $4,%rcx\n\t"
"cmp %rcx,%rdx\n\t"
"cmovgq %rdx,%rcx\n\t"
"leaq -16(,%rcx,8),%rdx\n\t"
"andq $~15,%rdx\n\t"
"subq %rdx,%rsp\n\t"
"leaq 24(%rbp),%rsi\n\t" /* original stack */
"movq %rsp,%rdi\n\t"
"rep; movsq\n\t"
/* call the entry point */
"movq 0(%rsp),%rcx\n\t"
"movq 8(%rsp),%rdx\n\t"
"movq 16(%rsp),%r8\n\t"
"movq 24(%rsp),%r9\n\t"
"movq 0(%rsp),%xmm0\n\t"
"movq 8(%rsp),%xmm1\n\t"
"movq 16(%rsp),%xmm2\n\t"
"movq 24(%rsp),%xmm3\n\t"
"callq *%rax\n\t"
/* trace the return value */
"movq -32(%rbp),%rcx\n\t"
"movq -24(%rbp),%rdx\n\t"
"movq 16(%rbp),%r8\n\t" /* retaddr */
"movq %rax,%rsi\n\t"
"movaps %xmm0,32(%rsp)\n\t"
"movq %rax,%r9\n\t"
"call " __ASM_NAME("relay_trace_exit") "\n\t"
/* restore return value and return */
"movq %rsi,%rax\n\t"
"movaps 32(%rsp),%xmm0\n\t"
"movq -16(%rbp),%rsi\n\t"
__ASM_CFI(".cfi_same_value %rsi\n\t")
"movq -8(%rbp),%rdi\n\t"
__ASM_CFI(".cfi_same_value %rdi\n\t")
"leaq 0(%rbp),%rsp\n\t"
__ASM_CFI(".cfi_def_cfa_register %rsp\n\t")
"popq %rbp\n\t"
__ASM_CFI(".cfi_adjust_cfa_offset -8\n\t")
__ASM_CFI(".cfi_same_value %rbp\n\t")
"ret")
#else
#error Not supported on this CPU
#endif
static struct relay_descr *get_relay_descr( HMODULE module, const IMAGE_EXPORT_DIRECTORY *exports,
DWORD exp_size )
{
struct relay_descr *descr;
struct relay_descr_rva *rva;
ULONG_PTR ptr = (ULONG_PTR)module + exports->Name;
/* sanity checks */
if (ptr <= (ULONG_PTR)(exports + 1)) return NULL;
if (ptr > (ULONG_PTR)exports + exp_size) return NULL;
if (ptr % sizeof(DWORD)) return NULL;
rva = (struct relay_descr_rva *)ptr - 1;
if (rva->magic != RELAY_DESCR_MAGIC) return NULL;
if (rva->descr) descr = (struct relay_descr *)((char *)module + rva->descr);
else descr = (struct relay_descr *)((const char *)exports + exp_size);
if (descr->magic != RELAY_DESCR_MAGIC) return NULL;
return descr;
}
/***********************************************************************
* RELAY_GetProcAddress
*
* Return the proc address to use for a given function.
*/
2004-06-15 02:47:00 +02:00
FARPROC RELAY_GetProcAddress( HMODULE module, const IMAGE_EXPORT_DIRECTORY *exports,
DWORD exp_size, FARPROC proc, DWORD ordinal, const WCHAR *user )
{
struct relay_private_data *data;
const struct relay_descr *descr = get_relay_descr( module, exports, exp_size );
if (!descr || !(data = descr->private)) return proc; /* no relay data */
if (!data->entry_points[ordinal].orig_func) return proc; /* not a relayed function */
if (check_from_module( debug_from_relay_includelist, debug_from_relay_excludelist, user ))
return proc; /* we want to relay it */
return data->entry_points[ordinal].orig_func;
}
/***********************************************************************
* RELAY_SetupDLL
*
* Setup relay debugging for a built-in dll.
*/
void RELAY_SetupDLL( HMODULE module )
{
IMAGE_EXPORT_DIRECTORY *exports;
DWORD *funcs;
unsigned int i, len;
DWORD size, entry_point_rva, old_prot;
struct relay_descr *descr;
struct relay_private_data *data;
WCHAR dllnameW[sizeof(data->dllname)];
const WORD *ordptr;
void *func_base;
SIZE_T func_size;
RtlRunOnceExecuteOnce( &init_once, init_debug_lists, NULL, NULL );
exports = RtlImageDirectoryEntryToData( module, TRUE, IMAGE_DIRECTORY_ENTRY_EXPORT, &size );
if (!exports) return;
if (!(descr = get_relay_descr( module, exports, size ))) return;
if (!(data = RtlAllocateHeap( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*data) +
(exports->NumberOfFunctions-1) * sizeof(data->entry_points) )))
return;
descr->relay_call = relay_call;
descr->private = data;
data->module = module;
data->base = exports->Base;
len = strlen( (char *)module + exports->Name );
if (len > 4 && !_stricmp( (char *)module + exports->Name + len - 4, ".dll" )) len -= 4;
len = min( len, sizeof(data->dllname) - 1 );
memcpy( data->dllname, (char *)module + exports->Name, len );
data->dllname[len] = 0;
ascii_to_unicode( dllnameW, data->dllname, len + 1 );
/* fetch name pointer for all entry points and store them in the private structure */
ordptr = (const WORD *)((char *)module + exports->AddressOfNameOrdinals);
for (i = 0; i < exports->NumberOfNames; i++, ordptr++)
{
DWORD name_rva = ((DWORD*)((char *)module + exports->AddressOfNames))[i];
data->entry_points[*ordptr].name = (const char *)module + name_rva;
}
/* patch the functions in the export table to point to the relay thunks */
funcs = (DWORD *)((char *)module + exports->AddressOfFunctions);
2007-12-28 18:21:48 +01:00
entry_point_rva = descr->entry_point_base - (const char *)module;
func_base = funcs;
func_size = exports->NumberOfFunctions * sizeof(*funcs);
NtProtectVirtualMemory( NtCurrentProcess(), &func_base, &func_size, PAGE_READWRITE, &old_prot );
for (i = 0; i < exports->NumberOfFunctions; i++, funcs++)
{
if (!descr->entry_point_offsets[i]) continue; /* not a normal function */
if (!check_relay_include( dllnameW, i + exports->Base, data->entry_points[i].name ))
continue; /* don't include this entry point */
data->entry_points[i].orig_func = (char *)module + *funcs;
*funcs = entry_point_rva + descr->entry_point_offsets[i];
}
if (old_prot != PAGE_READWRITE)
NtProtectVirtualMemory( NtCurrentProcess(), &func_base, &func_size, old_prot, &old_prot );
}
#else /* __i386__ || __x86_64__ || __arm__ || __aarch64__ */
FARPROC RELAY_GetProcAddress( HMODULE module, const IMAGE_EXPORT_DIRECTORY *exports,
DWORD exp_size, FARPROC proc, DWORD ordinal, const WCHAR *user )
{
return proc;
}
void RELAY_SetupDLL( HMODULE module )
{
}
#endif /* __i386__ || __x86_64__ || __arm__ || __aarch64__ */
/***********************************************************************/
/* snoop support */
/***********************************************************************/
#ifdef __i386__
WINE_DECLARE_DEBUG_CHANNEL(seh);
WINE_DECLARE_DEBUG_CHANNEL(snoop);
#include "pshpack1.h"
typedef struct
{
/* code part */
BYTE lcall; /* 0xe8 call snoopentry (relative) */
DWORD snoopentry; /* SNOOP_Entry relative */
/* unreached */
int nrofargs;
FARPROC origfun;
const char *name;
} SNOOP_FUN;
typedef struct tagSNOOP_DLL {
HMODULE hmod;
SNOOP_FUN *funs;
DWORD ordbase;
DWORD nrofordinals;
struct tagSNOOP_DLL *next;
char name[1];
} SNOOP_DLL;
typedef struct
{
/* code part */
BYTE lcall; /* 0xe8 call snoopret relative*/
DWORD snoopret; /* SNOOP_Ret relative */
/* unreached */
FARPROC origreturn;
SNOOP_DLL *dll;
DWORD ordinal;
void **origESP;
DWORD *args; /* saved args across a stdcall */
} SNOOP_RETURNENTRY;
typedef struct tagSNOOP_RETURNENTRIES {
SNOOP_RETURNENTRY entry[4092/sizeof(SNOOP_RETURNENTRY)];
struct tagSNOOP_RETURNENTRIES *next;
} SNOOP_RETURNENTRIES;
#include "poppack.h"
extern void WINAPI SNOOP_Entry(void);
extern void WINAPI SNOOP_Return(void);
static SNOOP_DLL *firstdll;
static SNOOP_RETURNENTRIES *firstrets;
/***********************************************************************
* SNOOP_ShowDebugmsgSnoop
*
* Simple function to decide if a particular debugging message is
* wanted.
*/
static BOOL SNOOP_ShowDebugmsgSnoop(const char *module, int ordinal, const char *func)
{
WCHAR moduleW[40];
int len = strlen(module);
if (len >= ARRAY_SIZE( moduleW )) return FALSE;
ascii_to_unicode( moduleW, module, len + 1 );
if (debug_snoop_excludelist && check_list( moduleW, ordinal, func, debug_snoop_excludelist ))
return FALSE;
if (debug_snoop_includelist && !check_list( moduleW, ordinal, func, debug_snoop_includelist ))
return FALSE;
return TRUE;
}
/***********************************************************************
* SNOOP_SetupDLL
*
* Setup snoop debugging for a native dll.
*/
void SNOOP_SetupDLL(HMODULE hmod)
{
SNOOP_DLL **dll = &firstdll;
char *p, *name;
void *addr;
SIZE_T size;
ULONG size32;
IMAGE_EXPORT_DIRECTORY *exports;
RtlRunOnceExecuteOnce( &init_once, init_debug_lists, NULL, NULL );
exports = RtlImageDirectoryEntryToData( hmod, TRUE, IMAGE_DIRECTORY_ENTRY_EXPORT, &size32 );
if (!exports || !exports->NumberOfFunctions) return;
name = (char *)hmod + exports->Name;
size = size32;
TRACE_(snoop)("hmod=%p, name=%s\n", hmod, name);
while (*dll) {
if ((*dll)->hmod == hmod)
{
/* another dll, loaded at the same address */
addr = (*dll)->funs;
size = (*dll)->nrofordinals * sizeof(SNOOP_FUN);
NtFreeVirtualMemory(NtCurrentProcess(), &addr, &size, MEM_RELEASE);
break;
}
dll = &((*dll)->next);
}
2003-11-26 23:03:21 +01:00
if (*dll)
*dll = RtlReAllocateHeap(GetProcessHeap(),
HEAP_ZERO_MEMORY, *dll,
sizeof(SNOOP_DLL) + strlen(name));
2003-11-26 23:03:21 +01:00
else
*dll = RtlAllocateHeap(GetProcessHeap(),
HEAP_ZERO_MEMORY,
sizeof(SNOOP_DLL) + strlen(name));
(*dll)->hmod = hmod;
(*dll)->ordbase = exports->Base;
(*dll)->nrofordinals = exports->NumberOfFunctions;
strcpy( (*dll)->name, name );
p = (*dll)->name + strlen((*dll)->name) - 4;
if (p > (*dll)->name && !_stricmp( p, ".dll" )) *p = 0;
size = exports->NumberOfFunctions * sizeof(SNOOP_FUN);
addr = NULL;
NtAllocateVirtualMemory(NtCurrentProcess(), &addr, 0, &size,
MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
if (!addr) {
RtlFreeHeap(GetProcessHeap(),0,*dll);
FIXME("out of memory\n");
return;
}
(*dll)->funs = addr;
memset((*dll)->funs,0,size);
}
/***********************************************************************
* SNOOP_GetProcAddress
*
* Return the proc address to use for a given function.
*/
2004-06-15 02:47:00 +02:00
FARPROC SNOOP_GetProcAddress( HMODULE hmod, const IMAGE_EXPORT_DIRECTORY *exports,
DWORD exp_size, FARPROC origfun, DWORD ordinal,
const WCHAR *user)
{
unsigned int i;
2004-06-15 02:47:00 +02:00
const char *ename;
const WORD *ordinals;
const DWORD *names;
SNOOP_DLL *dll = firstdll;
SNOOP_FUN *fun;
const IMAGE_SECTION_HEADER *sec;
if (!TRACE_ON(snoop)) return origfun;
if (!check_from_module( debug_from_snoop_includelist, debug_from_snoop_excludelist, user ))
return origfun; /* the calling module was explicitly excluded */
2008-04-08 23:22:43 +02:00
if (!*(LPBYTE)origfun) /* 0x00 is an impossible opcode, possible dataref. */
2004-06-15 02:47:00 +02:00
return origfun;
sec = RtlImageRvaToSection( RtlImageNtHeader(hmod), hmod, (char *)origfun - (char *)hmod );
if (!sec || !(sec->Characteristics & IMAGE_SCN_CNT_CODE))
return origfun; /* most likely a data reference */
while (dll) {
if (hmod == dll->hmod)
break;
dll = dll->next;
}
if (!dll) /* probably internal */
return origfun;
/* try to find a name for it */
ename = NULL;
names = (const DWORD *)((const char *)hmod + exports->AddressOfNames);
ordinals = (const WORD *)((const char *)hmod + exports->AddressOfNameOrdinals);
if (names) for (i = 0; i < exports->NumberOfNames; i++)
{
if (ordinals[i] == ordinal)
{
2004-06-15 02:47:00 +02:00
ename = (const char *)hmod + names[i];
break;
}
2004-06-15 02:47:00 +02:00
}
if (!SNOOP_ShowDebugmsgSnoop(dll->name,ordinal,ename))
return origfun;
assert(ordinal < dll->nrofordinals);
fun = dll->funs + ordinal;
if (!fun->name)
{
fun->name = ename;
fun->lcall = 0xe8;
fun->snoopentry = (char *)SNOOP_Entry - (char *)(&fun->snoopentry + 1);
2004-06-15 02:47:00 +02:00
fun->origfun = origfun;
fun->nrofargs = -1;
}
return (FARPROC)&(fun->lcall);
}
static void SNOOP_PrintArg(DWORD x)
{
int i,nostring;
TRACE_(snoop)("%08x",x);
if (IS_INTARG(x) || TRACE_ON(seh)) return; /* trivial reject to avoid faults */
__TRY
{
LPBYTE s=(LPBYTE)x;
i=0;nostring=0;
while (i<80) {
if (s[i]==0) break;
if (s[i]<0x20) {nostring=1;break;}
if (s[i]>=0x80) {nostring=1;break;}
i++;
}
if (!nostring && i > 5)
TRACE_(snoop)(" %s",debugstr_an((LPSTR)x,i));
else /* try unicode */
{
LPWSTR s=(LPWSTR)x;
i=0;nostring=0;
while (i<80) {
if (s[i]==0) break;
if (s[i]<0x20) {nostring=1;break;}
if (s[i]>0x100) {nostring=1;break;}
i++;
}
if (!nostring && i > 5) TRACE_(snoop)(" %s",debugstr_wn((LPWSTR)x,i));
}
}
__EXCEPT_PAGE_FAULT
{
}
__ENDTRY
}
void WINAPI DECLSPEC_HIDDEN __regs_SNOOP_Entry( void **stack )
{
SNOOP_DLL *dll;
SNOOP_FUN *fun = (SNOOP_FUN *)((char *)stack[0] - 5);
SNOOP_RETURNENTRIES **rets = &firstrets;
SNOOP_RETURNENTRY *ret;
int i=0, max;
for (dll = firstdll; dll; dll = dll->next )
if (fun >= dll->funs && fun < dll->funs + dll->nrofordinals) break;
if (!dll) {
FIXME("entrypoint %p not found\n", fun);
return; /* oops */
}
/* guess cdecl ... */
if (fun->nrofargs<0) {
/* Typical cdecl return frame is:
* add esp, xxxxxxxx
* which has (for xxxxxxxx up to 255 the opcode "83 C4 xx".
* (after that 81 C2 xx xx xx xx)
*/
LPBYTE reteip = stack[1];
if (reteip) {
if ((reteip[0]==0x83)&&(reteip[1]==0xc4))
fun->nrofargs=reteip[2]/4;
}
}
while (*rets) {
for (i=0;i<ARRAY_SIZE( (*rets)->entry );i++)
if (!(*rets)->entry[i].origreturn)
break;
if (i!=ARRAY_SIZE( (*rets)->entry ))
break;
rets = &((*rets)->next);
}
if (!*rets) {
SIZE_T size = 4096;
VOID* addr = NULL;
NtAllocateVirtualMemory(NtCurrentProcess(), &addr, 0, &size,
MEM_COMMIT | MEM_RESERVE,
PAGE_EXECUTE_READWRITE);
if (!addr) return;
*rets = addr;
i = 0; /* entry 0 is free */
}
ret = &((*rets)->entry[i]);
ret->lcall = 0xe8;
ret->snoopret = (char *)SNOOP_Return - (char *)(&ret->snoopret + 1);
ret->origreturn = stack[1];
stack[1] = &ret->lcall;
ret->dll = dll;
ret->args = NULL;
ret->ordinal = fun - dll->funs;
ret->origESP = stack;
stack[0] = fun->origfun;
if (!TRACE_ON(snoop)) return;
if (fun->name) TRACE_(snoop)("\1CALL %s.%s(", dll->name, fun->name);
else TRACE_(snoop)("\1CALL %s.%d(", dll->name, dll->ordbase+ret->ordinal);
if (fun->nrofargs>0) {
max = fun->nrofargs; if (max>16) max=16;
for (i=0;i<max;i++)
{
SNOOP_PrintArg( (DWORD)stack[i + 2] );
if (i<fun->nrofargs-1) TRACE_(snoop)(",");
}
if (max!=fun->nrofargs)
TRACE_(snoop)(" ...");
} else if (fun->nrofargs<0) {
TRACE_(snoop)("<unknown, check return>");
ret->args = RtlAllocateHeap(GetProcessHeap(),
0,16*sizeof(DWORD));
memcpy(ret->args, stack + 2, sizeof(DWORD)*16);
}
TRACE_(snoop)(") ret=%08x\n",(DWORD)ret->origreturn);
}
void WINAPI DECLSPEC_HIDDEN __regs_SNOOP_Return( void **stack )
{
SNOOP_RETURNENTRY *ret = (SNOOP_RETURNENTRY*)((char *)stack[0] - 5);
SNOOP_FUN *fun = &ret->dll->funs[ret->ordinal];
DWORD retval = (DWORD)stack[-1]; /* get saved %eax from the stack */
/* We haven't found out the nrofargs yet. If we called a cdecl
* function it is too late anyway and we can just set '0' (which
* will be the difference between orig and current ESP
* If stdcall -> everything ok.
*/
if (ret->dll->funs[ret->ordinal].nrofargs<0)
ret->dll->funs[ret->ordinal].nrofargs = stack - ret->origESP - 1;
stack[0] = ret->origreturn;
if (!TRACE_ON(snoop)) {
ret->origreturn = NULL; /* mark as empty */
return;
}
if (ret->args) {
int i,max;
if (fun->name)
TRACE_(snoop)("\1RET %s.%s(", ret->dll->name, fun->name);
else
TRACE_(snoop)("\1RET %s.%d(", ret->dll->name, ret->dll->ordbase+ret->ordinal);
max = fun->nrofargs;
if (max>16) max=16;
for (i=0;i<max;i++)
{
SNOOP_PrintArg(ret->args[i]);
if (i<max-1) TRACE_(snoop)(",");
}
TRACE_(snoop)(") retval=%08x ret=%08x\n", retval, (DWORD)ret->origreturn );
RtlFreeHeap(GetProcessHeap(),0,ret->args);
ret->args = NULL;
}
else
{
if (fun->name)
TRACE_(snoop)("\1RET %s.%s() retval=%08x ret=%08x\n",
ret->dll->name, fun->name, retval, (DWORD)ret->origreturn);
else
TRACE_(snoop)("\1RET %s.%d() retval=%08x ret=%08x\n",
ret->dll->name,ret->dll->ordbase+ret->ordinal,
retval, (DWORD)ret->origreturn);
}
ret->origreturn = NULL; /* mark as empty */
}
/* small wrappers that save registers and get the stack pointer */
#define SNOOP_WRAPPER(name) \
__ASM_STDCALL_FUNC( name, 0, \
"pushl %eax\n\t" \
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") \
"pushl %ecx\n\t" \
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") \
"pushl %edx\n\t" \
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") \
"leal 12(%esp),%eax\n\t" \
"pushl %eax\n\t" \
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") \
"call " __ASM_STDCALL("__regs_" #name,4) "\n\t" \
__ASM_CFI(".cfi_adjust_cfa_offset -4\n\t") \
"popl %edx\n\t" \
__ASM_CFI(".cfi_adjust_cfa_offset -4\n\t") \
"popl %ecx\n\t" \
__ASM_CFI(".cfi_adjust_cfa_offset -4\n\t") \
"popl %eax\n\t" \
__ASM_CFI(".cfi_adjust_cfa_offset -4\n\t") \
"ret" )
SNOOP_WRAPPER( SNOOP_Entry )
SNOOP_WRAPPER( SNOOP_Return )
#else /* __i386__ */
FARPROC SNOOP_GetProcAddress( HMODULE hmod, const IMAGE_EXPORT_DIRECTORY *exports, DWORD exp_size,
FARPROC origfun, DWORD ordinal, const WCHAR *user )
{
return origfun;
}
void SNOOP_SetupDLL( HMODULE hmod )
{
FIXME("snooping works only on i386 for now.\n");
}
#endif /* __i386__ */