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.

113 lines
1.8 KiB

  1. /*
  2. * inifile.h - Initialization file processing module description.
  3. *
  4. * Taken from URL code by ChrisPi 9-11-95
  5. *
  6. */
  7. #ifndef _INIFILE_H_
  8. #define _INIFILE_H_
  9. /* Types
  10. ********/
  11. #ifdef DEBUG
  12. /* .ini switch types */
  13. typedef enum _iniswitchtype
  14. {
  15. IST_BOOL,
  16. IST_DEC_INT,
  17. IST_UNS_DEC_INT,
  18. IST_BIN
  19. }
  20. INISWITCHTYPE;
  21. DECLARE_STANDARD_TYPES(INISWITCHTYPE);
  22. /* boolean .ini switch */
  23. typedef struct _booliniswitch
  24. {
  25. INISWITCHTYPE istype; /* must be IST_BOOL */
  26. PCSTR pcszKeyName;
  27. PDWORD pdwParentFlags;
  28. DWORD dwFlag;
  29. }
  30. BOOLINISWITCH;
  31. DECLARE_STANDARD_TYPES(BOOLINISWITCH);
  32. /* decimal integer .ini switch */
  33. typedef struct _decintiniswitch
  34. {
  35. INISWITCHTYPE istype; /* must be IST_DEC_INT */
  36. PCSTR pcszKeyName;
  37. PINT pnValue;
  38. }
  39. DECINTINISWITCH;
  40. DECLARE_STANDARD_TYPES(DECINTINISWITCH);
  41. /* unsigned decimal integer .ini switch */
  42. typedef struct _unsdecintiniswitch
  43. {
  44. INISWITCHTYPE istype; /* must be IST_UNS_DEC_INT */
  45. PCSTR pcszKeyName;
  46. PUINT puValue;
  47. }
  48. UNSDECINTINISWITCH;
  49. DECLARE_STANDARD_TYPES(UNSDECINTINISWITCH);
  50. /* binary (hex data) .ini switch */
  51. typedef struct _bininiswitch
  52. {
  53. INISWITCHTYPE istype; /* must be IST_BIN */
  54. PCSTR pcszKeyName;
  55. DWORD dwSize;
  56. PVOID pb;
  57. }
  58. BININISWITCH;
  59. DECLARE_STANDARD_TYPES(BININISWITCH);
  60. #endif
  61. /* Global Variables
  62. *******************/
  63. #ifdef DEBUG
  64. /* defined by client */
  65. extern PCSTR g_pcszIniFile;
  66. extern PCSTR g_pcszIniSection;
  67. #endif
  68. /* Prototypes
  69. *************/
  70. #ifdef DEBUG
  71. /* inifile.c */
  72. extern BOOL SetIniSwitches(const PCVOID *, UINT);
  73. extern BOOL WriteIniData(const PCVOID *);
  74. extern BOOL WriteIniSwitches(const PCVOID *, UINT);
  75. #endif
  76. #endif /* _INIFILE_H_ */