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.

155 lines
4.2 KiB

  1. ////////////////////////////////////////////////////////////////////////
  2. // //
  3. // Context structure is not known to the caller. It is defined by the //
  4. // callee when Open/FindFirst is called and is used subsequently as //
  5. // input to other calls. //
  6. // //
  7. // Since the caller is not aware of the context structure the object //
  8. // manager must provide a free context funtion. //
  9. // //
  10. ////////////////////////////////////////////////////////////////////////
  11. #include "global.h"
  12. DWORD
  13. MartaAddRefRegistryKeyContext(
  14. IN MARTA_CONTEXT Context
  15. );
  16. DWORD
  17. MartaCloseRegistryKeyContext(
  18. IN MARTA_CONTEXT Context
  19. );
  20. ////////////////////////////////////////////////////////////////////////
  21. // Does not free up the current context. //
  22. ////////////////////////////////////////////////////////////////////////
  23. DWORD
  24. MartaFindFirstRegistryKey(
  25. IN MARTA_CONTEXT Context,
  26. IN ACCESS_MASK AccessMask,
  27. OUT PMARTA_CONTEXT pChildContext
  28. );
  29. ////////////////////////////////////////////////////////////////////////
  30. // Frees up the current context. //
  31. ////////////////////////////////////////////////////////////////////////
  32. DWORD
  33. MartaFindNextRegistryKey(
  34. IN MARTA_CONTEXT Context,
  35. IN ACCESS_MASK AccessMask,
  36. OUT PMARTA_CONTEXT pSiblingContext
  37. );
  38. ////////////////////////////////////////////////////////////////////////
  39. // Does not free up the current context. //
  40. ////////////////////////////////////////////////////////////////////////
  41. DWORD
  42. MartaGetRegistryKeyParentContext(
  43. IN MARTA_CONTEXT Context,
  44. IN ACCESS_MASK AccessMask,
  45. OUT PMARTA_CONTEXT pParentContext
  46. );
  47. DWORD
  48. MartaGetRegistryKeyProperties(
  49. IN MARTA_CONTEXT Context,
  50. IN OUT PMARTA_OBJECT_PROPERTIES pProperties
  51. );
  52. DWORD
  53. MartaGetRegistryKeyTypeProperties(
  54. IN OUT PMARTA_OBJECT_TYPE_PROPERTIES pProperties
  55. );
  56. DWORD
  57. MartaGetRegistryKeyRights(
  58. IN MARTA_CONTEXT Context,
  59. IN SECURITY_INFORMATION SecurityInfo,
  60. OUT PSECURITY_DESCRIPTOR * ppSecurityDescriptor
  61. );
  62. DWORD
  63. MartaOpenRegistryKeyNamedObject(
  64. IN LPCWSTR pObjectName,
  65. IN ACCESS_MASK AccessMask,
  66. OUT PMARTA_CONTEXT pContext
  67. );
  68. DWORD
  69. MartaOpenRegistryKeyHandleObject(
  70. IN HANDLE Handle,
  71. IN ACCESS_MASK AccessMask,
  72. OUT PMARTA_CONTEXT pContext
  73. );
  74. DWORD
  75. MartaSetRegistryKeyRights(
  76. IN MARTA_CONTEXT Context,
  77. IN SECURITY_INFORMATION SecurityInfo,
  78. IN PSECURITY_DESCRIPTOR pSecurityDescriptor
  79. );
  80. // The following two functions are exported for testing
  81. DWORD
  82. MartaConvertRegistryKeyContextToName(
  83. IN MARTA_CONTEXT Context,
  84. OUT LPWSTR *ppwszObject
  85. );
  86. // The returned Handle isn't duplicated. It has the same lifetime as
  87. // the Context
  88. DWORD
  89. MartaConvertRegistryKeyContextToHandle(
  90. IN MARTA_CONTEXT Context,
  91. OUT HANDLE *pHandle
  92. );
  93. ACCESS_MASK
  94. MartaGetRegistryKeyDesiredAccess(
  95. IN SECURITY_OPEN_TYPE OpenType,
  96. IN BOOL Attribs,
  97. IN SECURITY_INFORMATION SecurityInfo
  98. );
  99. ACCESS_MASK
  100. MartaGetRegistryKey32DesiredAccess(
  101. IN SECURITY_OPEN_TYPE OpenType,
  102. IN BOOL Attribs,
  103. IN SECURITY_INFORMATION SecurityInfo
  104. );
  105. ACCESS_MASK
  106. MartaGetDefaultDesiredAccess(
  107. IN SECURITY_OPEN_TYPE OpenType,
  108. IN BOOL Attribs,
  109. IN SECURITY_INFORMATION SecurityInfo
  110. );
  111. DWORD
  112. MartaReopenRegistryKeyContext(
  113. IN OUT MARTA_CONTEXT Context,
  114. IN ACCESS_MASK AccessMask
  115. );
  116. DWORD
  117. MartaReopenRegistryKeyOrigContext(
  118. IN OUT MARTA_CONTEXT Context,
  119. IN ACCESS_MASK AccessMask
  120. );
  121. DWORD
  122. MartaGetRegistryKeyNameFromContext(
  123. IN MARTA_CONTEXT Context,
  124. OUT LPWSTR *pObjectName
  125. );
  126. DWORD
  127. MartaGetRegistryKeyParentName(
  128. IN LPWSTR ObjectName,
  129. OUT LPWSTR *pParentName
  130. );