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.

128 lines
1.9 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. watch.h
  5. Abstract:
  6. Header file for watch.c
  7. Author:
  8. Chuck Lenzmeier (chuckl)
  9. Revision History:
  10. --*/
  11. //
  12. // Enumerated entry types.
  13. //
  14. #define WATCH_DIRECTORY 1
  15. #define WATCH_FILE 2
  16. #define WATCH_KEY 3
  17. #define WATCH_VALUE 4
  18. //
  19. // Enumerated change types.
  20. //
  21. #define WATCH_CHANGED 1
  22. #define WATCH_DELETED 2
  23. #define WATCH_NEW 3
  24. //
  25. // Structure describing an enumerated change.
  26. //
  27. typedef struct _WATCH_ENTRY {
  28. PWCH Name;
  29. DWORD EntryType;
  30. DWORD ChangeType;
  31. } WATCH_ENTRY, *PWATCH_ENTRY;
  32. //
  33. // USERPROFILE is the name of the environment variable that contains
  34. // the path the user's profile directory.
  35. //
  36. #define USERPROFILE TEXT("USERPROFILE")
  37. //
  38. // Macros for mask manipulation.
  39. //
  40. #define FlagOn(_mask,_flag) (((_mask) & (_flag)) != 0)
  41. #define FlagOff(_mask,_flag) (((_mask) & (_flag)) == 0)
  42. #define SetFlag(_mask,_flag) ((_mask) |= (_flag))
  43. #define ClearFlag(_mask,_flag) ((_mask) &= ~(_flag))
  44. //
  45. // Routines exported by watch.c
  46. //
  47. DWORD
  48. WatchStart (
  49. OUT PVOID *WatchHandle
  50. );
  51. DWORD
  52. WatchStop (
  53. IN PVOID WatchHandle
  54. );
  55. VOID
  56. WatchFree (
  57. IN PVOID WatchHandle
  58. );
  59. typedef
  60. DWORD
  61. (* PWATCH_ENUM_ROUTINE) (
  62. IN PVOID Context,
  63. IN PWATCH_ENTRY Entry
  64. );
  65. DWORD
  66. WatchEnum (
  67. IN PVOID WatchHandle,
  68. IN PVOID Context,
  69. IN PWATCH_ENUM_ROUTINE EnumRoutine
  70. );
  71. typedef
  72. DWORD
  73. (* PVALUE_ENUM_ROUTINE) (
  74. IN PVOID Context,
  75. IN DWORD ValueNameLength,
  76. IN PWCH ValueName,
  77. IN DWORD ValueType,
  78. IN PVOID ValueData,
  79. IN DWORD ValueDataLength
  80. );
  81. typedef
  82. DWORD
  83. (* PKEY_ENUM_ROUTINE) (
  84. IN PVOID Context,
  85. IN DWORD KeyNameLength,
  86. IN PWCH KeyName
  87. );
  88. DWORD
  89. EnumerateKey (
  90. IN HKEY KeyHandle,
  91. IN PVOID Context,
  92. IN PVALUE_ENUM_ROUTINE ValueEnumRoutine OPTIONAL,
  93. IN PKEY_ENUM_ROUTINE KeyEnumRoutine OPTIONAL
  94. );
  95. BOOL
  96. GetSpecialFolderPath (
  97. IN INT csidl,
  98. IN LPWSTR lpPath
  99. );