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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
#ifdef IO_USE_STD_LIB_FILE_IO
#ifndef APE_STDLIBFILEIO_H
#define APE_STDLIBFILEIO_H
#include "IO.h"
class CStdLibFileIO : public CIO
{
public:
// construction / destruction
CStdLibFileIO();
~CStdLibFileIO();
// open / close
int Open(LPCTSTR pName);
int Close();
// read / write
int Read(void * pBuffer, unsigned int nBytesToRead, unsigned int * pBytesRead);
int Write(const void * pBuffer, unsigned int nBytesToWrite, unsigned int * pBytesWritten);
// seek
int Seek(int nDistance, unsigned int nMoveMode);
// other functions
int SetEOF();
// creation / destruction
int Create(const char * pName);
int Delete();
// attributes
int GetPosition();
int GetSize();
int GetName(char * pBuffer);
int GetHandle();
private:
char m_cFileName[MAX_PATH];
BOOL m_bReadOnly;
FILE * m_pFile;
};
#endif // #ifndef APE_STDLIBFILEIO_H
#endif // #ifdef IO_USE_STD_LIB_FILE_IO
|