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.

1365 lines
53 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 1999
  6. //
  7. // File: ndmgrpriv.h (originally ndmgr.idl)
  8. //
  9. //--------------------------------------------------------------------------
  10. #include "mmcobj.h"
  11. #include <string>
  12. #include <vector>
  13. #include <iterator>
  14. #ifndef __ndmgrpriv_h__
  15. #define __ndmgrpriv_h__
  16. #define MMC_INTERFACE(Interface, x) \
  17. extern "C" const IID IID_##Interface; \
  18. struct DECLSPEC_UUID(#x) __declspec(novtable) Interface
  19. // forward class declarations
  20. class CContextMenuInfo;
  21. class CResultViewType;
  22. class tstring;
  23. class CColumnInfoList;
  24. class CConsoleView;
  25. class CXMLObject;
  26. // interfaces
  27. interface INodeType;
  28. interface INodeTypesCache;
  29. interface IEnumNodeTypes;
  30. interface IFramePrivate;
  31. interface IScopeDataPrivate;
  32. interface IResultDataPrivate;
  33. interface IImageListPrivate;
  34. interface IPropertySheetNotify;
  35. interface INodeCallback;
  36. interface IScopeTreeIter;
  37. interface IScopeTree;
  38. interface IPropertySheetProviderPrivate;
  39. interface IDumpSnapins;
  40. interface IMMCListView;
  41. interface ITaskPadHost;
  42. interface IStringTablePrivate;
  43. interface ITaskCallback;
  44. interface IComCacheCleanup;
  45. interface IHeaderCtrlPrivate;
  46. interface IMMCClipboardDataObject;
  47. interface IMMCClipboardSnapinObject;
  48. typedef IFramePrivate* LPFRAMEPRIVATE;
  49. typedef IScopeDataPrivate* LPSCOPEDATAPRIVATE;
  50. typedef IResultDataPrivate* LPRESULTDATAPRIVATE;
  51. typedef IImageListPrivate* LPIMAGELISTPRIVATE;
  52. typedef IPropertySheetNotify* LPPROPERTYSHEETNOTIFY;
  53. typedef INodeCallback* LPNODECALLBACK;
  54. typedef IScopeTreeIter* LPSCOPETREEITER;
  55. typedef IScopeTree* LPSCOPETREE;
  56. typedef INodeType* LPNODETYPE;
  57. typedef INodeTypesCache* LPNODETYPESCACHE;
  58. typedef IEnumNodeTypes* LPENUMNODETYPES;
  59. typedef IDumpSnapins* LPDUMPSNAPINS;
  60. typedef IMMCListView* LPMMCLISTVIEW;
  61. typedef ITaskCallback* LPTASKCALLBACK;
  62. typedef IComCacheCleanup* LPCOMCACHECLEANUP;
  63. typedef IMMCClipboardDataObject* LPCLIPBOARDDATAOBJECT;
  64. typedef IMMCClipboardSnapinObject* LPCLIPBOARDSNAPINOBJECT;
  65. typedef LONG_PTR HBOOKMARK;
  66. typedef LONG_PTR HVIEWSETTINGS;
  67. typedef LONG_PTR HPERSISTOR;
  68. typedef IPropertySheetProviderPrivate* LPPROPERTYSHEETPROVIDERPRIVATE;
  69. typedef struct _TREEITEM * HTREEITEM;
  70. // Implements the list save feature (t-dmarm)
  71. #define IMPLEMENT_LIST_SAVE
  72. // Use to see if the MT Node is valid before referencing the saved pointer in
  73. // a property sheet.
  74. STDAPI MMCIsMTNodeValid(void* pMTNode, BOOL bReset);
  75. // Window class used to store data for property sheets
  76. #define MAINFRAME_CLASS_NAME L"MMCMainFrame"
  77. // Window class used to store data for property sheets
  78. #define DATAWINDOW_CLASS_NAME L"MMCDataWindow"
  79. #define WINDOW_DATA_SIZE (sizeof (DataWindowData *))
  80. // Slots for data stored in the data windows
  81. #define WINDOW_DATA_PTR_SLOT 0
  82. // Max length of item text in list/tree controls
  83. // (including the terminating zero)
  84. #define MAX_ITEM_TEXT_LEN 1024
  85. // MID(Menu Identifications) for context menus
  86. enum MID_LIST
  87. {
  88. MID_VIEW = 1,
  89. MID_VIEW_LARGE,
  90. MID_VIEW_SMALL,
  91. MID_VIEW_LIST,
  92. MID_VIEW_DETAIL,
  93. MID_VIEW_FILTERED,
  94. MID_VIEW_HTML,
  95. MID_ARRANGE_ICONS,
  96. MID_LINE_UP_ICONS,
  97. MID_PROPERTIES,
  98. MID_CREATE_NEW,
  99. MID_TASK,
  100. MID_EXPLORE,
  101. MID_NEW_TASKPAD_FROM_HERE,
  102. MID_OPEN,
  103. MID_CUT,
  104. MID_COPY,
  105. MID_PASTE,
  106. MID_DELETE,
  107. MID_PRINT,
  108. MID_REFRESH,
  109. MID_RENAME,
  110. MID_CONTEXTHELP,
  111. MID_ARRANGE_AUTO,
  112. MID_STD_MENUS,
  113. MID_STD_BUTTONS,
  114. MID_SNAPIN_MENUS,
  115. MID_SNAPIN_BUTTONS,
  116. MID_LISTSAVE,
  117. MID_COLUMNS,
  118. MID_CUSTOMIZE,
  119. MID_ORGANIZE_FAVORITES,
  120. MID_EDIT_TASKPAD,
  121. MID_DELETE_TASKPAD,
  122. MID_LAST, // this must be last
  123. };
  124. class CResultItem;
  125. typedef struct _CCLVSortParams
  126. {
  127. BOOL bAscending; // sort direction
  128. int nCol; // Which column to sort on.
  129. LPRESULTDATACOMPARE lpResultCompare; // Snap-in component interface
  130. LPRESULTDATACOMPAREEX lpResultCompareEx; // "
  131. LPARAM lpUserParam; // parameter user passes in
  132. BOOL bSetSortIcon; // Sort icon /*[not]*/ needed
  133. /*
  134. * Bug 414256: We need to save the sort data only if
  135. * it is user initiated sort. Is this user initiated?
  136. */
  137. BOOL bUserInitiatedSort;
  138. } CCLVSortParams;
  139. //
  140. // This structure is used by MMCPropertyChangeNotify to pass
  141. // information from a property sheet to the console. It has routing
  142. // information to notify the correct snap-in of a property changed notify.
  143. //
  144. const DWORD MMC_E_INVALID_FILE = 0x80FF0002;
  145. const DWORD MMC_E_SNAPIN_LOAD_FAIL = 0x80FF0003;
  146. typedef struct _PROPERTYNOTIFYINFO
  147. {
  148. LPCOMPONENTDATA pComponentData; // Valid if (fScopePane == TRUE)
  149. LPCOMPONENT pComponent; // Valid if (fScopePane == FALSE)
  150. BOOL fScopePane; // True if it is for a scope pane item.
  151. HWND hwnd; // HWND to console handling the message
  152. } PROPERTYNOTIFYINFO;
  153. // Context menu types
  154. typedef enum _MMC_CONTEXT_MENU_TYPES
  155. {
  156. MMC_CONTEXT_MENU_DEFAULT = 0, // Normal context menu
  157. MMC_CONTEXT_MENU_ACTION = 1, // Action menu button
  158. MMC_CONTEXT_MENU_VIEW = 2, // View menu button
  159. MMC_CONTEXT_MENU_FAVORITES = 3, // Favorites menu button
  160. MMC_CONTEXT_MENU_LAST = 4,
  161. } MMC_CONTEXT_MENU_TYPES;
  162. DECLARE_HANDLE (HMTNODE);
  163. DECLARE_HANDLE (HNODE); // A scope pane handle(lParam) within a view
  164. typedef unsigned long MTNODEID;
  165. const MTNODEID ROOTNODEID = 1;
  166. typedef PROPERTYNOTIFYINFO* LPPROPERTYNOTIFYINFO;
  167. // Special cookies (Note: Can't use -1)
  168. const LONG_PTR LVDATA_BACKGROUND = -2;
  169. const LONG_PTR LVDATA_CUSTOMOCX = -3;
  170. const LONG_PTR LVDATA_CUSTOMWEB = -4;
  171. const LONG_PTR LVDATA_MULTISELECT = -5;
  172. const LONG_PTR LVDATA_ERROR = -10;
  173. const LONG_PTR SPECIAL_LVDATA_MIN = -10;
  174. const LONG_PTR SPECIAL_LVDATA_MAX = -2;
  175. #define IS_SPECIAL_LVDATA(d) (((d) >= SPECIAL_LVDATA_MIN) && ((d) <= SPECIAL_LVDATA_MAX))
  176. typedef struct _SELECTIONINFO
  177. {
  178. BOOL m_bScope;
  179. BOOL m_bBackground;
  180. IUnknown* m_pView; // valid for scope seln (CDN_SELECT)
  181. MMC_COOKIE m_lCookie; // valid for result item (CCN_SELECT)
  182. MMC_CONSOLE_VERB m_eCmdID;
  183. BOOL m_bDueToFocusChange;
  184. BOOL m_bResultPaneIsOCX;
  185. BOOL m_bResultPaneIsWeb;
  186. } SELECTIONINFO;
  187. typedef struct _HELPDOCINFO
  188. {
  189. LPCOLESTR m_pszFileName; // File name (same as .msc file)
  190. FILETIME m_ftimeCreate; // .msc file creation time
  191. FILETIME m_ftimeModify; // .msc file modification time
  192. } HELPDOCINFO;
  193. // MMC_ILISTPAD_INFO struct: internal form has additional field for clsid
  194. typedef struct _MMC_ILISTPAD_INFO
  195. {
  196. MMC_LISTPAD_INFO info;
  197. LPOLESTR szClsid;
  198. } MMC_ILISTPAD_INFO;
  199. // *****************************************
  200. // CLASS: CTaskPadData
  201. // this class represents data set representing one TaskPad
  202. // used to request taskpad information from CNode
  203. // *****************************************
  204. class CTaskPadData
  205. {
  206. public:
  207. std::wstring strName;
  208. CLSID clsidTaskPad;
  209. };
  210. typedef std::vector<CTaskPadData> CTaskPadCollection;
  211. typedef std::insert_iterator<CTaskPadCollection> CTaskPadInsertIterator;
  212. // *****************************************
  213. // CLASS:CViewExtensionData
  214. // this class represents data set representing one ViewExtension
  215. // used to request extension information from CNode
  216. // *****************************************
  217. class CViewExtensionData
  218. {
  219. public:
  220. std::wstring strURL;
  221. std::wstring strName;
  222. std::wstring strTooltip;
  223. GUID viewID; // unique identifier for the view
  224. bool bReplacesDefaultView;
  225. };
  226. typedef std::vector<CViewExtensionData> CViewExtCollection;
  227. typedef std::insert_iterator<CViewExtCollection> CViewExtInsertIterator;
  228. // The following internal flag corresponding to public view style MMC_ENSUREFOCUSVISIBLE.
  229. // The flag is placed in the upper half of a long so it won't conflict with the LVS_*
  230. // flags that are passed in the same long to our list control's SetViewStyle method.
  231. #define MMC_LVS_ENSUREFOCUSVISIBLE 0x00010000
  232. /*
  233. NOTIFICATIONS
  234. =============
  235. Notify(dataobject, event, arg, param);
  236. For all the MMC_NOTIFY_TYPE events,
  237. dataobject = dataobject for cookie, can be NULL when dataobject is not required
  238. event = one of the CD_NOTIFY_TYPEs
  239. arg and param depend on type, see below.
  240. NCLBK_ACTIVATE
  241. arg = TRUE if gaining focus
  242. NCLBK_BTN_CLICK
  243. ....
  244. NCLBK_CLICK
  245. NCLBK_CONTEXTMENU
  246. param = CContextMenuInfo*
  247. NCLBK_DBLCLICK
  248. NCLBK_DELETE
  249. arg = TRUE if scope item FALSE if result item.
  250. param = If scope item is being deleted param is unused.
  251. If result item is being deleted param is the result items cookie.
  252. return = unused.
  253. NCLBK_EXPAND
  254. arg = TRUE => expand, FALSE => contract
  255. NCLBK_EXPANDED
  256. arg = TRUE => expanded, FALSE => contracted
  257. NCLBK_FOLDER
  258. arg = <>0 if expanding, 0 if contracting
  259. param = HSCOPEITEM of expanding/contracting item
  260. NCLBK_MINIMIZED
  261. arg = TRUE if minimized
  262. NCLBK_MULTI_SELECT
  263. arg = TRUE if due to focus change.
  264. param unused
  265. NCLBK_PROPERTIES
  266. pLParam = (CResultItem*)arg;
  267. param unused
  268. NCLBK_PROPERTY_CHANGE
  269. lpDataObject = NULL
  270. lParam = user object
  271. NCLBK_NEW_NODE_UPDATE
  272. arg = 1 => folder needs to be refreshed
  273. arg = 2 => result view needs to be refreshed
  274. arg = 3 => both needs to be refreshed
  275. NCLBK_RENAME
  276. This gets called the first time to query for rename and a
  277. second time to do the rename. For the query S_OK or S_FALSE for the
  278. return type. After the rename, we will send the new name with a LPOLESTR.
  279. MMC_COOKIE lResultItemCookie = (MMC_COOKIE)arg;
  280. pszNewName = (LPOLESTR)param; // the new name
  281. return = S_OK to allow rename and S_FALSE to disallow rename.
  282. NCLBK_SELECT
  283. arg = TRUE if the item is selected, FALSE otherwise.
  284. param = ptr to SELECTIONINFO.
  285. NCLBK_SHOW
  286. arg = <>0 if selecting, 0 if deselecting
  287. param = HSCOPEITEM of selected/deselected item
  288. NCLBK_COLUMN_CLICK
  289. param = nCol, the column that was clicked.
  290. NCLBK_FINDITEM
  291. This message is sent when a result item list with owner data wants to find
  292. an item who's name matches a string
  293. arg = ptr to RESULTFINDINFO
  294. param = ptr to returned item index
  295. NCLBK_CACHEHINT
  296. This message is sent when the result item list with owner data is about to
  297. ask for display info for a range of items.
  298. arg = index of start item
  299. param = index of end item
  300. NCLBK_GETHELPDOC
  301. This message is sent to get the path of the combined help topics document.
  302. The node manager may update the help doc info.
  303. arg = pointer to HELPDOCINFO struct
  304. param = pointer to returned path string (LPOLESTR*)
  305. NCLBK_LISTPAD
  306. This message is sent to tell the snapin that the TaskPad ListView is ready
  307. to receive items (if attaching).
  308. arg = TRUE if attaching, FALSE if detaching
  309. NCLBK_WEBCONTEXTMENU
  310. send when the user right clicks on a web page.
  311. arg = unused
  312. param = unused
  313. NCLBK_UPDATEHELPDOC
  314. send when console doc is saved to update help file name and file times
  315. arg = ptr to current help doc info (HELPDOCINFO*)
  316. param = ptr to new help doc info (HELPDOCINFO*)
  317. NCLBK_DELETEHELPDOC
  318. send when console doc is closed to delete the temp help collection file
  319. associated with the document
  320. arg - ptr to help doc info (HELPDOCINFO*)
  321. param - unused
  322. */
  323. typedef enum _NCLBK_NOTIFY_TYPE
  324. {
  325. NCLBK_NONE = 0x9000,
  326. NCLBK_ACTIVATE = 0x9001,
  327. NCLBK_CACHEHINT = 0x9002,
  328. NCLBK_CLICK = 0x9003,
  329. NCLBK_CONTEXTMENU = 0x9004,
  330. NCLBK_COPY = 0x9005,
  331. NCLBK_CUT = 0x9006,
  332. NCLBK_DBLCLICK = 0x9007,
  333. NCLBK_DELETE = 0x9008,
  334. NCLBK_EXPAND = 0x9009,
  335. NCLBK_EXPANDED = 0x900A,
  336. NCLBK_FINDITEM = 0x900B,
  337. NCLBK_FOLDER = 0x900C,
  338. NCLBK_MINIMIZED = 0x900D,
  339. NCLBK_MULTI_SELECT = 0x900E,
  340. NCLBK_NEW_NODE_UPDATE = 0x900F,
  341. NCLBK_PRINT = 0x9011,
  342. NCLBK_PROPERTIES = 0x9012,
  343. NCLBK_PROPERTY_CHANGE = 0x9013,
  344. NCLBK_REFRESH = 0x9015,
  345. NCLBK_RENAME = 0x9016,
  346. NCLBK_SELECT = 0x9017,
  347. NCLBK_SHOW = 0x9018,
  348. NCLBK_COLUMN_CLICKED = 0x9019,
  349. NCLBK_SNAPINHELP = 0x901D,
  350. NCLBK_CONTEXTHELP = 0x901E,
  351. NCLBK_INITOCX = 0x9020,
  352. NCLBK_FILTER_CHANGE = 0x9021,
  353. NCLBK_FILTERBTN_CLICK = 0x9022,
  354. NCLBK_TASKNOTIFY = 0x9024,
  355. NCLBK_GETPRIMARYTASK = 0x9025,
  356. NCLBK_GETHELPDOC = 0x9027,
  357. NCLBK_LISTPAD = 0x9029,
  358. NCLBK_GETEXPANDEDVISUALLY = 0x902B,
  359. NCLBK_SETEXPANDEDVISUALLY = 0x902C,
  360. NCLBK_NEW_TASKPAD_FROM_HERE = 0x902D,
  361. NCLBK_WEBCONTEXTMENU = 0x902E,
  362. NCLBK_UPDATEHELPDOC = 0x902F,
  363. NCLBK_EDIT_TASKPAD = 0x9030,
  364. NCLBK_DELETE_TASKPAD = 0x9031,
  365. NCLBK_DELETEHELPDOC = 0x9032
  366. } NCLBK_NOTIFY_TYPE;
  367. ///////////////////////////////////////////////////////////////////////////////
  368. // Common Console clipboard formats
  369. //
  370. // Clipboard format for the multi selected static nodes.
  371. // If there are N static nodes are selected in the result pane, the MTNodes
  372. // for these N nodes will be passed in a GloballAlloced memory. The first DWORD
  373. // contains the number of MTNodes, this will be followed by N ptrs to the MTNodes.
  374. //
  375. #define CCF_MULTI_SELECT_STATIC_DATA ( L"CCF_MULTI_SELECT_STATIC_DATA" )
  376. #define CCF_NEWNODE ( L"CCF_NEWNODE" )
  377. //const CLSID CLSID_NDMGR_SNAPIN = {0x2640211a, 0x06d0, 0x11d1, {0xa7, 0xc9, 0x00, 0xc0, 0x4f, 0xd8, 0xd5, 0x65}};
  378. extern const CLSID CLSID_NDMGR_SNAPIN;
  379. //const GUID GUID_MMC_NEWNODETYPE = {0xfd17e9cc, 0x06ce, 0x11d1, {0xa7, 0xc9, 0x00, 0xc0, 0x4f, 0xd8, 0xd5, 0x65}};
  380. extern const GUID GUID_MMC_NEWNODETYPE;
  381. ///////////////////////////////////////////////////////////////////////////
  382. ///
  383. // helpstring("Notify that the properties of an object changed"),
  384. MMC_INTERFACE(IPropertySheetNotify, d700dd8e-2646-11d0-a2a7-00c04fd909dd) : IUnknown
  385. {
  386. STDMETHOD(Notify)(/*[in]*/ LPPROPERTYNOTIFYINFO pNotify, /*[in]*/ LPARAM lParam) = 0;
  387. };
  388. // helpstring("IFramePrivate Interface"),
  389. MMC_INTERFACE(IFramePrivate, d71d1f2a-1ba2-11d0-a29b-00c04fd909dd): IConsole3
  390. {
  391. /*[helpstring("Sets IFrame Result pane")]*/
  392. STDMETHOD(SetResultView)(/*[in]*/ LPUNKNOWN pUnknown) = 0;
  393. /*[helpstring("Is the ListView set as result view")]*/
  394. STDMETHOD(IsResultViewSet)(BOOL* pbIsLVSet) = 0;
  395. /*[helpstring("Sets Task Pads list view")]*/
  396. STDMETHOD(SetTaskPadList)(/*[in]*/ LPUNKNOWN pUnknown) = 0;
  397. /*[helpstring("IComponent's component ID")]*/
  398. STDMETHOD(GetComponentID)(/*[out]*/ COMPONENTID* lpComponentID) = 0;
  399. /*[helpstring("IComponent's component ID")]*/
  400. STDMETHOD(SetComponentID)(/*[in]*/ COMPONENTID id) = 0;
  401. /*[helpstring("Node for the view.")]*/
  402. STDMETHOD(SetNode)(/*[in]*/ HMTNODE hMTNode, /*[in]*/ HNODE hNode) = 0;
  403. /*[helpstring("Cache the IComponent interface for the snapin.")]*/
  404. STDMETHOD(SetComponent)(/*[in]*/ LPCOMPONENT lpComponent) = 0;
  405. /*[helpstring("Console name space.")]*/
  406. STDMETHOD(QueryScopeTree)(/*[out]*/ IScopeTree** ppScopeTree) = 0;
  407. /*[helpstring("Set the console name space.")]*/
  408. STDMETHOD(SetScopeTree)(/*[in]*/ IScopeTree* pScopeTree) = 0;
  409. /*[helpstring("Creates image list for the scope pane.")]*/
  410. STDMETHOD(CreateScopeImageList)(/*[in]*/ REFCLSID refClsidSnapIn) = 0;
  411. /*[helpstring("bExtension is TRUE if this IFrame is used by an extension.")]*/
  412. STDMETHOD(SetUsedByExtension)(/*[in]*/ BOOL bExtension) = 0;
  413. /*[helpstring("Init view data.")]*/
  414. STDMETHOD(InitViewData)(/*[in]*/ LONG_PTR lViewData) = 0;
  415. /*[helpstring("Clean up view data.")]*/
  416. STDMETHOD(CleanupViewData)(/*[in]*/ LONG_PTR lViewData) = 0;
  417. /*[helpstring("Reset the sort parameters after a selection change.")]*/
  418. STDMETHOD(ResetSortParameters)() = 0;
  419. };
  420. // helpstring("IScopeDataPrivate Interface"),
  421. MMC_INTERFACE(IScopeDataPrivate, 60BD2FE0-F7C5-11cf-8AFD-00AA003CA9F6) : IConsoleNameSpace2
  422. {
  423. };
  424. // helpstring("IImageListPrivate Interface"),
  425. MMC_INTERFACE(IImageListPrivate, 7538C620-0083-11d0-8B00-00AA003CA9F6) : IImageList
  426. {
  427. /*[helpstring("Private tree control method used to map images on callbacks")]*/
  428. STDMETHOD(MapRsltImage)(COMPONENTID id, /*[in]*/ int nSnapinIndex, /*[out]*/ int* pnConsoleIndex) = 0;
  429. /*[helpstring("Private tree control method used to map images on callbacks")]*/
  430. STDMETHOD(UnmapRsltImage)(COMPONENTID id, /*[in]*/ int nConsoleIndex, /*[out]*/ int* pnSnapinIndex) = 0;
  431. };
  432. // helpstring("IResultDataPrivate Interface"),
  433. MMC_INTERFACE(IResultDataPrivate, 1EBA2300-0854-11d0-8B03-00AA003CA9F6) : IResultData2
  434. {
  435. /*[helpstring("Get the list view style.")]*/
  436. STDMETHOD(GetListStyle)(/*[out]*/ long * pStyle) = 0;
  437. /*[helpstring("Set the list view style.")]*/
  438. STDMETHOD(SetListStyle)(/*[in]*/ long Style) = 0;
  439. /*[helpstring("Set loading mode of list")]*/
  440. STDMETHOD(SetLoadMode)(/*[in]*/ BOOL bState) = 0;
  441. /*[helpstring("Arrange the icons in the result pane")]*/
  442. STDMETHOD(Arrange)(long style) = 0;
  443. /*[helpstring("Sort from the Listview header control")]*/
  444. STDMETHOD(InternalSort)(INT nCol, DWORD dwSortOptions, LPARAM lUserParam, BOOL bColumnClicked) = 0;
  445. /*[helpstring("Private tree control method used to reset the result view")]*/
  446. STDMETHOD(ResetResultData)() = 0;
  447. /*[helpstring("Private listview method to retrieve sort column")]*/
  448. STDMETHOD(GetSortColumn)(INT* pnCol) = 0;
  449. /*[helpstring("Private listview method to retrieve sort column")]*/
  450. STDMETHOD(GetSortDirection)(BOOL* pbAscending) = 0;
  451. };
  452. // helpstring("IHeaderCtrlPrivate Interface that adds to IHeaderCtrl methods"),
  453. MMC_INTERFACE(IHeaderCtrlPrivate, 0B384311-701B-4e8a-AEC2-DA6321E27AD2) : IHeaderCtrl2
  454. {
  455. /*[helpstring("Get the number of columns in list view.")]*/
  456. STDMETHOD(GetColumnCount)(/*[in]*/INT* pnCol) = 0;
  457. /*[helpstring("Get the current column settings from list view header.")]*/
  458. STDMETHOD(GetColumnInfoList)(/*[out]*/ CColumnInfoList *pColumnsList) = 0;
  459. /*[helpstring("Modify the columns in list view with given data.")]*/
  460. STDMETHOD(ModifyColumns)(/*[in]*/ const CColumnInfoList& columnsList) = 0;
  461. /*[helpstring("Get the column settings that snapin supplied originally")]*/
  462. STDMETHOD(GetDefaultColumnInfoList)(/*[out]*/ CColumnInfoList& columnsList) = 0;
  463. };
  464. // helpstring("Minimum master tree control methods required by node manager."),
  465. MMC_INTERFACE(IScopeTree, d8dbf067-5fb2-11d0-a986-00c04fd8d565) : IUnknown
  466. {
  467. /*[helpstring("Initialize scope tree with the document.")]*/
  468. STDMETHOD(Initialize)(/*[in]*/ HWND hFrameWindow, /*[in]*/ IStringTablePrivate* pStringTable) = 0;
  469. /*[helpstring("Query for an iterator to the master tree items.")]*/
  470. STDMETHOD(QueryIterator)(/*[out]*/IScopeTreeIter** lpIter) = 0;
  471. /*[helpstring("Query for an node callback interface to access HNODE items.")]*/
  472. STDMETHOD(QueryNodeCallback)(/*[out]*/ INodeCallback** ppNodeCallback) = 0;
  473. /*[helpstring("Create a node from the master tree node.")]*/
  474. STDMETHOD(CreateNode)(/*[in]*/ HMTNODE hMTNode, /*[in]*/ LONG_PTR lViewData,
  475. /*[in]*/ BOOL fRootNode, /*[out]*/ HNODE* phNode) = 0;
  476. /*[helpstring("Do cleanup needed prior to deleting/shutting down view.")]*/
  477. STDMETHOD(CloseView)(/*[in]*/ int nView) = 0;
  478. /*[helpstring("Delete all view data for the specified view id.")]*/
  479. STDMETHOD(DeleteView)(/*[in]*/ int nView) = 0;
  480. /*[helpstring("Create a node from the master tree node.")]*/
  481. STDMETHOD(DestroyNode)(/*[in]*/ HNODE hNode) = 0;
  482. /*[helpstring("Finds the node that matches the ID")]*/
  483. STDMETHOD(Find)(/*[in]*/ MTNODEID mID, /*[out]*/ HMTNODE* phMTNode) = 0;
  484. /*[helpstring("Create a node from the master tree node.")]*/
  485. STDMETHOD(GetImageList)(/*[out]*/ PLONG_PTR plImageList) = 0;
  486. /*[helpstring("Run snap-in manager")]*/
  487. STDMETHOD(RunSnapIn)(/*[in]*/ HWND hwndParent) = 0;
  488. /*[helpstring("Returns the version for the file rooted at the given storage.")]*/
  489. STDMETHOD(GetFileVersion)(/*[in]*/ IStorage* pstgRoot, /*[out]*/ int* pnVersion) = 0;
  490. /*[helpstring("Returns the MTNODEID for the node represented by a bookmark")]*/
  491. STDMETHOD(GetNodeIDFromBookmark)(/*[in]*/ HBOOKMARK hbm, /*[out]*/ MTNODEID* pID, /*[out]*/ bool& bExactMatchFound) = 0;
  492. /*[helpstring("Loads a bookmark from a stream and returns the MTNODEID for the node.")]*/
  493. STDMETHOD(GetNodeIDFromStream)(/*[in]*/ IStream *pStm, /*[out]*/ MTNODEID* pID) = 0;
  494. /*[helpstring("Loads a bookmark from a stream and returns the MTNODEID for the node.")]*/
  495. STDMETHOD(GetNodeFromBookmark)(/*[in]*/ HBOOKMARK hbm, /*[in]*/CConsoleView *pConsoleView, /*[out]*/ PPNODE ppNode, /*[out]*/ bool& bExactMatchFound) = 0;
  496. /*[helpstring("Returns the ID path for the given ID")]*/
  497. STDMETHOD(GetIDPath)(/*[in]*/ MTNODEID id, /*[out]*/ MTNODEID** ppIDs, /*[out]*/ long* pLength) = 0;
  498. /*[helpstring("Check to see if synchronous node expansion is required")]*/
  499. STDMETHOD(IsSynchronousExpansionRequired)() = 0;
  500. /*[helpstring("Sets whether synchronous node expansion is required")]*/
  501. STDMETHOD(RequireSynchronousExpansion)(/*[in]*/ BOOL fRequireSyncExpand) = 0;
  502. /*[helpstring("Sets the SConsoleData to use for this scope tree")]*/
  503. STDMETHOD(SetConsoleData)(/*[in]*/ LPARAM lConsoleData) = 0;
  504. /*[helpstring("Persists the tree to/from an XML document")]*/
  505. STDMETHOD(Persist)(/*[in]*/ HPERSISTOR hPersistor) = 0;
  506. /*[helpstring("Get path between two nodes as a string")]*/
  507. STDMETHOD(GetPathString)(/*[in]*/ HMTNODE hmtnRoot, /*[in]*/ HMTNODE hmtnLeaf, /*[out]*/ LPOLESTR* pPath) = 0;
  508. /*[helpstring("Get the SnapIns object")]*/
  509. STDMETHOD(QuerySnapIns)(/*[out]*/ SnapIns **ppSnapIns) = 0;
  510. /*[helpstring("Get the ScopeNamespace object")]*/
  511. STDMETHOD(QueryScopeNamespace)(/*[out]*/ ScopeNamespace **ppScopeNamespace) = 0;
  512. /*[helpstring("Create an empty Properties object")]*/
  513. STDMETHOD(CreateProperties)(/*[out]*/ Properties **ppProperties) = 0;
  514. /*[helpstring("Get scope node id for Node object")]*/
  515. STDMETHOD(GetNodeID)(/*[in]*/ PNODE pNode, /*[out]*/ MTNODEID *pID) = 0;
  516. /*[helpstring("Get HMTNODE for Node object")]*/
  517. STDMETHOD(GetHMTNode)(/*[in]*/ PNODE pNode, /*[out]*/ HMTNODE *phMTNode) = 0;
  518. /*[helpstring("Get Node object ptr for scope node")]*/
  519. STDMETHOD(GetMMCNode)(/*[in]*/ HMTNODE hMTNode, /*[out]*/ PPNODE ppNode) = 0;
  520. /*[helpstring("Get NODE object for Root Node")]*/
  521. STDMETHOD(QueryRootNode)(/*[out]*/ PPNODE ppNode) = 0;
  522. /*[helpstring("Check if snapin is used by MMC")]*/
  523. STDMETHOD(IsSnapinInUse)(/*[in]*/ REFCLSID refClsidSnapIn, /*[out]*/ PBOOL pbInUse) = 0;
  524. };
  525. // helpstring("Master tree item iterator."),
  526. MMC_INTERFACE(IScopeTreeIter, d779f8d1-6057-11d0-a986-00c04fd8d565) : IUnknown
  527. {
  528. /*[helpstring("Sets the current master tree node.")]*/
  529. STDMETHOD(SetCurrent)(/*[in]*/ HMTNODE hStartMTNode) = 0;
  530. /*[helpstring("Moves the iterator forward to the next master node
  531. sibling and returns a pointer to the new "current". NULL if none")]*/
  532. STDMETHOD(Next)(/*[out]*/ HMTNODE* phScopeItem) = 0;
  533. /*[helpstring("Moves the iterator backward to the prev master node
  534. sibling and returns a pointer to the new "current". NULL if none")]*/
  535. STDMETHOD(Prev)(/*[out]*/ HMTNODE* phScopeItem) = 0;
  536. /*[helpstring("Returns the child master node.")]*/
  537. STDMETHOD(Child)(/*[out]*/ HMTNODE* phsiChild) = 0;
  538. /*[helpstring("Returns the last child master node.")]*/
  539. STDMETHOD(LastChild)(/*[out]*/ HMTNODE* phsiLastChild) = 0;
  540. };
  541. // helpstring("Node callback methods."),
  542. MMC_INTERFACE(INodeCallback, b241fced-5fb3-11d0-a986-00c04fd8d565) : IUnknown
  543. {
  544. /*[helpstring("Initialize with the scope tree.")]*/
  545. STDMETHOD(Initialize)(/*[in]*/ IScopeTree* pIScopeTree) = 0;
  546. /*[helpstring("Returns the images for this node.")]*/
  547. STDMETHOD(GetImages)(/*[in]*/ HNODE hNode, /*[out]*/ int* iImage, int* iSelectedImage) = 0;
  548. /*[helpstring("Returns the display name for node.")]*/
  549. STDMETHOD(GetDisplayName)(/*[in]*/ HNODE hNode, /*[out]*/ tstring& strName) = 0;
  550. /*[helpstring("Returns the custom window title for this node")]*/
  551. STDMETHOD(GetWindowTitle)(/*[in]*/ HNODE hNode, /*[out]*/ tstring& strTitle) = 0;
  552. /*[helpstring("Handles callback for result items")]*/
  553. STDMETHOD(GetDispInfo)(/*[in]*/ HNODE hNode, /*[in,out]*/ LVITEMW* plvi) = 0;
  554. /*[helpstring("Returns the UI state of master node.")]*/
  555. STDMETHOD(GetState)(/*[in]*/ HNODE hNode, /*[out]*/ UINT* pnState) = 0;
  556. /*[helpstring("Returns the result pane for the node.")]*/
  557. STDMETHOD(GetResultPane)(/*[in]*/ HNODE hNode, /*[in, out]*/ CResultViewType& rvt,
  558. /*[out]*/ GUID *pGuidTaskpadID) = 0;
  559. /*[helpstring("Asks the snapin to restore its result pane with given data")]*/
  560. STDMETHOD(RestoreResultView)(/*[in]*/HNODE hNode, /*[in]*/const CResultViewType& rvt) = 0;
  561. /*[helpstring("Returns the result pane OCX control for the node.")]*/
  562. STDMETHOD(GetControl)(/*[in]*/ HNODE hNode, /*[in]*/ CLSID clsid, /*[out]*/IUnknown **ppUnkControl) = 0;
  563. /*[helpstring("Sets the result pane OCX control for the node.")]*/
  564. STDMETHOD(SetControl)(/*[in]*/ HNODE hNode, /*[in]*/ CLSID clsid, /*[in]*/IUnknown* pUnknown) = 0;
  565. /*[helpstring("Returns the result pane OCX control for the node.")]*/
  566. STDMETHOD(GetControl)(/*[in]*/ HNODE hNode, /*[in]*/LPUNKNOWN pUnkOCX, /*[out]*/IUnknown **ppUnkControl) = 0;
  567. /*[helpstring("Sets the result pane OCX control for the node.")]*/
  568. STDMETHOD(SetControl)(/*[in]*/ HNODE hNode, /*[in]*/LPUNKNOWN pUnkOCX, /*[in]*/IUnknown* pUnknown) = 0;
  569. /*[helpstring("Sends the MMCN_INITOCX notification to the appropriate snapin")]*/
  570. STDMETHOD(InitOCX)(/*[in]*/ HNODE hNode, /*[in]*/ IUnknown* pUnknown) = 0;
  571. /*[helpstring("Set the Result Item ID")]*/
  572. //RENAME// STDMETHOD(SetItemID)(/*[in]*/ HNODE hNode, /*[in]*/ HRESULTITEM riID) = 0;
  573. STDMETHOD(SetResultItem)(/*[in]*/ HNODE hNode, /*[in]*/ HRESULTITEM hri) = 0;
  574. /*[helpstring("Get the Result Item ID")]*/
  575. //RENAME// STDMETHOD(GetItemID)(/*[in]*/ HNODE hNode, /*[out]*/ HRESULTITEM* priID) = 0;
  576. STDMETHOD(GetResultItem)(/*[in]*/ HNODE hNode, /*[out]*/ HRESULTITEM* phri) = 0;
  577. /*[helpstring("Returns the nodes unique ID")]*/
  578. //RENAME// STDMETHOD(GetID)(/*[in]*/ HNODE hNode, /*[out]*/ MTNODEID* pnID) = 0;
  579. STDMETHOD(GetMTNodeID)(/*[in]*/ HNODE hNode, /*[out]*/ MTNODEID* pnID) = 0;
  580. /*[helpstring("Determine if node is the target of another")]*/
  581. STDMETHOD(IsTargetNodeOf)(/*[in]*/ HNODE hNode, /*[in]*/ HNODE hTestNode) = 0;
  582. /*[helpstring("Returns the nodes static parents MTNODEID and the subsequent path")]*/
  583. STDMETHOD(GetPath)(/*[in]*/ HNODE hNode, /*[in]*/ HNODE hRootNode, /*[out]*/ BYTE* pbm_) = 0;
  584. /*[helpstring("Returns the static parent nodes unique ID")]*/
  585. STDMETHOD(GetStaticParentID)(/*[in]*/ HNODE hNode, /*[out]*/ MTNODEID* pnID) = 0;
  586. /*[helpstring("Notify")]*/
  587. STDMETHOD(Notify)(/*[in]*/ HNODE hNode, /*[in]*/ NCLBK_NOTIFY_TYPE event,
  588. /*[in]*/ LPARAM arg, /*[in]*/ LPARAM param) = 0;
  589. /*[helpstring("Returns the parent master node.")]*/
  590. STDMETHOD(GetMTNode)(/*[in]*/ HNODE hNode, /*[out]*/ HMTNODE* phMTNode) = 0;
  591. /*[helpstring("The HMTNODE path to the node is returned in pphMTNode")]*/
  592. STDMETHOD(GetMTNodePath)(/*[in]*/ HNODE hNode, /*[out]*/ HMTNODE** pphMTNode,
  593. /*[out]*/ long* plLength) = 0;
  594. /*[helpstring("Get node's owner ID")]*/
  595. STDMETHOD(GetNodeOwnerID)(/*[in]*/ HNODE hNode, /*[out]*/ COMPONENTID* pID) = 0;
  596. /*[helpstring("Get node's cookie")]*/
  597. STDMETHOD(GetNodeCookie)(/*[in]*/ HNODE hNode, /*[out]*/ MMC_COOKIE* lpCookie) = 0;
  598. /*[helpstring("Returns S_OK if the node can possibly be expanded, and S_FALSE otherwise.")]*/
  599. STDMETHOD(IsExpandable)(/*[in]*/ HNODE hNode) = 0;
  600. /*[helpstring("Return the dataobject for the selected item")]*/
  601. // cookie valid if bScope & bMultiSel are both FALSE.
  602. // cookie is the index\lParam for virtual\regular LV
  603. STDMETHOD(GetDragDropDataObject)(/*[in]*/ HNODE hNode, /*[in]*/ BOOL bScope, /*[in]*/ BOOL bMultiSel,
  604. /*[in]*/ LONG_PTR lvData, /*[out]*/ LPDATAOBJECT* ppDataObject,
  605. /*[out]*/ bool& bCopyAllowed, /*[out]*/ bool& bMoveAllowed) = 0;
  606. /*[helpstring("Returns the task enumerator.")]*/
  607. STDMETHOD(GetTaskEnumerator)(/*[in]*/ HNODE hNode, /*[in]*/ LPCOLESTR pszTaskGroup,
  608. /*[out]*/ IEnumTASK** ppEnumTask) = 0;
  609. /*[helpstring("UpdateWindowLayout.")]*/
  610. STDMETHOD(UpdateWindowLayout)(/*[in]*/ LONG_PTR lViewData, /*[in]*/ long lToolbarsDisplayed) = 0;
  611. /*[helpstring("AddCustomFolderImage")]*/
  612. STDMETHOD(AddCustomFolderImage)(/*[in]*/ HNODE hNode,
  613. /*[in]*/ IImageListPrivate* pImageList) = 0;
  614. /*[helpstring("preloads the node if necessary")]*/
  615. STDMETHOD(PreLoad)(/*[in]*/ HNODE hNode) = 0;
  616. /*[helpstring("Get the TaskPad ListView information")]*/
  617. STDMETHOD(GetListPadInfo)(/*[in]*/ HNODE hNode,
  618. /*[in]*/ IExtendTaskPad* pExtendTaskPad,
  619. /*[in,string]*/ LPCOLESTR szTaskGroup,
  620. /*[out]*/ MMC_ILISTPAD_INFO* pIListPadInfo) = 0;
  621. /*[helpstring("Sets Task Pads list view")]*/
  622. STDMETHOD(SetTaskPadList)(/*[in]*/ HNODE hNode, /*[in]*/ LPUNKNOWN pUnknown) = 0;
  623. /*[helpstring("Sets up a specific taskpad, given the GUID identifier.")]*/
  624. STDMETHOD(SetTaskpad)(/*[in]*/ HNODE hNodeSelected, /*[in]*/ GUID *pGuidTaskpad) = 0;
  625. /*[helpstring("Invokes the Customize View dialog")]*/
  626. STDMETHOD(OnCustomizeView)(/*[in]*/ LONG_PTR lViewData) = 0;
  627. /*[helpstring("Set the view settings for a particular node.")]*/
  628. STDMETHOD(SetViewSettings)(/*[in]*/ int nViewID, /*[in]*/ HBOOKMARK hbm, /*[in]*/ HVIEWSETTINGS hvs) = 0;
  629. /*[helpstring("Execute given verb for given scope item")]*/
  630. STDMETHOD(ExecuteScopeItemVerb)(/*[in]*/ MMC_CONSOLE_VERB verb, /*[in]*/ HNODE hNode, /*[in]*/LPOLESTR lpszNewName) = 0;
  631. /*[helpstring("Execute given verb for selected result item(s)")]*/
  632. STDMETHOD(ExecuteResultItemVerb)(/*[in]*/ MMC_CONSOLE_VERB verb, /*[in]*/ HNODE hNode, /*[in]*/LPARAM lvData, /*[in]*/LPOLESTR lpszNewName) = 0;
  633. /*[helpstring("Get the disp interface for given scope node object")]*/
  634. STDMETHOD(QueryCompDataDispatch)(/*[in]*/ PNODE pNode, /*[out]*/ PPDISPATCH ScopeNodeObject) = 0;
  635. /*[helpstring("Get the disp interface for selected resultpane objects")]*/
  636. STDMETHOD(QueryComponentDispatch)(/*[in]*/ HNODE hNode, /*[in]*/LPARAM lvData, /*[out]*/ PPDISPATCH SelectedObject) = 0;
  637. /*[helpstring("Creates a context menu for the specified node.")]*/
  638. STDMETHOD(CreateContextMenu)( PNODE pNode, HNODE hNode, PPCONTEXTMENU ppContextMenu) = 0;
  639. /*[helpstring("Creates a context menu for the current selection node.")]*/
  640. STDMETHOD(CreateSelectionContextMenu)( HNODE hNodeScope, CContextMenuInfo *pContextInfo, PPCONTEXTMENU ppContextMenu) = 0;
  641. /*[helpstring("show/hide column")]*/
  642. STDMETHOD(ShowColumn)(HNODE hNodeSelected, int iColIndex, bool bShow) = 0;
  643. /*[helpstring("to get the sort column")]*/
  644. STDMETHOD(GetSortColumn)(HNODE hNodeSelected, int *piSortCol) = 0;
  645. /*[helpstring("to set the sort column")]*/
  646. STDMETHOD(SetSortColumn)(HNODE hNodeSelected, int iSortCol, bool bAscending) = 0;
  647. /*[helpstring("Returns the data for the specified clipboard format of the specified list item")*/
  648. STDMETHOD(GetProperty)(/*[in]*/ HNODE hNodeScope, /*[in]*/ BOOL bForScopeItem, /*[in]*/ LPARAM resultItemParam, /*[in]*/ BSTR bstrPropertyName,
  649. /*[out]*/ PBSTR pbstrPropertyValue) =0;
  650. /*[helpstring("Returns the nodetype GUID identifier of the specified list item")*/
  651. STDMETHOD(GetNodetypeForListItem)(/*[in]*/ HNODE hNodeScope, /*[in]*/ BOOL bForScopeItem, /*[in]*/ LPARAM resultItemParam, /*[in]*/ PBSTR pbstrNodetype) =0;
  652. /* returns view extension by inserting them to provided iterator */
  653. STDMETHOD(GetNodeViewExtensions)(/*[in]*/ HNODE hNodeScope, /*[out]*/ CViewExtInsertIterator it) = 0;
  654. /* Inform nodemgr that the column data for given node has changed & to save the data */
  655. STDMETHOD(SaveColumnInfoList) (/*[in]*/HNODE hNode, /*[in]*/const CColumnInfoList& columnsList) = 0;
  656. /* Ask nodemgr for column-data (no sort data) to setup the headers. */
  657. STDMETHOD(GetPersistedColumnInfoList) (/*[in]*/HNODE hNode, /*[out]*/CColumnInfoList *pColumnsList) = 0;
  658. /* Inform nodemgr that the column data for given node is invalid. */
  659. STDMETHOD(DeletePersistedColumnData) (/*[in]*/HNODE hNode) = 0;
  660. /* Does about object exists for the snapin whose node is provided. */
  661. STDMETHOD(DoesAboutExist) (/*[in]*/HNODE hNode, /*[out]*/ bool *pbAboutExists) = 0;
  662. /* Show about box for given context. */
  663. STDMETHOD(ShowAboutInformation) (/*[in]*/HNODE hNode) = 0;
  664. /*Executes a shell command with the specified parameters in the specified directory with the correct window size*/
  665. STDMETHOD(ExecuteShellCommand)(/*[in]*/ HNODE hNode, /*[in]*/ BSTR Command, /*[in]*/ BSTR Directory, /*[in]*/ BSTR Parameters, /*[in]*/ BSTR WindowState) = 0;
  666. /*Given the context update the paste button.*/
  667. STDMETHOD(UpdatePasteButton)(/*[in]*/ HNODE hNode, /*[in]*/ BOOL bScope, /*[in]*/ LPARAM lCookie) = 0;
  668. /*Findout if current selection context can allow given dataobject to be pasted.*/
  669. STDMETHOD(QueryPaste)(/*[in]*/ HNODE hNode, /*[in]*/ BOOL bScope, /*[in]*/ LPARAM lCookie, /*[in]*/ IDataObject *pDataObject, /*[out]*/bool& bPasteAllowed, /*[out]*/ bool& bCopyOperatationIsDefault) = 0;
  670. /*Findout if current selection context can allow given dataobject to be pasted.*/
  671. STDMETHOD(QueryPasteFromClipboard)(/*[in]*/ HNODE hNode, /*[in]*/ BOOL bScope, /*[in]*/ LPARAM lCookie, /*[out]*/bool& bPasteAllowed) = 0;
  672. /*Given the current drop target (or paste target) context paste the given data object or the one from clipboard*/
  673. STDMETHOD(Drop) (/*[in]*/HNODE hNode, /*[in]*/BOOL bScope, /*[in]*/LPARAM lCookie, /*[in]*/IDataObject *pDataObjectToPaste, /*[in]*/BOOL bIsDragOperationMove) = 0;
  674. /*Given the current drop target (or paste target) context paste the given data object or the one from clipboard*/
  675. STDMETHOD(Paste) (/*[in]*/HNODE hNode, /*[in]*/BOOL bScope, /*[in]*/LPARAM lCookie) = 0;
  676. /*Get the IPersistStream of the CViewSettingsPersistor object for loading the settings.*/
  677. STDMETHOD(QueryViewSettingsPersistor) (/*[out]*/IPersistStream** ppStream) = 0;
  678. /*Get the IXMLObject of the CViewSettingsPersistor object for storing/loading the settings.*/
  679. STDMETHOD(QueryViewSettingsPersistor) (/*[out]*/CXMLObject** ppXMLObject) = 0;
  680. /*Inform nodemgr that the document is closing, do any cleanups.*/
  681. STDMETHOD(DocumentClosing) () = 0;
  682. // Given the node get the snapin name
  683. STDMETHOD(GetSnapinName)(/*[in]*/HNODE hNode, /*[out]*/LPOLESTR* ppszName, /*[out]*/ bool& bValidName) = 0;
  684. // Given the node see if it is dummy snapin
  685. STDMETHOD(IsDummySnapin)(/*[in]*/HNODE hNode, /*[out]*/bool& bDummySnapin) = 0;
  686. // See if the snapin supports MMC1.0 version of help (MMCN_SNAPINHELP)
  687. STDMETHOD(DoesStandardSnapinHelpExist)(/*[in]*/HNODE hNode, /*[out]*/bool& bStandardHelpExists) = 0;
  688. };
  689. // helpstring("IControlbarsCache Interface"),
  690. MMC_INTERFACE(IControlbarsCache, 2e9fcd38-b9a0-11d0-a79d-00c04fd8d565) : IUnknown
  691. {
  692. /*[helpstring("Detaches all the controlbars.")]*/
  693. STDMETHOD(DetachControlbars)() = 0;
  694. };
  695. typedef enum _EXTESION_TYPE
  696. {
  697. EXTESION_NAMESPACE = 0x1,
  698. EXTESION_CONTEXTMENU = 0x2,
  699. EXTESION_TOOLBAR = 0x3,
  700. EXTESION_PROPERTYSHEET = 0x4,
  701. } EXTESION_TYPE;
  702. // helpstring("INodeType Interface"),
  703. MMC_INTERFACE(INodeType, B08A8368-967F-11D0-A799-00C04FD8D565) : IUnknown
  704. {
  705. STDMETHOD(GetNodeTypeID)(/*[out]*/ GUID* pGUID) = 0;
  706. STDMETHOD(AddExtension)(/*[in]*/ GUID guidSnapIn,
  707. /*[in]*/ EXTESION_TYPE extnType) = 0;
  708. STDMETHOD(RemoveExtension)(/*[in]*/ GUID guidSnapIn,
  709. /*[in]*/ EXTESION_TYPE extnType) = 0;
  710. STDMETHOD(EnumExtensions)(/*[in]*/ EXTESION_TYPE extnType,
  711. /*[out]*/ IEnumGUID** ppEnumGUID) = 0;
  712. };
  713. // helpstring("INodeTypesCache Interface"),
  714. MMC_INTERFACE(INodeTypesCache, DE40436E-9671-11D0-A799-00C04FD8D565) : IUnknown
  715. {
  716. STDMETHOD(CreateNodeType)(/*[in]*/ GUID guidNodeType,
  717. /*[out]*/ INodeType** ppNodeType) = 0;
  718. STDMETHOD(DeleteNodeType)(/*[in]*/ GUID guidNodeType) = 0;
  719. STDMETHOD(EnumNodeTypes)(/*[out]*/ IEnumNodeTypes** ppEnumNodeTypes) = 0;
  720. };
  721. MMC_INTERFACE(IEnumNodeTypes, ABBD61E6-9686-11D0-A799-00C04FD8D565) : IUnknown
  722. {
  723. STDMETHOD(Next)(/*[in]*/ ULONG celt,
  724. /*[out, size_is(celt), length_is(*pceltFetched)]*/ INodeType*** rgelt,
  725. /*[out]*/ ULONG *pceltFetched) = 0;
  726. STDMETHOD(Skip)(/*[in]*/ ULONG celt) = 0;
  727. STDMETHOD(Reset)() = 0;
  728. STDMETHOD(Clone)(/*[out]*/ IEnumNodeTypes **ppenum) = 0;
  729. };
  730. class CBasicSnapinInfo
  731. {
  732. public:
  733. CBasicSnapinInfo() : m_clsid(GUID_NULL), m_nImageIndex(-1) {}
  734. public:
  735. CLSID m_clsid;
  736. std::wstring m_strName;
  737. int m_nImageIndex;
  738. };
  739. class CAvailableSnapinInfo
  740. {
  741. public:
  742. CAvailableSnapinInfo (bool f32Bit) : m_cTotalSnapins(0), m_himl(NULL), m_f32Bit(f32Bit) {}
  743. ~CAvailableSnapinInfo()
  744. {
  745. if (m_himl != NULL)
  746. ImageList_Destroy (m_himl);
  747. }
  748. public:
  749. std::vector<CBasicSnapinInfo> m_vAvailableSnapins; // snap-ins that are available in the requested memory model
  750. UINT m_cTotalSnapins; // total number of snap-ins referenced in the console file
  751. HIMAGELIST m_himl; // images for snap-ins in m_vAvailableSnapins
  752. const bool m_f32Bit; // check 32-bit (vs. 64-bit) snap-ins?
  753. };
  754. // helpstring("IDumpSnapins Interface"),
  755. MMC_INTERFACE(IDumpSnapins, A16496D0-1D2F-11d3-AEB8-00C04F8ECD78) : IUnknown
  756. {
  757. STDMETHOD(Dump)(/*[in]*/ LPCTSTR pszDumpFilePath) = 0;
  758. STDMETHOD(CheckSnapinAvailability)(/*[in/out]*/ CAvailableSnapinInfo& asi) = 0;
  759. };
  760. MMC_INTERFACE(IPropertySheetProviderPrivate, FEF554F8-A55A-11D0-A7D7-00C04FD909DD) : IPropertySheetProvider
  761. {
  762. STDMETHOD(ShowEx)(/*[in]*/ HWND hwnd, /*[in]*/ int page, /*[in]*/ BOOL bModalPage) = 0;
  763. STDMETHOD(CreatePropertySheetEx)(
  764. /*[in]*/ LPCWSTR title,
  765. /*[in]*/ boolean type,
  766. /*[in]*/ MMC_COOKIE cookie,
  767. /*[in]*/ LPDATAOBJECT pIDataObject,
  768. /*[in]*/ LONG_PTR lpMasterTreeNode,
  769. /*[in]*/ DWORD dwOptions) = 0;
  770. /*[helpstring("Collects the pages from the extension snap-in(s)")]*/
  771. STDMETHOD(AddMultiSelectionExtensionPages)(LONG_PTR lMultiSelection) = 0;
  772. /*[helpstring("Determine if the property sheet exist")]*/
  773. STDMETHOD(FindPropertySheetEx)(/*[in]*/ MMC_COOKIE cookie, /*[in]*/ LPCOMPONENT lpComponent,
  774. /*[in]*/ LPCOMPONENTDATA lpComponentData, /*[in]*/ LPDATAOBJECT lpDataObject) = 0;
  775. /*[helpstring("Set data required for property sheet tooltips")]*/
  776. STDMETHOD(SetPropertySheetData)(/*[in]*/ INT nPropSheetType, /*[in]*/ HMTNODE hMTNode) = 0;
  777. };
  778. const long CCLV_HEADERPAD = 25;
  779. // helpstring("MMC Default listview interface"),
  780. MMC_INTERFACE(IMMCListView, 1B3C1392-D68B-11CF-8C2B-00AA003CA9F6) : IUnknown
  781. {
  782. STDMETHOD(GetListStyle)( void ) = 0;
  783. STDMETHOD(SetListStyle)(
  784. /*[in]*/ long nNewValue ) = 0;
  785. STDMETHOD(GetViewMode)( void ) = 0;
  786. STDMETHOD(SetViewMode)(
  787. /*[in]*/ long nViewMode ) = 0;
  788. STDMETHOD(InsertItem)(
  789. /*[in]*/ LPOLESTR str,
  790. /*[in]*/ long iconNdx,
  791. /*[in]*/ LPARAM lParam,
  792. /*[in]*/ long state,
  793. /*[in]*/ long ownerID,
  794. /*[in]*/ long itemIndex,
  795. /*[out]*/ CResultItem*& pri) = 0;
  796. /* parameter changed to HRESULTITEM, not to use the CResultItem*
  797. pointer until we know it is not a virtual list */
  798. STDMETHOD(DeleteItem)(
  799. /*[in]*/ HRESULTITEM itemID,
  800. /*[in]*/ long nCol) = 0;
  801. STDMETHOD(FindItemByLParam)(
  802. /*[in]*/ long owner,
  803. /*[in]*/ LPARAM lParam,
  804. /*[out]*/ CResultItem*& pri) = 0;
  805. STDMETHOD(InsertColumn)(
  806. /*[in]*/ int nCol,
  807. /*[in]*/ LPCOLESTR str,
  808. /*[in]*/ long nFormat,
  809. /*[in]*/ long width) = 0;
  810. STDMETHOD(DeleteColumn)(
  811. /*[in]*/ int nCol) = 0;
  812. STDMETHOD(DeleteAllItems)(
  813. /*[in]*/ long ownerID) = 0;
  814. STDMETHOD(SetColumn)(
  815. /*[in]*/ long nCol,
  816. /*[in]*/ LPCOLESTR str,
  817. /*[in]*/ long nFormat,
  818. /*[in]*/ long width) = 0;
  819. STDMETHOD(GetColumn)(
  820. /*[in]*/ long nCol,
  821. /*[out]*/ LPOLESTR* str,
  822. /*[out]*/ long* nFormat,
  823. /*[out]*/ int* width) = 0;
  824. STDMETHOD(GetColumnCount)(
  825. /*[out]*/ int* nColCnt) = 0;
  826. STDMETHOD(SetItem)(
  827. /*[in]*/ int nIndex,
  828. /*[in]*/ CResultItem* pri,
  829. /*[in]*/ long nCol,
  830. /*[in]*/ LPOLESTR str,
  831. /*[in]*/ long nImage,
  832. /*[in]*/ LPARAM lParam,
  833. /*[in]*/ long nState,
  834. /*[in]*/ long ownerID) = 0;
  835. STDMETHOD(GetItem)(
  836. /*[in]*/ int nIndex,
  837. /*[in]*/ CResultItem*& pri,
  838. /*[in]*/ long nCol,
  839. /*[out]*/ LPOLESTR* str,
  840. /*[out]*/ int* nImage,
  841. /*[in]*/ LPARAM* lParam,
  842. /*[out]*/ unsigned int* nState,
  843. /*[out]*/ BOOL* pbScopeItem) = 0;
  844. STDMETHOD(GetNextItem)(
  845. /*[in]*/ COMPONENTID ownerID,
  846. /*[in]*/ long nIndex,
  847. /*[in]*/ UINT nState,
  848. /*[out]*/ CResultItem*& ppListItem,
  849. /*[out]*/ long& nIndexNextItem) = 0;
  850. STDMETHOD(GetLParam)(
  851. /*[in]*/ long nItem,
  852. /*[out]*/ CResultItem*& pri) = 0;
  853. STDMETHOD(ModifyItemState)(
  854. /*[in]*/ long nItem,
  855. /*[in]*/ CResultItem* pri,
  856. /*[in]*/ UINT add,
  857. /*[in]*/ UINT remove) = 0;
  858. STDMETHOD(SetIcon)(
  859. /*[in]*/ long nID,
  860. /*[in]*/ HICON hIcon,
  861. /*[in]*/ long nLoc) = 0;
  862. STDMETHOD(SetImageStrip)(
  863. /*[in]*/ long nID,
  864. /*[in]*/ HBITMAP hbmSmall,
  865. /*[in]*/ HBITMAP hbmLarge,
  866. /*[in]*/ long nStartLoc,
  867. /*[in]*/ long cMask) = 0;
  868. STDMETHOD(MapImage)(
  869. /*[in]*/ long nID,
  870. /*[in]*/ long nLoc,
  871. /*[out]*/ int* pResult) = 0;
  872. STDMETHOD(Reset)() = 0;
  873. STDMETHOD(Arrange)(/*[in]*/ long style) = 0;
  874. STDMETHOD(UpdateItem)(/*[in]*/HRESULTITEM itemID) = 0;
  875. STDMETHOD(Sort)(
  876. /*[in]*/ LPARAM lUserParam,
  877. /*[in]*/ long* pParams) = 0;
  878. STDMETHOD(SetItemCount)(
  879. /*[in]*/ int nItemCount,
  880. /*[in]*/ DWORD dwOptions) = 0;
  881. STDMETHOD(SetVirtualMode)(
  882. /*[in]*/ BOOL bVirtual) = 0;
  883. STDMETHOD(Repaint)(
  884. /*[in]*/ BOOL bErase) = 0;
  885. STDMETHOD(SetChangeTimeOut)(
  886. /*[in]*/ ULONG lTimeout) = 0;
  887. STDMETHOD(SetColumnFilter)(
  888. /*[in]*/ int nCol,
  889. /*[in]*/ DWORD dwType,
  890. /*[in]*/ MMC_FILTERDATA* pFilterData) = 0;
  891. STDMETHOD(GetColumnFilter)(
  892. /*[in]*/ int nCol,
  893. /*[in,out]*/ DWORD* dwType,
  894. /*[in,out]*/ MMC_FILTERDATA* pFilterData) = 0;
  895. STDMETHOD(SetColumnSortIcon)(
  896. /*[in]*/ int nNewCol,
  897. /*[in]*/ int nOldCol,
  898. /*[in]*/ BOOL bAscending,
  899. /*[in]*/ BOOL bSetSortIcon) = 0;
  900. STDMETHOD(SetLoadMode)(
  901. /*[in]*/ BOOL bState) = 0;
  902. /*[helpstring("Get the current list view header settings.")]*/
  903. STDMETHOD(GetColumnInfoList) (/*[out]*/CColumnInfoList *pColumnsList) = 0;
  904. /*[helpstring("Modify the list-view headers with given data.")]*/
  905. STDMETHOD(ModifyColumns) (/*[in]*/const CColumnInfoList& columnsList) = 0;
  906. /* Put the specified list item into rename mode */
  907. STDMETHOD(RenameItem) ( /*[in]*/HRESULTITEM itemID) =0;
  908. /*[helpstring("Get the column settings that snapin supplied originally")]*/
  909. STDMETHOD(GetDefaultColumnInfoList)(/*[out]*/ CColumnInfoList& columnsList) = 0;
  910. };
  911. ///////////////////////////////////////////////////////////////////////////////
  912. ///////////////////////////////////////////////////////////////////////////////
  913. ///////////////////////////////////////////////////////////////////////////////
  914. ///////////////////////////////////////////////////////////////////////////////
  915. ////
  916. //// MMC 1.1 changes
  917. ////
  918. // MMC_ITASK, internal form of MMC_TASK has additional field for classid.
  919. struct MMC_ITASK
  920. {
  921. MMC_TASK task;
  922. LPOLESTR szClsid;
  923. };
  924. // helpstring("Console <=> CIC communication conduit"),
  925. MMC_INTERFACE(ITaskPadHost, 4f7606d0-5568-11d1-9fea-00600832db4a) : IUnknown
  926. {
  927. /*[helpstring("CIC calls this when snapin's script wants to notify the snapin of something")]*/
  928. STDMETHOD(TaskNotify)(/*[in,string]*/ BSTR szClsid, /*[in]*/ VARIANT * pvArg, /*[in]*/ VARIANT * pvParam) = 0;
  929. /*[helpstring("CIC calls this when the script asks for tasks")]*/
  930. STDMETHOD(GetTaskEnumerator)(/*[in]*/ BSTR szTaskGroup, /*[out]*/ IEnumTASK** ppEnumTASK) = 0;
  931. /*[helpstring("Returns the primary snapins IExtendTaskPad")]*/
  932. STDMETHOD(GetPrimaryTask)(/*[out]*/ IExtendTaskPad** ppExtendTaskPad) = 0;
  933. /*[helpstring("Returns the primary snapin's taskpad title")]*/
  934. STDMETHOD(GetTitle)(/*[in]*/ BSTR szTaskGroup, /*[out]*/ BSTR * szTitle) = 0;
  935. /*[helpstring("Descriptive Text for the default task pad.")]*/
  936. STDMETHOD(GetDescriptiveText)(/*[in,string]*/ BSTR pszGroup, /*[out]*/ BSTR * pszDescriptiveText) = 0;
  937. /*[helpstring("Returns the primary snapin's taskpad background image.")]*/
  938. STDMETHOD(GetBackground)(/*[in]*/ BSTR szTaskGroup, /*[out]*/ MMC_TASK_DISPLAY_OBJECT * pTDO) = 0;
  939. // /*[helpstring("Returns the primary snapin's taskpad branding info.")]*/
  940. // STDMETHOD(GetBranding)(/*[in,string]*/ BSTR szGroup, /*[out]*/ MMC_TASK_DISPLAY_OBJECT * pTDO) = 0;
  941. /*[helpstring("Returns the primary snapin's listpad info")]*/
  942. STDMETHOD(GetListPadInfo)(/*[in]*/ BSTR szTaskGroup, /*[out]*/ MMC_ILISTPAD_INFO * pIListPadInfo) = 0;
  943. };
  944. // helpstring("Interface for accessing strings in a console file"),
  945. MMC_INTERFACE(IStringTablePrivate, 461A6010-0F9E-11d2-A6A1-0000F875A9CE) : IUnknown
  946. {
  947. /*[helpstring("Add a string to the snap-in's string table")]*/
  948. STDMETHOD(AddString)(
  949. /*[in]*/ LPCOLESTR pszAdd, // string to add to the string table
  950. /*[out]*/ MMC_STRING_ID* pStringID, // ID of added string
  951. /*[in]*/ const CLSID * pCLSID // CLSID of owner (NULL for MMC)
  952. ) = 0;
  953. /*[helpstring("Retrieves a string from the snap-in's string table")]*/
  954. STDMETHOD(GetString)(
  955. /*[in]*/ MMC_STRING_ID StringID, // ID of string
  956. /*[in]*/ ULONG cchBuffer, // number of characters in lpBuffer
  957. /*[out, size_is(cchBuffer)]*/
  958. LPOLESTR lpBuffer, // string corresponding to wStringID
  959. /*[out]*/ ULONG* pcchOut, // number of characters written to lpBuffer
  960. /*[in]*/ const CLSID * pCLSID // CLSID of owner (NULL for MMC)
  961. ) = 0;
  962. /*[helpstring("Retrieves the length of a string in the snap-in's string table")]*/
  963. STDMETHOD(GetStringLength)(
  964. /*[in]*/ MMC_STRING_ID StringID, // ID of string
  965. /*[out]*/ ULONG* pcchString, // number of characters in string, not including terminator
  966. /*[in]*/ const CLSID * pCLSID // CLSID of owner (NULL for MMC)
  967. ) = 0;
  968. /*[helpstring("Delete a string from the snap-in's string table")]*/
  969. STDMETHOD(DeleteString)(
  970. /*[in]*/ MMC_STRING_ID StringID, // ID of string to delete
  971. /*[in]*/ const CLSID * pCLSID // CLSID of owner (NULL for MMC)
  972. ) = 0;
  973. /*[helpstring("Delete all strings from the snap-in's string table")]*/
  974. STDMETHOD(DeleteAllStrings)(
  975. /*[in]*/ const CLSID * pCLSID // CLSID of owner (NULL for MMC)
  976. ) = 0;
  977. /*[helpstring("Find a string in the snap-in's string table")]*/
  978. STDMETHOD(FindString)(
  979. /*[in]*/ LPCOLESTR pszFind, // string to find in the string table
  980. /*[out]*/ MMC_STRING_ID* pStringID, // ID of string, if found
  981. /*[in]*/ const CLSID * pCLSID // CLSID of owner (NULL for MMC)
  982. ) = 0;
  983. /*[helpstring("Returns an enumerator into a snap-in's string table")]*/
  984. STDMETHOD(Enumerate)(
  985. /*[out]*/ IEnumString** ppEnum, // string enumerator
  986. /*[in]*/ const CLSID * pCLSID // CLSID of owner (NULL for MMC)
  987. ) = 0;
  988. };
  989. ///////////////////////////////////////////////////////////////////////////////
  990. ///////////////////////////////////////////////////////////////////////////////
  991. ///////////////////////////////////////////////////////////////////////////////
  992. ///////////////////////////////////////////////////////////////////////////////
  993. ////
  994. //// MMC 1.2 changes
  995. ////
  996. // ITaskCallback
  997. // helpstring("Task callback. Handles the drawing and selection notifications of tasks"),
  998. MMC_INTERFACE(ITaskCallback, 4b2293ba-e7ba-11d2-883c-00c04f72c717) : IUnknown
  999. {
  1000. /*[helpstring("Determines whether to display "Edit" and "Delete" items for this taskpad.")]*/
  1001. STDMETHOD(IsEditable)() = 0;
  1002. /*[helpstring("Modifies the underlying taskpad.")]*/
  1003. STDMETHOD(OnModifyTaskpad)() = 0;
  1004. /*[helpstring("Deletes the underlying taskpad.")]*/
  1005. STDMETHOD(OnDeleteTaskpad)() = 0;
  1006. /*[helpstring("Gets the GUID identifier of the underlying taskpad.")]*/
  1007. STDMETHOD(GetTaskpadID)(/*[out]*/ GUID *pGuid) = 0;
  1008. };
  1009. // helpstring("Interface for releasing Node Manager's cached com objects"),
  1010. MMC_INTERFACE(IComCacheCleanup, 35FEB982-55E9-483b-BD15-149F3F9E6C63) : IUnknown
  1011. {
  1012. /* gives a chance to release cached OLE objects prior to calling OleUninitialize */
  1013. STDMETHOD(ReleaseCachedOleObjects)() = 0;
  1014. };
  1015. #endif // __ndmgrpriv_h__