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.

1334 lines
49 KiB

  1. import "oaidl.idl";
  2. ///////////////////////////////////////////////////////////////////////////////
  3. /// Interfaces implement by the Common Console's Node Manager
  4. interface IConsole;
  5. interface IHeaderCtrl;
  6. interface IToolbar;
  7. interface IImageList;
  8. interface IResultData;
  9. interface IConsoleNameSpace;
  10. interface IPropertySheetProvider;
  11. interface IPropertySheetCallback;
  12. interface IContextMenuProvider;
  13. interface IContextMenuCallback;
  14. interface IControlbar;
  15. interface IConsoleVerb;
  16. interface IMenuButton;
  17. interface IQuickFilter;
  18. ///////////////////////////////////////////////////////////////////////////////
  19. /// Interfaces implement by the Snap-in server
  20. interface IComponent;
  21. interface IComponentData;
  22. interface IExtendPropertySheet;
  23. interface IExtendContextMenu;
  24. interface IExtendControlbar;
  25. interface IResultDataCompare;
  26. interface ISnapinAbout;
  27. interface IResultOwnerData;
  28. ///////////////////////////////////////////////////////////////////////////////
  29. /// Type definitions
  30. typedef IConsole* LPCONSOLE;
  31. typedef IHeaderCtrl* LPHEADERCTRL;
  32. typedef IToolbar* LPTOOLBAR;
  33. typedef IImageList* LPIMAGELIST;
  34. typedef IResultData* LPRESULTDATA;
  35. typedef IConsoleNameSpace* LPCONSOLENAMESPACE;
  36. typedef IPropertySheetProvider* LPPROPERTYSHEETPROVIDER;
  37. typedef IPropertySheetCallback* LPPROPERTYSHEETCALLBACK;
  38. typedef IContextMenuProvider* LPCONTEXTMENUPROVIDER;
  39. typedef IContextMenuCallback* LPCONTEXTMENUCALLBACK;
  40. typedef IControlbar* LPCONTROLBAR;
  41. typedef IConsoleVerb* LPCONSOLEVERB;
  42. typedef IMenuButton* LPMENUBUTTON;
  43. typedef IComponent* LPCOMPONENT;
  44. typedef IComponentData* LPCOMPONENTDATA;
  45. typedef IExtendPropertySheet* LPEXTENDPROPERTYSHEET;
  46. typedef IExtendContextMenu* LPEXTENDCONTEXTMENU;
  47. typedef IExtendControlbar* LPEXTENDCONTROLBAR;
  48. typedef IResultDataCompare* LPRESULTDATACOMPARE;
  49. typedef ISnapinAbout* LPSNAPABOUT;
  50. typedef IResultOwnerData* LPRESULTOWNERDATA;
  51. ///////////////////////////////////////////////////////////////////////////////
  52. // Published Common Console ListView constants
  53. #define LVS_ICON 0x0000
  54. #define LVS_REPORT 0x0001
  55. #define LVS_SMALLICON 0x0002
  56. #define LVS_LIST 0x0003
  57. #define LVSICF_NOINVALIDATEALL 0x00000001
  58. #define LVSICF_NOSCROLL 0x00000002
  59. const long MMCLV_AUTO = -1;
  60. const long MMCLV_NOPARAM = -2;
  61. const long MMCLV_NOICON = -1;
  62. const long MMCLV_VIEWSTYLE_ICON = LVS_ICON;
  63. const long MMCLV_VIEWSTYLE_SMALLICON = LVS_SMALLICON;
  64. const long MMCLV_VIEWSTYLE_LIST = LVS_LIST;
  65. const long MMCLV_VIEWSTYLE_REPORT = LVS_REPORT;
  66. const void* MMCLV_NOPTR = 0x0;
  67. const long MMCLV_UPDATE_NOINVALIDATEALL = LVSICF_NOINVALIDATEALL;
  68. const long MMCLV_UPDATE_NOSCROLL = LVSICF_NOSCROLL;
  69. static unsigned short* MMC_CALLBACK = ((unsigned short *)(-1));
  70. ///////////////////////////////////////////////////////////////////////////////
  71. // ResultData and Scope Data item structures.
  72. typedef long HSCOPEITEM;
  73. typedef long COMPONENTID;
  74. typedef long HRESULTITEM;
  75. const DWORD RDI_STR = 0x0002;
  76. const DWORD RDI_IMAGE = 0x0004;
  77. const DWORD RDI_STATE = 0x0008;
  78. const DWORD RDI_PARAM = 0x0010;
  79. const DWORD RDI_INDEX = 0x0020;
  80. const DWORD RDI_INDENT = 0x0040;
  81. typedef enum _MMC_RESULT_VIEW_STYLE
  82. {
  83. MMC_SINGLESEL = 0x0001,
  84. MMC_SHOWSELALWAYS = 0x0002,
  85. MMC_NOSORTHEADER = 0x0004,
  86. } MMC_RESULT_VIEW_STYLE;
  87. // List view with single select
  88. const long MMC_VIEW_OPTIONS_NONE = 0x0000;
  89. // NO List view. Only custom views.
  90. const long MMC_VIEW_OPTIONS_NOLISTVIEWS = 0x0001;
  91. // List view with multi select.
  92. const long MMC_VIEW_OPTIONS_MULTISELECT = 0x0002;
  93. //List view with user owned data
  94. const long MMC_VIEW_OPTIONS_OWNERDATALIST = 0x0004;
  95. //List view with filter header
  96. const long MMC_VIEW_OPTIONS_FILTERED = 0x0008;
  97. // Create new control (don't use cached)
  98. const long MMC_VIEW_OPTIONS_CREATENEW = 0x0010;
  99. // Property sheet options
  100. const DWORD MMC_PSO_NOAPPLYNOW = 0x00000001;
  101. const DWORD MMC_PSO_HASHELP = 0x00000002;
  102. const DWORD MMC_PSO_NEWWIZARDTYPE = 0x00000004;
  103. // Type of controls that can be attached to the IControlbar
  104. typedef enum _MMC_CONTROL_TYPE
  105. {
  106. TOOLBAR,
  107. MENUBUTTON,
  108. COMBOBOXBAR
  109. } MMC_CONTROL_TYPE;
  110. ///////////////////////////////////////////////////////////////////////////////
  111. // Console commands - These should be reviewed
  112. //
  113. typedef enum _MMC_CONSOLE_VERB
  114. {
  115. MMC_VERB_NONE = 0x0000,
  116. MMC_VERB_OPEN = 0x8000,
  117. MMC_VERB_COPY = 0x8001,
  118. MMC_VERB_PASTE = 0x8002,
  119. MMC_VERB_DELETE = 0x8003,
  120. MMC_VERB_PROPERTIES = 0x8004,
  121. MMC_VERB_RENAME = 0x8005,
  122. MMC_VERB_REFRESH = 0x8006,
  123. MMC_VERB_PRINT = 0x8007,
  124. } MMC_CONSOLE_VERB;
  125. // Structure to create buttons on the toolbar
  126. typedef struct _MMCButton
  127. {
  128. int nBitmap; // Offset into the bitmap list
  129. int idCommand; // Command ID return when the button is clicked
  130. BYTE fsState; // TBSTYLE_ENABLED ..etc
  131. BYTE fsType; // TBSTYLE_BUTTON || TBSTYLE_SEP
  132. LPOLESTR lpButtonText; // Text value for the Button
  133. LPOLESTR lpTooltipText; // Text value for the tooltip
  134. } MMCBUTTON;
  135. typedef MMCBUTTON* LPMMCBUTTON;
  136. typedef enum _MMC_BUTTON_STATE
  137. {
  138. ENABLED = 0x01,
  139. CHECKED = 0x02,
  140. HIDDEN = 0x04,
  141. INDETERMINATE = 0x08,
  142. BUTTONPRESSED = 0x10,
  143. } MMC_BUTTON_STATE;
  144. typedef struct _RESULTDATAITEM
  145. {
  146. DWORD mask;
  147. BOOL bScopeItem;
  148. HRESULTITEM itemID;
  149. int nIndex;
  150. int nCol;
  151. LPOLESTR str;
  152. int nImage;
  153. UINT nState;
  154. LPARAM lParam;
  155. int iIndent;
  156. } RESULTDATAITEM;
  157. typedef RESULTDATAITEM* LPRESULTDATAITEM;
  158. // Find result item options
  159. const DWORD RFI_PARTIAL = 0x0001;
  160. const DWORD RFI_WRAP = 0x0002;
  161. typedef struct _RESULTFINDINFO
  162. {
  163. LPOLESTR psz;
  164. int nStart;
  165. DWORD dwOptions;
  166. }
  167. RESULTFINDINFO;
  168. typedef RESULTFINDINFO* LPRESULTFINDINFO;
  169. //
  170. // Sort Result Items options
  171. //
  172. const DWORD RSI_DESCENDING = 0x0001;
  173. const DWORD SDI_STR = 0x00002;
  174. const DWORD SDI_IMAGE = 0x00004;
  175. const DWORD SDI_OPENIMAGE = 0x00008;
  176. const DWORD SDI_STATE = 0x00010;
  177. const DWORD SDI_PARAM = 0x00020;
  178. const DWORD SDI_CHILDREN = 0x00040;
  179. // The top 4 bit of the mask determines the relative position of this item,
  180. // relative to the SCOPEDATAITEM::relativeID. By default it is the parent.
  181. // For SDI_PARENT, SCOPEDATAITEM::relativeID is the HSCOPEITEM of the parent.
  182. // As you can see by the SDI_PARENT value it is a no-op. Since by default
  183. // SCOPEDATAITEM::relativeID is treated as the parents ID.
  184. const DWORD SDI_PARENT = 0x00000000;
  185. // For SDI_PREVIOUS, SCOPEDATAITEM::relativeID is the HSCOPEITEM of the previous sibling
  186. const DWORD SDI_PREVIOUS = 0x10000000;
  187. // For SDI_NEXT, SCOPEDATAITEM::relativeID is the HSCOPEITEM of the next sibling.
  188. const DWORD SDI_NEXT = 0x20000000;
  189. // For SDI_PARENT, bit 27 determines whether the item is to be inserted as the
  190. // first child. By default this item will inserted as the last child.
  191. const DWORD SDI_FIRST = 0x08000000;
  192. typedef struct _SCOPEDATAITEM
  193. {
  194. DWORD mask;
  195. LPOLESTR displayname;
  196. int nImage;
  197. int nOpenImage;
  198. UINT nState;
  199. int cChildren;
  200. LPARAM lParam;
  201. HSCOPEITEM relativeID;
  202. HSCOPEITEM ID;
  203. } SCOPEDATAITEM;
  204. typedef SCOPEDATAITEM* LPSCOPEDATAITEM;
  205. typedef enum _MMC_SCOPE_ITEM_STATE
  206. {
  207. MMC_SCOPE_ITEM_STATE_NORMAL = 0x0001, // Not bold. To set or get.
  208. MMC_SCOPE_ITEM_STATE_BOLD = 0x0002, // To set or get.
  209. MMC_SCOPE_ITEM_STATE_EXPANDEDONCE = 0x0003, // Only to get.
  210. } MMC_SCOPE_ITEM_STATE;
  211. typedef struct _CONTEXTMENUITEM
  212. {
  213. LPWSTR strName;
  214. LPWSTR strStatusBarText;
  215. LONG lCommandID;
  216. LONG lInsertionPointID;
  217. LONG fFlags;
  218. LONG fSpecialFlags;
  219. } CONTEXTMENUITEM;
  220. typedef CONTEXTMENUITEM* LPCONTEXTMENUITEM;
  221. //
  222. // Console defined menu command IDs
  223. // The console reserves the negative numbers for predefined menu command
  224. // IDs which it sends to a snapin's IExtendContextMenu::Command method
  225. //
  226. typedef enum _MMC_MENU_COMMAND_IDS
  227. {
  228. MMCC_STANDARD_VIEW_SELECT = -1
  229. } MMC_MENU_COMMAND_IDS;
  230. //IMenuButton data structure
  231. typedef struct _MENUBUTTONDATA
  232. {
  233. int idCommand;
  234. int x;
  235. int y;
  236. } MENUBUTTONDATA;
  237. typedef MENUBUTTONDATA* LPMENUBUTTONDATA;
  238. // For multi select the cookie passed to the snapins will be
  239. // MMC_MULTI_SELECT_COOKIE. The data object that will be returned
  240. // should provide the CCF_OBJECT_TYPES_IN_MULTI_SELECT clipboard
  241. // format.
  242. //
  243. const long MMC_MULTI_SELECT_COOKIE = -2;
  244. /*
  245. NOTIFICATIONS
  246. =============
  247. Notify(dataobject, event, arg, param);
  248. For all the MMC_NOTIFY_TYPE events,
  249. dataobject
  250. For single select:
  251. dataobject for cookie, can be NULL when dataobject is not required
  252. For multi select:
  253. Console supplied data object. Supports only one format (CCF_MULTI_SELECT_SNAPIN),
  254. which can be used to accquire an IUnknow to the primary snapin.
  255. event = one of the MMCN_NOTIFY_TYPEs
  256. arg and param depend on type, see below.
  257. MMCN_ACTIVATE
  258. Is sent when a window is being activated or deactivated.
  259. arg = TRUE if window is activated, false otherwise.
  260. param = Not used.
  261. MMCN_ADD_IMAGES
  262. Sent to IComponent to add images for the result pane. The primary snapin
  263. should add images for both folders and leaf items. Extension snapins
  264. should add only folder images.
  265. arg = ptr to result panes IImageList.
  266. param = HSCOPEITEM of selected/deselected item
  267. MMCN_BTN_CLICK
  268. This message is sent when a user clicks on a button.
  269. arg = When sent to ExtendControlbar it is the data object of currently selected,
  270. when sent to IComponent/IComponentData it is 0.
  271. param = CmdID of the button equal to a value of the MMC_COMMANDS enum type.
  272. MMCN_EXPAND
  273. arg = TRUE => expand, FALSE => contract
  274. param = parents HSCOPEITEM.
  275. MMCN_MINIMIZED
  276. Is sent when a window is being minimized or maximized.
  277. arg = TRUE if minimized, false otherwise.
  278. MMCN_PROPERTY_CHANGE
  279. lpDataObject = NULL
  280. lParam = user object
  281. MMCN_REMOVE_CHILDREN
  282. Informs the snapin to delete all the cookies it has added below.
  283. arg = HSCOPEITEM of the node whose children needs to be deleted.
  284. param = unused.
  285. return = unused.
  286. MMCN_RENAME
  287. This gets called the first time to query for rename and a
  288. second time to do the rename. For the query S_OK or S_FALSE for the
  289. return type. After the rename, we will send the new name with a LPOLESTR.
  290. arg = 0 for query, 1 for rename action
  291. param = LPOLESTR for containing new name
  292. return = S_OK to allow rename and S_FALSE to disallow rename.
  293. MMCN_SELECT
  294. If sent to IComponent::Notify:
  295. arg:
  296. BOOL bScope = (BOOL) LOWORD(arg);
  297. BOOL bSelect = (BOOL) HIWORD(arg);
  298. bScope: TRUE if an item the scope pane is selected,
  299. FALSE if an item in the result pane is selected.
  300. bSelect: TRUE if the item is selected,
  301. FALSE if it is de-selected.
  302. param:
  303. Ignored.
  304. If sent to IExtendControlbar::ControlbarNotify:
  305. arg:
  306. BOOL bScope = (BOOL) LOWORD(arg);
  307. BOOL bSelect = (BOOL) HIWORD(arg);
  308. bScope: TRUE if an item the scope pane is selected,
  309. FALSE if an item in the result pane is selected.
  310. bSelect: TRUE if the item is selected,
  311. FALSE if it is de-selected.
  312. param:
  313. LPDATAOBJECT pDataobject = (LPDATAOBJECT)param;
  314. pDataobject data object of item getting selected/de-selected.
  315. MMCN_SHOW
  316. arg = <>0 if selecting, 0 if deselecting
  317. param = HSCOPEITEM of selected/deselected item
  318. MMCN_VIEW_CHANGE
  319. This message is sent to update all views of a change.
  320. arg = TRUE if Scope Item, FALSE if Result Item
  321. param = ptr to DataObject selected
  322. MMCN_MENU_BTNCLICK
  323. This message is sent when a user clicks on a button.
  324. arg = Data object of currently selected.
  325. param = Structure (LPMENUBUTTONDATA).
  326. MMCN_SNAPINHELP
  327. This message is sent when the user requests help about the snapin.
  328. dataObject = NULL
  329. arg = 0
  330. param = 0
  331. MMCN_CONTEXTHELP
  332. This message is sent when the user requests help about a selected item
  333. arg = 0
  334. param = 0
  335. MMCN_DESELECT_ALL
  336. This message is sent when all items of an owner-data result pane
  337. are deselected.
  338. dataObject = NULL
  339. arg = 0
  340. param = 0
  341. MMCN_COLUMN_CLICK
  342. This message is sent when the user clicks on a result listview column header.
  343. dataObject = NULL
  344. arg = Column number
  345. param = Sort option flags (RSI_xxx)
  346. MMCN_DELETE:
  347. Sent to inform the snapin that the item needs to be deleted. As a result of
  348. the user hitting the 'Delete' key or delete button.
  349. dataobject: dataobject of the selected item(s) provided by the snap-in.
  350. arg, param: unused.
  351. MMCN_CUTORMOVE:
  352. dataobject: NULL.
  353. arg: pointer to a dataobject. See multi-selection below.
  354. param: unused.
  355. MMCN_QUERY_PASTE:
  356. dataobject: dataobject of the selected item provided by the snap-in.
  357. arg: dataobject of the item(s) provided by the source snap-in that needs to be pasted.
  358. param: unused.
  359. MMCN_PASTE:
  360. dataobject & arg: are same as for MMCN_QUERY_PASTE.
  361. param:
  362. NULL for move (as opposed to cut).
  363. For single item paste:
  364. BOOL* pPasted = (BOOL*)param;
  365. Set this to TRUE here if the item was successfully pasted.
  366. For multi-item paste:
  367. LPDATAOBJECT* ppDataObj = (LPDATAOBJECT*)param;
  368. Use this to return a pointer to a dataobject consisting of the
  369. items successfully pasted. (see MMCN_CUTORMOVE below).
  370. */
  371. typedef enum _MMC_NOTIFY_TYPE
  372. {
  373. MMCN_ACTIVATE = 0x8001,
  374. MMCN_ADD_IMAGES = 0x8002,
  375. MMCN_BTN_CLICK = 0x8003,
  376. MMCN_CLICK = 0x8004,
  377. MMCN_COLUMN_CLICK = 0x8005,
  378. MMCN_CONTEXTMENU = 0x8006,
  379. MMCN_CUTORMOVE = 0x8007,
  380. MMCN_DBLCLICK = 0x8008,
  381. MMCN_DELETE = 0x8009,
  382. MMCN_DESELECT_ALL = 0x800A,
  383. MMCN_EXPAND = 0x800B,
  384. MMCN_HELP = 0x800C,
  385. MMCN_MENU_BTNCLICK = 0x800D,
  386. MMCN_MINIMIZED = 0x800E,
  387. MMCN_PASTE = 0x800F,
  388. MMCN_PROPERTY_CHANGE = 0x8010,
  389. MMCN_QUERY_PASTE = 0x8011,
  390. MMCN_REFRESH = 0x8012,
  391. MMCN_REMOVE_CHILDREN = 0x8013,
  392. MMCN_RENAME = 0x8014,
  393. MMCN_SELECT = 0x8015,
  394. MMCN_SHOW = 0x8016,
  395. MMCN_VIEW_CHANGE = 0x8017,
  396. MMCN_SNAPINHELP = 0x8018,
  397. MMCN_CONTEXTHELP = 0x8019,
  398. MMCN_INITOCX = 0x801A,
  399. } MMC_NOTIFY_TYPE;
  400. typedef enum _DATA_OBJECT_TYPES
  401. {
  402. CCT_SCOPE = 0x8000, // Data object while for scope pane context
  403. CCT_RESULT = 0x8001, // Data object while for result pane context
  404. CCT_SNAPIN_MANAGER = 0x8002, // Data object while for snap-in manager context
  405. CCT_UNINITIALIZED = 0xFFFF, // Data object has an invalid type
  406. } DATA_OBJECT_TYPES;
  407. //New window option(s)
  408. const unsigned long MMC_NW_OPTION_LONGTITLE = 0x0000;
  409. const unsigned long MMC_NW_OPTION_SHORTTITLE = 0x0001;
  410. ///////////////////////////////////////////////////////////////////////////////
  411. // Common Console clipboard formats
  412. //
  413. // Clipboard format for node type guid
  414. const wchar_t* CCF_NODETYPE = L"CCF_NODETYPE";
  415. // Clipboard format for string version of node type guid
  416. const wchar_t* CCF_SZNODETYPE = L"CCF_SZNODETYPE";
  417. // Clipboard format for name displayed in scope pane
  418. const wchar_t* CCF_DISPLAY_NAME = L"CCF_DISPLAY_NAME";
  419. // Clipboard format for the snapin's class id.
  420. const wchar_t* CCF_SNAPIN_CLASSID = L"CCF_SNAPIN_CLASSID";
  421. // This is the MMC supplied Multi-select data object.
  422. const wchar_t* CCF_MMC_MULTISELECT_DATAOBJECT = L"CCF_MMC_MULTISELECT_DATAOBJECT";
  423. // Clipboard format for the snapins multi selected dataobjects.
  424. // If there are N snapins whose objects are selected in the result
  425. // pane, these N dataobjects will be passed in a GloballAlloced
  426. // memory. The first DWORD contains the number of snapins, this will
  427. // be followed by N ptrs to the DataObjects.
  428. typedef struct _SMMCDataObjects
  429. {
  430. DWORD count;
  431. LPDATAOBJECT lpDataObject[1];
  432. } SMMCDataObjects;
  433. const wchar_t* CCF_MULTI_SELECT_SNAPINS = L"CCF_MULTI_SELECT_SNAPINS";
  434. // Clipboard format for the array of GUIDs which constitutes the object
  435. // types of all the currently selected result items put by the snapin.
  436. typedef struct _SMMCObjectTypes
  437. {
  438. DWORD count;
  439. GUID guid[1];
  440. } SMMCObjectTypes;
  441. const wchar_t* CCF_OBJECT_TYPES_IN_MULTI_SELECT = L"CCF_OBJECT_TYPES_IN_MULTI_SELECT";
  442. ///////////////////////////////////////////////////////////////////////////////
  443. // APIs exported in mmc.lib
  444. //
  445. cpp_quote("STDAPI MMCPropertyChangeNotify(long lNotifyHandle, long param);")
  446. cpp_quote("STDAPI MMCFreeNotifyHandle(long lNotifyHandle);")
  447. cpp_quote("STDAPI MMCPropPageCallback(void* vpsp);")
  448. cpp_quote("EXTERN_C const CLSID CLSID_NodeManager;")
  449. ///////////////////////////////////////////////////////////////////////////////
  450. // Special dataobjects
  451. //
  452. cpp_quote("#define DOBJ_NULL (LPDATAOBJECT)0 ")
  453. cpp_quote("#define DOBJ_CUSTOMOCX (LPDATAOBJECT)-1 ")
  454. cpp_quote("#define DOBJ_CUSTOMWEB (LPDATAOBJECT)-2 ")
  455. ///////////////////////////////////////////////////////////////////////////////
  456. // Macros
  457. //
  458. cpp_quote("#define IS_SPECIAL_DATAOBJECT(d) ((int)(d) >= -10 && (int)(d) <= 0)")
  459. cpp_quote("#define IS_SPECIAL_COOKIE(c) ((c) >= -10 && (c) <= -1)")
  460. ///////////////////////////////////////////////////////////////////////////////
  461. // Interfaces
  462. //
  463. [
  464. object,
  465. uuid(955AB28A-5218-11D0-A985-00C04FD8D565),
  466. helpstring("IComponentData Interface"),
  467. pointer_default(unique)
  468. ]
  469. interface IComponentData : IUnknown
  470. {
  471. [helpstring("Snap-in entry point. Can QI for IConsole & IConsoleNameSpace")]
  472. HRESULT Initialize([in] LPUNKNOWN pUnknown);
  473. [helpstring("Create a Componet for this ComponetData")]
  474. HRESULT CreateComponent([out] LPCOMPONENT* ppComponent);
  475. [helpstring("User actions")]
  476. HRESULT Notify([in] LPDATAOBJECT lpDataObject, [in] MMC_NOTIFY_TYPE event,
  477. [in] long arg, [in] long param);
  478. [helpstring("Release cookies associated with the children of a specific node")]
  479. HRESULT Destroy();
  480. [helpstring("Returns a data object which may be used to retrieve the context information for the specified cookie")]
  481. HRESULT QueryDataObject([in] long cookie, [in] DATA_OBJECT_TYPES type,
  482. [out] LPDATAOBJECT* ppDataObject);
  483. [helpstring("Get display info for the name space item")]
  484. HRESULT GetDisplayInfo([in,out] SCOPEDATAITEM* pScopeDataItem);
  485. [helpstring("The snap-in's compare function for two data objects")]
  486. HRESULT CompareObjects([in] LPDATAOBJECT lpDataObjectA, [in] LPDATAOBJECT lpDataObjectB);
  487. };
  488. [
  489. object,
  490. uuid(43136EB2-D36C-11CF-ADBC-00AA00A80033),
  491. helpstring("IComponent Interface"),
  492. pointer_default(unique)
  493. ]
  494. interface IComponent : IUnknown
  495. {
  496. [helpstring("Snap-in entry point")]
  497. HRESULT Initialize([in] LPCONSOLE lpConsole);
  498. [helpstring("User actions")]
  499. HRESULT Notify([in] LPDATAOBJECT lpDataObject, [in] MMC_NOTIFY_TYPE event,
  500. [in] long arg, [in] long param);
  501. [helpstring("Release cookies associated with the children of a specific node")]
  502. HRESULT Destroy([in] long cookie);
  503. [helpstring("Returns a data object which may be used to retrieve the context information for the specified cookie")]
  504. HRESULT QueryDataObject([in] long cookie, [in] DATA_OBJECT_TYPES type,
  505. [out] LPDATAOBJECT* ppDataObject);
  506. [helpstring("Returns the result view type for the specified cookie")]
  507. HRESULT GetResultViewType([in] long cookie, [out] LPOLESTR* ppViewType,
  508. [out] long* pViewOptions);
  509. [helpstring("Get display info for the result item")]
  510. HRESULT GetDisplayInfo([in,out] RESULTDATAITEM* pResultDataItem);
  511. [helpstring("The snap-in's compare function for two data objects")]
  512. HRESULT CompareObjects([in] LPDATAOBJECT lpDataObjectA, [in] LPDATAOBJECT lpDataObjectB);
  513. };
  514. [
  515. object,
  516. uuid(E8315A52-7A1A-11D0-A2D2-00C04FD909DD),
  517. helpstring("Compare interface for sorting result items"),
  518. pointer_default(unique)
  519. ]
  520. interface IResultDataCompare : IUnknown
  521. {
  522. [helpstring("Compare two cookies")]
  523. HRESULT Compare([in] long lUserParam,
  524. [in] long cookieA, [in] long cookieB, [in, out] int* pnResult);
  525. }
  526. [
  527. object,
  528. uuid(9CB396D8-EA83-11d0-AEF1-00C04FB6DD2C),
  529. helpstring("Interface for owner data result pane list"),
  530. pointer_default(unique)
  531. ]
  532. interface IResultOwnerData : IUnknown
  533. {
  534. [helpstring("Find result item that matches string")]
  535. HRESULT FindItem([in] LPRESULTFINDINFO pFindInfo, [out] int* pnFoundIndex);
  536. [helpstring("Hint to cache result item data")]
  537. HRESULT CacheHint ([in] int nStartIndex, [in] int nEndIndex);
  538. [helpstring("Sort result items")]
  539. HRESULT SortItems([in] int nColumn, [in] DWORD dwSortOptions, [in] long lUserParam);
  540. }
  541. [
  542. object,
  543. uuid(43136EB1-D36C-11CF-ADBC-00AA00A80033),
  544. helpstring("IConsole Interface"),
  545. pointer_default(unique)
  546. ]
  547. interface IConsole : IUnknown
  548. {
  549. [helpstring("Sets IConsoles header interface")]
  550. HRESULT SetHeader([in] LPHEADERCTRL pHeader);
  551. [helpstring("Sets IConsoles toolbar interface")]
  552. HRESULT SetToolbar([in] LPTOOLBAR pToolbar);
  553. [helpstring("Queries IConsoles user provided IUnknown")]
  554. HRESULT QueryResultView([out] LPUNKNOWN* pUnknown);
  555. [helpstring("Queries the IConsole provided image list for the scope pane.")]
  556. HRESULT QueryScopeImageList([out] LPIMAGELIST* ppImageList);
  557. [helpstring("Queries the IConsole provided image list for the result pane.")]
  558. HRESULT QueryResultImageList([out] LPIMAGELIST* ppImageList);
  559. [helpstring("Generates a notification to update view(s) because of content change")]
  560. HRESULT UpdateAllViews([in] LPDATAOBJECT lpDataObject,
  561. [in] long data,
  562. [in] long hint);
  563. [helpstring("Displays a message box")]
  564. HRESULT MessageBox([in] LPCWSTR lpszText, [in] LPCWSTR lpszTitle,
  565. [in] UINT fuStyle, [out] int* piRetval);
  566. [helpstring("Query for the IConsoleVerb.")]
  567. HRESULT QueryConsoleVerb([out] LPCONSOLEVERB * ppConsoleVerb);
  568. [helpstring("Selects the given scope item.")]
  569. HRESULT SelectScopeItem([in] HSCOPEITEM hScopeItem);
  570. [helpstring("Returns handle to the main frame window.")]
  571. HRESULT GetMainWindow([out] HWND* phwnd);
  572. [helpstring("Returns handle to the main frame window.")]
  573. HRESULT NewWindow([in] HSCOPEITEM hScopeItem, [in] unsigned long lOptions);
  574. };
  575. [
  576. object,
  577. uuid(43136EB3-D36C-11CF-ADBC-00AA00A80033),
  578. helpstring("INodeInit Interface"),
  579. pointer_default(unique)
  580. ]
  581. interface IHeaderCtrl : IUnknown
  582. {
  583. const int AUTO_WIDTH = -1; // Column width is determined by the string length + padding
  584. [helpstring("Add a column to a Default Result view")]
  585. HRESULT InsertColumn([in] int nCol, [in,] LPCWSTR title, [in] int nFormat, [in] int nWidth);
  586. [helpstring("Remove a column to a Default Result view")]
  587. HRESULT DeleteColumn([in] int nCol);
  588. [helpstring("Set a columns text")]
  589. HRESULT SetColumnText([in] int nCol, [in] LPCWSTR title);
  590. [helpstring("Gets a columns text")]
  591. HRESULT GetColumnText([in] int nCol, [out] LPOLESTR* pText);
  592. [helpstring("Set a columns width")]
  593. HRESULT SetColumnWidth([in] int nCol, [in] int nWidth);
  594. [helpstring("Gets a columns width")]
  595. HRESULT GetColumnWidth([in] int nCol, [out] int* pWidth);
  596. };
  597. enum
  598. {
  599. ///////////////////////////////////////////////////////////////////////////////
  600. // The following bits in insertion point / submenu IDs are handled specially:
  601. //
  602. // CCM_INSERTIONPOINTID_MASK_SPECIAL:
  603. // Insertion points and submenus whose IDs contain any bit in
  604. // CCM_INSERTIONPOINTID_MASK_SPECIAL have special behavior. Snap-Ins may use
  605. // the other bits as they see fit.
  606. // CCM_INSERTIONPOINTID_MASK_SHARED:
  607. // Insertion points and submenus whose IDs contain CCM_INSERTIONPOINTID_MASK_SHARED
  608. // are shared between the creator of the context menu, the primary extension and
  609. // the third-party extension. Any of these entities adding items to a shared
  610. // insertion point or submenu, add them to the same insertion point or submenu.
  611. // Only IContextMenuProvider may create insertion points or submenus with this bit
  612. // set, unless CCM_INSERTIONPOINTID_MASK_CREATE_PRIMARY is also set, in which case
  613. // only the primary extension may create them.
  614. // CCM_INSERTIONPOINT_CREATE_PRIMARY:
  615. // Only the system may add insertion points or submenus for which CCM_INSERTIONPOINT_SHARED
  616. // is set and this bit is not set. Only the primary extension may add insertion points
  617. // or submenus for which both bits are set. This prevents insertion point ID conflicts
  618. // between insertion points and submenus created by IContextMenuProvider and those
  619. // created by the primary extension.
  620. // CCM_INSERTIONPOINTID_MASK_ADD_PRIMARY:
  621. // If CCM_INSERTIONPOINT_SHARED is set and this bit is not set, then
  622. // the primary extension may not add to this insertion point or submenu.
  623. // CCM_INSERTIONPOINTID_MASK_ADD_3RDPARTY:
  624. // If CCM_INSERTIONPOINT_SHARED is set and this bit is not set, then
  625. // the third-party extensions may not add to this insertion point or submenu.
  626. // CCM_INSERTIONPOINTID_MASK_RESERVED:
  627. // Insertion points and submenus may not be added with any of these bits set.
  628. // CCM_INSERTIONPOINTID_MASK_FLAGINDEX:
  629. // This mask extracts the the index field from system insertion point IDs.
  630. // The index gives the bit position of the associated insertion allowed flag.
  631. CCM_INSERTIONPOINTID_MASK_SPECIAL = 0xFFFF0000,
  632. CCM_INSERTIONPOINTID_MASK_SHARED = 0x80000000,
  633. CCM_INSERTIONPOINTID_MASK_CREATE_PRIMARY = 0x40000000,
  634. CCM_INSERTIONPOINTID_MASK_ADD_PRIMARY = 0x20000000,
  635. CCM_INSERTIONPOINTID_MASK_ADD_3RDPARTY = 0x10000000,
  636. CCM_INSERTIONPOINTID_MASK_RESERVED = 0x0FFF0000,
  637. CCM_INSERTIONPOINTID_MASK_FLAGINDEX = 0x0000001F,
  638. ///////////////////////////////////////////////////////////////////////////////
  639. // Use these InsertionPointIDs to add items at the predefined insertion points:
  640. //
  641. // 0
  642. // This is interpreted the same as CCM_INSERTIONPOINTID_ROOT_MENU (see below).
  643. // CCM_INSERTIONPOINTID_PRIMARY_TOP:
  644. // The primary extension may use this insertion point to add items to the top of
  645. // the main context menu.
  646. // CCM_INSERTIONPOINTID_PRIMARY_NEW:
  647. // The primary extension may use this insertion point to add items to the top of
  648. // the Create New submenu.
  649. // CCM_INSERTIONPOINTID_PRIMARY_TASK:
  650. // The primary extension may use this insertion point to add items to the top of
  651. // the Task submenu.
  652. // CCM_INSERTIONPOINTID_3RDPARTY_NEW:
  653. // Third-party extensions may use this insertion point to add items to the bottom of
  654. // the Create New submenu.
  655. // CCM_INSERTIONPOINTID_3RDPARTY_TASK:
  656. // Third-party extensions may use this insertion point to add items to the bottom of
  657. // the Task submenu.
  658. // CCM_INSERTIONPOINTID_ROOT_MENU:
  659. // IContextMenuProvider may use this insertion point to add items to the root menu.
  660. // Neither primary extensions nor third-party extension may add items to the root
  661. // menu except through insertion points added by IContextMenuProvider.
  662. //
  663. CCM_INSERTIONPOINTID_PRIMARY_TOP = 0xA0000000, // SHARED and ADD_PRIMARY
  664. CCM_INSERTIONPOINTID_PRIMARY_NEW = 0xA0000001, // SHARED and ADD_PRIMARY
  665. CCM_INSERTIONPOINTID_PRIMARY_TASK = 0xA0000002, // SHARED and ADD_PRIMARY
  666. CCM_INSERTIONPOINTID_PRIMARY_VIEW = 0xA0000003, // SHARED and ADD_PRIMARY
  667. CCM_INSERTIONPOINTID_3RDPARTY_NEW = 0x90000001, // SHARED and ADD_3RDPARTY
  668. CCM_INSERTIONPOINTID_3RDPARTY_TASK = 0x90000002, // SHARED and ADD_3RDPARTY
  669. CCM_INSERTIONPOINTID_ROOT_MENU = 0x80000000 // SHARED
  670. };
  671. //
  672. // Macro to derive an insertion allowed flag from an system insertion point ID
  673. //
  674. #define INSERTALLOWED_FLAG(insertionID) \
  675. (1L << (insertionID & CCM_INSERTIONPOINTID_MASK_FLAGINDEX))
  676. enum
  677. {
  678. /////////////////////////////////////////////////////////////////////////////////////
  679. // These flags give permission to insert menu items at the CCM_INSERTIONPOINTID_xxx
  680. // insertion points define above. The bit position of each flag is derived from the
  681. // index portion of the corresponding insertion point ID. They are passed to the
  682. // snap-in's AddMenuItems method.
  683. CCM_INSERTIONALLOWED_TOP = INSERTALLOWED_FLAG(CCM_INSERTIONPOINTID_PRIMARY_TOP),
  684. CCM_INSERTIONALLOWED_NEW = INSERTALLOWED_FLAG(CCM_INSERTIONPOINTID_PRIMARY_NEW),
  685. CCM_INSERTIONALLOWED_TASK = INSERTALLOWED_FLAG(CCM_INSERTIONPOINTID_PRIMARY_TASK),
  686. CCM_INSERTIONALLOWED_VIEW = INSERTALLOWED_FLAG(CCM_INSERTIONPOINTID_PRIMARY_VIEW)
  687. };
  688. enum
  689. {
  690. ///////////////////////////////////////////////////////////////////////////////
  691. // The following bits in menu command IDs are handled specially:
  692. //
  693. // CCM_COMMANDID_MASK_RESERVED:
  694. // Items other than insertion points and submenus may not be added with any of
  695. // these bits set.
  696. //
  697. CCM_COMMANDID_MASK_RESERVED = 0xFFFF0000
  698. };
  699. enum
  700. {
  701. ///////////////////////////////////////////////////////////////////////////////
  702. // The following flags may be passed via AddMenuItem parameter fSpecialFlags:
  703. //
  704. // CCM_SPECIAL_SEPARATOR
  705. // Ignore all other parameters except lInsertionPointID. Add a separator to the
  706. // end of the menu or the specified insertion point, except that
  707. // CCM_SPECIAL_SEPARATOR will never add a separator as the first or last item
  708. // in a menu/submenu, and if two or more consecutive CCM_SPECIAL_SEPARATORs are added,
  709. // only one appears in the menu. Only IContextMenuProvider is permitted to add
  710. // separators, either special or otherwise, to menus created by IContextMenuProvider.
  711. //
  712. CCM_SPECIAL_SEPARATOR = 0x0001,
  713. //
  714. // CCM_SPECIAL_SUBMENU
  715. // If this submenu is empty, then it will be grayed and disabled.
  716. // This is only valid for MF_POPUP items.
  717. //
  718. CCM_SPECIAL_SUBMENU = 0x0002,
  719. //
  720. // CCM_SPECIAL_DEFAULT_ITEM
  721. // This should be the default menu item. If more than one menu item specifies this flag,
  722. // the last one in each submenu takes precedence.
  723. //
  724. CCM_SPECIAL_DEFAULT_ITEM = 0x0004,
  725. //
  726. // CCM_SPECIAL_INSERTION_POINT
  727. // Ignore all other parameters except lCommandID and lInsertionPointID. This creates
  728. // a new "insertion point" at the end of the insertion point or submenu identified by
  729. // lInsertionPointID (0 is the end of the main menu). Subsequent calls may use
  730. // the lCommandID from this call as their lInsertionPointID, and insert their own
  731. // menu items, submenus or insertion points at this point in this menu.
  732. //
  733. CCM_SPECIAL_INSERTION_POINT = 0x0008,
  734. //
  735. // CCM_SPECIAL_TESTONLY
  736. // Perform the normal validation of the menu item parameters and return the appropriate
  737. // result code, but do not actually add the menu item.
  738. //
  739. CCM_SPECIAL_TESTONLY = 0x0010
  740. };
  741. [
  742. object,
  743. uuid(43136EB7-D36C-11CF-ADBC-00AA00A80033),
  744. helpstring("IContextMenuCallback Interface"),
  745. pointer_default(unique)
  746. ]
  747. interface IContextMenuCallback : IUnknown
  748. {
  749. // returns S_OK if the item was added
  750. // returns E_INVALIDARG if given a NULL pointer
  751. // returns E_INVALIDARG if an item already exists with this lCommandID
  752. // returns E_INVALIDARG if insertion point ID could not be found
  753. // returns E_INVALIDARG if command ID or insertion point ID is invalid
  754. // returns E_INVALIDARG if fFlags contains MF_OWNERDRAW or MF_BITMAP
  755. // returns E_INVALIDARG if an extension attempts to add an item where
  756. // fFlags contains MF_SEPARATOR or fSpecialFlags contains CCM_SPECIAL_SEPARATOR
  757. // except in submenus created by extensions
  758. // otherwise an unexpected error occurred
  759. [helpstring("Adds one item to context menu")]
  760. HRESULT AddItem([in] CONTEXTMENUITEM* pItem);
  761. };
  762. [
  763. object,
  764. uuid(43136EB6-D36C-11CF-ADBC-00AA00A80033),
  765. object,
  766. helpstring("IContextMenuProvider Interface"),
  767. pointer_default(unique)
  768. ]
  769. //
  770. // Note that this derives from IContextMenuCallback
  771. //
  772. interface IContextMenuProvider : IContextMenuCallback
  773. {
  774. // Methods
  775. // returns S_OK unless an unexpected error occurs
  776. [helpstring("Clear context menu")]
  777. HRESULT EmptyMenuList();
  778. // returns S_OK if successful
  779. // returns E_INVALIDARG on NULL parameter
  780. // passes through return code from IExtendContextMenu::AddMenuItems
  781. // or from CoCreateInstance
  782. // otherwise an unexpected error occurred
  783. [helpstring("Allow the primary extension to add to bottom of context menu")]
  784. HRESULT AddPrimaryExtensionItems([in] LPUNKNOWN piExtension, [in] LPDATAOBJECT piDataObject);
  785. // returns S_OK if successful
  786. // returns E_INVALIDARG on NULL parameter
  787. // returns S_FALSE if context menu has already been extended
  788. // passes through return code from IExtendContextMenu::AddMenuItems
  789. // or from CLSIDToString or CoCreateInstance
  790. // otherwise an unexpected error occurred
  791. [helpstring("Allow third-party extensions to add to bottom of context menu")]
  792. HRESULT AddThirdPartyExtensionItems([in] LPDATAOBJECT piDataObject);
  793. // returns S_OK unless an unexpected error occurs
  794. [helpstring("Display context menu")]
  795. HRESULT ShowContextMenu([in] HWND hwndParent, [in] long xPos, [in] long yPos, [out,retval] long* plSelected);
  796. };
  797. [
  798. object,
  799. uuid(4F3B7A4F-CFAC-11CF-B8E3-00C04FD8D5B0),
  800. helpstring("IExtendContextMenu Interface"),
  801. pointer_default(unique)
  802. ]
  803. interface IExtendContextMenu : IUnknown
  804. {
  805. [helpstring("Extension may add context menu items via callback interface")]
  806. HRESULT AddMenuItems([in] LPDATAOBJECT piDataObject,
  807. [in] LPCONTEXTMENUCALLBACK piCallback,
  808. [in,out] long *pInsertionAllowed);
  809. [helpstring("Extension context menu item was selected")]
  810. HRESULT Command([in] long lCommandID, [in] LPDATAOBJECT piDataObject);
  811. };
  812. [
  813. object,
  814. uuid(43136EB8-D36C-11CF-ADBC-00AA00A80033),
  815. helpstring("IImageList Interface"),
  816. pointer_default(unique)
  817. ]
  818. interface IImageList : IUnknown
  819. {
  820. [helpstring("Sets an Icon in the image list, creates it if it is not there.")]
  821. HRESULT ImageListSetIcon([in] long* pIcon, [in] long nLoc);
  822. [helpstring("Sets a strip in the image list, starting at nLoc using a pair of bitmaps.")]
  823. HRESULT ImageListSetStrip([in] long* pBMapSm,
  824. [in] long* pBMapLg,[in] long nStartLoc, [in] COLORREF cMask);
  825. };
  826. [
  827. object,
  828. uuid(31DA5FA0-E0EB-11cf-9F21-00AA003CA9F6),
  829. helpstring("IResultData Interface"),
  830. pointer_default(unique)
  831. ]
  832. interface IResultData : IUnknown
  833. {
  834. [helpstring("Allows the snap-in to insert a single item.")]
  835. HRESULT InsertItem([in,out] LPRESULTDATAITEM item);
  836. [helpstring("Allows the snap-in to delete a single item.")]
  837. HRESULT DeleteItem([in] HRESULTITEM itemID, [in] int nCol);
  838. [helpstring("Allows the snap-in to find an item/subitem based on its user inserted lParam.")]
  839. HRESULT FindItemByLParam([in] LPARAM lParam, [out] HRESULTITEM *pItemID);
  840. [helpstring("Allows the snap-in to delete all the items.")]
  841. HRESULT DeleteAllRsltItems();
  842. [helpstring("Allows the snap-in to set a single item.")]
  843. HRESULT SetItem([in] LPRESULTDATAITEM item);
  844. [helpstring("Allows the snap-in to get a single item.")]
  845. HRESULT GetItem([in,out] LPRESULTDATAITEM item);
  846. [helpstring("Returns the lParam of the first item, which matches the given state.")]
  847. HRESULT GetNextItem([in,out] LPRESULTDATAITEM item);
  848. [helpstring("Allows the snap-in to modify the state of an item.")]
  849. HRESULT ModifyItemState([in] int nIndex, [in] HRESULTITEM itemID,
  850. [in] UINT uAdd, [in] UINT uRemove);
  851. [helpstring("Allows the snap-in to set the result view style.")]
  852. HRESULT ModifyViewStyle([in] MMC_RESULT_VIEW_STYLE add,
  853. [in] MMC_RESULT_VIEW_STYLE remove);
  854. [helpstring("Allows the snap-in to set the result view mode.")]
  855. HRESULT SetViewMode([in] long lViewMode);
  856. [helpstring("Allows the snap-in to get the result view mode.")]
  857. HRESULT GetViewMode([out] long* lViewMode);
  858. [helpstring("Allows the snap-in to update a single item.")]
  859. HRESULT UpdateItem([in] HRESULTITEM itemID);
  860. [helpstring("Sort all items in result pane")]
  861. HRESULT Sort([in] int nColumn, [in] DWORD dwSortOptions, [in] long lUserParam);
  862. [helpstring("Set the description bar text for the result view")]
  863. HRESULT SetDescBarText([in] LPOLESTR DescText);
  864. [helpstring("Set number of items in result pane list")]
  865. HRESULT SetItemCount([in] int nItemCount, [in] DWORD dwOptions);
  866. };
  867. [
  868. object,
  869. uuid(9757abb8-1b32-11d1-a7ce-00c04fd8d565),
  870. helpstring("IQuickFilter Interface"),
  871. pointer_default(unique)
  872. ]
  873. interface IQuickFilter : IUnknown
  874. {
  875. [helpstring("Sets the time out for the quick filter")]
  876. HRESULT SetChangeTimeOut([in] unsigned long uTimeout);
  877. [helpstring("Sets the quick filter")]
  878. HRESULT SetQuickFilter([in] UINT nColumn, [in] long lFilter);
  879. [helpstring("Gets the quick filter")]
  880. HRESULT GetQuickFilter([in] UINT nColumn, [out] long* plFilter);
  881. };
  882. [
  883. object,
  884. uuid(BEDEB620-F24D-11cf-8AFC-00AA003CA9F6),
  885. helpstring("IConsoleNameSpace Interface"),
  886. pointer_default(unique)
  887. ]
  888. interface IConsoleNameSpace : IUnknown
  889. {
  890. import "oaidl.idl";
  891. [helpstring("Allows the snap-in to insert a single item into the scope view.")]
  892. HRESULT InsertItem([in,out] LPSCOPEDATAITEM item);
  893. [helpstring("Allows the snap-in to delete a single item from the scope view.")]
  894. HRESULT DeleteItem([in] HSCOPEITEM hItem, [in] long fDeleteThis);
  895. [helpstring("Allows the snap-in to set a single scope view item.")]
  896. HRESULT SetItem([in] LPSCOPEDATAITEM item);
  897. [helpstring("Allows the snap-in to get a single scope view item.")]
  898. HRESULT GetItem([in,out] LPSCOPEDATAITEM item);
  899. [helpstring("The handle of the child item if successful, otherwise NULL.")]
  900. HRESULT GetChildItem([in] HSCOPEITEM item, [out] HSCOPEITEM* pItemChild,
  901. [out] long* plCookie);
  902. [helpstring("The handle of the next item if successful, otherwise NULL.")]
  903. HRESULT GetNextItem([in] HSCOPEITEM item, [out] HSCOPEITEM* pItemNext,
  904. [out] long* plCookie);
  905. [helpstring("The handle of the parent item if successful, otherwise NULL.")]
  906. HRESULT GetParentItem([in] HSCOPEITEM item, [out] HSCOPEITEM* pItemParent,
  907. [out] long* plCookie);
  908. };
  909. struct _PSP;
  910. typedef struct _PSP * HPROPSHEETPAGE;
  911. [
  912. local,
  913. object,
  914. uuid(85DE64DD-EF21-11cf-A285-00C04FD8DBE6),
  915. helpstring("IPropertySheetCallback Interface"),
  916. pointer_default(unique)
  917. ]
  918. interface IPropertySheetCallback : IUnknown
  919. {
  920. [helpstring("Snap-in uses this to add a page to a property sheet")]
  921. HRESULT AddPage([in] HPROPSHEETPAGE hPage);
  922. [helpstring("Snap-in uses this to remove a page from a property sheet")]
  923. HRESULT RemovePage([in] HPROPSHEETPAGE hPage);
  924. };
  925. [
  926. object,
  927. uuid(85DE64DE-EF21-11cf-A285-00C04FD8DBE6),
  928. helpstring("IPropertySheetProvider Interface"),
  929. pointer_default(unique)
  930. ]
  931. interface IPropertySheetProvider : IUnknown
  932. {
  933. [helpstring("Creates a property sheet frame")]
  934. HRESULT CreatePropertySheet([in] LPCWSTR title, [in] boolean type,
  935. [in] long cookie, [in] LPDATAOBJECT pIDataObjectm,
  936. [in] DWORD dwOptions);
  937. [helpstring("Determine if the property sheet exist")]
  938. HRESULT FindPropertySheet([in] long cookie, [in] LPCOMPONENT lpComponent, [in] LPDATAOBJECT lpDataObject);
  939. [helpstring("Collects the pages from the primary snap-in")]
  940. HRESULT AddPrimaryPages(LPUNKNOWN lpUnknown, BOOL bCreateHandle, HWND hNotifyWindow, BOOL bScopePane);
  941. [helpstring("Collects the pages from the extension snap-in(s)")]
  942. HRESULT AddExtensionPages();
  943. [helpstring("Shows a property sheet frame parented to the HWND passed in")]
  944. HRESULT Show([in] long window, [in] int page);
  945. };
  946. [
  947. object,
  948. uuid(85DE64DC-EF21-11cf-A285-00C04FD8DBE6),
  949. helpstring("IExtendPropertySheet Interface"),
  950. pointer_default(unique)
  951. ]
  952. interface IExtendPropertySheet : IUnknown
  953. {
  954. [helpstring("Interface implemented by the snap-in to add pages to a sheet")]
  955. // handle - This handle must be saved in the property page object
  956. // to notify the parent of changes in property using API
  957. // MMCPropertyChangeNotify. The API MMCFreeNotifyHandle
  958. // should be called just before the property page is
  959. // destroyed to delete the handle.
  960. HRESULT CreatePropertyPages([in] LPPROPERTYSHEETCALLBACK lpProvider,
  961. [in] long handle,
  962. [in] LPDATAOBJECT lpIDataObject);
  963. [helpstring("Interface implemented by the snap-in to determine if this object needs pages")]
  964. HRESULT QueryPagesFor([in] LPDATAOBJECT lpDataObject);
  965. };
  966. [
  967. object,
  968. uuid(69FB811E-6C1C-11D0-A2CB-00C04FD909DD),
  969. helpstring("Control bar to hold toolbar and other controls"),
  970. pointer_default(unique)
  971. ]
  972. interface IControlbar : IUnknown
  973. {
  974. [helpstring("Create and return the control requested")]
  975. HRESULT Create([in] MMC_CONTROL_TYPE nType,
  976. [in] LPEXTENDCONTROLBAR pExtendControlbar,
  977. [out] LPUNKNOWN* ppUnknown);
  978. [helpstring("Associated the control to the control bar")]
  979. HRESULT Attach([in] MMC_CONTROL_TYPE nType, [in] LPUNKNOWN lpUnknown);
  980. [helpstring("Break the association between the control and the control bar")]
  981. HRESULT Detach([in] LPUNKNOWN lpUnknown);
  982. };
  983. [
  984. object,
  985. uuid(49506520-6F40-11D0-A98B-00C04FD8D565),
  986. helpstring("IExtendControlbar Interface"),
  987. pointer_default(unique)
  988. ]
  989. interface IExtendControlbar : IUnknown
  990. {
  991. [helpstring("Extension may add toolbars via callback interface")]
  992. HRESULT SetControlbar([in] LPCONTROLBAR pControlbar);
  993. [helpstring("User actions")]
  994. HRESULT ControlbarNotify([in] MMC_NOTIFY_TYPE event,
  995. [in] long arg, [in] long param);
  996. };
  997. [
  998. object,
  999. uuid(43136EB9-D36C-11CF-ADBC-00AA00A80033),
  1000. pointer_default(unique)
  1001. ]
  1002. interface IToolbar : IUnknown
  1003. {
  1004. [helpstring("Add and image to the toolbar")]
  1005. HRESULT AddBitmap([in] int nImages, [in] HBITMAP hbmp, [in] int cxSize, [in] int cySize, [in] COLORREF crMask );
  1006. [helpstring("Add an array of buttons to the toolbar")]
  1007. HRESULT AddButtons([in] int nButtons, [in] LPMMCBUTTON lpButtons);
  1008. [helpstring("Add a single button to the toolbar at position nIndex")]
  1009. HRESULT InsertButton([in] int nIndex, [in] LPMMCBUTTON lpButton);
  1010. [helpstring("Remove a button at the index")]
  1011. HRESULT DeleteButton([in] int nIndex);
  1012. [helpstring("Get an attribute of a button")]
  1013. HRESULT GetButtonState([in] int idCommand, [in] MMC_BUTTON_STATE nState, [out] BOOL* pState);
  1014. [helpstring("Set an attribute of a button")]
  1015. HRESULT SetButtonState([in] int idCommand, [in] MMC_BUTTON_STATE nState, [in] BOOL bState);
  1016. };
  1017. [
  1018. object,
  1019. uuid(E49F7A60-74AF-11D0-A286-00C04FD8FE93),
  1020. pointer_default(unique)
  1021. ]
  1022. interface IConsoleVerb : IUnknown
  1023. {
  1024. [helpstring("Get verb state")]
  1025. HRESULT GetVerbState([in] MMC_CONSOLE_VERB eCmdID, [in] MMC_BUTTON_STATE nState, [out] BOOL* pState);
  1026. [helpstring("Set verb state")]
  1027. HRESULT SetVerbState([in] MMC_CONSOLE_VERB eCmdID, [in] MMC_BUTTON_STATE nState, [in] BOOL bState);
  1028. [helpstring("Set default verb")]
  1029. HRESULT SetDefaultVerb([in] MMC_CONSOLE_VERB eCmdID);
  1030. [helpstring("Get default verb")]
  1031. HRESULT GetDefaultVerb([out] MMC_CONSOLE_VERB* peCmdID);
  1032. };
  1033. [
  1034. object,
  1035. uuid(1245208C-A151-11D0-A7D7-00C04FD909DD),
  1036. pointer_default(unique)
  1037. ]
  1038. interface ISnapinAbout : IUnknown
  1039. {
  1040. [helpstring("Text for the snap-in description box")]
  1041. HRESULT GetSnapinDescription([ out] LPOLESTR* lpDescription);
  1042. [helpstring("Provider name")]
  1043. HRESULT GetProvider([out] LPOLESTR* lpName);
  1044. [helpstring("Version number for the snap-in")]
  1045. HRESULT GetSnapinVersion([out] LPOLESTR* lpVersion);
  1046. [helpstring("Main icon for about box")]
  1047. HRESULT GetSnapinImage([out] HICON* hAppIcon);
  1048. [helpstring("Static folder images for scope and result panes")]
  1049. HRESULT GetStaticFolderImage([out] HBITMAP* hSmallImage,
  1050. [out] HBITMAP* hSmallImageOpen,
  1051. [out] HBITMAP* hLargeImage,
  1052. [out] COLORREF* cMask);
  1053. };
  1054. [
  1055. object,
  1056. uuid(951ED750-D080-11d0-B197-000000000000),
  1057. pointer_default(unique)
  1058. ]
  1059. interface IMenuButton : IUnknown
  1060. {
  1061. [helpstring("Adds a button")]
  1062. HRESULT AddButton([in] int idCommand,[in] LPOLESTR lpButtonText,
  1063. [in] LPOLESTR lpTooltipText);
  1064. [helpstring("Set an attributes of a button")]
  1065. HRESULT SetButton([in] int idCommand,[in] LPOLESTR lpButtonText,
  1066. [in] LPOLESTR lpTooltipText);
  1067. [helpstring("Set the state of a button")]
  1068. HRESULT SetButtonState([in] int idCommand,
  1069. [in] MMC_BUTTON_STATE nState,
  1070. [in] BOOL bState);
  1071. };
  1072. [
  1073. object,
  1074. uuid(A6B15ACE-DF59-11D0-A7DD-00C04FD909DD),
  1075. pointer_default(unique)
  1076. ]
  1077. interface ISnapinHelp : IUnknown
  1078. {
  1079. [helpstring("Get the compiled help file (.chm) from a snap-in to merge")]
  1080. HRESULT GetHelpTopic([out] LPOLESTR* lpCompiledHelpFile);
  1081. }