Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MSWinsock
Message
De
30/11/1999 10:58:08
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
MSWinsock
Divers
Thread ID:
00296895
Message ID:
00296895
Vues:
156
I have been using a MSWinsock control on a form in an application and now wish to using it in a program and want to put code in the dataarrival event. I have tried the following but it does not work I get an error that says 'Object class is invalid for this container.'

Osock = createobject("PrgSocket")
Osock.LocalPort = 5001
Osock.Protocol = 1

Define Class PrgSocket as OleControl
Oleclass = "MSWinsock.Winsock"
function DataArrival
lparameter bytestotal
wait window allt(str(bytestotal)) nowait
return
endfunc
enddefine

This however does work but I don't know how to add code to the dataarrival event.

Osock = createobject("MSWinsock.Winsock")
Osock.Protocol = 1
Osock.LocalPort = 5001

Any ideas would be greatly appreciated.
Thanks for the help!
David
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform