void (CALLBACK* pfnUploadError) (FVSDK_CALLBACK_DATA pvUploadErrorData, long nErr, long nCause, LPCTSTR pszError, LPCTSTR pszRemotePath, LPCTSTR pszLocalPath);
Called when an error occurred while uploading a file using the high-level function FVSDK_Upload().
pvUploadErrorData
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_UE_FTP_ERROR retries have been exhausted, an error occurred FTPTREE_UE_FILE_ERROR see error causes as found in FtpTreeErrors.h FTPTREE_UE_UNABLE_TO_DELETE_LOCAL the local file could not be deleted FTPTREE_UE_FILE_NOT_FOUND the source file could not be found FTPTREE_UE_DEST_NOT_DIRECTORY the specified destination must be a directory FTPTREE_UE_NO_DEST_DIRECTORY the destination directory does not exist
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 (destination) path for the file.
pszLocalPath
A NULL terminated string containing the full local (source) path for the file.
None
void CALLBACK OnUploadError(FVSDK_CALLBACK_DATA pvData, long nErr, long nCause, LPCTSTR pszError, LPCTSTR pszRemotePath, LPCTSTR pszLocalPath)
{
LPCTSTR pszFmt = "An upload 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";
CString sMsg;
// build the message
// for a definition of nErr, refer to FtpTreeErrors.h
sMsg.Format(pszFmt, nErr, nCause, pszError, pszRemotePath, pszLocalPath);
// put up a simple error message
AfxMessageBox(sMsg, (MB_ICONEXCLAMATION | MB_OK));
} // OnUploadError