1#ifdef IO_USE_STD_LIB_FILE_IO
2
3#ifndef APE_STDLIBFILEIO_H
4#define APE_STDLIBFILEIO_H
5
6#include "IO.h"
7#include "NoWindows.h"
8
9class CStdLibFileIO : public CIO
10{
11public:
12
13    // construction / destruction
14    CStdLibFileIO();
15    ~CStdLibFileIO();
16
17    // open / close
18    int Open(LPCTSTR pName);
19    int Close();
20
21    // read / write
22    int Read(void * pBuffer, unsigned int nBytesToRead, unsigned int * pBytesRead);
23    int Write(const void * pBuffer, unsigned int nBytesToWrite, unsigned int * pBytesWritten);
24
25    // seek
26    int Seek(int nDistance, unsigned int nMoveMode);
27
28    // other functions
29    int SetEOF();
30
31    // creation / destruction
32    int Create(const char* pName);
33    int Delete();
34
35    // attributes
36    int GetPosition();
37    int GetSize();
38    int GetName(char* pBuffer);
39    int GetHandle();
40
41private:
42
43    char m_cFileName[MAX_PATH];
44    BOOL m_bReadOnly;
45    FILE * m_pFile;
46};
47
48#endif // #ifndef APE_STDLIBFILEIO_H
49
50#endif // #ifdef IO_USE_STD_LIB_FILE_IO
51
52