Source code of Windows XP (NT5)
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.

115 lines
3.9 KiB

  1. //*********************************************************************
  2. //* Microsoft Windows **
  3. //* Copyright(c) Microsoft Corp., 1994 **
  4. //*********************************************************************
  5. #ifndef _PARSE_H_
  6. #define _PARSE_H_
  7. #define KYWD_ID_KEYNAME 1
  8. #define KYWD_ID_VALUENAME 2
  9. #define KYWD_ID_CATEGORY 3
  10. #define KYWD_ID_POLICY 4
  11. #define KYWD_ID_PART 5
  12. #define KYWD_ID_CHECKBOX 6
  13. #define KYWD_ID_TEXT 7
  14. #define KYWD_ID_EDITTEXT 8
  15. #define KYWD_ID_NUMERIC 9
  16. #define KYWD_ID_DEFCHECKED 10
  17. #define KYWD_ID_MAXLENGTH 11
  18. #define KYWD_ID_MIN 12
  19. #define KYWD_ID_MAX 13
  20. #define KYWD_ID_SPIN 14
  21. #define KYWD_ID_REQUIRED 15
  22. #define KYWD_ID_EDITTEXT_DEFAULT 16
  23. #define KYWD_ID_COMBOBOX_DEFAULT 17
  24. #define KYWD_ID_NUMERIC_DEFAULT 18
  25. #define KYWD_ID_OEMCONVERT 19
  26. #define KYWD_ID_CLASS 20
  27. #define KYWD_ID_USER 21
  28. #define KYWD_ID_MACHINE 22
  29. #define KYWD_ID_TXTCONVERT 23
  30. #define KYWD_ID_VALUE 24
  31. #define KYWD_ID_VALUEON 25
  32. #define KYWD_ID_VALUEOFF 26
  33. #define KYWD_ID_ACTIONLIST 27
  34. #define KYWD_ID_ACTIONLISTON 28
  35. #define KYWD_ID_ACTIONLISTOFF 29
  36. #define KYWD_ID_DELETE 30
  37. #define KYWD_ID_COMBOBOX 31
  38. #define KYWD_ID_SUGGESTIONS 32
  39. #define KYWD_ID_DROPDOWNLIST 33
  40. #define KYWD_ID_NAME 34
  41. #define KYWD_ID_ITEMLIST 35
  42. #define KYWD_ID_DEFAULT 36
  43. #define KYWD_ID_SOFT 37
  44. #define KYWD_ID_STRINGSSECT 38
  45. #define KYWD_ID_LISTBOX 39
  46. #define KYWD_ID_VALUEPREFIX 40
  47. #define KYWD_ID_ADDITIVE 41
  48. #define KYWD_ID_EXPLICITVALUE 42
  49. #define KYWD_ID_VERSION 43
  50. #define KYWD_ID_GT 44
  51. #define KYWD_ID_GTE 45
  52. #define KYWD_ID_LT 46
  53. #define KYWD_ID_LTE 47
  54. #define KYWD_ID_EQ 48
  55. #define KYWD_ID_NE 49
  56. #define KYWD_ID_END 50
  57. #define KYWD_ID_NOSORT 51
  58. #define KYWD_ID_EXPANDABLETEXT 52
  59. #define KYWD_ID_HELP 53
  60. #define KYWD_ID_CLIENTEXT 54
  61. #define KYWD_DONE 100
  62. #define DEFAULT_TMP_BUF_SIZE 512
  63. #define WORDBUFSIZE 255
  64. #define FILEBUFSIZE 8192
  65. #define CI_FREE 0
  66. #define CI_UNLOCKANDFREE 1
  67. #define CI_FREETABLE 2
  68. #define CLEANLISTSIZE 4
  69. typedef struct tagKEYWORDINFO {
  70. LPCTSTR pWord;
  71. UINT nID;
  72. } KEYWORDINFO;
  73. typedef struct tagCLEANUPINFO {
  74. HGLOBAL hMem;
  75. UINT nAction;
  76. } CLEANUPINFO;
  77. typedef struct tagENTRYDATA {
  78. BOOL fHasKey;
  79. BOOL fHasValue;
  80. BOOL fParentHasKey;
  81. } ENTRYDATA;
  82. typedef struct tagPARSEPROCSTRUCT {
  83. HANDLE hFile; // file handle of .INF file
  84. HGLOBAL hTable; // handle of current table
  85. TABLEENTRY *pTableEntry; // pointer to struct for current entry
  86. DWORD *pdwBufSize; // size of buffer of pTableEntry
  87. ENTRYDATA *pData; // used to maintain state between calls to parseproc
  88. KEYWORDINFO *pEntryCmpList;
  89. } PARSEPROCSTRUCT;
  90. typedef UINT (* PARSEPROC) (HWND,UINT,PARSEPROCSTRUCT *,BOOL *,BOOL *);
  91. typedef struct tagPARSEENTRYSTRUCT {
  92. HANDLE hFile;
  93. TABLEENTRY * pParent;
  94. DWORD dwEntryType;
  95. KEYWORDINFO *pEntryCmpList;
  96. KEYWORDINFO *pTypeCmpList;
  97. PARSEPROC pParseProc;
  98. DWORD dwStructSize;
  99. BOOL fHasSubtable;
  100. BOOL fParentHasKey;
  101. } PARSEENTRYSTRUCT;
  102. #endif // _PARSE_H_