home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / VDMPROP.H < prev    next >
C/C++ Source or Header  |  1999-03-15  |  8KB  |  221 lines

  1. /***    vdmprop.h - Common VDM properties definitions
  2.  *
  3.  *
  4.  *
  5.  *      Copyright (c) IBM Corporation 1987, 1992
  6.  *
  7.  *      All Rights Reserved
  8.  *
  9.  *      Title:
  10.  *          VDM Property definitions common to VDDs and applications
  11.  *
  12.  *
  13.  */
  14.  
  15. /* NOINC */
  16. #if __IBMC__ || __IBMCPP__
  17.    #pragma info( none )
  18.       #ifndef __CHKHDR__
  19.          #pragma info( none )
  20.       #endif
  21.    #pragma info( restore )
  22. #endif
  23. /* INC */
  24.  
  25. #ifndef __VDMPROP__
  26. #define __VDMPROP__
  27.  
  28.  
  29. /***ET+ Property Limits
  30.  *
  31.  */
  32.  
  33. #define MAX_PROPERTY_NAME_LENGTH    40  /* including NULL terminator */
  34. #define MAX_AUTOEXEC_SIZE          128  // max string size              //53233
  35.  
  36.  
  37. /***ET+ VPTYPE: VDM Property Types
  38.  *
  39.  */
  40. #define VDMP_BOOL       0   /* boolean */
  41. #define VDMP_INT        1   /* integer - ULONG size, but only USHORT is valid */
  42. #define VDMP_ENUM       2   /* enumeration */
  43. #define VDMP_STRING     3   /* asciiz string */
  44. #define VDMP_MLSTR      4   /* multi-line string, separated by linefeed (0x0a) */
  45.  
  46. typedef USHORT   VPTYPE;                                /* property type */
  47. /*end*/
  48.  
  49.  
  50. /***ET+ VPORD: VDM Property Ordinals
  51.  *
  52.  */
  53. #define VDMP_ORD_OTHER      0   /* custom VDD property */
  54. #define VDMP_ORD_KERNEL     1   /* asciiz path of DOS kernel */
  55. #define VDMP_ORD_SHELL      2   /* asciiz path of DOS shell */
  56. #define VDMP_ORD_RMSIZE     3   /* integer size of DOS box (128K..640K) */
  57. #define VDMP_ORD_FCB        4   /* integer total FCBs */
  58. #define VDMP_ORD_FCB2       5   /* integer FCBs immune to close LRUing */
  59. #define VDMP_ORD_BREAK      6   /* boolean BREAK flag */
  60. #define VDMP_ORD_DOSDD      7   /* mlstr DOS device drivers */
  61. #define VDMP_ORD_VMBOOT     8   /* mlstr virtual machine boot drive(s) */
  62. /* #define VDMP_ORD_IOPL3      9 */  /* boolean IOPL3 flag               6.10 */
  63. #define VDMP_ORD_VERSION    10  /* mlstr fake version entries */
  64. #define VDMP_ORD_DOS_UMB    11  /* boolean flag - DOS owns UBMs */
  65. #define VDMP_ORD_DOS_HIGH   12  /* boolean flag - DOS loaded high */
  66. #define VDMP_ORD_LASTDRIVE  13  /* asciiz lastdrive */
  67. #define VDMP_ORD_FILES      14  /* integer total FILES */
  68. #define VDMP_ORD_AUTOEXEC   15  // asciiz Autoexec filespec
  69. #define VDMP_ORD_INSTALL    16  // mlstr INSTALL= settings
  70.  
  71.  
  72. typedef USHORT   VPORD;                                 /* property ordinal */
  73. /*end*/
  74.  
  75.  
  76. /***ET+ VDHRegisterProperty Flags
  77.  *
  78.  */
  79. #define VDMP_CREATE         0x00000001  /* create-time only property */
  80. #define VDMP_ADVANCED       0x00000002  /* advanced property (not shown by default) */
  81. /*end*/
  82.  
  83.  
  84. /***ET+ VDHRegisterProperty PFNVDHRP ordinals
  85.  *
  86.  */
  87. #define VDHPROP_VALIDATE    0x00000000L /* validate parameter */
  88. #define VDHPROP_SET         0x00000001L /* set parameter */
  89. /*end*/
  90.  
  91.  
  92. /***ET+ VPBOUND - limits for VDMP_INT properties
  93.  *
  94.  *  Notes:  (1) max > min must hold
  95.  *          (2) (max-min) must be a multiple of step
  96.  *          (3) step = 1 implies that all values between min and max are valid
  97.  */
  98. typedef struct VPBOUND_s { /* vpb */
  99.     USHORT  min;    /* minimum allowed value */
  100.     USHORT  max;    /* maximum allowed value */
  101.     USHORT  step;   /* increment between values */
  102. } VPBOUND;
  103. typedef VPBOUND *PVPBOUND; /* pvpb */
  104. /*end*/
  105.  
  106.  
  107. /***ET+ VPINFO - VDD Property Info structure
  108.  *
  109.  *      This is filled in by a call to Dos32QueryDOSProperty
  110.  *
  111.  *
  112.  *      VPTYPE  vi_vptype  - Property type (see VPTYPE).
  113.  *      VPORD   vi_vpord   - Property ordinal (see VPORD).
  114.  *      ULONG   vi_ulFlags - Property flags:
  115.  *                  VDMP_CREATE
  116.  *                    TRUE if the property can only be specified at
  117.  *                        VDM creation.  Changing the property after
  118.  *                        the VDM is created has no effect.
  119.  *                    FALSE if the property can be specified at VDM
  120.  *                        creation AND can be changed for a running
  121.  *                        VDM.
  122.  *      ULONG   vi_ulHelpID - ID of help topic
  123.  *      char    vi_pszHelp[] - asciiz help file name.
  124.  *                  A single NULL byte is present if no help is
  125.  *                  available.
  126.  *
  127.  *      ???     vi_pvValid - This contains information that allows the property
  128.  *                  value to be validated.  Its format depends upon
  129.  *                  the property type:
  130.  *                    VDMP_BOOL
  131.  *                      This field is not present.
  132.  *                    VDMP_INT
  133.  *                      This field is a VPBOUND structure.
  134.  *                    VDMP_ENUM
  135.  *                      This field is a set of ASCIIZ strings,
  136.  *                      terminated by a zero byte, which is the allowed
  137.  *                      set of responses.
  138.  *                    VDMP_STRING
  139.  *                    VDMP_MLSTR
  140.  *                      This field is a ULONG representing the maximum
  141.  *                      allowed string length, including the terminating
  142.  *                      NULL byte.
  143.  *
  144.  *      ???     vi_pvValue - The default value of the property.  In all cases
  145.  *                  it is assumed that this value is valid according
  146.  *                  to the constraints specified by pvValid.
  147.  *                  The format depends upon the property type:
  148.  *                    VDMP_BOOL
  149.  *                      This field is a 4-byte BOOL.
  150.  *                    VDMP_INT
  151.  *                      This field is a ULONG.  The high half of the
  152.  *                      value is always zero, so this type can only
  153.  *                      take on the values of a USHORT.
  154.  *                    VDMP_ENUM
  155.  *                      This field is an ASCIIZ string.
  156.  *                    VDMP_STRING
  157.  *                    VDMP_MLSTR
  158.  *                      This field is an ASCIIZ string.
  159.  */
  160.  
  161. typedef struct VPINFO_s { /* vpinfo */
  162.     VPTYPE  vi_vptype;     /* property type */
  163.     VPORD   vi_vpord;      /* property ordinal */
  164.     ULONG   vi_ulFlags;    /* flags */
  165.     ULONG   vi_ulHelpID;   /* help topic id */
  166.     /*      vi_pszHelp[];*/  /* help file */
  167.     /*      vi_pvValid; */   /* validation information */
  168.     /*      vi_pvValue; */    /* default value */
  169. } VPINFO;
  170. typedef VPINFO *PVPINFO;
  171. /*end*/
  172.  
  173.  
  174. /***ET+ PROPERTYBUFFER - buffer containing 0 or more property values
  175.  *
  176.  *      This buffer format is used when passing property values to
  177.  *      DosStartSession.
  178.  *
  179.  *      Byte
  180.  *      Offset  Type    Contents
  181.  *      ------  ------- ------------------------------------------
  182.  *         0    ULONG   Buffer length, including this ULONG.
  183.  *         4    VPTYPE  Type of property (see VPTYPE in vdmprop.h)
  184.  *         6    ASCIIZ  Null-terminated property name
  185.  *         ?    ?       Property value.  Format depends on VPTYPE:
  186.  *                        VDMP_BOOL
  187.  *                          4-byte boolean value.  0 => false, !0 => true.
  188.  *                        VDMP_INT
  189.  *                          ULONG.  The high half of the value is always
  190.  *                            zero, so this type can only take on the
  191.  *                            values of a USHORT.
  192.  *                        VDMP_ENUM
  193.  *                        VDMP_STRING
  194.  *                        VDMP_MLSTR
  195.  *                          Null-terminated string.
  196.  *         ?    VPTYPE  Type of second property
  197.  *         ?+2  ASCIIZ  Name of second property
  198.  *         ?    ?       Value of second property
  199.  *         ...
  200.  */
  201.  
  202. typedef struct _PROPERTYBUFFER { /* propbuf */
  203.     ULONG   cb;
  204.     CHAR    achPropBuf;
  205. } PROPERTYBUFFER;
  206. typedef PROPERTYBUFFER *PPROPERTYBUFFER; /* ppropbuf */
  207. /*end*/
  208.  
  209. #endif /* __VDMPROP__ */
  210.  
  211.  
  212. /* NOINC */
  213. #if __IBMC__ || __IBMCPP__
  214.    #pragma info( none )
  215.       #ifndef __CHKHDR__
  216.          #pragma info( restore )
  217.       #endif
  218.    #pragma info( restore )
  219. #endif
  220. /* INC */
  221.