FtpGetFile (wininet)
Last changed: Yves Vaillancourt-207.61.255.171

.
Summary
Retrieves a file from the FTP server and stores it under the specified file name, creating a new local file in the process.

C# Signature:

[DllImport("wininet.dll", SetLastError = true, CharSet = CharSet.Auto)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool FtpGetFile(IntPtr hConnect, string remoteFile,
   string newFile, [MarshalAs(UnmanagedType.Bool)] bool failIfExists,
   int flagsAndAttributes, int flags, IntPtr context);

VB Signature:

Declare Function FtpGetFile Lib "wininet.dll" (ByVal hConnect As IntPtr, _
   ByVal remoteFile As String, ByVal newFile As String, _
   <MarshalAs(UnmanagedType.Bool)> ByVal failIfExists As Boolean, _
   ByVal flagsAndAttributes As Integer, ByVal flags As Integer, _
   ByVal context As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

Documentation
FtpGetFile on MSDN

Direct Link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/FtpGetFile.asp