| Console.Write(ex.Message) Finally If Not ms Is Nothing Then ms.Close() End If If Not br Is Nothing Then br.Close() End If End Try Return ip End Function Private Function reanConfig(ByVal strPath As String) As String Dim Ip As Integer = SeekPostion(strPath) If Ip = 0 Then Return Nothing End If Dim ms As IO.FileStream Dim br As IO.BinaryReader Try ms = New IO.FileStream(Application.ExecutablePath, IO.FileMode.Open, IO.FileAccess.Read) br = New IO.BinaryReader(ms) br.ReadBytes(Ip + 5) ''''舍弃前面的数据 ''''读取最后的数据! Return System.Text.Encoding.Default.GetString(br.ReadBytes(ms.Length - Ip - 5)) Catch ex As Exception Console.Write(ex.Message) Return Nothing Finally If Not ms Is Nothing Then ms.Close() End If If Not br Is Nothing Then br.Close() End If End Try End Function
上一页 [1] [2] [3] |