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.

461 lines
11 KiB

  1. #ifndef _REGIDL_
  2. #define _REGIDL_
  3. import "objidl.idl";
  4. import "oleidl.idl";
  5. interface IRegistryW;
  6. interface IRegistryA;
  7. //+---------------------------------------------------------------------------
  8. //
  9. // Copyright (C) Microsoft Corporation, 1995 - 1996.
  10. //
  11. // Contents: IRegistry interface definition
  12. //
  13. // Description:
  14. //
  15. //----------------------------------------------------------------------------
  16. cpp_quote("#ifndef _LPREGISTRY_DEFINED")
  17. cpp_quote("#define _LPREGISTRY_DEFINED")
  18. [
  19. local,
  20. object,
  21. uuid(c733e4b0-576e-11d0-b28c-00c04fd7cd22),
  22. pointer_default(unique)
  23. ]
  24. interface IRegistryW : IUnknown
  25. {
  26. typedef [unique] IRegistryW *LPREGISTRYW;
  27. typedef DWORD ACCESS_MASK;
  28. typedef ACCESS_MASK REGSAM;
  29. //typedef DWORD HKEY;
  30. typedef HKEY *PHKEY;
  31. typedef BYTE *LPBYTE;
  32. typedef DWORD SECURITY_INFORMATION, *PSECURITY_INFORMATION;
  33. typedef PVOID PSECURITY_DESCRIPTOR;
  34. typedef struct value_entXW {
  35. LPWSTR ve_valuename;
  36. DWORD ve_valuelen;
  37. DWORD ve_valueptr;
  38. DWORD ve_type;
  39. } VALENTXW, *PVALENTXW;
  40. // can this method be supported
  41. LONG ConnectRegistry (
  42. [in] LPWSTR lpMachineName,
  43. [in] HKEY hKey,
  44. [out] IRegistryW **ppReg
  45. );
  46. LONG CloseKey (
  47. [in] HKEY hKey
  48. );
  49. LONG CreateKey (
  50. [in] HKEY hKey,
  51. [in] LPCWSTR lpSubKey,
  52. [out] PHKEY phkResult
  53. );
  54. LONG CreateKeyEx (
  55. [in] HKEY hKey,
  56. [in] LPCWSTR lpSubKey,
  57. [in] DWORD Reserved,
  58. [in] LPWSTR lpClass,
  59. [in] DWORD dwOptions,
  60. [in] REGSAM samDesired,
  61. [in] LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  62. [out] PHKEY phkResult,
  63. [out] LPDWORD lpdwDisposition
  64. );
  65. LONG DeleteKey (
  66. [in] HKEY hKey,
  67. [in] LPCWSTR lpSubKey
  68. );
  69. LONG DeleteValue (
  70. [in] HKEY hKey,
  71. [in] LPCWSTR lpValueName
  72. );
  73. LONG EnumKey (
  74. [in] HKEY hKey,
  75. [in] DWORD dwIndex,
  76. [in] LPWSTR lpName,
  77. [in] DWORD cbName
  78. );
  79. LONG EnumKeyEx (
  80. [in] HKEY hKey,
  81. [in] DWORD dwIndex,
  82. [in] LPWSTR lpName,
  83. [out] LPDWORD lpcbName,
  84. [out] LPDWORD lpReserved,
  85. [in] LPWSTR lpClass,
  86. [out] LPDWORD lpcbClass,
  87. [out] PFILETIME lpftLastWriteTime
  88. );
  89. LONG EnumValue (
  90. [in] HKEY hKey,
  91. [in] DWORD dwIndex,
  92. [in] LPWSTR lpValueName,
  93. [out] LPDWORD lpcbValueName,
  94. [out] LPDWORD lpReserved,
  95. [out] LPDWORD lpType,
  96. [out] LPBYTE lpData,
  97. [in,out] LPDWORD lpcbData
  98. );
  99. LONG FlushKey (
  100. HKEY hKey
  101. );
  102. LONG GetKeySecurity (
  103. [in] HKEY hKey,
  104. [in] SECURITY_INFORMATION SecurityInformation,
  105. [out] PSECURITY_DESCRIPTOR pSecurityDescriptor,
  106. [in, out] LPDWORD lpcbSecurityDescriptor
  107. );
  108. LONG LoadKey (
  109. [in] HKEY hKey,
  110. [in] LPCWSTR lpSubKey,
  111. [in] LPCWSTR lpFile
  112. );
  113. LONG NotifyChangeKeyValue (
  114. [in] HKEY hKey,
  115. [in] BOOL bWatchSubtree,
  116. [in] DWORD dwNotifyFilter,
  117. [in] HANDLE hEvent,
  118. [in] BOOL fAsynchronus
  119. );
  120. LONG OpenKey (
  121. [in] HKEY hKey,
  122. [in] LPCWSTR lpSubKey,
  123. [out] PHKEY phkResult
  124. );
  125. LONG OpenKeyEx (
  126. [in] HKEY hKey,
  127. [in] LPCWSTR lpSubKey,
  128. [in] DWORD ulOptions,
  129. [in] REGSAM samDesired,
  130. [out] PHKEY phkResult
  131. );
  132. LONG QueryInfoKey (
  133. [in] HKEY hKey,
  134. [in] LPWSTR lpClass,
  135. [out] LPDWORD lpcbClass,
  136. [out] LPDWORD lpReserved,
  137. [out] LPDWORD lpcSubKeys,
  138. [out] LPDWORD lpcbMaxSubKeyLen,
  139. [out] LPDWORD lpcbMaxClassLen,
  140. [out] LPDWORD lpcValues,
  141. [out] LPDWORD lpcbMaxValueNameLen,
  142. [out] LPDWORD lpcbMaxValueLen,
  143. [out] LPDWORD lpcbSecurityDescriptor,
  144. [out] PFILETIME lpftLastWriteTime
  145. );
  146. LONG QueryValue (
  147. [in] HKEY hKey,
  148. [in] LPCWSTR lpSubKey,
  149. [in] LPWSTR lpValue,
  150. [in, out] LONG *lpcbValue
  151. );
  152. LONG QueryMultipleValues (
  153. [in] HKEY hKey,
  154. [in] PVALENTXW val_list,
  155. [in] DWORD num_vals,
  156. [in] LPWSTR lpValueBuf,
  157. [in,out] LPDWORD ldwTotsize
  158. );
  159. LONG QueryValueEx (
  160. [in] HKEY hKey,
  161. [in] LPCWSTR lpValueName,
  162. [out] LPDWORD lpReserved,
  163. [out] LPDWORD lpType,
  164. [in,out] LPBYTE lpData,
  165. [in,out] LPDWORD lpcbData
  166. );
  167. LONG ReplaceKey (
  168. [in] HKEY hKey,
  169. [in] LPCWSTR lpSubKey,
  170. [in] LPCWSTR lpNewFile,
  171. [in] LPCWSTR lpOldFile
  172. );
  173. LONG RestoreKey (
  174. [in] HKEY hKey,
  175. [in] LPCWSTR lpFile,
  176. [in] DWORD dwFlags
  177. );
  178. LONG SaveKey (
  179. [in] HKEY hKey,
  180. [in] LPCWSTR lpFile,
  181. [out] LPSECURITY_ATTRIBUTES lpSecurityAttributes
  182. );
  183. LONG SetKeySecurity (
  184. [in] HKEY hKey,
  185. [in] SECURITY_INFORMATION SecurityInformation,
  186. [out] PSECURITY_DESCRIPTOR pSecurityDescriptor
  187. );
  188. LONG SetValue (
  189. [in] HKEY hKey,
  190. [in] LPCWSTR lpSubKey,
  191. [in] DWORD dwType,
  192. [in] LPCWSTR lpData,
  193. [in] DWORD cbData
  194. );
  195. LONG SetValueEx (
  196. [in] HKEY hKey,
  197. [in] LPCWSTR lpValueName,
  198. [in] DWORD Reserved,
  199. [in] DWORD dwType,
  200. [in] const BYTE* lpData,
  201. [in] DWORD cbData
  202. );
  203. LONG UnLoadKey (
  204. [in] HKEY hKey,
  205. [in] LPCWSTR lpSubKey
  206. );
  207. }
  208. [
  209. local,
  210. object,
  211. uuid(c733e4b1-576e-11d0-b28c-00c04fd7cd22),
  212. pointer_default(unique)
  213. ]
  214. interface IRegistryA : IUnknown
  215. {
  216. typedef [unique] IRegistryA *LPREGISTRYA;
  217. typedef struct value_entXA {
  218. LPSTR ve_valuename;
  219. DWORD ve_valuelen;
  220. DWORD ve_valueptr;
  221. DWORD ve_type;
  222. } VALENTXA, *PVALENTXA;
  223. // can this method be supported
  224. LONG ConnectRegistry (
  225. [in] LPSTR lpMachineName,
  226. [in] HKEY hKey,
  227. [out] IRegistryA **ppReg
  228. );
  229. LONG CloseKey (
  230. [in] HKEY hKey
  231. );
  232. LONG CreateKey (
  233. [in] HKEY hKey,
  234. [in] LPCSTR lpSubKey,
  235. [out] PHKEY phkResult
  236. );
  237. LONG CreateKeyEx (
  238. [in] HKEY hKey,
  239. [in] LPCSTR lpSubKey,
  240. [in] DWORD Reserved,
  241. [in] LPSTR lpClass,
  242. [in] DWORD dwOptions,
  243. [in] REGSAM samDesired,
  244. [in] LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  245. [out] PHKEY phkResult,
  246. [out] LPDWORD lpdwDisposition
  247. );
  248. LONG DeleteKey (
  249. [in] HKEY hKey,
  250. [in] LPCSTR lpSubKey
  251. );
  252. LONG DeleteValue (
  253. [in] HKEY hKey,
  254. [in] LPCSTR lpValueName
  255. );
  256. LONG EnumKey (
  257. [in] HKEY hKey,
  258. [in] DWORD dwIndex,
  259. [in] LPSTR lpName,
  260. [in] DWORD cbName
  261. );
  262. LONG EnumKeyEx (
  263. [in] HKEY hKey,
  264. [in] DWORD dwIndex,
  265. [in] LPSTR lpName,
  266. [out] LPDWORD lpcbName,
  267. [out] LPDWORD lpReserved,
  268. [in] LPSTR lpClass,
  269. [out] LPDWORD lpcbClass,
  270. [out] PFILETIME lpftLastWriteTime
  271. );
  272. LONG EnumValue (
  273. [in] HKEY hKey,
  274. [in] DWORD dwIndex,
  275. [in] LPSTR lpValueName,
  276. [out] LPDWORD lpcbValueName,
  277. [out] LPDWORD lpReserved,
  278. [out] LPDWORD lpType,
  279. [out] LPBYTE lpData,
  280. [in,out] LPDWORD lpcbData
  281. );
  282. LONG FlushKey (
  283. HKEY hKey
  284. );
  285. LONG GetKeySecurity (
  286. [in] HKEY hKey,
  287. [in] SECURITY_INFORMATION SecurityInformation,
  288. [out] PSECURITY_DESCRIPTOR pSecurityDescriptor,
  289. [in, out] LPDWORD lpcbSecurityDescriptor
  290. );
  291. LONG LoadKey (
  292. [in] HKEY hKey,
  293. [in] LPCSTR lpSubKey,
  294. [in] LPCSTR lpFile
  295. );
  296. LONG NotifyChangeKeyValue (
  297. [in] HKEY hKey,
  298. [in] BOOL bWatchSubtree,
  299. [in] DWORD dwNotifyFilter,
  300. [in] HANDLE hEvent,
  301. [in] BOOL fAsynchronus
  302. );
  303. LONG OpenKey (
  304. [in] HKEY hKey,
  305. [in] LPCSTR lpSubKey,
  306. [out] PHKEY phkResult
  307. );
  308. LONG OpenKeyEx (
  309. [in] HKEY hKey,
  310. [in] LPCSTR lpSubKey,
  311. [in] DWORD ulOptions,
  312. [in] REGSAM samDesired,
  313. [out] PHKEY phkResult
  314. );
  315. LONG QueryInfoKey (
  316. [in] HKEY hKey,
  317. [in] LPSTR lpClass,
  318. [out] LPDWORD lpcbClass,
  319. [out] LPDWORD lpReserved,
  320. [out] LPDWORD lpcSubKeys,
  321. [out] LPDWORD lpcbMaxSubKeyLen,
  322. [out] LPDWORD lpcbMaxClassLen,
  323. [out] LPDWORD lpcValues,
  324. [out] LPDWORD lpcbMaxValueNameLen,
  325. [out] LPDWORD lpcbMaxValueLen,
  326. [out] LPDWORD lpcbSecurityDescriptor,
  327. [out] PFILETIME lpftLastWriteTime
  328. );
  329. LONG QueryValue (
  330. [in] HKEY hKey,
  331. [in] LPCSTR lpSubKey,
  332. [in] LPSTR lpValue,
  333. [in, out] LONG *lpcbValue
  334. );
  335. LONG QueryMultipleValues (
  336. [in] HKEY hKey,
  337. [in] PVALENTXA val_list,
  338. [in] DWORD num_vals,
  339. [in] LPSTR lpValueBuf,
  340. [in,out] LPDWORD ldwTotsize
  341. );
  342. LONG QueryValueEx (
  343. [in] HKEY hKey,
  344. [in] LPCSTR lpValueName,
  345. [out] LPDWORD lpReserved,
  346. [out] LPDWORD lpType,
  347. [in,out] LPBYTE lpData,
  348. [in,out] LPDWORD lpcbData
  349. );
  350. LONG ReplaceKey (
  351. [in] HKEY hKey,
  352. [in] LPCSTR lpSubKey,
  353. [in] LPCSTR lpNewFile,
  354. [in] LPCSTR lpOldFile
  355. );
  356. LONG RestoreKey (
  357. [in] HKEY hKey,
  358. [in] LPCSTR lpFile,
  359. [in] DWORD dwFlags
  360. );
  361. LONG SaveKey (
  362. [in] HKEY hKey,
  363. [in] LPCSTR lpFile,
  364. [out] LPSECURITY_ATTRIBUTES lpSecurityAttributes
  365. );
  366. LONG SetKeySecurity (
  367. [in] HKEY hKey,
  368. [in] SECURITY_INFORMATION SecurityInformation,
  369. [out] PSECURITY_DESCRIPTOR pSecurityDescriptor
  370. );
  371. LONG SetValue (
  372. [in] HKEY hKey,
  373. [in] LPCSTR lpSubKey,
  374. [in] DWORD dwType,
  375. [in] LPCSTR lpData,
  376. [in] DWORD cbData
  377. );
  378. LONG SetValueEx (
  379. [in] HKEY hKey,
  380. [in] LPCSTR lpValueName,
  381. [in] DWORD Reserved,
  382. [in] DWORD dwType,
  383. [in] const BYTE* lpData,
  384. [in] DWORD cbData
  385. );
  386. LONG UnLoadKey (
  387. [in] HKEY hKey,
  388. [in] LPCSTR lpSubKey
  389. );
  390. }
  391. cpp_quote("#endif")
  392. #endif // _REGIDL_