Fixed a BUG of VC++ 6.0
来源:互联网 发布:数据化人生奇书 编辑:程序博客网 时间:2024/05/21 21:44
MSDN documentation states that for files larger than 4 gigabytes,there is the CFileFind::GetLength64() function that returns the size as 64Bit number.But the function just return a wrong 32Bit number. Damn Microsoft!
Solution: write a derived class(CMyFtpFileFind) from CFtpFileFind,and implementing the GetLength64() member function correctly. Replace this derived class with CFtpFileFind.
Reference: http://www.codeproject.com/KB/bugs/getlength64bug.asp.aspx?print=true
Solution: write a derived class(CMyFtpFileFind) from CFtpFileFind,and implementing the GetLength64() member function correctly. Replace this derived class with CFtpFileFind.
Reference: http://www.codeproject.com/KB/bugs/getlength64bug.asp.aspx?print=true
Last version: https://gist.github.com/978421
Source code as following text:
class CMyFtpFileFind : public CFtpFileFind{public:CMyFtpFileFind(CFtpConnection* pConnection, DWORD dwContext = 1) : CFtpFileFind(pConnection, dwContext){}virtual ~CMyFtpFileFind() { }__int64 GetLength64() const{ASSERT(m_hContext != NULL);ASSERT_VALID(this);unsigned __int64 uRet = 0;if (m_pFoundInfo != NULL){unsigned __int64 uFileSizeLow = ((LPWIN32_FIND_DATA) m_pFoundInfo)->nFileSizeLow;unsigned __int64 uFileSizeHigh = ((LPWIN32_FIND_DATA) m_pFoundInfo)->nFileSizeHigh;uRet = uFileSizeLow + (uFileSizeHigh << 32);}return uRet;}}; // CMyFtpFileFind
- Fixed a BUG of VC++ 6.0
- KernelBugFixing - A day in the life of a fixed bug
- Record of NS_Simulator bug fixed.
- bug fixed
- a bug of ez4.3
- IE6 fixed bug
- bootstrap bug fixed
- vc++6.0的BUG
- a bug of building PPP module
- [Repaste] Anatomy of a good bug report
- [lwn] A nasty file corruption bug - fixed (关于Linus解决的一个set_page_dirty很隐蔽的bug)
- 一个bug至今没有fixed
- bug fixed 系列之一:前言
- vc++6.0的一个BUG
- VC 6.0添加文件BUG
- VC++6.0的一个bug
- 修正IE6不支持position:fixed的bug
- 修正IE6不支持position:fixed的bug
- 混乱的函数
- 编程时的小规范确实能减少bug
- SSCE(SQL Server Compact Edition)适合哪些应用场景
- RAC安装几大错误
- Axis2数据绑定报错
- Fixed a BUG of VC++ 6.0
- 一种规则和统计相结合的分词算法
- 做好记录---为了以后可以方便查询
- SWF文件结构解析
- Windows下编译memcached-1.4.5(32bit和64bit)
- IO与文件读写---Java的IO流架构
- Collections
- 函数发生器程序
- 函数发生器程序