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