Floyd
April 28th, 1999, 01:23 PM
Ok... for those of you that are looking for a cheap and dirty way of accessing FTP/HTTP/GOPHER lookup the information on WinInet.h. There is a very complete description of the quick and easy way to use it titled "Advanced FTP, or Teaching Fido to Phetch" in the MSDN Library, that shows how to access a FTP server. The online version of the document is at http://msdn.microsoft.com/library/techart/msdn_advftp.htm
When you look at this keep in mind there are 2 mistakes that I've found so far. When creating the FTPSession you do NOT include "ftp://" at the beggining of the addres. Also, when accessing the file structure you do NOT include the address... as in "ftp.microsoft.com/test.txt" would be accessed as "/test.txt". Those two little mistakes in the document had me running around in circles for over an hour.
Also. you have to include wininet.lib into your linked libraries, otherwise none of the code will work.
I hope this saves some people some greif and some time when looking for a quick dirty way to get at FTP/HTTP files.
When you look at this keep in mind there are 2 mistakes that I've found so far. When creating the FTPSession you do NOT include "ftp://" at the beggining of the addres. Also, when accessing the file structure you do NOT include the address... as in "ftp.microsoft.com/test.txt" would be accessed as "/test.txt". Those two little mistakes in the document had me running around in circles for over an hour.
Also. you have to include wininet.lib into your linked libraries, otherwise none of the code will work.
I hope this saves some people some greif and some time when looking for a quick dirty way to get at FTP/HTTP files.