Files
Mozilla/mozilla/modules/plugin/tools/XPIPackager/ZipBigFile.cpp
(no author) b4b70055bb This commit was manufactured by cvs2svn to create branch
'AVIARY_1_0_20040515_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/AVIARY_1_0_20040515_BRANCH@156431 18797224-902f-48f8-a5cc-f745e15eee43
2004-05-15 19:32:54 +00:00

42 lines
987 B
C++

// 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;
}