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.

145 lines
5.1 KiB

  1. /******************************************************************************
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. HelpCenter.h
  5. Abstract:
  6. This file contains the declaration of the class used to implement
  7. the Help Center Application.
  8. Revision History:
  9. Sridhar Chandrashekar (SridharC) 07/21/99
  10. created
  11. ******************************************************************************/
  12. #if !defined(__INCLUDED___PCH___HELPCENTER_H___)
  13. #define __INCLUDED___PCH___HELPCENTER_H___
  14. #include <atlcom.h>
  15. #include <atlwin.h>
  16. #include <atlhost.h>
  17. #include <atlctl.h>
  18. #include <exdisp.h>
  19. #include <exdispid.h>
  20. #include <HelpCenterExternal.h>
  21. #include <shobjidl.h>
  22. #include <marscore.h>
  23. #include <ScriptingFrameworkDID.h>
  24. #include <Perhist.h>
  25. ////////////////////////////////////////////////////////////////////////////////
  26. ////////////////////////////////////////////////////////////////////////////////
  27. class ATL_NO_VTABLE CPCHBootstrapper : // Hungarian: hcpbs
  28. public CComObjectRootEx<MPC::CComSafeMultiThreadModel>,
  29. public CComCoClass<CPCHBootstrapper, &CLSID_PCHBootstrapper>,
  30. public IObjectWithSite,
  31. public IObjectSafety
  32. {
  33. CComPtr<IUnknown> m_spUnkSite;
  34. CComPtr<IUnknown> m_parent;
  35. ////////////////////
  36. static HRESULT ForwardQueryInterface( void* pv, REFIID iid, void** ppvObject, DWORD_PTR offset );
  37. public:
  38. DECLARE_NO_REGISTRY()
  39. BEGIN_COM_MAP(CPCHBootstrapper)
  40. COM_INTERFACE_ENTRY(IObjectWithSite)
  41. COM_INTERFACE_ENTRY(IObjectSafety)
  42. COM_INTERFACE_ENTRY_FUNC_BLIND(0, ForwardQueryInterface)
  43. END_COM_MAP()
  44. //
  45. // IObjectWithSite
  46. //
  47. STDMETHOD(SetSite)(IUnknown *pUnkSite);
  48. STDMETHOD(GetSite)(REFIID riid, void **ppvSite);
  49. //
  50. // IObjectSafety
  51. //
  52. STDMETHOD(GetInterfaceSafetyOptions)( /*[in ]*/ REFIID riid , // Interface that we want options for
  53. /*[out]*/ DWORD *pdwSupportedOptions , // Options meaningful on this interface
  54. /*[out]*/ DWORD *pdwEnabledOptions ); // current option values on this interface
  55. STDMETHOD(SetInterfaceSafetyOptions)( /*[in]*/ REFIID riid , // Interface to set options for
  56. /*[in]*/ DWORD dwOptionSetMask , // Options to change
  57. /*[in]*/ DWORD dwEnabledOptions ); // New option values
  58. };
  59. ////////////////////////////////////////////////////////////////////////////////
  60. ////////////////////////////////////////////////////////////////////////////////
  61. class ATL_NO_VTABLE CPCHMarsHost : // Hungarian: hcpmh
  62. public CComObjectRootEx<MPC::CComSafeMultiThreadModel>,
  63. public IMarsHost
  64. {
  65. CPCHHelpCenterExternal* m_parent;
  66. MPC::wstring m_strTitle;
  67. MPC::wstring m_strCmdLine;
  68. MARSTHREADPARAM m_mtp;
  69. public:
  70. BEGIN_COM_MAP(CPCHMarsHost)
  71. COM_INTERFACE_ENTRY(IMarsHost)
  72. END_COM_MAP()
  73. CPCHMarsHost();
  74. //////////////////////////////////////////////////////////////////////
  75. HRESULT Init( /*[in]*/ CPCHHelpCenterExternal* parent, /*[in]*/ const MPC::wstring& szTitle, /*[out]*/ MARSTHREADPARAM*& pMTP );
  76. //
  77. // IMarsHost
  78. //
  79. STDMETHOD(OnHostNotify)( /*[in]*/ MARSHOSTEVENT event, /*[in]*/ IUnknown *punk, /*[in]*/ LPARAM lParam );
  80. STDMETHOD(PreTranslateMessage)( /*[in]*/ MSG* msg );
  81. };
  82. ////////////////////////////////////////////////////////////////////////////////
  83. ////////////////////////////////////////////////////////////////////////////////
  84. class ATL_NO_VTABLE CPCHScriptableStream : // Hungarian: pchss
  85. public MPC::FileStream,
  86. public IDispatchImpl<IPCHScriptableStream, &IID_IPCHScriptableStream, &LIBID_HelpCenterTypeLib>
  87. {
  88. HRESULT ReadToHGLOBAL( /*[in]*/ long lCount, /*[out]*/ HGLOBAL& hg, /*[out]*/ ULONG& lReadTotal );
  89. public:
  90. BEGIN_COM_MAP(CPCHScriptableStream)
  91. COM_INTERFACE_ENTRY(IDispatch)
  92. COM_INTERFACE_ENTRY(IPCHScriptableStream)
  93. COM_INTERFACE_ENTRY_CHAIN(MPC::FileStream)
  94. END_COM_MAP()
  95. //////////////////////////////////////////////////////////////////////
  96. // IPCHScriptableStream
  97. STDMETHOD(get_Size)( /*[out, retval]*/ long *plSize );
  98. STDMETHOD(Read )( /*[in]*/ long lCount , /*[out, retval]*/ VARIANT * pvData );
  99. STDMETHOD(ReadHex )( /*[in]*/ long lCount , /*[out, retval]*/ BSTR *pbstrData );
  100. STDMETHOD(Write )( /*[in]*/ long lCount , /*[in ]*/ VARIANT vData , /*[out, retval]*/ long *plWritten );
  101. STDMETHOD(WriteHex)( /*[in]*/ long lCount , /*[in ]*/ BSTR bstrData , /*[out, retval]*/ long *plWritten );
  102. STDMETHOD(Seek )( /*[in]*/ long lOffset, /*[in ]*/ BSTR bstrOrigin, /*[out, retval]*/ long *plNewPos );
  103. STDMETHOD(Close )( );
  104. };
  105. /////////////////////////////////////////////////////////////////////////////
  106. #endif // !defined(__INCLUDED___PCH___HELPCENTER_H___)