# 配合 Type, Byte Array 以及 StrConv 就可以做出来

Posted by 小吴 on October 14, 1997 at 18:13:49:

In Reply to: 读取中文的随档?? posted by 吕国正 on October 13, 1997 at 01:23:39:

假设人名占 10 bytes, 电话占 20 bytes

Private Type tagRecord
CName(0 To 9) As Byte
TEL(0 To 19) As Byte
End Type

Private Sub Command1_Click ()
Dim uRecord As tagRecord
Open "C:\phone.dat" For Random As #1 Len = LenB(uRecord)
Get #1, 20, uRecord
Debug.Print StrConv(uRecord.CName, vbUnicode)
Debug.Print StrConv(uRecord.TEL, vbUnicode)
Close #1
End Sub

Follow Ups: