BOOL IsBadStringPtr(lpsz, cchMax) | |||||
LPCTSTR lpsz; | /* pointer to test | */ | |||
UINT cchMax; | /* maximum size of string | */ |
The IsBadStringPtr function determines whether the calling process has read access to the specified string.
lpsz
Points to a null-terminated string, either Unicode or ASCII.
cchMax
Specifies the maximum size of the string, in characters. This function checks for read access to the number of bytes in the string or the number of bytes specified by cchMax, whichever is smaller.
The return value is FALSE if the calling process has read access to the entire specified memory range. Otherwise, the return value is TRUE.
The IsBadStringPtr function may be used as either a wide-character function (where text arguments must use Unicode) or an ANSI function (where text arguments must use characters from the Windows 3.x character set installed).
IsBadCodePtr, IsBadHugeReadPtr, IsBadHugeWritePtr, IsBadReadPtr, IsBadWritePtr