Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: dheeraj kumar
  Where is dheeraj kumar?
 chandigarh
 India
 dheeraj kumar
 Tags
Subject: using winsock control
Thread ID: 209821 Message ID: 209821 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Active X Controls & OLE Automation
Date: Wednesday, December 31, 2008 12:43:22 PM         
   


dear experts

happy new year


I want to receive data from telephone exchange using winsock control.. Exchange has an IP ie 192.168.1.50, Port 5100, I'd gone thru the detail & downloaded a small program of winsock, but not able to receive it... It works fine with Windows Hyper Terminal

tcpserver is name of winsock control
txtoutput is name of textbox in which i want to show data

form Init Event
--------------
ThisForm.tcpServer.Object.LocalPort = 1001
ThisForm.tcpServer.Object.Listen


**************Winsock_DataArrival Event
*** ActiveX Control Event ***
LPARAMETERS bytestotal

strData = SPACE(256) && Define string to pass to GetData

This.Object.GetData(@strData)
ThisForm.txtOutput.Value = strData

*************winsock Connectionrequest Event
*** ActiveX Control Event ***
LPARAMETERS requestid
#DEFINE sckClosed 0
If This.Object.State <> sckClosed
This.Object.Close
ENDif
*!* Accept the request with the requestID
*!* parameter.
This.Object.Accept(requestID)

Kindly help


kumardheeraj

ENTIRE THREAD

using winsock control Posted by dheeraj kumar @ 12/31/2008 12:43:22 PM
RE: using winsock control Posted by Richard Clarke @ 12/31/2008 2:14:53 PM