Problems sending binary files using Winsock control
Hi all,
I googled and searched this forum for example programs of transferring binary files using winsock but none of them runs correctly on my computer.
http://www.vbforums.com/showthread.php?t=377648
I tried to run this program but the progress bar stops at about 67% and the file cannot be received in the receiver end.
I also tried to run the example program attached in this tutorial: http://www.winsockvb.com/article.php?article_id=37
But the file received in the receiver end is corrupted.
I am running Windows XP Pro SP2 on my machine and could somebody please advise me of what is causing this problem? :afrog:
Thanks a lot.
Re: Problems sending binary files using Winsock control
Thats strange............I tried the WinsockVB example that you said didnt work for you, and it works fine here. Did you modify the code or something?
Re: Problems sending binary files using Winsock control
Quote:
Originally Posted by the182guy
Thats strange............I tried the WinsockVB example that you said didnt work for you, and it works fine here. Did you modify the code or something?
Thank you very much for your help. :D
Of course I didn't modify the code. There has to be something wrong with my windows xp pro sp2 I suspect and I tried not only these two examples but also others found in google. Most of them work properly sending text files but not binary files. (I can send plain text files using the winsockvb example with no problem but not binary files.)
Would it be an issue with the version of the mswinsock.ocx located in the windows\system? I really have no clues on why it behaves like this,
Please advise, thank you very much to you all. :D
1 Attachment(s)
Re: Problems sending binary files using Winsock control
It could be the mswinsck try replacing your mswinsck.ocx file with the one attached to this post. Thats the one I use and it works fine. On win2k its in system32 i think its the same for xp
Re: Problems sending binary files using Winsock control
Quote:
Originally Posted by the182guy
It could be the mswinsck try replacing your mswinsck.ocx file with the one attached to this post. Thats the one I use and it works fine. On win2k its in system32 i think its the same for xp
Thank you very much for your help :)
I have overwritten the mswinsck.ocx in c:\windows\system32 with your file but the situation still remains the same. The file received in the client end still gets corrupted in the same way as before. It seems there has nothing to do with this file.
Here is the original image file:
http://hk.geocities.com/hasan_ssas/logo.bmp
Here is the received image(corrupted! :afrog: ):
http://hk.geocities.com/hasan_ssas/temp.bmp
I examined them both in a hex editor but I still got no clue.
This is really strange...I wonder what could be causing this weird behaviour....?
Re: Problems sending binary files using Winsock control
Are you running any software that could be interfereing? packet sniffets things like that.
Try creating a little winsock program that sends and receives data, and send some data to see how its being corrupted.
What about your ineternet connection? Are you using a wireless network?
Re: Problems sending binary files using Winsock control
Quote:
Originally Posted by the182guy
Are you running any software that could be interfereing? packet sniffets things like that.
Try creating a little winsock program that sends and receives data, and send some data to see how its being corrupted.
What about your ineternet connection? Are you using a wireless network?
I am just having NAV running in the background and I am testing the programs on a single machine using 127.0.0.1, would this be the cause of this problem? :afrog:
Re: Problems sending binary files using Winsock control
there are other files that winsock uses some dlls not only the ocx. So try downloading the vb runtime library and installing it again incase any of the files are corrupted or missing
http://www.softwarepatch.com/windows/vbrun6.html
Re: Problems sending binary files using Winsock control
Quote:
Originally Posted by the182guy
Thanks a lot for your help. :bigyello:
I downloaded the file and installed it successfully and soon the windows prompted me to insert the XP CD-ROM because some files were overwritten with copies of unidentified version, I didn't insert and clicked "cancel". I guess it's ok so I run the program again but unfortunately I got exactly the same corrupted temp.bmp file once again. :lol:
This is really strange and funny. :afrog:
Anyway, thank you very much for your help so far. :D