Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MSWinsock
Message
From
30/11/1999 10:58:08
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
MSWinsock
Miscellaneous
Thread ID:
00296895
Message ID:
00296895
Views:
157
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
Next
Reply
Map
View

Click here to load this message in the networking platform