forked from lioncash/ExtractData
-
Notifications
You must be signed in to change notification settings - Fork 0
/
File.h
31 lines (26 loc) · 784 Bytes
/
File.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once
#include "Common.h"
#define FILE_READ 0
#define FILE_WRITE 1
class CFile
{
protected:
HANDLE m_hFile;
public:
CFile();
virtual ~CFile();
virtual HANDLE Open(LPCTSTR pFileName, DWORD Mode);
virtual BOOL OpenForRead(LPCTSTR pszFileName);
virtual BOOL OpenForWrite(LPCTSTR pszFileName);
virtual void Close();
virtual DWORD Read(LPVOID buf, DWORD size);
virtual DWORD ReadLine(LPVOID buf, DWORD dwBufSize, BOOL bDeleteLineCode = FALSE);
virtual DWORD Write(LPCVOID buf, DWORD size);
virtual void WriteLine(LPCVOID buf);
virtual QWORD Seek(INT64 offset, DWORD SeekMode);
virtual QWORD SeekHed(INT64 offset = 0);
virtual QWORD SeekEnd(INT64 offset = 0);
virtual QWORD SeekCur(INT64 offset);
virtual QWORD GetFilePointer();
virtual QWORD GetFileSize();
};