Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Winsock
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01288289
Message ID:
01294534
Vues:
39
I will take a look at the product but meanwhile have a question:
I am working on a solution that uses two winsock controls. Both will try to connect to the same IP.
I am connecting first with this command:
ThisForm.winsock.Object.Connect()
Then I am trying to connect second one like this:
TRY
ThisForm.winsock1.Object.Connect()
CATCH TO oException
llOpenOk = .F.
FINALLY
ENDTRY
But unfortunately try .... block is not catching the error:
'CCMD' is not an array.

Why try... catch is not trapping the error?

Thanks

>Yep, the Winsock activeX is a little quirky. When to use the "Winsock.OBJECT.SomeProperty" and when it's ok to use "Winsock.SomeProperty". At least Microsoft documented it well <g>.
>
>The connect method does return T/F.
>Looking at my code, I did something like this:
>
>FOR i = 1 to nTries
> IF Winsock.Connect()
> *Continue on
> EXIT
> ENDIF
>ENDIF
>
>A final word on this. If you plan to write a fair amount of socket code, you owe it to yourself to look at Catalyst's SocketWrench. The cost is around $100. It is fantastically well documented. I submitted some VFP examples to them a few months ago to add to their sample code library. All 'n all, that product has been a pleasure to work with. I won't go back to using the Winsock activeX any time soon. My .02.
>
>-m@
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform