1997-03-05 09:22:35 +01:00
|
|
|
/*
|
|
|
|
* Win32 virtual memory functions
|
|
|
|
*
|
|
|
|
* Copyright 1997 Alexandre Julliard
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
1997-03-05 09:22:35 +01:00
|
|
|
*/
|
|
|
|
|
2001-11-06 21:57:11 +01:00
|
|
|
#include "config.h"
|
2001-10-14 18:25:47 +02:00
|
|
|
#include "wine/port.h"
|
1999-07-10 15:16:29 +02:00
|
|
|
|
1997-03-05 09:22:35 +01:00
|
|
|
#include <fcntl.h>
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
1997-03-05 09:22:35 +01:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <sys/types.h>
|
2002-09-17 20:54:42 +02:00
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
# include <unistd.h>
|
1999-07-10 15:16:29 +02:00
|
|
|
#endif
|
2002-09-17 20:54:42 +02:00
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "ntstatus.h"
|
2005-11-28 17:32:54 +01:00
|
|
|
#define WIN32_NO_STATUS
|
2015-03-12 10:39:31 +01:00
|
|
|
#define NONAMELESSUNION
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "windef.h"
|
1997-03-05 09:22:35 +01:00
|
|
|
#include "winbase.h"
|
2003-08-20 20:22:31 +02:00
|
|
|
#include "winnls.h"
|
2002-09-17 20:54:42 +02:00
|
|
|
#include "winternl.h"
|
1997-03-05 09:22:35 +01:00
|
|
|
#include "winerror.h"
|
2011-05-16 15:19:18 +02:00
|
|
|
#include "psapi.h"
|
2002-09-17 20:54:42 +02:00
|
|
|
#include "wine/exception.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
1997-03-05 09:22:35 +01:00
|
|
|
|
2005-12-02 16:13:13 +01:00
|
|
|
#include "kernel_private.h"
|
|
|
|
|
2005-03-22 22:16:39 +01:00
|
|
|
WINE_DECLARE_DEBUG_CHANNEL(seh);
|
2011-05-13 11:05:11 +02:00
|
|
|
WINE_DECLARE_DEBUG_CHANNEL(file);
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
|
|
|
|
1997-03-05 09:22:35 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2002-09-17 20:54:42 +02:00
|
|
|
* VirtualAlloc (KERNEL32.@)
|
2006-01-16 20:42:09 +01:00
|
|
|
*
|
|
|
|
* Reserves or commits a region of pages in virtual address space.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* addr [I] Address of region to reserve or commit.
|
|
|
|
* size [I] Size of region.
|
|
|
|
* type [I] Type of allocation.
|
|
|
|
* protect [I] Type of access protection.
|
1998-03-29 21:44:57 +02:00
|
|
|
*
|
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: Base address of allocated region of pages.
|
|
|
|
* Failure: NULL.
|
1997-03-05 09:22:35 +01:00
|
|
|
*/
|
2016-07-18 13:20:45 +02:00
|
|
|
LPVOID WINAPI DECLSPEC_HOTPATCH VirtualAlloc( void *addr, SIZE_T size, DWORD type, DWORD protect )
|
2001-10-09 23:50:44 +02:00
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
return VirtualAllocEx( GetCurrentProcess(), addr, size, type, protect );
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2002-09-17 20:54:42 +02:00
|
|
|
* VirtualAllocEx (KERNEL32.@)
|
1997-03-05 09:22:35 +01:00
|
|
|
*
|
2002-09-17 20:54:42 +02:00
|
|
|
* Seems to be just as VirtualAlloc, but with process handle.
|
2005-11-08 12:01:03 +01:00
|
|
|
*
|
2006-01-16 20:42:09 +01:00
|
|
|
* PARAMS
|
|
|
|
* hProcess [I] Handle to process to do mem operation.
|
|
|
|
* addr [I] Address of region to reserve or commit.
|
|
|
|
* size [I] Size of region.
|
|
|
|
* type [I] Type of allocation.
|
|
|
|
* protect [I] Type of access protection.
|
|
|
|
*
|
|
|
|
*
|
2005-11-08 12:01:03 +01:00
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: Base address of allocated region of pages.
|
|
|
|
* Failure: NULL.
|
1997-03-05 09:22:35 +01:00
|
|
|
*/
|
2006-01-16 20:42:09 +01:00
|
|
|
LPVOID WINAPI VirtualAllocEx( HANDLE hProcess, LPVOID addr, SIZE_T size,
|
|
|
|
DWORD type, DWORD protect )
|
1997-03-05 09:22:35 +01:00
|
|
|
{
|
2004-10-11 22:59:06 +02:00
|
|
|
LPVOID ret = addr;
|
2002-09-17 20:54:42 +02:00
|
|
|
NTSTATUS status;
|
1997-03-05 09:22:35 +01:00
|
|
|
|
2004-10-11 22:59:06 +02:00
|
|
|
if ((status = NtAllocateVirtualMemory( hProcess, &ret, 0, &size, type, protect )))
|
1997-03-05 09:22:35 +01:00
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
SetLastError( RtlNtStatusToDosError(status) );
|
|
|
|
ret = NULL;
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|
2002-09-17 20:54:42 +02:00
|
|
|
return ret;
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2002-09-17 20:54:42 +02:00
|
|
|
* VirtualFree (KERNEL32.@)
|
2006-01-16 20:42:09 +01:00
|
|
|
*
|
|
|
|
* Releases or decommits a region of pages in virtual address space.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* addr [I] Address of region of committed pages.
|
|
|
|
* size [I] Size of region.
|
|
|
|
* type [I] Type of operation.
|
1998-03-29 21:44:57 +02:00
|
|
|
*
|
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: TRUE.
|
|
|
|
* Failure: FALSE.
|
1997-03-05 09:22:35 +01:00
|
|
|
*/
|
2006-01-16 20:42:09 +01:00
|
|
|
BOOL WINAPI VirtualFree( LPVOID addr, SIZE_T size, DWORD type )
|
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
return VirtualFreeEx( GetCurrentProcess(), addr, size, type );
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2002-09-17 20:54:42 +02:00
|
|
|
* VirtualFreeEx (KERNEL32.@)
|
2006-01-16 20:42:09 +01:00
|
|
|
*
|
|
|
|
* Releases or decommits a region of pages in virtual address space.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* process [I] Handle to process.
|
|
|
|
* addr [I] Address of region to free.
|
|
|
|
* size [I] Size of region.
|
|
|
|
* type [I] Type of operation.
|
1998-03-29 21:44:57 +02:00
|
|
|
*
|
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: TRUE.
|
|
|
|
* Failure: FALSE.
|
1997-03-05 09:22:35 +01:00
|
|
|
*/
|
2002-09-21 03:21:00 +02:00
|
|
|
BOOL WINAPI VirtualFreeEx( HANDLE process, LPVOID addr, SIZE_T size, DWORD type )
|
2002-09-17 20:54:42 +02:00
|
|
|
{
|
|
|
|
NTSTATUS status = NtFreeVirtualMemory( process, &addr, &size, type );
|
|
|
|
if (status) SetLastError( RtlNtStatusToDosError(status) );
|
|
|
|
return !status;
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2002-09-17 20:54:42 +02:00
|
|
|
* VirtualLock (KERNEL32.@)
|
1997-03-05 09:22:35 +01:00
|
|
|
*
|
2006-01-16 20:42:09 +01:00
|
|
|
* Locks the specified region of virtual address space.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* addr [I] Address of first byte of range to lock.
|
|
|
|
* size [I] Number of bytes in range to lock.
|
1998-03-29 21:44:57 +02:00
|
|
|
*
|
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: TRUE.
|
|
|
|
* Failure: FALSE.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* Always returns TRUE.
|
|
|
|
*
|
1997-03-05 09:22:35 +01:00
|
|
|
*/
|
2006-01-16 20:42:09 +01:00
|
|
|
BOOL WINAPI VirtualLock( LPVOID addr, SIZE_T size )
|
2001-10-09 23:50:44 +02:00
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
NTSTATUS status = NtLockVirtualMemory( GetCurrentProcess(), &addr, &size, 1 );
|
|
|
|
if (status) SetLastError( RtlNtStatusToDosError(status) );
|
|
|
|
return !status;
|
2001-10-09 23:50:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-07-30 01:59:26 +02:00
|
|
|
/***********************************************************************
|
2002-09-17 20:54:42 +02:00
|
|
|
* VirtualUnlock (KERNEL32.@)
|
2002-07-30 01:59:26 +02:00
|
|
|
*
|
2006-01-16 20:42:09 +01:00
|
|
|
* Unlocks a range of pages in the virtual address space.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* addr [I] Address of first byte of range.
|
|
|
|
* size [I] Number of bytes in range.
|
2000-08-14 22:20:01 +02:00
|
|
|
*
|
2002-09-17 20:54:42 +02:00
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: TRUE.
|
|
|
|
* Failure: FALSE.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* Always returns TRUE.
|
|
|
|
*
|
Release 980628
Sun Jun 28 18:37:02 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/signal.c] [miscemu/instr.c] [memory/virtual.c]
Moved page-fault handling to INSTR_EmulateInstruction.
* [scheduler/thread.c]
Added locking and check for own thread in Suspend/ResumeThread.
Sat Jun 27 21:25:21 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [objects/dib.c] [objects/bitmap.c] [objects/oembitmap.c]
[graphics/x11drv/bitblt.c] [include/bitmap.h]
Improved DIB section handling using page fault handlers.
(Note: This patch includes code contributed by Matthew J. Francis.)
* [memory/virtual.c] [if1632/signal.c] [include/global.h]
Page Fault handler support added.
* [if1632/signal.c] [loader/signal.c] [tools/build.c] [misc/system.c]
[misc/winsock_dns.c] [include/sig_context.h] [include/thread.h]
16-bit %fs handling improved: Always preserve 16-bit %fs value,
always restore 32-bit %fs value for signal handlers.
* [if1632/thunk.c] [loader/module.c] [misc/callback.c] [windows/user.c]
[loader/ne/resource.c] [include/callback.h] [include/module.h]
[if1632/kernel.spec] [if1632/wprocs.spec]
Resource Handler function pointer stored as 16-bit SEGPTR.
* [loader/task.c] [windows/win.c] [windows/winpos.c] [if1632/user.spec]
[if1632/kernel.spec] [loader/ne/module.c]
Some minor incompatibilities fixed (Win32s relies on those):
GetExePtr, IsWindow16 should set ES on return; WINPOS_SendNCCalcSize
should cope with having the WINDOWPOS structure trashed;
the OFSTRUCT in the NE module image should be placed *last*.
* [include/windows.h]
Missing prototype for FlushViewOfFile.
* [loader/task.c]
Bugfix: Command line should *not* start with a blank.
* [loader/ne/segment.c]
Bugfix: Fixups to offset 0 were never applied.
* [misc/lstr.c]
Use debugstr_a in OutputDebugString16.
* [msdos/dpmi.c]
Stub for int 31 BL=2f AX=7a20 (NetWare: Get VLM Call Address) added.
* [msdos/int21.c]
Stub for int 21 AX=440d CL=6f (get drive map information) added.
Fri Jun 26 18:08:30 1998 Rein Klazes <rklazes@casema.net>
* [windows/winpos.c]
Fix small buglet that mixed up maximized and minimized windows.
* [include/x11drv.h] [objects/dc.c] [graphics/x11drv/pen.c]
[graphics/x11drv/graphics.c]
Fix some bugs with lines joining styles. Draws rectangles
with thick pens now correctly.
Fri Jun 26 16:22:23 1998 James Juran <jrj120@psu.edu>
* [misc/shell.c]
Fixed bug I introduced last release in InternalExtractIcon.
* [win32/file.c]
Added documentation for CreateFile32A.
* [documentation/wine.man]
Updated manpage.
* [ChangeLog]
Added my entry from last release.
Fri Jun 26 13:33:30 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*] [if1632/wineps.spec] [include/psdrv.h]
[include/print.h] [objects/gdiobj.c]
First stages of an internal Postscript driver. See
graphics/psdrv/README . Should print text (badly) from win3.1 notepad,
write and winword6.
* [documentation/printing]
Some notes on printing.
* [controls/edit.c]
Strip off WS_BORDER in WM_NCREATE, edit draws its own rectangle.
EC_USEFONTINFO seems to be used as a left/right value for EM_SETMARGINS
and not as an action as the docs say. This actually makes more sense.
Scroll the caret back to zero after a WM_SETTEXT.
Fri Jun 26 10:56:25 1998 Marcus Meissner <marcus@jet.franken.de>
* [if1632/snoop.c]
Added win16 inter-dll snooping.
* [win32/ordinals.c]
KERNEL_485 is GetProcessDword.
* [include/xmalloc.h][include/bitmap.h][misc/xmalloc.c]
Added xcalloc so we 0 initialize XImages.
Fixes/Hides the 'junk around MOPYFish'.
* [misc/ntdll.c]
Some stubs added.
Thu Jun 25 15:22:43 1998 Adrian Harvey <adrian@select.com.au>
* [scheduler/thread.c]
Implemented SuspendThread and ResumeThread.
Thu Jun 25 00:55:03 1998 Peter Hunnisett <hunnise@nortel.ca>
* [include/debug.h,dplay.h,dsound.h][multimedia/dsound.c,dplay.c]
[relay32/dplayx.spec,dplay.spec][multimedia/Makefile.in]
[documentation/status/directplay]
Added preliminary support for DirectPlay & DirectPlayLobby. Moved the
preliminary stubs put in the dsound files into two new files
dplay.h and dplay.c.
Added new debug channel (dplay) for this.
Created new document to keep track of implementation.
* [include/winioctl.h][win32/device.c]
Added some framework in DeviceIoControl to, in the future, support
the "builtin" windows dwIoControlCodes. Added new header file
winioctl.h .
* [multimedia/mmsystem.c]
Added slightly improved debugging information for PlaySound.
Wed Jun 24 12:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [files/profile.c][graphics/x11drv/xfont.c][loader/module.c]
Changed lstrcmpi32A to strcasecmp, lstrncmpi32A to strncasecmp,
lstrcpy32A to strcpy, lstrlen32A to strlen, lstrcmp32A to strcmp
because it's not necessary to support locale on such places.
It causes a huge overhead and even fails sometimes
* [include/oleauto.h][include/winerror.h]
Added some ole-related constants.
* [misc/shell.c]
SHELL32_DllGetClassObject, SHGetSpecialFolderLocation,
SHGetPathFromIDList improved the stubs
* [ole/folders.c]
IShellFolder* functions rewrote the stubs so don't crash and give
something sensible back, started implementation of.
* [ole/typelib.c][relay32/oleaut32.spec]
LoadTypeLib32, RegisterTypeLib stub.
* [ole/ole2nls.c]
Fixed a buffer overrun in CompareString32A.
Test for a bad pointer in LCMapString32A (happens
in winhlp32 while building a index for searching).
* [relay32/oleaut32.spec] [ole/typelib.c]
Added stub for LoadTypeLib (ole32) to make excel95 happy.
Tue Jun 23 22:47:09 1998 Alex Priem <alexp@sci.kun.nl>
* [files/profile.c] [relay32/kernel32.spec]
Added WritePrivateProfileStructA, GetPrivateProfileStructA,
GetPrivateProfileSectionNames16.
Tue Jun 23 01:34:43 1998 Pascal Cuoq <pcuoq@ens-lyon.fr>
* [ole/ole2nls.c]
GetStringTypeEx32A: Implemented CT_CTYPE2 and CT_CTYPE3 cases.
LCMapString32A: Map final '\0' for '\0'-terminated strings.
* [misc/shellord.c] [files/profile.c] [graphics/driver.c]
[loader/module.c] [msdos/int21.c] [windows/driver.c] [files/drive.c]
Changed lstrcmpi32A -> strcasecmp. Should be OK in these places.
Sat Jun 20 23:40:00 1998 Bertho Stultiens <bertho@akhphd.au.dk>
* [tools/wrc/]
Wrc version 1.0.2 (20-Jun-1998). Please revert to
the file tools/wrc/CHANGES for details.
Sat Jun 20 14:58:00 1998 Marcel Baur <mbaur@g26.ethz.ch>
* [ole/ole2nls.c] [ole/nls/*]
Added the first 57 nls files, most are not yet complete.
Wed Jun 17 11:16:54 1998 David Luyer <luyer@ucs.uwa.edu.au>
* [relay32/relay386.c] [if1632/relay.c]
Move debug_relay_(include|exclude)_list handling into
seperate function RELAY_ShowDebugmsgsRelay(). Include
checking of this for 16 bit calls (originally only
32-bit calls).
* [relay32/snoop.c] [misc/main.c]
Add debug_snoop_(include|exclude)_list as per the relay stuff.
Fix typo and add information on -debugmsg +/-relay=... in
help on -debugmsg. Refer to availability of snoop too.
Tue Jun 10 22:00:18 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [controls/header.c][include/header.h][include/commctrl.h]
Added owner draw support.
* [windows/nonclient.c][windows/sysmetics.c]
Fixed menu bar height for Win95 look.
Split NC_AdjustRect95() into NC_AdjustRectOuter95() and
NC_AdjustRectInner95 to fix a menu bar bug.
Improved Win95 look.
* [controls/progress.c]
Improved drawing code. Borders will be drawn by non-client code.
* [controls/updown.c]
Changed memory allocation and fixed some bugs.
* [controls/toolbar.c]
Fixed TB_BUTTONSTRUCTSIZE bug in MFC programs.
Several improvements.
* [misc/shell.c]
Added stub for BrowseForFoldersA().
* [misc/shellord.c]
Added stub for SHELL32_147().
* [controls/comctl32undoc.c]
Minor changes.
* [documentation/common_controls]
New File: Documentation about development status, undocumented
features and functions of the common controls.
1998-06-28 20:40:26 +02:00
|
|
|
*/
|
2006-01-16 20:42:09 +01:00
|
|
|
BOOL WINAPI VirtualUnlock( LPVOID addr, SIZE_T size )
|
Release 980628
Sun Jun 28 18:37:02 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/signal.c] [miscemu/instr.c] [memory/virtual.c]
Moved page-fault handling to INSTR_EmulateInstruction.
* [scheduler/thread.c]
Added locking and check for own thread in Suspend/ResumeThread.
Sat Jun 27 21:25:21 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [objects/dib.c] [objects/bitmap.c] [objects/oembitmap.c]
[graphics/x11drv/bitblt.c] [include/bitmap.h]
Improved DIB section handling using page fault handlers.
(Note: This patch includes code contributed by Matthew J. Francis.)
* [memory/virtual.c] [if1632/signal.c] [include/global.h]
Page Fault handler support added.
* [if1632/signal.c] [loader/signal.c] [tools/build.c] [misc/system.c]
[misc/winsock_dns.c] [include/sig_context.h] [include/thread.h]
16-bit %fs handling improved: Always preserve 16-bit %fs value,
always restore 32-bit %fs value for signal handlers.
* [if1632/thunk.c] [loader/module.c] [misc/callback.c] [windows/user.c]
[loader/ne/resource.c] [include/callback.h] [include/module.h]
[if1632/kernel.spec] [if1632/wprocs.spec]
Resource Handler function pointer stored as 16-bit SEGPTR.
* [loader/task.c] [windows/win.c] [windows/winpos.c] [if1632/user.spec]
[if1632/kernel.spec] [loader/ne/module.c]
Some minor incompatibilities fixed (Win32s relies on those):
GetExePtr, IsWindow16 should set ES on return; WINPOS_SendNCCalcSize
should cope with having the WINDOWPOS structure trashed;
the OFSTRUCT in the NE module image should be placed *last*.
* [include/windows.h]
Missing prototype for FlushViewOfFile.
* [loader/task.c]
Bugfix: Command line should *not* start with a blank.
* [loader/ne/segment.c]
Bugfix: Fixups to offset 0 were never applied.
* [misc/lstr.c]
Use debugstr_a in OutputDebugString16.
* [msdos/dpmi.c]
Stub for int 31 BL=2f AX=7a20 (NetWare: Get VLM Call Address) added.
* [msdos/int21.c]
Stub for int 21 AX=440d CL=6f (get drive map information) added.
Fri Jun 26 18:08:30 1998 Rein Klazes <rklazes@casema.net>
* [windows/winpos.c]
Fix small buglet that mixed up maximized and minimized windows.
* [include/x11drv.h] [objects/dc.c] [graphics/x11drv/pen.c]
[graphics/x11drv/graphics.c]
Fix some bugs with lines joining styles. Draws rectangles
with thick pens now correctly.
Fri Jun 26 16:22:23 1998 James Juran <jrj120@psu.edu>
* [misc/shell.c]
Fixed bug I introduced last release in InternalExtractIcon.
* [win32/file.c]
Added documentation for CreateFile32A.
* [documentation/wine.man]
Updated manpage.
* [ChangeLog]
Added my entry from last release.
Fri Jun 26 13:33:30 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*] [if1632/wineps.spec] [include/psdrv.h]
[include/print.h] [objects/gdiobj.c]
First stages of an internal Postscript driver. See
graphics/psdrv/README . Should print text (badly) from win3.1 notepad,
write and winword6.
* [documentation/printing]
Some notes on printing.
* [controls/edit.c]
Strip off WS_BORDER in WM_NCREATE, edit draws its own rectangle.
EC_USEFONTINFO seems to be used as a left/right value for EM_SETMARGINS
and not as an action as the docs say. This actually makes more sense.
Scroll the caret back to zero after a WM_SETTEXT.
Fri Jun 26 10:56:25 1998 Marcus Meissner <marcus@jet.franken.de>
* [if1632/snoop.c]
Added win16 inter-dll snooping.
* [win32/ordinals.c]
KERNEL_485 is GetProcessDword.
* [include/xmalloc.h][include/bitmap.h][misc/xmalloc.c]
Added xcalloc so we 0 initialize XImages.
Fixes/Hides the 'junk around MOPYFish'.
* [misc/ntdll.c]
Some stubs added.
Thu Jun 25 15:22:43 1998 Adrian Harvey <adrian@select.com.au>
* [scheduler/thread.c]
Implemented SuspendThread and ResumeThread.
Thu Jun 25 00:55:03 1998 Peter Hunnisett <hunnise@nortel.ca>
* [include/debug.h,dplay.h,dsound.h][multimedia/dsound.c,dplay.c]
[relay32/dplayx.spec,dplay.spec][multimedia/Makefile.in]
[documentation/status/directplay]
Added preliminary support for DirectPlay & DirectPlayLobby. Moved the
preliminary stubs put in the dsound files into two new files
dplay.h and dplay.c.
Added new debug channel (dplay) for this.
Created new document to keep track of implementation.
* [include/winioctl.h][win32/device.c]
Added some framework in DeviceIoControl to, in the future, support
the "builtin" windows dwIoControlCodes. Added new header file
winioctl.h .
* [multimedia/mmsystem.c]
Added slightly improved debugging information for PlaySound.
Wed Jun 24 12:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [files/profile.c][graphics/x11drv/xfont.c][loader/module.c]
Changed lstrcmpi32A to strcasecmp, lstrncmpi32A to strncasecmp,
lstrcpy32A to strcpy, lstrlen32A to strlen, lstrcmp32A to strcmp
because it's not necessary to support locale on such places.
It causes a huge overhead and even fails sometimes
* [include/oleauto.h][include/winerror.h]
Added some ole-related constants.
* [misc/shell.c]
SHELL32_DllGetClassObject, SHGetSpecialFolderLocation,
SHGetPathFromIDList improved the stubs
* [ole/folders.c]
IShellFolder* functions rewrote the stubs so don't crash and give
something sensible back, started implementation of.
* [ole/typelib.c][relay32/oleaut32.spec]
LoadTypeLib32, RegisterTypeLib stub.
* [ole/ole2nls.c]
Fixed a buffer overrun in CompareString32A.
Test for a bad pointer in LCMapString32A (happens
in winhlp32 while building a index for searching).
* [relay32/oleaut32.spec] [ole/typelib.c]
Added stub for LoadTypeLib (ole32) to make excel95 happy.
Tue Jun 23 22:47:09 1998 Alex Priem <alexp@sci.kun.nl>
* [files/profile.c] [relay32/kernel32.spec]
Added WritePrivateProfileStructA, GetPrivateProfileStructA,
GetPrivateProfileSectionNames16.
Tue Jun 23 01:34:43 1998 Pascal Cuoq <pcuoq@ens-lyon.fr>
* [ole/ole2nls.c]
GetStringTypeEx32A: Implemented CT_CTYPE2 and CT_CTYPE3 cases.
LCMapString32A: Map final '\0' for '\0'-terminated strings.
* [misc/shellord.c] [files/profile.c] [graphics/driver.c]
[loader/module.c] [msdos/int21.c] [windows/driver.c] [files/drive.c]
Changed lstrcmpi32A -> strcasecmp. Should be OK in these places.
Sat Jun 20 23:40:00 1998 Bertho Stultiens <bertho@akhphd.au.dk>
* [tools/wrc/]
Wrc version 1.0.2 (20-Jun-1998). Please revert to
the file tools/wrc/CHANGES for details.
Sat Jun 20 14:58:00 1998 Marcel Baur <mbaur@g26.ethz.ch>
* [ole/ole2nls.c] [ole/nls/*]
Added the first 57 nls files, most are not yet complete.
Wed Jun 17 11:16:54 1998 David Luyer <luyer@ucs.uwa.edu.au>
* [relay32/relay386.c] [if1632/relay.c]
Move debug_relay_(include|exclude)_list handling into
seperate function RELAY_ShowDebugmsgsRelay(). Include
checking of this for 16 bit calls (originally only
32-bit calls).
* [relay32/snoop.c] [misc/main.c]
Add debug_snoop_(include|exclude)_list as per the relay stuff.
Fix typo and add information on -debugmsg +/-relay=... in
help on -debugmsg. Refer to availability of snoop too.
Tue Jun 10 22:00:18 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [controls/header.c][include/header.h][include/commctrl.h]
Added owner draw support.
* [windows/nonclient.c][windows/sysmetics.c]
Fixed menu bar height for Win95 look.
Split NC_AdjustRect95() into NC_AdjustRectOuter95() and
NC_AdjustRectInner95 to fix a menu bar bug.
Improved Win95 look.
* [controls/progress.c]
Improved drawing code. Borders will be drawn by non-client code.
* [controls/updown.c]
Changed memory allocation and fixed some bugs.
* [controls/toolbar.c]
Fixed TB_BUTTONSTRUCTSIZE bug in MFC programs.
Several improvements.
* [misc/shell.c]
Added stub for BrowseForFoldersA().
* [misc/shellord.c]
Added stub for SHELL32_147().
* [controls/comctl32undoc.c]
Minor changes.
* [documentation/common_controls]
New File: Documentation about development status, undocumented
features and functions of the common controls.
1998-06-28 20:40:26 +02:00
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
NTSTATUS status = NtUnlockVirtualMemory( GetCurrentProcess(), &addr, &size, 1 );
|
|
|
|
if (status) SetLastError( RtlNtStatusToDosError(status) );
|
|
|
|
return !status;
|
Release 980628
Sun Jun 28 18:37:02 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/signal.c] [miscemu/instr.c] [memory/virtual.c]
Moved page-fault handling to INSTR_EmulateInstruction.
* [scheduler/thread.c]
Added locking and check for own thread in Suspend/ResumeThread.
Sat Jun 27 21:25:21 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [objects/dib.c] [objects/bitmap.c] [objects/oembitmap.c]
[graphics/x11drv/bitblt.c] [include/bitmap.h]
Improved DIB section handling using page fault handlers.
(Note: This patch includes code contributed by Matthew J. Francis.)
* [memory/virtual.c] [if1632/signal.c] [include/global.h]
Page Fault handler support added.
* [if1632/signal.c] [loader/signal.c] [tools/build.c] [misc/system.c]
[misc/winsock_dns.c] [include/sig_context.h] [include/thread.h]
16-bit %fs handling improved: Always preserve 16-bit %fs value,
always restore 32-bit %fs value for signal handlers.
* [if1632/thunk.c] [loader/module.c] [misc/callback.c] [windows/user.c]
[loader/ne/resource.c] [include/callback.h] [include/module.h]
[if1632/kernel.spec] [if1632/wprocs.spec]
Resource Handler function pointer stored as 16-bit SEGPTR.
* [loader/task.c] [windows/win.c] [windows/winpos.c] [if1632/user.spec]
[if1632/kernel.spec] [loader/ne/module.c]
Some minor incompatibilities fixed (Win32s relies on those):
GetExePtr, IsWindow16 should set ES on return; WINPOS_SendNCCalcSize
should cope with having the WINDOWPOS structure trashed;
the OFSTRUCT in the NE module image should be placed *last*.
* [include/windows.h]
Missing prototype for FlushViewOfFile.
* [loader/task.c]
Bugfix: Command line should *not* start with a blank.
* [loader/ne/segment.c]
Bugfix: Fixups to offset 0 were never applied.
* [misc/lstr.c]
Use debugstr_a in OutputDebugString16.
* [msdos/dpmi.c]
Stub for int 31 BL=2f AX=7a20 (NetWare: Get VLM Call Address) added.
* [msdos/int21.c]
Stub for int 21 AX=440d CL=6f (get drive map information) added.
Fri Jun 26 18:08:30 1998 Rein Klazes <rklazes@casema.net>
* [windows/winpos.c]
Fix small buglet that mixed up maximized and minimized windows.
* [include/x11drv.h] [objects/dc.c] [graphics/x11drv/pen.c]
[graphics/x11drv/graphics.c]
Fix some bugs with lines joining styles. Draws rectangles
with thick pens now correctly.
Fri Jun 26 16:22:23 1998 James Juran <jrj120@psu.edu>
* [misc/shell.c]
Fixed bug I introduced last release in InternalExtractIcon.
* [win32/file.c]
Added documentation for CreateFile32A.
* [documentation/wine.man]
Updated manpage.
* [ChangeLog]
Added my entry from last release.
Fri Jun 26 13:33:30 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*] [if1632/wineps.spec] [include/psdrv.h]
[include/print.h] [objects/gdiobj.c]
First stages of an internal Postscript driver. See
graphics/psdrv/README . Should print text (badly) from win3.1 notepad,
write and winword6.
* [documentation/printing]
Some notes on printing.
* [controls/edit.c]
Strip off WS_BORDER in WM_NCREATE, edit draws its own rectangle.
EC_USEFONTINFO seems to be used as a left/right value for EM_SETMARGINS
and not as an action as the docs say. This actually makes more sense.
Scroll the caret back to zero after a WM_SETTEXT.
Fri Jun 26 10:56:25 1998 Marcus Meissner <marcus@jet.franken.de>
* [if1632/snoop.c]
Added win16 inter-dll snooping.
* [win32/ordinals.c]
KERNEL_485 is GetProcessDword.
* [include/xmalloc.h][include/bitmap.h][misc/xmalloc.c]
Added xcalloc so we 0 initialize XImages.
Fixes/Hides the 'junk around MOPYFish'.
* [misc/ntdll.c]
Some stubs added.
Thu Jun 25 15:22:43 1998 Adrian Harvey <adrian@select.com.au>
* [scheduler/thread.c]
Implemented SuspendThread and ResumeThread.
Thu Jun 25 00:55:03 1998 Peter Hunnisett <hunnise@nortel.ca>
* [include/debug.h,dplay.h,dsound.h][multimedia/dsound.c,dplay.c]
[relay32/dplayx.spec,dplay.spec][multimedia/Makefile.in]
[documentation/status/directplay]
Added preliminary support for DirectPlay & DirectPlayLobby. Moved the
preliminary stubs put in the dsound files into two new files
dplay.h and dplay.c.
Added new debug channel (dplay) for this.
Created new document to keep track of implementation.
* [include/winioctl.h][win32/device.c]
Added some framework in DeviceIoControl to, in the future, support
the "builtin" windows dwIoControlCodes. Added new header file
winioctl.h .
* [multimedia/mmsystem.c]
Added slightly improved debugging information for PlaySound.
Wed Jun 24 12:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [files/profile.c][graphics/x11drv/xfont.c][loader/module.c]
Changed lstrcmpi32A to strcasecmp, lstrncmpi32A to strncasecmp,
lstrcpy32A to strcpy, lstrlen32A to strlen, lstrcmp32A to strcmp
because it's not necessary to support locale on such places.
It causes a huge overhead and even fails sometimes
* [include/oleauto.h][include/winerror.h]
Added some ole-related constants.
* [misc/shell.c]
SHELL32_DllGetClassObject, SHGetSpecialFolderLocation,
SHGetPathFromIDList improved the stubs
* [ole/folders.c]
IShellFolder* functions rewrote the stubs so don't crash and give
something sensible back, started implementation of.
* [ole/typelib.c][relay32/oleaut32.spec]
LoadTypeLib32, RegisterTypeLib stub.
* [ole/ole2nls.c]
Fixed a buffer overrun in CompareString32A.
Test for a bad pointer in LCMapString32A (happens
in winhlp32 while building a index for searching).
* [relay32/oleaut32.spec] [ole/typelib.c]
Added stub for LoadTypeLib (ole32) to make excel95 happy.
Tue Jun 23 22:47:09 1998 Alex Priem <alexp@sci.kun.nl>
* [files/profile.c] [relay32/kernel32.spec]
Added WritePrivateProfileStructA, GetPrivateProfileStructA,
GetPrivateProfileSectionNames16.
Tue Jun 23 01:34:43 1998 Pascal Cuoq <pcuoq@ens-lyon.fr>
* [ole/ole2nls.c]
GetStringTypeEx32A: Implemented CT_CTYPE2 and CT_CTYPE3 cases.
LCMapString32A: Map final '\0' for '\0'-terminated strings.
* [misc/shellord.c] [files/profile.c] [graphics/driver.c]
[loader/module.c] [msdos/int21.c] [windows/driver.c] [files/drive.c]
Changed lstrcmpi32A -> strcasecmp. Should be OK in these places.
Sat Jun 20 23:40:00 1998 Bertho Stultiens <bertho@akhphd.au.dk>
* [tools/wrc/]
Wrc version 1.0.2 (20-Jun-1998). Please revert to
the file tools/wrc/CHANGES for details.
Sat Jun 20 14:58:00 1998 Marcel Baur <mbaur@g26.ethz.ch>
* [ole/ole2nls.c] [ole/nls/*]
Added the first 57 nls files, most are not yet complete.
Wed Jun 17 11:16:54 1998 David Luyer <luyer@ucs.uwa.edu.au>
* [relay32/relay386.c] [if1632/relay.c]
Move debug_relay_(include|exclude)_list handling into
seperate function RELAY_ShowDebugmsgsRelay(). Include
checking of this for 16 bit calls (originally only
32-bit calls).
* [relay32/snoop.c] [misc/main.c]
Add debug_snoop_(include|exclude)_list as per the relay stuff.
Fix typo and add information on -debugmsg +/-relay=... in
help on -debugmsg. Refer to availability of snoop too.
Tue Jun 10 22:00:18 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [controls/header.c][include/header.h][include/commctrl.h]
Added owner draw support.
* [windows/nonclient.c][windows/sysmetics.c]
Fixed menu bar height for Win95 look.
Split NC_AdjustRect95() into NC_AdjustRectOuter95() and
NC_AdjustRectInner95 to fix a menu bar bug.
Improved Win95 look.
* [controls/progress.c]
Improved drawing code. Borders will be drawn by non-client code.
* [controls/updown.c]
Changed memory allocation and fixed some bugs.
* [controls/toolbar.c]
Fixed TB_BUTTONSTRUCTSIZE bug in MFC programs.
Several improvements.
* [misc/shell.c]
Added stub for BrowseForFoldersA().
* [misc/shellord.c]
Added stub for SHELL32_147().
* [controls/comctl32undoc.c]
Minor changes.
* [documentation/common_controls]
New File: Documentation about development status, undocumented
features and functions of the common controls.
1998-06-28 20:40:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-14 21:31:36 +02:00
|
|
|
/***********************************************************************
|
2002-09-17 20:54:42 +02:00
|
|
|
* VirtualProtect (KERNEL32.@)
|
2006-01-16 20:42:09 +01:00
|
|
|
*
|
|
|
|
* Changes the access protection on a region of committed pages.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* addr [I] Address of region of committed pages.
|
|
|
|
* size [I] Size of region.
|
|
|
|
* new_prot [I] Desired access protection.
|
|
|
|
* old_prot [O] Address of variable to get old protection.
|
1998-03-15 21:29:56 +01:00
|
|
|
*
|
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: TRUE.
|
|
|
|
* Failure: FALSE.
|
2002-09-17 20:54:42 +02:00
|
|
|
*/
|
2006-01-16 20:42:09 +01:00
|
|
|
BOOL WINAPI VirtualProtect( LPVOID addr, SIZE_T size, DWORD new_prot, LPDWORD old_prot)
|
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
return VirtualProtectEx( GetCurrentProcess(), addr, size, new_prot, old_prot );
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2002-09-17 20:54:42 +02:00
|
|
|
* VirtualProtectEx (KERNEL32.@)
|
2006-01-16 20:42:09 +01:00
|
|
|
*
|
2002-09-17 20:54:42 +02:00
|
|
|
* Changes the access protection on a region of committed pages in the
|
2006-01-16 20:42:09 +01:00
|
|
|
* virtual address space of a specified process.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* process [I] Handle of process.
|
|
|
|
* addr [I] Address of region of committed pages.
|
|
|
|
* size [I] Size of region.
|
|
|
|
* new_prot [I] Desired access protection.
|
|
|
|
* old_prot [O] Address of variable to get old protection.
|
1998-03-29 21:44:57 +02:00
|
|
|
*
|
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: TRUE.
|
|
|
|
* Failure: FALSE.
|
1997-03-05 09:22:35 +01:00
|
|
|
*/
|
2006-01-16 20:42:09 +01:00
|
|
|
BOOL WINAPI VirtualProtectEx( HANDLE process, LPVOID addr, SIZE_T size,
|
|
|
|
DWORD new_prot, LPDWORD old_prot )
|
2000-05-01 23:23:02 +02:00
|
|
|
{
|
2016-02-16 06:53:14 +01:00
|
|
|
NTSTATUS status;
|
|
|
|
DWORD prot;
|
|
|
|
|
2016-05-29 12:42:15 +02:00
|
|
|
/* Win9x allows passing NULL as old_prot while this fails on NT */
|
2016-02-16 06:53:14 +01:00
|
|
|
if (!old_prot && (GetVersion() & 0x80000000)) old_prot = &prot;
|
|
|
|
|
|
|
|
status = NtProtectVirtualMemory( process, &addr, &size, new_prot, old_prot );
|
2002-09-17 20:54:42 +02:00
|
|
|
if (status) SetLastError( RtlNtStatusToDosError(status) );
|
|
|
|
return !status;
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2002-09-17 20:54:42 +02:00
|
|
|
* VirtualQuery (KERNEL32.@)
|
2006-01-16 20:42:09 +01:00
|
|
|
*
|
|
|
|
* Provides info about a range of pages in virtual address space.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* addr [I] Address of region.
|
|
|
|
* info [O] Address of info buffer.
|
|
|
|
* len [I] Size of buffer.
|
1998-03-15 21:29:56 +01:00
|
|
|
*
|
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Number of bytes returned in information buffer or 0 if
|
|
|
|
* addr >= 0xc0000000 (kernel space).
|
1997-03-05 09:22:35 +01:00
|
|
|
*/
|
2006-01-16 20:42:09 +01:00
|
|
|
SIZE_T WINAPI VirtualQuery( LPCVOID addr, PMEMORY_BASIC_INFORMATION info,
|
|
|
|
SIZE_T len )
|
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
return VirtualQueryEx( GetCurrentProcess(), addr, info, len );
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2002-09-17 20:54:42 +02:00
|
|
|
* VirtualQueryEx (KERNEL32.@)
|
2006-01-16 20:42:09 +01:00
|
|
|
*
|
2002-09-17 20:54:42 +02:00
|
|
|
* Provides info about a range of pages in virtual address space of a
|
2006-01-16 20:42:09 +01:00
|
|
|
* specified process.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* process [I] Handle to process.
|
|
|
|
* addr [I] Address of region.
|
|
|
|
* info [O] Address of info buffer.
|
|
|
|
* len [I] Size of buffer.
|
2002-09-17 20:54:42 +02:00
|
|
|
*
|
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Number of bytes returned in information buffer.
|
1997-03-05 09:22:35 +01:00
|
|
|
*/
|
2006-01-16 20:42:09 +01:00
|
|
|
SIZE_T WINAPI VirtualQueryEx( HANDLE process, LPCVOID addr,
|
|
|
|
PMEMORY_BASIC_INFORMATION info, SIZE_T len )
|
1998-03-29 21:44:57 +02:00
|
|
|
{
|
2005-07-15 12:01:30 +02:00
|
|
|
SIZE_T ret;
|
2002-09-17 20:54:42 +02:00
|
|
|
NTSTATUS status;
|
|
|
|
|
|
|
|
if ((status = NtQueryVirtualMemory( process, addr, MemoryBasicInformation, info, len, &ret )))
|
1997-03-05 09:22:35 +01:00
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
SetLastError( RtlNtStatusToDosError(status) );
|
|
|
|
ret = 0;
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|
2002-09-17 20:54:42 +02:00
|
|
|
return ret;
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* CreateFileMappingA (KERNEL32.@)
|
2006-01-16 20:42:09 +01:00
|
|
|
*
|
|
|
|
* Creates a named or unnamed file-mapping object for the specified file.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hFile [I] Handle to the file to map.
|
|
|
|
* sa [I] Optional security attributes.
|
|
|
|
* protect [I] Protection for mapping object.
|
|
|
|
* size_high [I] High-order 32 bits of object size.
|
|
|
|
* size_low [I] Low-order 32 bits of object size.
|
|
|
|
* name [I] Name of file-mapping object.
|
1998-03-15 21:29:56 +01:00
|
|
|
*
|
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: Handle.
|
|
|
|
* Failure: NULL. Mapping object does not exist.
|
1997-03-05 09:22:35 +01:00
|
|
|
*/
|
2006-01-16 20:42:09 +01:00
|
|
|
HANDLE WINAPI CreateFileMappingA( HANDLE hFile, SECURITY_ATTRIBUTES *sa,
|
|
|
|
DWORD protect, DWORD size_high, DWORD size_low, LPCSTR name )
|
1998-04-13 14:21:30 +02:00
|
|
|
{
|
2001-11-30 19:46:42 +01:00
|
|
|
WCHAR buffer[MAX_PATH];
|
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
|
|
|
|
2001-11-30 19:46:42 +01:00
|
|
|
if (!name) return CreateFileMappingW( hFile, sa, protect, size_high, size_low, 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
|
|
|
|
2001-11-30 19:46:42 +01:00
|
|
|
if (!MultiByteToWideChar( CP_ACP, 0, name, -1, buffer, MAX_PATH ))
|
2000-08-30 02:00:48 +02:00
|
|
|
{
|
|
|
|
SetLastError( ERROR_FILENAME_EXCED_RANGE );
|
|
|
|
return 0;
|
|
|
|
}
|
2001-11-30 19:46:42 +01:00
|
|
|
return CreateFileMappingW( hFile, sa, protect, size_high, size_low, buffer );
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* CreateFileMappingW (KERNEL32.@)
|
2006-01-16 20:42:09 +01:00
|
|
|
*
|
2005-11-08 12:01:03 +01:00
|
|
|
* See CreateFileMappingA.
|
1997-03-05 09:22:35 +01:00
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
HANDLE WINAPI CreateFileMappingW( HANDLE hFile, LPSECURITY_ATTRIBUTES sa,
|
|
|
|
DWORD protect, DWORD size_high,
|
1999-11-25 22:30:24 +01:00
|
|
|
DWORD size_low, LPCWSTR name )
|
1997-03-05 09:22:35 +01:00
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
static const int sec_flags = SEC_FILE | SEC_IMAGE | SEC_RESERVE | SEC_COMMIT | SEC_NOCACHE;
|
|
|
|
|
2000-08-30 02:00:48 +02:00
|
|
|
HANDLE ret;
|
2002-09-17 20:54:42 +02:00
|
|
|
NTSTATUS status;
|
|
|
|
DWORD access, sec_type;
|
|
|
|
LARGE_INTEGER size;
|
|
|
|
|
|
|
|
sec_type = protect & sec_flags;
|
|
|
|
protect &= ~sec_flags;
|
|
|
|
if (!sec_type) sec_type = SEC_COMMIT;
|
1999-11-25 22:30:24 +01:00
|
|
|
|
2011-11-29 06:54:15 +01:00
|
|
|
/* Win9x compatibility */
|
|
|
|
if (!protect && (GetVersion() & 0x80000000)) protect = PAGE_READONLY;
|
|
|
|
|
2002-09-17 20:54:42 +02:00
|
|
|
switch(protect)
|
2000-08-30 02:00:48 +02:00
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
case PAGE_READONLY:
|
|
|
|
case PAGE_WRITECOPY:
|
2014-02-07 04:44:10 +01:00
|
|
|
access = STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ;
|
2002-09-17 20:54:42 +02:00
|
|
|
break;
|
|
|
|
case PAGE_READWRITE:
|
2014-02-07 04:44:10 +01:00
|
|
|
access = STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ | SECTION_MAP_WRITE;
|
2002-09-17 20:54:42 +02:00
|
|
|
break;
|
2008-06-09 19:11:25 +02:00
|
|
|
case PAGE_EXECUTE_READ:
|
|
|
|
case PAGE_EXECUTE_WRITECOPY:
|
2014-02-07 04:44:10 +01:00
|
|
|
access = STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ | SECTION_MAP_EXECUTE;
|
2008-06-09 19:11:25 +02:00
|
|
|
break;
|
|
|
|
case PAGE_EXECUTE_READWRITE:
|
2014-02-07 04:44:10 +01:00
|
|
|
access = STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ | SECTION_MAP_WRITE | SECTION_MAP_EXECUTE;
|
2008-06-09 19:11:25 +02:00
|
|
|
break;
|
2002-09-17 20:54:42 +02:00
|
|
|
default:
|
|
|
|
SetLastError( ERROR_INVALID_PARAMETER );
|
2000-08-30 02:00:48 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2002-09-17 20:54:42 +02:00
|
|
|
if (hFile == INVALID_HANDLE_VALUE)
|
1999-11-25 22:30:24 +01:00
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
hFile = 0;
|
|
|
|
if (!size_low && !size_high)
|
1999-11-25 22:30:24 +01:00
|
|
|
{
|
|
|
|
SetLastError( ERROR_INVALID_PARAMETER );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-01-23 02:51:33 +01:00
|
|
|
size.u.LowPart = size_low;
|
|
|
|
size.u.HighPart = size_high;
|
1999-11-25 22:30:24 +01:00
|
|
|
|
2008-09-14 19:02:25 +02:00
|
|
|
if (sa || name)
|
|
|
|
{
|
|
|
|
OBJECT_ATTRIBUTES attr;
|
|
|
|
UNICODE_STRING nameW;
|
|
|
|
|
|
|
|
attr.Length = sizeof(attr);
|
|
|
|
attr.RootDirectory = 0;
|
|
|
|
attr.ObjectName = NULL;
|
|
|
|
attr.Attributes = OBJ_OPENIF | ((sa && sa->bInheritHandle) ? OBJ_INHERIT : 0);
|
|
|
|
attr.SecurityDescriptor = sa ? sa->lpSecurityDescriptor : NULL;
|
|
|
|
attr.SecurityQualityOfService = NULL;
|
|
|
|
if (name)
|
|
|
|
{
|
|
|
|
RtlInitUnicodeString( &nameW, name );
|
|
|
|
attr.ObjectName = &nameW;
|
|
|
|
attr.RootDirectory = get_BaseNamedObjects_handle();
|
|
|
|
}
|
|
|
|
status = NtCreateSection( &ret, access, &attr, &size, protect, sec_type, hFile );
|
|
|
|
}
|
|
|
|
else status = NtCreateSection( &ret, access, NULL, &size, protect, sec_type, hFile );
|
|
|
|
|
2005-11-21 17:26:34 +01:00
|
|
|
if (status == STATUS_OBJECT_NAME_EXISTS)
|
|
|
|
SetLastError( ERROR_ALREADY_EXISTS );
|
|
|
|
else
|
|
|
|
SetLastError( RtlNtStatusToDosError(status) );
|
2000-08-30 02:00:48 +02:00
|
|
|
return ret;
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* OpenFileMappingA (KERNEL32.@)
|
2006-01-16 20:42:09 +01:00
|
|
|
*
|
1998-03-29 21:44:57 +02:00
|
|
|
* Opens a named file-mapping object.
|
1998-03-15 21:29:56 +01:00
|
|
|
*
|
2006-01-16 20:42:09 +01:00
|
|
|
* PARAMS
|
|
|
|
* access [I] Access mode.
|
|
|
|
* inherit [I] Inherit flag.
|
|
|
|
* name [I] Name of file-mapping object.
|
|
|
|
*
|
1998-03-15 21:29:56 +01:00
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: Handle.
|
|
|
|
* Failure: NULL.
|
1997-03-05 09:22:35 +01:00
|
|
|
*/
|
2006-01-16 20:42:09 +01:00
|
|
|
HANDLE WINAPI OpenFileMappingA( DWORD access, BOOL inherit, LPCSTR name )
|
1999-01-01 18:01:18 +01:00
|
|
|
{
|
2001-11-30 19:46:42 +01:00
|
|
|
WCHAR buffer[MAX_PATH];
|
|
|
|
|
|
|
|
if (!name) return OpenFileMappingW( access, inherit, NULL );
|
|
|
|
|
|
|
|
if (!MultiByteToWideChar( CP_ACP, 0, name, -1, buffer, MAX_PATH ))
|
2000-08-30 02:00:48 +02:00
|
|
|
{
|
|
|
|
SetLastError( ERROR_FILENAME_EXCED_RANGE );
|
|
|
|
return 0;
|
|
|
|
}
|
2001-11-30 19:46:42 +01:00
|
|
|
return OpenFileMappingW( access, inherit, buffer );
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* OpenFileMappingW (KERNEL32.@)
|
2006-01-16 20:42:09 +01:00
|
|
|
*
|
2005-11-08 12:01:03 +01:00
|
|
|
* See OpenFileMappingA.
|
1997-03-05 09:22:35 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
HANDLE WINAPI OpenFileMappingW( DWORD access, BOOL inherit, LPCWSTR name)
|
1997-03-05 09:22:35 +01:00
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
OBJECT_ATTRIBUTES attr;
|
|
|
|
UNICODE_STRING nameW;
|
2000-08-30 02:00:48 +02:00
|
|
|
HANDLE ret;
|
2002-09-17 20:54:42 +02:00
|
|
|
NTSTATUS status;
|
|
|
|
|
|
|
|
if (!name)
|
2000-08-30 02:00:48 +02:00
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
SetLastError( ERROR_INVALID_PARAMETER );
|
2000-08-30 02:00:48 +02:00
|
|
|
return 0;
|
|
|
|
}
|
2002-09-17 20:54:42 +02:00
|
|
|
attr.Length = sizeof(attr);
|
2005-12-02 16:13:13 +01:00
|
|
|
attr.RootDirectory = get_BaseNamedObjects_handle();
|
2002-09-17 20:54:42 +02:00
|
|
|
attr.ObjectName = &nameW;
|
2008-05-21 20:45:11 +02:00
|
|
|
attr.Attributes = inherit ? OBJ_INHERIT : 0;
|
2002-09-17 20:54:42 +02:00
|
|
|
attr.SecurityDescriptor = NULL;
|
|
|
|
attr.SecurityQualityOfService = NULL;
|
|
|
|
RtlInitUnicodeString( &nameW, name );
|
|
|
|
|
2008-11-13 11:49:17 +01:00
|
|
|
if (access == FILE_MAP_COPY) access = SECTION_MAP_READ;
|
2008-11-05 20:32:32 +01:00
|
|
|
|
|
|
|
if (GetVersion() & 0x80000000)
|
|
|
|
{
|
|
|
|
/* win9x doesn't do access checks, so try with full access first */
|
|
|
|
if (!NtOpenSection( &ret, access | SECTION_MAP_READ | SECTION_MAP_WRITE, &attr )) return ret;
|
|
|
|
}
|
2002-09-17 20:54:42 +02:00
|
|
|
|
|
|
|
if ((status = NtOpenSection( &ret, access, &attr )))
|
2000-08-30 02:00:48 +02:00
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
SetLastError( RtlNtStatusToDosError(status) );
|
|
|
|
ret = 0;
|
2000-08-30 02:00:48 +02:00
|
|
|
}
|
|
|
|
return ret;
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* MapViewOfFile (KERNEL32.@)
|
2006-01-16 20:42:09 +01:00
|
|
|
*
|
|
|
|
* Maps a view of a file into the address space.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* mapping [I] File-mapping object to map.
|
|
|
|
* access [I] Access mode.
|
|
|
|
* offset_high [I] High-order 32 bits of file offset.
|
|
|
|
* offset_low [I] Low-order 32 bits of file offset.
|
|
|
|
* count [I] Number of bytes to map.
|
1998-03-15 21:29:56 +01:00
|
|
|
*
|
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: Starting address of mapped view.
|
|
|
|
* Failure: NULL.
|
1997-03-05 09:22:35 +01:00
|
|
|
*/
|
2016-07-18 13:20:45 +02:00
|
|
|
LPVOID WINAPI DECLSPEC_HOTPATCH MapViewOfFile( HANDLE mapping, DWORD access,
|
2006-01-16 20:42:09 +01:00
|
|
|
DWORD offset_high, DWORD offset_low, SIZE_T count )
|
|
|
|
{
|
1997-03-05 09:22:35 +01:00
|
|
|
return MapViewOfFileEx( mapping, access, offset_high,
|
|
|
|
offset_low, count, NULL );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* MapViewOfFileEx (KERNEL32.@)
|
2006-01-16 20:42:09 +01:00
|
|
|
*
|
|
|
|
* Maps a view of a file into the address space.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* handle [I] File-mapping object to map.
|
|
|
|
* access [I] Access mode.
|
|
|
|
* offset_high [I] High-order 32 bits of file offset.
|
|
|
|
* offset_low [I] Low-order 32 bits of file offset.
|
|
|
|
* count [I] Number of bytes to map.
|
|
|
|
* addr [I] Suggested starting address for mapped view.
|
1998-03-15 21:29:56 +01:00
|
|
|
*
|
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: Starting address of mapped view.
|
|
|
|
* Failure: NULL.
|
1997-03-05 09:22:35 +01:00
|
|
|
*/
|
2006-01-16 20:42:09 +01:00
|
|
|
LPVOID WINAPI MapViewOfFileEx( HANDLE handle, DWORD access,
|
|
|
|
DWORD offset_high, DWORD offset_low, SIZE_T count, LPVOID addr )
|
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
NTSTATUS status;
|
|
|
|
LARGE_INTEGER offset;
|
|
|
|
ULONG protect;
|
2012-01-17 06:43:36 +01:00
|
|
|
BOOL exec;
|
2002-09-17 20:54:42 +02:00
|
|
|
|
2004-01-23 02:51:33 +01:00
|
|
|
offset.u.LowPart = offset_low;
|
|
|
|
offset.u.HighPart = offset_high;
|
2002-09-17 20:54:42 +02:00
|
|
|
|
2012-01-17 06:43:36 +01:00
|
|
|
exec = access & FILE_MAP_EXECUTE;
|
|
|
|
access &= ~FILE_MAP_EXECUTE;
|
1997-03-05 09:22:35 +01:00
|
|
|
|
2012-01-17 06:43:36 +01:00
|
|
|
if (access == FILE_MAP_COPY)
|
|
|
|
protect = exec ? PAGE_EXECUTE_WRITECOPY : PAGE_WRITECOPY;
|
|
|
|
else if (access & FILE_MAP_WRITE)
|
|
|
|
protect = exec ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
|
|
|
|
else if (access & FILE_MAP_READ)
|
|
|
|
protect = exec ? PAGE_EXECUTE_READ : PAGE_READONLY;
|
|
|
|
else protect = PAGE_NOACCESS;
|
2008-11-10 11:09:40 +01:00
|
|
|
|
2002-09-17 20:54:42 +02:00
|
|
|
if ((status = NtMapViewOfSection( handle, GetCurrentProcess(), &addr, 0, 0, &offset,
|
2010-03-03 20:04:55 +01:00
|
|
|
&count, ViewShare, 0, protect )) < 0)
|
2000-12-22 03:04:15 +01:00
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
SetLastError( RtlNtStatusToDosError(status) );
|
|
|
|
addr = NULL;
|
2000-12-22 03:04:15 +01:00
|
|
|
}
|
2002-09-17 20:54:42 +02:00
|
|
|
return addr;
|
|
|
|
}
|
2000-08-14 22:20:01 +02:00
|
|
|
|
2000-12-22 03:04:15 +01:00
|
|
|
|
2002-09-17 20:54:42 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* UnmapViewOfFile (KERNEL32.@)
|
2006-01-16 20:42:09 +01:00
|
|
|
*
|
2002-09-17 20:54:42 +02:00
|
|
|
* Unmaps a mapped view of a file.
|
|
|
|
*
|
2006-01-16 20:42:09 +01:00
|
|
|
* PARAMS
|
|
|
|
* addr [I] Address where mapped view begins.
|
2002-09-17 20:54:42 +02:00
|
|
|
*
|
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: TRUE.
|
|
|
|
* Failure: FALSE.
|
|
|
|
*
|
2002-09-17 20:54:42 +02:00
|
|
|
*/
|
2006-09-06 18:35:44 +02:00
|
|
|
BOOL WINAPI UnmapViewOfFile( LPCVOID addr )
|
2002-09-17 20:54:42 +02:00
|
|
|
{
|
2016-07-19 13:00:30 +02:00
|
|
|
NTSTATUS status;
|
|
|
|
|
|
|
|
if (GetVersion() & 0x80000000)
|
|
|
|
{
|
|
|
|
MEMORY_BASIC_INFORMATION info;
|
|
|
|
if (!VirtualQuery( addr, &info, sizeof(info) ) || info.AllocationBase != addr)
|
|
|
|
{
|
|
|
|
SetLastError( ERROR_INVALID_ADDRESS );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
status = NtUnmapViewOfSection( GetCurrentProcess(), (void *)addr );
|
2002-09-17 20:54:42 +02:00
|
|
|
if (status) SetLastError( RtlNtStatusToDosError(status) );
|
|
|
|
return !status;
|
|
|
|
}
|
1999-01-01 18:01:18 +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
|
|
|
|
2002-09-17 20:54:42 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* FlushViewOfFile (KERNEL32.@)
|
2006-01-16 20:42:09 +01:00
|
|
|
*
|
|
|
|
* Writes to the disk a byte range within a mapped view of a file.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* base [I] Start address of byte range to flush.
|
|
|
|
* size [I] Number of bytes in range.
|
2002-09-17 20:54:42 +02:00
|
|
|
*
|
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: TRUE.
|
|
|
|
* Failure: FALSE.
|
2002-09-17 20:54:42 +02:00
|
|
|
*/
|
2006-01-16 20:42:09 +01:00
|
|
|
BOOL WINAPI FlushViewOfFile( LPCVOID base, SIZE_T size )
|
2002-09-17 20:54:42 +02:00
|
|
|
{
|
|
|
|
NTSTATUS status = NtFlushVirtualMemory( GetCurrentProcess(), &base, &size, 0 );
|
|
|
|
if (status)
|
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
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
if (status == STATUS_NOT_MAPPED_DATA) status = STATUS_SUCCESS;
|
|
|
|
else SetLastError( RtlNtStatusToDosError(status) );
|
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
|
|
|
}
|
2002-09-17 20:54:42 +02:00
|
|
|
return !status;
|
|
|
|
}
|
1997-03-05 09:22:35 +01:00
|
|
|
|
2002-09-17 20:54:42 +02:00
|
|
|
|
2008-11-14 10:49:45 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* GetWriteWatch (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
UINT WINAPI GetWriteWatch( DWORD flags, LPVOID base, SIZE_T size, LPVOID *addresses,
|
|
|
|
ULONG_PTR *count, ULONG *granularity )
|
|
|
|
{
|
|
|
|
NTSTATUS status;
|
|
|
|
|
|
|
|
status = NtGetWriteWatch( GetCurrentProcess(), flags, base, size, addresses, count, granularity );
|
|
|
|
if (status) SetLastError( RtlNtStatusToDosError(status) );
|
|
|
|
return status ? ~0u : 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* ResetWriteWatch (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
UINT WINAPI ResetWriteWatch( LPVOID base, SIZE_T size )
|
|
|
|
{
|
|
|
|
NTSTATUS status;
|
|
|
|
|
|
|
|
status = NtResetWriteWatch( GetCurrentProcess(), base, size );
|
|
|
|
if (status) SetLastError( RtlNtStatusToDosError(status) );
|
|
|
|
return status ? ~0u : 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-09-17 20:54:42 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* IsBadReadPtr (KERNEL32.@)
|
|
|
|
*
|
2005-11-08 12:01:03 +01:00
|
|
|
* Check for read access on a memory block.
|
|
|
|
*
|
2006-01-16 20:42:09 +01:00
|
|
|
* ptr [I] Address of memory block.
|
|
|
|
* size [I] Size of block.
|
|
|
|
*
|
2002-09-17 20:54:42 +02:00
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: TRUE.
|
|
|
|
* Failure: FALSE. Process has read access to entire block.
|
2002-09-17 20:54:42 +02:00
|
|
|
*/
|
2016-03-01 09:53:31 +01:00
|
|
|
BOOL WINAPI IsBadReadPtr( LPCVOID ptr, UINT_PTR size )
|
2002-09-17 20:54:42 +02:00
|
|
|
{
|
|
|
|
if (!size) return FALSE; /* handle 0 size case w/o reference */
|
2005-03-25 17:38:50 +01:00
|
|
|
if (!ptr) return TRUE;
|
2002-09-17 20:54:42 +02:00
|
|
|
__TRY
|
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
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
volatile const char *p = ptr;
|
2011-10-28 17:04:33 +02:00
|
|
|
char dummy __attribute__((unused));
|
2016-03-01 09:53:31 +01:00
|
|
|
UINT_PTR count = size;
|
2002-09-17 20:54:42 +02:00
|
|
|
|
2013-01-08 22:02:21 +01:00
|
|
|
while (count > system_info.PageSize)
|
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
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
dummy = *p;
|
2013-01-08 22:02:21 +01:00
|
|
|
p += system_info.PageSize;
|
|
|
|
count -= system_info.PageSize;
|
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
|
|
|
}
|
2002-09-17 20:54:42 +02:00
|
|
|
dummy = p[0];
|
|
|
|
dummy = p[count - 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
|
|
|
}
|
2005-12-16 17:17:57 +01:00
|
|
|
__EXCEPT_PAGE_FAULT
|
2005-03-22 22:16:39 +01:00
|
|
|
{
|
|
|
|
TRACE_(seh)("%p caused page fault during read\n", ptr);
|
|
|
|
return TRUE;
|
|
|
|
}
|
2002-09-17 20:54:42 +02:00
|
|
|
__ENDTRY
|
|
|
|
return FALSE;
|
|
|
|
}
|
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
|
|
|
|
2001-10-09 23:50:44 +02:00
|
|
|
|
2002-09-17 20:54:42 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* IsBadWritePtr (KERNEL32.@)
|
|
|
|
*
|
2005-11-08 12:01:03 +01:00
|
|
|
* Check for write access on a memory block.
|
|
|
|
*
|
2006-01-16 20:42:09 +01:00
|
|
|
* PARAMS
|
|
|
|
* ptr [I] Address of memory block.
|
|
|
|
* size [I] Size of block in bytes.
|
|
|
|
*
|
2002-09-17 20:54:42 +02:00
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: TRUE.
|
|
|
|
* Failure: FALSE. Process has write access to entire block.
|
2002-09-17 20:54:42 +02:00
|
|
|
*/
|
2016-03-01 09:53:31 +01:00
|
|
|
BOOL WINAPI IsBadWritePtr( LPVOID ptr, UINT_PTR size )
|
2002-09-17 20:54:42 +02:00
|
|
|
{
|
|
|
|
if (!size) return FALSE; /* handle 0 size case w/o reference */
|
2005-03-25 17:38:50 +01:00
|
|
|
if (!ptr) return TRUE;
|
2002-09-17 20:54:42 +02:00
|
|
|
__TRY
|
|
|
|
{
|
|
|
|
volatile char *p = ptr;
|
2016-03-01 09:53:31 +01:00
|
|
|
UINT_PTR count = size;
|
2001-10-09 23:50:44 +02:00
|
|
|
|
2013-01-08 22:02:21 +01:00
|
|
|
while (count > system_info.PageSize)
|
2002-09-17 20:54:42 +02:00
|
|
|
{
|
|
|
|
*p |= 0;
|
2013-01-08 22:02:21 +01:00
|
|
|
p += system_info.PageSize;
|
|
|
|
count -= system_info.PageSize;
|
2002-09-17 20:54:42 +02:00
|
|
|
}
|
|
|
|
p[0] |= 0;
|
|
|
|
p[count - 1] |= 0;
|
|
|
|
}
|
2005-12-16 17:17:57 +01:00
|
|
|
__EXCEPT_PAGE_FAULT
|
2005-03-22 22:16:39 +01:00
|
|
|
{
|
|
|
|
TRACE_(seh)("%p caused page fault during write\n", ptr);
|
|
|
|
return TRUE;
|
|
|
|
}
|
2002-09-17 20:54:42 +02:00
|
|
|
__ENDTRY
|
|
|
|
return FALSE;
|
|
|
|
}
|
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
|
|
|
|
|
|
|
|
2002-09-17 20:54:42 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* IsBadHugeReadPtr (KERNEL32.@)
|
2005-11-08 12:01:03 +01:00
|
|
|
*
|
|
|
|
* Check for read access on a memory block.
|
|
|
|
*
|
2006-01-16 20:42:09 +01:00
|
|
|
* PARAMS
|
|
|
|
* ptr [I] Address of memory block.
|
|
|
|
* size [I] Size of block.
|
|
|
|
*
|
2002-09-17 20:54:42 +02:00
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: TRUE.
|
|
|
|
* Failure: FALSE. Process has read access to entire block.
|
2002-09-17 20:54:42 +02:00
|
|
|
*/
|
2016-03-01 09:53:31 +01:00
|
|
|
BOOL WINAPI IsBadHugeReadPtr( LPCVOID ptr, UINT_PTR size )
|
2006-01-16 20:42:09 +01:00
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
return IsBadReadPtr( 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
|
|
|
|
|
|
|
|
2002-09-17 20:54:42 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* IsBadHugeWritePtr (KERNEL32.@)
|
2005-11-08 12:01:03 +01:00
|
|
|
*
|
|
|
|
* Check for write access on a memory block.
|
|
|
|
*
|
2006-01-16 20:42:09 +01:00
|
|
|
* PARAMS
|
|
|
|
* ptr [I] Address of memory block.
|
|
|
|
* size [I] Size of block.
|
|
|
|
*
|
2002-09-17 20:54:42 +02:00
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: TRUE.
|
|
|
|
* Failure: FALSE. Process has write access to entire block.
|
2002-09-17 20:54:42 +02:00
|
|
|
*/
|
2016-03-01 09:53:31 +01:00
|
|
|
BOOL WINAPI IsBadHugeWritePtr( LPVOID ptr, UINT_PTR size )
|
2006-01-16 20:42:09 +01:00
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
return IsBadWritePtr( ptr, size );
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1997-11-30 18:45:40 +01:00
|
|
|
/***********************************************************************
|
2002-09-17 20:54:42 +02:00
|
|
|
* IsBadCodePtr (KERNEL32.@)
|
1998-03-15 21:29:56 +01:00
|
|
|
*
|
2005-11-08 12:01:03 +01:00
|
|
|
* Check for read access on a memory address.
|
|
|
|
*
|
2006-01-16 20:42:09 +01:00
|
|
|
* PARAMS
|
|
|
|
* ptr [I] Address of function.
|
|
|
|
*
|
1998-03-15 21:29:56 +01:00
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: TRUE.
|
|
|
|
* Failure: FALSE. Process has read access to specified memory.
|
1997-11-30 18:45:40 +01:00
|
|
|
*/
|
2006-01-16 20:42:09 +01:00
|
|
|
BOOL WINAPI IsBadCodePtr( FARPROC ptr )
|
2002-09-17 20:54:42 +02:00
|
|
|
{
|
|
|
|
return IsBadReadPtr( ptr, 1 );
|
|
|
|
}
|
1997-11-30 18:45:40 +01:00
|
|
|
|
|
|
|
|
2002-09-17 20:54:42 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* IsBadStringPtrA (KERNEL32.@)
|
|
|
|
*
|
2005-11-08 12:01:03 +01:00
|
|
|
* Check for read access on a range of memory pointed to by a string pointer.
|
|
|
|
*
|
2006-01-16 20:42:09 +01:00
|
|
|
* PARAMS
|
|
|
|
* str [I] Address of string.
|
|
|
|
* max [I] Maximum size of string.
|
|
|
|
*
|
2002-09-17 20:54:42 +02:00
|
|
|
* RETURNS
|
2006-01-16 20:42:09 +01:00
|
|
|
* Success: TRUE.
|
|
|
|
* Failure: FALSE. Read access to all bytes in string.
|
2002-09-17 20:54:42 +02:00
|
|
|
*/
|
2016-03-01 09:53:31 +01:00
|
|
|
BOOL WINAPI IsBadStringPtrA( LPCSTR str, UINT_PTR max )
|
2002-09-17 20:54:42 +02:00
|
|
|
{
|
2005-03-25 17:38:50 +01:00
|
|
|
if (!str) return TRUE;
|
|
|
|
|
2002-09-17 20:54:42 +02:00
|
|
|
__TRY
|
1997-11-30 18:45:40 +01:00
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
volatile const char *p = str;
|
|
|
|
while (p != str + max) if (!*p++) break;
|
1997-11-30 18:45:40 +01:00
|
|
|
}
|
2005-12-16 17:17:57 +01:00
|
|
|
__EXCEPT_PAGE_FAULT
|
2005-03-22 22:16:39 +01:00
|
|
|
{
|
|
|
|
TRACE_(seh)("%p caused page fault during read\n", str);
|
|
|
|
return TRUE;
|
|
|
|
}
|
2002-09-17 20:54:42 +02:00
|
|
|
__ENDTRY
|
1997-11-30 18:45:40 +01:00
|
|
|
return FALSE;
|
|
|
|
}
|
1998-03-15 21:29:56 +01:00
|
|
|
|
1998-03-29 21:44:57 +02:00
|
|
|
|
1997-03-05 09:22:35 +01:00
|
|
|
/***********************************************************************
|
2002-09-17 20:54:42 +02:00
|
|
|
* IsBadStringPtrW (KERNEL32.@)
|
2006-01-16 20:42:09 +01:00
|
|
|
*
|
2005-11-08 12:01:03 +01:00
|
|
|
* See IsBadStringPtrA.
|
1997-03-05 09:22:35 +01:00
|
|
|
*/
|
2016-03-01 09:53:31 +01:00
|
|
|
BOOL WINAPI IsBadStringPtrW( LPCWSTR str, UINT_PTR max )
|
2002-09-17 20:54:42 +02:00
|
|
|
{
|
2005-03-25 17:38:50 +01:00
|
|
|
if (!str) return TRUE;
|
|
|
|
|
2002-09-17 20:54:42 +02:00
|
|
|
__TRY
|
1997-03-05 09:22:35 +01:00
|
|
|
{
|
2002-09-17 20:54:42 +02:00
|
|
|
volatile const WCHAR *p = str;
|
|
|
|
while (p != str + max) if (!*p++) break;
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|
2005-12-16 17:17:57 +01:00
|
|
|
__EXCEPT_PAGE_FAULT
|
2005-03-22 22:16:39 +01:00
|
|
|
{
|
|
|
|
TRACE_(seh)("%p caused page fault during read\n", str);
|
|
|
|
return TRUE;
|
|
|
|
}
|
2002-09-17 20:54:42 +02:00
|
|
|
__ENDTRY
|
|
|
|
return FALSE;
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|
2011-05-13 11:05:11 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* K32GetMappedFileNameA (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
DWORD WINAPI K32GetMappedFileNameA(HANDLE process, LPVOID lpv, LPSTR file_name, DWORD size)
|
|
|
|
{
|
|
|
|
FIXME_(file)("(%p, %p, %p, %d): stub\n", process, lpv, file_name, size);
|
|
|
|
|
|
|
|
if (file_name && size)
|
|
|
|
file_name[0] = '\0';
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* K32GetMappedFileNameW (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
DWORD WINAPI K32GetMappedFileNameW(HANDLE process, LPVOID lpv, LPWSTR file_name, DWORD size)
|
|
|
|
{
|
|
|
|
FIXME_(file)("(%p, %p, %p, %d): stub\n", process, lpv, file_name, size);
|
|
|
|
|
|
|
|
if (file_name && size)
|
|
|
|
file_name[0] = '\0';
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2011-05-16 15:19:18 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* K32EnumPageFilesA (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI K32EnumPageFilesA( PENUM_PAGE_FILE_CALLBACKA callback, LPVOID context )
|
|
|
|
{
|
|
|
|
FIXME_(file)("(%p, %p) stub\n", callback, context );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* K32EnumPageFilesW (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI K32EnumPageFilesW( PENUM_PAGE_FILE_CALLBACKW callback, LPVOID context )
|
|
|
|
{
|
|
|
|
FIXME_(file)("(%p, %p) stub\n", callback, context );
|
|
|
|
return FALSE;
|
|
|
|
}
|
2011-05-16 15:19:29 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* K32GetWsChanges (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI K32GetWsChanges(HANDLE process, PPSAPI_WS_WATCH_INFORMATION watchinfo, DWORD size)
|
|
|
|
{
|
|
|
|
NTSTATUS status;
|
|
|
|
|
|
|
|
TRACE_(seh)("(%p, %p, %d)\n", process, watchinfo, size);
|
|
|
|
|
|
|
|
status = NtQueryInformationProcess( process, ProcessWorkingSetWatch, watchinfo, size, NULL );
|
|
|
|
|
|
|
|
if (status)
|
|
|
|
{
|
|
|
|
SetLastError( RtlNtStatusToDosError( status ) );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* K32InitializeProcessForWsWatch (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI K32InitializeProcessForWsWatch(HANDLE process)
|
|
|
|
{
|
|
|
|
FIXME_(seh)("(process=%p): stub\n", process);
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|