Code: Select all
*Buffer = AllocateMemory(1024)
bytes_read.l
Repeat
Delay(10)
InternetReadFile_(HOR_Handle, *Buffer, 1024, @bytes_read)
Until bytes_read=0
What I need to do is find a way to put the byte fragments of *buffer together into a single *pointer so i can use CatchImage(#Image, @Appended_Buffer).
I have tried everything I know from this:
Code: Select all
*Buffer = AllocateMemory(1024)
bytes_read.l
*RealBuffer = 0
old_bytes_read.l = 0
Repeat
Delay(10)
InternetReadFile_(HOR_Handle, *Buffer, 1024, @bytes_read)
If old_bytes_read = 0
*Temp_Buffer = 0
Else
*Temp_Buffer = AllocateMemory(old_bytes_read)
EndIf
If *RealBuffer <> 0
CopyMemory(*RealBuffer, *Temp_Buffer, old_bytes_read)
FreeMemory(*RealBuffer)
EndIf
*RealBuffer = AllocateMemory(bytes_read + old_bytes_read)
old_bytes_read = bytes_read
CopyMemory(*Buffer, @RealBuffer, bytes_read)
FreeMemory(*Temp_Buffer)
FreeMemory(*Buffer)
*Buffer = AllocateMemory(1024)
Until bytes_read=0
Code: Select all
*Buffer = AllocateMemory(1024)
bytes_read.l
total_bytes = 0
Repeat
Delay(10)
InternetReadFile_(HOR_Handle, *Buffer, 1024, @bytes_read)
*total = AllocateMemory( total_bytes+bytes_read )
CopyMemory( @Buffer, (@*total)+bytes_read, bytes_read )
total_bytes + bytes_read
FreeMemory(*total)
Until bytes_read=0

Code: Select all
*Buffer = AllocateMemory(1024)
bytes_read.l
*RealBuffer = 0
total_bytes.l = 0
Repeat
Delay(10)
InternetReadFile_(HOR_Handle, *Buffer, 1024, @bytes_read)
strinf.s = PeekS(*Buffer)
Debug stringf.s
Stringl.s + stringf.s
Debug Stringl.s
Until bytes_read=0
*Buffer = Val(Stringl.s)
Code: Select all
*Buffer = AllocateMemory(1024)
bytes_read.l
*RealBuffer = 0
total_bytes.l = 0
Repeat
Delay(10)
InternetReadFile_(HOR_Handle, *Buffer, 1024, @bytes_read)
*RealBuffer = ReAllocateMemory(*RealBuffer, total_bytes + bytes_read)
CopyMemory(*Buffer, @RealBuffer, bytes_read)
total_bytes + bytes_read
Until bytes_read=0
Thanks in Advance,
DARKGirl