ICELIB0.NLM → ICE_MeasureString()
ICE_MeasureString
- Description:
- Measures an ASCIIZ (NULL terminated) string without violating memory boundaries.
- Syntax for C:
- unsigned int ICE_MeasureString (
char *buffer,
unsigned int maxSize
)
- Syntax for Assembly:
- Call ICE_MeasureString C, offset Buffer, [maxSize]
- Parameters:
-
- buffer
- (IN) Points to the buffer or string to measure.
- maxSize
- (IN) Maximum number of bytes to measure, or specify NULL if length is unknown (no memory boundaries are checked, so a memory violation can still occur when NULL is specified and the string is not a null terminated string).
- Returns:
- Length of string, not including zero, or -1 if end not found.
- Remarks:
- This function is most useful when reading blocks of data from a file or a stream. For example, if the block size is 1024 bytes, and a 1200 byte line of text is read from a file, then the return value of -1 indicates that the line was not read completely.
- Resource files:
- icelib0.imp