- 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);
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
NtGetWriteWatch(IN HANDLE ProcessHandle,
@ -444,16 +447,42 @@ NtGetWriteWatch(IN HANDLE ProcessHandle,
OUT PULONG EntriesInUserAddressArray,
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;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
NtResetWriteWatch(IN HANDLE ProcessHandle,
IN PVOID BaseAddress,
IN ULONG RegionSize)
{
if (!RegionSize)
{
return STATUS_INVALID_PARAMETER;
}
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}