IsBadReadPtr

3.1

  BOOL IsBadReadPtr(lp, cb)    
  const void FAR* lp; /* pointer to test */
  UINT cb; /* number of allocated bytes */

The IsBadReadPtr function determines whether a pointer to readable memory is valid.

Parameters

lp

Points to the beginning of a block of allocated memory.

cb

Specifies the number of bytes of memory that were allocated.

Return Value

The return value is nonzero if the pointer is bad (that is, if it does not point to readable memory of the specified size). The return value is zero if the pointer is good.

See Also

IsBadCodePtr, IsBadHugeReadPtr, IsBadHugeWritePtr, IsBadStringPtr, IsBadWritePtr