Example: ftp_get_last_error_id

In the following example, the ftp_get_last_error_id function returns the last error id.

    #include "mic_ftp.h" 
    FTP pFTP; 
    char * error = 0; 
    long errId = 0; 
    pFTP = 0; 
    ftp_logon_ex (&pFTP, "FtpLogon", "URL=ftp://ftp.mycompany.com", 
            LAST ); 
    ftp_dir_ex (&pFTP, "FtpDir", "PATH=pub/test", 
            LAST );
    error = ftp_get_last_error (&pFTP); 
    errId = ftp_get_last_error_id (&pFTP); 
    ftp_logout_ex (&pFTP);