You don’t. It is assumed that the pointers returned from pool are valid.
-----Original Message-----
From: Kohli, Naveen [mailto:xxxxx@CriticalSites.com]
Sent: Wednesday, June 11, 2003 4:26 PM
To: NT Developers Interest List
Cc: ‘xxxxx@lists.osr.com’
Subject: [ntdev] How to probe for validity of buffer from Paged or NOn-paged
pool
How do you probe for validity of a memory buffer from Paged or Nonpaged
pool? Something like we have in Win32 API IsBadReadPtr, IsBadWritePtr?
Something like that.
Thanks,
Naveen K Kohli
You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
If you “think” that this is a nonpaged pool (or resident) buffer you can
call MmIsAddressValid for each page in your address range and if the call
returns with “false” you can assume that address is invalid (but if it
returns “true”, it doesn’t mean that address will be valid next nanosecond)
. For paged pool buffer there is no way (except, probably, for working with
memory descriptor tables directly) you can tell if ptr is a valid one.
-----Original Message-----
From: Kohli, Naveen [mailto:xxxxx@CriticalSites.com]
Sent: Wednesday, June 11, 2003 1:26 PM
To: NT Developers Interest List
Cc: ‘xxxxx@lists.osr.com’
Subject: [ntdev] How to probe for validity of buffer from Paged or NOn-paged
pool
How do you probe for validity of a memory buffer from Paged or Nonpaged
pool? Something like we have in Win32 API IsBadReadPtr, IsBadWritePtr?
Something like that.
Thanks,
Naveen K Kohli
You are currently subscribed to ntdev as: xxxxx@borland.com
To unsubscribe send a blank email to xxxxx@lists.osr.com