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.

1244 lines
30 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. test.mof
  5. Abstract:
  6. Test mof used to validate the BMOF Loc parser. It includes the
  7. following:
  8. * Namespace changes
  9. - at top of file
  10. - in middle of file
  11. * Classflag changes
  12. * InstanceFlag changes
  13. * Instance definitions
  14. - All Data Types for properties
  15. - Class qualifiers have all types
  16. - Class has no qualifiers
  17. - Property qualifiers of all types
  18. - Property with no qualifiers
  19. - Embedded classes
  20. - arrays of embedded classes
  21. - embedded classes within embedded classes
  22. * Class definitions
  23. - All Data Types for properties
  24. - Class qualifiers have all types
  25. - Class has no qualifiers
  26. - Property qualifiers of all types
  27. - Property with no qualifiers
  28. - Derived classes
  29. * Methods
  30. - All data types as return type
  31. - All data types as parameters
  32. - void return type
  33. - void parameters
  34. - all qualifier types on parameters
  35. - no qualifier on parameters
  36. - no qualifier on method
  37. - only IN params
  38. - only OUT params
  39. - only IN params & void return
  40. - only OUT & void return
  41. - only IN & non void return
  42. * Qualifier flavors
  43. * include pragma
  44. * aliases
  45. --*/
  46. #pragma namespace("\\\\.\\root\\testit")
  47. #pragma classflags("forceupdate", "updateonly")
  48. [qualbool, qualbool2(FALSE),
  49. qualarrstr { "string1", "string2", "string3" },
  50. qualarrint { 1, 2, 3 }
  51. ]
  52. class Embded
  53. {
  54. [qualbool, qualbool2(FALSE),
  55. qualarrstr { "string1", "string2", "string3" },
  56. qualarrint { 1, 2, 3 }
  57. ]
  58. boolean Xboolean;
  59. [qualbool, qualbool2(FALSE),
  60. qualarrstr { "string1", "string2", "string3" },
  61. qualarrint { 1, 2, 3 }
  62. ]
  63. uint8 Xuint8;
  64. [qualbool, qualbool2(FALSE),
  65. qualarrstr { "string1", "string2", "string3" },
  66. qualarrint { 1, 2, 3 }
  67. ]
  68. uint16 Xuint16;
  69. [qualbool, qualbool2(FALSE),
  70. qualarrstr { "string1", "string2", "string3" },
  71. qualarrint { 1, 2, 3 }
  72. ]
  73. uint32 Xuint32;
  74. [qualbool, qualbool2(FALSE),
  75. qualarrstr { "string1", "string2", "string3" },
  76. qualarrint { 1, 2, 3 }
  77. ]
  78. uint64 Xuint64;
  79. [qualbool, qualbool2(FALSE),
  80. qualarrstr { "string1", "string2", "string3" },
  81. qualarrint { 1, 2, 3 }
  82. ]
  83. sint8 Xint8;
  84. [qualbool, qualbool2(FALSE),
  85. qualarrstr { "string1", "string2", "string3" },
  86. qualarrint { 1, 2, 3 }
  87. ]
  88. sint16 Xint16;
  89. [qualbool, qualbool2(FALSE),
  90. qualarrstr { "string1", "string2", "string3" },
  91. qualarrint { 1, 2, 3 }
  92. ]
  93. sint32 Xint32;
  94. [qualbool, qualbool2(FALSE),
  95. qualarrstr { "string1", "string2", "string3" },
  96. qualarrint { 1, 2, 3 }
  97. ]
  98. sint64 Xint64;
  99. [qualbool, qualbool2(FALSE),
  100. qualarrstr { "string1", "string2", "string3" },
  101. qualarrint { 1, 2, 3 }
  102. ]
  103. datetime Xdatetime;
  104. [qualbool, qualbool2(FALSE),
  105. qualarrstr { "string1", "string2", "string3" },
  106. qualarrint { 1, 2, 3 }
  107. ]
  108. string Xstring;
  109. };
  110. class YY as $MyYY
  111. {
  112. [qualbool, qualbool2(FALSE),
  113. qualarrstr { "string1", "string2", "string3" },
  114. qualarrint { 1, 2, 3 }
  115. ]
  116. Embed XX;
  117. };
  118. class noqual
  119. {
  120. boolean Xboolean;
  121. uint8 Xuint8;
  122. uint16 Xuint16;
  123. uint32 Xuint32;
  124. uint64 Xuint64;
  125. sint8 Xint8;
  126. sint16 Xint16;
  127. sint32 Xint32;
  128. sint64 Xint64;
  129. datetime Xdatetime;
  130. string Xstring;
  131. YY XEmbed;
  132. };
  133. instance of Embed
  134. {
  135. Xboolean = "TRUE";
  136. Xuint8 = 1;
  137. Xuint16 = 2;
  138. Xuint32 = 3;
  139. Xuint64 = 4;
  140. Xint8 = 5;
  141. Xint16 = 6;
  142. Xint32 = 7;
  143. Xint64 = 8;
  144. Xstring = "XYZZY";
  145. };
  146. #pragma instanceflags("updateonly")
  147. class small
  148. {
  149. string str;
  150. uint8 ii;
  151. };
  152. class esmall
  153. {
  154. [key] string xx;
  155. small Smally;
  156. };
  157. #pragma instanceflags("createonly")
  158. [qualbool, qualbool2(FALSE),
  159. qualarrstr { "string1", "string2", "string3" },
  160. qualarrint { 1, 2, 3 }
  161. ]
  162. instance of esmall
  163. {
  164. xx = "A";
  165. Smally = instance of small { xx = "xxxx"; ii = 33; };
  166. };
  167. [qualbool, qualbool2(FALSE),
  168. qualarrstr { "string1", "string2", "string3" },
  169. qualarrint { 1, 2, 3 }
  170. ]
  171. instance of esmall
  172. {
  173. xx = "B";
  174. [qualbool, qualbool2(FALSE),
  175. qualarrstr { "string1", "string2", "string3" },
  176. qualarrint { 1, 2, 3 }
  177. ]
  178. Smally = instance of small { xx = "yyyy"; ii = 99; };
  179. };
  180. class xxxxx
  181. {
  182. [key] string sss;
  183. esmall eee;
  184. };
  185. instance of xxxxx
  186. {
  187. sss = "foo";
  188. eee = instance of esmall {
  189. xx = "C";
  190. Smally = instance of small {
  191. xx = "rr";
  192. ii = 22;};
  193. };
  194. };
  195. class earr
  196. {
  197. uint8 arr[];
  198. };
  199. instance of earr
  200. {
  201. arr = { 1,2,3,4,5 };
  202. };
  203. class Caller
  204. {
  205. boolean Xboolean();
  206. uint8 Xuint8();
  207. uint16 Xuint16();
  208. uint32 Xuint32();
  209. uint64 Xuint64();
  210. sint8 Xint8();
  211. sint16 Xint16();
  212. sint32 Xint32();
  213. sint64 Xint64();
  214. datetime Xdatetime();
  215. string Xstring();
  216. YY XEmbedX();
  217. void Nothing();
  218. void lots([in, out] boolean Xboolean,
  219. [in, out] uint8 Xuint8,
  220. [in, out] uint16 Xuint16,
  221. [in, out] uint32 Xuint32,
  222. [in, out] uint64 Xuint64,
  223. [in, out] sint8 Xint8,
  224. [in, out] sint16 Xint16,
  225. [in, out] sint32 Xint32,
  226. [in, out] sint64 Xint64,
  227. [in, out] datetime Xdatetime,
  228. [in, out] string Xstring,
  229. [in, out] YY XEmbedX);
  230. };
  231. class Caller2
  232. {
  233. [qualbool, qualbool2(FALSE),
  234. qualarrstr { "string1", "string2", "string3" },
  235. qualarrint { 1, 2, 3 }
  236. ]
  237. boolean Xboolean([in] uint8 i);
  238. [qualbool, qualbool2(FALSE),
  239. qualarrstr { "string1", "string2", "string3" },
  240. qualarrint { 1, 2, 3 }
  241. ]
  242. uint8 Xuint8([in] uint16 i);
  243. [qualbool, qualbool2(FALSE),
  244. qualarrstr { "string1", "string2", "string3" },
  245. qualarrint { 1, 2, 3 }
  246. ]
  247. uint16 Xuint16([in] uint32 i);
  248. [qualbool, qualbool2(FALSE),
  249. qualarrstr { "string1", "string2", "string3" },
  250. qualarrint { 1, 2, 3 }
  251. ]
  252. uint32 Xuint32([in] uint64 i);
  253. [qualbool, qualbool2(FALSE),
  254. qualarrstr { "string1", "string2", "string3" },
  255. qualarrint { 1, 2, 3 }
  256. ]
  257. uint64 Xuint64([in] sint8 i);
  258. [qualbool, qualbool2(FALSE),
  259. qualarrstr { "string1", "string2", "string3" },
  260. qualarrint { 1, 2, 3 }
  261. ]
  262. sint8 Xint8([in] sint16 i);
  263. [qualbool, qualbool2(FALSE),
  264. qualarrstr { "string1", "string2", "string3" },
  265. qualarrint { 1, 2, 3 }
  266. ]
  267. sint16 Xint16([in] sint32 i);
  268. [qualbool, qualbool2(FALSE),
  269. qualarrstr { "string1", "string2", "string3" },
  270. qualarrint { 1, 2, 3 }
  271. ]
  272. sint32 Xint32([in] sint64 i);
  273. [qualbool, qualbool2(FALSE),
  274. qualarrstr { "string1", "string2", "string3" },
  275. qualarrint { 1, 2, 3 }
  276. ]
  277. sint64 Xint64([in] datetime i);
  278. [qualbool, qualbool2(FALSE),
  279. qualarrstr { "string1", "string2", "string3" },
  280. qualarrint { 1, 2, 3 }
  281. ]
  282. datetime Xdatetime([in] string i);
  283. [qualbool, qualbool2(FALSE),
  284. qualarrstr { "string1", "string2", "string3" },
  285. qualarrint { 1, 2, 3 }
  286. ]
  287. string Xstring([in] YY i);
  288. [qualbool, qualbool2(FALSE),
  289. qualarrstr { "string1", "string2", "string3" },
  290. qualarrint { 1, 2, 3 }
  291. ]
  292. YY XEmbedX([in] boolean i);
  293. boolean XbooleanX([out] uint8 i);
  294. uint8 Xuint8X([out] uint16 i);
  295. uint16 Xuint16X([out] uint32 i);
  296. uint32 Xuint32X([out] uint64 i);
  297. uint64 Xuint64X([out] sint8 i);
  298. sint8 Xint8X([out] sint16 i);
  299. sint16 Xint16X([out] sint32 i);
  300. sint32 Xint32X([out] sint64 i);
  301. sint64 Xint64X([out] datetime i);
  302. datetime XdatetimeX([out] string i);
  303. string XstringX([out] YY i);
  304. YY XEmbedXX([out] boolean i);
  305. };
  306. class caller4
  307. {
  308. [qualbool, qualbool2(FALSE),
  309. qualarrstr { "string1", "string2", "string3" },
  310. qualarrint { 1, 2, 3 }
  311. ]
  312. void Xboolean([in] uint8 i);
  313. [qualbool, qualbool2(FALSE),
  314. qualarrstr { "string1", "string2", "string3" },
  315. qualarrint { 1, 2, 3 }
  316. ]
  317. void Xuint8([in] uint16 i);
  318. [qualbool, qualbool2(FALSE),
  319. qualarrstr { "string1", "string2", "string3" },
  320. qualarrint { 1, 2, 3 }
  321. ]
  322. void Xuint16([in] uint32 i);
  323. [qualbool, qualbool2(FALSE),
  324. qualarrstr { "string1", "string2", "string3" },
  325. qualarrint { 1, 2, 3 }
  326. ]
  327. void Xuint32([in] uint64 i);
  328. [qualbool, qualbool2(FALSE),
  329. qualarrstr { "string1", "string2", "string3" },
  330. qualarrint { 1, 2, 3 }
  331. ]
  332. void Xuint64([in] sint8 i);
  333. [qualbool, qualbool2(FALSE),
  334. qualarrstr { "string1", "string2", "string3" },
  335. qualarrint { 1, 2, 3 }
  336. ]
  337. void Xint8([in] sint16 i);
  338. [qualbool, qualbool2(FALSE),
  339. qualarrstr { "string1", "string2", "string3" },
  340. qualarrint { 1, 2, 3 }
  341. ]
  342. void Xint16([in] sint32 i);
  343. [qualbool, qualbool2(FALSE),
  344. qualarrstr { "string1", "string2", "string3" },
  345. qualarrint { 1, 2, 3 }
  346. ]
  347. void Xint32([in] sint64 i);
  348. [qualbool, qualbool2(FALSE),
  349. qualarrstr { "string1", "string2", "string3" },
  350. qualarrint { 1, 2, 3 }
  351. ]
  352. void Xint64([in] datetime i);
  353. [qualbool, qualbool2(FALSE),
  354. qualarrstr { "string1", "string2", "string3" },
  355. qualarrint { 1, 2, 3 }
  356. ]
  357. void Xdatetime([in] string i);
  358. [qualbool, qualbool2(FALSE),
  359. qualarrstr { "string1", "string2", "string3" },
  360. qualarrint { 1, 2, 3 }
  361. ]
  362. void Xstring([in] YY i);
  363. [qualbool, qualbool2(FALSE),
  364. qualarrstr { "string1", "string2", "string3" },
  365. qualarrint { 1, 2, 3 }
  366. ]
  367. void XEmbedX([in] boolean i);
  368. void XbooleanX([out] uint8 i);
  369. void Xuint8X([out] uint16 i);
  370. void Xuint16X([out] uint32 i);
  371. void Xuint32X([out] uint64 i);
  372. void Xuint64X([out] sint8 i);
  373. void Xint8X([out] sint16 i);
  374. void Xint16X([out] sint32 i);
  375. void Xint32X([out] sint64 i);
  376. void Xint64X([out] datetime i);
  377. void XdatetimeX([out] string i);
  378. void XstringX([out] YY i);
  379. void XEmbedXX([out] boolean i);
  380. };
  381. #pragma namespace("subspace")
  382. //
  383. // Define EC1 and EC2 as embedded classes. Embedded classes are structures
  384. // that are used within other classes.
  385. //
  386. [WMI,
  387. Locale("MS\\0x409"),
  388. HeaderName("EC1"),
  389. Description("Description of embedeed class 1"),
  390. guid("{A1C15015-B069-11d1-9290-00A0C9062910}")]
  391. class Vendor_EC1
  392. {
  393. [WmiDataId(1),
  394. read, write,
  395. Description("boolean data")
  396. ] boolean Xboolean;
  397. [WmiDataId(2),
  398. read, write,
  399. Description("unsigned character data")
  400. ] uint8 Xuint8;
  401. [WmiDataId(3),
  402. read, write,
  403. Description("unsigned short data")
  404. ] uint16 Xuint16;
  405. [WmiDataId(4),
  406. read, write,
  407. Description("unsigned long data")
  408. ] uint32 Xuint32;
  409. [WmiDataId(5),
  410. read, write,
  411. Description("unsigned long long data")
  412. ] uint64 Xuint64;
  413. [WmiDataId(6),
  414. read, write,
  415. Description("signed byte data")
  416. ] sint8 Xint8;
  417. [WmiDataId(7),
  418. read, write,
  419. Description("singed short data")
  420. ] sint16 Xint16;
  421. [WmiDataId(8),
  422. read, write,
  423. Description("singed long data")
  424. ] sint32 Xint32;
  425. [WmiDataId(9),
  426. read, write,
  427. Description("signed long long data")
  428. ] sint64 Xint64;
  429. [WmiDataId(10),
  430. read, write,
  431. Description("absolute or relative date and time")
  432. ] datetime Xdatetime;
  433. };
  434. [WMI,
  435. Locale("MS\\0x409"),
  436. HeaderName("EC2"),
  437. Description("Description of embedeed class 2"),
  438. guid("{A1C15016-B069-11d1-9290-00A0C9062910}")]
  439. class Vendor_EC2
  440. {
  441. [WmiDataId(1),
  442. read, write,
  443. Description("Fixed length array of 8 booleans")
  444. ] boolean Xboolean[8];
  445. [WmiDataId(2),
  446. read, write,
  447. Description("Fixed length array of 8 unsigned characters")
  448. ] uint8 Xuint8[8];
  449. [WmiDataId(3),
  450. read, write,
  451. Description("Fixed length array of 4 unsigned shorts")
  452. ] uint16 Xuint16[4];
  453. [WmiDataId(4),
  454. read, write,
  455. Description("Fixed length array of 2 usingned long")
  456. ] uint32 Xuint32[2];
  457. [WmiDataId(5),
  458. read, write,
  459. Description("Unsigned long long")
  460. ] uint64 Xuint64;
  461. [WmiDataId(6),
  462. read, write,
  463. Description("Fixed length array of 8 signed characters")
  464. ] sint8 Xint8[8];
  465. [WmiDataId(7),
  466. read, write,
  467. Description("Fixed length array of 4 signed short")
  468. ] sint16 Xint16[4];
  469. [WmiDataId(8),
  470. read, write,
  471. Description("Fixed length array of 2 signed long")
  472. ] sint32 Xint32[2];
  473. [WmiDataId(9),
  474. read, write,
  475. Description("Signed long long")
  476. ] sint64 Xint64;
  477. [WmiDataId(10),
  478. read, write,
  479. Description("absolute or relative date and time")
  480. ] datetime Xdatetime;
  481. };
  482. #pragma classflags("createonly")
  483. [WMI,
  484. Dynamic,
  485. Provider("WmiProv"),
  486. Description("Description of sample class 1"),
  487. Locale("MS\\0x409"),
  488. guid("{15D851F1-6539-11d1-A529-00A0C9062910}")]
  489. class Vendor_SampleClass1
  490. {
  491. [key, read]
  492. string InstanceName;
  493. [read] boolean Active;
  494. [WmiDataId(1),
  495. read, write,
  496. Description("boolean data")
  497. ] boolean Xboolean;
  498. [WmiDataId(2),
  499. read, write,
  500. Description("unsigned character data")
  501. ] uint8 Xuint8;
  502. [WmiDataId(3),
  503. read, write,
  504. Description("unsigned short data")
  505. ] uint16 Xuint16;
  506. [WmiDataId(4),
  507. read, write,
  508. Description("unsigned long data")
  509. ] uint32 Xuint32;
  510. [WmiDataId(5),
  511. read, write,
  512. Description("unsigned long long data")
  513. ] uint64 Xuint64;
  514. [WmiDataId(6),
  515. read, write,
  516. Description("signed byte data")
  517. ] sint8 Xint8;
  518. [WmiDataId(7),
  519. read, write,
  520. Description("singed short data")
  521. ] sint16 Xint16;
  522. [WmiDataId(8),
  523. read, write,
  524. Description("singed long data")
  525. ] sint32 Xint32;
  526. [WmiDataId(9),
  527. read, write,
  528. Description("signed long long data")
  529. ] sint64 Xint64;
  530. [WmiDataId(10),
  531. read, write,
  532. Description("absolute or relative date and time")
  533. ] datetime Xdatetime;
  534. };
  535. [WMI,
  536. Dynamic,
  537. Provider("WmiProv"),
  538. Description("Description of Sample Class 2"),
  539. Locale("MS\\0x409"),
  540. guid("{15D851F2-6539-11d1-A529-00A0C9062910}")]
  541. class Vendor_SampleClass2
  542. {
  543. [key, read]
  544. string InstanceName;
  545. [read] boolean Active;
  546. [WmiDataId(1),
  547. read, write,
  548. Description("Embedded class data")
  549. ] Vendor_EC1 EmbeddedClass1;
  550. };
  551. #pragma classflags("forceupdate")
  552. [WMI,
  553. Dynamic,
  554. Provider("WmiProv"),
  555. Description("Description of Sample Class 3"),
  556. Locale("MS\\0x409"),
  557. guid("{15D851F3-6539-11d1-A529-00A0C9062910}")]
  558. class Vendor_SampleClass3
  559. {
  560. [key, read]
  561. string InstanceName;
  562. [read] boolean Active;
  563. [WmiDataId(1),
  564. read, write,
  565. Description("FIxed length array of 4 embedded classes")
  566. ] Vendor_EC1 EmbeddedClass1[4];
  567. };
  568. [WMI,
  569. Dynamic,
  570. Provider("WmiProv"),
  571. Description("Description of Sample Class 4"),
  572. Locale("MS\\0x409"),
  573. guid("{15D851F4-6539-11d1-A529-00A0C9062910}")]
  574. class Vendor_SampleClass4
  575. {
  576. [key, read]
  577. string InstanceName;
  578. [read] boolean Active;
  579. [WmiDataId(1),
  580. read, write,
  581. Description("Number of elements in array")
  582. ] uint32 Count;
  583. [WmiDataId(2),
  584. read, write,
  585. Description("Variable length array of embedded classes. Count specifies the number of elements in the array"),
  586. WmiSizeIs("Count")] Vendor_EC1 EmbeddedClass1[];
  587. };
  588. #pragma classflags("safeupdate")
  589. [WMI,
  590. Dynamic,
  591. Provider("WmiProv"),
  592. Description("Description of Sample Class 5"),
  593. Locale("MS\\0x409"),
  594. guid("{15D851F5-6539-11d1-A529-00A0C9062910}")]
  595. class Vendor_SampleClass5
  596. {
  597. [key, read]
  598. string InstanceName;
  599. [read] boolean Active;
  600. [WmiDataId(1),
  601. read, write,
  602. Description("Embedded class data")
  603. ] Vendor_EC2 EmbeddedClass2;
  604. };
  605. [WMI,
  606. Dynamic,
  607. Provider("WmiProv"),
  608. Description("Description of Sample Class 6"),
  609. Locale("MS\\0x409"),
  610. guid("{15D851F6-6539-11d1-A529-00A0C9062910}")]
  611. class Vendor_SampleClass6
  612. {
  613. [key, read]
  614. string InstanceName;
  615. [read] boolean Active;
  616. [WmiDataId(1),
  617. read, write,
  618. Description("Fixed length array of 4 embedded classes")
  619. ] Vendor_EC2 EmbeddedClass2[4];
  620. };
  621. #pragma classflags("updateonly")
  622. [WMI,
  623. Dynamic,
  624. Provider("WmiProv"),
  625. Description("Description of Sample Class 7"),
  626. Locale("MS\\0x409"),
  627. guid("{15D851F7-6539-11d1-A529-00A0C9062910}")]
  628. class Vendor_SampleClass7
  629. {
  630. [key, read]
  631. string InstanceName;
  632. [read] boolean Active;
  633. [WmiDataId(1),
  634. read, write,
  635. Description("Number of elements in array")
  636. ] uint32 Count;
  637. [WmiDataId(2),
  638. read, write,
  639. Description("Variable length array of embedded classes. Count specifies the number of elements in the array"),
  640. WmiSizeIs("Count")] Vendor_EC2 EmbeddedClass2[];
  641. };
  642. [WMI,
  643. Dynamic,
  644. Provider("WmiProv"),
  645. Locale("MS\\0x409"),
  646. Description("Methods that can get and set data"),
  647. guid("{15D851F8-6539-11d1-A529-00A0C9062910}")]
  648. class Vendor_GetSetData
  649. {
  650. [key, read]
  651. string InstanceName;
  652. [read] boolean Active;
  653. [Implemented,
  654. Description("Change the contents of EC1"),
  655. WmiMethodId(1)] void SetEC1([in,
  656. Description("Index of block of data to fire"),
  657. Values{"0", "1", "2", "3"},
  658. ValueMap{"Block 1",
  659. "Block 2",
  660. "Block 3",
  661. "Block 4"}
  662. ] uint32 BlockIndex,
  663. [in] uint32 pad,
  664. [in] boolean Xboolean,
  665. [in] uint8 Xuint8,
  666. [in] uint16 Xuint16,
  667. [in] uint32 Xuint32,
  668. [in] uint64 Xuint64,
  669. [in] sint8 Xint8,
  670. [in] sint16 Xint16,
  671. [in] sint32 Xint32,
  672. [in] sint64 Xint64,
  673. [in] datetime Xdatetime);
  674. [Implemented,
  675. Description("Change the contents of EC2"),
  676. WmiMethodId(2)] void SetEC2([in,
  677. Description("Index of block of data to fire"),
  678. Values{"0", "1", "2", "3"},
  679. ValueMap{"Block 1",
  680. "Block 2",
  681. "Block 3",
  682. "Block 4"}
  683. ] uint32 BlockIndex,
  684. [in] uint32 pad,
  685. [in] boolean Xboolean[8],
  686. [in] uint8 Xuint8[8],
  687. [in] uint16 Xuint16[4],
  688. [in] uint32 Xuint32[2],
  689. [in] uint64 Xuint64,
  690. [in] sint8 Xint8[8],
  691. [in] sint16 Xint16[4],
  692. [in] sint32 Xint32[2],
  693. [in] sint64 Xint64,
  694. [in] datetime Xdatetime);
  695. [Implemented,
  696. Description("Get the contents of EC1"),
  697. WmiMethodId(3)] void GetEC1([in,
  698. Description("Index of block of data to fire"),
  699. Values{"0", "1", "2", "3"},
  700. ValueMap{"Block 1",
  701. "Block 2",
  702. "Block 3",
  703. "Block 4"}
  704. ] uint32 BlockIndex,
  705. [out] boolean Xboolean,
  706. [out] uint8 Xuint8,
  707. [out] uint16 Xuint16,
  708. [out] uint32 Xuint32,
  709. [out] uint64 Xuint64,
  710. [out] sint8 Xint8,
  711. [out] sint16 Xint16,
  712. [out] sint32 Xint32,
  713. [out] sint64 Xint64,
  714. [out] datetime Xdatetime);
  715. [Implemented,
  716. Description("Get the contents of EC2"),
  717. WmiMethodId(4)] void GetEC2([in,
  718. Description("Index of block of data to fire"),
  719. Values{"0", "1", "2", "3"},
  720. ValueMap{"Block 1",
  721. "Block 2",
  722. "Block 3",
  723. "Block 4"}
  724. ] uint32 BlockIndex,
  725. [out] boolean Xboolean[8],
  726. [out] uint8 Xuint8[8],
  727. [out] uint16 Xuint16[4],
  728. [out] uint32 Xuint32[2],
  729. [out] uint64 Xuint64,
  730. [out] sint8 Xint8[8],
  731. [out] sint16 Xint16[4],
  732. [out] sint32 Xint32[2],
  733. [out] sint64 Xint64,
  734. [out] datetime Xdatetime);
  735. [Implemented,
  736. Description("Cause driver to update its registration to remove Vendor_SampleClass7"),
  737. WmiMethodId(5)] void DisableSampleClass7();
  738. [Implemented,
  739. Description("Cause driver to update its registration to include Vendor_SampleClass7"),
  740. WmiMethodId(6)] void EnableSampleClass7();
  741. [Implemented,
  742. Description("Change the contents of Ec1"),
  743. WmiMethodId(7)] void SetEC1AsEc([in,
  744. Description("Index of block of data to fire"),
  745. Values{"0", "1", "2", "3"},
  746. ValueMap{"Block 1",
  747. "Block 2",
  748. "Block 3",
  749. "Block 4"}
  750. ] uint32 BlockIndex,
  751. [in] Vendor_EC1 Ec1
  752. );
  753. [Implemented,
  754. Description("Change the contents of Ec2"),
  755. WmiMethodId(8)] void SetEC2AsEc([in,
  756. Description("Index of block of data to fire"),
  757. Values{"0", "1", "2", "3"},
  758. ValueMap{"Block 1",
  759. "Block 2",
  760. "Block 3",
  761. "Block 4"}
  762. ] uint32 BlockIndex,
  763. [in] Vendor_EC2 Ec2);
  764. [Implemented,
  765. Description("Get the contents of Ec1"),
  766. WmiMethodId(9)] void GetEC1AsEc([in,
  767. Description("Index of block of data to fire"),
  768. Values{"0", "1", "2", "3"},
  769. ValueMap{"Block 1",
  770. "Block 2",
  771. "Block 3",
  772. "Block 4"}
  773. ] uint32 BlockIndex,
  774. [out] Vendor_EC1 Ec1);
  775. [Implemented,
  776. Description("Get the contents of Ec2"),
  777. WmiMethodId(10)] void GetEC2AsEc([in,
  778. Description("Index of block of data to fire"),
  779. Values{"0", "1", "2", "3"},
  780. ValueMap{"Block 1",
  781. "Block 2",
  782. "Block 3",
  783. "Block 4"}
  784. ] uint32 BlockIndex,
  785. [out] Vendor_EC2 Ec2);
  786. [Implemented,
  787. Description("Cause driver to unregister device with WMI"),
  788. WmiMethodId(11)] void UnregisterFromWmi();
  789. };
  790. [WMI,
  791. Dynamic,
  792. Provider("WmiProv"),
  793. Locale("MS\\0x409"),
  794. Description("Event containing data"),
  795. guid("{15D851E1-6539-11d1-A529-00A0C9062910}")]
  796. class Vendor_EventClass1 : WmiEvent
  797. {
  798. [key, read]
  799. string InstanceName;
  800. [read] boolean Active;
  801. [WmiDataId(1),
  802. Description("boolean data")
  803. ] boolean Xboolean;
  804. [WmiDataId(2),
  805. Description("unsigned character data")
  806. ] uint8 Xuint8;
  807. [WmiDataId(3),
  808. Description("unsigned short data")
  809. ] uint16 Xuint16;
  810. [WmiDataId(4),
  811. Description("unsigned long data")
  812. ] uint32 Xuint32;
  813. [WmiDataId(5),
  814. Description("unsigned long long data")
  815. ] uint64 Xuint64;
  816. [WmiDataId(6),
  817. Description("signed byte data")
  818. ] sint8 Xint8;
  819. [WmiDataId(7),
  820. Description("singed short data")
  821. ] sint16 Xint16;
  822. [WmiDataId(8),
  823. Description("singed long data")
  824. ] sint32 Xint32;
  825. [WmiDataId(9),
  826. Description("signed long long data")
  827. ] sint64 Xint64;
  828. [WmiDataId(10),
  829. Description("absolute or relative date and time")
  830. ] datetime Xdatetime;
  831. };
  832. [WMI,
  833. Dynamic,
  834. Provider("WmiProv"),
  835. Locale("MS\\0x409"),
  836. Description("Event containing embedded class 1"),
  837. guid("{15D851E2-6539-11d1-A529-00A0C9062910}")]
  838. class Vendor_EventClass2 : WmiEvent
  839. {
  840. [key, read]
  841. string InstanceName;
  842. [read] boolean Active;
  843. [WmiDataId(1),
  844. Description("Embedded class data")
  845. ] Vendor_EC1 EmbeddedClass1;
  846. };
  847. [WMI,
  848. Dynamic,
  849. Provider("WmiProv"),
  850. Locale("MS\\0x409"),
  851. Description("Event containing a fixed length array embedded class 1"),
  852. guid("{15D851E3-6539-11d1-A529-00A0C9062910}")]
  853. class Vendor_EventClass3 : WmiEvent
  854. {
  855. [key, read]
  856. string InstanceName;
  857. [read] boolean Active;
  858. [WmiDataId(1),
  859. Description("Fixed length array of 4 embedded classes")
  860. ] Vendor_EC1 EmbeddedClass1[4];
  861. };
  862. [WMI,
  863. Dynamic,
  864. Provider("WmiProv"),
  865. Locale("MS\\0x409"),
  866. Description("Event containing a variable length array embedded class 1"),
  867. guid("{15D851E4-6539-11d1-A529-00A0C9062910}")]
  868. class Vendor_EventClass4 : WmiEvent
  869. {
  870. [key, read]
  871. string InstanceName;
  872. [read] boolean Active;
  873. [WmiDataId(1),
  874. Description("Number of elements in array")
  875. ] uint32 Count;
  876. [WmiDataId(2),
  877. Description("Variable length array of embedded classes. Count specifies the number of elements in the array"),
  878. WmiSizeIs("Count")] Vendor_EC1 EmbeddedClass1[];
  879. };
  880. [WMI,
  881. Dynamic,
  882. Provider("WmiProv"),
  883. Locale("MS\\0x409"),
  884. Description("Event containing embedded class 2"),
  885. guid("{15D851E5-6539-11d1-A529-00A0C9062910}")]
  886. class Vendor_EventClass5 : WmiEvent
  887. {
  888. [key, read]
  889. string InstanceName;
  890. [read] boolean Active;
  891. [WmiDataId(1)] Vendor_EC2 EmbeddedClass2;
  892. };
  893. [WMI,
  894. Dynamic,
  895. Provider("WmiProv"),
  896. Locale("MS\\0x409"),
  897. Description("Event containing a fixed length array of embedded class 2"),
  898. guid("{15D851E6-6539-11d1-A529-00A0C9062910}")]
  899. class Vendor_EventClass6 : WmiEvent
  900. {
  901. [key, read]
  902. string InstanceName;
  903. [read] boolean Active;
  904. [WmiDataId(1)] Vendor_EC2 EmbeddedClass2[4];
  905. };
  906. [WMI,
  907. Dynamic,
  908. Provider("WmiProv"),
  909. Locale("MS\\0x409"),
  910. Description("Event containing a variable length array of embedded class 2"),
  911. guid("{15D851E7-6539-11d1-A529-00A0C9062910}")]
  912. class Vendor_EventClass7 : WmiEvent
  913. {
  914. [key, read]
  915. string InstanceName;
  916. [read] boolean Active;
  917. [WmiDataId(1),
  918. Description("Number of elements in array")
  919. ] uint32 Count;
  920. [WmiDataId(2),
  921. Description("Variable length array of embedded classes. Count specifies the number of elements in the array"),
  922. WmiSizeIs("Count")] Vendor_EC2 EmbeddedClass2[];
  923. };
  924. [WMI,
  925. Dynamic,
  926. Provider("WmiProv"),
  927. Locale("MS\\0x409"),
  928. Description("Event used to illustrate an event reference"),
  929. guid("{15D851E8-6539-11d1-A529-00A0C9062910}")]
  930. class Vendor_EventReferenceClass : WmiEvent
  931. {
  932. [key, read]
  933. string InstanceName;
  934. [read] boolean Active;
  935. [WmiDataId(1),
  936. Description("boolean data")
  937. ] boolean Xboolean;
  938. [WmiDataId(2),
  939. Description("unsigned character data")
  940. ] uint8 Xuint8;
  941. [WmiDataId(3),
  942. Description("unsigned short data")
  943. ] uint16 Xuint16;
  944. [WmiDataId(4),
  945. Description("unsigned long data")
  946. ] uint32 Xuint32;
  947. [WmiDataId(5),
  948. Description("unsigned long long data")
  949. ] uint64 Xuint64;
  950. [WmiDataId(6),
  951. Description("signed byte data")
  952. ] sint8 Xint8;
  953. [WmiDataId(7),
  954. Description("singed short data")
  955. ] sint16 Xint16;
  956. [WmiDataId(8),
  957. Description("singed long data")
  958. ] sint32 Xint32;
  959. [WmiDataId(9),
  960. Description("signed long long data")
  961. ] sint64 Xint64;
  962. [WmiDataId(10),
  963. Description("absolute or relative date and time")
  964. ] datetime Xdatetime;
  965. };
  966. [WMI,
  967. Dynamic,
  968. Provider("WmiProv"),
  969. Locale("MS\\0x409"),
  970. Description("Method that fire events"),
  971. guid("{15D851F9-6539-11d1-A529-00A0C9062910}")]
  972. class Vendor_FireEvent
  973. {
  974. [key, read]
  975. string InstanceName;
  976. [read] boolean Active;
  977. [Implemented,
  978. Description("Method to fire an event"),
  979. WmiMethodId(1)] void FireEvent([in,
  980. Description("Type of WNODE to fire"),
  981. Values{"0", "1"},
  982. ValueMap{"WNODE all data",
  983. "WNODE single instance"}
  984. ] uint32 WnodeType,
  985. [in,
  986. description("Which type of event to fire"),
  987. Values{"1", "2", "5", "8"},
  988. ValueMap{"Class 1 data",
  989. "Embedded class 1 data",
  990. "Embedded class 2 data",
  991. "Event Reference"}
  992. ] uint32 DataType,
  993. [in,
  994. Description("Index of block of data to fire"),
  995. Values{"0", "1", "2", "3"},
  996. ValueMap{"Block 1",
  997. "Block 2",
  998. "Block 3",
  999. "Block 4"}
  1000. ] uint32 BlockIndex);
  1001. };
  1002.