'#############################################################
'変換配置ファイル読み込む
'返回参数:strReadLine
'#############################################################
Public Function FileRead(ByVal filename As String, ByRef strReadLine As String()) As Boolean
Dim strRead As String
FileRead = False
On Error GoTo Err
Dim fs As New FileStream(filename, FileMode.Open)
Dim strReader As New StreamReader(fs, Encoding.Default)
'ファイル読む
strRead = strReader.ReadToEnd
strReadLine = Split(strRead, ControlChars.CrLf)
strReader.Close()
FileRead = True
Exit Function
Err:
errlog = errlog & Now & " ファイル読み込むエラー" & vbCrLf
errlog = errlog & Now & " ファイル名前:" & filename & vbCrLf
End Function
'*******************************************************************
'ファイル作成
'*******************************************************************
Sub LogWrite(ByVal filename As String, ByVal str As String)
Dim StreamWriter As New StreamWriter(filename, False, Encoding.Default)
On Error GoTo ERR
StreamWriter.Write(str)
StreamWriter.Close()
Exit Sub
ERR:
End Sub