BOOL AfxIsValidAddress( const void* lp, UINT nBytes, BOOL bReadWrite = TRUE );
Return Value
Nonzero if the specified memory block is contained entirely within the program’s memory space; otherwise 0.
Parameters
lp
Points to the memory address to be tested.
nBytes
Contains the number of bytes of memory to be tested.
bReadWrite
Specifies whether the memory is both for reading and writing (TRUE) or just reading (FALSE).
Remarks
Tests any memory address to ensure that it is contained entirely within the program’s memory space. The address is not restricted to blocks allocated by new.
See Also AfxIsMemoryBlock, AfxIsValidString