Results 1 to 9 of 9

Thread: Problems sending binary files using Winsock control

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2005
    Posts
    7

    Post 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?

    Thanks a lot.
    Last edited by iamsuperman; Feb 24th, 2006 at 01:43 AM.

  2. #2
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    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?
    Chris

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2005
    Posts
    7

    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.
    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.
    Last edited by iamsuperman; Feb 25th, 2006 at 01:04 AM.

  4. #4
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    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
    Attached Files Attached Files
    Chris

  5. #5

    Thread Starter
    New Member
    Join Date
    Jul 2005
    Posts
    7

    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! ):
    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....?

  6. #6
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    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?
    Chris

  7. #7

    Thread Starter
    New Member
    Join Date
    Jul 2005
    Posts
    7

    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?

  8. #8
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    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
    Chris

  9. #9

    Thread Starter
    New Member
    Join Date
    Jul 2005
    Posts
    7

    Re: Problems sending binary files using Winsock control

    Quote Originally Posted by the182guy
    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
    Thanks a lot for your help.
    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.

    This is really strange and funny.
    Anyway, thank you very much for your help so far.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width