Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Telnet Vs WinSock... WinSock Didn't Return Data?
Message
De
19/03/2007 17:32:17
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Telnet Vs WinSock... WinSock Didn't Return Data?
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01205858
Message ID:
01205858
Vues:
99
I can connect to my network printer using Telnet. I just config as Ethernet protocol with IP address of printer, and pass Printer Job Language... "@PJL INFO ID" to get the name of the printer, OR "@PJL INFO STATUS" to get the current status. The response is displayed in the Telnet screen. Everything works fine for the test.

But I need to know how to return the printer response into a variable or file instead of the screen. I tried the OLE control "MsWinSock.WinSock.1" in a VFP form. I set property Protocol to 1-UDP and IP address of the same network printer, then the connection is successful. After I use SendData passing parameter "@PJL INFO ID" and the DataArrival event is triggered, and bytestotal = 1. The problem is when I try to GetData. First I declare a varible of type variant, and pass it as it to GetData... but nothing is returned. I don't know if I don't use GetData correclty or if no data is returned. Any idea?
Marc Levesque
La Prairie, Quebec (CANADA)
marc.levesque@videotron.ca
Répondre
Fil
Voir

Click here to load this message in the networking platform