Did you check the App.Path ?
Or did you look in the code to see where it's saving ?
Printable View
Did you check the App.Path ?
Or did you look in the code to see where it's saving ?
you mean this one ???
if i want to send C:\WINDOWS\system32Code:Clients(Index).FileNum = FreeFile
Open App.Path & "\" & Clients(Index).FileName For Binary Access Write Lock Write As Clients(Index).FileNum
code is
am i correct?Code:Open App.Path & "C:\WINDOWS\system32" & Clients(Index).FileName
Why would you transfer files into the systems folder ?
Probably you have to add "\", like
Code:Open App.Path & "C:\WINDOWS\system32\" & Clients(Index).FileName
system folder just for example :D
i got error
http://i39.tinypic.com/35cllqr.jpg
plz can attach ur working project file with my path :ehh:
Does "new folder" exist ?
[edit]
Wait a minute... why you have App.Path & "C:\Windows"...
That will give you path like "C:\somethingC:\Windows"... does that look right to you ?
Remove the App.Path, and make sure "new folder" exists.
Why could'nt you just put a break point at that line, and check the path by yourself ?
Hi all,
how can i send the files from PC using Window CE to PC using Window XP and by using LAN connectivity? let PC window CE as slave and PC window XP as master, then how can I ping the ethernet from window XP to make sure the validity of both connection then send a file over PC?
Thanks.
How might you go about informing the Client side that the Server is not active/listening?
is there a way to increase the packet size above 4KB, something like 32/64KB ?
i tried this, and it doesn't work. it seems that the limit is 4K.
The TCP protocol divides the data into 4K packets, so even if you send 100K in one "SendData", it will divide the data in 25, 4K packets. There is absolutely nothing you can do about it.
thank you, i guess my problem was that i didn't wait for the finished transfer event,
i discovered this when i sent two packets one after one,
then i also read what you said about this, you definitely right,
things won't work if you don't wait for this event, unless you send tiny packets.
i also don't use this event to do the transfer (as you said),
in this event i set a flag
and i wait for this flag with do events like this
for me it's better this way, than using a timer.Code:Private Sub Send(ByVal TheData$)
blnCandSend = True
sck.Send TheData$
While blnCandSend
Do Events
Wend
End Sub
Private Sub sck_SendComplete()
blnCantSend = False
End Sub
Private Sub sck_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
blnCantSend = False
End Sub
Private Sub sck_Close()
blnCantSend = False
End Sub
CV, i found strange thing in vb WinSock
the client send the file header
in three seperated packets
one after one.
but on the server side, they all got as one packet.
i can only guess that this is because WinSock slowly
in my WSocket, these three packets, get as three seperated packets,
there for i changed this to one packet.
here is the attachment with my new WSocket, in your demo project.
the client which doesn't use any ocx, can work on Windows7.
that is not working with RHOST
i test it
I have no clue what RHOSt is...
@CVMicheal
I like your code and it was what i was looking for, but i have one question.
How can i send more then one file at the same time from a client (not multiple clients)?
I hope you answer this. Thank You
It's been a while since I saw this project, but from what I remember if you change the winsock control to a control array, and the rest of the code to create a new instance, and start transfering on that instance.
Can you create a user control out of it? if it is easy and you have time.
Sorry, I don't do programming in VB6 for a few years, I switched to .NET. And my life has changed dramatically, as you can see I'm not active on the forums anymore. I just answer 5 min questions once in a while.
@CVMichael
I have successfully implemented your code in my 2 projects,
1 to send live webcam captures from server to client,
And my 2nd project a remote file downloader/uploader.
but i don't know what packet sizes should i set for these 2 projects.
Can you give me some idea please? I mean what should be packet size for live webcam captures transfer which requires a fast transmission, and 2nd remote file uploader/downloader?
Thank you very much.
4Kbytes should be the norm. Anything smaller it will send too often therefore slowing down the connection, anything bigger will be broken up in smaller packets anyways.
So it means increasing the packet size won't increase the upload/download speed?
I have one more problem please,
you implemented stuff like speed, time remaining and bytes sent for sender side, but not in the receiver side which i can't figure out.
Can you please help me with this. Thanks Again
Here is the code from the sender side
How i can change it to work with the receiver side?Code:Private Sub tmrCalcSpeed_Timer()
Static PrevSent As Long
Dim BSentPerSec As Long, DataSent As Long, DataLen As Long
Dim SecondsLeft As Single
If iFileNum > 0 Then
DataSent = Loc(iFileNum)
DataLen = LOF(iFileNum)
BSentPerSec = DataSent - PrevSent
PrevSent = DataSent
SecondsLeft = (CSng(DataLen) - CSng(DataSent)) / CSng(BSentPerSec)
Else
PrevSent = 0
End If
lblSendSpeed.Caption = Format(DataSent / 1024#, "###,###,##0.00") & " KBytes Sent, " & _
Format(CDbl(BSentPerSec) / 1024#, "#0.00") & " Kb/Sec, " & _
"Time left: " & Format(SecondsLeft \ 3600, "00") & ":" & Format(SecondsLeft \ 60, "00") & ":" & Format(SecondsLeft Mod 60, "00")
End Sub
If many person send a similar file we see Error word in the program .
How can correct this action?
Thanks.
hai all can anybody suggest me to "how to get the data in packet by packet format instead of whole stream " plz i hav to submit project soon
hai sir this ramu i hav to read the data at winsock reciever BYTE by BYTE instead of STREAM of data(packet by packet) for that i m using "binary read write mode" but it is not working after sometime it showing the error "DIVISION BY ZERO" problem please help me sir..............
thanks for your project :)
but, i have a question, can i know how much data has been passed in winsock? (in MB or kb)??
thanks b4