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.

745 lines
48 KiB

  1. ��
  2. // � 1998-1999 Microsoft Corporation. All rights reserved.
  3. #pragma autorecover
  4. Qualifier Description : ToSubClass Amended;
  5. #pragma namespace ("\\\\.\\Root\\Default")
  6. class RegistryEvent : __ExtrinsicEvent
  7. {
  8. };
  9. class RegistryKeyChangeEvent : RegistryEvent
  10. {
  11. string Hive;
  12. string KeyPath;
  13. };
  14. class RegistryTreeChangeEvent : RegistryEvent
  15. {
  16. string Hive;
  17. string RootPath;
  18. };
  19. class RegistryValueChangeEvent : RegistryEvent
  20. {
  21. string Hive;
  22. string KeyPath;
  23. string ValueName;
  24. };
  25. instance of __Win32Provider as $P
  26. {
  27. Name = "RegistryEventProvider";
  28. Clsid = "{fa77a74e-e109-11d0-ad6e-00c04fd8fdff}";
  29. HostingModel = "LocalSystemHost";
  30. };
  31. instance of __EventProviderRegistration
  32. {
  33. Provider = $P;
  34. EventQueryList = {"select * from RegistryEvent"};
  35. };
  36. instance of __Win32Provider as $PINST
  37. {
  38. Name = "RegProv" ;
  39. ClsId = "{fe9af5c0-d3b6-11ce-a5b6-00aa00680c3f}" ;
  40. ImpersonationLevel = 1;
  41. HostingModel = "LocalServiceHost";
  42. };
  43. instance of __MethodProviderRegistration
  44. {
  45. Provider = $PINST;
  46. };
  47. instance of __InstanceProviderRegistration
  48. {
  49. Provider = $PINST;
  50. SupportsPut = TRUE;
  51. SupportsGet = TRUE;
  52. SupportsDelete = FALSE;
  53. SupportsEnumeration = TRUE;
  54. };
  55. instance of __Win32Provider as $PPROP
  56. {
  57. Name = "RegPropProv";
  58. Clsid = "{72967901-68EC-11d0-B729-00AA0062CBB7}";
  59. ImpersonationLevel = 1;
  60. PerUserInitialization = TRUE;
  61. HostingModel = "LocalServiceHost";
  62. };
  63. instance of __PropertyProviderRegistration
  64. {
  65. Provider = $PPROP;
  66. SupportsGet = TRUE;
  67. SupportsPut = TRUE;
  68. };
  69. /////////////////////////////////////////////////////////////////////
  70. //
  71. // Declare a class whose methods are executed by the sample provider.
  72. [Locale(0x409), Description("The StdRegProv class contains methods that "
  73. "interact with the system registry. You can use these methods to: \n"
  74. "Verify the access permissions for a user \n"
  75. "Create, enumerate, and delete registry keys \n"
  76. "Create, enumerate, and delete named values \n"
  77. "Read, write, and delete data values "),
  78. dynamic: ToInstance,
  79. provider("RegProv")]
  80. class StdRegProv
  81. {
  82. [Description("The CreateKey method creates a subkey in the "
  83. "specified tree. "),
  84. implemented,
  85. static]
  86. uint32 CreateKey(
  87. [Description("Optional parameter that specifies the "
  88. "tree that contains the sSubKeyName path. The default "
  89. "value is HKEY_LOCAL_MACHINE (0x80000002). The following "
  90. "trees are defined in Winreg.h: \n"
  91. "HKEY_CLASSES_ROOT (0x80000000) \n"
  92. "HKEY_CURRENT_USER (0x80000001) \n"
  93. "HKEY_LOCAL_MACHINE (0x80000002) \n"
  94. "HKEY_USERS (0x80000003) \n"
  95. "HKEY_CURRENT_CONFIG (0x80000005) \n"
  96. "HKEY_DYN_DATA (0x80000006) \n"
  97. "Note that HKEY_DYN_DATA is a valid tree for "
  98. "Windows 95 and Windows 98 computers only. "),
  99. IN]
  100. uint32 hDefKey = 0x80000002,
  101. [Description("Contains the key to be created. The "
  102. "CreateKey method creates all subkeys specified in "
  103. "the path that do not exist. For example, if MyKey "
  104. "and MySubKey do not exist in the following path, "
  105. "CreateKey creates both keys: \n"
  106. "HKEY_LOCAL_MACHINE\\SOFTWARE\\MyKey\\MySubKey "),
  107. IN]
  108. string sSubKeyName
  109. );
  110. [ Description("The DeleteKey method deletes a subkey in the specified tree. "),
  111. implemented,
  112. static]
  113. uint32 DeleteKey(
  114. [ Description("Optional parameter that specifies the "
  115. "tree that contains the sSubKeyName path. The default "
  116. "value is HKEY_LOCAL_MACHINE (0x80000002). The following "
  117. "trees are defined in Winreg.h: \n"
  118. "HKEY_CLASSES_ROOT (0x80000000) \n"
  119. "HKEY_CURRENT_USER (0x80000001) \n"
  120. "HKEY_LOCAL_MACHINE (0x80000002) \n"
  121. "HKEY_USERS (0x80000003) \n"
  122. "HKEY_CURRENT_CONFIG (0x80000005) \n"
  123. "HKEY_DYN_DATA (0x80000006) \n"
  124. "Note that HKEY_DYN_DATA is a valid tree for "
  125. "Windows 95 and Windows 98 computers only. "),
  126. IN]
  127. uint32 hDefKey = 0x80000002,
  128. [ Description("Contains the key to be deleted. "),
  129. IN]
  130. string sSubKeyName
  131. );
  132. [ Description("The EnumKey method enumerates the "
  133. "subkeys for the given path. "),
  134. implemented,
  135. static]
  136. uint32 EnumKey(
  137. [ Description("Optional parameter that specifies the "
  138. "tree that contains the sSubKeyName path. The default "
  139. "value is HKEY_LOCAL_MACHINE (0x80000002). The following "
  140. "trees are defined in Winreg.h: \n"
  141. "HKEY_CLASSES_ROOT (0x80000000) \n"
  142. "HKEY_CURRENT_USER (0x80000001) \n"
  143. "HKEY_LOCAL_MACHINE (0x80000002) \n"
  144. "HKEY_USERS (0x80000003) \n"
  145. "HKEY_CURRENT_CONFIG (0x80000005) \n"
  146. "HKEY_DYN_DATA (0x80000006) \n"
  147. "Note that HKEY_DYN_DATA is a valid tree for "
  148. "Windows 95 and Windows 98 computers only. "),
  149. IN]
  150. uint32 hDefKey = 0x80000002,
  151. [ Description("Specifies the path that contains the "
  152. "subkeys to be enumerated. "),
  153. IN]
  154. string sSubKeyName,
  155. [ Description("Contains an array of subkey strings. "),
  156. out]
  157. string sNames[]
  158. );
  159. [ Description("The EnumValues method enumerates the named "
  160. "values of the given subkey. "),
  161. implemented,
  162. static]
  163. uint32 EnumValues(
  164. [ Description("Optional parameter that specifies the "
  165. "tree that contains the sSubKeyName path. The default "
  166. "value is HKEY_LOCAL_MACHINE (0x80000002). The following "
  167. "trees are defined in Winreg.h: \n"
  168. "HKEY_CLASSES_ROOT (0x80000000) \n"
  169. "HKEY_CURRENT_USER (0x80000001) \n"
  170. "HKEY_LOCAL_MACHINE (0x80000002) \n"
  171. "HKEY_USERS (0x80000003) \n"
  172. "HKEY_CURRENT_CONFIG (0x80000005) \n"
  173. "HKEY_DYN_DATA (0x80000006) \n"
  174. "Note that HKEY_DYN_DATA is a valid tree for "
  175. "Windows 95 and Windows 98 computers only. "),
  176. IN]
  177. uint32 hDefKey = 0x80000002,
  178. [ Description("Specifies the path that contains the named "
  179. "values to be enumerated. "),
  180. IN]
  181. string sSubKeyName,
  182. [ Description("Contains an array of named value "
  183. "strings. The elements of this array correspond "
  184. "directly with the elements of iTypes. "),
  185. out]
  186. string sNames[],
  187. [ Description("Contains an array of data value types "
  188. "(integers). You can use these types to determine "
  189. "which Get method to call. For example, if the data "
  190. "value type is REG_SZ, you would call GetStringValue "
  191. "to retrieve the named value's data value. The "
  192. "elements of this array correspond directly with "
  193. "the elements of sNames. The following data value "
  194. "types are defined in Winnt.h: \n"
  195. "REG_SZ (1) \n"
  196. "REG_EXPAND_SZ (2) \n"
  197. "REG_BINARY (3) \n"
  198. "REG_DWORD (4) \n"
  199. "REG_MULTI_SZ (7) \n"),
  200. out]
  201. sint32 Types[]
  202. );
  203. [ Description("The DeleteValue method deletes "
  204. "a named value in the specified subkey."),
  205. implemented,
  206. static]
  207. uint32 DeleteValue(
  208. [ Description("Optional parameter that specifies the "
  209. "tree that contains the sSubKeyName path. The default "
  210. "value is HKEY_LOCAL_MACHINE (0x80000002). The following "
  211. "trees are defined in Winreg.h: \n"
  212. "HKEY_CLASSES_ROOT (0x80000000) \n"
  213. "HKEY_CURRENT_USER (0x80000001) \n"
  214. "HKEY_LOCAL_MACHINE (0x80000002) \n"
  215. "HKEY_USERS (0x80000003) \n"
  216. "HKEY_CURRENT_CONFIG (0x80000005) \n"
  217. "HKEY_DYN_DATA (0x80000006) \n"
  218. "Note that HKEY_DYN_DATA is a valid tree for "
  219. "Windows 95 and Windows 98 computers only. "),
  220. IN]
  221. uint32 hDefKey = 0x80000002,
  222. [ Description("Specifies the key that contains the named "
  223. "value to be deleted. "),
  224. IN]
  225. string sSubKeyName,
  226. [ Description("Specifies the named value to be deleted "
  227. "from the subkey. Specify an empty string to delete "
  228. "the default named value (the default named value "
  229. "is not deleted its value is set to \"value not set\""),
  230. in]
  231. string sValueName
  232. );
  233. [ Description("The SetDWORDValue method sets the data value "
  234. "for a named value whose data type is REG_BINARY. "),
  235. implemented,
  236. static]
  237. uint32 SetDWORDValue(
  238. [ Description("Optional parameter that specifies the "
  239. "tree that contains the sSubKeyName path. The default "
  240. "value is HKEY_LOCAL_MACHINE (0x80000002). The following "
  241. "trees are defined in Winreg.h: \n"
  242. "HKEY_CLASSES_ROOT (0x80000000) \n"
  243. "HKEY_CURRENT_USER (0x80000001) \n"
  244. "HKEY_LOCAL_MACHINE (0x80000002) \n"
  245. "HKEY_USERS (0x80000003) \n"
  246. "HKEY_CURRENT_CONFIG (0x80000005) \n"
  247. "HKEY_DYN_DATA (0x80000006) \n"
  248. "Note that HKEY_DYN_DATA is a valid tree for "
  249. "Windows 95 and Windows 98 computers only. "),
  250. IN]
  251. uint32 hDefKey = 0x80000002,
  252. [ Description("Specifies the key that contains the named "
  253. "value to be set. "),
  254. IN]
  255. string sSubKeyName,
  256. [ Description("Specifies the named value whose data value "
  257. "you are setting. You can specify an existing named "
  258. "value (update) or a new named value (create). Specify "
  259. "an empty string to set the data value for the default "
  260. "named value. "),
  261. in]
  262. string sValueName,
  263. [ Description("Specifies a double word data value. "),
  264. in]
  265. uint32 uValue=3
  266. );
  267. [ Description("The GetDWORDValue method returns the data value "
  268. "for a named value whose data type is REG_DWORD. "),
  269. implemented,
  270. static]
  271. uint32 GetDWORDValue(
  272. [ Description("Optional parameter that specifies the "
  273. "tree that contains the sSubKeyName path. The default "
  274. "value is HKEY_LOCAL_MACHINE (0x80000002). The following "
  275. "trees are defined in Winreg.h: \n"
  276. "HKEY_CLASSES_ROOT (0x80000000) \n"
  277. "HKEY_CURRENT_USER (0x80000001) \n"
  278. "HKEY_LOCAL_MACHINE (0x80000002) \n"
  279. "HKEY_USERS (0x80000003) \n"
  280. "HKEY_CURRENT_CONFIG (0x80000005) \n"
  281. "HKEY_DYN_DATA (0x80000006) \n"
  282. "Note that HKEY_DYN_DATA is a valid tree for "
  283. "Windows 95 and Windows 98 computers only. "),
  284. IN]
  285. uint32 hDefKey = 0x80000002,
  286. [ Description("Specifies the path that contains the named "
  287. "values. "),
  288. IN]
  289. string sSubKeyName,
  290. [ Description("Specifies the named value whose data value "
  291. "you are retrieving. Specify an empty string to get the "
  292. "default named value."),
  293. in]
  294. string sValueName,
  295. [ Description("Contains the DWORD data value for the "
  296. "named value. "),
  297. out]
  298. uint32 uValue
  299. );
  300. [ Description("The SetStringValue method sets the data "
  301. "value for a named value whose data type is REG_MULTI_SZ."),
  302. implemented,
  303. static]
  304. uint32 SetStringValue(
  305. [ Description("Optional parameter that specifies the "
  306. "tree that contains the sSubKeyName path. The default "
  307. "value is HKEY_LOCAL_MACHINE (0x80000002). The following "
  308. "trees are defined in Winreg.h: \n"
  309. "HKEY_CLASSES_ROOT (0x80000000) \n"
  310. "HKEY_CURRENT_USER (0x80000001) \n"
  311. "HKEY_LOCAL_MACHINE (0x80000002) \n"
  312. "HKEY_USERS (0x80000003) \n"
  313. "HKEY_CURRENT_CONFIG (0x80000005) \n"
  314. "HKEY_DYN_DATA (0x80000006) \n"
  315. "Note that HKEY_DYN_DATA is a valid tree for "
  316. "Windows 95 and Windows 98 computers only. "),
  317. IN]
  318. uint32 hDefKey = 0x80000002,
  319. [ Description("Specifies the key that contains the "
  320. "named value to be set. "),
  321. IN]
  322. string sSubKeyName,
  323. [ Description("Specifies the named value whose data "
  324. "value you are setting. You can specify an existing "
  325. "named value (update) or a new named value (create). "
  326. "Specify an empty string to set the data value for the "
  327. "default named value. "),
  328. in]
  329. string sValueName,
  330. [ Description("Specifies a string data value."),
  331. in]
  332. string sValue="hello"
  333. );
  334. [ Description("The GetStringValue method returns the data "
  335. "value for a named value whose data type is REG_SZ. "),
  336. implemented,
  337. static]
  338. uint32 GetStringValue(
  339. [ Description("Optional parameter that specifies the "
  340. "tree that contains the sSubKeyName path. The default "
  341. "value is HKEY_LOCAL_MACHINE (0x80000002). The following "
  342. "trees are defined in Winreg.h: \n"
  343. "HKEY_CLASSES_ROOT (0x80000000) \n"
  344. "HKEY_CURRENT_USER (0x80000001) \n"
  345. "HKEY_LOCAL_MACHINE (0x80000002) \n"
  346. "HKEY_USERS (0x80000003) \n"
  347. "HKEY_CURRENT_CONFIG (0x80000005) \n"
  348. "HKEY_DYN_DATA (0x80000006) \n"
  349. "Note that HKEY_DYN_DATA is a valid tree for "
  350. "Windows 95 and Windows 98 computers only. "),
  351. IN]
  352. uint32 hDefKey = 0x80000002,
  353. [ Description("Specifies the path that contains the named"
  354. " values. "),
  355. IN]
  356. string sSubKeyName,
  357. [ Description("Specifies the named value whose data "
  358. "value you are retrieving. Specify an empty string to "
  359. "get the default named value. "),
  360. in]
  361. string sValueName,
  362. [ Description("Contains the string data value for the "
  363. "named value. "),
  364. out]
  365. string sValue
  366. );
  367. [ Description("The SetMultiStringValue method sets the data "
  368. "value for a named value whose data type is REG_MULTI_SZ. "
  369. "The SetMultiStringValue method returns a uint32 which is "
  370. "0 if successful or some other value if any other error occurred."),
  371. implemented,
  372. static]
  373. uint32 SetMultiStringValue(
  374. [ Description("Optional parameter that specifies the "
  375. "tree that contains the sSubKeyName path. The default "
  376. "value is HKEY_LOCAL_MACHINE (0x80000002). The following "
  377. "trees are defined in Winreg.h: \n"
  378. "HKEY_CLASSES_ROOT (0x80000000) \n"
  379. "HKEY_CURRENT_USER (0x80000001) \n"
  380. "HKEY_LOCAL_MACHINE (0x80000002) \n"
  381. "HKEY_USERS (0x80000003) \n"
  382. "HKEY_CURRENT_CONFIG (0x80000005) \n"
  383. "HKEY_DYN_DATA (0x80000006) \n"
  384. "Note that HKEY_DYN_DATA is a valid tree for "
  385. "Windows 95 and Windows 98 computers only. "),
  386. IN]
  387. uint32 hDefKey = 0x80000002,
  388. [ Description("Specifies the key that contains the "
  389. "named value to be set. "),
  390. IN]
  391. string sSubKeyName,
  392. [ Description("Specifies the named value whose data "
  393. "value you are setting. You can specify an existing "
  394. "named value (update) or a new named value (create). "
  395. "Specify an empty string to set the data value for "
  396. "the default named value. "),
  397. in]
  398. string sValueName,
  399. [ Description("Specifies an array of string data values. "),
  400. in]
  401. string sValue[] = {"hello", "there"}
  402. );
  403. [ Description("The GetMultiStringValue method returns the data "
  404. "value for a named value whose data type is REG_MULTI_SZ. "
  405. "The GetMultiStringValue method returns a uint32 which "
  406. "is 0 if successful or some other value if any other error "
  407. "occurred."),
  408. implemented,
  409. static]
  410. uint32 GetMultiStringValue(
  411. [ Description("Optional parameter that specifies the "
  412. "tree that contains the sSubKeyName path. The default "
  413. "value is HKEY_LOCAL_MACHINE (0x80000002). The following "
  414. "trees are defined in Winreg.h: \n"
  415. "HKEY_CLASSES_ROOT (0x80000000) \n"
  416. "HKEY_CURRENT_USER (0x80000001) \n"
  417. "HKEY_LOCAL_MACHINE (0x80000002) \n"
  418. "HKEY_USERS (0x80000003) \n"
  419. "HKEY_CURRENT_CONFIG (0x80000005) \n"
  420. "HKEY_DYN_DATA (0x80000006) \n"
  421. "Note that HKEY_DYN_DATA is a valid tree for "
  422. "Windows 95 and Windows 98 computers only. "),
  423. IN]
  424. uint32 hDefKey = 0x80000002,
  425. [ Description("Specifies the path that contains the "
  426. "named values. "),
  427. IN]
  428. string sSubKeyName,
  429. [ Description("Specifies the named value whose data "
  430. "value you are retrieving. Specify an empty string to "
  431. "get the default named value. "),
  432. in]
  433. string sValueName,
  434. [ Description("Contains an array of string data values "
  435. "for the named value. "),
  436. out]
  437. string sValue[]
  438. );
  439. [ Description("The SetExpandedStringValue method sets the data "
  440. "value for a named value whose data type is REG_EXPAND_SZ. "
  441. "The SetExpandedStringValue method returns a uint32 which is "
  442. "0 if successful or some other value if any other error occurred."),
  443. implemented,
  444. static]
  445. uint32 SetExpandedStringValue(
  446. [ Description("Optional parameter that specifies the "
  447. "tree that contains the sSubKeyName path. The default "
  448. "value is HKEY_LOCAL_MACHINE (0x80000002). The following "
  449. "trees are defined in Winreg.h: \n"
  450. "HKEY_CLASSES_ROOT (0x80000000) \n"
  451. "HKEY_CURRENT_USER (0x80000001) \n"
  452. "HKEY_LOCAL_MACHINE (0x80000002) \n"
  453. "HKEY_USERS (0x80000003) \n"
  454. "HKEY_CURRENT_CONFIG (0x80000005) \n"
  455. "HKEY_DYN_DATA (0x80000006) \n"
  456. "Note that HKEY_DYN_DATA is a valid tree for "
  457. "Windows 95 and Windows 98 computers only. "),
  458. IN]
  459. uint32 hDefKey = 0x80000002,
  460. [ Description("Specifies the key that contains the named "
  461. "value to be set. "),
  462. IN]
  463. string sSubKeyName,
  464. [ Description("Specifies the named value whose data "
  465. "value you are setting. You can specify an existing "
  466. "named value (update) or a new named value (create). "
  467. "Specify an empty string to set the data value for the "
  468. "default named value. "),
  469. in]
  470. string sValueName,
  471. [ Description("Specifies an expanded string data value. "
  472. "The environment variable specified in the string must "
  473. "exist for the string to be expanded when you "
  474. "call GetExpandedStringValue. "),
  475. in]
  476. string sValue="%path%"
  477. );
  478. [ Description("The GetExpandedStringValue method returns the "
  479. "data value for a named value whose data type is REG_EXPAND_SZ. "),
  480. implemented,
  481. static]
  482. uint32 GetExpandedStringValue(
  483. [ Description("Optional parameter that specifies the "
  484. "tree that contains the sSubKeyName path. The default "
  485. "value is HKEY_LOCAL_MACHINE (0x80000002). The following "
  486. "trees are defined in Winreg.h: \n"
  487. "HKEY_CLASSES_ROOT (0x80000000) \n"
  488. "HKEY_CURRENT_USER (0x80000001) \n"
  489. "HKEY_LOCAL_MACHINE (0x80000002) \n"
  490. "HKEY_USERS (0x80000003) \n"
  491. "HKEY_CURRENT_CONFIG (0x80000005) \n"
  492. "HKEY_DYN_DATA (0x80000006) \n"
  493. "Note that HKEY_DYN_DATA is a valid tree for "
  494. "Windows 95 and Windows 98 computers only. "),
  495. IN]
  496. uint32 hDefKey = 0x80000002,
  497. [ Description("Specifies the path that contains the "
  498. "named values. "),
  499. IN]
  500. string sSubKeyName,
  501. [ Description("Specifies the named value whose data "
  502. "value you are retrieving. Specify an empty string to "
  503. "get the default named value. "),
  504. in]
  505. string sValueName,
  506. [ Description("Contains the expanded string data value "
  507. "for the named value. The string is only expanded if "
  508. "the environment variable (for example, %Path%) is defined. "),
  509. out]
  510. string sValue
  511. );
  512. [ Description("The SetBinaryValue method sets the data value "
  513. "for a named value whose data type is REG_BINARY. "
  514. "The SetBinaryValue method returns a uint32 which is 0 if "
  515. "successful or some other value if any other error occurred."),
  516. implemented,
  517. static]
  518. uint32 SetBinaryValue(
  519. [ Description("Optional parameter that specifies the "
  520. "tree that contains the sSubKeyName path. The default "
  521. "value is HKEY_LOCAL_MACHINE (0x80000002). The following "
  522. "trees are defined in Winreg.h: \n"
  523. "HKEY_CLASSES_ROOT (0x80000000) \n"
  524. "HKEY_CURRENT_USER (0x80000001) \n"
  525. "HKEY_LOCAL_MACHINE (0x80000002) \n"
  526. "HKEY_USERS (0x80000003) \n"
  527. "HKEY_CURRENT_CONFIG (0x80000005) \n"
  528. "HKEY_DYN_DATA (0x80000006) \n"
  529. "Note that HKEY_DYN_DATA is a valid tree for "
  530. "Windows 95 and Windows 98 computers only. "),
  531. IN]
  532. uint32 hDefKey = 0x80000002,
  533. [ Description("Specifies the key that contains the named "
  534. "value to be set. "),
  535. IN]
  536. string sSubKeyName,
  537. [ Description("Specifies the named value whose data "
  538. "value you are setting. You can specify an existing "
  539. "named value (update) or a new named value (create). "
  540. "Specify an empty string to set the data value for "
  541. "the default named value. "),
  542. in]
  543. string sValueName,
  544. [ Description("Specifies an array of binary data values. "),
  545. in]
  546. uint8 uValue[]={1,2}
  547. );
  548. [ Description("The GetBinaryValue method returns the data "
  549. "value for a named value whose data type is REG_BINARY. "
  550. "The GetBinaryValue method returns a uint32 which is 0 if "
  551. "successful or some other value if any other error occurred."),
  552. implemented,
  553. static]
  554. uint32 GetBinaryValue(
  555. [ Description("Optional parameter that specifies the "
  556. "tree that contains the sSubKeyName path. The default "
  557. "value is HKEY_LOCAL_MACHINE (0x80000002). The following "
  558. "trees are defined in Winreg.h: \n"
  559. "HKEY_CLASSES_ROOT (0x80000000) \n"
  560. "HKEY_CURRENT_USER (0x80000001) \n"
  561. "HKEY_LOCAL_MACHINE (0x80000002) \n"
  562. "HKEY_USERS (0x80000003) \n"
  563. "HKEY_CURRENT_CONFIG (0x80000005) \n"
  564. "HKEY_DYN_DATA (0x80000006) \n"
  565. "Note that HKEY_DYN_DATA is a valid tree for "
  566. "Windows 95 and Windows 98 computers only. "),
  567. IN]
  568. uint32 hDefKey = 0x80000002,
  569. [ Description("Specifies the path that contains the "
  570. "named values. "),
  571. IN]
  572. string sSubKeyName,
  573. [ Description("Specifies the named value whose data "
  574. "value you are retrieving. Specify an empty string "
  575. "to get the default named value. "),
  576. in]
  577. string sValueName,
  578. [ Description("Contains an array of binary bytes. "),
  579. out]
  580. uint8 uValue[]
  581. );
  582. [ Description("The CheckAccess method verifies that the user "
  583. "possesses the specified permissions. "
  584. "The method returns a uint32 which is 0 if successful or "
  585. "some other value if any other error occurred."),
  586. implemented,
  587. static]
  588. uint32 CheckAccess(
  589. [ Description("Optional parameter that specifies the "
  590. "tree that contains the sSubKeyName path. The default "
  591. "value is HKEY_LOCAL_MACHINE (0x80000002). The following "
  592. "trees are defined in Winreg.h: \n"
  593. "HKEY_CLASSES_ROOT (0x80000000) \n"
  594. "HKEY_CURRENT_USER (0x80000001) \n"
  595. "HKEY_LOCAL_MACHINE (0x80000002) \n"
  596. "HKEY_USERS (0x80000003) \n"
  597. "HKEY_CURRENT_CONFIG (0x80000005) \n"
  598. "HKEY_DYN_DATA (0x80000006) \n"
  599. "Note that HKEY_DYN_DATA is a valid tree for "
  600. "Windows 95 and Windows 98 computers only. "),
  601. IN]
  602. uint32 hDefKey = 0x80000002,
  603. [ Description("Contains the key to be verified. "),
  604. IN]
  605. string sSubKeyName,
  606. [ Description("Optional parameter that specifies "
  607. "the access permissions to be verified. You can "
  608. "add these values together to verify more than one "
  609. "access permission. The default value is 3. The "
  610. "following access permission values are defined "
  611. "in Winnt.h: \n"
  612. "KEY_QUERY_VALUE (0X0001) \n"
  613. "KEY_SET_VALUE (0X0002) \n"
  614. "KEY_CREATE_SUB_KEY (0X0004) \n"
  615. "KEY_ENUMERATE_SUB_KEYS (0X0008) \n"
  616. "KEY_NOTIFY (0X0010) \n"
  617. "KEY_CREATE_LINK (0X0020) \n"
  618. "DELETE (0x00010000) \n"
  619. "READ_CONTROL (0x00020000) \n"
  620. "WRITE_DAC (0X00040000) \n"
  621. "WRITE_OWNER (0X00080000) "),
  622. in]
  623. uint32 uRequired = 3,
  624. [ Description("This parameter is True if user possesses "
  625. "the specified access permissions. Otherwise, the "
  626. "parameter is False. "),
  627. out]
  628. boolean bGranted
  629. );
  630. };