Source code of Windows XP (NT5)
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.

131 lines
5.1 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. faxcomponent.h
  5. Abstract:
  6. This header prototypes my implementation of IComponent.
  7. Environment:
  8. WIN32 User Mode
  9. Author:
  10. Darwin Ouyang (t-darouy) 30-Sept-1997
  11. --*/
  12. #ifndef __FAXCOMPONENT_H_
  13. #define __FAXCOMPONENT_H_
  14. #include "resource.h"
  15. #include "faxadmin.h"
  16. #include "faxcconmn.h" // IExtendContextMenu dispatcher for IComponent
  17. #include "faxcprppg.h" // IExtendPropertyPage dispatcher for IComponent
  18. #include "faxcconbar.h" // IExtendControlbar dispatcher for IComponent
  19. class CFaxComponentData; // forward declarator
  20. class CInternalDevice;
  21. class CInternalLogCat;
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CFaxComponent
  24. class CFaxComponent : public CComObjectRoot,
  25. public IComponent,
  26. public CFaxComponentExtendContextMenu,
  27. public CFaxComponentExtendPropertySheet,
  28. public CFaxComponentExtendControlbar
  29. {
  30. public:
  31. // ATL Map
  32. DECLARE_NOT_AGGREGATABLE(CFaxComponent)
  33. BEGIN_COM_MAP(CFaxComponent)
  34. COM_INTERFACE_ENTRY(IComponent)
  35. COM_INTERFACE_ENTRY(IExtendContextMenu)
  36. COM_INTERFACE_ENTRY(IExtendPropertySheet)
  37. COM_INTERFACE_ENTRY(IExtendControlbar)
  38. END_COM_MAP()
  39. // constructor and destructor
  40. CFaxComponent();
  41. ~CFaxComponent();
  42. // IComponent
  43. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Initialize(
  44. /* [in] */ LPCONSOLE lpUnknown );
  45. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Notify(
  46. /* [in] */ LPDATAOBJECT lpDataObject,
  47. /* [in] */ MMC_NOTIFY_TYPE event,
  48. /* [in] */ LPARAM arg,
  49. /* [in] */ LPARAM param);
  50. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Destroy(
  51. /* [in] */ MMC_COOKIE cookie);
  52. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryDataObject(
  53. /* [in] */ MMC_COOKIE cookie,
  54. /* [in] */ DATA_OBJECT_TYPES type,
  55. /* [out] */ LPDATAOBJECT __RPC_FAR *ppDataObject);
  56. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetResultViewType(
  57. /* [in] */ MMC_COOKIE cookie,
  58. /* [out] */ LPOLESTR __RPC_FAR *ppViewType,
  59. /* [out] */ long __RPC_FAR *pViewOptions);
  60. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDisplayInfo(
  61. /* [out][in] */ RESULTDATAITEM __RPC_FAR *pResultDataItem);
  62. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CompareObjects(
  63. /* [in] */ LPDATAOBJECT lpDataObjectA,
  64. /* [in] */ LPDATAOBJECT lpDataObjectB);
  65. // other methods
  66. void SetOwner( CFaxComponentData * myOwner );
  67. CFaxComponentData * GetOwner( void ) { return pOwner; }
  68. HRESULT InsertIconsIntoImageList();
  69. LONG QueryPropSheetCount() { return m_dwPropSheetCount; }
  70. void IncPropSheetCount() { InterlockedIncrement( &m_dwPropSheetCount );
  71. DebugPrint(( TEXT("IncPropSheet Count %d "), m_dwPropSheetCount )); }
  72. void DecPropSheetCount() { InterlockedDecrement( &m_dwPropSheetCount );
  73. DebugPrint(( TEXT("DecPropSheet Count %d "), m_dwPropSheetCount )); }
  74. public:
  75. LPCONSOLE m_pUnknown; // IUnknown -- should be LPUNKNOWN but docs are wrong?
  76. LPCONSOLE m_pConsole; // IConsole
  77. LPCONSOLENAMESPACE m_pConsoleNameSpace; // IConsoleNameSpace
  78. LPCONSOLEVERB m_pConsoleVerb; // IConsoleVerb
  79. LPHEADERCTRL m_pHeaderCtrl; // IHeaderCtrl
  80. LPIMAGELIST m_pImageList; // IImageList
  81. LPRESULTDATA m_pResultData; // IResultData
  82. LPCONTROLBAR m_pControlbar; // IControlbar
  83. CFaxComponentData * pOwner; // my owner
  84. // IComponent instance data for CInternalDevices
  85. CInternalDevice ** pDeviceArray;
  86. DWORD numDevices;
  87. // IComponent instance data for CInternalLogging
  88. PFAX_LOG_CATEGORY pCategories;
  89. DWORD numCategories;
  90. CInternalLogCat ** pLogPArray;
  91. private:
  92. LONG m_dwPropSheetCount; // property sheet count
  93. };
  94. #endif