AppendFile




' Routine di Append

Private Sub AppendToExe(exefile$,filetoappend$)
Open filetoappend$ For Binary As #1
filedata$ = String(LOF(1), " ")
Get #1, , filedata$
Close #1
Open exefile$ For Binary As #1
f = LOF(1)
Seek #1, f + 1
Put #1, , "WAP" ' Un identificatore qualsiasi
Put #1, , filedata$
Close #1
End Sub
'

' Routine di Extract

'

Private Sub ExtractFromExe(exefile$,filetoextr$)
Open exefile$ For Binary As #1
filedata$ = String(LOF(1), " ")
Get #1, , filedata$
Close #1
pos = InStr(1, filedata$, "WAP")
f$ = Mid$(filedata$, pos + 3)
Open filetoextr$ For Binary As #2
Put #2, , f$
Close #2
End Sub

Non e' garantito il buon funzonamento con files di
grandi dimensioni










( appendfile.html )- by Paolo Puglisi - Modifica del 17/12/2023