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.

207 lines
5.0 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. 1998 Seagate Software, Inc. All rights reserved.
  4. Module Name:
  5. WsbRegty.h
  6. Abstract:
  7. This is the header file for registry access functions.
  8. Author:
  9. Rohde Wakefield [rohde] 21-Oct-1996
  10. Revision History:
  11. --*/
  12. #ifndef __WSBREG__
  13. #define __WSBREG__
  14. #ifdef __cplusplus
  15. extern "C"
  16. {
  17. #endif
  18. // Defines for common registry keys/values
  19. #define WSB_CURRENT_VERSION_REGISTRY_KEY WSB_WINDOWSNT_CURRENT_VERSION_REGISTRY_KEY // Backwards compatibility
  20. #define WSB_PROFILELIST_REGISTRY_KEY OLESTR("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList")
  21. #define WSB_WINDOWSNT_CURRENT_VERSION_REGISTRY_KEY OLESTR("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion")
  22. #define WSB_WINDOWS_CURRENT_VERSION_REGISTRY_KEY OLESTR("SOFTWARE\\Microsoft\\Windows\\CurrentVersion")
  23. #define WSB_SYSTEM_ROOT_REGISTRY_VALUE OLESTR("SystemRoot")
  24. #define WSB_PROFILES_DIR_REGISTRY_VALUE OLESTR("ProfilesDirectory")
  25. #define WSB_CONTROL_REGISTRY_KEY OLESTR("System\\CurrentControlSet\\Control\\RemoteStorage")
  26. #define WSB_METADATA_REGISTRY_VALUE OLESTR("RemoteStorageData")
  27. #define WSB_RSM_CONTROL_REGISTRY_KEY OLESTR("System\\CurrentControlSet\\Control\\NTMS")
  28. #define WSB_RSM_METADATA_REGISTRY_VALUE OLESTR("NtmsData")
  29. WSB_EXPORT HRESULT
  30. WsbOpenRegistryKey (
  31. IN const OLECHAR * szMachine OPTIONAL,
  32. IN const OLECHAR * szPath,
  33. IN REGSAM sam,
  34. OUT HKEY * phKeyMachine,
  35. OUT HKEY * phKey
  36. );
  37. WSB_EXPORT HRESULT
  38. WsbCloseRegistryKey (
  39. IN OUT HKEY * phKeyMachine,
  40. IN OUT HKEY * phKey
  41. );
  42. WSB_EXPORT HRESULT
  43. WsbSetRegistryValueData (
  44. IN const OLECHAR * szMachine OPTIONAL,
  45. IN const OLECHAR * szPath,
  46. IN const OLECHAR * szValue,
  47. IN const BYTE *pData,
  48. IN DWORD cbData
  49. );
  50. WSB_EXPORT HRESULT
  51. WsbGetRegistryValueData (
  52. IN const OLECHAR * szMachine OPTIONAL,
  53. IN const OLECHAR * szPath,
  54. IN const OLECHAR * szValue,
  55. OUT BYTE *pData,
  56. IN DWORD cbData,
  57. OUT DWORD * pcbData OPTIONAL
  58. );
  59. WSB_EXPORT HRESULT
  60. WsbSetRegistryValueString (
  61. IN const OLECHAR * szMachine OPTIONAL,
  62. IN const OLECHAR * szPath,
  63. IN const OLECHAR * szValue,
  64. IN const OLECHAR * szString,
  65. IN DWORD dwType = REG_SZ
  66. );
  67. WSB_EXPORT HRESULT
  68. WsbGetRegistryValueString (
  69. IN const OLECHAR * szMachine OPTIONAL,
  70. IN const OLECHAR * szPath,
  71. IN const OLECHAR * szValue,
  72. OUT OLECHAR * szString,
  73. IN DWORD cSize,
  74. OUT DWORD *pcLength OPTIONAL
  75. );
  76. WSB_EXPORT HRESULT
  77. WsbGetRegistryValueMultiString (
  78. IN const OLECHAR * szMachine OPTIONAL,
  79. IN const OLECHAR * szPath,
  80. IN const OLECHAR * szValue,
  81. OUT OLECHAR * szMultiString,
  82. IN DWORD cSize,
  83. OUT DWORD *pcLength OPTIONAL
  84. );
  85. WSB_EXPORT HRESULT
  86. WsbSetRegistryValueDWORD (
  87. IN const OLECHAR * szMachine OPTIONAL,
  88. IN const OLECHAR * szPath,
  89. IN const OLECHAR * szValue,
  90. IN DWORD dw
  91. );
  92. WSB_EXPORT HRESULT
  93. WsbGetRegistryValueDWORD (
  94. IN const OLECHAR * szMachine OPTIONAL,
  95. IN const OLECHAR * szPath,
  96. IN const OLECHAR * szValue,
  97. OUT DWORD * pdw
  98. );
  99. WSB_EXPORT HRESULT
  100. WsbAddRegistryValueDWORD (
  101. IN const OLECHAR * szMachine OPTIONAL,
  102. IN const OLECHAR * szPath,
  103. IN const OLECHAR * szValue,
  104. IN DWORD adw
  105. );
  106. WSB_EXPORT HRESULT
  107. WsbIncRegistryValueDWORD (
  108. IN const OLECHAR * szMachine OPTIONAL,
  109. IN const OLECHAR * szPath,
  110. IN const OLECHAR * szValue
  111. );
  112. WSB_EXPORT HRESULT
  113. WsbRemoveRegistryValue (
  114. IN const OLECHAR * szMachine OPTIONAL,
  115. IN const OLECHAR * szPath,
  116. IN const OLECHAR * szValue
  117. );
  118. WSB_EXPORT HRESULT
  119. WsbRemoveRegistryKey (
  120. IN const OLECHAR * szMachine OPTIONAL,
  121. IN const OLECHAR * szPath,
  122. IN const OLECHAR * szKey
  123. );
  124. WSB_EXPORT HRESULT
  125. WsbCheckIfRegistryKeyExists(
  126. IN const OLECHAR * szMachine OPTIONAL,
  127. IN const OLECHAR * szPath
  128. );
  129. WSB_EXPORT HRESULT
  130. WsbEnsureRegistryKeyExists (
  131. IN const OLECHAR * szMachine OPTIONAL,
  132. IN const OLECHAR * szPath
  133. );
  134. WSB_EXPORT HRESULT
  135. WsbSetRegistryValueUlongAsString (
  136. IN const OLECHAR * szMachine OPTIONAL,
  137. IN const OLECHAR * szPath,
  138. IN const OLECHAR * szValue,
  139. IN ULONG value
  140. );
  141. WSB_EXPORT HRESULT
  142. WsbGetRegistryValueUlongAsMultiString (
  143. IN const OLECHAR * szMachine OPTIONAL,
  144. IN const OLECHAR * szPath,
  145. IN const OLECHAR * szValue,
  146. OUT ULONG ** ppValues,
  147. OUT ULONG * pNumValues
  148. );
  149. WSB_EXPORT HRESULT
  150. WsbGetRegistryValueUlongAsString (
  151. IN const OLECHAR * szMachine OPTIONAL,
  152. IN const OLECHAR * szPath,
  153. IN const OLECHAR * szValue,
  154. OUT ULONG * pvalue
  155. );
  156. WSB_EXPORT HRESULT
  157. WsbRegistryValueUlongAsString (
  158. IN const OLECHAR * szMachine OPTIONAL,
  159. IN const OLECHAR * szPath,
  160. IN const OLECHAR * szValue,
  161. IN OUT ULONG * pvalue
  162. );
  163. #ifdef __cplusplus
  164. }
  165. #endif
  166. #endif //__WSBREG__