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.

110 lines
1.8 KiB

  1. HKEY
  2. OpenRegKeyWorkerA (
  3. IN HKEY ParentKey,
  4. IN PCSTR KeyToOpen OPTIONAL
  5. DEBUG_TRACKING_PARAMS
  6. );
  7. HKEY
  8. OpenRegKeyWorkerW (
  9. IN HKEY ParentKey,
  10. IN PCWSTR KeyToOpen
  11. DEBUG_TRACKING_PARAMS
  12. );
  13. LONG
  14. CloseRegKeyWorker (
  15. IN HKEY Key
  16. );
  17. #ifdef DEBUG
  18. VOID
  19. RegTrackTerminate (
  20. VOID
  21. );
  22. VOID
  23. AddKeyReferenceA (
  24. HKEY Key,
  25. PCSTR SubKey,
  26. PCSTR File,
  27. DWORD Line
  28. );
  29. VOID
  30. AddKeyReferenceW (
  31. HKEY Key,
  32. PCWSTR SubKey,
  33. PCSTR File,
  34. DWORD Line
  35. );
  36. #define TRACK_KEYA(handle,keystr) AddKeyReferenceA(handle,keystr,__FILE__,__LINE__)
  37. #define TRACK_KEYW(handle,keystr) AddKeyReferenceW(handle,keystr,__FILE__,__LINE__)
  38. #else
  39. #define TRACK_KEYA(handle,keystr)
  40. #define TRACK_KEYW(handle,keystr)
  41. #endif
  42. //
  43. // Cache apis
  44. //
  45. VOID
  46. RegRecordParentInCacheA (
  47. IN PCSTR KeyString,
  48. IN PCSTR StringEnd
  49. );
  50. HKEY
  51. RegGetKeyFromCacheA (
  52. IN PCSTR KeyString,
  53. IN PCSTR End, OPTIONAL
  54. IN REGSAM Sam,
  55. IN BOOL IncRefCount
  56. );
  57. VOID
  58. RegAddKeyToCacheA (
  59. IN PCSTR KeyString,
  60. IN HKEY Key,
  61. IN REGSAM Sam
  62. );
  63. VOID
  64. RegRecordParentInCacheW (
  65. IN PCWSTR KeyString,
  66. IN PCWSTR StringEnd
  67. );
  68. HKEY
  69. RegGetKeyFromCacheW (
  70. IN PCWSTR KeyString,
  71. IN PCWSTR End, OPTIONAL
  72. IN REGSAM Sam,
  73. IN BOOL IncRefCount
  74. );
  75. VOID
  76. RegAddKeyToCacheW (
  77. IN PCWSTR KeyString,
  78. IN HKEY Key,
  79. IN REGSAM Sam
  80. );
  81. BOOL
  82. RegDecrementRefCount (
  83. IN HKEY Key
  84. );
  85. VOID
  86. RegIncrementRefCount (
  87. IN HKEY Key
  88. );
  89. extern REGSAM g_OpenSam;