Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with FTP - FAQ184-3234

Status
Not open for further replies.

cjulio

Programmer
Aug 14, 2002
114
PT
FAQ184-3234

Hello i have try the procedures in the faq and they are great.

but the ftpget does not whork.

I dont now if it is because i am acessing to the internet acros a network.

can any one help me????
 
i have sean what my problem whas.

it whas that ftp file had upper case "T" and i have writen in lowercase "t"
 
Does thse definitons help?

hFtpSession = InternetConnect (hOpen, strHost,;
INTERNET_INVALID_PORT_NUMBER,;
strUser, strPwd,;
INTERNET_SERVICE_FTP, 0, 0)

lnResult = FtpGetFile (hFtpSession, lpszRemoteFile, lpszNewFile,;
fFailIfExists, FILE_ATTRIBUTE_NORMAL, FTP_TRANSFER_TYPE_ASCII,;
dwContext)


#DEFINE INTERNET_INVALID_PORT_NUMBER 0
#DEFINE INTERNET_OPEN_TYPE_DIRECT 1
#DEFINE INTERNET_SERVICE_FTP 1
#DEFINE FTP_TRANSFER_TYPE_ASCII 1
#DEFINE FTP_TRANSFER_TYPE_BINARY 2
#DEFINE INTERNET_FLAG_NEED_FILE 16
#DEFINE FILE_ATTRIBUTE_DIRECTORY 16

#DEFINE GENERIC_READ 2147483648 && &H80000000
#DEFINE GENERIC_WRITE 1073741824 && &H40000000

DECLARE INTEGER InternetOpen IN wininet.dll;
STRING sAgent, INTEGER lAccessType, STRING sProxyName,;
STRING sProxyBypass, STRING lFlags

DECLARE INTEGER InternetCloseHandle IN wininet.dll INTEGER hInet

DECLARE INTEGER InternetConnect IN wininet.dll;
INTEGER hInternetSession, STRING sServerName,;
INTEGER nServerPort, STRING sUsername, STRING sPassword,;
INTEGER lService, INTEGER lFlags, INTEGER lContext

DECLARE INTEGER FtpFindFirstFile IN wininet.dll;
INTEGER hFtpSession, STRING lpszSearchFile,;
STRING @lpFindFileData, INTEGER dwFlags, INTEGER dwContent

DECLARE INTEGER InternetFindNextFile IN wininet.dll;
INTEGER hFind, STRING @lpvFindData

DECLARE INTEGER FtpGetCurrentDirectory IN wininet.dll;
INTEGER hFtpSession, STRING @lpszDirectory,;
INTEGER @lpdwCurrentDirectory

DECLARE INTEGER FtpSetCurrentDirectory IN wininet.dll;
INTEGER hFtpSession, STRING @lpszDirectory

DECLARE INTEGER FtpOpenFile IN wininet.dll;
INTEGER hFtpSession, STRING sFileName, INTEGER lAccess,;
INTEGER lFlags, INTEGER lContext

DECLARE INTEGER InternetReadFile IN wininet.dll;
INTEGER hFile, STRING @lpBuffer,;
INTEGER dwNumberOfBytesToRead, INTEGER @lpdwNumberOfBytesRead

DECLARE INTEGER FileTimeToSystemTime IN kernel32.dll;
STRING @lpFileTime, STRING @lpSystemTime

DECLARE LONG URLDownloadToFile IN URLMON.DLL ;
LONG, STRING, STRING, LONG, LONG

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top