Mengbillar
Programmer
I want to copy (and send via winsock) a file, so i cannot use any of the 'normal' copy methods. what i tried is this
Open <file> For Binary Lock Write As #1
Dim temp As String * 1, length As Long, a As Long
length = LOF(1)
a = 0
While a < length
Get #1, , temp
Winsock1.SendData temp
a = a + 1
Wend
Close
This kinda works, i am able to recieve and build the file at the other end, but the file itsself turned into garbage. any idea what wrong/how i can accomplish my goal in a better way?
Open <file> For Binary Lock Write As #1
Dim temp As String * 1, length As Long, a As Long
length = LOF(1)
a = 0
While a < length
Get #1, , temp
Winsock1.SendData temp
a = a + 1
Wend
Close
This kinda works, i am able to recieve and build the file at the other end, but the file itsself turned into garbage. any idea what wrong/how i can accomplish my goal in a better way?