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