Robert Shearman : ntdll: NtAllocateVirtual with type of MEM_WRITE_WATCH fails with STATUS_NOT_SUPPORTED on Win2000 instead of STATUS_INVALID_PARAMETER .

Alexandre Julliard julliard at wine.codeweavers.com
Thu Sep 28 05:26:48 CDT 2006


Module: wine
Branch: master
Commit: c88bbd8092f9b3e8a371025d1a47d4225cc171db
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=c88bbd8092f9b3e8a371025d1a47d4225cc171db

Author: Robert Shearman <rob at codeweavers.com>
Date:   Wed Sep 27 15:50:35 2006 +0100

ntdll: NtAllocateVirtual with type of MEM_WRITE_WATCH fails with STATUS_NOT_SUPPORTED on Win2000 instead of STATUS_INVALID_PARAMETER.

---

 dlls/ntdll/virtual.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index f7b829f..717e394 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -1350,11 +1350,16 @@ NTSTATUS WINAPI NtAllocateVirtualMemory(
     if (!(type & MEM_SYSTEM))
     {
         if (!(type & (MEM_COMMIT | MEM_RESERVE)) ||
-            (type & ~(MEM_COMMIT | MEM_RESERVE | MEM_TOP_DOWN)))
+            (type & ~(MEM_COMMIT | MEM_RESERVE | MEM_TOP_DOWN | MEM_WRITE_WATCH | MEM_RESET)))
         {
             WARN("called with wrong alloc type flags (%08lx) !\n", type);
             return STATUS_INVALID_PARAMETER;
         }
+        if (type & MEM_WRITE_WATCH)
+        {
+            FIXME("MEM_WRITE_WATCH type not supported\n");
+            return STATUS_NOT_SUPPORTED;
+        }
     }
     vprot = VIRTUAL_GetProt( protect );
     if (type & MEM_COMMIT) vprot |= VPROT_COMMITTED;




More information about the wine-cvs mailing list