FileGetStringSZ
This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.
Syntax
long fileGetStringSZ(char buff[], long buffsize, dword fileHandle);
Method(Dynamic)
long File::GetStringSZ(char buff[], long buffsize);
Function
Reads until a line ending or buffsize - 1 characters. The CANoe 12 help lists LF and CRLF (DOS) as line endings. No LF is included in the returned buffer; compare fileGetString when retaining the line feed matters. Validate the exact returned bytes for both fixtures in your installed version rather than assuming that every byte sequence is normalized identically.
Parameters
buff Buffer for the read-out string
buffsize
Length of the string
fileHandle
Handle to the file
Return Values
If an error occurs, the return value is 0, else 1.
Verification before parsing
Use a small fixture with known LF lines and a second fixture with the same records encoded as CRLF. Check content, length and buffer limits before converting values. The 0/1 read contract alone does not distinguish clean EOF from every read failure; use a known record count or diagnostics supported by the installed version when completeness matters.
See the file I/O validation procedure. Line-ending details were restored from the authorized CANoe 12 help; the fixture procedure is this site's analysis.