Click here to Skip to main content
15,896,154 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Hi I want to know how to distinguish two mouse signal. Pin
Charles of Korea12-Sep-07 16:38
Charles of Korea12-Sep-07 16:38 
AnswerRe: Hi I want to know how to distinguish two mouse signal. Pin
ghle13-Sep-07 8:05
ghle13-Sep-07 8:05 
QuestionMessage Removed Pin
12-Sep-07 11:07
Armond Sarkisian12-Sep-07 11:07 
AnswerRe: C++ FTP Functions Pin
Mark Salsbery12-Sep-07 11:15
Mark Salsbery12-Sep-07 11:15 
GeneralMessage Removed Pin
12-Sep-07 12:52
Armond Sarkisian12-Sep-07 12:52 
GeneralMessage Removed Pin
12-Sep-07 13:24
Armond Sarkisian12-Sep-07 13:24 
GeneralRe: C++ FTP Functions Pin
Mark Salsbery12-Sep-07 14:01
Mark Salsbery12-Sep-07 14:01 
GeneralRe: C++ FTP Functions Pin
Mark Salsbery12-Sep-07 13:56
Mark Salsbery12-Sep-07 13:56 
Armond Sarkisian wrote:
Using the functions above, how would I be able to use a wildcare?

Armond Sarkisian wrote:
I want to be able to grab all zip files from ftp://my_ftp/files/*.zip


Here's a basic example:
    HINTERNET hInet = ::InternetOpen(NULL, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
    HINTERNET hFTPSession = ::InternetConnect(hInet, _T("127.1.0.0"), INTERNET_DEFAULT_FTP_PORT, NULL, NULL, INTERNET_SERVICE_FTP, 0, 0);

    WIN32_FIND_DATA FindData;
    HINTERNET hFtpFind = ::FtpFindFirstFile(hFTPSession, _T("path\\*.zip"), &FindData, 0, 0);
    if (hFtpFind)
    {
        do
        {
            TCHAR szFileName[MAX_PATH];
            _tcscpy_s(szFileName, FindData.cFileName);

           <font color="Red">//** Do something with the file name here (e.g. Download the file)</font>
        }
        while (::InternetFindNextFile(hFtpFind, &FindData));

        ::InternetCloseHandle(hFtpFind);
    }
    else
    {
        //** Example error handling

        DWORD dwError = GetLastError();
        if(dwError == ERROR_NO_MORE_FILES)
        {
        }
        else
        {
        }
    }

    ::InternetCloseHandle(hFTPSession);
    ::InternetCloseHandle(hInet);

Info about the WinInet functions: WinInet Functions[^]

Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralMessage Removed Pin
12-Sep-07 15:23
Armond Sarkisian12-Sep-07 15:23 
GeneralRe: C++ FTP Functions Pin
Mark Salsbery12-Sep-07 16:46
Mark Salsbery12-Sep-07 16:46 
GeneralMessage Removed Pin
13-Sep-07 7:57
Armond Sarkisian13-Sep-07 7:57 
GeneralRe: C++ FTP Functions Pin
Mark Salsbery13-Sep-07 8:12
Mark Salsbery13-Sep-07 8:12 
GeneralMessage Removed Pin
13-Sep-07 8:18
Armond Sarkisian13-Sep-07 8:18 
GeneralRe: C++ FTP Functions Pin
Mark Salsbery13-Sep-07 8:32
Mark Salsbery13-Sep-07 8:32 
GeneralMessage Removed Pin
13-Sep-07 8:39
Armond Sarkisian13-Sep-07 8:39 
GeneralRe: C++ FTP Functions Pin
Mark Salsbery13-Sep-07 8:52
Mark Salsbery13-Sep-07 8:52 
Question[Message Deleted] Pin
Herboren11-Sep-07 14:16
Herboren11-Sep-07 14:16 
AnswerRe: Understanding pointers Pin
George L. Jackson11-Sep-07 17:52
George L. Jackson11-Sep-07 17:52 
AnswerRe: Understanding pointers Pin
Hamid_RT12-Sep-07 23:07
Hamid_RT12-Sep-07 23:07 
AnswerRe: [Message Deleted] Pin
Russell'13-Sep-07 22:19
Russell'13-Sep-07 22:19 
GeneralRe: [Message Deleted] Pin
George L. Jackson14-Sep-07 11:36
George L. Jackson14-Sep-07 11:36 
GeneralRe: [Message Deleted] Pin
Russell'14-Sep-07 22:29
Russell'14-Sep-07 22:29 
Questionsetup project Pin
Franken10-Sep-07 9:15
Franken10-Sep-07 9:15 
QuestionHelp me about " template" Pin
ubriela10-Sep-07 5:26
ubriela10-Sep-07 5:26 
AnswerRe: Help me about " template" Pin
Mark Salsbery10-Sep-07 5:46
Mark Salsbery10-Sep-07 5:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.