- Add check of params for NtGetWriteWatch/NtResetWriteWatch (from Wine)

- Set Granularity to PAGE_SIZE
Fixes crash in kernel32 virtual test

svn path=/trunk/; revision=41015
This commit is contained in:
Dmitry Chapyshev 2009-05-20 11:08:08 +00:00
parent 822db26efe
commit e0cba65fdf

View file

@ -434,6 +434,9 @@ MmSetAddressRangeModified (
return (FALSE); return (FALSE);
} }
/*
* @unimplemented
*/
NTSTATUS NTSTATUS
NTAPI NTAPI
NtGetWriteWatch(IN HANDLE ProcessHandle, NtGetWriteWatch(IN HANDLE ProcessHandle,
@ -444,16 +447,42 @@ NtGetWriteWatch(IN HANDLE ProcessHandle,
OUT PULONG EntriesInUserAddressArray, OUT PULONG EntriesInUserAddressArray,
OUT PULONG Granularity) OUT PULONG Granularity)
{ {
if (!EntriesInUserAddressArray || !Granularity)
{
return STATUS_ACCESS_VIOLATION;
}
if (!*EntriesInUserAddressArray || !RegionSize)
{
return STATUS_INVALID_PARAMETER;
}
if (!UserAddressArray)
{
return STATUS_ACCESS_VIOLATION;
}
/* HACK: Set granularity to PAGE_SIZE */
*Granularity = PAGE_SIZE;
UNIMPLEMENTED; UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED; return STATUS_NOT_IMPLEMENTED;
} }
/*
* @unimplemented
*/
NTSTATUS NTSTATUS
NTAPI NTAPI
NtResetWriteWatch(IN HANDLE ProcessHandle, NtResetWriteWatch(IN HANDLE ProcessHandle,
IN PVOID BaseAddress, IN PVOID BaseAddress,
IN ULONG RegionSize) IN ULONG RegionSize)
{ {
if (!RegionSize)
{
return STATUS_INVALID_PARAMETER;
}
UNIMPLEMENTED; UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED; return STATUS_NOT_IMPLEMENTED;
} }