Category : C++ Source Code
Archive   : VMVCPP.ZIP
Filename : EMS.H

 
Output of file : EMS.H contained in archive : VMVCPP.ZIP
/***
*ems.h -
*
* Copyright (c) 1989-1992, Microsoft Corporation. All rights reserved.
*
*******************************************************************************/

typedef unsigned HEMS;
typedef HEMS _far *PHEMS;

#pragma pack(1)

typedef struct handle_page_struct {
HEMS hems;
unsigned cPage;
} handle_page;

typedef struct log_phys_map_struct {
unsigned iPageLogical;
union {
unsigned iPagePhysical;
_segment segPage;
};
} log_phys_map;

typedef struct map_and_jump_struct {
void _far *pTarget;
unsigned char cPage;
log_phys_map _far *pMap;
} map_and_jump;

typedef struct map_and_call_struct {
void _far *pTarget;
unsigned char cPageNew;
log_phys_map _far *pMapNew;
unsigned char cPageOld;
log_phys_map _far *pMapOld;
unsigned reserved[4];
} map_and_call;

typedef struct move_source_dest_struct {
unsigned long cb;
unsigned char fEmsSource;
HEMS hemsSource;
unsigned ibSource;
union {
unsigned iPageSource;
_segment segSource;
};
unsigned char fEmsDest;
HEMS hemsDest;
unsigned ibDest;
union {
unsigned iPageDest;
_segment segDest;
};
} move_source_dest;

#pragma pack()

int PUBLIC _far __FEmsCheckInstalled(void);

ERR PUBLIC _far __ErrEmsGetStatus(void);
ERR PUBLIC _far __ErrEmsGetPageFrameAddress(_segment _far *pseg);
ERR PUBLIC _far __ErrEmsGetUnallocatedPageCount(unsigned _far *pcPage, unsigned _far *pcPageTotal);
ERR PUBLIC _far __ErrEmsAllocatePages(PHEMS phems, unsigned cPage);
ERR PUBLIC _far __ErrEmsMapHandlePage(HEMS hems, unsigned char iPagePhysical, unsigned iPageLogical);
ERR PUBLIC _far __ErrEmsDeallocatePages(HEMS hems);
ERR PUBLIC _far __ErrEmsGetVersion(unsigned char _far *pbVersion);
ERR PUBLIC _far __ErrEmsSavePageMap(HEMS hems);
ERR PUBLIC _far __ErrEmsRestorePageMap(HEMS hems);
ERR PUBLIC _far __ErrEmsGetHandleCount(unsigned _far *pcOpenHandles);
ERR PUBLIC _far __ErrEmsGetHandlePages(HEMS hems, unsigned _far *pcPage);
ERR PUBLIC _far __ErrEmsGetAllHandlePages(handle_page (*pHandlePage)[], unsigned _far *pcOpenHandles);
ERR PUBLIC _far __ErrEmsGetPageMap(void _far *pPageMap);
ERR PUBLIC _far __ErrEmsSetPageMap(void _far *pPageMap);
ERR PUBLIC _far __ErrEmsGetSetPageMap(void _far *pPageMapIn, void _far *pPageMapOut);
ERR PUBLIC _far __ErrEmsGetSizeOfPageMap(unsigned char _far *pcbPageMap);
ERR PUBLIC _far __ErrEmsGetPartialPageMap(log_phys_map _far *pMap, void _far *pPageMap);
ERR PUBLIC _far __ErrEmsSetPartialPageMap(void _far *pPageMap);
ERR PUBLIC _far __ErrEmsGetSizeOfPartialPageMap(unsigned cPage, unsigned char _far *pcbPageMap);
ERR PUBLIC _far __ErrEmsMapMultipleHandlePages(HEMS hems, unsigned cPage, log_phys_map _far *pMap, int fSegment);
ERR PUBLIC _far __ErrEmsReallocatePages(HEMS hems, unsigned cPage);
ERR PUBLIC _far __ErrEmsGetHandleAttribute(HEMS hems, unsigned char _far *pbAttribute);
ERR PUBLIC _far __ErrEmsSetHandleAttribute(HEMS hems, char bAttribute);
ERR PUBLIC _far __ErrEmsGetAttributeCapability(unsigned char _far *pbCapability);
ERR PUBLIC _far __ErrEmsGetHandleName(HEMS hems, char (*pName)[8]);
ERR PUBLIC _far __ErrEmsSetHandleName(HEMS hems, char (*pName)[8]);
ERR PUBLIC _far __ErrEmsGetHandleDirectory(void _far * /* UNDONE */ pDirectory, unsigned char _far *pcEntries);
ERR PUBLIC _far __ErrEmsSearchForNamedHandle(PHEMS phems, char (*pName)[8]);
ERR PUBLIC _far __ErrEmsGetTotalHandles(unsigned _far *pcHandles);
ERR PUBLIC _far __ErrEmsAlterPageMapAndJump(HEMS hems, int fPhysical, map_and_jump _far *p);
ERR PUBLIC _far __ErrEmsAlterPageMapAndCall(HEMS hems, int fPhysical, map_and_call _far *p);
ERR PUBLIC _far __ErrEmsGetPageMapStackSpaceSize(unsigned _far *pcbStack);
ERR PUBLIC _far __ErrEmsMoveMemoryRegion(move_source_dest _far *p);
ERR PUBLIC _far __ErrEmsExchangeMemoryRegion(move_source_dest _far *p);


#define cEmsPagesLim 2048U

#define errEmsBase 0x3000


  3 Responses to “Category : C++ Source Code
Archive   : VMVCPP.ZIP
Filename : EMS.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/