Re: exe growing as it runs
Okay, it's only on the sending side not the recieving side, so scratch the code above as a problem.
Re: exe growing as it runs
The problem is in here??
Private Sub SendFile()
Dim BufFile As String
Dim LnFile As Long
Dim nRemain As Long
Dim mFile As String
BufFile = Space(0)
On Error Resume Next
Kill ("c:\cam1.jpg")
On Error GoTo GLerr:
form1.VideoCap1.SnapShot ("c:\cam1.dib")
DoEvents: DoEvents
LoadBitmapFromFile "C:\cam1.dib" ' load bitmap
DoEvents: DoEvents
mFile = "c:\cam1.jpg"
SaveJpegToFile mFile ' save the jpg
DoEvents: DoEvents
Kill ("c:\cam1.dib")
DoEvents
LnFile = FileLen(mFile)
nRemain = LnFile
If LnFile = 0 Or LnFile > 5000 Then
MsgBox "Reset your Video Stream to a smaller size"
Exit Sub
End If
If LnFile = 0 Then
MsgBox "Zero Byte Stream- Check Camera Operation"
Exit Sub
End If
Open mFile For Binary As #1
BufFile = String(nRemain, " ")
Get #1, , BufFile
WClient.SendData BufFile
'using this instead of video preview, allows true repre of sent video
form1.Image2 = LoadPicture("C:\cam1.jpg")
Close #1
Exit Sub
GLerr:
Exit Sub
End Sub
Re: exe growing as it runs
Figured it out, it was the bitmap to jpg converter. Saved snapshot directly to a jpg and it stoped memory growth. The file went from 3 to 5 kb but it is better quality. I'll see how it holds up.