offreg.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. /*++
  2. Copyright (c) Microsoft Corporation
  3. Module Name:
  4. offreg.h
  5. Abstract:
  6. This module contains the header file for the
  7. offreg utility.
  8. --*/
  9. #pragma once
  10. #ifndef __OFFREG_H__
  11. #define __OFFREG_H__
  12. #ifdef __cplusplus
  13. extern "C"
  14. {
  15. #endif
  16. #if defined(OFFREG_DLL)
  17. #define ORAPI _declspec(dllexport) __stdcall
  18. #else
  19. #define ORAPI _declspec(dllimport) __stdcall
  20. #endif
  21. typedef PVOID ORHKEY;
  22. typedef ORHKEY* PORHKEY;
  23. VOID
  24. ORAPI
  25. ORGetVersion(
  26. _Out_ PDWORD pdwMajorVersion,
  27. _Out_ PDWORD pdwMinorVersion
  28. );
  29. DWORD
  30. ORAPI
  31. OROpenHive(
  32. _In_ PCWSTR FilePath,
  33. _Out_ PORHKEY HORKey
  34. );
  35. DWORD
  36. ORAPI
  37. OROpenHiveByHandle(
  38. _In_ HANDLE FileHandle,
  39. _Out_ PORHKEY HORKey
  40. );
  41. DWORD
  42. ORAPI
  43. ORCreateHive(
  44. _Out_ PORHKEY HORKey
  45. );
  46. DWORD
  47. ORAPI
  48. ORCloseHive(
  49. _In_ ORHKEY Handle
  50. );
  51. DWORD
  52. ORAPI
  53. ORSaveHive(
  54. _In_ ORHKEY HORKey,
  55. _In_ PCWSTR HivePath,
  56. _In_ DWORD OsMajorVersion,
  57. _In_ DWORD OsMinorVersion
  58. );
  59. DWORD
  60. ORAPI
  61. OROpenKey(
  62. _In_ ORHKEY Handle,
  63. _In_opt_ PCWSTR lpSubKey,
  64. _Out_ PORHKEY phkResult
  65. );
  66. DWORD
  67. ORAPI
  68. ORCloseKey(
  69. _In_ ORHKEY KeyHandle
  70. );
  71. DWORD
  72. ORAPI
  73. ORCreateKey(
  74. _In_ ORHKEY KeyHandle,
  75. _In_ PCWSTR lpSubKey,
  76. _In_opt_ PWSTR lpClass,
  77. _In_opt_ DWORD dwOptions,
  78. _In_opt_ PSECURITY_DESCRIPTOR pSecurityDescriptor,
  79. _Out_ PORHKEY phkResult,
  80. _Out_opt_ PDWORD pdwDisposition
  81. );
  82. DWORD
  83. ORAPI
  84. ORDeleteKey(
  85. _In_ ORHKEY Handle,
  86. _In_opt_ PCWSTR lpSubKey
  87. );
  88. DWORD
  89. ORAPI
  90. ORQueryInfoKey(
  91. _In_ ORHKEY Handle,
  92. _Out_writes_opt_(*lpcClass) PWSTR lpClass,
  93. _Inout_opt_ PDWORD lpcClass,
  94. _Out_opt_ PDWORD lpcSubKeys,
  95. _Out_opt_ PDWORD lpcMaxSubKeyLen,
  96. _Out_opt_ PDWORD lpcMaxClassLen,
  97. _Out_opt_ PDWORD lpcValues,
  98. _Out_opt_ PDWORD lpcMaxValueNameLen,
  99. _Out_opt_ PDWORD lpcMaxValueLen,
  100. _Out_opt_ PDWORD lpcbSecurityDescriptor,
  101. _Out_opt_ PFILETIME lpftLastWriteTime
  102. );
  103. DWORD
  104. ORAPI
  105. OREnumKey(
  106. _In_ ORHKEY Handle,
  107. _In_ DWORD dwIndex,
  108. _Out_writes_(*lpcName) PWSTR lpName,
  109. _Inout_ PDWORD lpcName,
  110. _Out_writes_opt_(*lpcClass) PWSTR lpClass,
  111. _Inout_opt_ PDWORD lpcClass,
  112. _Out_opt_ PFILETIME lpftLastWriteTime
  113. );
  114. DWORD
  115. ORAPI
  116. ORGetKeySecurity(
  117. _In_ ORHKEY Handle,
  118. _In_ SECURITY_INFORMATION SecurityInformation,
  119. _Out_opt_ PSECURITY_DESCRIPTOR pSecurityDescriptor,
  120. _Inout_ PDWORD lpcbSecurityDescriptor
  121. );
  122. DWORD
  123. ORAPI
  124. ORSetKeySecurity(
  125. _In_ ORHKEY Handle,
  126. _In_ SECURITY_INFORMATION SecurityInformation,
  127. _In_ PSECURITY_DESCRIPTOR pSecurityDescriptor
  128. );
  129. DWORD
  130. ORAPI
  131. ORGetVirtualFlags(
  132. _In_ ORHKEY Handle,
  133. _Out_ PDWORD pdwFlags
  134. );
  135. DWORD
  136. ORAPI
  137. ORSetVirtualFlags(
  138. _In_ ORHKEY Handle,
  139. _In_ DWORD dwFlags
  140. );
  141. DWORD
  142. ORAPI
  143. ORDeleteValue(
  144. _In_ ORHKEY Handle,
  145. _In_opt_ PCWSTR lpValueName
  146. );
  147. DWORD
  148. ORAPI
  149. ORGetValue(
  150. _In_ ORHKEY Handle,
  151. _In_opt_ PCWSTR lpSubKey,
  152. _In_opt_ PCWSTR lpValue,
  153. _Out_opt_ PDWORD pdwType,
  154. _Out_writes_bytes_opt_(*pcbData) PVOID pvData,
  155. _Inout_opt_ PDWORD pcbData
  156. );
  157. DWORD
  158. ORAPI
  159. ORSetValue(
  160. _In_ ORHKEY Handle,
  161. _In_opt_ PCWSTR lpValueName,
  162. _In_ DWORD dwType,
  163. _In_reads_bytes_opt_(cbData) const BYTE* lpData,
  164. _In_ DWORD cbData
  165. );
  166. DWORD
  167. ORAPI
  168. OREnumValue(
  169. _In_ ORHKEY Handle,
  170. _In_ DWORD dwIndex,
  171. _Out_writes_(*lpcValueName) PWSTR lpValueName,
  172. _Inout_ PDWORD lpcValueName,
  173. _Out_opt_ PDWORD lpType,
  174. _Out_writes_bytes_opt_(*lpcbData) PBYTE lpData,
  175. _Inout_opt_ PDWORD lpcbData
  176. );
  177. DWORD
  178. ORAPI
  179. ORRenameKey(
  180. _In_ ORHKEY Handle,
  181. _In_ PCWSTR lpNewName
  182. );
  183. DWORD
  184. ORStart(
  185. VOID
  186. );
  187. VOID
  188. ORShutdown(
  189. VOID
  190. );
  191. DWORD
  192. ORAPI
  193. ORMergeHives(
  194. _In_reads_(HiveCount) ORHKEY* HiveHandles,
  195. _In_ ULONG HiveCount,
  196. _Out_ PORHKEY phkResult
  197. );
  198. #ifdef __cplusplus
  199. }
  200. #endif
  201. #endif //__OFFREG_H__