Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Winsock control problem
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00807451
Message ID:
00807466
Views:
18
Richard,
Some structures are relatively easy to work with. These are structures that contain fixed length elements. Unfortunately, the hostent structure is not one of these. You may be able to parse the returned value using Ed Rauh's ClsHeap class. It's in the Download section. You can get an example of how to use it from the Netresource example (also in the Download section).

Having said that, since the structures are variable, I suggest using some other means to accomplish this. Perhaps you can use an ActiveX control using a more appropriate language (http://www.mabry.com/ftpx/index.htm).

Good luck.

>I have an app where I need to download items (using FTP) from the mainframe and then upload something different back. The mainframe people have instituted a requirement for an Account to be entered which means that WinInet is out. I have gotten the Control to download most of the file I need but (and this is the problem) it only downloads the file in its entirety basically when it feels like it (which isn't too often). I have tried inserting Doevents to see if it would have an effect on when DataArrival is fired to no avail. This is in the Data Connection DataArrival event code:
>
>*** ActiveX Control Event ***
>LPARAMETERS bytestotal
>
>LOCAL cData
>
>cData = REPLICATE(CHR(0),bytestotal)
>
>this.obJECT.GetData(@cData)
>
>thisform.x = thisform.x + cData
>
>The "x" property is exported out to a file using STRTOFILE() once the Data connection has been closed. PASV semantics don't affect the problem.
>
>I have been looking increasingly at using the Winsock API directly but need to know how to use the gethostbyname since it returns a pointer to a struct.
>
>Any help would be greatly appreciated.
>
>
>Richard Hamm
>State of FL, DCF
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform