home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / mslang / vm / h / vm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-15  |  1.9 KB  |  77 lines

  1. /***
  2. * vm.h -
  3. *
  4. *       Copyright (c) 1989-1992, Microsoft Corporation.  All rights reserved.
  5. *
  6. *******************************************************************************/
  7.  
  8. #ifndef PUBLIC
  9. #define PUBLIC _far _pascal
  10. #endif
  11.  
  12. typedef unsigned long VPVOID;         /* vp */
  13. typedef unsigned long VPAGE;          /* vpag */
  14.  
  15. #ifndef cbVmPage
  16. #define cbVmPage     2048U
  17. #endif
  18.  
  19. #define cbVmPara     16U
  20.  
  21. #define cParaPerPage (cbVmPage/cbVmPara)
  22.  
  23. #define vpNil ((VPVOID) 0)
  24.  
  25. #define IbOfVp(vp)      ((vp) & (cbVmPage-1))
  26. #define VpPageOfVp(vp)  ((vp) & ~(cbVmPage-1L))
  27. #define PageOfVp(vp)    ((VPAGE) ((vp) / cbVmPage))
  28.  
  29. #define VpOfPageIb(vpag, ib) ((VPVOID) (((vpag) * cbVmPage) + (ib)))
  30.  
  31. int      PUBLIC __FVmInitialize(unsigned cVmParaMin, unsigned cParaVmDosMax, unsigned bitSwapArea);
  32. void     PUBLIC __VmTerminate(void);
  33.  
  34. VPVOID   PUBLIC __VpVmAllocatePage(void);
  35. VPVOID   PUBLIC __VpVmAllocateCb(unsigned long cb);
  36.  
  37. PVOID    PUBLIC __PVmLoadVp(VPVOID vp, int fDirty);
  38. PVOID    PUBLIC __PVmLoadVpCb(VPVOID vp, unsigned long cb, int fDirty);
  39.  
  40. PVOID    PUBLIC __PVmLockVp(VPVOID vp);
  41. PVOID    PUBLIC __PVmLockVpCb(VPVOID vp, unsigned long cb);
  42. void     PUBLIC __VmUnlockVp(VPVOID vp, int fDirty);
  43. void     PUBLIC __VmUnlockVpCb(VPVOID vp, unsigned long cb, int fDirty);
  44. unsigned PUBLIC __CVmLockVp(VPVOID vp);
  45.  
  46. #if     VMFREE
  47.  
  48. void     PUBLIC __VmFreePageVp(VPVOID vp);
  49. void     PUBLIC __VmFreePageVpCb(VPVOID vp, unsigned long cb);
  50.  
  51. #endif  /* VMFREE */
  52.  
  53.  
  54. extern char _near _fVmDisableDisk;
  55. extern char _near _fVmDisableEms;
  56. extern char _near _fVmDisableXms;
  57.  
  58. #ifdef  VMDEBUG
  59.  
  60. extern int  _near _fVmFillPages;
  61. extern char _near _bVmFillPages;
  62.  
  63. #endif  /* VMDEBUG */
  64.  
  65. #if     VMPROFILE
  66.  
  67. extern int  _near _fVmProfile;
  68.  
  69. #endif  /* VMPROFILE */
  70.  
  71. #if     VMTRACE
  72.  
  73. extern int _near  _fVmTrace;
  74.  
  75. #endif  /* VMTRACE */
  76.  
  77.