Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending mail if Outlook Express is not default MAPI clie
Message
From
27/04/1999 01:52:46
Raul Davila
Davila Programming Services
Toa Alta, Puerto Rico
 
 
To
26/04/1999 06:18:26
Guy Pardoe
Pardoe Development Corporation
Peterborough, New Hampshire, United States
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00204649
Message ID:
00212398
Views:
24
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform