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.

115 lines
2.5 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1998 **/
  4. /**********************************************************************/
  5. /*
  6. compdata.h
  7. base classes for IComponent and IComponentData
  8. FILE HISTORY:
  9. */
  10. #ifndef _COMPDATA_H
  11. #define _COMPDATA_H
  12. #if _MSC_VER >= 1000 // VC 5.0 or later
  13. #pragma once
  14. #endif
  15. #ifndef __mmc_h__
  16. #include <mmc.h>
  17. #endif
  18. #ifndef _TFSINT_H
  19. #include "tfsint.h"
  20. #endif
  21. #ifndef _UTIL_H
  22. #include "util.h"
  23. #endif
  24. #define EXTENSION_TYPE_NAMESPACE ( 0x00000001 )
  25. #define EXTENSION_TYPE_CONTEXTMENU ( 0x00000002 )
  26. #define EXTENSION_TYPE_TOOLBAR ( 0x00000004 )
  27. #define EXTENSION_TYPE_PROPERTYSHEET ( 0x00000008 )
  28. #define EXTENSION_TYPE_TASK ( 0x00000010 )
  29. /////////////////////////////////////////////////////////////////////////////
  30. // TFSComponentData
  31. #define IMPL
  32. class TFSComponentData :
  33. public ITFSComponentData,
  34. public IComponentData,
  35. public IExtendPropertySheet2,
  36. public IExtendContextMenu,
  37. public IPersistStreamInit,
  38. public ISnapinHelp
  39. {
  40. // INTERFACES
  41. public:
  42. DeclareIUnknownMembers(IMPL)
  43. DeclareIExtendContextMenuMembers(IMPL)
  44. DeclareIExtendPropertySheetMembers(IMPL)
  45. DeclareIComponentDataMembers(IMPL)
  46. DeclareITFSComponentDataMembers(IMPL)
  47. DeclareIPersistStreamInitMembers(IMPL)
  48. DeclareISnapinHelpMembers(IMPL)
  49. public:
  50. TFSComponentData();
  51. ~TFSComponentData();
  52. HRESULT Construct(ITFSCompDataCallback *pCallback);
  53. public:
  54. // Accessors
  55. ITFSNodeMgr * QueryNodeMgr(); // no AddRef
  56. ITFSNodeMgr * GetNodeMgr(); // AddRef
  57. protected:
  58. SPIConsoleNameSpace m_spConsoleNameSpace;
  59. SPIConsole m_spConsole;
  60. SPITFSNodeMgr m_spNodeMgr;
  61. SPITFSCompDataCallback m_spCallback;
  62. // Hidden window
  63. private:
  64. CHiddenWnd m_hiddenWnd; // syncronization with background threads
  65. HWND m_hWnd; // thread safe HWND (gotten from the MFC CWnd)
  66. BOOL m_bFirstTimeRun;
  67. long m_cRef;
  68. LPWATERMARKINFO m_pWatermarkInfo; // for wizard 97 style wizards
  69. // taskpad stuff
  70. BOOL m_fTaskpadInitialized;
  71. DWORD m_dwTaskpadStates;
  72. // help stuff
  73. CString m_strHTMLHelpFileName;
  74. };
  75. inline ITFSNodeMgr * TFSComponentData::QueryNodeMgr()
  76. {
  77. return m_spNodeMgr;
  78. }
  79. inline ITFSNodeMgr * TFSComponentData::GetNodeMgr()
  80. {
  81. m_spNodeMgr->AddRef();
  82. return m_spNodeMgr;
  83. }
  84. #endif _COMPDATA_H