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.

885 lines
18 KiB

  1. //-----------------------------------------------------------------------------
  2. // File: adomd.idl
  3. //
  4. // Copyright: Copyright (c) Microsoft Corporation
  5. //
  6. // Contents:
  7. //
  8. //
  9. // Comments: IDL source for adomd.dll
  10. //
  11. //-----------------------------------------------------------------------------
  12. #include "adomd.hh"
  13. #include "adords.hh"
  14. #include "adodef.h"
  15. // Forwards
  16. interface ICatalog;
  17. coclass Catalog;
  18. interface ICellset;
  19. coclass Cellset;
  20. interface Cell;
  21. interface Axis;
  22. interface Position;
  23. interface Member;
  24. interface Level;
  25. interface CubeDef;
  26. interface Dimension;
  27. interface Hierarchy;
  28. interface Axes;
  29. interface Positions;
  30. interface Members;
  31. interface CubeDefs;
  32. interface Dimensions;
  33. interface Hierarchies;
  34. interface Levels;
  35. #define UUIID_EnumMemberType uuid(000002AE-0000-0010-8000-00AA006D2EA4)
  36. #define UUIID_EnumObjectType uuid(C23BBD43-E494-4d00-B4D1-6C9A2CE17CE3)
  37. #define DISPID_COLLECT ( -8 )
  38. #define DEFAULT_METHOD id(0)
  39. #define CONNECTION_BASEDISPID 1
  40. cpp_quote("#define TARGET_IS_NT40_OR_LATER 1")
  41. [
  42. ADOMD_TYPELIB_UUID,
  43. version(ADOMD_VERSION),
  44. helpfile(ADOMD_HELPFILE),
  45. helpstring(ADOMD_LIBRARYNAME)
  46. ]
  47. library ADOMD
  48. {
  49. importlib("stdole32.tlb");
  50. importlib("ado10.tlb");
  51. /************************************ Enums **********************************************/
  52. typedef [
  53. helpcontext(amMemberTypeEnum),
  54. UUIID_EnumMemberType
  55. ]
  56. enum MemberTypeEnum {
  57. [helpcontext(amMemberUnknown)] adMemberUnknown = 0x0000,
  58. [helpcontext(amMemberRegular)] adMemberRegular = 0x0001,
  59. [helpcontext(amMemberAll)] adMemberAll = 0x0002,
  60. [helpcontext(amMemberMeasure)] adMemberMeasure = 0x0003,
  61. [helpcontext(amMemberFormula)] adMemberFormula = 0x0004
  62. } MemberTypeEnum;
  63. typedef [
  64. helpcontext(amSchemaObjectTypeEnum),
  65. UUIID_EnumObjectType
  66. ]
  67. enum SchemaObjectTypeEnum
  68. {
  69. [helpcontext(amObjectTypeDimension)] adObjectTypeDimension=1,
  70. [helpcontext(amObjectTypeHierarchy)] adObjectTypeHierarchy=2,
  71. [helpcontext(amObjectTypeLevel)] adObjectTypeLevel=3,
  72. [helpcontext(amObjectTypeMember)] adObjectTypeMember=4
  73. } SchemaObjectTypeEnum;
  74. /******************************* Interfaces **********************************************/
  75. [
  76. object,
  77. uuid(228136B1-8BD3-11D0-B4EF-00A0C9138CA4),
  78. dual,
  79. helpstring("Catalog Interface"),
  80. helpcontext(ammthCatalog),
  81. pointer_default(unique)
  82. ]
  83. interface ICatalog : IDispatch
  84. {
  85. import "oaidl.idl";
  86. [
  87. propget,
  88. helpcontext(amproName)
  89. ]
  90. HRESULT Name( [out, retval] BSTR *pbstr );
  91. [
  92. propputref,
  93. helpcontext(amproActiveConnection)
  94. ]
  95. HRESULT ActiveConnection( [in] IDispatch *pconn );
  96. [
  97. propput,
  98. helpcontext(amproActiveConnection)
  99. ]
  100. HRESULT ActiveConnection( [in] BSTR bstrConn );
  101. [
  102. propget,
  103. helpcontext(amproActiveConnection)
  104. ]
  105. HRESULT ActiveConnection( [out, retval] IDispatch **ppConn );
  106. [
  107. propget,
  108. DEFAULT_METHOD,
  109. helpcontext(amproCubeDefs)
  110. ]
  111. HRESULT CubeDefs( [out, retval] CubeDefs **ppvObject );
  112. };
  113. //---------------------------------------------------------------------------------------------
  114. [
  115. object,
  116. uuid(2281372A-8BD3-11D0-B4EF-00A0C9138CA4),
  117. dual,
  118. helpstring("Cellset Interface"),
  119. helpcontext(ammthCellset),
  120. pointer_default(unique)
  121. ]
  122. interface ICellset : IDispatch
  123. {
  124. import "oaidl.idl";
  125. [
  126. propget,
  127. vararg,
  128. DEFAULT_METHOD,
  129. helpcontext(ammthItem)
  130. ]
  131. HRESULT Item( [in] SAFEARRAY(VARIANT)* idx,
  132. [out, retval] Cell **ppvObject );
  133. [
  134. helpcontext(ammthOpen)
  135. ]
  136. HRESULT Open( [in, optional] VARIANT DataSource,
  137. [in, optional] VARIANT ActiveConnection );
  138. [
  139. helpcontext(ammthClose)
  140. ]
  141. HRESULT Close();
  142. [
  143. propputref,
  144. helpcontext(amproSource)
  145. ]
  146. HRESULT Source([in] IDispatch *pcmd);
  147. [
  148. propput,
  149. helpcontext(amproSource)
  150. ]
  151. HRESULT Source( [in] BSTR bstrCmd );
  152. [
  153. propget,
  154. helpcontext(amproSource)
  155. ]
  156. HRESULT Source( [out, retval] VARIANT *pvSource );
  157. [
  158. propputref,
  159. helpcontext(amproActiveConnection)
  160. ]
  161. HRESULT ActiveConnection( [in] IDispatch *pconn );
  162. [
  163. propput,
  164. helpcontext(amproActiveConnection)
  165. ]
  166. HRESULT ActiveConnection( [in] BSTR bstrConn );
  167. [
  168. propget,
  169. helpcontext(amproActiveConnection)
  170. ]
  171. HRESULT ActiveConnection( [out, retval] IDispatch **ppConn );
  172. [
  173. propget,
  174. helpcontext(amproState)
  175. ]
  176. HRESULT State([out, retval] LONG *plState);
  177. [
  178. propget,
  179. helpcontext(amproAxes)
  180. ]
  181. HRESULT Axes( [out, retval] Axes **ppvObject );
  182. [
  183. propget,
  184. helpcontext(amproFilterAxis)
  185. ]
  186. HRESULT FilterAxis( [out, retval] Axis **ppvObject );
  187. [
  188. propget,
  189. helpcontext(mdcolProperties)
  190. ]
  191. HRESULT Properties( [out, retval] ADODB.Properties **ppvObject );
  192. };
  193. //---------------------------------------------------------------------------------------------
  194. [
  195. object,
  196. uuid(2281372E-8BD3-11D0-B4EF-00A0C9138CA4),
  197. dual,
  198. helpstring("Cell Interface"),
  199. helpcontext(ammthCell),
  200. pointer_default(unique)
  201. ]
  202. interface Cell : IDispatch
  203. {
  204. import "oaidl.idl";
  205. [
  206. propget,
  207. DEFAULT_METHOD,
  208. helpcontext(amproValue)
  209. ]
  210. HRESULT Value( [out, retval] VARIANT *pvar );
  211. [
  212. propput,
  213. helpcontext(amproValue)
  214. ]
  215. HRESULT Value( [in] VARIANT var );
  216. [
  217. propget,
  218. helpcontext(amcolPositions)
  219. ]
  220. HRESULT Positions( [out, retval] Positions **ppvObject );
  221. [
  222. propget,
  223. helpcontext(mdcolProperties)
  224. ]
  225. HRESULT Properties( [out, retval] ADODB.Properties **ppvObject );
  226. [
  227. propget,
  228. helpcontext(amproFormattedValue)
  229. ]
  230. HRESULT FormattedValue( [out, retval] BSTR *pbstr );
  231. [
  232. propput,
  233. helpcontext(amproFormattedValue)
  234. ]
  235. HRESULT FormattedValue( [in] BSTR bstr );
  236. [
  237. propget,
  238. helpcontext(amproOrdinalCell)
  239. ]
  240. HRESULT Ordinal( [out, retval] long *pl );
  241. };
  242. //---------------------------------------------------------------------------------------------
  243. [
  244. object,
  245. uuid(22813732-8BD3-11D0-B4EF-00A0C9138CA4),
  246. dual,
  247. helpstring("Axis Interface"),
  248. helpcontext(ammthAxis),
  249. pointer_default(unique)
  250. ]
  251. interface Axis : IDispatch
  252. {
  253. import "oaidl.idl";
  254. [
  255. propget,
  256. helpcontext(amproName)
  257. ]
  258. HRESULT Name( [out, retval] BSTR *pbstr );
  259. [
  260. propget,
  261. helpcontext(amproDimensionCount)
  262. ]
  263. HRESULT DimensionCount( [out, retval] long *pl );
  264. [
  265. propget,,
  266. helpcontext(amcolPositions),
  267. DEFAULT_METHOD
  268. ]
  269. HRESULT Positions( [out, retval] Positions **ppvObject );
  270. [
  271. propget,
  272. helpcontext(mdcolProperties)
  273. ]
  274. HRESULT Properties( [out, retval] ADODB.Properties **ppvObject );
  275. };
  276. //---------------------------------------------------------------------------------------------
  277. [
  278. object,
  279. uuid(22813734-8BD3-11D0-B4EF-00A0C9138CA4),
  280. dual,
  281. helpstring("Position Interface"),
  282. helpcontext(ammthPosition),
  283. pointer_default(unique)
  284. ]
  285. interface Position : IDispatch
  286. {
  287. import "oaidl.idl";
  288. [
  289. propget,
  290. helpcontext(amproOrdinalPosition)
  291. ]
  292. HRESULT Ordinal( [out, retval] long *pl );
  293. [
  294. propget,
  295. DEFAULT_METHOD,
  296. helpcontext(amproMembers)
  297. ]
  298. HRESULT Members( [out, retval] Members **ppvObject );
  299. };
  300. //---------------------------------------------------------------------------------------------
  301. [
  302. object,
  303. uuid(22813736-8BD3-11D0-B4EF-00A0C9138CA4),
  304. dual,
  305. helpstring("Member Interface"),
  306. helpcontext(ammthMember),
  307. pointer_default(unique)
  308. ]
  309. interface Member : IDispatch
  310. {
  311. import "oaidl.idl";
  312. [
  313. propget,
  314. helpcontext(amproName)
  315. ]
  316. HRESULT Name( [out, retval] BSTR *pbstr );
  317. [
  318. propget,
  319. helpcontext(amproUniqueName)
  320. ]
  321. HRESULT UniqueName( [out, retval] BSTR *pbstr );
  322. [
  323. propget,
  324. DEFAULT_METHOD,
  325. helpcontext(amproCaption)
  326. ]
  327. HRESULT Caption( [out, retval] BSTR *pbstr );
  328. [
  329. propget,
  330. helpcontext(amproDescription)
  331. ]
  332. HRESULT Description( [out, retval] BSTR *pbstr );
  333. [
  334. propget,
  335. helpcontext(amproParent)
  336. ]
  337. HRESULT Parent( [out, retval] Member **ppvObject );
  338. [
  339. propget,
  340. helpcontext(amproLevelDepth)
  341. ]
  342. HRESULT LevelDepth( [out, retval] long *pl );
  343. [
  344. propget,
  345. helpcontext(amproLevelName)
  346. ]
  347. HRESULT LevelName( [out, retval] BSTR *pbstr );
  348. [
  349. propget,
  350. helpcontext(mdcolProperties)
  351. ]
  352. HRESULT Properties( [out, retval] ADODB.Properties **ppvObject );
  353. [
  354. propget,
  355. helpcontext(amproType)
  356. ]
  357. HRESULT Type( [out, retval] MemberTypeEnum *ptype );
  358. [
  359. propget,
  360. helpcontext(amproChildCount)
  361. ]
  362. HRESULT ChildCount( [out, retval] long *pl );
  363. [
  364. propget,
  365. helpcontext(amproDrilledDown)
  366. ]
  367. HRESULT DrilledDown( [out, retval] VARIANT_BOOL *pf );
  368. [
  369. propget,
  370. helpcontext(amproParentSameAsPrev)
  371. ]
  372. HRESULT ParentSameAsPrev( [out, retval] VARIANT_BOOL *pf );
  373. [
  374. propget,
  375. helpcontext(amproChildren)
  376. ]
  377. HRESULT Children( [out, retval] Members **ppvObject );
  378. };
  379. //---------------------------------------------------------------------------------------------
  380. [
  381. object,
  382. uuid(2281373A-8BD3-11D0-B4EF-00A0C9138CA4),
  383. dual,
  384. helpstring("Level Interface"),
  385. helpcontext(ammthLevel),
  386. pointer_default(unique)
  387. ]
  388. interface Level : IDispatch
  389. {
  390. import "oaidl.idl";
  391. [
  392. propget,
  393. helpcontext(amproName)
  394. ]
  395. HRESULT Name( [out, retval] BSTR *pbstr );
  396. [
  397. propget,
  398. helpcontext(amproUniqueName)
  399. ]
  400. HRESULT UniqueName( [out, retval] BSTR *pbstr );
  401. [
  402. propget,
  403. helpcontext(amproCaption)
  404. ]
  405. HRESULT Caption( [out, retval] BSTR *pbstr );
  406. [
  407. propget,
  408. helpcontext(amproDescription)
  409. ]
  410. HRESULT Description( [out, retval] BSTR *pbstr );
  411. [
  412. propget,
  413. helpcontext(amproDepth)
  414. ]
  415. HRESULT Depth([out, retval] short *pw);
  416. [
  417. propget,
  418. helpcontext(mdcolProperties)
  419. ]
  420. HRESULT Properties( [out, retval] ADODB.Properties **ppvObject );
  421. [
  422. propget,
  423. DEFAULT_METHOD,
  424. helpcontext(amproMembers)
  425. ]
  426. HRESULT Members( [out, retval] Members **ppvObject );
  427. };
  428. //---------------------------------------------------------------------------------------------
  429. [
  430. object,
  431. uuid(2281373E-8BD3-11D0-B4EF-00A0C9138CA4),
  432. dual,
  433. helpstring("CubeDef25 Interface"),
  434. helpcontext(ammthCubeDef25),
  435. pointer_default(unique)
  436. ]
  437. interface CubeDef25 : IDispatch
  438. {
  439. import "oaidl.idl";
  440. [
  441. propget,
  442. helpcontext(amproName)
  443. ]
  444. HRESULT Name( [out, retval] BSTR *pbstr );
  445. [
  446. propget,
  447. helpcontext(amproDescription)
  448. ]
  449. HRESULT Description( [out, retval] BSTR *pbstr );
  450. [
  451. propget,
  452. helpcontext(mdcolProperties)
  453. ]
  454. HRESULT Properties( [out, retval] ADODB.Properties **ppvObject );
  455. [
  456. propget,
  457. DEFAULT_METHOD,
  458. helpcontext(amproDimensions)
  459. ]
  460. HRESULT Dimensions( [out, retval] Dimensions **ppvObject );
  461. };
  462. [
  463. object,
  464. uuid(DA16A34A-7B7A-46fd-AD9D-66DF1E699FA1),
  465. dual,
  466. helpstring("CubeDef Interface"),
  467. helpcontext(ammthCubeDef),
  468. pointer_default(unique)
  469. ]
  470. interface CubeDef : CubeDef25
  471. {
  472. [
  473. helpcontext(ammthGetSchemaObject)
  474. ]
  475. HRESULT GetSchemaObject([in]SchemaObjectTypeEnum eObjType,[in]BSTR bsUniqueName,[out,retval]IDispatch **ppObj);
  476. };
  477. //---------------------------------------------------------------------------------------------
  478. [
  479. object,
  480. uuid(22813742-8BD3-11D0-B4EF-00A0C9138CA4),
  481. dual,
  482. helpstring("Dimension Interface"),
  483. helpcontext(ammthDimension),
  484. pointer_default(unique)
  485. ]
  486. interface Dimension : IDispatch
  487. {
  488. import "oaidl.idl";
  489. [
  490. propget,
  491. helpcontext(amproName)
  492. ]
  493. HRESULT Name( [out, retval] BSTR *pbstr );
  494. [
  495. propget,
  496. helpcontext(amproUniqueName)
  497. ]
  498. HRESULT UniqueName( [out, retval] BSTR *pbstr );
  499. [
  500. propget,
  501. helpcontext(amproDescription)
  502. ]
  503. HRESULT Description( [out, retval] BSTR *pbstr );
  504. [
  505. propget,
  506. helpcontext(mdcolProperties)
  507. ]
  508. HRESULT Properties( [out, retval] ADODB.Properties **ppvObject );
  509. [
  510. propget,
  511. DEFAULT_METHOD,
  512. helpcontext(amproHierarchies)
  513. ]
  514. HRESULT Hierarchies( [out, retval] Hierarchies **ppvObject );
  515. };
  516. //---------------------------------------------------------------------------------------------
  517. [
  518. object,
  519. uuid(22813746-8BD3-11D0-B4EF-00A0C9138CA4),
  520. dual,
  521. helpstring("Hierarchy Interface"),
  522. helpcontext(ammthHierarchy),
  523. pointer_default(unique)
  524. ]
  525. interface Hierarchy : IDispatch
  526. {
  527. import "oaidl.idl";
  528. [
  529. propget,
  530. helpcontext(amproName)
  531. ]
  532. HRESULT Name( [out, retval] BSTR *pbstr );
  533. [
  534. propget,
  535. helpcontext(amproUniqueName)
  536. ]
  537. HRESULT UniqueName( [out, retval] BSTR *pbstr );
  538. [
  539. propget,
  540. helpcontext(amproDescription)
  541. ]
  542. HRESULT Description( [out, retval] BSTR *pbstr );
  543. [
  544. propget,
  545. helpcontext(mdcolProperties)
  546. ]
  547. HRESULT Properties( [out, retval] ADODB.Properties **ppvObject );
  548. [
  549. propget,
  550. DEFAULT_METHOD,
  551. helpcontext(amcolLevels)
  552. ]
  553. HRESULT Levels( [out, retval] Levels **ppvObject );
  554. };
  555. //---------------------------------------------------------------------------------------------
  556. [
  557. object,
  558. uuid(22813751-8BD3-11D0-B4EF-00A0C9138CA4),
  559. dual,
  560. helpstring("Collection Interface"),
  561. pointer_default(unique)
  562. ]
  563. interface MD_Collection : IDispatch
  564. {
  565. [
  566. helpcontext(ammthRefresh)
  567. ]
  568. HRESULT Refresh();
  569. [
  570. restricted,
  571. id(-4)
  572. ]
  573. HRESULT _NewEnum( [out, retval] IUnknown **ppvObject );
  574. [
  575. propget,
  576. helpcontext(amproCount)
  577. ]
  578. HRESULT Count( [out, retval]long *c );
  579. }
  580. //---------------------------------------------------------------------------------------------
  581. [
  582. object,
  583. uuid(22813757-8BD3-11D0-B4EF-00A0C9138CA4),
  584. dual,
  585. helpstring("Members collection"),
  586. helpcontext(amcolMembers),
  587. pointer_default(unique)
  588. ]
  589. interface Members : MD_Collection
  590. {
  591. import "oaidl.idl"; //..
  592. [
  593. propget,
  594. DEFAULT_METHOD,
  595. helpcontext(ammthItemCol)
  596. ]
  597. HRESULT Item(
  598. [in] VARIANT Index,
  599. [out, retval] Member **ppvObject
  600. );
  601. }
  602. //---------------------------------------------------------------------------------------------
  603. [
  604. object,
  605. uuid(22813758-8BD3-11D0-B4EF-00A0C9138CA4),
  606. dual,
  607. helpstring("Levels collection"),
  608. helpcontext(ammthLevels),
  609. pointer_default(unique)
  610. ]
  611. interface Levels : MD_Collection
  612. {
  613. import "oaidl.idl"; //..
  614. [
  615. propget,
  616. DEFAULT_METHOD,
  617. helpcontext(ammthItemCol)
  618. ]
  619. HRESULT Item(
  620. [in] VARIANT Index,
  621. [out, retval] Level **ppvObject
  622. );
  623. }
  624. //---------------------------------------------------------------------------------------------
  625. [
  626. object,
  627. uuid(22813759-8BD3-11D0-B4EF-00A0C9138CA4),
  628. dual,
  629. helpstring("Axes collection"),
  630. helpcontext(amcolAxes),
  631. pointer_default(unique)
  632. ]
  633. interface Axes : MD_Collection
  634. {
  635. import "oaidl.idl"; //..
  636. [
  637. propget,
  638. DEFAULT_METHOD,
  639. helpcontext(ammthItemCol)
  640. ]
  641. HRESULT Item(
  642. [in] VARIANT Index,
  643. [out, retval] Axis **ppvObject
  644. );
  645. }
  646. //---------------------------------------------------------------------------------------------
  647. [
  648. object,
  649. uuid(2281375A-8BD3-11D0-B4EF-00A0C9138CA4),
  650. dual,
  651. helpstring("Positions collection"),
  652. helpcontext(ammthPositions),
  653. pointer_default(unique)
  654. ]
  655. interface Positions : MD_Collection
  656. {
  657. import "oaidl.idl"; //..
  658. [
  659. propget,
  660. DEFAULT_METHOD,
  661. helpcontext(ammthItemCol)
  662. ]
  663. HRESULT Item(
  664. [in] VARIANT Index,
  665. [out, retval] Position **ppvObject
  666. );
  667. }
  668. //---------------------------------------------------------------------------------------------
  669. [
  670. object,
  671. uuid(2281375B-8BD3-11D0-B4EF-00A0C9138CA4),
  672. dual,
  673. helpstring("Hierarchies collection"),
  674. helpcontext(amcolHierarchies),
  675. pointer_default(unique)
  676. ]
  677. interface Hierarchies : MD_Collection
  678. {
  679. import "oaidl.idl"; //..
  680. [
  681. propget,
  682. DEFAULT_METHOD,
  683. helpcontext(ammthItemCol)
  684. ]
  685. HRESULT Item(
  686. [in] VARIANT Index,
  687. [out, retval] Hierarchy **ppvObject
  688. );
  689. }
  690. //---------------------------------------------------------------------------------------------
  691. [
  692. object,
  693. uuid(2281375C-8BD3-11D0-B4EF-00A0C9138CA4),
  694. dual,
  695. helpstring("Dimensions collection"),
  696. helpcontext(amcolDimensions),
  697. pointer_default(unique)
  698. ]
  699. interface Dimensions : MD_Collection
  700. {
  701. import "oaidl.idl"; //..
  702. [
  703. propget,
  704. DEFAULT_METHOD,
  705. helpcontext(ammthItemCol)
  706. ]
  707. HRESULT Item(
  708. [in] VARIANT Index,
  709. [out, retval] Dimension **ppvObject
  710. );
  711. }
  712. //---------------------------------------------------------------------------------------------
  713. [
  714. object,
  715. uuid(2281375D-8BD3-11D0-B4EF-00A0C9138CA4),
  716. dual,
  717. helpstring("CubeDefs collection"),
  718. helpcontext(amcolCubeDefs),
  719. pointer_default(unique)
  720. ]
  721. interface CubeDefs : MD_Collection
  722. {
  723. import "oaidl.idl"; //..
  724. [
  725. propget,
  726. DEFAULT_METHOD,
  727. helpcontext(ammthItemCol)
  728. ]
  729. HRESULT Item(
  730. [in] VARIANT Index,
  731. [out, retval] CubeDef **ppvObject
  732. );
  733. }
  734. /******************************* Coclasses **********************************************/
  735. [
  736. uuid(228136B0-8BD3-11D0-B4EF-00A0C9138CA4),
  737. helpstring("ADOMD Catalog Class"),
  738. helpcontext(ammthCatalog)
  739. ]
  740. coclass Catalog
  741. {
  742. [default] interface ICatalog;
  743. };
  744. //---------------------------------------------------------------------------------------------
  745. [
  746. uuid(228136B8-8BD3-11D0-B4EF-00A0C9138CA4),
  747. helpstring("ADOMD Cellset Class"),
  748. helpcontext(ammthCellset)
  749. ]
  750. coclass Cellset
  751. {
  752. [default] interface ICellset;
  753. };
  754. };