zipbigfile.cpp
来自「文件压缩/解压动态链接库」· C++ 代码 · 共 42 行
CPP
42 行
// ZipBigFile.cpp: implementation of the CZipBigFile class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "ZipBigFile.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
IMPLEMENT_DYNAMIC(CZipBigFile, CFile)
CZipBigFile::CZipBigFile()
{
}
CZipBigFile::~CZipBigFile()
{
}
_int64 CZipBigFile::Seek(_int64 dOff, UINT nFrom)
{
ASSERT_VALID(this);
ASSERT(m_hFile != (UINT)hFileNull);
ASSERT(nFrom == begin || nFrom == end || nFrom == current);
ASSERT(begin == FILE_BEGIN && end == FILE_END && current == FILE_CURRENT);
LARGE_INTEGER li;
li.QuadPart = dOff;
li.LowPart = ::SetFilePointer((HANDLE)m_hFile, li.LowPart, &li.HighPart, (DWORD)nFrom);
DWORD dw = GetLastError();
if ((li.LowPart == (DWORD)-1) && (dw != NO_ERROR))
{
CFileException::ThrowOsError((LONG)dw);
}
return li.QuadPart;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?