Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Again with winsock
Message
De
13/07/2009 09:21:03
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01411849
Message ID:
01411891
Vues:
48
Now it seems to run ok even on mine...maybe it was the OLEPUBLIC form which made the difference :)
i will let you know as soon as I understand if it was it :)
thank you


>It runs fine on my PC with sub-classed winsock under VFP9.
>Try to make oFwsock a property of the Pop3EmailClass class
>
>* Init
>This.ofwsock = CreateObject('fwsock')
>This.oSocket = This.oFwsock.sock.object
>...
>
>* Destroy
>This.oSocket = NULL
>This.ofwsock = NULL
>
>
>>i don't have anything on it just the olecontrol attaching the winsock activex.
>>
>>here is the class code I got from the class browser
>>
>>DEFINE CLASS fwsock AS form OLEPUBLIC
>>
>>
>>	Top = 0
>>	Left = 0
>>	Height = 69
>>	Width = 104
>>	DoCreate = .T.
>>	Caption = "Form"
>>	Name = "fwsock"
>>
>>
>>	ADD OBJECT sock AS olecontrol WITH ;
>>		Top = 24, ;
>>		Left = 24, ;
>>		Height = 100, ;
>>		Width = 100, ;
>>		Name = "sock"
>>
>>
>>ENDDEFINE
>>
>>>What do you have on fwsock form besides mswinsock control? Any code?
>>>
>>>>the class i'm using is the one you can find at
>>>>
>>>>http://www.berezniker.com/content/pages/visual-foxpro/read-pop3-mail-using-winsock
>>>>
>>>>i changed a couple of lines to use the object containing the activex class :
>>>>
>>>>
>>>>    PROCEDURE INIT  
>>>>*    THIS.oSocket = CREATEOBJECT('mswinsock.winsock')   
>>>>	If type('ofwsock')   = 'O'
>>>>	    THIS.oSocket = oFwsock.sock.object 
>>>>	else    
>>>>		THIS.oSocket = CREATEOBJECT('mswinsock.winsock')   
>>>>	EndIf 	
>>>>    ENDPROC  
>>>>
>>>>
>>>>and in the main procedure I put
>>>>
>>>>ofwsock = CreateObject('fwsock')
>>>>
>>>>fwsock is a form which contains an olecontrol named sock where i load the winsock activex
>>>>
>>>>>Hi don't get a real error but if I use the original code i can connect to the email server , on the other hand if i use the modified code
>>>>>i get a timeout connection message and the connection is not possible
>>>>>
>>>>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform