You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
//<2F><>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>:
|
|
|
|
|
|
// SegY<67><59>д<EFBFBD><D0B4>
|
|
|
|
|
|
//
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д: 2008-11-09
|
|
|
|
|
|
//
|
|
|
|
|
|
//
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
#include "filesegy.h"
|
|
|
|
|
|
#include ".\filemapping.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace NFile64
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
class CFileSegyMapping :
|
|
|
|
|
|
public CFileSegy
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
CFileSegyMapping(void);
|
|
|
|
|
|
virtual ~CFileSegyMapping(void);
|
|
|
|
|
|
|
|
|
|
|
|
virtual BOOL Open(LPCTSTR lpFileName);
|
|
|
|
|
|
virtual __int64 Seek(__int64 offset, int origin);
|
|
|
|
|
|
virtual UINT Read(void* lpBuf, UINT nCount);
|
|
|
|
|
|
virtual void Close(void);
|
|
|
|
|
|
virtual BOOL IsOpen(void);
|
|
|
|
|
|
|
|
|
|
|
|
BOOL IsMappingOpen(void);
|
|
|
|
|
|
BOOL IsRemapping(ULONGLONG offset);
|
|
|
|
|
|
CFileMapping* GetFileMapping(void);
|
|
|
|
|
|
void SetRemappingSize(DWORD nSize); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD><D3B3><EFBFBD>ߴ磬<DFB4><E7A3AC><EFBFBD>ֶ<EFBFBD>ӳ<EFBFBD><D3B3>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>õ<EFBFBD>ӳ<EFBFBD><D3B3><EFBFBD><EFBFBD>β<EFBFBD><CEB2><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ӳ<EFBFBD><D3B3>,ȱʡΪ1M
|
|
|
|
|
|
void SetMappingSize(DWORD nSize); //<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>ӳ<EFBFBD><D3B3><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>,ȱʡΪ512M
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
CFileMapping* m_pfMap;
|
|
|
|
|
|
ULONGLONG m_ulFileLength;
|
|
|
|
|
|
DWORD m_nRemappingSize;
|
|
|
|
|
|
DWORD m_nMappingSize;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
inline CFileMapping* CFileSegyMapping::GetFileMapping(void)
|
|
|
|
|
|
{
|
|
|
|
|
|
return m_pfMap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline BOOL CFileSegyMapping::IsMappingOpen(void)
|
|
|
|
|
|
{
|
|
|
|
|
|
if(m_pfMap)
|
|
|
|
|
|
if(m_pfMap->IsOpen()) return TRUE;
|
|
|
|
|
|
return FALSE;
|
|
|
|
|
|
}
|