Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending mail if Outlook Express is not default MAPI clie
Message
De
27/04/1999 01:52:46
Raul Davila
Davila Programming Services
Toa Alta, Porto Rico
 
 
À
26/04/1999 06:18:26
Guy Pardoe
Pardoe Development Corporation
Peterborough, New Hampshire, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00204649
Message ID:
00212398
Vues:
23
>What you listed is all new to me. How do you open a channel to the tcp/ip port? Is the example you listed for use in a .PRG or with an ActiveX control or what?
>
>Guy

I used the MS winsock control (mswinsck.ocx) mainly because it's free and comes already bundled with Windows.
Just register the control in VFP and drop it on a form, or instantiate it in a program, and set the Protocol, Remote Host and Port properties.

A small example:
WITH THISFORM.MySockControl
.Protocol = 0 && TCP Protocol
.RemoteHost = cRemoteServerAddress
.RemotePort = nRemoteServerPort
.OBJECT.Connect() && Must use .OBJECT since Connect is a property and a method
IF .STATE = 7 && connected!
.SendData(VariableWithDataToBeSent)
.GetData(@VariableToHoldReceivedData)
ENDIF

.OBJECT.Close() && Must use .OBJECT since Connect is a property and a method
ENDWITH

Depending on the type of server you are connecting to, you can establish a conversation via TCP/IP. I use this on a program I made to handle my ISP users were I send an Email notice when their accounts are close to be due.
R. Davila
DBA / Network Administrator
Administracion de Fomento Comercial
Gobierno de Puerto Rico

Still waiting for FoxPro for LINUX
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform