1 #ifdef IO_USE_STD_LIB_FILE_IO
2 
3 #pragma once
4 
5 #include "IO.h"
6 
7 namespace APE
8 {
9 
10 class CStdLibFileIO : public CIO
11 {
12 public:
13     // construction / destruction
14     CStdLibFileIO();
15     ~CStdLibFileIO();
16 
17     // open / close
18     int Open(const wchar_t * pName, bool bOpenReadOnly = false);
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(intn nDistance, unsigned int nMoveMode);
27 
28     // other functions
29     int SetEOF();
30 
31     // creation / destruction
32     int Create(const wchar_t * pName);
33     int Delete();
34 
35     // attributes
36     int GetPosition();
37     unsigned int GetSize();
38     int GetName(wchar_t * pBuffer);
39     int GetHandle();
40 
41 private:
42 
43     wchar_t m_cFileName[MAX_PATH];
44     bool m_bReadOnly;
45     FILE * m_pFile;
46 };
47 
48 }
49 
50 #endif // #ifdef IO_USE_STD_LIB_FILE_IO
51