deoblo1
Dec 7th, 2000, 01:34 AM
I can not open an mp3 as binary. I did this
Dim LocData() As Byte
Dim LenData As Long
Dim sendloop As Long
Dim path As String
path = "d:\program files\napster\music\Hows it gonna be.mp3"
Open path For Binary As #1
ReDim LocData(1 To 2048) As Byte ' Work in 2kb chunks
LenData = LOF(1) ' Get length of file
For sendloop = 1 To LenData \ 2048 ' Go through file
Get #1, , LocData 'Get data from the file nCnt is from where to start the get
Form1.Winsock1(index).SendData LocData 'Send the chunk
Next
but it wont do it, it is saying when i get the the lenData, it is saying it is 0. Any sudgestions?
Dim LocData() As Byte
Dim LenData As Long
Dim sendloop As Long
Dim path As String
path = "d:\program files\napster\music\Hows it gonna be.mp3"
Open path For Binary As #1
ReDim LocData(1 To 2048) As Byte ' Work in 2kb chunks
LenData = LOF(1) ' Get length of file
For sendloop = 1 To LenData \ 2048 ' Go through file
Get #1, , LocData 'Get data from the file nCnt is from where to start the get
Form1.Winsock1(index).SendData LocData 'Send the chunk
Next
but it wont do it, it is saying when i get the the lenData, it is saying it is 0. Any sudgestions?