Xceed FTP Library Documentation
Example topics / SendFile quick method example (Visual C++ ATL)
In This Topic
    SendFile quick method example (Visual C++ ATL)
    In This Topic

    Here is an example of using the XceedQuickFtp control's SendFile method with ATL. Includes error handling.

    Visual C++ ATL Copy Code

    #import "XceedFtp.dll" named_guids no_namespace

    CoInitialize( NULL );

    try
    {
       IXceedQuickFtpPtr piQuickFtp( CLSID_XceedQuickFtp );
    piQuickFtp->License( _bstr_t( L"your license key ) );

       piQuickFtp->SendFile( "192.168.0.200", 21, "anonymous", "guest", "e:\\ReadMe.txt", "ReadMe_Sent.txt", FALSE );
    }
    catch ( const _com_error xErr )
    {
       printf( "Error : %s\n", ( const WCHAR* ) xErr.Description );
    }
    catch( ... )
    {
       printf( "Unexpected error" );
    }

    CoUninitialize();
    return 0;