Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WinSock.ocx or WSock32.dll
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00420387
Message ID:
00421382
Vues:
20
Larry,

Thanks for the info, if only this worked it would solve all my problems (well almost). Unfortunately I get the feeling that it simply does not with the WinSock control.

Below is a compressed version of the code I am using, am I doing something stupid or is this simply not possible?

Thanks,
Nick


LOCAL loVFPCom, loWinsock, loVFPWinSock

loVFPCom=CREATEOBJECT('VfpCom.ComUtil')
loWinsock=CREATEOBJECT('MSWinSock.WinSock')
loVFPWinSock=CREATEOBJECT('DMSWinsockControlEvents')
loVfpCom.BindEvents(loWinSock, loVFPWinSock)

? "Begin"
loWinSock.Close() && This line does not seem to work
? "After WinSockClose (which has not worked) but before VFPWinSockClose"
* loVFPWinSock.Close() && But this one does, just as if the objects have not bound correctly
? "End"

loVfpCom.UnBindEvents(loWinSock, loVFPWinSock)

DEFINE CLASS DMSWinsockControlEvents AS custom

PROCEDURE Close
* Add user code here
? "In VFP WinSock Close Event"
ENDPROC

PROCEDURE Connect
* Add user code here
ENDPROC

PROCEDURE ConnectionRequest(requestID)
* Add user code here
ENDPROC

PROCEDURE DataArrival(bytesTotal)
* Add user code here
ENDPROC

PROCEDURE Error(Number,Description,Scode,Source,HelpFile,HelpContext,CancelDisplay)
* Add user code here
ENDPROC

PROCEDURE SendComplete
* Add user code here
ENDPROC

PROCEDURE SendProgress(bytesSent,bytesRemaining)
* Add user code here
ENDPROC

ENDDEFINE
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform