读取文件内容本地验证
读取文件内容一串数字,本地验证,验证成功可通过,失败则结束自身进程
'读取文本文件
Function GetFile(FileName As String) As String
Dim i As Integer, s As String, BB() As Byte
If Dir(FileName) = "" Then Exit Function
i = FreeFile
ReDim BB(FileLen(FileName) - 1)
Open FileName For Binary As #i
Get #i, , BB
Close #i
s = StrConv(BB, vbUnicode)
GetFile = s
End Function
'调用举例:
dim s as string
s=GetFile("c:\1.txt")