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.

1221 lines
47 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 1999
  6. //
  7. // File: mmcobj.idl
  8. //
  9. //--------------------------------------------------------------------------
  10. // mmcobj.idl : IDL source for the MMC object model.
  11. //
  12. // This file will be processed by the MIDL compiler to produce the
  13. // type library (MMCObj.tlb).
  14. cpp_quote("#ifndef MMC_VER")
  15. cpp_quote("#define MMC_VER 0x0200")
  16. cpp_quote("#endif")
  17. cpp_quote("#if (MMC_VER >= 0x0200)")
  18. import "oaidl.idl";
  19. // interfaces - in alphabetical order.
  20. interface _Application;
  21. interface Column;
  22. interface Columns;
  23. interface ContextMenu;
  24. interface Document;
  25. interface Frame;
  26. interface MenuItem;
  27. interface Node;
  28. interface Nodes;
  29. interface Properties;
  30. interface Property;
  31. interface ScopeNamespace;
  32. interface SnapIn;
  33. interface SnapIns;
  34. interface Extension;
  35. interface Extensions;
  36. interface View;
  37. interface Views;
  38. ///////////////////////////////////////////////////////////////////////////////
  39. /// Interfaces implemented by the Common Console's Node Manager
  40. interface ISnapinPropertiesCallback;
  41. ///////////////////////////////////////////////////////////////////////////////
  42. /// Interfaces implemented by the Snap-in server
  43. interface ISnapinProperties;
  44. // typedefs - same order as interfaces, for the pointer and the pointer to pointer.
  45. typedef _Application* PAPPLICATION;
  46. typedef _Application** PPAPPLICATION;
  47. typedef Column* PCOLUMN;
  48. typedef Column** PPCOLUMN;
  49. typedef Columns* PCOLUMNS;
  50. typedef Columns** PPCOLUMNS;
  51. typedef ContextMenu* PCONTEXTMENU;
  52. typedef ContextMenu** PPCONTEXTMENU;
  53. typedef Document* PDOCUMENT;
  54. typedef Document** PPDOCUMENT;
  55. typedef Frame* PFRAME;
  56. typedef Frame** PPFRAME;
  57. typedef MenuItem* PMENUITEM;
  58. typedef MenuItem** PPMENUITEM;
  59. typedef Node* PNODE;
  60. typedef Node** PPNODE;
  61. typedef Nodes* PNODES;
  62. typedef Nodes** PPNODES;
  63. typedef Properties* PPROPERTIES;
  64. typedef Properties** PPPROPERTIES;
  65. typedef Property* PPROPERTY;
  66. typedef Property** PPPROPERTY;
  67. typedef ScopeNamespace* PSCOPENAMESPACE;
  68. typedef ScopeNamespace** PPSCOPENAMESPACE;
  69. typedef SnapIn* PSNAPIN;
  70. typedef SnapIn** PPSNAPIN;
  71. typedef SnapIns* PSNAPINS;
  72. typedef SnapIns** PPSNAPINS;
  73. typedef Extension* PEXTENSION;
  74. typedef Extension** PPEXTENSION;
  75. typedef Extensions* PEXTENSIONS;
  76. typedef Extensions** PPEXTENSIONS;
  77. typedef View* PVIEW;
  78. typedef View** PPVIEW;
  79. typedef Views* PVIEWS;
  80. typedef Views** PPVIEWS;
  81. typedef ISnapinProperties* LPSNAPINPROPERTIES;
  82. typedef ISnapinPropertiesCallback* LPSNAPINPROPERTIESCALLBACK;
  83. // typedefs for external types
  84. typedef BOOL* PBOOL;
  85. typedef int* PINT;
  86. typedef BSTR* PBSTR;
  87. typedef VARIANT* PVARIANT;
  88. typedef long* PLONG;
  89. typedef IDispatch* PDISPATCH;
  90. typedef IDispatch** PPDISPATCH;
  91. /*+-------------------------------------------------------------------------*
  92. * ISnapinProperties
  93. * ISnapinPropertiesCallback
  94. *
  95. * These define the interfaces used by the snap-in to support Properties.
  96. * They are not object model interfaces per se, but they ISnapinProperties
  97. * requires the definition of Properties, and ISnapinPropertiesCallback
  98. * requires the definition of ISnapinProperties.
  99. *
  100. * These interfaces should be defined in mmc.idl, since they're not
  101. * object model interfaces per se. ISnapinProperties, however, requires
  102. * the definition of Properties, so we can either import mmcobj.idl into
  103. * mmc.idl or define ISnapinProperties here (a foward declaration of
  104. * Properties isn't sufficient).
  105. *
  106. * We don't want to import mmcobj.idl into mmc.idl because that causes too
  107. * many dependency difficulties, so we define these non-object model
  108. * interfaces here instead.
  109. *
  110. * ISnapinPropertiesCallback requires the definition of ISnapinProperties,
  111. * so it is defined here for the same reason.
  112. *--------------------------------------------------------------------------*/
  113. [
  114. object,
  115. uuid(F7889DA9-4A02-4837-BF89-1A6F2A021010),
  116. helpstring("ISnapinProperties Interface"),
  117. pointer_default(unique)
  118. ]
  119. interface ISnapinProperties : IUnknown
  120. {
  121. typedef enum _MMC_PROPERTY_ACTION
  122. {
  123. MMC_PROPACT_DELETING = 1,
  124. MMC_PROPACT_CHANGING,
  125. MMC_PROPACT_INITIALIZED
  126. } MMC_PROPERTY_ACTION;
  127. typedef struct _MMC_SNAPIN_PROPERTY
  128. {
  129. LPCOLESTR pszPropName; // name of property
  130. VARIANT varValue; // value of the property
  131. MMC_PROPERTY_ACTION eAction; // what happened to this property
  132. } MMC_SNAPIN_PROPERTY;
  133. [helpstring("Provides the snap-in with the Properties interface from which it can initialize itself.")]
  134. HRESULT Initialize ([in] Properties* pProperties);
  135. [helpstring("Returns the names of the properties this snap-in uses for configuration.")]
  136. HRESULT QueryPropertyNames ([in] ISnapinPropertiesCallback* pCallback);
  137. [helpstring("Informs the snap-in that one or more of the properties is uses for its configuration has been added, deleted, or changed.")]
  138. HRESULT PropertiesChanged (
  139. [in] long cProperties,
  140. [in, size_is(cProperties)] MMC_SNAPIN_PROPERTY* pProperties);
  141. };
  142. [
  143. object,
  144. uuid(A50FA2E5-7E61-45EB-A8D4-9A07B3E851A8),
  145. helpstring("ISnapinPropertiesCallback Interface"),
  146. pointer_default(unique)
  147. ]
  148. interface ISnapinPropertiesCallback : IUnknown
  149. {
  150. // flags for the dwFlags parameter of AddPropertyName
  151. const DWORD MMC_PROP_CHANGEAFFECTSUI = 0x00000001;
  152. const DWORD MMC_PROP_MODIFIABLE = 0x00000002;
  153. const DWORD MMC_PROP_REMOVABLE = 0x00000004;
  154. const DWORD MMC_PROP_PERSIST = 0x00000008;
  155. [helpstring("Defines a property which the snap-in can use.")]
  156. HRESULT AddPropertyName (
  157. [in] LPCOLESTR pszPropName,
  158. [in] DWORD dwFlags);
  159. };
  160. [
  161. uuid(8E80422B-CAC4-472b-B272-9635F1DFEF3B),
  162. helpstring("Microsoft Management Console 2.0"),
  163. version(1.0),
  164. ]
  165. library MMC20
  166. {
  167. importlib("stdole32.tlb");
  168. importlib("stdole2.tlb");
  169. //#######################################################################
  170. //#######################################################################
  171. //
  172. // Enumerations
  173. //
  174. // The syntax used below has the reasons why it is used
  175. // 1. defining all pointer types separatelly [instead of right after
  176. // the enum] is chosen, because VB 6.0 will display all of them in the
  177. // Object Browser else.
  178. // 2. DOCUMENTMODE [and similar for other enums] is defined since MIDL
  179. // will crash if "enum DocumentMode" is specified as a method parameter.
  180. // 3. _DocumentMode cannot be used as parameter since VB 6.0 will crash
  181. // whenever the type of parameter is hidden.
  182. // 4. typedef and _DocumentMode could be removed, but MIDL will crash else.
  183. // 5. Enum tag (DocumentMode) must be present, since MIDL will generate one if missing
  184. // 6. Enum tag (DocumentMode) will be displayed in VB Obect browser. It cannot
  185. // be hidden.
  186. //#######################################################################
  187. //#######################################################################
  188. typedef
  189. [ v1_enum, helpstring("Document Mode enumeration")]
  190. enum DocumentMode
  191. {
  192. [helpstring("Document opens in Author Mode")]
  193. DocumentMode_Author,
  194. [helpstring("Document opens in Full-Access User Mode")]
  195. DocumentMode_User,
  196. [helpstring("Document opens in Limited-Access User Mode with multiple windows")]
  197. DocumentMode_User_MDI,
  198. [helpstring("Document opens in Limited-Access User Mode with single window")]
  199. DocumentMode_User_SDI
  200. } _DocumentMode;
  201. typedef enum DocumentMode DOCUMENTMODE;
  202. typedef enum DocumentMode *PDOCUMENTMODE;
  203. typedef enum DocumentMode **PPDOCUMENTMODE;
  204. typedef
  205. [ v1_enum, helpstring("List View Mode enumeration") ]
  206. enum ListViewMode
  207. {
  208. [helpstring("List View with small icons")]
  209. ListMode_Small_Icons,
  210. [helpstring("List View with large icons")]
  211. ListMode_Large_Icons,
  212. [helpstring("List View displaying simple list view")]
  213. ListMode_List,
  214. [helpstring("List View displaying detailed view")]
  215. ListMode_Detail,
  216. [helpstring("List View displaying filtered view")]
  217. ListMode_Filtered
  218. } _ListViewMode;
  219. typedef enum ListViewMode LISTVIEWMODE;
  220. typedef enum ListViewMode *PLISTVIEWMODE;
  221. typedef enum ListViewMode **PPLISTVIEWMODE;
  222. typedef
  223. [ v1_enum, helpstring("View Options enumeration") ]
  224. enum ViewOptions
  225. {
  226. [helpstring("Default view options")]
  227. ViewOption_Default = 0x0000,
  228. [helpstring("View with a Scope Tree pane hidden")]
  229. ViewOption_ScopeTreeHidden = 0x0001,
  230. [helpstring("View with Tool Bars hidden")]
  231. ViewOption_NoToolBars = 0x0002,
  232. [helpstring("Temporary View without persistence capability")]
  233. ViewOption_NotPersistable = 0x0004
  234. } _ViewOptions;
  235. typedef enum ViewOptions VIEWOPTIONS;
  236. typedef enum ViewOptions *PVIEWOPTIONS;
  237. typedef enum ViewOptions **PPVIEWOPTIONS;
  238. typedef
  239. [ v1_enum, helpstring("List Export Option enumeration") ]
  240. enum ExportListOptions
  241. {
  242. [helpstring("Default List Export options")]
  243. ExportListOptions_Default = 0x0000,
  244. [helpstring("Exports List to unicode")]
  245. ExportListOptions_Unicode = 0x0001,
  246. [helpstring("Exports List to tab-delimited format")]
  247. ExportListOptions_TabDelimited = 0x0002,
  248. [helpstring("Exports only selected files")]
  249. ExportListOptions_SelectedItemsOnly = 0x0004
  250. } _ExportListOptions;
  251. typedef enum ExportListOptions EXPORTLISTOPTIONS;
  252. //#######################################################################
  253. //#######################################################################
  254. //
  255. // The Application class and the _Application interface
  256. //
  257. //#######################################################################
  258. //#######################################################################
  259. [
  260. oleautomation,
  261. dual,
  262. nonextensible,
  263. uuid(A3AFB9CC-B653-4741-86AB-F0470EC1384C) ,
  264. dual,
  265. helpstring("_Application Interface")
  266. ]
  267. interface _Application : IDispatch
  268. {
  269. [id(2), helpstring("Displays Help for the console")]
  270. void Help();
  271. [id(3), helpstring("Ends the MMC application")]
  272. void Quit();
  273. [id(4), propget, helpstring("Returns the document object")]
  274. HRESULT Document([out,retval] PPDOCUMENT Document);
  275. [id(5), helpstring("Loads the document from the specified file.")]
  276. HRESULT Load([in] BSTR Filename);
  277. [id(6), propget, helpstring("Returns the frame subobject")]
  278. HRESULT Frame([out, retval] PPFRAME Frame);
  279. [id(7), propget, helpstring("Returns the visible property")]
  280. HRESULT Visible([out, retval] PBOOL Visible);
  281. [id(8), helpstring("Shows the application - sets Visible to true")]
  282. HRESULT Show();
  283. [id(9), helpstring("Hides the application - sets Visible to false")]
  284. HRESULT Hide();
  285. [id(10), propget, helpstring("Returns the UserControl property")]
  286. HRESULT UserControl([out, retval] PBOOL UserControl);
  287. [id(10), propput, helpstring("Sets the UserControl property")]
  288. HRESULT UserControl([in] BOOL UserControl);
  289. [id(11), propget, helpstring("Gets the installed MMC's major version number")]
  290. HRESULT VersionMajor([out, retval] PLONG VersionMajor);
  291. [id(12), propget, helpstring("Gets the installed MMC's minor version number")]
  292. HRESULT VersionMinor([out, retval] PLONG VersionMinor);
  293. };
  294. //#######################################################################
  295. //#######################################################################
  296. //
  297. // The AppEvents event source interface
  298. //
  299. //#######################################################################
  300. //#######################################################################
  301. [
  302. oleautomation,
  303. dual,
  304. nonextensible,
  305. uuid(DE46CBDD-53F5-4635-AF54-4FE71E923D3F),
  306. dual,
  307. helpstring("_AppEvents Interface")
  308. ]
  309. interface _AppEvents : IDispatch
  310. {
  311. [id(1), helpstring("Occurs when application is closed")]
  312. HRESULT OnQuit( [in] PAPPLICATION Application);
  313. [id(2), helpstring("Occurs when document is opened")]
  314. HRESULT OnDocumentOpen([in] PDOCUMENT Document, [in] BOOL New);
  315. [id(3), helpstring("Occurs before the document is destroyed")]
  316. HRESULT OnDocumentClose( [in] PDOCUMENT Document);
  317. [id(4), helpstring("Occurs when a snapin is added")]
  318. HRESULT OnSnapInAdded( [in] PDOCUMENT Document, [in] PSNAPIN SnapIn);
  319. [id(5), helpstring("Occurs when the snapin is removed")]
  320. HRESULT OnSnapInRemoved( [in] PDOCUMENT Document, [in] PSNAPIN SnapIn);
  321. [id(6), helpstring("Occurs when a view is added")]
  322. HRESULT OnNewView( [in] PVIEW View);
  323. [id(7), helpstring("Occurs when the view is destroyed")]
  324. HRESULT OnViewClose( [in] PVIEW View );
  325. [id(8), helpstring("Occurs when the view is changed, for instance by a scope node selection change")]
  326. HRESULT OnViewChange( [in] PVIEW View, [in] PNODE NewOwnerNode );
  327. [id(9), helpstring("Occurs when the result item selection for a view is changed")]
  328. HRESULT OnSelectionChange([in] PVIEW View, [in] PNODES NewNodes);
  329. [id(11), helpstring("Occurs when a context menu item is executed")]
  330. HRESULT OnContextMenuExecuted( [in] PMENUITEM MenuItem );
  331. [id(12), helpstring("Occurs when a toolbar button is clicked")]
  332. HRESULT OnToolbarButtonClicked( );
  333. [id(13), helpstring("Occurs when one or more list items are updated")]
  334. HRESULT OnListUpdated([in] PVIEW View );
  335. };
  336. [
  337. uuid(FC7A4252-78AC-4532-8C5A-563CFE138863) ,
  338. helpstring("AppEvents Interface")
  339. ]
  340. dispinterface AppEvents
  341. {
  342. interface _AppEvents;
  343. };
  344. [
  345. uuid(49B2791A-B1AE-4C90-9B8E-E860BA07F889)
  346. ]
  347. coclass Application
  348. {
  349. [default] interface _Application;
  350. [default, source] dispinterface AppEvents;
  351. };
  352. //#######################################################################
  353. //#######################################################################
  354. //
  355. // The AppEventsDHTMLConnector class and the _EventConnector interface
  356. //
  357. // Connector class to enable access for the script on DHTML page
  358. // to application events of current MMC instance
  359. //
  360. //#######################################################################
  361. //#######################################################################
  362. [
  363. oleautomation,
  364. dual,
  365. nonextensible,
  366. uuid(C0BCCD30-DE44-4528-8403-A05A6A1CC8EA) ,
  367. dual,
  368. helpstring("_EventConnector Interface")
  369. ]
  370. interface _EventConnector : IDispatch
  371. {
  372. [id(1), helpstring("Connects to application events and starts forwarding them")]
  373. HRESULT ConnectTo( [in] PAPPLICATION Application );
  374. [id(2), helpstring("Disconnects from application")]
  375. HRESULT Disconnect();
  376. };
  377. [
  378. uuid(ADE6444B-C91F-4e37-92A4-5BB430A33340),
  379. helpstring("Connector class to enable access from DHTML page to the events of current MMC instance")
  380. ]
  381. coclass AppEventsDHTMLConnector
  382. {
  383. [default] interface _EventConnector;
  384. [default, source] dispinterface AppEvents;
  385. };
  386. //#######################################################################
  387. //#######################################################################
  388. //
  389. // The Frame interface
  390. //
  391. //#######################################################################
  392. //#######################################################################
  393. [
  394. oleautomation,
  395. dual,
  396. nonextensible,
  397. uuid(E5E2D970-5BB3-4306-8804-B0968A31C8E6),
  398. dual,
  399. helpstring("Frame Interface")
  400. ]
  401. interface Frame : IDispatch
  402. {
  403. [id(1), helpstring("Maximizes the frame")]
  404. HRESULT Maximize();
  405. [id(2), helpstring("Minimizes the frame")]
  406. HRESULT Minimize();
  407. [id(3), helpstring("Restores the frame to its normal size")]
  408. HRESULT Restore();
  409. [id(4), propget, helpstring("Returns the coordinate of the top of the frame")]
  410. HRESULT Top([out, retval] PINT Top);
  411. [id(4), propput, helpstring("Sets the coordinate of the top of the frame")]
  412. HRESULT Top([in] int top);
  413. [id(5), propget, helpstring("Returns the coordinate of the bottom of the frame")]
  414. HRESULT Bottom([out, retval] PINT Bottom);
  415. [id(5), propput, helpstring("Sets the coordinate of the bottom of the frame")]
  416. HRESULT Bottom([in] int bottom);
  417. [id(6), propget, helpstring("Returns the coordinate of the left of the frame")]
  418. HRESULT Left([out, retval] PINT Left);
  419. [id(6), propput, helpstring("Sets the coordinate of the left of the frame")]
  420. HRESULT Left([in] int left);
  421. [id(7), propget, helpstring("Returns the coordinate of the right of the frame")]
  422. HRESULT Right([out, retval] PINT Right);
  423. [id(7), propput, helpstring("Sets the coordinate of the right of the frame")]
  424. HRESULT Right([in] int right);
  425. };
  426. //#######################################################################
  427. //#######################################################################
  428. //
  429. // The Node interface
  430. //
  431. //#######################################################################
  432. //#######################################################################
  433. [
  434. oleautomation,
  435. dual,
  436. nonextensible,
  437. uuid(F81ED800-7839-4447-945D-8E15DA59CA55),
  438. dual,
  439. helpstring("Node Interface")
  440. ]
  441. interface Node : IDispatch
  442. {
  443. [id(1), propget, helpstring("Returns the display name of the node")]
  444. HRESULT Name([out, retval] PBSTR Name);
  445. [id(2), propget, helpstring("Returns the data corresponding to a specified clipboard format")]
  446. HRESULT Property([in] BSTR PropertyName, [out, retval] PBSTR PropertyValue);
  447. [id(3), propget, helpstring("Returns a persistable bookmark for the node")]
  448. HRESULT Bookmark([out, retval] PBSTR Bookmark);
  449. [id(4), helpstring("Returns whether the node is a scope (tree) or result (list or leaf) item.")]
  450. HRESULT IsScopeNode([out, retval]PBOOL IsScopeNode);
  451. [id(5), propget, helpstring("Returns the nodetype GUID identifier for the node")]
  452. HRESULT Nodetype([out, retval] PBSTR Nodetype);
  453. };
  454. //#######################################################################
  455. //#######################################################################
  456. //
  457. // The ScopeNamespace interface
  458. //
  459. // This interface provides access to the scope tree.
  460. //
  461. //#######################################################################
  462. //#######################################################################
  463. [
  464. oleautomation,
  465. dual,
  466. nonextensible,
  467. uuid(EBBB48DC-1A3B-4D86-B786-C21B28389012),
  468. dual,
  469. helpstring("ScopeNamespace Interface")
  470. ]
  471. interface ScopeNamespace : IDispatch
  472. {
  473. [id(1), helpstring("Returns the parent of a scope node")]
  474. HRESULT GetParent( [in] PNODE Node, [out, retval] PPNODE Parent);
  475. [id(2), helpstring("Returns the child of a scope node")]
  476. HRESULT GetChild( [in] PNODE Node, [out, retval] PPNODE Child);
  477. [id(3), helpstring("Returns the next node in the namespace")]
  478. HRESULT GetNext( [in] PNODE Node, [out, retval] PPNODE Next);
  479. [id(4), helpstring("Gets the root of the namespace")]
  480. HRESULT GetRoot( [out, retval] PPNODE Root);
  481. [id(5), helpstring("Causes a node to be expanded")]
  482. HRESULT Expand( [in] PNODE Node);
  483. };
  484. //#######################################################################
  485. //#######################################################################
  486. //
  487. // The Document interface
  488. //
  489. //#######################################################################
  490. //#######################################################################
  491. [
  492. oleautomation,
  493. dual,
  494. nonextensible,
  495. uuid(225120D6-1E0F-40A3-93FE-1079E6A8017B),
  496. dual,
  497. helpstring("Document Interface")
  498. ]
  499. interface Document : IDispatch
  500. {
  501. // methods
  502. [id(1), helpstring("Saves the document.")]
  503. HRESULT Save();
  504. [id(2), helpstring("Saves the document using the specified name")]
  505. HRESULT SaveAs([in] BSTR Filename);
  506. [id(3), helpstring("Closes the document.")]
  507. HRESULT Close( [in] BOOL SaveChanges);
  508. // properties
  509. [id(4), propget, helpstring("Returns the collection of all views (MDI children)")]
  510. HRESULT Views ([out, retval] PPVIEWS Views);
  511. [id(5), propget, helpstring("Returns the set of all snap-ins that have been loaded")]
  512. HRESULT SnapIns([out, retval] PPSNAPINS SnapIns);
  513. [id(6), propget, helpstring("Returns the currently active view")]
  514. HRESULT ActiveView([out, retval] PPVIEW View);
  515. [id(7), propget, helpstring("Returns the name of the current document")]
  516. HRESULT Name([out, retval] PBSTR Name);
  517. [id(7), propput, helpstring("Sets the name of the current document")]
  518. HRESULT Name([in] BSTR Name);
  519. // location is a read-only property.
  520. [id(8), propget, helpstring("Gets the location of the current document")]
  521. HRESULT Location([out, retval] PBSTR Location);
  522. [id(9), propget, helpstring("Returns whether the file was saved. If not, it is dirty and needs to be saved")]
  523. HRESULT IsSaved([out, retval] PBOOL IsSaved);
  524. [id(10), propget, helpstring("Returns the mode of the document")]
  525. HRESULT Mode([out, retval] PDOCUMENTMODE Mode);
  526. [id(10), propput, helpstring("Sets the mode of the document")]
  527. HRESULT Mode([in] DOCUMENTMODE Mode);
  528. [id(11), propget, helpstring("Returns the console root node")]
  529. HRESULT RootNode([out, retval] PPNODE Node);
  530. [id(12), propget, helpstring("Returns the scope namespace")]
  531. HRESULT ScopeNamespace([out, retval] PPSCOPENAMESPACE ScopeNamespace);
  532. [id(13), helpstring("Returns a new, empty properties collection")]
  533. HRESULT CreateProperties([out, retval] PPPROPERTIES Properties);
  534. [id(20), propget, helpstring("Returns the parent application for the document")]
  535. HRESULT Application([out, retval] PPAPPLICATION Application);
  536. };
  537. //#######################################################################
  538. //#######################################################################
  539. //
  540. // The SnapIns and SnapIn interfaces
  541. //
  542. //#######################################################################
  543. //#######################################################################
  544. [
  545. oleautomation,
  546. dual,
  547. nonextensible,
  548. uuid(3BE910F6-3459-49C6-A1BB-41E6BE9DF3EA),
  549. dual,
  550. helpstring("SnapIn Interface")
  551. ]
  552. interface SnapIn : IDispatch
  553. {
  554. [id(1), propget, helpstring("Returns the name of the snapin")]
  555. HRESULT Name([out, retval] PBSTR Name);
  556. [id(2), propget, helpstring("Returns the snapin vendor name")]
  557. HRESULT Vendor([out, retval] PBSTR Vendor);
  558. [id(3), propget, helpstring("Returns the snapin version")]
  559. HRESULT Version([out, retval] PBSTR Version);
  560. [id(4), propget, helpstring("Returns the list of extension snapins")]
  561. HRESULT Extensions([out, retval] PPEXTENSIONS Extensions);
  562. [id(5), propget, helpstring("Returns the snapin CLSID in string form")]
  563. HRESULT SnapinCLSID([out, retval] PBSTR SnapinCLSID);
  564. [id(6), propget, helpstring("Returns the properties collection for the snapin")]
  565. HRESULT Properties([out, retval] PPPROPERTIES Properties);
  566. [id(7), helpstring("Enable or not enable all the extensions for this snapin.")]
  567. HRESULT EnableAllExtensions([in] BOOL Enable);
  568. }
  569. [
  570. oleautomation,
  571. dual,
  572. nonextensible,
  573. uuid(2EF3DE1D-B12A-49D1-92C5-0B00798768F1),
  574. dual,
  575. helpstring("SnapIns Interface")
  576. ]
  577. interface SnapIns : IDispatch
  578. {
  579. [id(DISPID_NEWENUM), propget]
  580. HRESULT _NewEnum([out, retval] IUnknown** retval);
  581. [id(DISPID_VALUE /*=0*/)]
  582. HRESULT Item([in] long Index, [out, retval] PPSNAPIN SnapIn);
  583. [id(1), propget]
  584. HRESULT Count([out, retval] PLONG Count);
  585. [id(2), helpstring("Adds a snapin given its CLSID or ProgID")]
  586. HRESULT Add(
  587. [in] BSTR SnapinNameOrCLSID,
  588. [in, optional] VARIANT ParentSnapin,
  589. [in, optional] VARIANT Properties,
  590. [out, retval] PPSNAPIN SnapIn);
  591. [id(3), helpstring("Removes a snapin from the list of snapins and hence from the console.")]
  592. HRESULT Remove([in] PSNAPIN SnapIn);
  593. };
  594. [
  595. oleautomation,
  596. dual,
  597. nonextensible,
  598. uuid(AD4D6CA6-912F-409b-A26E-7FD234AEF542),
  599. dual,
  600. helpstring("Extension Interface")
  601. ]
  602. interface Extension : IDispatch
  603. {
  604. [id(1), propget, helpstring("Returns the name of the snapin")]
  605. HRESULT Name([out, retval] PBSTR Name);
  606. [id(2), propget, helpstring("Returns the snapin vendor name")]
  607. HRESULT Vendor([out, retval] PBSTR Vendor);
  608. [id(3), propget, helpstring("Returns the snapin version")]
  609. HRESULT Version([out, retval] PBSTR Version);
  610. [id(4), propget, helpstring("Returns the list of extension snapins")]
  611. HRESULT Extensions([out, retval] PPEXTENSIONS Extensions);
  612. [id(5), propget, helpstring("Returns the snapin CLSID in string form")]
  613. HRESULT SnapinCLSID([out, retval] PBSTR SnapinCLSID);
  614. [id(6), helpstring("Enable or not enable all the extensions for this snapin.")]
  615. HRESULT EnableAllExtensions([in] BOOL Enable);
  616. [id(7), helpstring("Enable/Disable this extension")]
  617. HRESULT Enable([in] BOOL Enable /*= TRUE*/);
  618. }
  619. [
  620. oleautomation,
  621. dual,
  622. nonextensible,
  623. uuid(82DBEA43-8CA4-44bc-A2CA-D18741059EC8),
  624. dual,
  625. helpstring("Extensions Interface")
  626. ]
  627. interface Extensions : IDispatch
  628. {
  629. [id(DISPID_NEWENUM), propget]
  630. HRESULT _NewEnum([out, retval] IUnknown** retval);
  631. [id(DISPID_VALUE /*=0*/)]
  632. HRESULT Item([in] long Index, [out, retval] PPEXTENSION Extension);
  633. [id(1), propget]
  634. HRESULT Count([out, retval] PLONG Count);
  635. };
  636. //#######################################################################
  637. //#######################################################################
  638. //
  639. // The Columns interface
  640. //
  641. //#######################################################################
  642. //#######################################################################
  643. [
  644. oleautomation,
  645. dual,
  646. nonextensible,
  647. uuid(383D4D97-FC44-478B-B139-6323DC48611C),
  648. dual,
  649. helpstring("Columns Interface")
  650. ]
  651. interface Columns : IDispatch
  652. {
  653. [id(DISPID_VALUE /*=0*/)]
  654. HRESULT Item([in] long Index, [out, retval] PPCOLUMN Column);
  655. [id(1), propget]
  656. HRESULT Count([out, retval] PLONG Count);
  657. [id(DISPID_NEWENUM), propget]
  658. HRESULT _NewEnum([out, retval] IUnknown** retval);
  659. };
  660. //#######################################################################
  661. //#######################################################################
  662. //
  663. // The Column interface
  664. //
  665. //#######################################################################
  666. //#######################################################################
  667. [
  668. oleautomation,
  669. dual,
  670. nonextensible,
  671. uuid(FD1C5F63-2B16-4D06-9AB3-F45350B940AB),
  672. dual,
  673. helpstring("Column Interface")
  674. ]
  675. interface Column : IDispatch
  676. {
  677. typedef enum ColumnSortOrder
  678. {
  679. SortOrder_Ascending,
  680. SortOrder_Descending
  681. } _ColumnSortOrder;
  682. typedef enum ColumnSortOrder COLUMNSORTORDER;
  683. [id(DISPID_VALUE /*=0*/)]
  684. HRESULT Name([out, retval] BSTR *Name);
  685. [id(1), propget, helpstring("Returns the width of a column")]
  686. HRESULT Width([out, retval] PLONG Width);
  687. [id(1), propput, helpstring("Sets the width of a column")]
  688. HRESULT Width([in] long Width);
  689. [id(2), propget, helpstring("returns the display position of the column in the set of columns")]
  690. HRESULT DisplayPosition([out, retval] PLONG DisplayPosition);
  691. [id(2), propput, helpstring("Sets the display position of the column in the set of columns")]
  692. HRESULT DisplayPosition([in] long Index);
  693. [id(3), propget, helpstring("Returns true if column is hidden")]
  694. HRESULT Hidden([out, retval] PBOOL Hidden);
  695. [id(3), propput, helpstring("Sets the Hidden status for column")]
  696. HRESULT Hidden([in] BOOL Hidden);
  697. [id(4), helpstring("Sorts on this column")]
  698. HRESULT SetAsSortColumn([in] COLUMNSORTORDER SortOrder);
  699. [id(5), helpstring("Returns whether this column is the sort column")]
  700. HRESULT IsSortColumn([out, retval] PBOOL IsSortColumn);
  701. };
  702. //#######################################################################
  703. //#######################################################################
  704. //
  705. // The Views and View interfaces
  706. //
  707. //#######################################################################
  708. //#######################################################################
  709. [
  710. oleautomation,
  711. dual,
  712. nonextensible,
  713. uuid(D6B8C29D-A1FF-4D72-AAB0-E381E9B9338D),
  714. dual,
  715. helpstring("Views Interface")
  716. ]
  717. interface Views : IDispatch
  718. {
  719. [id(DISPID_VALUE /*=0*/)]
  720. HRESULT Item([in] long Index, [out, retval] PPVIEW View);
  721. [id(1), propget]
  722. HRESULT Count([out, retval] PLONG Count);
  723. [id(2), helpstring("Creates a new view rooted at a particular node")]
  724. HRESULT Add([in] PNODE Node, [in, defaultvalue(ViewOption_Default)] VIEWOPTIONS viewOptions);
  725. [id(DISPID_NEWENUM), propget]
  726. HRESULT _NewEnum([out, retval] IUnknown** retval);
  727. };
  728. [
  729. oleautomation,
  730. dual,
  731. nonextensible,
  732. uuid(6EFC2DA2-B38C-457E-9ABB-ED2D189B8C38),
  733. dual,
  734. helpstring("View Interface")
  735. ]
  736. interface View : IDispatch
  737. {
  738. //#######################################################################
  739. //#######################################################################
  740. //
  741. // Item and item collection related methods
  742. //
  743. //#######################################################################
  744. //#######################################################################
  745. [id(1), propget, helpstring("Gets the active scope node, ie the one that owns the view")]
  746. HRESULT ActiveScopeNode([out, retval] PPNODE Node);
  747. [id(1), propput, helpstring("Sets the active scope node, ie changes the view")]
  748. HRESULT ActiveScopeNode([in] PNODE Node);
  749. [id(2), propget, helpstring("Gets the set of selected result items")]
  750. HRESULT Selection([out, retval] PPNODES Nodes);
  751. [id(3), propget, helpstring("Gets the set of all items in the list")]
  752. HRESULT ListItems([out, retval] PPNODES Nodes);
  753. [id(4), helpstring("Returns the automation interface supplied by the snapin for the specified scope node")]
  754. HRESULT SnapinScopeObject([in, optional] VARIANT ScopeNode /* = ActiveScopeNode */, [out, retval] PPDISPATCH ScopeNodeObject);
  755. [id(5), helpstring("Returns the automation interface supplied by the snapin")]
  756. HRESULT SnapinSelectionObject([out, retval] PPDISPATCH SelectionObject);
  757. //#######################################################################
  758. //#######################################################################
  759. [id(9), helpstring("Returns whether it's the same view")]
  760. HRESULT Is([in] PVIEW View, [out, retval] VARIANT_BOOL *TheSame);
  761. [id(10), propget, helpstring("Returns the parent document of the view")]
  762. HRESULT Document([out, retval] PPDOCUMENT Document);
  763. //#######################################################################
  764. //#######################################################################
  765. //
  766. // Selection changing methods
  767. //
  768. //#######################################################################
  769. //#######################################################################
  770. [id(20), helpstring("Selects all items in the result pane")]
  771. HRESULT SelectAll();
  772. [id(21), helpstring("Selects a node in the result pane")]
  773. HRESULT Select([in] PNODE Node);
  774. [id(22), helpstring("Deselects a node in the view")]
  775. HRESULT Deselect([in] PNODE Node);
  776. [id(23), helpstring("Returns whether a node is selected in this view")]
  777. HRESULT IsSelected([in] PNODE Node, [out, retval] PBOOL IsSelected);
  778. //#######################################################################
  779. //#######################################################################
  780. //
  781. // Verb and selection related methods
  782. //
  783. //#######################################################################
  784. //#######################################################################
  785. [id(40), helpstring("Displays the property for a given scope node")]
  786. HRESULT DisplayScopeNodePropertySheet([in, optional] VARIANT ScopeNode /* = ActiveScopeNode */);
  787. [id(41), helpstring("Displays the property for the current selection")]
  788. HRESULT DisplaySelectionPropertySheet();
  789. [id(42), helpstring("Copies the data object of the active scope node to the clipboard")]
  790. HRESULT CopyScopeNode([in, optional] VARIANT ScopeNode);
  791. [id(43), helpstring("Copies the data object of the selection to the clipboard")]
  792. HRESULT CopySelection();
  793. [id(44), helpstring("Deletes the specified scope node")]
  794. HRESULT DeleteScopeNode([in, optional] VARIANT ScopeNode /* = ActiveScopeNode */);
  795. [id(45), helpstring("Deletes the selected items")]
  796. HRESULT DeleteSelection();
  797. [id(46), helpstring("Renames a scope node to the specified name")]
  798. HRESULT RenameScopeNode([in] BSTR NewName, [in, optional] VARIANT ScopeNode /* = ActiveScopeNode */);
  799. [id(47), helpstring("Renames a node in this view to the specified name")]
  800. HRESULT RenameSelectedItem([in] BSTR NewName);
  801. [id(48), propget, helpstring("Returns the context menu for a node in this view")]
  802. HRESULT ScopeNodeContextMenu([in, optional] VARIANT ScopeNode, [out, retval] PPCONTEXTMENU ContextMenu);
  803. [id(49), propget, helpstring("Returns the context menu for a node in this view")]
  804. HRESULT SelectionContextMenu([out, retval] PPCONTEXTMENU ContextMenu);
  805. [id(50), helpstring("Refreshes the specified scope node")]
  806. HRESULT RefreshScopeNode([in, optional] VARIANT ScopeNode /* = ActiveScopeNode */);
  807. [id(51), helpstring("Refreshes the selected items")]
  808. HRESULT RefreshSelection();
  809. [id(52), helpstring("Executes a context menu item on the selection. The parameter is the language-independent or language-dependent path of the menu item")]
  810. HRESULT ExecuteSelectionMenuItem([in] BSTR MenuItemPath);
  811. [id(53), helpstring("Executes a context menu item on the specified scope node. The parameter is the language-independent or language-dependent path of the menu item")]
  812. HRESULT ExecuteScopeNodeMenuItem([in] BSTR MenuItemPath, [in, optional] VARIANT ScopeNode /* = ActiveScopeNode */);
  813. [id(54), helpstring("Executes a shell command with the specified parameters in the specified directory with the correct window size")]
  814. HRESULT ExecuteShellCommand([in] BSTR Command, [in] BSTR Directory, [in] BSTR Parameters, [in] BSTR WindowState);
  815. //#######################################################################
  816. //#######################################################################
  817. //
  818. // Frame and view related methods
  819. //
  820. //#######################################################################
  821. //#######################################################################
  822. [id(60), propget, helpstring("Returns the frame")]
  823. HRESULT Frame([out, retval] PPFRAME Frame);
  824. [id(61), helpstring("Closes the view window")]
  825. HRESULT Close();
  826. [id(62), propget, helpstring("Returns ScopeTreeVisible property")]
  827. HRESULT ScopeTreeVisible([out, retval] PBOOL Visible);
  828. [id(62), propput, helpstring("Sets ScopeTreeVisible property")]
  829. HRESULT ScopeTreeVisible([in] BOOL Visible);
  830. [id(66), helpstring("Navigates to the previous view")]
  831. HRESULT Back();
  832. [id(67), helpstring("Navigates to the next view")]
  833. HRESULT Forward();
  834. [id(68), propput, helpstring("Sets the status bar text")]
  835. HRESULT StatusBarText([in] BSTR StatusBarText);
  836. [id(69), propget, helpstring("Returns a memento for the current view. A memento is the programmatic equivalent of a favorite setting")]
  837. HRESULT Memento([out, retval] PBSTR Memento);
  838. [id(70), helpstring("Sets the view to the specified memento, which contains information about the view to be re-created.")]
  839. HRESULT ViewMemento([in] BSTR Memento);
  840. //#######################################################################
  841. //#######################################################################
  842. //
  843. // List related methods
  844. //
  845. //#######################################################################
  846. //#######################################################################
  847. [id(80), propget, helpstring("Returns the set of columns in the list")]
  848. HRESULT Columns([out, retval] PPCOLUMNS Columns);
  849. [id(81), propget, helpstring("Returns the contents of a given cell")]
  850. HRESULT CellContents([in] PNODE Node, [in] long Column, [out, retval] PBSTR CellContents);
  851. [id(82), helpstring("Exports the list (if one exists) to the specified file")]
  852. HRESULT ExportList([in] BSTR File, [in, defaultvalue(ExportListOptions_Default)] EXPORTLISTOPTIONS exportoptions);
  853. [id(83), propget, helpstring("Returns the list view mode, if a list view is being displayed")]
  854. HRESULT ListViewMode([out, retval] PLISTVIEWMODE Mode);
  855. [id(83), propput, helpstring("Sets the list view mode, if a list view is being displayed")]
  856. HRESULT ListViewMode([in] LISTVIEWMODE mode);
  857. //#######################################################################
  858. //#######################################################################
  859. //
  860. // ActiveX control related methods
  861. //
  862. //#######################################################################
  863. //#######################################################################
  864. [id(100), propget, helpstring("Returns the automation interface supplied by the OCX in the result pane.")]
  865. HRESULT ControlObject([out, retval] PPDISPATCH Control);
  866. };
  867. //#######################################################################
  868. //#######################################################################
  869. //
  870. // The Nodes interface
  871. // Purpose: The collection of selected result items in a view.
  872. // This interface is created solely by the view interface.
  873. //
  874. //#######################################################################
  875. //#######################################################################
  876. [
  877. oleautomation,
  878. dual,
  879. nonextensible,
  880. uuid(313B01DF-B22F-4D42-B1B8-483CDCF51D35),
  881. dual,
  882. helpstring("Nodes Interface")
  883. ]
  884. interface Nodes : IDispatch
  885. {
  886. [id(DISPID_NEWENUM), propget]
  887. HRESULT _NewEnum([out, retval] IUnknown** retval);
  888. [id(DISPID_VALUE /*=0*/)]
  889. HRESULT Item([in] long Index, [out, retval] PPNODE Node);
  890. [id(1), propget]
  891. HRESULT Count([out, retval] PLONG Count);
  892. };
  893. //#######################################################################
  894. //#######################################################################
  895. //
  896. // The ContextMenu interface
  897. // Purpose: Allows iteration of a context menu
  898. // Note: the list of items is flat. Submenu items just
  899. // have qualified names like "View.Large"
  900. // Submenus themselves and separators are not included in the
  901. // enumeration.
  902. //
  903. // NOTE: There is no method to enable a disabled menu item. This
  904. // is by design; a snapin may not be prepared to handle
  905. // a menu item it has disabled.
  906. //
  907. //#######################################################################
  908. //#######################################################################
  909. [
  910. oleautomation,
  911. dual,
  912. nonextensible,
  913. uuid(DAB39CE0-25E6-4E07-8362-BA9C95706545),
  914. dual,
  915. helpstring("ContextMenu Interface")
  916. ]
  917. interface ContextMenu : IDispatch
  918. {
  919. [id(DISPID_NEWENUM), propget]
  920. HRESULT _NewEnum([out, retval] IUnknown** retval);
  921. [id(DISPID_VALUE /*=0*/), propget, helpstring("Accesses a context menu item by index or by name")]
  922. HRESULT Item([in] VARIANT IndexOrPath, [out, retval] PPMENUITEM MenuItem);
  923. [id(1), propget]
  924. HRESULT Count([out, retval] PLONG Count);
  925. };
  926. //#######################################################################
  927. //#######################################################################
  928. //
  929. // The MenuItem interface
  930. // Purpose: Encapsulates a single context menu item.
  931. //
  932. //#######################################################################
  933. //#######################################################################
  934. [
  935. oleautomation,
  936. dual,
  937. nonextensible,
  938. uuid(0178FAD1-B361-4B27-96AD-67C57EBF2E1D),
  939. dual,
  940. helpstring("MenuItem Interface")
  941. ]
  942. interface MenuItem : IDispatch
  943. {
  944. [id(1), propget, helpstring("Returns the display name of the menu item, which includes accelerators. Eg '&Properties ALT+ENTER' ")]
  945. HRESULT DisplayName([out, retval] PBSTR DisplayName);
  946. [id(2), propget, helpstring("Returns the language-independent name of the menu item. If there is no language independent name, returns the display name without accelerators.")]
  947. HRESULT LanguageIndependentName([out, retval] PBSTR LanguageIndependentName);
  948. [id(3), propget, helpstring("Returns the path of the menu item starting from the root. Does not include accelerators. Eg View->Large")]
  949. HRESULT Path([out, retval] PBSTR Path);
  950. [id(4), propget, helpstring("Returns the language independent path of the menu item starting from the root. Eg _VIEW->_LARGE")]
  951. HRESULT LanguageIndependentPath([out, retval] PBSTR LanguageIndependentPath);
  952. [id(5), helpstring("Executes the context menu item")]
  953. HRESULT Execute();
  954. [id(6), propget, helpstring("Returns whether the menu item is enabled or disabled")]
  955. HRESULT Enabled([out, retval] PBOOL Enabled);
  956. }
  957. //#######################################################################
  958. //#######################################################################
  959. //
  960. // The Properties interface
  961. // Purpose: The collection of properties of a SnapIn object.
  962. //
  963. //#######################################################################
  964. //#######################################################################
  965. [
  966. oleautomation,
  967. dual,
  968. nonextensible,
  969. uuid(2886ABC2-A425-42b2-91C6-E25C0E04581C),
  970. dual,
  971. helpstring("Properties Interface")
  972. ]
  973. interface Properties : IDispatch
  974. {
  975. [id(DISPID_NEWENUM), propget]
  976. HRESULT _NewEnum([out, retval] IUnknown** retval);
  977. [id(DISPID_VALUE), helpstring("Returns the property identified by Name.")]
  978. HRESULT Item([in] BSTR Name, [out, retval] PPPROPERTY Property);
  979. [id(1), propget]
  980. HRESULT Count([out, retval] PLONG Count);
  981. [id(2), helpstring("Removes a property identified by Name from the properties collection.")]
  982. HRESULT Remove([in] BSTR Name);
  983. }
  984. //#######################################################################
  985. //#######################################################################
  986. //
  987. // The Property interface
  988. // Purpose: Encapsulates a single property
  989. //
  990. //#######################################################################
  991. //#######################################################################
  992. [
  993. oleautomation,
  994. dual,
  995. nonextensible,
  996. uuid(4600C3A5-E301-41d8-B6D0-EF2E4212E0CA),
  997. dual,
  998. helpstring("Property Interface")
  999. ]
  1000. interface Property : IDispatch
  1001. {
  1002. [id(DISPID_VALUE /*=0*/), propget]
  1003. HRESULT Value([out, retval] PVARIANT Value);
  1004. [id(DISPID_VALUE /*=0*/), propput]
  1005. HRESULT Value([in] VARIANT Value);
  1006. [id(1), propget]
  1007. HRESULT Name([out, retval] PBSTR Name);
  1008. }
  1009. };
  1010. cpp_quote("#endif // MMC_VER >= 0x0200")