home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddrivers.zip / VDD / VDMPROP.H < prev    next >
Text File  |  1993-01-08  |  7KB  |  184 lines

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