void (CALLBACK* pfnDownloadError) (FVSDK_CALLBACK_DATA pvDownloadErrorData, long nErr, long nCause, LPCTSTR pszError, LPCTSTR pszRemotePath, LPCTSTR pszDestFileName, LPCTSTR pszExtraInfo);
Called when an error occurred while downloading a file using the high-level function FVSDK_Download().
pvDownloadErrorData
The DWORD value set in the FVSDK_Session structure. The meaning of this value is application defined.
nErr
The error number as found in FtpTreeErrors.h
FTPTREE_DE_CANT_CREATE_TEMP_DIR could not create the temporary directory FTPTREE_DE_MAGIC_FILE could not find the magic file (internal use for drag and drop) FTPTREE_DE_FILE_NOT_FOUND the file was not found on the server FTPTREE_DE_CAN_ONLY_BE_A_FILE the specified file name is actually a folder FTPTREE_DE_FILE_ERROR see error causes as found in FtpTreeErrors.h
nCause
The cause of the error as found in FtpTreeErrors.h
FTPTREE_FE_generic unknown or generic file error FTPTREE_FE_fileNotFound file was not found FTPTREE_FE_badPath the specified path is invalid FTPTREE_FE_tooManyOpenFiles too many files are already open FTPTREE_FE_accessDenied access to the file or folder is denied FTPTREE_FE_invalidFile the file is invalid FTPTREE_FE_removeCurrentDir the current directory is gone FTPTREE_FE_directoryFull the directory is full FTPTREE_FE_badSeek error moving disk head to specified location FTPTREE_FE_hardIO a hardware I/O error occurred FTPTREE_FE_sharingViolation a sharing violoation occurred, the file may be in use FTPTREE_FE_lockViolation the file is locked by another process FTPTREE_FE_diskFull the disk drive is full FTPTREE_FE_endOfFile the end of the file has been encountered
pszError
The error string contining information about the error.
pszRemotePath
A NULL terminated string containing the full remote (source) path for the file.
pszDestFileName
A NULL terminated string containing the full local (destination) path for the file.
pszExtraInfo
A NULL terminated string containing extra information that may be useful to the specific error.
None
void CALLBACK OnDownloadError(FVSDK_CALLBACK_DATA pvData, long nErr, long nCause, LPCTSTR pszError, LPCTSTR pszRemotePath, LPCTSTR pszDestFileName, LPCTSTR pszExtraInfo)
{
LPCTSTR pszFmt = "A download error has occurred.\r\n\r\nnErr:\t\t%d\r\nlCause:\t\t%d\r\npszError:\t\t%s\r\nlpszFilePath:\t%s\r\nlpszDestFileName:\t%s\r\nlpszExtraInfo:\t%s";
CString sMsg;
// build the message
// for a definition of nErr, refer to FtpTreeErrors.h
sMsg.Format(pszFmt, nErr, nCause, pszError, pszRemotePath, pszDestFileName, pszExtraInfo);
// put up a simple error message
AfxMessageBox(sMsg, (MB_ICONEXCLAMATION | MB_OK));
} // OnDownloadError