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

This commit is contained in:
Robert Shearman 2006-09-27 15:50:35 +01:00 committed by Alexandre Julliard
parent f9e12a1001
commit c88bbd8092
1 changed files with 6 additions and 1 deletions

View File

@ -1350,11 +1350,16 @@ NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG zero_
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;