Category : C++ Source Code
Archive   : VMEMPP.ZIP
Filename : VMEMMGR.H

 
Output of file : VMEMMGR.H contained in archive : VMEMPP.ZIP
#if !defined __VMEMMGR_H
#define __VMEMMGR_H

#if !defined __STDIO_H
#include
#endif

const unsigned vmInMemory = 0x0001,
vmOnDisk = 0x0002,
vmInUse = 0x0004;

class VMemItem
{
friend class VMemBlocks;

void *buffer;
int lockflag;
unsigned flags;

public:

VMemItem() :
buffer(0),
lockflag(0),
flags(0)
{}
~VMemItem();

void clear();
};

class VMemBlocks
{
public:

VMemBlocks( int aLimit, unsigned aMemSize );
~VMemBlocks();

virtual int valid();
virtual void clear();

int allocate();
void *lock( int handle );
void unlock( int handle );
void free( int handle );

protected:

VMemItem *items;
int limit;
unsigned memSize;
void *defaultBuffer;
FILE *fp;

void *getBuffer();
void readFromFile( int index );
};

#endif // __VMEMMGR_H


  3 Responses to “Category : C++ Source Code
Archive   : VMEMPP.ZIP
Filename : VMEMMGR.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/