Ftp

I am making an autoupdating program :) Here is what I have, but I think I am doing it wrong.

//Includes
#include <windows.h>
#include <fstream.h>
#include <iostream.h>
#include <string.h>
#include <afxinet.h>

//Try to connect
GetFtpConnection("download.nvidia.com", "anonymous", /*Email Addy*/"bski@aol.com", 23 , BOOL bPassive = FALSE );
Throw ( CInternetException );

//Get the file
char adrive[3];
GetEnvironmentVariable("SystemDrive", adrive, 3);
GetFile( "welcome.txt", strcat(adrive,":\welcome.txt"), BOOL bFailIfExists = TRUE, DWORD dwAttributes = FILE_ATTRIBUTE_NORMAL, DWORD dwFlags = FTP_TRANSFER_TYPE_BINARY, DWORD dwContext = 1 );

//Do not know how to end connection

-Cheers-
[818 byte] By [methsnax] at [2007-11-18 15:09:40]