Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLE Exception code using my class
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01249645
Message ID:
01250665
Vues:
14
>Jay,
>
>I only used the Winsock control loooong time ago for something very simple (and just for testing) and now I do not remember anything, and I tried to find you a tutorial on it, but I did not find anything good. What I am sure is happening is that you oSock.State is not valid, I wish I could find what are the values, I think 7 means connected. Anyways, it is ok not to have code in DMSWinsockControlEvents_Connect() you need to think the IMPLEMENTS as hooks, methods that will fire each time an event of the control you are implementing fires, so, when in your code you did something like EVENTHANDLER(WinsockObject, this) what you are doing is binding each of the events of the control to some methods in your object, so, for example, when the Winsock fires the event 'Connect' the code in your method DMSWinsockControlEvents_Connect() of your class will fire too, and if you just want the default behaviour, it is ok to have it empty, what you can not do is remove the method, for when you said
>IMPLEMENTS you are bound to have all the methods defined. I am not sure if I explained it right, now I need to finish something, but as the next step I suggest you to check what the value of ox.oSock.State is right after you call connect. HTH
>
>[Update]
>Found this
>state = 0 -> PortReset
>state = 1 -> Open
>state = 2 -> Listening
>state = 7 -> Connected
>state = 9 -> Error has occured
>otherwise -> Disconnected
>
>from http://www.foxite.com/archives/understanding-winsock-control-0000052660.htm
>

Do you have this info in another site, not foxite?

Occurred is spelled with two 'r', BTW.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform