Ok, Lets see how smart you guys are.. since i am totally out of ideas...
I wrote a Evb program that uses a winsock control. basically all it does is get the html from a web page, it goes like this: (this will get a stock quote for IBM)
ws1.RemoteHost = "finance.yahoo.com"
ws1.RemotePort = 80
ws1.Connect
test1 = "GET /q?s=ibm&d=e HTTP/1.1" & Chr(13) & Chr(10)
test2 = "Host: finance.yahoo.com" & Chr(13) & Chr(10) & Chr(13) & Chr(10)
ws1.SendData test1
ws1.SendData test2
(then it gets the data in the data received routine ie ws1.getdata(var,,len)
ws1.close
this should work, and it does!
EXCEPT when i run through it again, i get nothing back. (get data returns null with a length of 8192).
if i stop the program, and restart it, it works once then not again
ive screwed with this for a whole day and cant figure out why.
ok, so it works the first time you run the program, but it doesn't the next times?
Weird.. Sounds like some variables need to be flushed or something.
Dan? your the expert

.
Ya, i mean you could drop the variables into an array after each test, then when the user presses the button again. It sets all the rest of the variables back to zero and restarts almost.
P.S. Chris, dan does eVC not eVB
chuck.. always trying to prove me wrong.. tsk
You say you restart it and it works, but you 'run' it again and it doesn't - this implies that you are not restarting but just running a section of that code again.
I've worked very little with HTTP streams, but it seems as if you are opening a stream and getting data from it, and then trying to pull more data from an 'empty' stream. Be sure to close evrything and open a new HTTP socket when you issue the new request.
- Richard
no, i have it set up on a button, so you click the button, you get the page in a text box.
when i FIRST run the program, i click on the button, it works. i click the button again, it doesnt work. it looks like it works but it doesnt return data (IE: the open comes back clean, the status's are connect (IE: connecting hostcloseconnection).
ill try to clean it up a little (i got boxes all over), and ill post the source later tonight, maybe you guys can try it if you dont mind.
and of course i did try closing re-initing everything.
First off, I don't like VB. So if it doesn't act right, it doesn't bother or surprise me too much.

What you have looks like it's in the ballpark. I have very little experience with VB, but you may try creating your ws1 object dynamically. That way a new object is created each time that routine is called. I think this is done with a Dim statement? When I have to do anything VB-ish I always use JavaScript...
Dan East
thanks.
Ive uploaded it to
http://www.iddgroup.com/stock.zip
just enter a stock (like IBM) hit "add", then click on "update"
it will work.
then click update again and it wont.
the textbox on the right shows what is returned.
dan,
actaully, thats a good idea, i didnt think of creating it dynamically. Its late now, but ill try it tommorow.
it SHOULD work the way i have it, it makes no sense why it doesnt. Unless theres a bug in the winsock.
paul,
where you able to look at it?
i'm doing it now - i'm at college though so i cant test it. i will later though.
thanks,
i also tried the dynamic creating, but i dont think dynamic creation works in evb (or at least like it does in VB)
OK If anyone needs any help it looks as if I'm the VB Expert to ask. Seeming i've been doing VB for about 8 years now maybe longer. I've downloaded your code and i'm going to look at it. I'll repost here in a couple minutes to let you know whats wrong with it.
WOAH!!!!!!!!!!! How long you been using VB? Not saying this to be mean or anything but your code is really unorganized and alot of it can be redone. From what i see this should help a bit...
If this doesn't fix ur problem let me know cause there is one other thing that you can that i guarantee will work... This is the short way out the other way would have about 10 more lines of code.
Just highlight all your code for that form and press delete then Highlight all of this and copy and paste it where the old code was. I did a little optimizing and such so this should work fine.
OK
That didn't Come out in the forum right So Just Give me ur email address and i'll sedn you the updated code
thanks,
karl@iddgroup.com I know the codes a mess, i was sitting here on a sunday night pecking away. I started out just playing with the winsock and grid control, since they didnt seem to work like vb6's controls, so i was playing with different stuff. one think led to another and thats the way it came out.
im actually going to redo it the right way, if i get the winsock right.