Alexandre Julliard : kernel32: Added GetWriteWatch and ResetWriteWatch.
Alexandre Julliard
julliard at winehq.org
Fri Nov 14 07:54:47 CST 2008
Module: wine
Branch: master
Commit: 23be27ef8067e97fdf5442de0a0732175bc7e15d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=23be27ef8067e97fdf5442de0a0732175bc7e15d
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Nov 14 10:49:45 2008 +0100
kernel32: Added GetWriteWatch and ResetWriteWatch.
---
dlls/kernel32/kernel32.spec | 4 ++--
dlls/kernel32/virtual.c | 27 +++++++++++++++++++++++++++
include/winbase.h | 2 ++
3 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 0f601d8..808635d 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -671,7 +671,7 @@
# @ stub GetVolumePathNamesForVolumeNameW
@ stdcall GetWindowsDirectoryA(ptr long)
@ stdcall GetWindowsDirectoryW(ptr long)
-@ stub GetWriteWatch
+@ stdcall GetWriteWatch(long ptr long ptr ptr ptr)
@ stdcall GlobalAddAtomA(str)
@ stdcall GlobalAddAtomW(wstr)
@ stdcall GlobalAlloc(long long)
@@ -917,7 +917,7 @@
@ stub RequestDeviceWakeup
@ stdcall RequestWakeupLatency(long)
@ stdcall ResetEvent(long)
-@ stub ResetWriteWatch
+@ stdcall ResetWriteWatch(ptr long)
@ stdcall RestoreLastError(long) ntdll.RtlRestoreLastWin32Error
@ stdcall ResumeThread(long)
# @ stub RtlCaptureContext ( -> ntdll.RtlCaptureContext)
diff --git a/dlls/kernel32/virtual.c b/dlls/kernel32/virtual.c
index 6a12885..56c7228 100644
--- a/dlls/kernel32/virtual.c
+++ b/dlls/kernel32/virtual.c
@@ -602,6 +602,33 @@ BOOL WINAPI FlushViewOfFile( LPCVOID base, SIZE_T size )
/***********************************************************************
+ * 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;
+}
+
+
+/***********************************************************************
* IsBadReadPtr (KERNEL32.@)
*
* Check for read access on a memory block.
diff --git a/include/winbase.h b/include/winbase.h
index a7733b0..714a670 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -1759,6 +1759,7 @@ WINBASEAPI BOOL WINAPI GetVolumePathNamesForVolumeNameW(LPCWSTR,LPWSTR,DW
WINBASEAPI UINT WINAPI GetWindowsDirectoryA(LPSTR,UINT);
WINBASEAPI UINT WINAPI GetWindowsDirectoryW(LPWSTR,UINT);
#define GetWindowsDirectory WINELIB_NAME_AW(GetWindowsDirectory)
+WINBASEAPI UINT WINAPI GetWriteWatch(DWORD,LPVOID,SIZE_T,LPVOID*,ULONG_PTR*,ULONG*);
WINBASEAPI ATOM WINAPI GlobalAddAtomA(LPCSTR);
WINBASEAPI ATOM WINAPI GlobalAddAtomW(LPCWSTR);
#define GlobalAddAtom WINELIB_NAME_AW(GlobalAddAtom)
@@ -1989,6 +1990,7 @@ WINADVAPI BOOL WINAPI ReportEventW(HANDLE,WORD,WORD,DWORD,PSID,WORD,DWOR
WINBASEAPI BOOL WINAPI RequestWakeupLatency(LATENCY_TIME latency);
#define ReportEvent WINELIB_NAME_AW(ReportEvent)
WINBASEAPI BOOL WINAPI ResetEvent(HANDLE);
+WINBASEAPI UINT WINAPI ResetWriteWatch(LPVOID,SIZE_T);
WINBASEAPI DWORD WINAPI ResumeThread(HANDLE);
WINADVAPI BOOL WINAPI RevertToSelf(void);
WINBASEAPI DWORD WINAPI SearchPathA(LPCSTR,LPCSTR,LPCSTR,DWORD,LPSTR,LPSTR*);
More information about the wine-cvs
mailing list