home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Supreme Volume 6 #1
/
swsii.zip
/
swsii
/
215
/
DDJ9210.ZIP
/
DPMI.ASC
< prev
next >
Wrap
Text File
|
1992-08-26
|
1KB
|
82 lines
_DPMI MEETS C++_
by Frederick Hewett
Example 1
class DPMIhost {
public:
DPMIhost(void);
DPMIerr getStatus(void);
boolean enterProtectedMode(uChar bitness);
void getVersion(uChar *major, uChar *minor);
uChar getSelectorDelta(void);
}
Example 2
class Block {
public:
Block(uLong size);
~Block(void);
boolean setSize(uLong);
uLong blockHandle(void);
uLong blockSize(void);
uLong blockBase(void);
protected:
uLong handle;
uLong base;
uLong size;
}
Example 3
class AbstractSegment
{
public:
virtual uLong segmentSize(void);
virtual uLong segmentBase(void);
virtual booelan queryProp(SegmentProp_t);
virtual operator+(SegmentProp_t)=0;
virtual operator-(SegmentProp_t)=0;
virtual boolean resize(uShort)=0;
virtual boolean move(uLong)=0;
void far *ptrTo(void);
protected:
selector_t selector;
}
Example 4
typedef enum SegmentProperty {
present,
executable,
readable,
writable,
big,
expandDown
} SegmentProp_t;
Example 5
if (myDataSeg + executable)
{
// operation succeeded
}
else
{
// operation failed
}