|
-
Dec 22nd, 2004, 06:48 PM
#1
Thread Starter
New Member
exe growing as it runs
I am using winsock to transfer a stream of jpg files and the exe grows by about 300 kb as it streams. When it's idle it does not have a memory leak. The stream is just a bininary chunk being collected and plopped in a picture box. I'm setting the buffer to empty before asking for another jpg.
Private Sub WServer_DataArrival(Index As Integer, ByVal bytesTotal As Long)
Dim recBuffer As String
On Error GoTo GErr
WskServer(Index).GetData recBuffer
DstPath = "C:\camcap.jpg"
FL = FreeFile
On Error Resume Next
If Len(Dir(DstPath)) > 0 Then
Kill DstPath
End If
Open "C:\camcap.jpg" For Binary As #2
BytesRec = BytesRec + Len(recBuffer)
Put #2, , recBuffer
Close #2
DoEvents
form1.Image1 = LoadPicture("C:\camcap.jpg")
DoEvents
form1.Label5.Caption = BytesRec
recBuffer = Empty
WServer(Index).SendData "Msg_End"
Exit Sub
GErr:
WServer(Index).SendData "Msg_Resnd"
End Sub
Any ideas??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|