General information
Category:
ActiveX controls in VFP
Title:
Winsock control in build into a VFP Dll
I build my self a simple class that contain the Winsock control.
Define class myclass as form olepublic
ADD OBJECT oleclient AS olecontrol WITH ;
Top = 112, ;
Left = 133, ;
Height = 100, ;
Width = 100, ;
Name = "oleclient",;
oleclass = "Mswinsock.winsock.1"
procedure connect
this.oleclient.object.connect("208.0.209.242","21501")
return
PROCEDURE oleclient.DataArrival
*** ActiveX Control Event ***
LPARAMETERS bytestotal
local lcstring
lcstring = ""
=this.getdata(@lcstring, bytestotal)
enddefine
I build the above class into a DLL and perform the following
lo = crea('mydll.mytest')
lo.connect && succesfully connect because the winsock state is 7
on my server I issue senddata and the sever sendcomplete fired.
Now, my client should fire the oleclient.dataarrival, but it did not fire, It work when my client is run as a class not DLL. The Kinks is when I test it as a DLL the OLECLIENT.DATAARRIVAL did not fire????
Note: The server succesfully send data to the client, The CLient and Server succesfully connected. I can senddata out from the client to the server (VFP class that has winsock)
Help me !!!! :)
Wonder why?????
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only