Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
3.1 KiB

  1. //------------------------------------------------------------------------
  2. // parse.h
  3. //------------------------------------------------------------------------
  4. #include "admparse.h"
  5. #ifndef ARRAYSIZE // one definition is fine
  6. #define ARRAYSIZE(a) (sizeof(a)/sizeof((a)[0]))
  7. #endif
  8. #define KEY_ERROR 0x0FFFFFFFF
  9. #define KEY_CLASS 0
  10. #define KEY_CATEGORY 1
  11. #define KEY_KEYNAME 2
  12. #define KEY_POLICY 3
  13. #define KEY_VALUENAME 4
  14. #define KEY_ACTIONLISTON 5
  15. #define KEY_ACTIONLISTOFF 6
  16. #define KEY_PART 7
  17. #define KEY_END 8
  18. #define KEY_ITEMLIST 9
  19. #define KEY_NAME 10
  20. #define KEY_MAXLEN 11
  21. #define KEY_DEFAULT 12
  22. #define KEY_ACTIONLIST 13
  23. #define KEY_SUGGESTIONS 14
  24. #define KEY_MIN 15
  25. #define KEY_MAX 16
  26. #define KEY_VALUEON 17
  27. #define KEY_VALUEOFF 18
  28. #define KEY_VALUE 19
  29. #define KEY_DEFCHECKED 20
  30. #define KEY_SPIN 21
  31. #define KEY_IF 22
  32. #define KEY_ENDIF 23
  33. #define KEY_VERSION 24
  34. #define KEY_LT 25
  35. #define KEY_LTE 26
  36. #define KEY_GT 27
  37. #define KEY_GTE 28
  38. #define PART_ERROR 0x0FFFFFFFF
  39. #define PART_EDITTEXT 0
  40. #define PART_DROPDOWNLIST 1
  41. #define PART_NUMERIC 2
  42. #define PART_CHECKBOX 3
  43. #define PART_LISTBOX 4
  44. #define PART_TEXT 5
  45. #define PART_COMBOBOX 6
  46. #define PART_POLICY 7
  47. #define CLASS_MACHINE 0
  48. #define CLASS_USER 1
  49. #define NO_ACTION 0xFFFFFFFF
  50. #define ADM_VERSION 2
  51. //------------------------------------------------------------------------
  52. // Structures
  53. //------------------------------------------------------------------------
  54. typedef struct _value
  55. {
  56. LPTSTR szKeyname;
  57. LPTSTR szValueName;
  58. LPTSTR szValue;
  59. DWORD dwValue;
  60. BOOL fNumeric;
  61. LPTSTR szValueOn;
  62. LPTSTR szValueOff;
  63. int nValueOn;
  64. int nValueOff;
  65. } VALUE, *LPVALUE;
  66. typedef struct _actionlist
  67. {
  68. LPTSTR szName;
  69. LPTSTR szValue;
  70. DWORD dwValue;
  71. int nValues;
  72. LPVALUE value;
  73. } ACTIONLIST, *LPACTIONLIST;
  74. typedef struct _suggestions
  75. {
  76. LPTSTR szText;
  77. } SUGGESTIONS, *LPSUGGESTIONS;
  78. typedef struct _part
  79. {
  80. LPTSTR szName;
  81. LPTSTR szCategory;
  82. VALUE value;
  83. int nType;
  84. HKEY hkClass;
  85. int nActions;
  86. int nSelectedAction;
  87. LPACTIONLIST actionlist;
  88. int nSuggestions;
  89. LPSUGGESTIONS suggestions;
  90. int nMin, nMax, nDefault, nSpin;
  91. BOOL fRequired;
  92. int nLine;
  93. LPTSTR szDefaultValue;
  94. //BOOL fSave;
  95. } PART, *LPPART;
  96. typedef struct _partData
  97. {
  98. VALUE value;
  99. LPACTIONLIST actionlist;
  100. int nActions;
  101. int nSelectedAction;
  102. BOOL fNumeric;
  103. BOOL fSave;
  104. } PARTDATA, *LPPARTDATA;
  105. typedef struct _admfile
  106. {
  107. TCHAR szFilename[MAX_PATH];
  108. LPPART pParts;
  109. int nParts;
  110. } ADMFILE, *LPADMFILE;