home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v1.zip / DDKX86 / H / BSEMEMF.H < prev    next >
Text File  |  1995-04-14  |  4KB  |  84 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT (C) Microsoft Corporation, 1989                                 */
  4. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  5. /*                                                                           */
  6. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  7. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  8. /*    drivers. You may use this code in accordance with the IBM License      */
  9. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  10. /*    Copyright statement may not be removed.                                */
  11. /*                                                                           */
  12. /*****************************************************************************/
  13. /*static char *SCCSID = "@(#)bsememf.h    6.2 91/02/12";*/
  14. /*static char *SCCSID = "@(#)bsememf.h    6.2 91/02/12";*/
  15. /***************************************************************************\
  16. *
  17. * Module Name: BSEMEMF.H
  18. *
  19. * OS/2 Base MEMory Flags include file
  20. *
  21. *
  22. ************************************************************************
  23. *
  24. ************************************************************************/
  25.  
  26. /* Access protection */
  27. #define PAG_READ        0x00000001      /* read access */
  28. #define PAG_WRITE       0x00000002      /* write access */
  29. #define PAG_EXECUTE     0x00000004      /* execute access */
  30. #define PAG_GUARD       0x00000008      /* guard protection */
  31. #define PAG_DEFAULT     0x00000400      /* default (initial) access */
  32.  
  33. /* Commit */
  34. #define PAG_COMMIT      0x00000010      /* commit storage */
  35. #define PAG_DECOMMIT    0x00000020      /* decommit storage */
  36.  
  37. /* Allocation attributes */
  38. #define OBJ_TILE        0x00000040      /* tile object */
  39. #define OBJ_PROTECTED   0x00000080      /* protect object
  40.                                            NOTE: This flag is NOT available at
  41.                                            the api level */
  42. #define OBJ_GETTABLE    0x00000100      /* gettable by other processes */
  43. #define OBJ_GIVEABLE    0x00000200      /* giveable to other processes */
  44.  
  45. #define fPERM           (PAG_EXECUTE + PAG_READ + PAG_WRITE)
  46. #define fSHARE          (OBJ_GETTABLE + OBJ_GIVEABLE)
  47.  
  48. /* DosAllocMem flags */
  49. #define fALLOC          (OBJ_TILE + PAG_COMMIT + fPERM)
  50.  
  51. /* DosAllocSharedMem flags */
  52. #define fALLOCSHR       (OBJ_TILE + PAG_COMMIT + fSHARE + fPERM)
  53.  
  54. /* DosGetNamedSharedMem flags */
  55. #define fGETNMSHR       (fPERM)
  56.  
  57. /* DosGetSharedMem flags */
  58. #define fGETSHR         (fPERM)
  59.  
  60. /* DosGiveSharedMem flags */
  61. #define fGIVESHR        (fPERM)
  62.  
  63. /* DosSetMem flags */
  64. #define fSET            (PAG_COMMIT + PAG_DECOMMIT + PAG_DEFAULT + fPERM)
  65.  
  66. /* Dos32SubSet flags */
  67. #define DOSSUB_INIT             0x01    /* initialize memory object for */
  68.                                         /* suballocation                */
  69. #define DOSSUB_GROW             0x02    /* increase size of memory pool */
  70.                                         /* for suballocation            */
  71. #define DOSSUB_SPARSE_OBJ       0x04    /* indicator for DosSub to      */
  72.                                         /* manage the commitment of     */
  73.                                         /* pages spanned by the memory  */
  74.                                         /* pool                         */
  75. #define DOSSUB_SERIALIZE        0x08    /* indicates that access to the */
  76.                                         /* memory pool is to be         */
  77.                                         /* serialized by DosSub         */
  78.  
  79. /* Allocation type (returned from DosQueryMem) */
  80. #define PAG_SHARED      0x00002000      /* shared object */
  81. #define PAG_FREE        0x00004000      /* pages are free */
  82. #define PAG_BASE        0x00010000      /* first page in object */
  83.  
  84.