分类:
2009-10-11 10:46:06
'以下是读取Binary file的程式 Dim Buff() as Byte Open "d:\csys\8504\ctc" For Binary Access Read As #1 ReDim Buff(267) Do While Not EOF(1) Get #1, , Buff '每次读268个byte进来 'Call 处理Buff 的Routine Loop Close #1 '以下是写入Binary file的程式 Dim Buff() As Byte Open "c:\tc" For Binary Access Write As #1 ReDim Buff(10) Buff = StrConv("这是一个11", vbFromUnicode) Put #1, , Buff ReDim Buff(1) Buff(0) = 210 Buff(1) = 70 Put #1, , Buff Close #1 End Sub