- Main Page
- Modules
- Classes
- Files

- Class List
- Class Members

# CxMemFile Class Reference

`#include <xmemfile.h>`

List of all members.

## Public Member Functions

| CxMemFile (BYTE *pBuffer=NULL, DWORD size=0)
| ~CxMemFile ()
bool | Open ()
BYTE * | GetBuffer (bool bDetachBuffer=true)
virtual bool | Close ()
virtual size_t | Read (void *buffer, size_t size, size_t count)
virtual size_t | Write (const void *buffer, size_t size, size_t count)
virtual bool | Seek (long offset, int origin)
virtual long | Tell ()
virtual long | Size ()
virtual bool | Flush ()
virtual bool | Eof ()
virtual long | Error ()
virtual bool | PutC (unsigned char c)
virtual long | GetC ()
virtual char * | GetS (char *string, int n)
virtual long | Scanf (const char *format, void *output)

## Protected Member Functions

bool | Alloc (DWORD nBytes)
void | Free ()

## Protected Attributes

BYTE * | m_pBuffer
DWORD | m_Size
bool | m_bFreeOnClose
long | m_Position
long | m_Edge

## Constructor & Destructor Documentation

CxMemFile::CxMemFile | ( | BYTE * | pBuffer = `NULL`,
|  | DWORD | size = `0` |
| ) |  |  |

CxMemFile::~CxMemFile | ( |  | ) |

## Member Function Documentation

bool CxMemFile::Open | ( |  | ) |

BYTE * CxMemFile::GetBuffer | ( | bool | bDetachBuffer = `true` | ) |

bool CxMemFile::Close | ( |  | ) | `[virtual]`

size_t CxMemFile::Read | ( | void * | buffer,
|  | size_t | size,
|  | size_t | count |
| ) |  |  | `[virtual]`

size_t CxMemFile::Write | ( | const void * | buffer,
|  | size_t | size,
|  | size_t | count |
| ) |  |  | `[virtual]`

bool CxMemFile::Seek | ( | long | offset,
|  | int | origin |
| ) |  |  | `[virtual]`

long CxMemFile::Tell | ( |  | ) | `[virtual]`

long CxMemFile::Size | ( |  | ) | `[virtual]`

bool CxMemFile::Flush | ( |  | ) | `[virtual]`

bool CxMemFile::Eof | ( |  | ) | `[virtual]`

long CxMemFile::Error | ( |  | ) | `[virtual]`

bool CxMemFile::PutC | ( | unsigned char | c | ) | `[virtual]`

long CxMemFile::GetC | ( |  | ) | `[virtual]`

char * CxMemFile::GetS | ( | char * | string,
|  | int | n |
| ) |  |  | `[virtual]`

long CxMemFile::Scanf | ( | const char * | format,
|  | void * | output |
| ) |  |  | `[virtual]`

bool CxMemFile::Alloc | ( | DWORD | nBytes | ) | `[protected]`

void CxMemFile::Free | ( |  | ) | `[protected]`

## Member Data Documentation

BYTE* CxMemFile::m_pBuffer`[protected]`

DWORD CxMemFile::m_Size`[protected]`

bool CxMemFile::m_bFreeOnClose`[protected]`

long CxMemFile::m_Position`[protected]`

long CxMemFile::m_Edge`[protected]`