Sweden-Number/memory/virtual.c

1084 lines
31 KiB
C
Raw Normal View History

Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
/*
* Win32 virtual memory functions
*
* Copyright 1997 Alexandre Julliard
*/
#include <assert.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/mman.h>
#include "winbase.h"
#include "winerror.h"
#include "file.h"
#include "heap.h"
#include "process.h"
#include "xmalloc.h"
#include "stddebug.h"
#include "debug.h"
/* File mapping */
typedef struct
{
K32OBJ header;
DWORD size_high;
DWORD size_low;
FILE_OBJECT *file;
BYTE protect;
} FILE_MAPPING;
/* File view */
typedef struct _FV
{
struct _FV *next; /* Next view */
struct _FV *prev; /* Prev view */
UINT32 base; /* Base address */
UINT32 size; /* Size in bytes */
UINT32 flags; /* Allocation flags */
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
UINT32 offset; /* Offset from start of mapped file */
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
FILE_MAPPING *mapping; /* File mapping */
BYTE protect; /* Protection for all pages at allocation time */
BYTE prot[1]; /* Protection byte for each page */
} FILE_VIEW;
/* Per-page protection byte values */
#define VPROT_READ 0x01
#define VPROT_WRITE 0x02
#define VPROT_EXEC 0x04
#define VPROT_WRITECOPY 0x08
#define VPROT_GUARD 0x10
#define VPROT_NOCACHE 0x20
#define VPROT_COMMITTED 0x40
/* Per-view flags */
#define VFLAG_SYSTEM 0x01
/* Conversion from VPROT_* to Win32 flags */
static const BYTE VIRTUAL_Win32Flags[16] =
{
PAGE_NOACCESS, /* 0 */
PAGE_READONLY, /* READ */
PAGE_READWRITE, /* WRITE */
PAGE_READWRITE, /* READ | WRITE */
PAGE_EXECUTE, /* EXEC */
PAGE_EXECUTE_READ, /* READ | EXEC */
PAGE_EXECUTE_READWRITE, /* WRITE | EXEC */
PAGE_EXECUTE_READWRITE, /* READ | WRITE | EXEC */
PAGE_WRITECOPY, /* WRITECOPY */
PAGE_WRITECOPY, /* READ | WRITECOPY */
PAGE_WRITECOPY, /* WRITE | WRITECOPY */
PAGE_WRITECOPY, /* READ | WRITE | WRITECOPY */
PAGE_EXECUTE_WRITECOPY, /* EXEC | WRITECOPY */
PAGE_EXECUTE_WRITECOPY, /* READ | EXEC | WRITECOPY */
PAGE_EXECUTE_WRITECOPY, /* WRITE | EXEC | WRITECOPY */
PAGE_EXECUTE_WRITECOPY /* READ | WRITE | EXEC | WRITECOPY */
};
static FILE_VIEW *VIRTUAL_FirstView;
static UINT32 page_shift;
static UINT32 page_mask;
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
static UINT32 granularity_mask; /* Allocation granularity (usually 64k) */
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
#define ROUND_ADDR(addr) \
((UINT32)(addr) & ~page_mask)
#define ROUND_SIZE(addr,size) \
(((UINT32)(size) + ((UINT32)(addr) & page_mask) + page_mask) & ~page_mask)
/***********************************************************************
* VIRTUAL_GetProtStr
*/
static const char *VIRTUAL_GetProtStr( BYTE prot )
{
static char buffer[6];
buffer[0] = (prot & VPROT_COMMITTED) ? 'c' : '-';
buffer[1] = (prot & VPROT_GUARD) ? 'g' : '-';
buffer[2] = (prot & VPROT_READ) ? 'r' : '-';
buffer[3] = (prot & VPROT_WRITE) ?
((prot & VPROT_WRITECOPY) ? 'w' : 'W') : '-';
buffer[4] = (prot & VPROT_EXEC) ? 'x' : '-';
buffer[5] = 0;
return buffer;
}
/***********************************************************************
* VIRTUAL_DumpView
*/
static void VIRTUAL_DumpView( FILE_VIEW *view )
{
UINT32 i, count;
UINT32 addr = view->base;
BYTE prot = view->prot[0];
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
fprintf( stderr, "View: %08x - %08x%s",
view->base, view->base + view->size - 1,
(view->flags & VFLAG_SYSTEM) ? " (system)" : "" );
if (view->mapping && view->mapping->file)
fprintf( stderr, " %s @ %08x\n",
view->mapping->file->unix_name, view->offset );
else
fprintf( stderr, " (anonymous)\n");
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
for (count = i = 1; i < view->size >> page_shift; i++, count++)
{
if (view->prot[i] == prot) continue;
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
fprintf( stderr, " %08x - %08x %s\n",
addr, addr + (count << page_shift) - 1,
VIRTUAL_GetProtStr(prot) );
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
addr += (count << page_shift);
prot = view->prot[i];
count = 0;
}
if (count)
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
fprintf( stderr, " %08x - %08x %s\n",
addr, addr + (count << page_shift) - 1,
VIRTUAL_GetProtStr(prot) );
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
}
/***********************************************************************
* VIRTUAL_Dump
*/
void VIRTUAL_Dump(void)
{
FILE_VIEW *view = VIRTUAL_FirstView;
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
fprintf( stderr, "\nDump of all virtual memory views:\n\n" );
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
while (view)
{
VIRTUAL_DumpView( view );
view = view->next;
}
}
/***********************************************************************
* VIRTUAL_FindView
*
* Find the view containing a given address.
*/
static FILE_VIEW *VIRTUAL_FindView( UINT32 addr )
{
FILE_VIEW *view = VIRTUAL_FirstView;
while (view)
{
if (view->base > addr) return NULL;
if (view->base + view->size > addr) return view;
view = view->next;
}
return NULL;
}
/***********************************************************************
* VIRTUAL_CreateView
*
* Create a new view and add it in the linked list.
*/
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
static FILE_VIEW *VIRTUAL_CreateView( UINT32 base, UINT32 size, UINT32 offset,
UINT32 flags, BYTE vprot,
FILE_MAPPING *mapping )
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
{
FILE_VIEW *view, *prev;
/* Create the view structure */
size >>= page_shift;
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
if (!(view = (FILE_VIEW *)malloc( sizeof(*view) + size - 1 ))) return NULL;
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
view->base = base;
view->size = size << page_shift;
view->flags = flags;
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
view->offset = offset;
view->mapping = mapping;
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
view->protect = vprot;
memset( view->prot, vprot, size );
/* Insert it in the linked list */
if (!VIRTUAL_FirstView || (VIRTUAL_FirstView->base > base))
{
view->next = VIRTUAL_FirstView;
view->prev = NULL;
if (view->next) view->next->prev = view;
VIRTUAL_FirstView = view;
}
else
{
prev = VIRTUAL_FirstView;
while (prev->next && (prev->next->base < base)) prev = prev->next;
view->next = prev->next;
view->prev = prev;
if (view->next) view->next->prev = view;
prev->next = view;
}
if (debugging_virtual) VIRTUAL_DumpView( view );
return view;
}
/***********************************************************************
* VIRTUAL_DeleteView
*
* Delete an view.
*/
static void VIRTUAL_DeleteView( FILE_VIEW *view )
{
munmap( (void *)view->base, view->size );
if (view->next) view->next->prev = view->prev;
if (view->prev) view->prev->next = view->next;
else VIRTUAL_FirstView = view->next;
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
if (view->mapping) K32OBJ_DecCount( &view->mapping->header );
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
free( view );
}
/***********************************************************************
* VIRTUAL_GetUnixProt
*
* Convert page protections to protection for mmap/mprotect.
*/
static int VIRTUAL_GetUnixProt( BYTE vprot )
{
int prot = 0;
if ((vprot & VPROT_COMMITTED) && !(vprot & VPROT_GUARD))
{
if (vprot & VPROT_READ) prot |= PROT_READ;
if (vprot & VPROT_WRITE) prot |= PROT_WRITE;
if (vprot & VPROT_EXEC) prot |= PROT_EXEC;
}
return prot;
}
/***********************************************************************
* VIRTUAL_GetWin32Prot
*
* Convert page protections to Win32 flags.
*/
static void VIRTUAL_GetWin32Prot( BYTE vprot, DWORD *protect, DWORD *state )
{
*protect = VIRTUAL_Win32Flags[vprot & 0x0f];
if (vprot & VPROT_GUARD) *protect |= PAGE_GUARD;
if (vprot & VPROT_NOCACHE) *protect |= PAGE_NOCACHE;
if (state) *state = (vprot & VPROT_COMMITTED) ? MEM_COMMIT : MEM_RESERVE;
}
/***********************************************************************
* VIRTUAL_GetProt
*
* Build page protections from Win32 flags.
*/
static BYTE VIRTUAL_GetProt( DWORD protect )
{
BYTE vprot;
switch(protect & 0xff)
{
case PAGE_READONLY:
vprot = VPROT_READ;
break;
case PAGE_READWRITE:
vprot = VPROT_READ | VPROT_WRITE;
break;
case PAGE_WRITECOPY:
vprot = VPROT_READ | VPROT_WRITE | VPROT_WRITECOPY;
break;
case PAGE_EXECUTE:
vprot = VPROT_EXEC;
break;
case PAGE_EXECUTE_READ:
vprot = VPROT_EXEC | VPROT_READ;
break;
case PAGE_EXECUTE_READWRITE:
vprot = VPROT_EXEC | VPROT_READ | VPROT_WRITE | VPROT_WRITECOPY;
break;
case PAGE_EXECUTE_WRITECOPY:
vprot = VPROT_EXEC | VPROT_READ | VPROT_WRITE;
break;
case PAGE_NOACCESS:
default:
vprot = 0;
break;
}
if (protect & PAGE_GUARD) vprot |= VPROT_GUARD;
if (protect & PAGE_NOCACHE) vprot |= VPROT_NOCACHE;
return vprot;
}
/***********************************************************************
* VIRTUAL_SetProt
*
* Change the protection of a range of pages.
*/
static BOOL32 VIRTUAL_SetProt( FILE_VIEW *view, UINT32 base,
UINT32 size, BYTE vprot )
{
dprintf_virtual( stddeb, "VIRTUAL_SetProt: %08x-%08x %s\n",
base, base + size - 1, VIRTUAL_GetProtStr( vprot ) );
if (mprotect( (void *)base, size, VIRTUAL_GetUnixProt(vprot) ))
return FALSE; /* FIXME: last error */
memset( view->prot + ((base - view->base) >> page_shift),
vprot, size >> page_shift );
if (debugging_virtual) VIRTUAL_DumpView( view );
return TRUE;
}
/***********************************************************************
* VIRTUAL_CheckFlags
*
* Check that all pages in a range have the given flags.
*/
static BOOL32 VIRTUAL_CheckFlags( UINT32 base, UINT32 size, BYTE flags )
{
FILE_VIEW *view;
UINT32 page;
if (!size) return TRUE;
if (!(view = VIRTUAL_FindView( base ))) return FALSE;
if (view->base + view->size < base + size) return FALSE;
page = (base - view->base) >> page_shift;
size = ROUND_SIZE( base, size ) >> page_shift;
while (size--) if ((view->prot[page++] & flags) != flags) return FALSE;
return TRUE;
}
/***********************************************************************
* VIRTUAL_Init
*/
BOOL32 VIRTUAL_Init(void)
{
SYSTEM_INFO sysinfo;
GetSystemInfo( &sysinfo );
page_mask = sysinfo.dwPageSize - 1;
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
granularity_mask = sysinfo.dwAllocationGranularity - 1;
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
/* Make sure we have a power of 2 */
assert( !(sysinfo.dwPageSize & page_mask) );
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
assert( !(sysinfo.dwAllocationGranularity & granularity_mask) );
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
page_shift = 0;
while ((1 << page_shift) != sysinfo.dwPageSize) page_shift++;
#ifdef linux
{
FILE *f = fopen( "/proc/self/maps", "r" );
if (f)
{
char buffer[80];
while (fgets( buffer, sizeof(buffer), f ))
{
int start, end, offset;
char r, w, x, p;
BYTE vprot = VPROT_COMMITTED;
sscanf( buffer, "%x-%x %c%c%c%c %x",
&start, &end, &r, &w, &x, &p, &offset );
if (r == 'r') vprot |= VPROT_READ;
if (w == 'w') vprot |= VPROT_WRITE;
if (x == 'x') vprot |= VPROT_EXEC;
if (p == 'p') vprot |= VPROT_WRITECOPY;
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
VIRTUAL_CreateView( start, end - start, 0,
VFLAG_SYSTEM, vprot, NULL );
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
}
fclose( f );
}
}
#endif /* linux */
return TRUE;
}
/***********************************************************************
* VirtualAlloc (KERNEL32.548)
*/
LPVOID VirtualAlloc( LPVOID addr, DWORD size, DWORD type, DWORD protect )
{
FILE_VIEW *view;
UINT32 base, ptr, view_size;
BYTE vprot;
dprintf_virtual( stddeb, "VirtualAlloc: %08x %08lx %lx %08lx\n",
(UINT32)addr, size, type, protect );
/* Round parameters to a page boundary */
if (size > 0x7fc00000) /* 2Gb - 4Mb */
{
SetLastError( ERROR_OUTOFMEMORY );
return NULL;
}
if (addr)
{
if (type & MEM_RESERVE) /* Round down to 64k boundary */
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
base = ((UINT32)addr + granularity_mask) & ~granularity_mask;
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
else
base = ROUND_ADDR( addr );
size = (((UINT32)addr + size + page_mask) & ~page_mask) - base;
if (base + size < base) /* Disallow wrap-around */
{
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
}
}
else
{
base = 0;
size = (size + page_mask) & ~page_mask;
}
/* Compute the protection flags */
if (!(type & (MEM_COMMIT | MEM_RESERVE)) ||
(type & ~(MEM_COMMIT | MEM_RESERVE)))
{
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
}
if (type & MEM_COMMIT)
vprot = VIRTUAL_GetProt( protect ) | VPROT_COMMITTED;
else vprot = 0;
/* Reserve the memory */
if ((type & MEM_RESERVE) || !base)
{
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
view_size = size + (base ? 0 : granularity_mask + 1);
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
ptr = (UINT32)FILE_mmap( NULL, (LPVOID)base, 0, view_size, 0, 0,
VIRTUAL_GetUnixProt( vprot ), MAP_PRIVATE );
if (ptr == (UINT32)-1)
{
SetLastError( ERROR_OUTOFMEMORY );
return NULL;
}
if (!base)
{
/* Release the extra memory while keeping the range */
/* starting on a 64k boundary. */
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
if (ptr & granularity_mask)
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
{
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
UINT32 extra = granularity_mask + 1 - (ptr & granularity_mask);
munmap( (void *)ptr, extra );
ptr += extra;
view_size -= extra;
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
}
if (view_size > size)
munmap( (void *)(ptr + size), view_size - size );
}
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
if (!(view = VIRTUAL_CreateView( ptr, size, 0, 0, vprot, NULL )))
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
{
munmap( (void *)ptr, size );
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
SetLastError( ERROR_OUTOFMEMORY );
return NULL;
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
}
if (debugging_virtual) VIRTUAL_DumpView( view );
return (LPVOID)ptr;
}
/* Commit the pages */
if (!(view = VIRTUAL_FindView( base )) ||
(base + size > view->base + view->size))
{
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
}
if (!VIRTUAL_SetProt( view, base, size, vprot )) return NULL;
return (LPVOID)base;
}
/***********************************************************************
* VirtualFree (KERNEL32.550)
*/
BOOL32 VirtualFree( LPVOID addr, DWORD size, DWORD type )
{
FILE_VIEW *view;
UINT32 base;
dprintf_virtual( stddeb, "VirtualFree: %08x %08lx %lx\n",
(UINT32)addr, size, type );
/* Fix the parameters */
size = ROUND_SIZE( addr, size );
base = ROUND_ADDR( addr );
if (!(view = VIRTUAL_FindView( base )) ||
(base + size > view->base + view->size))
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
/* Compute the protection flags */
if ((type != MEM_DECOMMIT) && (type != MEM_RELEASE))
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
/* Free the pages */
if (type == MEM_RELEASE)
{
if (size || (base != view->base))
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
VIRTUAL_DeleteView( view );
return TRUE;
}
/* Decommit the pages */
return VIRTUAL_SetProt( view, base, size, 0 );
}
/***********************************************************************
* VirtualLock (KERNEL32.551)
*/
BOOL32 VirtualLock( LPVOID addr, DWORD size )
{
return TRUE;
}
/***********************************************************************
* VirtualUnlock (KERNEL32.556)
*/
BOOL32 VirtualUnlock( LPVOID addr, DWORD size )
{
return TRUE;
}
/***********************************************************************
* VirtualProtect (KERNEL32.552)
*/
BOOL32 VirtualProtect( LPVOID addr, DWORD size, DWORD new_prot,
LPDWORD old_prot )
{
FILE_VIEW *view;
UINT32 base, i;
BYTE vprot, *p;
dprintf_virtual( stddeb, "VirtualProtect: %08x %08lx %08lx\n",
(UINT32)addr, size, new_prot );
/* Fix the parameters */
size = ROUND_SIZE( addr, size );
base = ROUND_ADDR( addr );
if (!(view = VIRTUAL_FindView( base )) ||
(base + size > view->base + view->size))
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
/* Make sure all the pages are committed */
p = view->prot + ((base - view->base) >> page_shift);
for (i = size >> page_shift; i; i--, p++)
{
if (!(*p & VPROT_COMMITTED))
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
}
VIRTUAL_GetWin32Prot( view->prot[0], old_prot, NULL );
vprot = VIRTUAL_GetProt( new_prot ) | VPROT_COMMITTED;
return VIRTUAL_SetProt( view, base, size, vprot );
}
/***********************************************************************
* VirtualProtectEx (KERNEL32.553)
*/
BOOL32 VirtualProtectEx( HANDLE32 handle, LPVOID addr, DWORD size,
DWORD new_prot, LPDWORD old_prot )
{
BOOL32 ret = FALSE;
PDB32 *pdb = (PDB32 *)PROCESS_GetObjPtr( handle, K32OBJ_PROCESS );
if (pdb)
{
if (pdb == pCurrentProcess)
ret = VirtualProtect( addr, size, new_prot, old_prot );
else
fprintf(stderr,"Unsupported: VirtualProtectEx on other process\n");
K32OBJ_DecCount( &pdb->header );
}
return ret;
}
/***********************************************************************
* VirtualQuery (KERNEL32.554)
*/
BOOL32 VirtualQuery( LPCVOID addr, LPMEMORY_BASIC_INFORMATION info, DWORD len )
{
FILE_VIEW *view = VIRTUAL_FirstView;
UINT32 base = ROUND_ADDR( addr );
UINT32 alloc_base = 0;
UINT32 size = 0;
/* Find the view containing the address */
for (;;)
{
if (!view)
{
size = 0xffff0000 - alloc_base;
break;
}
if (view->base > base)
{
size = view->base - alloc_base;
view = NULL;
break;
}
if (view->base + view->size > base)
{
alloc_base = view->base;
size = view->size;
break;
}
alloc_base = view->base + view->size;
view = view->next;
}
/* Fill the info structure */
if (!view)
{
info->State = MEM_FREE;
info->Protect = 0;
info->AllocationProtect = 0;
info->Type = 0;
}
else
{
BYTE vprot = view->prot[(base - alloc_base) >> page_shift];
VIRTUAL_GetWin32Prot( vprot, &info->Protect, &info->State );
for (size = base - alloc_base; size < view->size; size += page_mask+1)
if (view->prot[size >> page_shift] != vprot) break;
info->AllocationProtect = view->protect;
info->Type = MEM_PRIVATE; /* FIXME */
}
info->BaseAddress = (LPVOID)base;
info->AllocationBase = (LPVOID)alloc_base;
info->RegionSize = size - (base - alloc_base);
return TRUE;
}
/***********************************************************************
* VirtualQueryEx (KERNEL32.555)
*/
BOOL32 VirtualQueryEx( HANDLE32 handle, LPCVOID addr,
LPMEMORY_BASIC_INFORMATION info, DWORD len )
{
BOOL32 ret = FALSE;
PDB32 *pdb = (PDB32 *)PROCESS_GetObjPtr( handle, K32OBJ_PROCESS );
if (pdb)
{
if (pdb == pCurrentProcess)
ret = VirtualQuery( addr, info, len );
else
fprintf(stderr,"Unsupported: VirtualQueryEx on other process\n");
K32OBJ_DecCount( &pdb->header );
}
return ret;
}
/***********************************************************************
* IsBadReadPtr32 (KERNEL32.354)
*/
BOOL32 IsBadReadPtr32( LPCVOID ptr, UINT32 size )
{
return !VIRTUAL_CheckFlags( (UINT32)ptr, size,
VPROT_READ | VPROT_COMMITTED );
}
/***********************************************************************
* IsBadWritePtr32 (KERNEL32.357)
*/
BOOL32 IsBadWritePtr32( LPVOID ptr, UINT32 size )
{
return !VIRTUAL_CheckFlags( (UINT32)ptr, size,
VPROT_WRITE | VPROT_COMMITTED );
}
/***********************************************************************
* IsBadHugeReadPtr32 (KERNEL32.352)
*/
BOOL32 IsBadHugeReadPtr32( LPCVOID ptr, UINT32 size )
{
return IsBadReadPtr32( ptr, size );
}
/***********************************************************************
* IsBadHugeWritePtr32 (KERNEL32.353)
*/
BOOL32 IsBadHugeWritePtr32( LPVOID ptr, UINT32 size )
{
return IsBadWritePtr32( ptr, size );
}
/***********************************************************************
* IsBadCodePtr32 (KERNEL32.351)
*/
BOOL32 IsBadCodePtr32( FARPROC32 ptr )
{
return !VIRTUAL_CheckFlags( (UINT32)ptr, 1, VPROT_EXEC | VPROT_COMMITTED );
}
/***********************************************************************
* IsBadStringPtr32A (KERNEL32.355)
*/
BOOL32 IsBadStringPtr32A( LPCSTR str, UINT32 max )
{
FILE_VIEW *view;
UINT32 page, count;
if (!max) return FALSE;
if (!(view = VIRTUAL_FindView( (UINT32)str ))) return TRUE;
page = ((UINT32)str - view->base) >> page_shift;
count = page_mask + 1 - ((UINT32)str & page_mask);
while (max)
{
if ((view->prot[page] & (VPROT_READ | VPROT_COMMITTED)) !=
(VPROT_READ | VPROT_COMMITTED))
return TRUE;
if (count > max) count = max;
max -= count;
while (count--) if (!*str++) return FALSE;
if (++page >= view->size >> page_shift) return TRUE;
count = page_mask + 1;
}
return FALSE;
}
/***********************************************************************
* IsBadStringPtr32W (KERNEL32.356)
*/
BOOL32 IsBadStringPtr32W( LPCWSTR str, UINT32 max )
{
FILE_VIEW *view;
UINT32 page, count;
if (!max) return FALSE;
if (!(view = VIRTUAL_FindView( (UINT32)str ))) return TRUE;
page = ((UINT32)str - view->base) >> page_shift;
count = (page_mask + 1 - ((UINT32)str & page_mask)) / sizeof(WCHAR);
while (max)
{
if ((view->prot[page] & (VPROT_READ | VPROT_COMMITTED)) !=
(VPROT_READ | VPROT_COMMITTED))
return TRUE;
if (count > max) count = max;
max -= count;
while (count--) if (!*str++) return FALSE;
if (++page >= view->size >> page_shift) return TRUE;
count = (page_mask + 1) / sizeof(WCHAR);
}
return FALSE;
}
/***********************************************************************
* CreateFileMapping32A (KERNEL32.46)
*/
HANDLE32 CreateFileMapping32A( HFILE32 hFile, LPSECURITY_ATTRIBUTES attr,
DWORD protect, DWORD size_high, DWORD size_low,
LPCSTR name )
{
FILE_MAPPING *mapping = NULL;
HANDLE32 handle;
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
BYTE vprot;
/* First search for an object with the same name */
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
K32OBJ *obj = K32OBJ_FindName( name );
if (obj)
{
if (obj->type == K32OBJ_MEM_MAPPED_FILE)
{
SetLastError( ERROR_ALREADY_EXISTS );
return PROCESS_AllocHandle( obj, 0 );
}
SetLastError( ERROR_DUP_NAME );
return 0;
}
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
/* Check parameters */
dprintf_virtual(stddeb,"CreateFileMapping32A(%x,%p,%08lx,%08lx%08lx,%s)\n",
hFile, attr, protect, size_high, size_low, name );
vprot = VIRTUAL_GetProt( protect );
if (protect & SEC_RESERVE)
{
if (hFile != INVALID_HANDLE_VALUE32)
{
SetLastError( ERROR_INVALID_PARAMETER );
return 0;
}
}
else vprot |= VPROT_COMMITTED;
if (protect & SEC_NOCACHE) vprot |= VPROT_NOCACHE;
/* Compute the size and extend the file if necessary */
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
if (hFile == INVALID_HANDLE_VALUE32)
{
if (!size_high && !size_low)
{
SetLastError( ERROR_INVALID_PARAMETER );
return 0;
}
obj = NULL;
}
else /* We have a file */
{
BY_HANDLE_FILE_INFORMATION info;
if (!(obj = PROCESS_GetObjPtr( hFile, K32OBJ_FILE ))) goto error;
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
/* FIXME: should check if the file permissions agree
* with the required protection flags */
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
if (!GetFileInformationByHandle( hFile, &info )) goto error;
if (!size_high && !size_low)
{
size_high = info.nFileSizeHigh;
size_low = info.nFileSizeLow;
}
else if ((size_high > info.nFileSizeHigh) ||
((size_high == info.nFileSizeHigh) &&
(size_low > info.nFileSizeLow)))
{
/* We have to grow the file */
if (SetFilePointer( hFile, size_low, &size_high,
FILE_BEGIN ) == 0xffffffff) goto error;
if (!SetEndOfFile( hFile )) goto error;
}
}
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
/* Allocate the mapping object */
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
if (!(mapping = HeapAlloc( SystemHeap, 0, sizeof(*mapping) ))) goto error;
Release 970329 Fri Mar 28 14:18:32 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [misc/main.c] [ANNOUNCE] Update the list of contributors. Please let me know if I forgot someone. * [controls/combo.c] Fixed bug in CB_DIR16 handling. Use correct text color in CBPaintText. * [controls/listbox.c] Fixed WM_CTLCOLOR handling. * [windows/winproc.c] Added translation for EM_*32 messages. Mon Mar 24 01:31:52 1997 Steffen Moeller <moeller@mpimg-berlin-dahlem.mpg.de> * [files/drive.c] Added information on device and inode numbers to the DOSDRIVE struct, using it to find DOS drives in a path even if it contains symbolic links, eliminating annoying messages at startup. Edited functions DRIVE_Init and rewrote DRIVE_FindDriveRoot. Wed Mar 19 16:31:18 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/x11drv/font.c] [objects/font.c] [include/gdi.h] [include/win16drv.h] [include/x11drv.h] Implemented GetCharWidth via graphics drivers. * [graphics/win16drv/Makefile.in] [graphics/win16drv/prtdrv.c] Moved printer driver interfaces into a separate file. * [graphics/win16drv/text.c] Fixed bugs that seg-faulted write. Wed Mar 19 13:52:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [BUGS] Update. * [controls/edit.c] Removed useless parameters from a lot of functions. * [controls/menu.c] Improved keyboard shortcuts. Added check for entries with popup menu in EnableMenuItem(). * [windows/winproc.c] [windows/win.c] [memory/selector.c] Do not allocate separate thunks for new windows. * [misc/clipboard.c] [windows/painting.c] Fixed problems with ClipBook. * [controls/combo.c] [controls/edit.c] [controls/listbox.c] [controls/widgets.c] [windows/graphics.c] [windows/defdlg.c] Combo rewrite. * [objects/dib.c] Slight improvements. Wed Mar 19 11:21:17 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [misc/crtdll.c] Added chdir/mkdir. * [misc/ntdll.c] Fixed some bugs, added RtlUnicodeStringToAnsiString. * [win32/process.c] Added initialisation of events/semaphores/mutices. Wed Mar 19 01:55:40 1997 Ricardo R. Massaro <massaro@ime.usp.br> * [resources/sysres_Po.rc] Added support for Portuguese language. Sat Mar 18 18:00:14 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [windows/winpos.c] [if1632/user.spec] [if1632/user32.spec] Implemented SwitchToThisWindow(). * [misc/ver.c] Corrected a flaw in VerInstallFile32A. * [msdos/int21.c] Corrected wrong number in Int21 3305 Corrected Int21 714e, implemented Int21 7160,CL=2, 7143 and 7147 Sun Mar 16 09:53:04 1997 Andreas Mohr <100.30936@germany.net> * [loader/ne_module.c] Fixed NE_LoadSegments() to set size to pSeg->minsize rather than setting it to 0x10000 if pSeg->size is 0. Thu Mar 13 12:15:00 1997 Anand Kumria <akumria@ozemail.com.au> * [ANNOUNCE] Added ftp.progsoc.uts.edu.au as a mirror of Wine. * [memory/global.c] Removed MemManInfo sizeof check. Mon Mar 10 10:35:44 MET 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [files/dos_fs.c] Pick up kernel dirent on glibc systems. * [loader/signal.c] Pick up kernel sigaction on glibc systems. Sat Mar 8 21:05:37 1997 Jimen Ching <jching@aloha.com> * [debugger/stabs.c] [debugger/msc.c] Check return value of mmap. Fri Mar 7 05:42:03 1997 Lee Jaekil <juria@seodu.co.kr> * [win32/code_page.c] Added IsValidCodePage.
1997-03-29 18:20:20 +01:00
mapping->header.type = K32OBJ_MEM_MAPPED_FILE;
mapping->header.refcount = 1;
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
mapping->protect = vprot;
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
mapping->size_high = size_high;
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
mapping->size_low = ROUND_SIZE( 0, size_low );
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
mapping->file = (FILE_OBJECT *)obj;
handle = PROCESS_AllocHandle( &mapping->header, 0 );
if (handle != INVALID_HANDLE_VALUE32) return handle;
error:
if (obj) K32OBJ_DecCount( obj );
if (mapping) HeapFree( SystemHeap, 0, mapping );
return 0;
}
/***********************************************************************
* CreateFileMapping32W (KERNEL32.47)
*/
HANDLE32 CreateFileMapping32W( HFILE32 hFile, LPSECURITY_ATTRIBUTES attr,
DWORD protect, DWORD size_high, DWORD size_low,
LPCWSTR name )
{
LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, name );
HANDLE32 ret = CreateFileMapping32A( hFile, attr, protect,
size_high, size_low, nameA );
HeapFree( GetProcessHeap(), 0, nameA );
return ret;
}
/***********************************************************************
* OpenFileMapping32A (KERNEL32.397)
*/
HANDLE32 OpenFileMapping32A( DWORD access, BOOL32 inherit, LPCSTR name )
{
K32OBJ *obj = K32OBJ_FindNameType( name, K32OBJ_MEM_MAPPED_FILE );
if (!obj) return 0;
return PROCESS_AllocHandle( obj, 0 );
}
/***********************************************************************
* OpenFileMapping32W (KERNEL32.398)
*/
HANDLE32 OpenFileMapping32W( DWORD access, BOOL32 inherit, LPCWSTR name )
{
LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, name );
HANDLE32 ret = OpenFileMapping32A( access, inherit, nameA );
HeapFree( GetProcessHeap(), 0, nameA );
return ret;
}
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
/***********************************************************************
* VIRTUAL_DestroyMapping
*
* Destroy a FILE_MAPPING object.
*/
void VIRTUAL_DestroyMapping( K32OBJ *ptr )
{
FILE_MAPPING *mapping = (FILE_MAPPING *)ptr;
assert( ptr->type == K32OBJ_MEM_MAPPED_FILE );
if (mapping->file) K32OBJ_DecCount( &mapping->file->header );
ptr->type = K32OBJ_UNKNOWN;
HeapFree( SystemHeap, 0, mapping );
}
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
/***********************************************************************
* MapViewOfFile (KERNEL32.385)
*/
LPVOID MapViewOfFile( HANDLE32 mapping, DWORD access, DWORD offset_high,
DWORD offset_low, DWORD count )
{
return MapViewOfFileEx( mapping, access, offset_high,
offset_low, count, NULL );
}
/***********************************************************************
* MapViewOfFileEx (KERNEL32.386)
*/
LPVOID MapViewOfFileEx( HANDLE32 handle, DWORD access, DWORD offset_high,
DWORD offset_low, DWORD count, LPVOID addr )
{
FILE_MAPPING *mapping;
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
FILE_VIEW *view;
UINT32 ptr = (UINT32)-1, size = 0;
int flags = MAP_PRIVATE;
/* Check parameters */
if ((offset_low & granularity_mask) ||
(addr && ((UINT32)addr & granularity_mask)))
{
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
}
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
if (!(mapping = (FILE_MAPPING *)PROCESS_GetObjPtr( handle,
K32OBJ_MEM_MAPPED_FILE )))
return NULL;
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
if (mapping->size_high || offset_high)
fprintf( stderr, "MapViewOfFileEx: offsets larger than 4Gb not supported\n");
if ((offset_low >= mapping->size_low) ||
(count > mapping->size_low - offset_low))
{
SetLastError( ERROR_INVALID_PARAMETER );
goto error;
}
if (count) size = ROUND_SIZE( offset_low, count );
else size = mapping->size_low - offset_low;
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
switch(access)
{
case FILE_MAP_ALL_ACCESS:
case FILE_MAP_WRITE:
Release 970509 Tue May 6 19:12:20 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [loader/module.c] Fixed command line in LoadModule to already include the length indicator (thanks to Andreas Mohr). * [windows/dialog.c] DlgDirList: fixed behavior with DDL_DRIVES | DDL_EXCLUSIVE (thanks to Bruce Milner for this one); correctly update file spec on exit. * [windows/winproc.c] [if1632/thunk.c] [include/callback.h] Moved emulator-specific code for calling window procedure to thunk.c. Mon Apr 28 10:21:59 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [memory/local.c] Better implementation of moveable blocks (first word in block is the handle itself) and discarded blocks. Local(Re)Alloc is much more like the real thing. Thu Apr 24 19:50:19 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of meta record META_DIBCREATEPATTERNBRUSH. Mon Apr 21 14:03:32 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [multimedia/mmsystem.c] [multimedia/audio.c] Fixed leftover problems with masked device IDs. * [msdos/int21.c] Removed code duplications, fixed Write. * [windows/event.c] [windows/dce.c] [windows/nonclient.c] [windows/winpos.c] Yet another attempt to make -managed work better. * [controls/combo.c] UI fix. Mon Apr 21 13:10:24 1997 Marcus Meissner <msmeissn@immd4.informatik.uni-erlangen.de> * [debugger/*] All "Loading from ..." lines merged into one so important information before the crash doesn't scroll out. * [if1632/kernel.spec] Added some ordinal stubs used by win95 OLE and friends. * [win32/process.c] [if1632/kernel.spec] [loader/module.c] MsgWaitForMultipleObjects,GetProcessTimes,RtlImageNtHeaders, LoadLibraryEx32W and GetProcAddress32W added. * [objects/bitmap.c] XImages use another memory layout for depth 4 (and poss. other depths) then Windows bitmaps. Replaced speedup hack by generic (and better working) code. * [objects/dib.c] Another ximage!=bitmap memory layout bug. All _XinitImageFuncPtrs except one removed. Sun Apr 20 17:12:30 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/audio.c] Fixed some regression bugs. Sun Apr 20 12:15:09 1997 Andreas Mohr <100.30936@germany.net> * [loader/module.c] Fixed MODULE_LoadExeHeader() to use the correct offset for fast-load area. Sat Apr 19 16:40:00 1997 Chad Fraleigh <chadf@bookcase.com> * [controls/*] [debugger/*] [graphics/win16drv/*] [loader/*] [misc/*] [win32/*] Removed <malloc.h> and added <stdlib.h> where needed. Changed printf formaters to match argument types (%lx instead of %x). Casted some types to make the compiler happy. Mostly pointer<->ulong. * [graphics/win16drv/init.c] Fixed uninitialized variable. * [include/msdos.h] Added <sys/types.h> needed for <dirent.h>. * [include/sigcontext.h] Combined a common NetBSD & FreeBSD #ifdef, and added in OpenBSD. Casted EIP_sig/ESP_sig to be unsigned long (declared as 'int' in *BSD). * [misc/crtdll.c] [misc/lstr.c] Casted last argument in v*printf() to be va_list. This code seems to make BIG assumptions about the implementation of va_list. * [misc/ver.c] Fixed impossible if() expression (unsigned < 0). * [misc/winsock.c] Removed semicolon on the end of an if() statement. * [windows/mdi.c] Changed a counter/index to unsigned since it was complaining about signed/unsigned comparison and didn't need to be negative. Wed Apr 16 17:43:19 1997 Georg Beyerle <gbeyerle@awi-potsdam.de> * [scheduler/thread.c] Minor fix in thread database initialization. Wed Apr 16 17:28:05 1997 Andreas Mohr <100.30936@germany.net> * [files/file.c] Fixed FILE_FillInfo() to omit the archive flag when handling a DOS directory entry.
1997-05-09 10:40:27 +02:00
case FILE_MAP_WRITE | FILE_MAP_READ:
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
if (!(mapping->protect & VPROT_WRITE))
{
SetLastError( ERROR_INVALID_PARAMETER );
goto error;
}
flags = MAP_SHARED;
/* fall through */
case FILE_MAP_READ:
case FILE_MAP_COPY:
Release 970509 Tue May 6 19:12:20 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [loader/module.c] Fixed command line in LoadModule to already include the length indicator (thanks to Andreas Mohr). * [windows/dialog.c] DlgDirList: fixed behavior with DDL_DRIVES | DDL_EXCLUSIVE (thanks to Bruce Milner for this one); correctly update file spec on exit. * [windows/winproc.c] [if1632/thunk.c] [include/callback.h] Moved emulator-specific code for calling window procedure to thunk.c. Mon Apr 28 10:21:59 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [memory/local.c] Better implementation of moveable blocks (first word in block is the handle itself) and discarded blocks. Local(Re)Alloc is much more like the real thing. Thu Apr 24 19:50:19 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of meta record META_DIBCREATEPATTERNBRUSH. Mon Apr 21 14:03:32 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [multimedia/mmsystem.c] [multimedia/audio.c] Fixed leftover problems with masked device IDs. * [msdos/int21.c] Removed code duplications, fixed Write. * [windows/event.c] [windows/dce.c] [windows/nonclient.c] [windows/winpos.c] Yet another attempt to make -managed work better. * [controls/combo.c] UI fix. Mon Apr 21 13:10:24 1997 Marcus Meissner <msmeissn@immd4.informatik.uni-erlangen.de> * [debugger/*] All "Loading from ..." lines merged into one so important information before the crash doesn't scroll out. * [if1632/kernel.spec] Added some ordinal stubs used by win95 OLE and friends. * [win32/process.c] [if1632/kernel.spec] [loader/module.c] MsgWaitForMultipleObjects,GetProcessTimes,RtlImageNtHeaders, LoadLibraryEx32W and GetProcAddress32W added. * [objects/bitmap.c] XImages use another memory layout for depth 4 (and poss. other depths) then Windows bitmaps. Replaced speedup hack by generic (and better working) code. * [objects/dib.c] Another ximage!=bitmap memory layout bug. All _XinitImageFuncPtrs except one removed. Sun Apr 20 17:12:30 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/audio.c] Fixed some regression bugs. Sun Apr 20 12:15:09 1997 Andreas Mohr <100.30936@germany.net> * [loader/module.c] Fixed MODULE_LoadExeHeader() to use the correct offset for fast-load area. Sat Apr 19 16:40:00 1997 Chad Fraleigh <chadf@bookcase.com> * [controls/*] [debugger/*] [graphics/win16drv/*] [loader/*] [misc/*] [win32/*] Removed <malloc.h> and added <stdlib.h> where needed. Changed printf formaters to match argument types (%lx instead of %x). Casted some types to make the compiler happy. Mostly pointer<->ulong. * [graphics/win16drv/init.c] Fixed uninitialized variable. * [include/msdos.h] Added <sys/types.h> needed for <dirent.h>. * [include/sigcontext.h] Combined a common NetBSD & FreeBSD #ifdef, and added in OpenBSD. Casted EIP_sig/ESP_sig to be unsigned long (declared as 'int' in *BSD). * [misc/crtdll.c] [misc/lstr.c] Casted last argument in v*printf() to be va_list. This code seems to make BIG assumptions about the implementation of va_list. * [misc/ver.c] Fixed impossible if() expression (unsigned < 0). * [misc/winsock.c] Removed semicolon on the end of an if() statement. * [windows/mdi.c] Changed a counter/index to unsigned since it was complaining about signed/unsigned comparison and didn't need to be negative. Wed Apr 16 17:43:19 1997 Georg Beyerle <gbeyerle@awi-potsdam.de> * [scheduler/thread.c] Minor fix in thread database initialization. Wed Apr 16 17:28:05 1997 Andreas Mohr <100.30936@germany.net> * [files/file.c] Fixed FILE_FillInfo() to omit the archive flag when handling a DOS directory entry.
1997-05-09 10:40:27 +02:00
case FILE_MAP_COPY | FILE_MAP_READ:
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
if (mapping->protect & VPROT_READ) break;
/* fall through */
default:
SetLastError( ERROR_INVALID_PARAMETER );
goto error;
}
/* Map the file */
dprintf_virtual( stddeb, "MapViewOfFile: handle=%x size=%x offset=%lx\n",
handle, size, offset_low );
ptr = (UINT32)FILE_mmap( mapping->file, addr, 0, size, 0, offset_low,
VIRTUAL_GetUnixProt( mapping->protect ),
flags );
if (ptr == (UINT32)-1)
{
SetLastError( ERROR_OUTOFMEMORY );
goto error;
}
if (!(view = VIRTUAL_CreateView( ptr, size, offset_low, 0,
mapping->protect, mapping )))
{
SetLastError( ERROR_OUTOFMEMORY );
goto error;
}
return (LPVOID)ptr;
error:
if (ptr != (UINT32)-1) munmap( (void *)ptr, size );
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
K32OBJ_DecCount( &mapping->header );
Release 970415 Mon Apr 14 11:22:54 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] Minor changes to help debug problems. * [if1632/dummy.c] [if1632/gdi.spec] Dummy routines for StartPage, EndPage, SetAbortProc, AbortProc. * [misc/printdrv.c] [if1632/gdi.spec] [include/windows.h] StartDoc16, EndDoc16 new functions. Sun Apr 13 11:18:35 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [memory/virtual.c] Implemented MapViewOfFile. * [debugger/dbg.y] Added 'info maps' command. Fri Apr 11 16:34:08 1997 Frans van Dorsselaer <devel@rulhmpc58.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Started restructuring. Performance improvements. Fixed: wordwrap, scrollbar handling, scrolling, painting, EditWndProc() is now reentrant, wordbreak procs, better compliance to specs. New: margins, format rectangle. * [controls/widgets.c] Changed the cursor for the edit control class to an I-beam. * [include/callback.h] Added 32 bit wordbreak callback. Mon Apr 7 20:53:28 1997 Albrecht Kleine <kleine@ak.sax.de> * [objects/metafile.c] Added handling of some more metafile records: META_CREATEREGION, META_INVERTREGION etc. Sat Apr 5 09:23:02 MET DST 1997 Sven Verdoolaege <skimo@breughel.ufsia.ac.be> * [loader/signal.c] Define kernel sigaction ourselves instead of getting it from the kernel source. Wed Apr 2 21:05:00 1997 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [control/menu.c] Fix return value range for GetMenuState. * [files/file.c] Always fill out ofs->szPathName in FILE_DoOpenFile. * [memory/string.c] Add debug option string. * [objects/cursoricon.c] Fix return value for DestroyIcon32. Mon Mar 31 17:16:12 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [DEVELOPERS-HINTS] [misc/*] [windows/*] [graphics/*] Added description of the source tree. Moved several files to fit it. * [misc/shell.c] Use Win32 heap functions.
1997-04-15 19:19:52 +02:00
return NULL;
Release 970305 Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
1997-03-05 09:22:35 +01:00
}
/***********************************************************************
* UnmapViewOfFile (KERNEL32.540)
*/
BOOL32 UnmapViewOfFile( LPVOID addr )
{
FILE_VIEW *view;
UINT32 base = ROUND_ADDR( addr );
if (!(view = VIRTUAL_FindView( base )) || (base != view->base))
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
VIRTUAL_DeleteView( view );
return TRUE;
}