ntoskrnl.exe: Implement MmIsAddressValid.

This commit is contained in:
Detlef Riekenberg 2008-03-21 21:25:40 +01:00 committed by Alexandre Julliard
parent 0a16b6b81f
commit f3380958bd
2 changed files with 20 additions and 1 deletions

View File

@ -561,6 +561,25 @@ void WINAPI MmFreeNonCachedMemory( void *addr, SIZE_T size )
VirtualFree( addr, 0, MEM_RELEASE );
}
/***********************************************************************
* MmIsAddressValid (NTOSKRNL.EXE.@)
*
* Check if the process can access the virtual address without a pagefault
*
* PARAMS
* VirtualAddress [I] Address to check
*
* RETURNS
* Failure: FALSE
* Success: TRUE (Accessing the Address works without a Pagefault)
*
*/
BOOLEAN WINAPI MmIsAddressValid(PVOID VirtualAddress)
{
TRACE("(%p)\n", VirtualAddress);
return !IsBadWritePtr(VirtualAddress, 1);
}
/***********************************************************************
* MmPageEntireDriver (NTOSKRNL.EXE.@)
*/

View File

@ -679,7 +679,7 @@
@ stub MmGetVirtualForPhysical
@ stub MmGrowKernelStack
@ stub MmHighestUserAddress
@ stub MmIsAddressValid
@ stdcall MmIsAddressValid(ptr)
@ stub MmIsDriverVerifying
@ stub MmIsNonPagedSystemAddressValid
@ stub MmIsRecursiveIoFault