Solved

FtpGetFile parameter question

Posted on 2003-12-08
2
619 Views
Last Modified: 2008-03-10
I need to get either a binary or ascii file from a remote server.  I saw postings on EE that the API call could be:

bRC = FtpGetFile(m_hConnect, sRemoteFile, sLocalFile, False, _
                                  INTERNET_FLAG_RELOAD, m_dwFlags, 0)

where I'll set m_dwFlags = FTP_TRANSFER_TYPE_BINARY or to = FTP_TRANSFER_TYPE_ASCII

I read on MS's web site that the INTERNET_FLAG_RELOAD should be or'd w/the m_dwFlags and the 4th parm should be a FILE_ATTRIBUTE_* constant.  So, I changed the API call to be:

bRC = FtpGetFile(m_hConnect, sRemoteFile, sLocalFile, False, _
                         FILE_ATTRIBUTE_NORMAL, m_dwFlags Or INTERNET_FLAG_RELOAD, 0)

What's correct?  Please assign.

Thanks.
0
Comment
Question by:halfondj
  • 2
2 Comments
 
LVL 14

Expert Comment

by:ajexpert
ID: 9896137
0
 
LVL 14

Accepted Solution

by:
ajexpert earned 500 total points
ID: 9896144
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now