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.

1005 lines
41 KiB

  1. //============================================================================
  2. // Copyright (C) Microsoft Corporation, 1997 - 1999
  3. //
  4. // File: tfsint.h
  5. //
  6. // History:
  7. //
  8. // 04/10/97 Kenn Takara Created.
  9. //
  10. //============================================================================
  11. #ifndef _TFSINT_H
  12. #define _TFSINT_H
  13. #if _MSC_VER >= 1000 // VC 5.0 or later
  14. #pragma once
  15. #endif
  16. #ifndef _OLEINT_H
  17. #include "oleint.h"
  18. #endif
  19. #ifndef _TFSGUID_H
  20. #include "tfsguid.h"
  21. #endif
  22. // for WATERMARKINFO
  23. #ifndef _UTIL_H
  24. #include "util.h"
  25. #endif
  26. #ifndef TFSCORE_API
  27. #define TFSCORE_API(type) __declspec( dllexport ) type FAR PASCAL
  28. #define TFSCORE_APIV(type) __declspec( dllexport ) type FAR CDECL
  29. #endif
  30. // enums
  31. enum TFSVisibility
  32. {
  33. TFS_VIS_SHOW = 0x1, // Add this node to the tree and the UI
  34. TFS_VIS_HIDE = 0x2, // Add this node to the tree, but not the UI
  35. TFS_VIS_DELETE = 0x4, // this node will be deleted by the parent
  36. };
  37. // some useful macros
  38. #ifndef TFS_EXPORT_CLASS
  39. #define TFS_EXPORT_CLASS
  40. #endif
  41. #define IMPLEMENT_ADDREF_RELEASE(class) \
  42. STDMETHODIMP_(ULONG) class::AddRef() \
  43. { \
  44. Assert2(m_cRef > 0, "m_cRef(%d:0x%08lx) > 0", m_cRef, m_cRef); \
  45. return InterlockedIncrement(&m_cRef); \
  46. } \
  47. STDMETHODIMP_(ULONG) class::Release() \
  48. { \
  49. ULONG cRef; \
  50. Assert2(m_cRef>0,"m_cRef(%d:0x%08lx) > 0", m_cRef, m_cRef); \
  51. cRef = InterlockedDecrement(&m_cRef); \
  52. if (cRef == 0) \
  53. { \
  54. delete this; \
  55. } \
  56. return cRef; \
  57. } \
  58. #define IMPLEMENT_TRACE_ADDREF_RELEASE(class) \
  59. STDMETHODIMP_(ULONG) class::AddRef() \
  60. { \
  61. DBG_STRING(_szAddRef, #class) \
  62. Assert2(m_cRef > 0, "m_cRef(%d:0x%08lx) > 0", m_cRef, m_cRef); \
  63. Trace2("%s::Addref - current count %d\n",_szAddRef,m_cRef); \
  64. return InterlockedIncrement(&m_cRef); \
  65. } \
  66. STDMETHODIMP_(ULONG) class::Release() \
  67. { \
  68. DBG_STRING(_szRelease, #class) \
  69. Assert2(m_cRef>0,"m_cRef(%d:0x%08lx) > 0", m_cRef, m_cRef); \
  70. Trace2("%s::Release - current count %d\n", _szRelease, m_cRef); \
  71. if (InterlockedDecrement(&m_cRef) == 0) \
  72. { \
  73. delete this; \
  74. return 0; \
  75. } \
  76. return m_cRef; \
  77. } \
  78. #define IMPLEMENT_SIMPLE_QUERYINTERFACE(klass, iid) \
  79. STDMETHODIMP klass::QueryInterface(REFIID riid, LPVOID *ppv) \
  80. { \
  81. if (ppv == NULL) \
  82. return E_INVALIDARG; \
  83. *ppv = NULL; \
  84. if (riid == IID_IUnknown) \
  85. *ppv = (LPVOID) this; \
  86. else if (riid == IID_##iid) \
  87. *ppv = (iid *) this; \
  88. if (*ppv) \
  89. { \
  90. ((LPUNKNOWN) *ppv)->AddRef(); \
  91. return hrOK; \
  92. } \
  93. else \
  94. return E_NOINTERFACE; \
  95. } \
  96. #ifndef PURE
  97. #define PURE =0
  98. #endif
  99. // forward declarations
  100. interface ITFSNode;
  101. interface ITFSNodeMgr;
  102. interface ITFSNodeHandler;
  103. interface ITFSResultHandler;
  104. interface ITFSNodeEnum;
  105. struct INTERNAL;
  106. /*---------------------------------------------------------------------------
  107. IComponentData Inteface
  108. ---------------------------------------------------------------------------*/
  109. #define DeclareIComponentDataMembers(IPURE) \
  110. STDMETHOD(Initialize) (LPUNKNOWN pUnknown) IPURE; \
  111. STDMETHOD(CreateComponent) (LPCOMPONENT *ppComponent) IPURE; \
  112. STDMETHOD(Notify) (LPDATAOBJECT lpDataObject, \
  113. MMC_NOTIFY_TYPE event, \
  114. LPARAM arg, \
  115. LPARAM param) IPURE; \
  116. STDMETHOD(Destroy) ( void) IPURE; \
  117. STDMETHOD(QueryDataObject) (MMC_COOKIE cookie, \
  118. DATA_OBJECT_TYPES type, \
  119. LPDATAOBJECT *ppDataObject) IPURE; \
  120. STDMETHOD(CompareObjects) (LPDATAOBJECT lpDataObjectA, \
  121. LPDATAOBJECT lpDataObjectB) IPURE; \
  122. STDMETHOD(GetDisplayInfo) (SCOPEDATAITEM *pScopeDataItem) IPURE; \
  123. typedef ComSmartPointer<IComponentData, &IID_IComponentData> SPIComponentData;
  124. typedef ComSmartPointer<IConsole2, &IID_IConsole2> SPIConsole;
  125. typedef ComSmartPointer<IConsoleNameSpace2, &IID_IConsoleNameSpace2> SPIConsoleNameSpace;
  126. /*---------------------------------------------------------------------------
  127. ITFSComponentData interface
  128. Extensions to the IComponentData interface for specific information.
  129. ---------------------------------------------------------------------------*/
  130. #define DeclareITFSComponentDataMembers(IPURE) \
  131. STDMETHOD(GetNodeMgr) (THIS_ ITFSNodeMgr **ppNodeMgr) IPURE; \
  132. STDMETHOD(GetConsole) (THIS_ IConsole2 **ppConsole) IPURE; \
  133. STDMETHOD(GetConsoleNameSpace) (THIS_ IConsoleNameSpace2 **ppConsoleNS) IPURE; \
  134. STDMETHOD(GetRootNode) (THIS_ ITFSNode **ppNode) IPURE; \
  135. STDMETHOD_(const CLSID *, GetCoClassID) (THIS) IPURE; \
  136. STDMETHOD_(HWND, GetHiddenWnd) (THIS) IPURE; \
  137. STDMETHOD_(LPWATERMARKINFO, SetWatermarkInfo) (THIS_ LPWATERMARKINFO pNewWatermarkInfo) IPURE; \
  138. STDMETHOD_(BOOL, GetTaskpadState) (THIS_ int nIndex) IPURE; \
  139. STDMETHOD(SetTaskpadState) (THIS_ int nIndex, BOOL fEnable) IPURE; \
  140. STDMETHOD_(LPCTSTR, GetHTMLHelpFileName) (THIS) IPURE; \
  141. STDMETHOD(SetHTMLHelpFileName) (THIS_ LPCTSTR pszHelpFileName) IPURE; \
  142. #undef INTERFACE
  143. #define INTERFACE ITFSComponentData
  144. DECLARE_INTERFACE_(ITFSComponentData, IUnknown)
  145. {
  146. DeclareIUnknownMembers(PURE)
  147. DeclareITFSComponentDataMembers(PURE)
  148. };
  149. typedef ComSmartPointer<ITFSComponentData, &IID_ITFSComponentData> SPITFSComponentData;
  150. /*---------------------------------------------------------------------------
  151. ITFSCompDataCallback interface
  152. ---------------------------------------------------------------------------*/
  153. enum
  154. {
  155. TFS_COMPDATA_NORMAL = 0,
  156. TFS_COMPDATA_EXTENSION = 1,
  157. TFS_COMPDATA_CREATE = 2,
  158. TFS_COMPDATA_UNKNOWN_DATAOBJECT = 4,
  159. // A parent node will get this when its child wants the parent
  160. // to add context menus to its context menu.
  161. TFS_COMPDATA_CHILD_CONTEXTMENU = 8,
  162. };
  163. #define DeclareITFSCompDataCallbackMembers(IPURE) \
  164. STDMETHOD(OnInitialize) (THIS_ LPIMAGELIST lpScopeImage) IPURE; \
  165. STDMETHOD(OnInitializeNodeMgr) (THIS_ ITFSComponentData *pTFSCompData, ITFSNodeMgr *pNodeMgr) IPURE; \
  166. STDMETHOD(OnCreateComponent) (THIS_ LPCOMPONENT *ppComponent) IPURE; \
  167. STDMETHOD_(const CLSID *, GetCoClassID) (THIS) IPURE; \
  168. STDMETHOD(OnCreateDataObject)(THIS_ MMC_COOKIE cookie, DATA_OBJECT_TYPES type, IDataObject **ppDataObject) IPURE; \
  169. STDMETHOD(OnDestroy)(void) IPURE; \
  170. #undef INTERFACE
  171. #define INTERFACE ITFSCompDataCallback
  172. DECLARE_INTERFACE_(ITFSCompDataCallback, IUnknown)
  173. {
  174. DeclareIUnknownMembers(PURE)
  175. DeclareIPersistStreamInitMembers(PURE)
  176. DeclareITFSCompDataCallbackMembers(PURE)
  177. // not required part of callback interface
  178. STDMETHOD(OnNotifyPropertyChange)(THIS_ LPDATAOBJECT pDataObject, MMC_NOTIFY_TYPE event, LPARAM arg, LPARAM lParam) PURE;
  179. };
  180. typedef ComSmartPointer<ITFSCompDataCallback, &IID_ITFSCompDataCallback> SPITFSCompDataCallback;
  181. /*---------------------------------------------------------------------------
  182. IComponent interface
  183. ---------------------------------------------------------------------------*/
  184. #define DeclareIComponentMembers(IPURE) \
  185. STDMETHOD(Initialize)(LPCONSOLE lpConsole) IPURE; \
  186. STDMETHOD(Notify)(LPDATAOBJECT lpDataObject, MMC_NOTIFY_TYPE event, \
  187. LPARAM arg, LPARAM param) IPURE; \
  188. STDMETHOD(Destroy)(MMC_COOKIE cookie) IPURE; \
  189. STDMETHOD(GetResultViewType)(MMC_COOKIE cookie, LPOLESTR* ppViewType, \
  190. long* pViewOptions) IPURE; \
  191. STDMETHOD(QueryDataObject)(MMC_COOKIE cookie, DATA_OBJECT_TYPES type, \
  192. LPDATAOBJECT* ppDataObject) IPURE; \
  193. STDMETHOD(CompareObjects)(LPDATAOBJECT lpDataObjectA, \
  194. LPDATAOBJECT lpDataObjectB) IPURE; \
  195. STDMETHOD(GetDisplayInfo)(LPRESULTDATAITEM pResult) IPURE; \
  196. typedef ComSmartPointer<IComponent, &IID_IComponent> SPIComponent;
  197. typedef ComSmartPointer<IMessageView, &IID_IMessageView> SPIMessageView;
  198. /*---------------------------------------------------------------------------
  199. ITFSCompCallback interface
  200. ---------------------------------------------------------------------------*/
  201. #define DeclareITFSCompCallbackMembers(IPURE) \
  202. STDMETHOD(OnUpdateView)(LPDATAOBJECT pDataObject, LPARAM arg, LPARAM param) IPURE; \
  203. STDMETHOD(InitializeBitmaps)(MMC_COOKIE cookie) IPURE; \
  204. /*---------------------------------------------------------------------------
  205. ITFSComponent interface
  206. ---------------------------------------------------------------------------*/
  207. #define DeclareITFSComponentMembers(IPURE) \
  208. STDMETHOD(GetSelectedNode) (THIS_ ITFSNode **ppNode) IPURE; \
  209. STDMETHOD(SetSelectedNode) (THIS_ ITFSNode *pNode) IPURE; \
  210. STDMETHOD(GetConsole) (THIS_ IConsole2 **ppConsole) IPURE; \
  211. STDMETHOD(GetHeaderCtrl) (THIS_ IHeaderCtrl **ppHeaderCtrl) IPURE; \
  212. STDMETHOD(GetResultData) (THIS_ IResultData **ppResultData) IPURE; \
  213. STDMETHOD(GetImageList) (THIS_ IImageList **ppImageList) IPURE; \
  214. STDMETHOD(GetConsoleVerb) (THIS_ IConsoleVerb **ppConsoleVerb) IPURE; \
  215. STDMETHOD(GetControlbar) (THIS_ IControlbar **ppControlbar) IPURE; \
  216. STDMETHOD(GetComponentData) (THIS_ IComponentData **ppComponentData) IPURE; \
  217. STDMETHOD(GetUserData)(THIS_ LONG_PTR *pulUserData) IPURE; \
  218. STDMETHOD(SetUserData)(THIS_ LONG_PTR ulUserData) IPURE; \
  219. STDMETHOD(SetCurrentDataObject)(THIS_ LPDATAOBJECT pDataObject) IPURE; \
  220. STDMETHOD(GetCurrentDataObject)(THIS_ LPDATAOBJECT *pDataObject) IPURE; \
  221. STDMETHOD(SetToolbar)(THIS_ IToolbar * pToolbar) IPURE; \
  222. STDMETHOD(GetToolbar)(THIS_ IToolbar ** ppToolbar) IPURE; \
  223. #undef INTERFACE
  224. #define INTERFACE ITFSComponent
  225. DECLARE_INTERFACE_(ITFSComponent, IUnknown)
  226. {
  227. DeclareIUnknownMembers(PURE)
  228. DeclareITFSComponentMembers(PURE)
  229. };
  230. typedef ComSmartPointer<ITFSComponent, &IID_ITFSComponent> SPITFSComponent;
  231. /*---------------------------------------------------------------------------
  232. IExtendControlbar interface
  233. ---------------------------------------------------------------------------*/
  234. #define DeclareIExtendControlbarMembers(IPURE) \
  235. STDMETHOD(SetControlbar)(LPCONTROLBAR pControlbar) IPURE; \
  236. STDMETHOD(ControlbarNotify)(MMC_NOTIFY_TYPE event, LPARAM arg, LPARAM param) IPURE; \
  237. typedef ComSmartPointer<IExtendControlbar, &IID_IExtendControlbar> SPIExtendControlbar;
  238. /*---------------------------------------------------------------------------
  239. IExtendContextMenu interface
  240. ---------------------------------------------------------------------------*/
  241. #define DeclareIExtendContextMenuMembers(IPURE) \
  242. STDMETHOD(AddMenuItems)(LPDATAOBJECT pDataObject, \
  243. LPCONTEXTMENUCALLBACK pCallbackUnknown, \
  244. long * pInsertionAllowed) IPURE; \
  245. STDMETHOD(Command)(long nCommandID, LPDATAOBJECT pDataObject) IPURE; \
  246. typedef ComSmartPointer<IExtendContextMenu, &IID_IExtendContextMenu> SPIExtendContextMenu;
  247. /*---------------------------------------------------------------------------
  248. IExtendPropertySheet interface
  249. ---------------------------------------------------------------------------*/
  250. #define DeclareIExtendPropertySheetMembers(IPURE) \
  251. STDMETHOD(CreatePropertyPages)(LPPROPERTYSHEETCALLBACK lpProvider, \
  252. LONG_PTR handle, \
  253. LPDATAOBJECT lpIDataObject) IPURE;\
  254. STDMETHOD(QueryPagesFor)(LPDATAOBJECT lpDataObject) IPURE;\
  255. STDMETHOD(GetWatermarks)(LPDATAOBJECT pDataObject, \
  256. HBITMAP * lphWatermark, \
  257. HBITMAP * lphHeader, \
  258. HPALETTE * lphPalette, \
  259. BOOL * bStretch) IPURE; \
  260. typedef ComSmartPointer<IExtendPropertySheet2, &IID_IExtendPropertySheet2> SPIExtendPropertySheet;
  261. /*---------------------------------------------------------------------------
  262. IExtendTaskPad interface
  263. ---------------------------------------------------------------------------*/
  264. #define DeclareIExtendTaskPadMembers(IPURE) \
  265. STDMETHOD(TaskNotify)(LPDATAOBJECT lpDataObject, \
  266. VARIANT * arg, \
  267. VARIANT * param) IPURE;\
  268. STDMETHOD(EnumTasks)(LPDATAOBJECT lpDataObject, \
  269. LPOLESTR pszTaskGroup, \
  270. IEnumTASK ** ppEnumTask) IPURE; \
  271. STDMETHOD(GetTitle)(LPOLESTR pszGroup, \
  272. LPOLESTR * pszTitle) IPURE; \
  273. STDMETHOD(GetBackground)(LPOLESTR pszGroup, \
  274. MMC_TASK_DISPLAY_OBJECT * pTDO) IPURE; \
  275. STDMETHOD(GetDescriptiveText)(LPOLESTR pszGroup, \
  276. LPOLESTR * pszDescriptiveText) IPURE; \
  277. STDMETHOD(GetListPadInfo)(LPOLESTR pszGroup, \
  278. MMC_LISTPAD_INFO *pListPadInfo) IPURE; \
  279. typedef ComSmartPointer<IExtendTaskPad, &IID_IExtendTaskPad> SPIExtendTaskPad;
  280. typedef ComSmartPointer<IEnumTASK, &IID_IEnumTASK> SPIEnumTask;
  281. /*---------------------------------------------------------------------------
  282. IResultDataCompare interface
  283. ---------------------------------------------------------------------------*/
  284. #define DeclareIResultDataCompareMembers(IPURE) \
  285. STDMETHOD(Compare)(LPARAM lUserParam, MMC_COOKIE cookieA, MMC_COOKIE cookieB, int* pnResult) IPURE; \
  286. typedef ComSmartPointer<IResultDataCompare, &IID_IResultDataCompare> SPIResultDataCompare;
  287. /*---------------------------------------------------------------------------
  288. IResultDataCompareEx interface
  289. ---------------------------------------------------------------------------*/
  290. #define DeclareIResultDataCompareExMembers(IPURE) \
  291. STDMETHOD(Compare)( RDCOMPARE *prdc, int* pnResult) IPURE; \
  292. typedef ComSmartPointer<IResultDataCompareEx, &IID_IResultDataCompareEx> SPIResultDataCompareEx;
  293. /*---------------------------------------------------------------------------
  294. IResultOwnerData interface
  295. Virtual Listbox support
  296. ---------------------------------------------------------------------------*/
  297. #define DeclareIResultOwnerDataMembers(IPURE) \
  298. STDMETHOD(FindItem)(LPRESULTFINDINFO pFindInfo, int * pnFoundIndex) IPURE; \
  299. STDMETHOD(CacheHint)(int nStartIndex, int nEndIndex) IPURE; \
  300. STDMETHOD(SortItems)(int nColumn, DWORD dwSortOptions, LPARAM lUserParam) IPURE; \
  301. typedef ComSmartPointer<IResultOwnerData, &IID_IResultOwnerData> SPIResultOwnerData;
  302. /*---------------------------------------------------------------------------
  303. ISnapinAbout interface
  304. ---------------------------------------------------------------------------*/
  305. #define DeclareISnapinAboutMembers(IPURE) \
  306. STDMETHOD(GetSnapinDescription)( \
  307. LPOLESTR *lpDescription) IPURE; \
  308. STDMETHOD(GetProvider)( \
  309. LPOLESTR *lpName) IPURE; \
  310. STDMETHOD(GetSnapinVersion)( \
  311. LPOLESTR *lpVersion) IPURE; \
  312. STDMETHOD(GetSnapinImage)( \
  313. HICON *hAppIcon) IPURE; \
  314. STDMETHOD(GetStaticFolderImage)( \
  315. HBITMAP *hSmallImage,\
  316. HBITMAP *cSmallMask,\
  317. HBITMAP *hLargeImage,\
  318. COLORREF *cLargeMask) IPURE;\
  319. typedef ComSmartPointer<ISnapinAbout, &IID_ISnapinAbout> SPISnapinAbout;
  320. /*---------------------------------------------------------------------------
  321. ISnapinHelp interface
  322. ---------------------------------------------------------------------------*/
  323. #define DeclareISnapinHelpMembers(IPURE) \
  324. STDMETHOD(GetHelpTopic)(LPOLESTR* lpCompiledHelpFile) IPURE; \
  325. typedef ComSmartPointer<ISnapinHelp, &IID_ISnapinHelp> SPISnapinHelp;
  326. typedef ComSmartPointer<IDisplayHelp, &IID_IDisplayHelp> SPIDisplayHelp;
  327. /*---------------------------------------------------------------------------
  328. Class: ITFSNode
  329. This interface is NOT designed to be remotable.
  330. General initialization:
  331. Init
  332. Node management:
  333. GetParent
  334. SetParent
  335. GetNodeMgr
  336. Visibility
  337. IsInUI
  338. IsVisible
  339. SetVisibilityState
  340. Show
  341. Data
  342. SetData
  343. GetData
  344. Handler
  345. GetHandler
  346. SetHandler
  347. GetResultHandler
  348. SetResultHandler
  349. Display
  350. GetString
  351. MMC stuff
  352. GetNodeType
  353. Container
  354. IsContainer
  355. AddChild
  356. InsertChild
  357. RemoveChild
  358. ExtractChild
  359. GetChildCount
  360. GetEnum
  361. RemoveAllChildren
  362. CompareChildNodes
  363. ---------------------------------------------------------------------------*/
  364. enum
  365. {
  366. // Reserve 0 for an invalid value
  367. TFS_DATA_COOKIE = 1, // cookie for this node
  368. TFS_DATA_SCOPEID = 2, // HSCOPEITEM
  369. TFS_DATA_IMAGEINDEX = 3, // index into image list
  370. TFS_DATA_OPENIMAGEINDEX = 4, // index into image list for open item
  371. TFS_DATA_PROPSHEETCOUNT = 5, // number of active property pages
  372. TFS_DATA_DIRTY = 6, // dirty flag
  373. // These two are used by the Show() call to determine where
  374. // to add this node. This must be set BEFORE the node is
  375. // displayed.
  376. TFS_DATA_RELATIVE_FLAGS = 7, // see relative MMC flags
  377. TFS_DATA_RELATIVE_SCOPEID = 8, // scopeid of relative node
  378. // Set this flag, if this is a leaf node in the scope pane.
  379. TFS_DATA_SCOPE_LEAF_NODE = 9, // this will let us remove the '+'
  380. TFS_DATA_USER = 16, // user-settable data
  381. TFS_DATA_TYPE = 17, // user-settable index (used for searching)
  382. TFS_DATA_PARENT = 18, // user-settable (by the parent node)
  383. };
  384. enum
  385. {
  386. // Reserve 0 for an invalid value
  387. TFS_NOTIFY_CREATEPROPSHEET = 1,
  388. TFS_NOTIFY_DELETEPROPSHEET = 2,
  389. TFS_NOTIFY_RESULT_CREATEPROPSHEET = 3,
  390. TFS_NOTIFY_RESULT_DELETEPROPSHEET = 4,
  391. // Removes nodes marked as deleted
  392. TFS_NOTIFY_REMOVE_DELETED_NODES = 5,
  393. };
  394. // This is the list of messages for the UserNotify call
  395. enum
  396. {
  397. // Reserve 0 for an invalid value
  398. // Notify the handler that a property sheet has gone away
  399. // The second DWORD contains a pointer to CPropPageHolderBase.
  400. TFS_MSG_CREATEPROPSHEET = 1,
  401. TFS_MSG_DELETEPROPSHEET = 2,
  402. };
  403. #define DeclareITFSNodeMembers(IPURE) \
  404. STDMETHOD(Init)(int nImageIndex, \
  405. int nOpenImageIndex, \
  406. LPARAM lParam, \
  407. MMC_COOKIE cookie) IPURE; \
  408. STDMETHOD(GetParent) (ITFSNode **ppNode) IPURE; \
  409. STDMETHOD(SetParent) (ITFSNode *pNode) IPURE; \
  410. STDMETHOD(GetNodeMgr) (ITFSNodeMgr **ppNodeMgr) IPURE; \
  411. STDMETHOD_(BOOL, IsVisible) () IPURE; \
  412. STDMETHOD(SetVisibilityState) (TFSVisibility vis) IPURE; \
  413. STDMETHOD_(TFSVisibility, GetVisibilityState)() IPURE; \
  414. STDMETHOD_(BOOL, IsInUI) () IPURE; \
  415. STDMETHOD(Show) () IPURE; \
  416. STDMETHOD_(LONG_PTR, GetData) (int nIndex) IPURE; \
  417. STDMETHOD_(LONG_PTR, SetData) (int nIndex, LONG_PTR dwData) IPURE; \
  418. STDMETHOD_(LONG_PTR, Notify) (int nIndex, LPARAM lParam) IPURE; \
  419. STDMETHOD(GetHandler) (ITFSNodeHandler **ppNodeHandler) IPURE; \
  420. STDMETHOD(SetHandler)(ITFSNodeHandler *pNodeHandler) IPURE; \
  421. STDMETHOD(GetResultHandler) (ITFSResultHandler **ppResultHandler) IPURE; \
  422. STDMETHOD(SetResultHandler) (ITFSResultHandler *pResultHandler) IPURE; \
  423. STDMETHOD_(LPCTSTR, GetString) (int nCol) IPURE; \
  424. STDMETHOD_(const GUID *, GetNodeType) (THIS) IPURE; \
  425. STDMETHOD(SetNodeType)(THIS_ const GUID *) IPURE; \
  426. STDMETHOD_(BOOL, IsContainer) () IPURE; \
  427. STDMETHOD(AddChild) (ITFSNode *pNodeChild) IPURE; \
  428. STDMETHOD(InsertChild) (ITFSNode *pInsertAfterNode, ITFSNode *pNodeChild) IPURE; \
  429. STDMETHOD(RemoveChild) (ITFSNode *pNodeChild) IPURE; \
  430. STDMETHOD(ExtractChild) (ITFSNode *pNodeChild) IPURE; \
  431. STDMETHOD(GetChildCount) (int *pVisibleCount, int *pTotalCount) IPURE; \
  432. STDMETHOD(GetEnum) (ITFSNodeEnum **ppNodeEnum) IPURE; \
  433. STDMETHOD(DeleteAllChildren) (BOOL fRemoveFromUI) IPURE; \
  434. STDMETHOD(Destroy)() IPURE; \
  435. STDMETHOD(ChangeNode)(THIS_ LONG_PTR changemask) IPURE; \
  436. // STDMETHOD(SearchForChild)(ITFSNode *pParent, DWORD dwSearchType, ITFSNode **ppNode) IPURE; \
  437. #undef INTERFACE
  438. #define INTERFACE ITFSNode
  439. DECLARE_INTERFACE_(ITFSNode, IUnknown)
  440. {
  441. DeclareIUnknownMembers(PURE)
  442. DeclareITFSNodeMembers(PURE)
  443. };
  444. typedef ComSmartPointer<ITFSNode, &IID_ITFSNode> SPITFSNode;
  445. /*---------------------------------------------------------------------------
  446. ITFSNodeEnum interface
  447. ---------------------------------------------------------------------------*/
  448. #define DeclareITFSNodeEnumMembers(IPURE) \
  449. STDMETHOD(Next) (THIS_ ULONG uNum, ITFSNode **ppNode, ULONG *pNumReturned) IPURE; \
  450. STDMETHOD(Skip) (THIS_ ULONG uNum) IPURE; \
  451. STDMETHOD(Reset) (THIS) IPURE; \
  452. STDMETHOD(Clone) (THIS_ ITFSNodeEnum **ppNodeEnum) IPURE; \
  453. #undef INTERFACE
  454. #define INTERFACE ITFSNodeEnum
  455. DECLARE_INTERFACE_(ITFSNodeEnum, IUnknown)
  456. {
  457. DeclareIUnknownMembers(PURE)
  458. DeclareITFSNodeEnumMembers(PURE)
  459. };
  460. typedef ComSmartPointer<ITFSNodeEnum, &IID_ITFSNodeEnum> SPITFSNodeEnum;
  461. /*---------------------------------------------------------------------------
  462. ITFSNodeMgr interface
  463. ---------------------------------------------------------------------------*/
  464. #define DeclareITFSNodeMgrMembers(IPURE) \
  465. STDMETHOD(GetRootNode) (THIS_ ITFSNode **ppTFSNode) IPURE; \
  466. STDMETHOD(SetRootNode) (THIS_ ITFSNode *pRootNode) IPURE; \
  467. STDMETHOD(GetComponentData) (THIS_ IComponentData **ppComponentData) IPURE; \
  468. STDMETHOD(FindNode) (THIS_ MMC_COOKIE cookie, ITFSNode **ppTFSNode) IPURE; \
  469. STDMETHOD(RegisterCookieLookup) (THIS) IPURE; \
  470. STDMETHOD(UnregisterCookieLookup) (THIS) IPURE; \
  471. STDMETHOD(IsCookieValid) (THIS_ MMC_COOKIE cookie) IPURE; \
  472. STDMETHOD(SelectNode) (THIS_ ITFSNode *pNode) IPURE; \
  473. STDMETHOD(SetResultPaneNode) (THIS_ ITFSNode *pNode) IPURE; \
  474. STDMETHOD(GetResultPaneNode) (THIS_ ITFSNode **ppNode) IPURE; \
  475. STDMETHOD(GetConsole) (THIS_ IConsole2 **ppConsole) IPURE; \
  476. STDMETHOD(GetConsoleNameSpace) (THIS_ IConsoleNameSpace2 **ppConsoleNS) IPURE; \
  477. STDMETHOD(SetConsole)(THIS_ IConsoleNameSpace2 *pConsoleNS, IConsole2 *pConsole) IPURE; \
  478. #undef INTERFACE
  479. #define INTERFACE ITFSNodeMgr
  480. DECLARE_INTERFACE_(ITFSNodeMgr, IUnknown)
  481. {
  482. DeclareIUnknownMembers(PURE)
  483. DeclareITFSNodeMgrMembers(PURE)
  484. };
  485. typedef ComSmartPointer<ITFSNodeMgr, &IID_ITFSNodeMgr> SPITFSNodeMgr;
  486. /*---------------------------------------------------------------------------
  487. Interface: ITFSNodeHandler
  488. Notification
  489. Notify
  490. Methods to deal with property sheets
  491. CreatePropertyPages
  492. HasPropertyPages
  493. Methods to deal with context menus
  494. OnAddMenuItems
  495. OnCommand
  496. Display columns of info
  497. GetString
  498. ---------------------------------------------------------------------------*/
  499. #define OVERRIDE_NodeHandler_Notify() \
  500. STDMETHOD(Notify) (ITFSNode *pNode, IDataObject *pDataObject, \
  501. DWORD dwType, MMC_NOTIFY_TYPE event, \
  502. LPARAM arg, LPARAM lParam)
  503. #define OVERRIDE_NodeHandler_CreatePropertyPages() \
  504. STDMETHOD(CreatePropertyPages) (ITFSNode *pNode, \
  505. LPPROPERTYSHEETCALLBACK lpProvider, \
  506. LPDATAOBJECT pDataObject, \
  507. LONG_PTR handle, \
  508. DWORD dwType)
  509. #define OVERRIDE_NodeHandler_HasPropertyPages() \
  510. STDMETHOD(HasPropertyPages) (ITFSNode *pNode, LPDATAOBJECT pDataObject, \
  511. DATA_OBJECT_TYPES type, \
  512. DWORD dwType)
  513. #define OVERRIDE_NodeHandler_OnAddMenuItems() \
  514. STDMETHOD(OnAddMenuItems)(ITFSNode *pNode, \
  515. LPCONTEXTMENUCALLBACK pContextMenuCallback, \
  516. LPDATAOBJECT lpDataObject, \
  517. DATA_OBJECT_TYPES type, \
  518. DWORD dwType, \
  519. long *pInsertionAllowed)
  520. #define OVERRIDE_NodeHandler_OnCommand() \
  521. STDMETHOD(OnCommand) (ITFSNode *pNode, long nCommandId, \
  522. DATA_OBJECT_TYPES type, \
  523. LPDATAOBJECT pDataObject, \
  524. DWORD dwType)
  525. #define OVERRIDE_NodeHandler_GetString() \
  526. STDMETHOD_(LPCTSTR, GetString) (ITFSNode *pNode, int nCol)
  527. #define OVERRIDE_NodeHandler_UserNotify() \
  528. STDMETHOD(UserNotify)(ITFSNode *pNode, LPARAM dwParam, LPARAM dwParam2)
  529. #define OVERRIDE_NodeHandler_OnCreateDataObject() \
  530. STDMETHOD(OnCreateDataObject)(MMC_COOKIE cookie, DATA_OBJECT_TYPES type, IDataObject **ppDataObject)
  531. #define OVERRIDE_NodeHandler_DestroyHandler() \
  532. STDMETHOD(DestroyHandler)(ITFSNode *pNode)
  533. #define OVERRIDE_NodeHandler_CreateNodeId2() \
  534. STDMETHOD(CreateNodeId2)(ITFSNode * pNode, BSTR * bstrId, DWORD * dwFlags)
  535. #define DeclareITFSNodeHandlerMembers(IPURE) \
  536. OVERRIDE_NodeHandler_Notify() IPURE; \
  537. OVERRIDE_NodeHandler_CreatePropertyPages() IPURE; \
  538. OVERRIDE_NodeHandler_HasPropertyPages() IPURE; \
  539. OVERRIDE_NodeHandler_OnAddMenuItems() IPURE; \
  540. OVERRIDE_NodeHandler_OnCommand() IPURE; \
  541. OVERRIDE_NodeHandler_GetString() IPURE; \
  542. OVERRIDE_NodeHandler_UserNotify() IPURE; \
  543. OVERRIDE_NodeHandler_OnCreateDataObject() IPURE; \
  544. OVERRIDE_NodeHandler_DestroyHandler() IPURE; \
  545. OVERRIDE_NodeHandler_CreateNodeId2() IPURE;
  546. #undef INTERFACE
  547. #define INTERFACE ITFSNodeHandler
  548. DECLARE_INTERFACE_(ITFSNodeHandler, IUnknown)
  549. {
  550. DeclareIUnknownMembers(PURE)
  551. DeclareITFSNodeHandlerMembers(PURE)
  552. };
  553. typedef ComSmartPointer<ITFSNodeHandler, &IID_ITFSNodeHandler> SPITFSNodeHandler;
  554. /*---------------------------------------------------------------------------
  555. Interface: ITFSResultHandler
  556. Notification
  557. Notify
  558. Result pane callbacks
  559. UpdateView
  560. GetString
  561. Context menu members
  562. AddMenuItems
  563. Command
  564. (root node only)
  565. OnCreateControlbars
  566. Controlbarnotify
  567. ---------------------------------------------------------------------------*/
  568. #define OVERRIDE_ResultHandler_Notify() \
  569. STDMETHOD(Notify) (ITFSComponent * pComponent, \
  570. MMC_COOKIE cookie, \
  571. LPDATAOBJECT pDataObject, \
  572. MMC_NOTIFY_TYPE event, \
  573. LPARAM arg, \
  574. LPARAM lParam)
  575. #define OVERRIDE_ResultHandler_UpdateView() \
  576. STDMETHOD(UpdateView) (ITFSComponent * pComponent, \
  577. LPDATAOBJECT pDataObject, \
  578. LPARAM data, \
  579. LPARAM hint)
  580. #define OVERRIDE_ResultHandler_GetString() \
  581. STDMETHOD_(LPCTSTR, GetString) (ITFSComponent * pComponent, \
  582. MMC_COOKIE cookie, \
  583. int nCol)
  584. #define OVERRIDE_ResultHandler_CompareItems() \
  585. STDMETHOD_(int, CompareItems)(ITFSComponent * pComponent, \
  586. MMC_COOKIE cookieA, \
  587. MMC_COOKIE cookieB, \
  588. int nCol)
  589. #define OVERRIDE_ResultHandler_CompareItemsEx() \
  590. STDMETHOD_(int, CompareItems)( ITFSComponent * pComponent, \
  591. RDCOMPARE *prdc )
  592. #define OVERRIDE_ResultHandler_CreatePropertyPages() \
  593. STDMETHOD(CreatePropertyPages) (ITFSComponent * pComponent, \
  594. MMC_COOKIE cookie, \
  595. LPPROPERTYSHEETCALLBACK lpProvider, \
  596. LPDATAOBJECT pDataObject, \
  597. LONG_PTR handle)
  598. #define OVERRIDE_ResultHandler_HasPropertyPages() \
  599. STDMETHOD(HasPropertyPages) (ITFSComponent * pComponent, \
  600. MMC_COOKIE cookie, \
  601. LPDATAOBJECT pDataObject)
  602. #define OVERRIDE_ResultHandler_AddMenuItems() \
  603. STDMETHOD(AddMenuItems) (ITFSComponent * pComponent,\
  604. MMC_COOKIE cookie, \
  605. LPDATAOBJECT pDataObject, \
  606. LPCONTEXTMENUCALLBACK pContextMenuCallback, \
  607. long * pInsertionAllowed)
  608. #define OVERRIDE_ResultHandler_Command() \
  609. STDMETHOD(Command) (ITFSComponent * pComponent, \
  610. MMC_COOKIE cookie, \
  611. int nCommandID, \
  612. LPDATAOBJECT pDataObject)
  613. #define OVERRIDE_ResultHandler_OnCreateControlbars() \
  614. STDMETHOD(OnCreateControlbars) (ITFSComponent * pComponent, \
  615. LPCONTROLBAR pControlBar)
  616. #define OVERRIDE_ResultHandler_ControlbarNotify() \
  617. STDMETHOD(ControlbarNotify) (ITFSComponent * pComponent, \
  618. MMC_NOTIFY_TYPE event, \
  619. LPARAM arg, \
  620. LPARAM param)
  621. #define OVERRIDE_ResultHandler_UserResultNotify() \
  622. STDMETHOD(UserResultNotify)(ITFSNode * pNode, \
  623. LPARAM dwParam, \
  624. LPARAM dwParam2)
  625. #define OVERRIDE_ResultHandler_OnCreateDataObject() \
  626. STDMETHOD(OnCreateDataObject)(ITFSComponent * pComponent, \
  627. LONG_PTR cookie, \
  628. DATA_OBJECT_TYPES type, \
  629. IDataObject ** ppDataObject)
  630. #define OVERRIDE_ResultHandler_DestroyResultHandler() \
  631. STDMETHOD(DestroyResultHandler)(LONG_PTR cookie)
  632. #define OVERRIDE_ResultHandler_OnGetResultViewType() \
  633. STDMETHOD(OnGetResultViewType)(ITFSComponent * pComponent, \
  634. MMC_COOKIE cookie, \
  635. LPOLESTR * ppViewType, \
  636. long* pViewOptions)
  637. // virtual listbox support
  638. #define OVERRIDE_ResultHandler_GetVirtualString() \
  639. STDMETHOD_(LPCWSTR, GetVirtualString)(int nIndex, int nCol)
  640. #define OVERRIDE_ResultHandler_GetVirtualImage() \
  641. STDMETHOD_(int, GetVirtualImage)(int nIndex)
  642. #define OVERRIDE_ResultHandler_FindItem() \
  643. STDMETHOD(FindItem)(LPRESULTFINDINFO pFindInfo, int * pnFoundIndex)
  644. #define OVERRIDE_ResultHandler_CacheHint() \
  645. STDMETHOD(CacheHint)(int nStartIndex, int nEndIndex)
  646. #define OVERRIDE_ResultHandler_SortItems() \
  647. STDMETHOD(SortItems)(int nColumn, DWORD dwSortOptions, LPARAM lUserParam)
  648. // task pad functions
  649. #define OVERRIDE_ResultHandler_TaskPadNotify() \
  650. STDMETHOD(TaskPadNotify)(ITFSComponent *,MMC_COOKIE,LPDATAOBJECT,VARIANT *,VARIANT *)
  651. #define OVERRIDE_ResultHandler_EnumTasks() \
  652. STDMETHOD(EnumTasks)(ITFSComponent *,MMC_COOKIE,LPDATAOBJECT,LPOLESTR,IEnumTASK **)
  653. #define OVERRIDE_ResultHandler_TaskPadGetTitle() \
  654. STDMETHOD(TaskPadGetTitle)(ITFSComponent *,MMC_COOKIE,LPOLESTR,LPOLESTR *)
  655. #define OVERRIDE_ResultHandler_TaskPadGetBackground() \
  656. STDMETHOD(TaskPadGetBackground)(ITFSComponent *,MMC_COOKIE,LPOLESTR,MMC_TASK_DISPLAY_OBJECT *)
  657. /*
  658. #define OVERRIDE_ResultHandler_TaskPadGetBanner() \
  659. STDMETHOD(TaskPadGetBanner)(ITFSComponent *,MMC_COOKIE,LPOLESTR,LPOLESTR *)
  660. */
  661. #define OVERRIDE_ResultHandler_TaskPadGetDescriptiveText() \
  662. STDMETHOD(TaskPadGetDescriptiveText)(ITFSComponent *,MMC_COOKIE,LPOLESTR,LPOLESTR *)
  663. #define DeclareITFSResultHandlerMembers(IPURE) \
  664. OVERRIDE_ResultHandler_Notify() IPURE; \
  665. OVERRIDE_ResultHandler_UpdateView() IPURE; \
  666. OVERRIDE_ResultHandler_GetString() IPURE; \
  667. OVERRIDE_ResultHandler_CompareItems() IPURE; \
  668. OVERRIDE_ResultHandler_CompareItemsEx() IPURE; \
  669. OVERRIDE_ResultHandler_CreatePropertyPages() IPURE; \
  670. OVERRIDE_ResultHandler_HasPropertyPages() IPURE; \
  671. OVERRIDE_ResultHandler_AddMenuItems() IPURE; \
  672. OVERRIDE_ResultHandler_Command() IPURE; \
  673. OVERRIDE_ResultHandler_OnCreateControlbars() IPURE; \
  674. OVERRIDE_ResultHandler_ControlbarNotify() IPURE; \
  675. OVERRIDE_ResultHandler_UserResultNotify() IPURE; \
  676. OVERRIDE_ResultHandler_OnCreateDataObject() IPURE; \
  677. OVERRIDE_ResultHandler_DestroyResultHandler() IPURE; \
  678. OVERRIDE_ResultHandler_OnGetResultViewType() IPURE; \
  679. OVERRIDE_ResultHandler_GetVirtualString() IPURE; \
  680. OVERRIDE_ResultHandler_GetVirtualImage() IPURE; \
  681. OVERRIDE_ResultHandler_FindItem() IPURE; \
  682. OVERRIDE_ResultHandler_CacheHint() IPURE; \
  683. OVERRIDE_ResultHandler_SortItems() IPURE; \
  684. OVERRIDE_ResultHandler_TaskPadNotify() IPURE; \
  685. OVERRIDE_ResultHandler_EnumTasks() IPURE; \
  686. OVERRIDE_ResultHandler_TaskPadGetTitle() IPURE; \
  687. OVERRIDE_ResultHandler_TaskPadGetBackground() IPURE; \
  688. OVERRIDE_ResultHandler_TaskPadGetDescriptiveText() IPURE;
  689. #undef INTERFACE
  690. #define INTERFACE ITFSResultHandler
  691. DECLARE_INTERFACE_(ITFSResultHandler, IUnknown)
  692. {
  693. DeclareIUnknownMembers(PURE)
  694. DeclareITFSResultHandlerMembers(PURE)
  695. };
  696. typedef ComSmartPointer<ITFSResultHandler, &IID_ITFSResultHandler> SPITFSResultHandler;
  697. /*---------------------------------------------------------------------------
  698. ITFSThreadHandler interface
  699. ---------------------------------------------------------------------------*/
  700. #define DeclareITFSThreadHandlerMembers(IPURE) \
  701. STDMETHOD(OnNotifyHaveData)(LPARAM) IPURE; \
  702. STDMETHOD(OnNotifyError)(LPARAM) IPURE; \
  703. STDMETHOD(OnNotifyExiting)(LPARAM) IPURE; \
  704. #undef INTERFACE
  705. #define INTERFACE ITFSThreadHandler
  706. DECLARE_INTERFACE_(ITFSThreadHandler, IUnknown)
  707. {
  708. DeclareIUnknownMembers(PURE)
  709. DeclareITFSThreadHandlerMembers(PURE)
  710. };
  711. typedef ComSmartPointer<ITFSThreadHandler, &IID_ITFSThreadHandler> SPITFSThreadHandler;
  712. /*---------------------------------------------------------------------------
  713. ITFSQueryObject interface
  714. ---------------------------------------------------------------------------*/
  715. #define DeclareITFSQueryObjectMembers(IPURE) \
  716. STDMETHOD(Init) (ITFSThreadHandler *pHandler, HWND hwndHidden, UINT uMsgBase) IPURE; \
  717. STDMETHOD(Execute) (THIS) IPURE; \
  718. STDMETHOD(OnThreadExit) (THIS) IPURE; \
  719. STDMETHOD(FCheckForAbort) (THIS) IPURE; \
  720. STDMETHOD(SetAbortEvent) (THIS) IPURE; \
  721. STDMETHOD_(HANDLE, GetAbortEventHandle) (THIS) IPURE; \
  722. STDMETHOD(OnEventAbort) (THIS) IPURE; \
  723. STDMETHOD(DoCleanup) (THIS) IPURE;
  724. #undef INTERFACE
  725. #define INTERFACE ITFSQueryObject
  726. DECLARE_INTERFACE_(ITFSQueryObject, IUnknown)
  727. {
  728. DeclareIUnknownMembers(PURE)
  729. DeclareITFSQueryObjectMembers(PURE)
  730. };
  731. typedef ComSmartPointer<ITFSQueryObject, &IID_ITFSQueryObject> SPITFSQueryObject;
  732. /*---------------------------------------------------------------------------
  733. ITFSError interface
  734. ---------------------------------------------------------------------------*/
  735. struct TFSErrorInfo
  736. {
  737. DWORD m_dwSize; // size of the structure, used for versioning
  738. DWORD m_dwThreadId; // thread id of this error structure
  739. LONG_PTR m_uReserved1; // = 0, reserved for object id
  740. LONG_PTR m_uReserved2; // = 0 for now, reserved for HRESULT component type
  741. DWORD m_hrLow; // HRESULT of the low level error
  742. LPCOLESTR m_pszLow; // allocate using HeapAlloc() and GetErrorHeap()
  743. LPCOLESTR m_pszHigh; // allocate using HeapAlloc() and GetErrorHeap()
  744. LPCOLESTR m_pszGeek; // allocate using HeapAlloc() and GetErrorHeap()
  745. LONG_PTR m_uReserved3; // =0, reserved for future help info
  746. LONG_PTR m_uReserved4; // =0, reserved for future help info
  747. LONG_PTR m_uReserved5; // =0, reserved for future use
  748. DWORD m_dwFlags; // used to pass internal info
  749. };
  750. #define DeclareITFSErrorMembers(IPURE) \
  751. STDMETHOD(GetErrorInfo)(THIS_ LONG_PTR uReserved, TFSErrorInfo **ppErrStruct) IPURE; \
  752. STDMETHOD(GetErrorInfoForThread)(THIS_ DWORD dwThreadId, LONG_PTR uReserved, TFSErrorInfo **ppErrStruct) IPURE; \
  753. STDMETHOD(SetErrorInfo)(THIS_ LONG_PTR uReserved, const TFSErrorInfo *pErrStruct) IPURE; \
  754. STDMETHOD(SetErrorInfoForThread)(THIS_ DWORD dwThreadId, LONG_PTR uReserved, const TFSErrorInfo *pErrStruct) IPURE; \
  755. STDMETHOD(ClearErrorInfo)(THIS_ LONG_PTR uReserved) IPURE; \
  756. STDMETHOD(ClearErrorInfoForThread)(THIS_ DWORD dwThreadId, LONG_PTR uReserved) IPURE; \
  757. #undef INTERFACE
  758. #define INTERFACE ITFSError
  759. DECLARE_INTERFACE_(ITFSError, IUnknown)
  760. {
  761. DeclareIUnknownMembers(PURE)
  762. DeclareITFSErrorMembers(PURE)
  763. };
  764. typedef ComSmartPointer<ITFSError, &IID_ITFSError> SPITFSError;
  765. // Misc smart pointers
  766. typedef ComSmartPointer<IConsoleVerb, &IID_IConsoleVerb> SPIConsoleVerb;
  767. typedef ComSmartPointer<IControlbar, &IID_IControlbar> SPIControlBar;
  768. typedef ComSmartPointer<IDataObject, &IID_IDataObject> SPIDataObject;
  769. typedef ComSmartPointer<IHeaderCtrl, &IID_IHeaderCtrl> SPIHeaderCtrl;
  770. typedef ComSmartPointer<IImageList, &IID_IImageList> SPIImageList;
  771. typedef ComSmartPointer<IPropertySheetCallback, &IID_IPropertySheetCallback> SPIPropertySheetCallback;
  772. typedef ComSmartPointer<IPropertySheetProvider, &IID_IPropertySheetProvider> SPIPropertySheetProvider;
  773. typedef ComSmartPointer<IResultData, &IID_IResultData> SPIResultData;
  774. typedef ComSmartPointer<IToolbar, &IID_IToolbar> SPIToolbar;
  775. typedef ComSmartPointer<IPersistStream, &IID_IPersistStream> SPIPersistStream;
  776. typedef ComSmartPointer<IPersistStreamInit, &IID_IPersistStreamInit> SPIPersistStreamInit;
  777. /*---------------------------------------------------------------------------
  778. Misc. APIs
  779. ---------------------------------------------------------------------------*/
  780. TFSCORE_API(HRESULT) ExtractNodeFromDataObject(ITFSNodeMgr *pNodeMgr,
  781. const CLSID *pClsid,
  782. LPDATAOBJECT pDataObject,
  783. BOOL fCheckForCreate,
  784. ITFSNode **ppNode,
  785. DWORD *pdwType,
  786. INTERNAL **ppInternal);
  787. // These are non-AGGREGATABLE!
  788. TFSCORE_API(HRESULT) CreateLeafTFSNode (ITFSNode **pNode,
  789. const GUID *pNodeType,
  790. ITFSNodeHandler *pNodeHandler,
  791. ITFSResultHandler *pResultHandler,
  792. ITFSNodeMgr *pNodeMgr);
  793. TFSCORE_API(HRESULT) CreateContainerTFSNode (ITFSNode **ppNode,
  794. const GUID *pNodeType,
  795. ITFSNodeHandler *pNodeHandler,
  796. ITFSResultHandler *pResultHandler,
  797. ITFSNodeMgr *pNodeMgr);
  798. TFSCORE_API(HRESULT) CreateTFSNodeMgr(ITFSNodeMgr **ppTFSNodeMgr,
  799. IComponentData *pComponentData,
  800. IConsole2 *pConsole,
  801. IConsoleNameSpace2 *pConsoleNamespace);
  802. TFSCORE_API(HRESULT) CreateTFSComponentData(IComponentData **ppCompData,
  803. ITFSCompDataCallback *pCallback);
  804. #endif // _TFSINT_H