Winsock.OCX Will NOT Receive Binary Data.

Barista
09-17-2001, 12:52 PM
Hello,

What I'm using:
VB 6.0 SP 5
Win 2K SP 2

I am seeking help with a problem I am having with the MS Winsock OCX not receiving Binary data.

I wrote a ICQ style application for my frineds and familly to use. It works great, uses the MS Winsock.ocx to converse with a Server I built for it as well.

Most ALL conversations between the client and server are ASCII, however, I built a "Auto Update" feature into it that will download a binary file, a new EXE, through the existing open connection.

It works great on about all the machines, except one (My fathers, the one who needs a auto update more than anyone. Who would think replacing a EXE to be such a dounting task, hehehe).

The one machine that does not work is W2K SP 2 and seems to do this.

The Client tells the server it is ready for the Binary file.

The Server sends the binary file.

The Client "Data_Arrival" event NEVER FIRES when the server starts the Binary send.

At least as I can tell, it never fires. I haven't put VB on that machine to step through the code.

What I have tried;

Adding doevents to the start of the DataArival Event (Shrug).
Created a look on the server to only send 4K chunks with a DoEvents between them.
Pulling my hair (Not much help).

Has anyone else ever experienced this kind of oddity with the MS Winsock Control? I thinking about just rewiting the client using the Winsock API, however this would be a big change to the application, as well as a lot of work on my part, and a whole new interface to learn. I'm hoping that someone else has had this problem, and may have a solution.

I have searched the MS KB, and found a Bug that fits my problem to the T, however it pertains to the VB & CE Development enviornment.

Any advice would be greatly appreciated.

Thanks,
Bill

Barista
09-25-2001, 09:56 AM
No takers? Man, this problem is STILL driving me nuts....
Any ideas , let me know.

Bill

ChiefRedBull
09-25-2001, 10:33 AM
I;m afraid i haven't come across anything like this Bill.
When I was writing my file transfer, I had horrible trouble sending files too.
I managed to get it working perfectly one way, repeatedly in the same session, but it would only work once the other way. Once one file had been sent, you couldn't send anymore without restarting the app. This was using EXACTLY the same code.
Winsock obvously has some serious userability issues....
I couldn't tell you what was going on without checking out your code really.... which I'd be glad to do if you wanna post it on here.

Chief

"How are we to learn, if those that know will not teach... ?" - Me.

hashir56
10-01-2001, 02:01 PM
When ever i have a problem w/winsock like this i fool around w/it. try going on the computer and finding out exactly where it stops (i.e. have like a msgbox on every single step so you know where the msgbox's stop comming). If this still fails you, consider using the Inet control. I have no idea how to use it, but i know it's similer to winsock.

Squirm
10-01-2001, 02:59 PM
Make sure whenever you send data using SendData that the string always finishes with vbCrLf

Barista
10-03-2001, 02:21 PM
Adding a vbCRLF has little relevence since I'm dealing with Binary data.

Going to be at my dads house this weekend, so I plan on installing VB on his machine to step through.

I'm betting once I install VB, it will work like a charm. :\

Go figure! hehehe..

Will post results.

Bill

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum