home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warphead.zip / H / BSEMEMF.H < prev    next >
C/C++ Source or Header  |  1997-08-17  |  5KB  |  155 lines

  1. /*static char *SCCSID = "@(#)bsememf.h    6.8 92/03/15";*/
  2.  
  3.  /******************************************************************************\
  4.  *                                                                             *
  5.  * Module Name: BSEMEMF.H                                                      *
  6.  *                                                                             *
  7.  * OS/2 Base MEMory Flags include file                                         *
  8.  *                                                                             *
  9.  * Copyright (c) 1989  - 1992 IBM Corporation                                  *
  10.  *                                                                             *
  11.  *******************************************************************************/
  12.  
  13. #if __IBMC__ || __IBMCPP__
  14. #pragma info( none )
  15.    #ifndef __CHKHDR__
  16.       #pragma info( none )
  17.    #endif
  18. #pragma info( restore )
  19. #endif
  20. #ifdef __cplusplus
  21.       extern "C" {
  22. #endif
  23.  
  24. #ifndef __BSEMEMF__
  25. /* NOINC */
  26. #define __BSEMEMF__
  27. /* INC */
  28.  
  29.  /* Access protection                                                          */
  30.  
  31.  #define PAG_READ          0x00000001U      /* read access                      */
  32.  
  33.  #define PAG_WRITE         0x00000002U      /* write access                     */
  34.  
  35.  #define PAG_EXECUTE       0x00000004U      /* execute access                   */
  36.  
  37.  #define PAG_GUARD         0x00000008U      /* guard protection                 */
  38.  
  39.  #define PAG_DEFAULT       0x00000400U      /* default (initial) access         */
  40.  
  41.  
  42.  
  43.  /* Commit                                                                     */
  44.  
  45.  #define PAG_COMMIT        0x00000010U      /* commit storage                   */
  46.  
  47.  #define PAG_DECOMMIT      0x00000020U      /* decommit storage                 */
  48.  
  49.  
  50.  
  51.  /* Allocation attributes                                                      */
  52.  
  53.  #define OBJ_TILE          0x00000040U      /* tile object                      */
  54.  
  55.  #define OBJ_PROTECTED     0x00000080U      /* protect object
  56.  
  57.                                             NOTE: This flag is NOT available at
  58.  
  59.                                             the api level */
  60.  
  61.  #define OBJ_GETTABLE      0x00000100U      /* gettable by other processes      */
  62.  
  63.  #define OBJ_GIVEABLE      0x00000200U      /* giveable to other processes      */
  64.  
  65.  
  66.  
  67.  #define fPERM             (PAG_EXECUTE | PAG_READ | PAG_WRITE)
  68.  
  69.  #define fSHARE            (OBJ_GETTABLE | OBJ_GIVEABLE)
  70.  
  71.  
  72.  
  73.  /* DosAllocMem flags                                                          */
  74.  
  75.  #define fALLOC            (OBJ_TILE | PAG_COMMIT | fPERM)
  76.  
  77.  
  78.  
  79.  /* DosAllocSharedMem flags                                                    */
  80.  
  81.  #define fALLOCSHR         (OBJ_TILE | PAG_COMMIT | fSHARE | fPERM)
  82.  
  83.  
  84.  
  85.  /* DosGetNamedSharedMem flags                                                 */
  86.  
  87.  #define fGETNMSHR         (fPERM)
  88.  
  89.  
  90.  
  91.  /* DosGetSharedMem flags                                                      */
  92.  
  93.  #define fGETSHR           (fPERM)
  94.  
  95.  
  96.  
  97.  /* DosGiveSharedMem flags                                                     */
  98.  
  99.  #define fGIVESHR          (fPERM)
  100.  
  101.  
  102.  
  103.  /* DosSetMem flags                                                            */
  104.  
  105.  #define fSET              (PAG_COMMIT + PAG_DECOMMIT + PAG_DEFAULT + fPERM)
  106.  
  107.  
  108.  
  109.  /* Dos32SubSet flags                                                          */
  110.  
  111.  #define DOSSUB_INIT       0x01U           /* initialize memory object for     */
  112.  
  113.                                            /* suballocation                    */
  114.  
  115.  #define DOSSUB_GROW       0x02U           /* increase size of memory pool     */
  116.  
  117.                                            /* for suballocation                */
  118.  
  119.  #define DOSSUB_SPARSE_OBJ 0x04U           /* indicator for DosSub to          */
  120.  
  121.                                            /* manage the commitment of         */
  122.  
  123.                                            /* pages spanned by the memory      */
  124.  
  125.                                            /* pool                             */
  126.  
  127.  #define DOSSUB_SERIALIZE  0x08U           /* indicates that access to the     */
  128.  
  129.                                            /* memory pool is to be             */
  130.  
  131.                                            /* serialized by DosSub             */
  132.  
  133.  
  134.  
  135.  /* Allocation type (returned from DosQueryMem)                                */
  136.  
  137.  #define PAG_SHARED        0x00002000U     /* shared object                    */
  138.  
  139.  #define PAG_FREE          0x00004000U     /* pages are free                   */
  140.  
  141.  #define PAG_BASE          0x00010000U     /* first page in object             */
  142.  
  143. #endif /* __BSEMEMF__ */
  144.  
  145. #ifdef __cplusplus
  146.         }
  147. #endif
  148. #if __IBMC__ || __IBMCPP__
  149. #pragma info( none )
  150.    #ifndef __CHKHDR__
  151.       #pragma info( restore )
  152.    #endif
  153. #pragma info( restore )
  154. #endif
  155.