Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
471 B

#ifndef __FILEMAP_H__
#define __FILEMAP_H__
class CFileMap : public CObject {
public:
CFileMap();
~CFileMap();
BOOL bOpen(LPCTSTR FileName,BOOL ReadOnly=TRUE);
BOOL bClose();
LPBYTE GetMemPtr() {return m_Memory;}
DWORD GetFileSize() {return m_FileSize;}
UINT_PTR GetOffset(LPBYTE Tag) {return Tag - m_Memory;}
protected:
LPBYTE m_Memory;
HANDLE m_FileMapping;
HANDLE m_FileHandle;
DWORD m_FileSize;
};
#endif