Unicode Controls & Classes for VB6 - Version 4

clsUniFile.ReadAnsiLine Function

Reads bytes from file until a LF char is found; returns True is the function finished correctly

Syntax
Public Function ReadAnsiLine (ByRef sRet As String) As Boolean
Parameters
Parameter Description
ByRef sRet As String The returning string (without the vbCrLf char at the end)
Remarks
'Read each line in file
If CFile.OpenFileRead(FileName) Then
fEncoding = CFile.ReadBOM()

While Not CFile.Eof()
'Read line from file
If (fEncoding = fe_ANSI) Then
rc = CFile.ReadAnsiLine(inStrg)
Else
rc = CFile.ReadUnicodeLine(inStrg)
End If

If (rc = False) Then GoTo FILE_ERR
Wend

CFile.CloseFile
End If