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.

2482 lines
92 KiB

  1. // mmc.idl : IDL source for mmc.exe
  2. //
  3. cpp_quote("#ifndef MMC_VER")
  4. cpp_quote("#define MMC_VER 0x0120")
  5. cpp_quote("#endif")
  6. import "basetsd.h";
  7. import "oaidl.idl";
  8. import "ocidl.idl";
  9. ///////////////////////////////////////////////////////////////////////////////
  10. /// Interfaces implemented by the Common Console's Node Manager
  11. interface IConsole;
  12. interface IHeaderCtrl;
  13. interface IToolbar;
  14. interface IImageList;
  15. interface IResultData;
  16. interface IConsoleNameSpace;
  17. interface IPropertySheetProvider;
  18. interface IPropertySheetCallback;
  19. interface IContextMenuProvider;
  20. interface IContextMenuCallback;
  21. interface IControlbar;
  22. interface IConsoleVerb;
  23. interface IMenuButton;
  24. cpp_quote("#if (MMC_VER >= 0x0110)")
  25. interface IConsole2;
  26. interface IHeaderCtrl2;
  27. interface IConsoleNameSpace2;
  28. interface IDisplayHelp;
  29. interface IStringTable;
  30. cpp_quote("#endif // MMC_VER >= 0x0110")
  31. cpp_quote("#if (MMC_VER >= 0x0120)")
  32. interface IColumnData;
  33. cpp_quote("#endif // MMC_VER >= 0x0120")
  34. ///////////////////////////////////////////////////////////////////////////////
  35. /// Interfaces implemented by the Snap-in server
  36. interface IComponent;
  37. interface IComponentData;
  38. interface IExtendPropertySheet;
  39. interface IExtendContextMenu;
  40. interface IExtendControlbar;
  41. interface IResultDataCompare;
  42. interface ISnapinAbout;
  43. interface IResultOwnerData;
  44. interface ISnapinHelp;
  45. cpp_quote("#if (MMC_VER >= 0x0110)")
  46. interface IEnumTASK;
  47. interface IExtendPropertySheet2;
  48. interface ISnapinHelp2;
  49. interface IExtendTaskPad;
  50. interface IRequiredExtensions;
  51. cpp_quote("#endif // MMC_VER >= 0x0110")
  52. ///////////////////////////////////////////////////////////////////////////////
  53. /// Type definitions
  54. typedef IConsole* LPCONSOLE;
  55. typedef IHeaderCtrl* LPHEADERCTRL;
  56. typedef IToolbar* LPTOOLBAR;
  57. typedef IImageList* LPIMAGELIST;
  58. typedef IResultData* LPRESULTDATA;
  59. typedef IConsoleNameSpace* LPCONSOLENAMESPACE;
  60. typedef IPropertySheetProvider* LPPROPERTYSHEETPROVIDER;
  61. typedef IPropertySheetCallback* LPPROPERTYSHEETCALLBACK;
  62. typedef IContextMenuProvider* LPCONTEXTMENUPROVIDER;
  63. typedef IContextMenuCallback* LPCONTEXTMENUCALLBACK;
  64. typedef IControlbar* LPCONTROLBAR;
  65. typedef IConsoleVerb* LPCONSOLEVERB;
  66. typedef IMenuButton* LPMENUBUTTON;
  67. cpp_quote("#if (MMC_VER >= 0x0110)")
  68. typedef IConsole2* LPCONSOLE2;
  69. typedef IHeaderCtrl2* LPHEADERCTRL2;
  70. typedef IConsoleNameSpace2* LPCONSOLENAMESPACE2;
  71. typedef IDisplayHelp* LPDISPLAYHELP;
  72. typedef IStringTable* LPSTRINGTABLE;
  73. cpp_quote("#endif // MMC_VER >= 0x0110")
  74. cpp_quote("#if (MMC_VER >= 0x0120)")
  75. typedef IColumnData* LPCOLUMNDATA;
  76. cpp_quote("#endif // MMC_VER >= 0x0120")
  77. typedef IComponent* LPCOMPONENT;
  78. typedef IComponentData* LPCOMPONENTDATA;
  79. typedef IExtendPropertySheet* LPEXTENDPROPERTYSHEET;
  80. typedef IExtendContextMenu* LPEXTENDCONTEXTMENU;
  81. typedef IExtendControlbar* LPEXTENDCONTROLBAR;
  82. typedef IResultDataCompare* LPRESULTDATACOMPARE;
  83. typedef IResultOwnerData* LPRESULTOWNERDATA;
  84. typedef ISnapinAbout* LPSNAPABOUT;
  85. typedef ISnapinAbout* LPSNAPINABOUT;
  86. typedef ISnapinHelp* LPSNAPHELP;
  87. typedef ISnapinHelp* LPSNAPINHELP;
  88. cpp_quote("#if (MMC_VER >= 0x0110)")
  89. typedef IEnumTASK* LPENUMTASK;
  90. typedef IExtendPropertySheet2* LPEXTENDPROPERTYSHEET2;
  91. typedef ISnapinHelp2* LPSNAPINHELP2;
  92. typedef IExtendTaskPad* LPEXTENDTASKPAD;
  93. typedef IRequiredExtensions* LPREQUIREDEXTENSIONS;
  94. cpp_quote("#endif // MMC_VER >= 0x0110")
  95. ///////////////////////////////////////////////////////////////////////////////
  96. // Published Common Console ListView constants
  97. #define LVS_ICON 0x0000
  98. #define LVS_REPORT 0x0001
  99. #define LVS_SMALLICON 0x0002
  100. #define LVS_LIST 0x0003
  101. #define LVSICF_NOINVALIDATEALL 0x00000001
  102. #define LVSICF_NOSCROLL 0x00000002
  103. const long MMCLV_AUTO = -1;
  104. const long MMCLV_NOPARAM = -2;
  105. const long MMCLV_NOICON = -1;
  106. const long MMCLV_VIEWSTYLE_ICON = LVS_ICON;
  107. const long MMCLV_VIEWSTYLE_SMALLICON = LVS_SMALLICON;
  108. const long MMCLV_VIEWSTYLE_LIST = LVS_LIST;
  109. const long MMCLV_VIEWSTYLE_REPORT = LVS_REPORT;
  110. const long MMCLV_VIEWSTYLE_FILTERED = 0x0004;
  111. const void* MMCLV_NOPTR = 0x0;
  112. const long MMCLV_UPDATE_NOINVALIDATEALL = LVSICF_NOINVALIDATEALL;
  113. const long MMCLV_UPDATE_NOSCROLL = LVSICF_NOSCROLL;
  114. static unsigned short* MMC_CALLBACK = ((unsigned short *)(-1));
  115. cpp_quote("#if (MMC_VER >= 0x0120)")
  116. cpp_quote("#define MMC_IMAGECALLBACK (-1)")
  117. cpp_quote("#define MMC_TEXTCALLBACK MMC_CALLBACK")
  118. cpp_quote("#endif // MMC_VER >= 0x0120")
  119. ///////////////////////////////////////////////////////////////////////////////
  120. // ResultData and Scope Data item structures.
  121. typedef LONG_PTR HSCOPEITEM;
  122. typedef long COMPONENTID;
  123. typedef LONG_PTR HRESULTITEM;
  124. const DWORD RDI_STR = 0x0002;
  125. const DWORD RDI_IMAGE = 0x0004;
  126. const DWORD RDI_STATE = 0x0008;
  127. const DWORD RDI_PARAM = 0x0010;
  128. const DWORD RDI_INDEX = 0x0020;
  129. const DWORD RDI_INDENT = 0x0040;
  130. typedef [v1_enum] enum _MMC_RESULT_VIEW_STYLE
  131. {
  132. MMC_SINGLESEL = 0x0001,
  133. MMC_SHOWSELALWAYS = 0x0002,
  134. MMC_NOSORTHEADER = 0x0004
  135. } MMC_RESULT_VIEW_STYLE;
  136. // List view with single select
  137. const long MMC_VIEW_OPTIONS_NONE = 0x00000000;
  138. // NO List view. Only custom views.
  139. const long MMC_VIEW_OPTIONS_NOLISTVIEWS = 0x00000001;
  140. // List view with multi select.
  141. const long MMC_VIEW_OPTIONS_MULTISELECT = 0x00000002;
  142. //List view with user owned data
  143. const long MMC_VIEW_OPTIONS_OWNERDATALIST = 0x00000004;
  144. //List view with filtering allowed
  145. const long MMC_VIEW_OPTIONS_FILTERED = 0x00000008;
  146. // Create new control (don't use cached)
  147. const long MMC_VIEW_OPTIONS_CREATENEW = 0x00000010;
  148. cpp_quote("#if (MMC_VER >= 0x0110)")
  149. // Use font linking on result items (for multi-language support)
  150. const long MMC_VIEW_OPTIONS_USEFONTLINKING = 0x00000020;
  151. cpp_quote("#endif // MMC_VER >= 0x0110")
  152. cpp_quote("#if (MMC_VER >= 0x0120)")
  153. // don't include scope items in the result list view
  154. const long MMC_VIEW_OPTIONS_EXCLUDE_SCOPE_ITEMS_FROM_LIST = 0x00000040;
  155. const long MMC_VIEW_OPTIONS_LEXICAL_SORT = 0x00000080;
  156. cpp_quote("#endif // MMC_VER >= 0x0120")
  157. // Property sheet options
  158. const DWORD MMC_PSO_NOAPPLYNOW = 0x00000001;
  159. const DWORD MMC_PSO_HASHELP = 0x00000002;
  160. const DWORD MMC_PSO_NEWWIZARDTYPE = 0x00000004;
  161. const DWORD MMC_PSO_NO_PROPTITLE = 0x00000008;
  162. // Type of controls that can be attached to the IControlbar
  163. typedef [v1_enum] enum _MMC_CONTROL_TYPE
  164. {
  165. TOOLBAR,
  166. MENUBUTTON,
  167. COMBOBOXBAR
  168. } MMC_CONTROL_TYPE;
  169. ///////////////////////////////////////////////////////////////////////////////
  170. // Console commands - These should be reviewed
  171. //
  172. typedef [v1_enum] enum _MMC_CONSOLE_VERB
  173. {
  174. MMC_VERB_NONE = 0x0000,
  175. MMC_VERB_OPEN = 0x8000,
  176. MMC_VERB_COPY = 0x8001,
  177. MMC_VERB_PASTE = 0x8002,
  178. MMC_VERB_DELETE = 0x8003,
  179. MMC_VERB_PROPERTIES = 0x8004,
  180. MMC_VERB_RENAME = 0x8005,
  181. MMC_VERB_REFRESH = 0x8006,
  182. MMC_VERB_PRINT = 0x8007,
  183. MMC_VERB_CUT = 0x8008, // Used only to explicitly disable/hide
  184. // the cut verb, when copy & paste are enabled.
  185. // must be last
  186. MMC_VERB_MAX,
  187. MMC_VERB_FIRST = MMC_VERB_OPEN,
  188. MMC_VERB_LAST = MMC_VERB_MAX - 1
  189. } MMC_CONSOLE_VERB;
  190. // Structure to create buttons on the toolbar
  191. cpp_quote("#include <pshpack8.h>")
  192. typedef struct _MMCButton
  193. {
  194. int nBitmap; // Offset into the bitmap list
  195. int idCommand; // Command ID return when the button is clicked
  196. BYTE fsState; // TBSTYLE_ENABLED ..etc
  197. BYTE fsType; // TBSTYLE_BUTTON || TBSTYLE_SEP
  198. LPOLESTR lpButtonText; // Text value for the Button
  199. LPOLESTR lpTooltipText; // Text value for the tooltip
  200. } MMCBUTTON;
  201. cpp_quote("#include <poppack.h>")
  202. typedef MMCBUTTON* LPMMCBUTTON;
  203. typedef [v1_enum] enum _MMC_BUTTON_STATE
  204. {
  205. ENABLED = 0x01,
  206. CHECKED = 0x02,
  207. HIDDEN = 0x04,
  208. INDETERMINATE = 0x08,
  209. BUTTONPRESSED = 0x10,
  210. } MMC_BUTTON_STATE;
  211. typedef struct _WIRE_RESULTDATAITEM
  212. {
  213. DWORD mask;
  214. BOOL bScopeItem;
  215. HRESULTITEM itemID;
  216. int nIndex;
  217. int nCol;
  218. LPOLESTR str;
  219. int nImage;
  220. UINT nState;
  221. LPARAM lParam;
  222. int iIndent;
  223. BOOL fUsingCallbackForString;
  224. } WIRE_RESULTDATAITEM;
  225. typedef struct _RESULTDATAITEM
  226. {
  227. DWORD mask;
  228. BOOL bScopeItem;
  229. HRESULTITEM itemID;
  230. int nIndex;
  231. int nCol;
  232. LPOLESTR str;
  233. int nImage;
  234. UINT nState;
  235. LPARAM lParam;
  236. int iIndent;
  237. } RESULTDATAITEM;
  238. typedef RESULTDATAITEM* LPRESULTDATAITEM;
  239. // Find result item options
  240. const DWORD RFI_PARTIAL = 0x0001;
  241. const DWORD RFI_WRAP = 0x0002;
  242. typedef struct _RESULTFINDINFO
  243. {
  244. LPOLESTR psz;
  245. int nStart;
  246. DWORD dwOptions;
  247. }
  248. RESULTFINDINFO;
  249. typedef RESULTFINDINFO* LPRESULTFINDINFO;
  250. //
  251. // Sort Result Items options
  252. //
  253. const DWORD RSI_DESCENDING = 0x0001;
  254. const DWORD RSI_NOSORTICON = 0x0002;
  255. const DWORD SDI_STR = 0x00002;
  256. const DWORD SDI_IMAGE = 0x00004;
  257. const DWORD SDI_OPENIMAGE = 0x00008;
  258. const DWORD SDI_STATE = 0x00010;
  259. const DWORD SDI_PARAM = 0x00020;
  260. const DWORD SDI_CHILDREN = 0x00040;
  261. // The top 4 bit of the mask determines the relative position of this item,
  262. // relative to the SCOPEDATAITEM::relativeID. By default it is the parent.
  263. // For SDI_PARENT, SCOPEDATAITEM::relativeID is the HSCOPEITEM of the parent.
  264. // As you can see by the SDI_PARENT value it is a no-op. Since by default
  265. // SCOPEDATAITEM::relativeID is treated as the parents ID.
  266. const DWORD SDI_PARENT = 0x00000000;
  267. // For SDI_PREVIOUS, SCOPEDATAITEM::relativeID is the HSCOPEITEM of the previous sibling
  268. const DWORD SDI_PREVIOUS = 0x10000000;
  269. // For SDI_NEXT, SCOPEDATAITEM::relativeID is the HSCOPEITEM of the next sibling.
  270. const DWORD SDI_NEXT = 0x20000000;
  271. // For SDI_PARENT, bit 27 determines whether the item is to be inserted as the
  272. // first child. By default this item will inserted as the last child.
  273. const DWORD SDI_FIRST = 0x08000000;
  274. typedef struct _WIRE_SCOPEDATAITEM
  275. {
  276. DWORD mask;
  277. LPOLESTR pwszDisplayName;
  278. int nImage;
  279. int nOpenImage;
  280. UINT nState;
  281. int cChildren;
  282. LPARAM lParam;
  283. HSCOPEITEM relativeID;
  284. HSCOPEITEM ID;
  285. BOOL fUsingCallbackForString;
  286. } WIRE_SCOPEDATAITEM;
  287. typedef struct _SCOPEDATAITEM
  288. {
  289. DWORD mask;
  290. LPOLESTR displayname;
  291. int nImage;
  292. int nOpenImage;
  293. UINT nState;
  294. int cChildren;
  295. LPARAM lParam;
  296. HSCOPEITEM relativeID;
  297. HSCOPEITEM ID;
  298. } SCOPEDATAITEM;
  299. typedef SCOPEDATAITEM* LPSCOPEDATAITEM;
  300. typedef [v1_enum] enum _MMC_SCOPE_ITEM_STATE
  301. {
  302. MMC_SCOPE_ITEM_STATE_NORMAL = 0x0001, // Not bold. To set or get.
  303. MMC_SCOPE_ITEM_STATE_BOLD = 0x0002, // To set or get.
  304. MMC_SCOPE_ITEM_STATE_EXPANDEDONCE = 0x0003, // Only to get.
  305. } MMC_SCOPE_ITEM_STATE;
  306. typedef struct _CONTEXTMENUITEM
  307. {
  308. LPWSTR strName;
  309. LPWSTR strStatusBarText;
  310. LONG lCommandID;
  311. LONG lInsertionPointID;
  312. LONG fFlags;
  313. LONG fSpecialFlags;
  314. } CONTEXTMENUITEM;
  315. typedef CONTEXTMENUITEM* LPCONTEXTMENUITEM;
  316. //
  317. // Console defined menu command IDs
  318. // The console reserves the negative numbers for predefined menu command
  319. // IDs which it sends to a snapin's IExtendContextMenu::Command method
  320. //
  321. typedef [v1_enum] enum _MMC_MENU_COMMAND_IDS
  322. {
  323. MMCC_STANDARD_VIEW_SELECT = -1
  324. } MMC_MENU_COMMAND_IDS;
  325. //IMenuButton data structure
  326. typedef struct _MENUBUTTONDATA
  327. {
  328. int idCommand;
  329. int x;
  330. int y;
  331. } MENUBUTTONDATA;
  332. typedef MENUBUTTONDATA* LPMENUBUTTONDATA;
  333. typedef LONG_PTR MMC_COOKIE;
  334. // For multi select the cookie passed to the snapins will be
  335. // MMC_MULTI_SELECT_COOKIE. The data object that will be returned
  336. // should provide the CCF_OBJECT_TYPES_IN_MULTI_SELECT clipboard
  337. // format.
  338. const MMC_COOKIE MMC_MULTI_SELECT_COOKIE = -2;
  339. // Special cookie value for requesting window properties data object
  340. const MMC_COOKIE MMC_WINDOW_COOKIE = -3;
  341. cpp_quote("#if (MMC_VER >= 0x0110)")
  342. const MMC_COOKIE SPECIAL_COOKIE_MIN = -10;
  343. const MMC_COOKIE SPECIAL_COOKIE_MAX = -1;
  344. // Published filter constants
  345. #define HDFT_ISSTRING 0x0000
  346. #define HDFT_ISNUMBER 0x0001
  347. #define HDFT_HASNOVALUE 0x8000
  348. typedef [v1_enum] enum _MMC_FILTER_TYPE
  349. {
  350. MMC_STRING_FILTER = HDFT_ISSTRING,
  351. MMC_INT_FILTER = HDFT_ISNUMBER,
  352. MMC_FILTER_NOVALUE= HDFT_HASNOVALUE
  353. } MMC_FILTER_TYPE;
  354. typedef struct _MMC_FILTERDATA
  355. {
  356. [string] LPOLESTR pszText; // text filter value
  357. INT cchTextMax; // max size of filter text
  358. LONG lValue; // numeric filter value
  359. } MMC_FILTERDATA;
  360. typedef [v1_enum] enum _MMC_FILTER_CHANGE_CODE
  361. {
  362. MFCC_DISABLE = 0,
  363. MFCC_ENABLE = 1,
  364. MFCC_VALUE_CHANGE = 2
  365. } MMC_FILTER_CHANGE_CODE;
  366. typedef struct _MMC_RESTORE_VIEW
  367. { // data from call to GetResultViewType
  368. DWORD dwSize; // sizeof of this struct for versioning
  369. MMC_COOKIE cookie; // user's cookie
  370. LPOLESTR pViewType; // URL or OCX or NULL
  371. long lViewOptions; // MMC_VIEW_OPTIONS_*
  372. } MMC_RESTORE_VIEW;
  373. typedef struct _MMC_EXPANDSYNC_STRUCT
  374. {
  375. BOOL bHandled; // did snap-in handle the notification?
  376. BOOL bExpanding; // TRUE=expanding, FALSE=contracting
  377. HSCOPEITEM hItem; // item that needs to be expanded
  378. } MMC_EXPANDSYNC_STRUCT;
  379. cpp_quote("#endif // MMC_VER >= 0x0110")
  380. cpp_quote("#if (MMC_VER >= 0x0120)")
  381. typedef struct _MMC_VISIBLE_COLUMNS
  382. {
  383. INT nVisibleColumns; // number of items (visible columns) in the array.
  384. [size_is(nVisibleColumns)] INT rgVisibleCols[]; // indices of visible columns.
  385. } MMC_VISIBLE_COLUMNS;
  386. cpp_quote("#endif // MMC_VER >= 0x0120")
  387. /*
  388. NOTIFICATIONS
  389. =============
  390. Notify(dataobject, event, arg, param);
  391. For all the MMC_NOTIFY_TYPE events,
  392. dataobject
  393. For single select:
  394. dataobject for cookie, can be NULL when dataobject is not required
  395. For multi select:
  396. Console supplied data object. Supports only one format (CCF_MULTI_SELECT_SNAPIN),
  397. which can be used to accquire an IUnknow to the primary snapin.
  398. event = one of the MMCN_NOTIFY_TYPEs
  399. arg and param depend on type, see below.
  400. MMCN_ACTIVATE
  401. Is sent when a window is being activated or deactivated.
  402. arg = TRUE if window is activated, false otherwise.
  403. param = Not used.
  404. return = Not used.
  405. MMCN_ADD_IMAGES
  406. Sent to IComponent to add images for the result pane. The primary snapin
  407. should add images for both folders and leaf items. Extension snapins
  408. should add only folder images.
  409. arg = ptr to result panes IImageList.
  410. param = HSCOPEITEM of selected/deselected item
  411. return = Not used.
  412. MMCN_BTN_CLICK
  413. This message is sent when a user clicks on a button.
  414. arg = When sent to ExtendControlbar it is the data object of currently selected,
  415. when sent to IComponent/IComponentData it is 0.
  416. param = CmdID of the button equal to a value of the MMC_COMMANDS enum type.
  417. return = Not used.
  418. MMCN_CLICK
  419. Not used.
  420. MMCN_DBLCLICK
  421. arg, param = not used.
  422. return = S_FALSE to do the default action, if the default action is one of the standard verbs.
  423. MMCN_EXPAND
  424. arg = TRUE => expand, FALSE => contract
  425. param = parents HSCOPEITEM.
  426. MMCN_MINIMIZED
  427. Is sent when a window is being minimized or maximized.
  428. arg = TRUE if minimized, false otherwise.
  429. MMCN_PROPERTY_CHANGE
  430. lpDataObject = NULL
  431. lParam = user object
  432. MMCN_REMOVE_CHILDREN
  433. Informs the snapin to delete all the cookies it has added below.
  434. arg = HSCOPEITEM of the node whose children needs to be deleted.
  435. param = unused.
  436. return = unused.
  437. MMCN_RENAME
  438. This gets called the first time to query for rename and a
  439. second time to do the rename. For the query S_OK or S_FALSE for the
  440. return type. After the rename, we will send the new name with a LPOLESTR.
  441. arg = 0 for query, 1 for rename action
  442. param = LPOLESTR for containing new name
  443. return = S_OK to allow rename and S_FALSE to disallow rename.
  444. MMCN_SELECT
  445. If sent to IComponent::Notify:
  446. arg:
  447. BOOL bScope = (BOOL) LOWORD(arg);
  448. BOOL bSelect = (BOOL) HIWORD(arg);
  449. bScope: TRUE if an item the scope pane is selected,
  450. FALSE if an item in the result pane is selected.
  451. bSelect: TRUE if the item is selected,
  452. FALSE if it is de-selected.
  453. param:
  454. Ignored.
  455. If sent to IExtendControlbar::ControlbarNotify:
  456. arg:
  457. BOOL bScope = (BOOL) LOWORD(arg);
  458. BOOL bSelect = (BOOL) HIWORD(arg);
  459. bScope: TRUE if an item the scope pane is selected,
  460. FALSE if an item in the result pane is selected.
  461. bSelect: TRUE if the item is selected,
  462. FALSE if it is de-selected.
  463. param:
  464. LPDATAOBJECT pDataobject = (LPDATAOBJECT)param;
  465. pDataobject data object of item getting selected/de-selected.
  466. MMCN_SHOW
  467. arg = TRUE if selecting, FALSE if deselecting
  468. param = HSCOPEITEM of selected/deselected item
  469. MMCN_VIEW_CHANGE
  470. This message is sent to update all views of a change.
  471. arg = TRUE if Scope Item, FALSE if Result Item
  472. param = ptr to DataObject selected
  473. MMCN_MENU_BTNCLICK
  474. This message is sent when a user clicks on a button.
  475. arg = Data object of currently selected.
  476. param = Structure (LPMENUBUTTONDATA).
  477. MMCN_SNAPINHELP
  478. This message is sent when the user requests help about the snapin.
  479. dataObject = NULL
  480. arg = 0
  481. param = 0
  482. MMCN_CONTEXTHELP
  483. This message is sent when the user requests help about a selected item
  484. arg = 0
  485. param = 0
  486. MMCN_DESELECT_ALL
  487. This message is sent when all items of an owner-data result pane
  488. are deselected.
  489. dataObject = NULL
  490. arg = 0
  491. param = 0
  492. MMCN_COLUMN_CLICK
  493. This message is sent when the user clicks on a result listview column header.
  494. dataObject = NULL
  495. arg = Column number
  496. param = Sort option flags (RSI_xxx)
  497. return = not used.
  498. MMCN_DELETE:
  499. Sent to inform the snapin that the item needs to be deleted. As a result of
  500. the user hitting the 'Delete' key or delete button.
  501. dataobject: dataobject of the selected item(s) provided by the snap-in.
  502. arg, param: unused.
  503. MMCN_CUTORMOVE:
  504. dataobject: NULL.
  505. arg: pointer to a dataobject. See multi-selection below.
  506. param: unused.
  507. MMCN_QUERY_PASTE:
  508. dataobject: dataobject of the selected item provided by the snap-in.
  509. arg: dataobject of the item(s) provided by the source snap-in that needs to be pasted.
  510. param: unused.
  511. Return S_OK if the data can be pasted, S_FALSE otherwise.
  512. MMCN_PASTE:
  513. dataobject & arg: are same as for MMCN_QUERY_PASTE.
  514. param:
  515. NULL for move (as opposed to cut).
  516. For single item paste:
  517. BOOL* pPasted = (BOOL*)param;
  518. Set this to TRUE here if the item was successfully pasted.
  519. For multi-item paste:
  520. LPDATAOBJECT* ppDataObj = (LPDATAOBJECT*)param;
  521. Use this to return a pointer to a dataobject consisting of the
  522. items successfully pasted. (see MMCN_CUTORMOVE below).
  523. MMCN_FILTER_STATE:
  524. This message is sent when the user turns result view filtering on or off.
  525. dataobject = NULL
  526. arg = BOOL, True if filter turned on, Flase if filter turned off
  527. param = unused
  528. MMCN_FILTER_CHANGE:
  529. This message is sent when the filter value for a result view column has been changed.
  530. dataobject= NULL
  531. arg = Filter change code (see MMC_FILTER_CHANGE_CODE enumeration)
  532. param = column number of changed value, if change code is MFCC_VALUE_CHANGE
  533. MMCN_FILTER_CLICK:
  534. This message is sent when the filter button is clicked. The snap-in should display
  535. a UI for selecting the filter options.
  536. dataobject = NULL
  537. arg = Column number
  538. param = Pointer to filter button rect (*RECT)
  539. MMCN_INITOCX:
  540. Sent to a snap-in when its custom OCX is initialized for the first time.
  541. param = The IUnknown to the OCX, the result pane. This is the same IUnknown you would get from IConsole::QueryResultView.
  542. MMCN_PRINT:
  543. Sent to inform the snapin that the item needs to be printed. As a result of
  544. the user selecting the 'Print' button or menu item.
  545. dataobject: dataobject of the selected item(s) provided by the snap-in.
  546. arg, param: unused.
  547. MMCN_PRELOAD:
  548. Sent when parent of snapin to be preloaded is selected.
  549. dataobject: dataobject of snapin root node
  550. arg: HSCOPEITEM of root node
  551. param: unused (0)
  552. MMCN_LISTPAD:
  553. Sent when a TaskPad ListView is being attached or detached.
  554. dataobject: dataobject of selected node
  555. arg: BOOL true when attaching, false when detaching
  556. param: unused (0)
  557. MMCN_RESTORE_VIEW:
  558. Sent when user selects Back/Forward buttons
  559. dataobject: dataobject of selected node
  560. arg: MMC_RESTORE_VIEW struct
  561. param: BOOL *, snapin sets to TRUE iff it handles this notification
  562. MMCN_EXPANDSYNC
  563. This notification is sent when nodes are being expanded during initialization.
  564. The snap-in should handle this synchrnonously, without spawning a
  565. thread to handle the expansion.
  566. arg = unused
  567. param: MMC_EXPANDSYNC_STRUCT*,
  568. snapin sets to MMC_EXPANDSYNC_STRUCT.bHandled to TRUE iff it
  569. handles this notification
  570. MMCN_COLUMNS_CHANGED
  571. This notification is sent to IComponent::Notify when the user hides columns or
  572. makes columns visible in the list view using the columns dialog box accessed
  573. through the view menu.
  574. This notification tells which columns are visible.
  575. arg = unused
  576. param = pointer to MMC_VISIBLE_COLUMNS.
  577. */
  578. typedef [v1_enum] enum _MMC_NOTIFY_TYPE
  579. {
  580. MMCN_ACTIVATE = 0x8001,
  581. MMCN_ADD_IMAGES = 0x8002,
  582. MMCN_BTN_CLICK = 0x8003,
  583. MMCN_CLICK = 0x8004, // NOT USED
  584. MMCN_COLUMN_CLICK = 0x8005,
  585. MMCN_CONTEXTMENU = 0x8006, // NOT USED
  586. MMCN_CUTORMOVE = 0x8007,
  587. MMCN_DBLCLICK = 0x8008,
  588. MMCN_DELETE = 0x8009,
  589. MMCN_DESELECT_ALL = 0x800A,
  590. MMCN_EXPAND = 0x800B,
  591. MMCN_HELP = 0x800C, // NOT USED
  592. MMCN_MENU_BTNCLICK = 0x800D,
  593. MMCN_MINIMIZED = 0x800E,
  594. MMCN_PASTE = 0x800F,
  595. MMCN_PROPERTY_CHANGE = 0x8010,
  596. MMCN_QUERY_PASTE = 0x8011,
  597. MMCN_REFRESH = 0x8012,
  598. MMCN_REMOVE_CHILDREN = 0x8013,
  599. MMCN_RENAME = 0x8014,
  600. MMCN_SELECT = 0x8015,
  601. MMCN_SHOW = 0x8016,
  602. MMCN_VIEW_CHANGE = 0x8017,
  603. MMCN_SNAPINHELP = 0x8018,
  604. MMCN_CONTEXTHELP = 0x8019,
  605. MMCN_INITOCX = 0x801A,
  606. MMCN_FILTER_CHANGE = 0x801B,
  607. MMCN_FILTERBTN_CLICK = 0x801C,
  608. MMCN_RESTORE_VIEW = 0x801D,
  609. MMCN_PRINT = 0x801E,
  610. MMCN_PRELOAD = 0x801F,
  611. MMCN_LISTPAD = 0x8020,
  612. MMCN_EXPANDSYNC = 0x8021,
  613. MMCN_COLUMNS_CHANGED = 0x8022
  614. } MMC_NOTIFY_TYPE;
  615. typedef [v1_enum] enum _DATA_OBJECT_TYPES
  616. {
  617. CCT_SCOPE = 0x8000, // Data object while for scope pane context
  618. CCT_RESULT = 0x8001, // Data object while for result pane context
  619. CCT_SNAPIN_MANAGER = 0x8002, // Data object while for snap-in manager context
  620. CCT_UNINITIALIZED = 0xFFFF, // Data object has an invalid type
  621. } DATA_OBJECT_TYPES;
  622. //New window option(s)
  623. const unsigned long MMC_NW_OPTION_NONE = 0x0000;
  624. // No scope pane
  625. const unsigned long MMC_NW_OPTION_NOSCOPEPANE = 0x0001;
  626. // No standard toolbars
  627. const unsigned long MMC_NW_OPTION_NOTOOLBARS = 0x0002;
  628. // Use short window title
  629. const unsigned long MMC_NW_OPTION_SHORTTITLE = 0x0004;
  630. // Snap-in provides window title
  631. const unsigned long MMC_NW_OPTION_CUSTOMTITLE = 0x0008;
  632. // Do not save view to console doc file
  633. const unsigned long MMC_NW_OPTION_NOPERSIST = 0x0010;
  634. ///////////////////////////////////////////////////////////////////////////////
  635. // Common Console clipboard formats
  636. //
  637. // Clipboard format for node type guid
  638. const wchar_t* CCF_NODETYPE = L"CCF_NODETYPE";
  639. // Clipboard format for string version of node type guid
  640. const wchar_t* CCF_SZNODETYPE = L"CCF_SZNODETYPE";
  641. // Clipboard format for name displayed in scope pane
  642. const wchar_t* CCF_DISPLAY_NAME = L"CCF_DISPLAY_NAME";
  643. // Clipboard format for the snapin's class id.
  644. const wchar_t* CCF_SNAPIN_CLASSID = L"CCF_SNAPIN_CLASSID";
  645. // Clipboard format for window title (for window data object)
  646. const wchar_t* CCF_WINDOW_TITLE = L"CCF_WINDOW_TITLE";
  647. // This is the MMC supplied Multi-select data object.
  648. const wchar_t* CCF_MMC_MULTISELECT_DATAOBJECT = L"CCF_MMC_MULTISELECT_DATAOBJECT";
  649. // Clipboard format for the snapins multi selected dataobjects.
  650. // If there are N snapins whose objects are selected in the result
  651. // pane, these N dataobjects will be passed in a GloballAlloced
  652. // memory. The first DWORD contains the number of snapins, this will
  653. // be followed by N ptrs to the DataObjects.
  654. typedef struct _SMMCDataObjects
  655. {
  656. DWORD count;
  657. LPDATAOBJECT lpDataObject[1];
  658. } SMMCDataObjects;
  659. const wchar_t* CCF_MULTI_SELECT_SNAPINS = L"CCF_MULTI_SELECT_SNAPINS";
  660. // Clipboard format for the array of GUIDs which constitutes the object
  661. // types of all the currently selected result items put by the snapin.
  662. typedef struct _SMMCObjectTypes
  663. {
  664. DWORD count;
  665. GUID guid[1];
  666. } SMMCObjectTypes;
  667. const wchar_t* CCF_OBJECT_TYPES_IN_MULTI_SELECT = L"CCF_OBJECT_TYPES_IN_MULTI_SELECT";
  668. cpp_quote("#if (MMC_VER >= 0x0110)")
  669. // Clipboard format for dynamically extending the selected items'
  670. // context menus, toolbars, and/or property pages.
  671. // Same structure as MMCObjectTypes.
  672. typedef SMMCObjectTypes SMMCDynamicExtensions;
  673. const wchar_t* CCF_MMC_DYNAMIC_EXTENSIONS = L"CCF_MMC_DYNAMIC_EXTENSIONS";
  674. // optional Clipboard format for when the snapin wants to be preloaded;
  675. // the data for this format is a BOOL.
  676. const wchar_t* CCF_SNAPIN_PRELOADS = L"CCF_SNAPIN_PRELOADS";
  677. // clipboard format for custom dynamic node IDs
  678. typedef struct _SNodeID
  679. {
  680. DWORD cBytes;
  681. BYTE id[1];
  682. } SNodeID;
  683. cpp_quote("#if (MMC_VER >= 0x0120)")
  684. // updated version
  685. typedef struct _SNodeID2
  686. {
  687. DWORD dwFlags;
  688. DWORD cBytes;
  689. [size_is(cBytes)] BYTE id[];
  690. } SNodeID2;
  691. // used by the _SNodeID2 structure
  692. const DWORD MMC_NODEID_SLOW_RETRIEVAL = 0x01;
  693. const wchar_t* CCF_NODEID2 = L"CCF_NODEID2";
  694. cpp_quote("#endif // MMC_VER >= 0x0120")
  695. const wchar_t* CCF_NODEID = L"CCF_NODEID";
  696. cpp_quote("#if (MMC_VER >= 0x0120)")
  697. // Clipboard format to identify a set of columns put by a node
  698. // for persisting column information.
  699. // Two or more nodes can use same column-set.
  700. typedef struct _SColumnSetID
  701. {
  702. DWORD dwFlags;
  703. DWORD cBytes;
  704. BYTE id[1];
  705. } SColumnSetID;
  706. const wchar_t* CCF_COLUMN_SET_ID = L"CCF_COLUMN_SET_ID";
  707. cpp_quote("#endif // MMC_VER >= 0x0120")
  708. cpp_quote("#endif // MMC_VER >= 0x0110")
  709. ///////////////////////////////////////////////////////////////////////////////
  710. // APIs exported in mmc.lib
  711. //
  712. cpp_quote("STDAPI MMCPropertyChangeNotify(LONG_PTR lNotifyHandle, LPARAM param);")
  713. cpp_quote("#if (MMC_VER >= 0x0110)")
  714. cpp_quote("STDAPI MMCPropertyHelp(LPOLESTR pszHelpTopic);")
  715. cpp_quote("#endif // MMC_VER >= 0x0110")
  716. cpp_quote("STDAPI MMCFreeNotifyHandle(LONG_PTR lNotifyHandle);")
  717. cpp_quote("STDAPI MMCPropPageCallback(void* vpsp);")
  718. cpp_quote("EXTERN_C const CLSID CLSID_NodeManager;")
  719. cpp_quote("#if (MMC_VER >= 0x0120)")
  720. cpp_quote("EXTERN_C const CLSID CLSID_MessageView;")
  721. cpp_quote("#endif // MMC_VER >= 0x0120")
  722. ///////////////////////////////////////////////////////////////////////////////
  723. // Special dataobjects
  724. //
  725. cpp_quote("#define DOBJ_NULL (LPDATAOBJECT) 0")
  726. cpp_quote("#define DOBJ_CUSTOMOCX (LPDATAOBJECT) -1")
  727. cpp_quote("#define DOBJ_CUSTOMWEB (LPDATAOBJECT) -2")
  728. cpp_quote("#if (MMC_VER >= 0x0110)")
  729. cpp_quote("#if (MMC_VER >= 0x0120)")
  730. cpp_quote("#define DOBJ_NOCONSOLE (LPDATAOBJECT) -3")
  731. cpp_quote("#endif // MMC_VER >= 0x0120")
  732. cpp_quote("#define SPECIAL_DOBJ_MIN -10")
  733. cpp_quote("#define SPECIAL_DOBJ_MAX 0")
  734. cpp_quote("#endif // MMC_VER >= 0x0110")
  735. ///////////////////////////////////////////////////////////////////////////////
  736. // Macros
  737. //
  738. cpp_quote("#define IS_SPECIAL_DATAOBJECT(d) (((LONG_PTR)(d) >= SPECIAL_DOBJ_MIN) && ((LONG_PTR)(d) <= SPECIAL_DOBJ_MAX))")
  739. cpp_quote("#define IS_SPECIAL_COOKIE(c) (((c) >= SPECIAL_COOKIE_MIN) && ((c) <= SPECIAL_COOKIE_MAX))")
  740. ///////////////////////////////////////////////////////////////////////////////
  741. // Interfaces
  742. //
  743. [
  744. object,
  745. uuid(955AB28A-5218-11D0-A985-00C04FD8D565),
  746. helpstring("IComponentData Interface"),
  747. pointer_default(unique)
  748. ]
  749. interface IComponentData : IUnknown
  750. {
  751. [local, helpstring("Snap-in entry point. Can QI for IConsole & IConsoleNameSpace")]
  752. HRESULT Initialize([in] LPUNKNOWN pUnknown);
  753. HRESULT RemInitialize([in] LPUNKNOWN pUnknown);
  754. [local, helpstring("Create a Componet for this ComponetData")]
  755. HRESULT CreateComponent([out] LPCOMPONENT* ppComponent);
  756. HRESULT RemCreateComponent([out] LPCOMPONENT* ppComponent);
  757. [local, helpstring("User actions")]
  758. HRESULT Notify([in] LPDATAOBJECT lpDataObject, [in] MMC_NOTIFY_TYPE event,
  759. [in] LPARAM arg, [in] LPARAM param);
  760. typedef [switch_type(MMC_NOTIFY_TYPE)] union _ICDNotifyParam
  761. {
  762. [case(MMCN_EXPANDSYNC)]
  763. MMC_EXPANDSYNC_STRUCT *pExpandSync;
  764. [case(MMCN_RENAME)]
  765. [string] LPOLESTR pwsNewName;
  766. [default]
  767. LPARAM value;
  768. } ICDNotifyParam;
  769. HRESULT RemNotify([in] LPDATAOBJECT lpDataObject,
  770. [in] BOOL fSpecialDataObject,
  771. [in] long lSpecialDataObject,
  772. [in] MMC_NOTIFY_TYPE event,
  773. [in] LPARAM arg,
  774. [switch_is(event)] ICDNotifyParam *param);
  775. [helpstring("Release cookies associated with the children of a specific node")]
  776. HRESULT Destroy();
  777. [helpstring("Returns a data object which may be used to retrieve the context information for the specified cookie")]
  778. HRESULT QueryDataObject([in] MMC_COOKIE cookie, [in] DATA_OBJECT_TYPES type,
  779. [out] LPDATAOBJECT* ppDataObject);
  780. [local, helpstring("Get display info for the name space item")]
  781. HRESULT GetDisplayInfo([in,out] SCOPEDATAITEM* pScopeDataItem);
  782. HRESULT RemGetDisplayInfo([in,out] WIRE_SCOPEDATAITEM* pwsdi);
  783. [local, helpstring("The snap-in's compare function for two data objects")]
  784. HRESULT CompareObjects([in] LPDATAOBJECT lpDataObjectA, [in] LPDATAOBJECT lpDataObjectB);
  785. HRESULT RemCompareObjects([in] long cDataObjectsA,
  786. [in, size_is(cDataObjectsA)] IDataObject *ppiDataObjectsA[],
  787. [in] BOOL fSpecialDataObjectA,
  788. [in] long lSpecialDataObjectA,
  789. [in] long cDataObjectsB,
  790. [in, size_is(cDataObjectsB)] IDataObject *ppiDataObjectsB[],
  791. [in] BOOL fSpecialDataObjectB,
  792. [in] long lSpecialDataObjectB);
  793. };
  794. [
  795. object,
  796. uuid(43136EB2-D36C-11CF-ADBC-00AA00A80033),
  797. helpstring("IComponent Interface"),
  798. pointer_default(unique)
  799. ]
  800. interface IComponent : IUnknown
  801. {
  802. [helpstring("Snap-in entry point")]
  803. HRESULT Initialize([in] LPCONSOLE lpConsole);
  804. [helpstring("User actions"), local]
  805. HRESULT Notify([in] LPDATAOBJECT lpDataObject, [in] MMC_NOTIFY_TYPE event,
  806. [in] LPARAM arg, [in] LPARAM param);
  807. typedef [switch_type(MMC_NOTIFY_TYPE)] union _ICNotifyArg
  808. {
  809. [case(MMCN_ADD_IMAGES)]
  810. IImageList *piImageList;
  811. [case(MMCN_QUERY_PASTE)]
  812. IDataObject *pidoQueryPasteTarget;
  813. [case(MMCN_PASTE)]
  814. IDataObject *pidoPasteTarget;
  815. [case(MMCN_CUTORMOVE)]
  816. IDataObject *pidoCutOrMove;
  817. [case(MMCN_RESTORE_VIEW)]
  818. MMC_RESTORE_VIEW *pRestoreView;
  819. [default]
  820. LPARAM value;
  821. } ICNotifyArg;
  822. typedef [switch_type(MMC_NOTIFY_TYPE)] union _ICNotifyParam
  823. {
  824. [case(MMCN_INITOCX)]
  825. IUnknown *piUnknown;
  826. [case(MMCN_RENAME)]
  827. [string] LPOLESTR pwszNewName;
  828. [case(MMCN_FILTERBTN_CLICK)]
  829. RECT *pRect;
  830. [case(MMCN_COLUMNS_CHANGED)]
  831. MMC_VISIBLE_COLUMNS *pColumns;
  832. [default]
  833. LPARAM value;
  834. } ICNotifyParam;
  835. typedef [switch_type(MMC_NOTIFY_TYPE)] union _ICOutParam
  836. {
  837. [case(MMCN_PASTE)]
  838. IDataObject *pidoCutOrMove;
  839. [case(MMCN_RESTORE_VIEW)]
  840. BOOL fRestoreHandled;
  841. [default]
  842. LPARAM value;
  843. } ICOutParam;
  844. HRESULT RemNotify([in] long cDataObjects,
  845. [in, size_is(cDataObjects)] IDataObject *ppiDataObjects[],
  846. [in] BOOL fSpecialDataObject,
  847. [in] long lSpecialDataObject,
  848. [in] MMC_NOTIFY_TYPE event,
  849. [in, switch_is(event)] ICNotifyArg *arg,
  850. [in, switch_is(event)] ICNotifyParam *param,
  851. [out, switch_is(event)] ICOutParam **ppOutParam);
  852. [helpstring("Release cookies associated with the children of a specific node")]
  853. HRESULT Destroy([in] MMC_COOKIE cookie);
  854. [helpstring("Returns a data object which may be used to retrieve the context information for the specified cookie")]
  855. HRESULT QueryDataObject([in] MMC_COOKIE cookie, [in] DATA_OBJECT_TYPES type,
  856. [out] LPDATAOBJECT* ppDataObject);
  857. [helpstring("Returns the result view type for the specified cookie")]
  858. HRESULT GetResultViewType([in] MMC_COOKIE cookie, [out] LPOLESTR* ppViewType,
  859. [out] long* pViewOptions);
  860. [local, helpstring("Get display info for the result item")]
  861. HRESULT GetDisplayInfo([in,out] RESULTDATAITEM* pResultDataItem);
  862. HRESULT RemGetDisplayInfo([in,out] WIRE_RESULTDATAITEM *pwrdi);
  863. [local, helpstring("The snap-in's compare function for two data objects")]
  864. HRESULT CompareObjects([in] LPDATAOBJECT lpDataObjectA, [in] LPDATAOBJECT lpDataObjectB);
  865. HRESULT RemCompareObjects([in] long cDataObjectsA,
  866. [in, size_is(cDataObjectsA)] IDataObject *ppiDataObjectsA[],
  867. [in] BOOL fSpecialDataObjectA,
  868. [in] long lSpecialDataObjectA,
  869. [in] long cDataObjectsB,
  870. [in, size_is(cDataObjectsB)] IDataObject *ppiDataObjectsB[],
  871. [in] BOOL fSpecialDataObjectB,
  872. [in] long lSpecialDataObjectB);
  873. };
  874. [
  875. object,
  876. uuid(E8315A52-7A1A-11D0-A2D2-00C04FD909DD),
  877. helpstring("Compare interface for sorting result items"),
  878. pointer_default(unique)
  879. ]
  880. interface IResultDataCompare : IUnknown
  881. {
  882. [helpstring("Compare two cookies")]
  883. HRESULT Compare([in] LPARAM lUserParam,
  884. [in] MMC_COOKIE cookieA, [in] MMC_COOKIE cookieB, [in, out] int* pnResult);
  885. }
  886. [
  887. object,
  888. uuid(9CB396D8-EA83-11d0-AEF1-00C04FB6DD2C),
  889. helpstring("Interface for owner data result pane list"),
  890. pointer_default(unique)
  891. ]
  892. interface IResultOwnerData : IUnknown
  893. {
  894. [helpstring("Find result item that matches string")]
  895. HRESULT FindItem([in] LPRESULTFINDINFO pFindInfo, [out] int* pnFoundIndex);
  896. [helpstring("Hint to cache result item data")]
  897. HRESULT CacheHint ([in] int nStartIndex, [in] int nEndIndex);
  898. [helpstring("Sort result items")]
  899. HRESULT SortItems([in] int nColumn, [in] DWORD dwSortOptions, [in] LPARAM lUserParam);
  900. }
  901. [
  902. object,
  903. uuid(43136EB1-D36C-11CF-ADBC-00AA00A80033),
  904. helpstring("IConsole Interface"),
  905. pointer_default(unique)
  906. ]
  907. interface IConsole : IUnknown
  908. {
  909. [helpstring("Sets IConsoles header interface")]
  910. HRESULT SetHeader([in] LPHEADERCTRL pHeader);
  911. [helpstring("Sets IConsoles toolbar interface")]
  912. HRESULT SetToolbar([in] LPTOOLBAR pToolbar);
  913. [helpstring("Queries IConsoles user provided IUnknown")]
  914. HRESULT QueryResultView([out] LPUNKNOWN* pUnknown);
  915. [helpstring("Queries the IConsole provided image list for the scope pane.")]
  916. HRESULT QueryScopeImageList([out] LPIMAGELIST* ppImageList);
  917. [helpstring("Queries the IConsole provided image list for the result pane.")]
  918. HRESULT QueryResultImageList([out] LPIMAGELIST* ppImageList);
  919. [helpstring("Generates a notification to update view(s) because of content change")]
  920. HRESULT UpdateAllViews([in] LPDATAOBJECT lpDataObject,
  921. [in] LPARAM data,
  922. [in] LONG_PTR hint);
  923. [helpstring("Displays a message box")]
  924. HRESULT MessageBox([in] LPCWSTR lpszText, [in] LPCWSTR lpszTitle,
  925. [in] UINT fuStyle, [out] int* piRetval);
  926. [helpstring("Query for the IConsoleVerb.")]
  927. HRESULT QueryConsoleVerb([out] LPCONSOLEVERB * ppConsoleVerb);
  928. [helpstring("Selects the given scope item.")]
  929. HRESULT SelectScopeItem([in] HSCOPEITEM hScopeItem);
  930. [helpstring("Returns handle to the main frame window.")]
  931. HRESULT GetMainWindow([out] HWND* phwnd);
  932. [helpstring("Create a new window rooted at the scope item specified by hScopeItem.")]
  933. HRESULT NewWindow([in] HSCOPEITEM hScopeItem, [in] unsigned long lOptions);
  934. };
  935. [
  936. object,
  937. uuid(43136EB3-D36C-11CF-ADBC-00AA00A80033),
  938. helpstring("INodeInit Interface"),
  939. pointer_default(unique)
  940. ]
  941. interface IHeaderCtrl : IUnknown
  942. {
  943. const int AUTO_WIDTH = -1; // Column width is determined by the string length + padding
  944. cpp_quote("#if (MMC_VER >= 0x0120)")
  945. const int HIDE_COLUMN = -4; // Column will be hidden
  946. cpp_quote("#endif // MMC_VER >= 0x0120")
  947. [helpstring("Add a column to a Default Result view")]
  948. HRESULT InsertColumn([in] int nCol, [in,] LPCWSTR title, [in] int nFormat, [in] int nWidth);
  949. [helpstring("Remove a column to a Default Result view")]
  950. HRESULT DeleteColumn([in] int nCol);
  951. [helpstring("Set a columns text")]
  952. HRESULT SetColumnText([in] int nCol, [in] LPCWSTR title);
  953. [helpstring("Gets a columns text")]
  954. HRESULT GetColumnText([in] int nCol, [out] LPOLESTR* pText);
  955. [helpstring("Set a columns width")]
  956. HRESULT SetColumnWidth([in] int nCol, [in] int nWidth);
  957. [helpstring("Gets a columns width")]
  958. HRESULT GetColumnWidth([in] int nCol, [out] int* pWidth);
  959. };
  960. enum
  961. {
  962. ///////////////////////////////////////////////////////////////////////////////
  963. // The following bits in insertion point / submenu IDs are handled specially:
  964. //
  965. // CCM_INSERTIONPOINTID_MASK_SPECIAL:
  966. // Insertion points and submenus whose IDs contain any bit in
  967. // CCM_INSERTIONPOINTID_MASK_SPECIAL have special behavior. Snap-Ins may use
  968. // the other bits as they see fit.
  969. // CCM_INSERTIONPOINTID_MASK_SHARED:
  970. // Insertion points and submenus whose IDs contain CCM_INSERTIONPOINTID_MASK_SHARED
  971. // are shared between the creator of the context menu, the primary extension and
  972. // the third-party extension. Any of these entities adding items to a shared
  973. // insertion point or submenu, add them to the same insertion point or submenu.
  974. // Only IContextMenuProvider may create insertion points or submenus with this bit
  975. // set, unless CCM_INSERTIONPOINTID_MASK_CREATE_PRIMARY is also set, in which case
  976. // only the primary extension may create them.
  977. // CCM_INSERTIONPOINT_CREATE_PRIMARY:
  978. // Only the system may add insertion points or submenus for which CCM_INSERTIONPOINT_SHARED
  979. // is set and this bit is not set. Only the primary extension may add insertion points
  980. // or submenus for which both bits are set. This prevents insertion point ID conflicts
  981. // between insertion points and submenus created by IContextMenuProvider and those
  982. // created by the primary extension.
  983. // CCM_INSERTIONPOINTID_MASK_ADD_PRIMARY:
  984. // If CCM_INSERTIONPOINT_SHARED is set and this bit is not set, then
  985. // the primary extension may not add to this insertion point or submenu.
  986. // CCM_INSERTIONPOINTID_MASK_ADD_3RDPARTY:
  987. // If CCM_INSERTIONPOINT_SHARED is set and this bit is not set, then
  988. // the third-party extensions may not add to this insertion point or submenu.
  989. // CCM_INSERTIONPOINTID_MASK_RESERVED:
  990. // Insertion points and submenus may not be added with any of these bits set.
  991. // CCM_INSERTIONPOINTID_MASK_FLAGINDEX:
  992. // This mask extracts the the index field from system insertion point IDs.
  993. // The index gives the bit position of the associated insertion allowed flag.
  994. CCM_INSERTIONPOINTID_MASK_SPECIAL = 0xFFFF0000,
  995. CCM_INSERTIONPOINTID_MASK_SHARED = 0x80000000,
  996. CCM_INSERTIONPOINTID_MASK_CREATE_PRIMARY = 0x40000000,
  997. CCM_INSERTIONPOINTID_MASK_ADD_PRIMARY = 0x20000000,
  998. CCM_INSERTIONPOINTID_MASK_ADD_3RDPARTY = 0x10000000,
  999. CCM_INSERTIONPOINTID_MASK_RESERVED = 0x0FFF0000,
  1000. CCM_INSERTIONPOINTID_MASK_FLAGINDEX = 0x0000001F,
  1001. ///////////////////////////////////////////////////////////////////////////////
  1002. // Use these InsertionPointIDs to add items at the predefined insertion points:
  1003. //
  1004. // 0
  1005. // This is interpreted the same as CCM_INSERTIONPOINTID_ROOT_MENU (see below).
  1006. // CCM_INSERTIONPOINTID_PRIMARY_TOP:
  1007. // The primary extension may use this insertion point to add items to the top of
  1008. // the main context menu.
  1009. // CCM_INSERTIONPOINTID_PRIMARY_NEW:
  1010. // The primary extension may use this insertion point to add items to the top of
  1011. // the Create New submenu.
  1012. // CCM_INSERTIONPOINTID_PRIMARY_TASK:
  1013. // The primary extension may use this insertion point to add items to the top of
  1014. // the Task submenu.
  1015. // CCM_INSERTIONPOINTID_3RDPARTY_NEW:
  1016. // Third-party extensions may use this insertion point to add items to the bottom of
  1017. // the Create New submenu.
  1018. // CCM_INSERTIONPOINTID_3RDPARTY_TASK:
  1019. // Third-party extensions may use this insertion point to add items to the bottom of
  1020. // the Task submenu.
  1021. // CCM_INSERTIONPOINTID_ROOT_MENU:
  1022. // IContextMenuProvider may use this insertion point to add items to the root menu.
  1023. // Neither primary extensions nor third-party extension may add items to the root
  1024. // menu except through insertion points added by IContextMenuProvider.
  1025. //
  1026. CCM_INSERTIONPOINTID_PRIMARY_TOP = 0xA0000000, // SHARED and ADD_PRIMARY
  1027. CCM_INSERTIONPOINTID_PRIMARY_NEW = 0xA0000001, // SHARED and ADD_PRIMARY
  1028. CCM_INSERTIONPOINTID_PRIMARY_TASK = 0xA0000002, // SHARED and ADD_PRIMARY
  1029. CCM_INSERTIONPOINTID_PRIMARY_VIEW = 0xA0000003, // SHARED and ADD_PRIMARY
  1030. CCM_INSERTIONPOINTID_3RDPARTY_NEW = 0x90000001, // SHARED and ADD_3RDPARTY
  1031. CCM_INSERTIONPOINTID_3RDPARTY_TASK = 0x90000002, // SHARED and ADD_3RDPARTY
  1032. CCM_INSERTIONPOINTID_ROOT_MENU = 0x80000000 // SHARED
  1033. };
  1034. //
  1035. // Macro to derive an insertion allowed flag from an system insertion point ID
  1036. //
  1037. #define INSERTALLOWED_FLAG(insertionID) \
  1038. (1L << (insertionID & CCM_INSERTIONPOINTID_MASK_FLAGINDEX))
  1039. enum
  1040. {
  1041. /////////////////////////////////////////////////////////////////////////////////////
  1042. // These flags give permission to insert menu items at the CCM_INSERTIONPOINTID_xxx
  1043. // insertion points define above. The bit position of each flag is derived from the
  1044. // index portion of the corresponding insertion point ID. They are passed to the
  1045. // snap-in's AddMenuItems method.
  1046. CCM_INSERTIONALLOWED_TOP = INSERTALLOWED_FLAG(CCM_INSERTIONPOINTID_PRIMARY_TOP),
  1047. CCM_INSERTIONALLOWED_NEW = INSERTALLOWED_FLAG(CCM_INSERTIONPOINTID_PRIMARY_NEW),
  1048. CCM_INSERTIONALLOWED_TASK = INSERTALLOWED_FLAG(CCM_INSERTIONPOINTID_PRIMARY_TASK),
  1049. CCM_INSERTIONALLOWED_VIEW = INSERTALLOWED_FLAG(CCM_INSERTIONPOINTID_PRIMARY_VIEW)
  1050. };
  1051. enum
  1052. {
  1053. ///////////////////////////////////////////////////////////////////////////////
  1054. // The following bits in menu command IDs are handled specially:
  1055. //
  1056. // CCM_COMMANDID_MASK_RESERVED:
  1057. // Items other than insertion points and submenus may not be added with any of
  1058. // these bits set.
  1059. //
  1060. CCM_COMMANDID_MASK_RESERVED = 0xFFFF0000
  1061. };
  1062. enum
  1063. {
  1064. ///////////////////////////////////////////////////////////////////////////////
  1065. // The following flags may be passed via AddMenuItem parameter fSpecialFlags:
  1066. //
  1067. // CCM_SPECIAL_SEPARATOR
  1068. // Ignore all other parameters except lInsertionPointID. Add a separator to the
  1069. // end of the menu or the specified insertion point, except that
  1070. // CCM_SPECIAL_SEPARATOR will never add a separator as the first or last item
  1071. // in a menu/submenu, and if two or more consecutive CCM_SPECIAL_SEPARATORs are added,
  1072. // only one appears in the menu. Only IContextMenuProvider is permitted to add
  1073. // separators, either special or otherwise, to menus created by IContextMenuProvider.
  1074. //
  1075. CCM_SPECIAL_SEPARATOR = 0x0001,
  1076. //
  1077. // CCM_SPECIAL_SUBMENU
  1078. // If this submenu is empty, then it will be grayed and disabled.
  1079. // This is only valid for MF_POPUP items.
  1080. //
  1081. CCM_SPECIAL_SUBMENU = 0x0002,
  1082. //
  1083. // CCM_SPECIAL_DEFAULT_ITEM
  1084. // This should be the default menu item. If more than one menu item specifies this flag,
  1085. // the last one in each submenu takes precedence.
  1086. //
  1087. CCM_SPECIAL_DEFAULT_ITEM = 0x0004,
  1088. //
  1089. // CCM_SPECIAL_INSERTION_POINT
  1090. // Ignore all other parameters except lCommandID and lInsertionPointID. This creates
  1091. // a new "insertion point" at the end of the insertion point or submenu identified by
  1092. // lInsertionPointID (0 is the end of the main menu). Subsequent calls may use
  1093. // the lCommandID from this call as their lInsertionPointID, and insert their own
  1094. // menu items, submenus or insertion points at this point in this menu.
  1095. //
  1096. CCM_SPECIAL_INSERTION_POINT = 0x0008,
  1097. //
  1098. // CCM_SPECIAL_TESTONLY
  1099. // Perform the normal validation of the menu item parameters and return the appropriate
  1100. // result code, but do not actually add the menu item.
  1101. //
  1102. CCM_SPECIAL_TESTONLY = 0x0010
  1103. };
  1104. [
  1105. object,
  1106. uuid(43136EB7-D36C-11CF-ADBC-00AA00A80033),
  1107. helpstring("IContextMenuCallback Interface"),
  1108. pointer_default(unique)
  1109. ]
  1110. interface IContextMenuCallback : IUnknown
  1111. {
  1112. // returns S_OK if the item was added
  1113. // returns E_INVALIDARG if given a NULL pointer
  1114. // returns E_INVALIDARG if an item already exists with this lCommandID
  1115. // returns E_INVALIDARG if insertion point ID could not be found
  1116. // returns E_INVALIDARG if command ID or insertion point ID is invalid
  1117. // returns E_INVALIDARG if fFlags contains MF_OWNERDRAW or MF_BITMAP
  1118. // returns E_INVALIDARG if an extension attempts to add an item where
  1119. // fFlags contains MF_SEPARATOR or fSpecialFlags contains CCM_SPECIAL_SEPARATOR
  1120. // except in submenus created by extensions
  1121. // otherwise an unexpected error occurred
  1122. [helpstring("Adds one item to context menu")]
  1123. HRESULT AddItem([in] CONTEXTMENUITEM* pItem);
  1124. };
  1125. [
  1126. object,
  1127. uuid(43136EB6-D36C-11CF-ADBC-00AA00A80033),
  1128. object,
  1129. helpstring("IContextMenuProvider Interface"),
  1130. pointer_default(unique)
  1131. ]
  1132. //
  1133. // Note that this derives from IContextMenuCallback
  1134. //
  1135. interface IContextMenuProvider : IContextMenuCallback
  1136. {
  1137. // Methods
  1138. // returns S_OK unless an unexpected error occurs
  1139. [helpstring("Clear context menu")]
  1140. HRESULT EmptyMenuList();
  1141. // returns S_OK if successful
  1142. // returns E_INVALIDARG on NULL parameter
  1143. // passes through return code from IExtendContextMenu::AddMenuItems
  1144. // or from CoCreateInstance
  1145. // otherwise an unexpected error occurred
  1146. [helpstring("Allow the primary extension to add to bottom of context menu")]
  1147. HRESULT AddPrimaryExtensionItems([in] LPUNKNOWN piExtension, [in] LPDATAOBJECT piDataObject);
  1148. // returns S_OK if successful
  1149. // returns E_INVALIDARG on NULL parameter
  1150. // returns S_FALSE if context menu has already been extended
  1151. // passes through return code from IExtendContextMenu::AddMenuItems
  1152. // or from CLSIDToString or CoCreateInstance
  1153. // otherwise an unexpected error occurred
  1154. [helpstring("Allow third-party extensions to add to bottom of context menu")]
  1155. HRESULT AddThirdPartyExtensionItems([in] LPDATAOBJECT piDataObject);
  1156. // returns S_OK unless an unexpected error occurs
  1157. [helpstring("Display context menu")]
  1158. HRESULT ShowContextMenu([in] HWND hwndParent, [in] long xPos, [in] long yPos, [out,retval] long* plSelected);
  1159. };
  1160. [
  1161. object,
  1162. uuid(4F3B7A4F-CFAC-11CF-B8E3-00C04FD8D5B0),
  1163. helpstring("IExtendContextMenu Interface"),
  1164. pointer_default(unique)
  1165. ]
  1166. interface IExtendContextMenu : IUnknown
  1167. {
  1168. [local, helpstring("Extension may add context menu items via callback interface")]
  1169. HRESULT AddMenuItems([in] LPDATAOBJECT piDataObject,
  1170. [in] LPCONTEXTMENUCALLBACK piCallback,
  1171. [in,out] long *pInsertionAllowed);
  1172. HRESULT RemAddMenuItems(
  1173. [in] long cDataObjects,
  1174. [in, size_is(cDataObjects)] IDataObject *ppiDataObjects[],
  1175. [in] BOOL fSpecialDataObject,
  1176. [in] long lSpecialDataObject,
  1177. [in] LPCONTEXTMENUCALLBACK piCallback,
  1178. [in,out] long *pInsertionAllowed);
  1179. [local, helpstring("Extension context menu item was selected")]
  1180. HRESULT Command([in] long lCommandID, [in] LPDATAOBJECT piDataObject);
  1181. HRESULT RemCommand(
  1182. [in] long cDataObjects,
  1183. [in, size_is(cDataObjects)] IDataObject *ppiDataObjects[],
  1184. [in] BOOL fSpecialDataObject,
  1185. [in] long lSpecialDataObject,
  1186. [in] long lCommandID);
  1187. };
  1188. cpp_quote("#if (MMC_VER >= 0x0120)")
  1189. // specify change large or small icon only in ImageListSetIcon
  1190. cpp_quote("#define ILSIF_LEAVE_LARGE_ICON 0x40000000")
  1191. cpp_quote("#define ILSIF_LEAVE_SMALL_ICON 0x20000000")
  1192. cpp_quote("#define ILSIF_LEAVE_MASK (ILSIF_LEAVE_LARGE_ICON | ILSIF_LEAVE_SMALL_ICON)")
  1193. cpp_quote("#define ILSI_LARGE_ICON(nLoc) (nLoc | ILSIF_LEAVE_SMALL_ICON)")
  1194. cpp_quote("#define ILSI_SMALL_ICON(nLoc) (nLoc | ILSIF_LEAVE_LARGE_ICON)")
  1195. cpp_quote("#endif // MMC_VER >= 0x0120")
  1196. [
  1197. object,
  1198. uuid(43136EB8-D36C-11CF-ADBC-00AA00A80033),
  1199. helpstring("IImageList Interface"),
  1200. pointer_default(unique)
  1201. ]
  1202. interface IImageList : IUnknown
  1203. {
  1204. [local, helpstring("Sets an Icon in the image list, creates it if it is not there.")]
  1205. HRESULT ImageListSetIcon([in] LONG_PTR* pIcon, [in] long nLoc);
  1206. HRESULT RemImageListSetIcon([in] HICON hicon, [in] long nLoc);
  1207. [local, helpstring("Sets a strip in the image list, starting at nLoc using a pair of bitmaps.")]
  1208. HRESULT ImageListSetStrip([in] LONG_PTR* pBMapSm,
  1209. [in] LONG_PTR* pBMapLg,[in] long nStartLoc, [in] COLORREF cMask);
  1210. HRESULT RemImageListSetStrip([in] HBITMAP hbmSmall,
  1211. [in] HBITMAP hbmLarge,
  1212. [in] long nStartLoc,
  1213. [in] COLORREF cMask);
  1214. };
  1215. [
  1216. object,
  1217. uuid(31DA5FA0-E0EB-11cf-9F21-00AA003CA9F6),
  1218. helpstring("IResultData Interface"),
  1219. pointer_default(unique)
  1220. ]
  1221. interface IResultData : IUnknown
  1222. {
  1223. [local, helpstring("Allows the snap-in to insert a single item.")]
  1224. HRESULT InsertItem([in,out] LPRESULTDATAITEM item);
  1225. HRESULT RemInsertItem([in] WIRE_RESULTDATAITEM *pwrdi,
  1226. [out] HRESULTITEM *pItemID);
  1227. [helpstring("Allows the snap-in to delete a single item.")]
  1228. HRESULT DeleteItem([in] HRESULTITEM itemID, [in] int nCol);
  1229. [helpstring("Allows the snap-in to find an item/subitem based on its user inserted lParam.")]
  1230. HRESULT FindItemByLParam([in] LPARAM lParam, [out] HRESULTITEM *pItemID);
  1231. [helpstring("Allows the snap-in to delete all the items.")]
  1232. HRESULT DeleteAllRsltItems();
  1233. [local, helpstring("Allows the snap-in to set a single item.")]
  1234. HRESULT SetItem([in] LPRESULTDATAITEM item);
  1235. HRESULT RemSetItem([in] WIRE_RESULTDATAITEM *pwrdi);
  1236. [local, helpstring("Allows the snap-in to get a single item.")]
  1237. HRESULT GetItem([in,out] LPRESULTDATAITEM item);
  1238. HRESULT RemGetItem([in,out] WIRE_RESULTDATAITEM *pwrdi);
  1239. [local, helpstring("Returns the lParam of the first item, which matches the given state.")]
  1240. HRESULT GetNextItem([in,out] LPRESULTDATAITEM item);
  1241. HRESULT RemGetNextItem([in,out] WIRE_RESULTDATAITEM *pwrdi);
  1242. [helpstring("Allows the snap-in to modify the state of an item.")]
  1243. HRESULT ModifyItemState([in] int nIndex, [in] HRESULTITEM itemID,
  1244. [in] UINT uAdd, [in] UINT uRemove);
  1245. [helpstring("Allows the snap-in to set the result view style.")]
  1246. HRESULT ModifyViewStyle([in] MMC_RESULT_VIEW_STYLE add,
  1247. [in] MMC_RESULT_VIEW_STYLE remove);
  1248. [helpstring("Allows the snap-in to set the result view mode.")]
  1249. HRESULT SetViewMode([in] long lViewMode);
  1250. [helpstring("Allows the snap-in to get the result view mode.")]
  1251. HRESULT GetViewMode([out] long* lViewMode);
  1252. [helpstring("Allows the snap-in to update a single item.")]
  1253. HRESULT UpdateItem([in] HRESULTITEM itemID);
  1254. [helpstring("Sort all items in result pane")]
  1255. HRESULT Sort([in] int nColumn, [in] DWORD dwSortOptions, [in] LPARAM lUserParam);
  1256. [helpstring("Set the description bar text for the result view")]
  1257. HRESULT SetDescBarText([in] LPOLESTR DescText);
  1258. [helpstring("Set number of items in result pane list")]
  1259. HRESULT SetItemCount([in] int nItemCount, [in] DWORD dwOptions);
  1260. };
  1261. [
  1262. object,
  1263. uuid(BEDEB620-F24D-11cf-8AFC-00AA003CA9F6),
  1264. helpstring("IConsoleNameSpace Interface"),
  1265. pointer_default(unique)
  1266. ]
  1267. interface IConsoleNameSpace : IUnknown
  1268. {
  1269. import "oaidl.idl";
  1270. [local, helpstring("Allows the snap-in to insert a single item into the scope view.")]
  1271. HRESULT InsertItem([in,out] LPSCOPEDATAITEM item);
  1272. HRESULT RemInsertItem([in] WIRE_SCOPEDATAITEM *pwsdi,
  1273. [out] HSCOPEITEM *pID);
  1274. [helpstring("Allows the snap-in to delete a single item from the scope view.")]
  1275. HRESULT DeleteItem([in] HSCOPEITEM hItem, [in] long fDeleteThis);
  1276. [local, helpstring("Allows the snap-in to set a single scope view item.")]
  1277. HRESULT SetItem([in] LPSCOPEDATAITEM item);
  1278. HRESULT RemSetItem([in,out] WIRE_SCOPEDATAITEM *pwsdi);
  1279. [local, helpstring("Allows the snap-in to get a single scope view item.")]
  1280. HRESULT GetItem([in,out] LPSCOPEDATAITEM item);
  1281. HRESULT RemGetItem([in,out] WIRE_SCOPEDATAITEM *pwsdi);
  1282. [helpstring("The handle of the child item if successful, otherwise NULL.")]
  1283. HRESULT GetChildItem([in] HSCOPEITEM item, [out] HSCOPEITEM* pItemChild,
  1284. [out] MMC_COOKIE* pCookie);
  1285. [helpstring("The handle of the next item if successful, otherwise NULL.")]
  1286. HRESULT GetNextItem([in] HSCOPEITEM item, [out] HSCOPEITEM* pItemNext,
  1287. [out] MMC_COOKIE* pCookie);
  1288. [helpstring("The handle of the parent item if successful, otherwise NULL.")]
  1289. HRESULT GetParentItem([in] HSCOPEITEM item, [out] HSCOPEITEM* pItemParent,
  1290. [out] MMC_COOKIE* pCookie);
  1291. };
  1292. [
  1293. object,
  1294. uuid(255F18CC-65DB-11D1-A7DC-00C04FD8D565),
  1295. helpstring("IConsoleNameSpace2 Interface"),
  1296. pointer_default(unique)
  1297. ]
  1298. interface IConsoleNameSpace2 : IConsoleNameSpace
  1299. {
  1300. [helpstring("Allows the snap-in to expand an item in the console namespace.")]
  1301. HRESULT Expand([in] HSCOPEITEM hItem);
  1302. [helpstring("Add a dynamic extension to a selected node")]
  1303. HRESULT AddExtension([in] HSCOPEITEM hItem, [in] LPCLSID lpClsid);
  1304. };
  1305. struct _PSP;
  1306. typedef struct _PSP * HPROPSHEETPAGE;
  1307. [
  1308. local,
  1309. object,
  1310. uuid(85DE64DD-EF21-11cf-A285-00C04FD8DBE6),
  1311. helpstring("IPropertySheetCallback Interface"),
  1312. pointer_default(unique)
  1313. ]
  1314. interface IPropertySheetCallback : IUnknown
  1315. {
  1316. [helpstring("Snap-in uses this to add a page to a property sheet")]
  1317. HRESULT AddPage([in] HPROPSHEETPAGE hPage);
  1318. [helpstring("Snap-in uses this to remove a page from a property sheet")]
  1319. HRESULT RemovePage([in] HPROPSHEETPAGE hPage);
  1320. };
  1321. [
  1322. object,
  1323. uuid(85DE64DE-EF21-11cf-A285-00C04FD8DBE6),
  1324. helpstring("IPropertySheetProvider Interface"),
  1325. pointer_default(unique)
  1326. ]
  1327. interface IPropertySheetProvider : IUnknown
  1328. {
  1329. [local, helpstring("Creates a property sheet frame")]
  1330. HRESULT CreatePropertySheet([in] LPCWSTR title, [in] boolean type,
  1331. [in] MMC_COOKIE cookie, [in] LPDATAOBJECT pIDataObjectm,
  1332. [in] DWORD dwOptions);
  1333. HRESULT RemCreatePropertySheet([in] LPCWSTR title,
  1334. [in] boolean type,
  1335. [in] MMC_COOKIE cookie,
  1336. [in] long cDataObjects,
  1337. [in, size_is(cDataObjects)] IDataObject *ppiDataObjects[],
  1338. [in] BOOL fSpecialDataObject,
  1339. [in] long lSpecialDataObject,
  1340. [in] DWORD dwOptions);
  1341. [local, helpstring("Determine if the property sheet exist")]
  1342. HRESULT FindPropertySheet([in] MMC_COOKIE cookie, [in] LPCOMPONENT lpComponent, [in] LPDATAOBJECT lpDataObject);
  1343. HRESULT RemFindPropertySheet([in] MMC_COOKIE cookie,
  1344. [in] LPCOMPONENT lpComponent,
  1345. [in] long cDataObjects,
  1346. [in, size_is(cDataObjects)] IDataObject *ppiDataObjects[],
  1347. [in] BOOL fSpecialDataObject,
  1348. [in] long lSpecialDataObject);
  1349. [helpstring("Collects the pages from the primary snap-in")]
  1350. HRESULT AddPrimaryPages(LPUNKNOWN lpUnknown, BOOL bCreateHandle, HWND hNotifyWindow, BOOL bScopePane);
  1351. [helpstring("Collects the pages from the extension snap-in(s)")]
  1352. HRESULT AddExtensionPages();
  1353. [helpstring("Shows a property sheet frame parented to the HWND passed in")]
  1354. HRESULT Show([in] LONG_PTR window, [in] int page);
  1355. };
  1356. [
  1357. object,
  1358. uuid(67B70690-8885-11d2-809C-6C67C0000000),
  1359. pointer_default(unique)
  1360. ]
  1361. interface IMMCRemote : IUnknown
  1362. {
  1363. HRESULT ObjectIsRemote();
  1364. HRESULT SetMMCExePath([in, string] char *pszPath);
  1365. HRESULT SetMMCCommandLine([in, string] char *pszCmdLine);
  1366. };
  1367. [
  1368. object,
  1369. uuid(85DE64DC-EF21-11cf-A285-00C04FD8DBE6),
  1370. helpstring("IExtendPropertySheet Interface"),
  1371. pointer_default(unique)
  1372. ]
  1373. interface IExtendPropertySheet : IUnknown
  1374. {
  1375. [local, helpstring("Interface implemented by the snap-in to add pages to a sheet")]
  1376. // handle - This handle must be saved in the property page object
  1377. // to notify the parent of changes in property using API
  1378. // MMCPropertyChangeNotify. The API MMCFreeNotifyHandle
  1379. // should be called just before the property page is
  1380. // destroyed to delete the handle.
  1381. HRESULT CreatePropertyPages([in] LPPROPERTYSHEETCALLBACK lpProvider,
  1382. [in] LONG_PTR handle,
  1383. [in] LPDATAOBJECT lpIDataObject);
  1384. HRESULT RemCreatePropertyPages();
  1385. [local, helpstring("Interface implemented by the snap-in to determine if this object needs pages")]
  1386. HRESULT QueryPagesFor([in] LPDATAOBJECT lpDataObject);
  1387. HRESULT RemQueryPagesFor([in] long cDataObjects,
  1388. [in, size_is(cDataObjects)] IDataObject *ppiDataObjects[],
  1389. [in] BOOL fSpecialDataObject,
  1390. [in] long lSpecialDataObject);
  1391. };
  1392. [
  1393. object,
  1394. uuid(89E2A982-E9F9-11d2-97F2-00104B880587),
  1395. pointer_default(unique)
  1396. ]
  1397. interface IExtendPropertySheetRemote : IUnknown
  1398. {
  1399. typedef struct _WIRE_PROPERTYPAGE
  1400. {
  1401. CLSID clsidPage;
  1402. ULONG cObjects;
  1403. [size_is(cObjects)] IUnknown **apunkObjects;
  1404. VARIANT varInitData;
  1405. DWORD dwFlags;
  1406. short cx;
  1407. short cy;
  1408. [string] OLECHAR *pwszTitle;
  1409. } WIRE_PROPERTYPAGE;
  1410. typedef struct _PAGEINFO
  1411. {
  1412. BOOL fHaveFullInfo; // if FALSE then only have ProgID and CLSID
  1413. LPOLESTR pwszProgID;
  1414. CLSID clsid;
  1415. short cx;
  1416. short cy;
  1417. LPOLESTR pwszTitle;
  1418. } PAGEINFO;
  1419. typedef struct _PAGEINFOS
  1420. {
  1421. ULONG cPages;
  1422. [size_is(cPages)] PAGEINFO aPageInfo[];
  1423. } PAGEINFOS;
  1424. typedef struct _WIRE_PROPERTYPAGES
  1425. {
  1426. CLSID clsidRemotePropertySheetManager;
  1427. IUnknown *punkExtra;
  1428. BOOL fWizard;
  1429. BOOL fConfigWizard;
  1430. PAGEINFOS *pPageInfos;
  1431. LPOLESTR pwszProgIDStart;
  1432. ULONG cPages;
  1433. ULONG cObjects;
  1434. [size_is(cObjects)] IUnknown **apunkObjects;
  1435. [size_is(cPages)] WIRE_PROPERTYPAGE aPages[];
  1436. } WIRE_PROPERTYPAGES;
  1437. [local] HRESULT CreatePropertyPageDefs([in] IDataObject *piDataObject,
  1438. [out] WIRE_PROPERTYPAGES **ppPages);
  1439. HRESULT RemCreatePropertyPageDefs([in] long cDataObjects,
  1440. [in, size_is(cDataObjects)] IDataObject *ppiDataObjects[],
  1441. [in] BOOL fSpecialDataObject,
  1442. [in] long lSpecialDataObject,
  1443. [out] WIRE_PROPERTYPAGES **ppPages);
  1444. };
  1445. [
  1446. object,
  1447. uuid(67B70691-8885-11d2-809C-6C67C0000000),
  1448. pointer_default(unique)
  1449. ]
  1450. interface IRemotePropertySheetManager : IUnknown
  1451. {
  1452. HRESULT CreateRemotePages(IPropertySheetCallback *piPropertySheetCallback,
  1453. LONG_PTR handle,
  1454. IDataObject *piDataObject,
  1455. WIRE_PROPERTYPAGES *pPages);
  1456. };
  1457. [
  1458. object,
  1459. uuid(69FB811E-6C1C-11D0-A2CB-00C04FD909DD),
  1460. helpstring("Control bar to hold toolbar and other controls"),
  1461. pointer_default(unique)
  1462. ]
  1463. interface IControlbar : IUnknown
  1464. {
  1465. [helpstring("Create and return the control requested")]
  1466. HRESULT Create([in] MMC_CONTROL_TYPE nType,
  1467. [in] LPEXTENDCONTROLBAR pExtendControlbar,
  1468. [out] LPUNKNOWN* ppUnknown);
  1469. [helpstring("Associated the control to the control bar")]
  1470. HRESULT Attach([in] MMC_CONTROL_TYPE nType, [in] LPUNKNOWN lpUnknown);
  1471. [helpstring("Break the association between the control and the control bar")]
  1472. HRESULT Detach([in] LPUNKNOWN lpUnknown);
  1473. };
  1474. [
  1475. object,
  1476. uuid(49506520-6F40-11D0-A98B-00C04FD8D565),
  1477. helpstring("IExtendControlbar Interface"),
  1478. pointer_default(unique)
  1479. ]
  1480. interface IExtendControlbar : IUnknown
  1481. {
  1482. [local, helpstring("Extension may add toolbars via callback interface")]
  1483. HRESULT SetControlbar([in] LPCONTROLBAR pControlbar);
  1484. HRESULT RemSetControlbar([in] LPCONTROLBAR pControlbar);
  1485. [helpstring("User actions"), local]
  1486. HRESULT ControlbarNotify([in] MMC_NOTIFY_TYPE event,
  1487. [in] LPARAM arg, [in] LPARAM param);
  1488. HRESULT RemControlbarNotify([in] long cDataObjects,
  1489. [in, size_is(cDataObjects)] IDataObject *ppiDataObjects[],
  1490. [in] BOOL fSpecialDataObject,
  1491. [in] long lSpecialDataObject,
  1492. [in] MMC_NOTIFY_TYPE event,
  1493. [in] LPARAM arg,
  1494. [in] LPARAM lparam);
  1495. };
  1496. [
  1497. object,
  1498. uuid(F00EB152-8BB4-11d2-97DD-00104B880587),
  1499. hidden,
  1500. ]
  1501. interface IExtendControlbarRemote : IUnknown
  1502. {
  1503. typedef struct _POPUP_MENUITEM
  1504. {
  1505. UINT uiFlags;
  1506. UINT uiItemID;
  1507. [string] char *pszItemText;
  1508. } POPUP_MENUITEM;
  1509. typedef struct _POPUP_MENUDEF
  1510. {
  1511. IUnknown *punkSnapInDefined;
  1512. long cMenuItems;
  1513. HWND hwndMenuOwner;
  1514. [size_is(cMenuItems)] POPUP_MENUITEM MenuItems[];
  1515. } POPUP_MENUDEF;
  1516. [local]
  1517. HRESULT MenuButtonClick([in] IDataObject *piDataObject,
  1518. [in] int idCommand,
  1519. [out] POPUP_MENUDEF **ppPopupMenuDef);
  1520. HRESULT RemMenuButtonClick([in] long cDataObjects,
  1521. [in, size_is(cDataObjects)] IDataObject *ppiDataObjects[],
  1522. [in] BOOL fSpecialDataObject,
  1523. [in] long lSpecialDataObject,
  1524. [in] int idCommand,
  1525. [out] POPUP_MENUDEF **ppPopupMenuDef);
  1526. [local]
  1527. HRESULT PopupMenuClick([in] IDataObject *piDataObject,
  1528. [in] UINT uIDItem,
  1529. [in] IUnknown *punkParam);
  1530. HRESULT RemPopupMenuClick([in] long cDataObjects,
  1531. [in, size_is(cDataObjects)] IDataObject *ppiDataObjects[],
  1532. [in] BOOL fSpecialDataObject,
  1533. [in] long lSpecialDataObject,
  1534. [in] UINT uIDItem,
  1535. [in] IUnknown *punkParam);
  1536. };
  1537. [
  1538. object,
  1539. uuid(43136EB9-D36C-11CF-ADBC-00AA00A80033),
  1540. pointer_default(unique)
  1541. ]
  1542. interface IToolbar : IUnknown
  1543. {
  1544. [helpstring("Add and image to the toolbar")]
  1545. HRESULT AddBitmap([in] int nImages, [in] HBITMAP hbmp, [in] int cxSize, [in] int cySize, [in] COLORREF crMask );
  1546. [helpstring("Add an array of buttons to the toolbar")]
  1547. HRESULT AddButtons([in] int nButtons, [in] LPMMCBUTTON lpButtons);
  1548. [helpstring("Add a single button to the toolbar at position nIndex")]
  1549. HRESULT InsertButton([in] int nIndex, [in] LPMMCBUTTON lpButton);
  1550. [helpstring("Remove a button at the index")]
  1551. HRESULT DeleteButton([in] int nIndex);
  1552. [helpstring("Get an attribute of a button")]
  1553. HRESULT GetButtonState([in] int idCommand, [in] MMC_BUTTON_STATE nState, [out] BOOL* pState);
  1554. [helpstring("Set an attribute of a button")]
  1555. HRESULT SetButtonState([in] int idCommand, [in] MMC_BUTTON_STATE nState, [in] BOOL bState);
  1556. };
  1557. [
  1558. object,
  1559. uuid(E49F7A60-74AF-11D0-A286-00C04FD8FE93),
  1560. pointer_default(unique)
  1561. ]
  1562. interface IConsoleVerb : IUnknown
  1563. {
  1564. [helpstring("Get verb state")]
  1565. HRESULT GetVerbState([in] MMC_CONSOLE_VERB eCmdID, [in] MMC_BUTTON_STATE nState, [out] BOOL* pState);
  1566. [helpstring("Set verb state")]
  1567. HRESULT SetVerbState([in] MMC_CONSOLE_VERB eCmdID, [in] MMC_BUTTON_STATE nState, [in] BOOL bState);
  1568. [helpstring("Set default verb")]
  1569. HRESULT SetDefaultVerb([in] MMC_CONSOLE_VERB eCmdID);
  1570. [helpstring("Get default verb")]
  1571. HRESULT GetDefaultVerb([out] MMC_CONSOLE_VERB* peCmdID);
  1572. };
  1573. [
  1574. object,
  1575. uuid(1245208C-A151-11D0-A7D7-00C04FD909DD),
  1576. pointer_default(unique)
  1577. ]
  1578. interface ISnapinAbout : IUnknown
  1579. {
  1580. [helpstring("Text for the snap-in description box")]
  1581. HRESULT GetSnapinDescription([out] LPOLESTR* lpDescription);
  1582. [helpstring("Provider name")]
  1583. HRESULT GetProvider([out] LPOLESTR* lpName);
  1584. [helpstring("Version number for the snap-in")]
  1585. HRESULT GetSnapinVersion([out] LPOLESTR* lpVersion);
  1586. [helpstring("Main icon for about box")]
  1587. HRESULT GetSnapinImage([out] HICON* hAppIcon);
  1588. [helpstring("Static folder images for scope and result panes")]
  1589. HRESULT GetStaticFolderImage([out] HBITMAP* hSmallImage,
  1590. [out] HBITMAP* hSmallImageOpen,
  1591. [out] HBITMAP* hLargeImage,
  1592. [out] COLORREF* cMask);
  1593. };
  1594. [
  1595. object,
  1596. uuid(951ED750-D080-11d0-B197-000000000000),
  1597. pointer_default(unique)
  1598. ]
  1599. interface IMenuButton : IUnknown
  1600. {
  1601. [helpstring("Adds a button")]
  1602. HRESULT AddButton([in] int idCommand,[in] LPOLESTR lpButtonText,
  1603. [in] LPOLESTR lpTooltipText);
  1604. [helpstring("Set an attributes of a button")]
  1605. HRESULT SetButton([in] int idCommand,[in] LPOLESTR lpButtonText,
  1606. [in] LPOLESTR lpTooltipText);
  1607. [helpstring("Set the state of a button")]
  1608. HRESULT SetButtonState([in] int idCommand,
  1609. [in] MMC_BUTTON_STATE nState,
  1610. [in] BOOL bState);
  1611. };
  1612. [
  1613. object,
  1614. uuid(A6B15ACE-DF59-11D0-A7DD-00C04FD909DD),
  1615. pointer_default(unique)
  1616. ]
  1617. interface ISnapinHelp : IUnknown
  1618. {
  1619. [helpstring("Get the compiled help file (.chm) from a snap-in to merge")]
  1620. HRESULT GetHelpTopic([out] LPOLESTR* lpCompiledHelpFile);
  1621. };
  1622. ///////////////////////////////////////////////////////////////////////////////
  1623. ///////////////////////////////////////////////////////////////////////////////
  1624. ///////////////////////////////////////////////////////////////////////////////
  1625. ///////////////////////////////////////////////////////////////////////////////
  1626. ////
  1627. //// MMC 1.1 changes
  1628. ////
  1629. cpp_quote("#if (MMC_VER >= 0x0110)")
  1630. [
  1631. object,
  1632. uuid(B7A87232-4A51-11D1-A7EA-00C04FD909DD),
  1633. helpstring("IExtendPropertySheet2 Interface, adds support for Wizard 97 specification"),
  1634. pointer_default(unique)
  1635. ]
  1636. interface IExtendPropertySheet2 : IExtendPropertySheet
  1637. {
  1638. [local, helpstring("Interface implemented by the snap-in, to get the watermark and text for Wizard 97 style")]
  1639. HRESULT GetWatermarks([in] LPDATAOBJECT lpIDataObject,
  1640. [out] HBITMAP* lphWatermark,
  1641. [out] HBITMAP* lphHeader,
  1642. [out] HPALETTE* lphPalette,
  1643. [out] BOOL* bStretch);
  1644. HRESULT RemGetWatermarks([in] long cDataObjects,
  1645. [in, size_is(cDataObjects)] IDataObject *ppiDataObjects[],
  1646. [in] BOOL fSpecialDataObject,
  1647. [in] long lSpecialDataObject,
  1648. [out] HBITMAP* lphWatermark,
  1649. [out] HBITMAP* lphHeader,
  1650. [out] HPALETTE* lphPalette,
  1651. [out] BOOL* bStretch);
  1652. };
  1653. [
  1654. object,
  1655. uuid(9757abb8-1b32-11d1-a7ce-00c04fd8d565),
  1656. helpstring("IHeaderCtrl2 Interface, adds filter support"),
  1657. pointer_default(unique)
  1658. ]
  1659. interface IHeaderCtrl2 : IHeaderCtrl
  1660. {
  1661. [helpstring("Sets the time out for filter change notification")]
  1662. HRESULT SetChangeTimeOut([in] unsigned long uTimeout);
  1663. [helpstring("Set filter data")]
  1664. HRESULT SetColumnFilter([in] UINT nColumn, [in] DWORD dwType, [in] MMC_FILTERDATA* pFilterData);
  1665. [helpstring("Get filter data")]
  1666. HRESULT GetColumnFilter([in] UINT nColumn, [in,out] LPDWORD pdwType, [in, out] MMC_FILTERDATA* pFilterData);
  1667. };
  1668. [
  1669. object,
  1670. uuid(4861A010-20F9-11d2-A510-00C04FB6DD2C),
  1671. helpstring("ISnapinHelp2 Interface, adds linked topics support"),
  1672. pointer_default(unique)
  1673. ]
  1674. interface ISnapinHelp2 : ISnapinHelp
  1675. {
  1676. [helpstring("Get additional topic files to merge into help collection")]
  1677. HRESULT GetLinkedTopics([out] LPOLESTR* lpCompiledHelpFiles);
  1678. };
  1679. ///////////////////////////////////////////////////////////////////////////////
  1680. ////
  1681. //// Task Pad
  1682. typedef [v1_enum] enum _MMC_TASK_DISPLAY_TYPE
  1683. {
  1684. MMC_TASK_DISPLAY_UNINITIALIZED = 0,
  1685. MMC_TASK_DISPLAY_TYPE_SYMBOL, // fontname, EOT, symbols
  1686. MMC_TASK_DISPLAY_TYPE_VANILLA_GIF, // (GIF) index 0 is transparent
  1687. MMC_TASK_DISPLAY_TYPE_CHOCOLATE_GIF, // (GIF) index 1 is transparent
  1688. MMC_TASK_DISPLAY_TYPE_BITMAP // non-transparent raster
  1689. } MMC_TASK_DISPLAY_TYPE;
  1690. typedef struct _MMC_TASK_DISPLAY_SYMBOL
  1691. {
  1692. [string] LPOLESTR szFontFamilyName; // name of font family
  1693. [string] LPOLESTR szURLtoEOT; // "res://"-type URL to EOT file
  1694. [string] LPOLESTR szSymbolString; // 1 or more symbol characters
  1695. } MMC_TASK_DISPLAY_SYMBOL;
  1696. typedef struct _MMC_TASK_DISPLAY_BITMAP
  1697. {
  1698. [string] LPOLESTR szMouseOverBitmap; // Note: URLs must be fully-qualified
  1699. [string] LPOLESTR szMouseOffBitmap; // ("res://..." type) URLs
  1700. } MMC_TASK_DISPLAY_BITMAP;
  1701. typedef struct _MMC_TASK_DISPLAY_OBJECT
  1702. {
  1703. MMC_TASK_DISPLAY_TYPE eDisplayType;
  1704. [switch_type(MMC_TASK_DISPLAY_TYPE), switch_is((MMC_TASK_DISPLAY_TYPE)eDisplayType)]
  1705. union {
  1706. [case(MMC_TASK_DISPLAY_TYPE_BITMAP,MMC_TASK_DISPLAY_TYPE_VANILLA_GIF,MMC_TASK_DISPLAY_TYPE_CHOCOLATE_GIF)]
  1707. MMC_TASK_DISPLAY_BITMAP uBitmap;
  1708. [case(MMC_TASK_DISPLAY_TYPE_SYMBOL)]
  1709. MMC_TASK_DISPLAY_SYMBOL uSymbol;
  1710. [default];
  1711. };
  1712. } MMC_TASK_DISPLAY_OBJECT;
  1713. typedef [v1_enum] enum _MMC_ACTION_TYPE
  1714. {
  1715. MMC_ACTION_UNINITIALIZED = -1,
  1716. MMC_ACTION_ID,
  1717. MMC_ACTION_LINK,
  1718. MMC_ACTION_SCRIPT,
  1719. } MMC_ACTION_TYPE;
  1720. typedef struct _MMC_TASK
  1721. {
  1722. MMC_TASK_DISPLAY_OBJECT sDisplayObject;
  1723. [string] LPOLESTR szText;
  1724. [string] LPOLESTR szHelpString;
  1725. MMC_ACTION_TYPE eActionType; // from enum above
  1726. [switch_type(MMC_ACTION_TYPE), switch_is(eActionType)]
  1727. union
  1728. {
  1729. [case(MMC_ACTION_ID)]
  1730. long nCommandID; // command id (unique number)
  1731. [case(MMC_ACTION_LINK)]
  1732. [string] LPOLESTR szActionURL; // either link or scriptlet
  1733. [case(MMC_ACTION_SCRIPT)]
  1734. [string] LPOLESTR szScript; // raw script code
  1735. };
  1736. } MMC_TASK;
  1737. typedef struct _MMC_LISTPAD_INFO
  1738. {
  1739. [string] LPOLESTR szTitle; // title for ListView in TaskPad
  1740. [string] LPOLESTR szButtonText; // text for ListView in TaskPad
  1741. long nCommandID; // command id (unique number)
  1742. } MMC_LISTPAD_INFO;
  1743. typedef DWORD MMC_STRING_ID;
  1744. [
  1745. object,
  1746. uuid(338698b1-5a02-11d1-9fec-00600832db4a),
  1747. helpstring("Implemented by the snapins that want to add tasks"),
  1748. pointer_default(unique)
  1749. ]
  1750. interface IEnumTASK : IUnknown
  1751. {
  1752. HRESULT Next(
  1753. [in] ULONG celt,
  1754. [in, out, size_is(celt)] MMC_TASK *rgelt,
  1755. [out] ULONG *pceltFetched);
  1756. HRESULT Skip([in] ULONG celt);
  1757. HRESULT Reset();
  1758. HRESULT Clone([out] IEnumTASK **ppenum);
  1759. // Skip and Clone are not called
  1760. // Next will be called 1 at a time (i.e. celt will always be 1)
  1761. // Reset will be called
  1762. };
  1763. [
  1764. object,
  1765. uuid(8dee6511-554d-11d1-9fea-00600832db4a),
  1766. helpstring("Interface to be supported by those snapins that support taskpads"),
  1767. pointer_default(unique)
  1768. ]
  1769. interface IExtendTaskPad : IUnknown
  1770. {
  1771. // called from script via CIC
  1772. [helpstring("Notify.")]
  1773. HRESULT TaskNotify([in] IDataObject* pdo, [in] VARIANT* arg, [in] VARIANT* param);
  1774. [helpstring("Tasks to be inserted in the task pad.")]
  1775. HRESULT EnumTasks([in] IDataObject * pdo, [in,string] LPOLESTR szTaskGroup,
  1776. [out] IEnumTASK** ppEnumTASK);
  1777. // support for default taskpad
  1778. [helpstring("Title for the default task pad.")]
  1779. HRESULT GetTitle([in,string] LPOLESTR pszGroup, [out,string] LPOLESTR * pszTitle);
  1780. [helpstring("Descriptive Text for the default task pad.")]
  1781. HRESULT GetDescriptiveText([in,string] LPOLESTR pszGroup, [out,string] LPOLESTR * pszDescriptiveText);
  1782. [helpstring("Background for the default task pad.")]
  1783. HRESULT GetBackground([in,string] LPOLESTR pszGroup, [out] MMC_TASK_DISPLAY_OBJECT * pTDO);
  1784. // [helpstring("Branding for the default task pad.")]
  1785. // HRESULT GetBranding([in,string] LPOLESTR pszGroup, [out] MMC_TASK_DISPLAY_OBJECT * pTDO);
  1786. [helpstring("Get ListPad Info.")]
  1787. HRESULT GetListPadInfo ([in,string] LPOLESTR pszGroup, [out] MMC_LISTPAD_INFO * lpListPadInfo);
  1788. };
  1789. [
  1790. object,
  1791. uuid(103D842A-AA63-11D1-A7E1-00C04FD8D565),
  1792. helpstring("IConsole2 Interface"),
  1793. pointer_default(unique)
  1794. ]
  1795. interface IConsole2 : IConsole
  1796. {
  1797. [helpstring("Allows the snap-in to expand/collapse a scope item in the corresponding view. Should be called only by the IConsole associated with a IComponent.")]
  1798. HRESULT Expand([in] HSCOPEITEM hItem, [in] BOOL bExpand);
  1799. [helpstring("Determines if the user prefers taskpad views by default.")]
  1800. HRESULT IsTaskpadViewPreferred();
  1801. [helpstring("Allows the snap-in to change the text on the status bar.")]
  1802. HRESULT SetStatusText ([in, string] LPOLESTR pszStatusText);
  1803. };
  1804. [
  1805. object,
  1806. uuid(cc593830-b926-11d1-8063-0000f875a9ce),
  1807. helpstring("IDisplayHelp Interface"),
  1808. pointer_default(unique)
  1809. ]
  1810. interface IDisplayHelp : IUnknown
  1811. {
  1812. [helpstring("Allows the snap-in to display a help topic.")]
  1813. HRESULT ShowTopic([in] LPOLESTR pszHelpTopic);
  1814. };
  1815. [
  1816. object,
  1817. uuid(72782D7A-A4A0-11d1-AF0F-00C04FB6DD2C),
  1818. helpstring("Interface for specifying required snap-in extensions"),
  1819. pointer_default(unique)
  1820. ]
  1821. interface IRequiredExtensions : IUnknown
  1822. {
  1823. [helpstring("Enable all extensions")]
  1824. HRESULT EnableAllExtensions();
  1825. [helpstring("Get first required extension")]
  1826. HRESULT GetFirstExtension([out] LPCLSID pExtCLSID);
  1827. [helpstring("Get next required extension")]
  1828. HRESULT GetNextExtension([out] LPCLSID pExtCLSID);
  1829. };
  1830. [
  1831. object,
  1832. uuid(DE40B7A4-0F65-11d2-8E25-00C04F8ECD78),
  1833. helpstring("Interface for accessing strings in a console file"),
  1834. pointer_default(unique)
  1835. ]
  1836. interface IStringTable : IUnknown
  1837. {
  1838. [helpstring("Add a string to the snap-in's string table")]
  1839. HRESULT AddString (
  1840. [in] LPCOLESTR pszAdd, // string to add to the string table
  1841. [out] MMC_STRING_ID* pStringID // ID of added string
  1842. );
  1843. [helpstring("Retrieves a string from the snap-in's string table")]
  1844. HRESULT GetString (
  1845. [in] MMC_STRING_ID StringID, // ID of string
  1846. [in] ULONG cchBuffer, // number of characters in lpBuffer
  1847. [out, size_is(cchBuffer)]
  1848. LPOLESTR lpBuffer, // string corresponding to wStringID
  1849. [out] ULONG* pcchOut // number of characters written to lpBuffer
  1850. );
  1851. [helpstring("Retrieves the length of a string in the snap-in's string table")]
  1852. HRESULT GetStringLength (
  1853. [in] MMC_STRING_ID StringID, // ID of string
  1854. [out] ULONG* pcchString // number of characters in string, not including terminator
  1855. );
  1856. [helpstring("Delete a string from the snap-in's string table")]
  1857. HRESULT DeleteString (
  1858. [in] MMC_STRING_ID StringID // ID of string to delete
  1859. );
  1860. [helpstring("Delete all strings from the snap-in's string table")]
  1861. HRESULT DeleteAllStrings ();
  1862. [helpstring("Find a string in the snap-in's string table")]
  1863. HRESULT FindString (
  1864. [in] LPCOLESTR pszFind, // string to find in the string table
  1865. [out] MMC_STRING_ID* pStringID // ID of string, if found
  1866. );
  1867. [helpstring("Returns an enumerator into a snap-in's string table")]
  1868. HRESULT Enumerate (
  1869. [out] IEnumString** ppEnum // string enumerator
  1870. );
  1871. };
  1872. cpp_quote("#endif // MMC_VER >= 0x0110")
  1873. cpp_quote("#if (MMC_VER >= 0x0120)")
  1874. ///////////////////////////////////////////////////////////////////////////////
  1875. ///////////////////////////////////////////////////////////////////////////////
  1876. ///////////////////////////////////////////////////////////////////////////////
  1877. ///////////////////////////////////////////////////////////////////////////////
  1878. ////
  1879. //// MMC 1.2 changes
  1880. ////
  1881. // Column Flags
  1882. const DWORD HDI_HIDDEN = 0x0001; // Column is hidden.
  1883. // Per Column data.
  1884. typedef struct _MMC_COLUMN_DATA
  1885. {
  1886. int nColIndex; // Column index
  1887. DWORD dwFlags; // Column flags
  1888. int nWidth; // Column width
  1889. ULONG_PTR ulReserved; // For future use
  1890. } MMC_COLUMN_DATA;
  1891. // Column-Set data.
  1892. typedef struct _MMC_COLUMN_SET_DATA
  1893. {
  1894. int cbSize; // Size of this struct.
  1895. int nNumCols; // Number of columns
  1896. MMC_COLUMN_DATA* pColData; // Array of column data
  1897. } MMC_COLUMN_SET_DATA;
  1898. // Sort data.
  1899. typedef struct _MMC_SORT_DATA
  1900. {
  1901. int nColIndex; // Column index
  1902. DWORD dwSortOptions; // Column sort options
  1903. ULONG_PTR ulReserved; // For future use
  1904. } MMC_SORT_DATA;
  1905. // Column sort data.
  1906. typedef struct _MMC_SORT_SET_DATA
  1907. {
  1908. int cbSize; // Size of this struct.
  1909. int nNumItems; // Number of items in the array below.
  1910. MMC_SORT_DATA* pSortData; // Array of column data
  1911. } MMC_SORT_SET_DATA;
  1912. [
  1913. object,
  1914. uuid(547C1354-024D-11d3-A707-00C04F8EF4CB),
  1915. helpstring("Interface for accessing persisted view data."),
  1916. pointer_default(unique)
  1917. ]
  1918. interface IColumnData : IUnknown
  1919. {
  1920. [helpstring("Change the persisted column data for a ColumnSet ID")]
  1921. HRESULT SetColumnConfigData(
  1922. [in] SColumnSetID* pColID,
  1923. [in] MMC_COLUMN_SET_DATA* pColSetData
  1924. );
  1925. [local, helpstring("Retrieve the persisted column data for a ColumnSet ID")]
  1926. HRESULT GetColumnConfigData(
  1927. [in] SColumnSetID* pColID,
  1928. [out] MMC_COLUMN_SET_DATA** ppColSetData
  1929. );
  1930. HRESULT RemGetColumnConfigData(
  1931. [in] SColumnSetID* pColID,
  1932. [out] MMC_COLUMN_SET_DATA** ppColSetData
  1933. );
  1934. [helpstring("Change the persisted column sort data for a ColumnSet ID")]
  1935. HRESULT SetColumnSortData(
  1936. [in] SColumnSetID* pColID,
  1937. [in] MMC_SORT_SET_DATA* pColSortData
  1938. );
  1939. [local, helpstring("Retrieve the persisted column sort data for a ColumnSet ID")]
  1940. HRESULT GetColumnSortData(
  1941. [in] SColumnSetID* pColID,
  1942. [out] MMC_SORT_SET_DATA** ppColSortData
  1943. );
  1944. HRESULT RemGetColumnSortData(
  1945. [in] SColumnSetID* pColID,
  1946. [out] MMC_SORT_SET_DATA** ppColSortData
  1947. );
  1948. };
  1949. [
  1950. object,
  1951. uuid(80F94174-FCCC-11d2-B991-00C04F8ECD78),
  1952. helpstring("Interface for displaying an informational message in the result pane"),
  1953. pointer_default(unique)
  1954. ]
  1955. interface IMessageView : IUnknown
  1956. {
  1957. [helpstring("Change the title for the result pane message")]
  1958. HRESULT SetTitleText(
  1959. [in] LPCOLESTR pszTitleText
  1960. );
  1961. [helpstring("Change the text for the result pane message")]
  1962. HRESULT SetBodyText(
  1963. [in] LPCOLESTR pszBodyText
  1964. );
  1965. typedef enum tagIconIdentifier
  1966. {
  1967. Icon_None = 0,
  1968. Icon_Error = 32513,
  1969. Icon_Question = 32514,
  1970. Icon_Warning = 32515,
  1971. Icon_Information = 32516,
  1972. Icon_First = Icon_Error,
  1973. Icon_Last = Icon_Information,
  1974. } IconIdentifier;
  1975. [helpstring("Change the icon for the result pane message")]
  1976. HRESULT SetIcon(
  1977. [in] IconIdentifier id
  1978. );
  1979. [helpstring("Clears the title, text, and icon of the result pane message")]
  1980. HRESULT Clear();
  1981. };
  1982. typedef struct _RDCITEMHDR
  1983. {
  1984. DWORD dwFlags; // scope item or result item?
  1985. MMC_COOKIE cookie;
  1986. LPARAM lpReserved;
  1987. } RDITEMHDR;
  1988. const DWORD RDCI_ScopeItem = 0x80000000;
  1989. typedef struct _RDCOMPARE
  1990. {
  1991. DWORD cbSize; // size of this structure
  1992. DWORD dwFlags; // reserved, always 0
  1993. int nColumn; // column we're sorting on, maps to in value of
  1994. // IResultDataCompare::Compare's pnResult param
  1995. LPARAM lUserParam; // IResultDataCompare::Compare's lUserParam param
  1996. RDITEMHDR* prdch1; // first item to compare
  1997. RDITEMHDR* prdch2; // second item to compare
  1998. } RDCOMPARE;
  1999. [
  2000. object,
  2001. uuid(96933476-0251-11d3-AEB0-00C04F8ECD78),
  2002. helpstring("Compare interface for sorting items in the result pane"),
  2003. pointer_default(unique)
  2004. ]
  2005. interface IResultDataCompareEx : IUnknown
  2006. {
  2007. [helpstring("Compare items in the result pane")]
  2008. HRESULT Compare([in] RDCOMPARE* prdc, [out] int* pnResult);
  2009. }
  2010. cpp_quote("#endif // MMC_VER >= 0x0120")