Risolto metto il codice
Leggere scrivere file binario
Funzioni
codice:
Function StringToBinary(String)
Dim I, B
For I=1 to len(String)
B = B & ChrB(Asc(Mid(String,I,1)))
Next
StringToBinary = B
End Function
Function MBBinaryToString(Binary)
dim c1, c2, c3, p1, p2, p3
Dim L
c1 = 1 : c2 = 1 : c3 = 1
L = LenB(Binary)
Do While c1<=L
p3 = p3 & Chr(AscB(MidB(Binary,c1,1)))
c1 = c1 + 1 : c3 = c3 + 1
if c3>300 then
p2 = p2 & p3
p3 = ""
c3 = 1
c2 = c2 + 1
if c2>200 then
p1 = p1 & p2
p2 = ""
c2 = 1
End If
End If
Loop
MBBinaryToString = p1 & p2 & p3
End Function
codice:
Do while not objFileIni.AtEndOfLine
leggo= tringToBinary(objFileIni.Read(1204*16))
objFileDest.Write MBBinaryToString(leggo)
loop
objFile Ini e Dest sono due textstream