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.

90 lines
4.6 KiB

  1. //*********************************************************************
  2. //* Microsoft Windows **
  3. //* Copyright(c) Microsoft Corp., 1999 **
  4. //*********************************************************************
  5. //
  6. // IOSITE.H - Header for the implementation of IOleSite
  7. //
  8. // HISTORY:
  9. //
  10. // 1/27/99 a-jaswed Created.
  11. //
  12. // Class which will provide the an IOleSite to the WebOC
  13. #ifndef _IOSITE_H_
  14. #define _IOSITE_H_
  15. #include <mshtmhst.h>
  16. #include <exdisp.h>
  17. #include "iocsite.h"
  18. #include "ioipsite.h"
  19. #include "ioipfram.h"
  20. class COleSite : public IServiceProvider, public IDocHostUIHandler, public DWebBrowserEvents2, public IInternetSecurityManager
  21. {
  22. private:
  23. IDispatch* m_pExternalInterface;
  24. BOOL m_fScrolling;
  25. BOOL m_bIsOEMDebug;
  26. public:
  27. COleSite();
  28. ~COleSite();
  29. ULONG m_cRef;
  30. HWND m_hWnd;
  31. HWND m_hwndIPObj;
  32. LPSTORAGE m_lpStorage;
  33. LPOLEOBJECT m_lpOleObject;
  34. LPOLEINPLACEOBJECT m_lpInPlaceObject;
  35. BOOL m_fInPlaceActive;
  36. COleClientSite* m_pOleClientSite;
  37. COleInPlaceSite* m_pOleInPlaceSite;
  38. COleInPlaceFrame* m_pOleInPlaceFrame;
  39. // IUnknown Interfaces
  40. STDMETHODIMP QueryInterface (REFIID riid, LPVOID* ppvObj);
  41. STDMETHODIMP_(ULONG) AddRef ();
  42. STDMETHODIMP_(ULONG) Release ();
  43. // IServiceProvider
  44. STDMETHODIMP QueryService (REFGUID guidService, REFIID riid, void** ppvService);
  45. // IDocHostUIHandler
  46. HRESULT STDMETHODCALLTYPE ShowContextMenu (DWORD dwID, POINT* ppt, IUnknown* pcmdtReserved, IDispatch* pdispReserved);
  47. HRESULT STDMETHODCALLTYPE GetHostInfo (DOCHOSTUIINFO* pInfo);
  48. HRESULT STDMETHODCALLTYPE ShowUI (DWORD dwID, IOleInPlaceActiveObject* pActiveObject, IOleCommandTarget* pCommandTarget, IOleInPlaceFrame* pFrame, IOleInPlaceUIWindow* pDoc);
  49. HRESULT STDMETHODCALLTYPE HideUI (void);
  50. HRESULT STDMETHODCALLTYPE UpdateUI (void);
  51. HRESULT STDMETHODCALLTYPE EnableModeless (BOOL fEnable);
  52. HRESULT STDMETHODCALLTYPE OnDocWindowActivate (BOOL fActivate);
  53. HRESULT STDMETHODCALLTYPE OnFrameWindowActivate (BOOL fActivate);
  54. HRESULT STDMETHODCALLTYPE ResizeBorder (LPCRECT prcBorder, IOleInPlaceUIWindow* pUIWindow, BOOL fRameWindow);
  55. HRESULT STDMETHODCALLTYPE TranslateAccelerator (LPMSG lpMsg, const GUID* pguidCmdGroup, DWORD nCmdID);
  56. HRESULT STDMETHODCALLTYPE GetOptionKeyPath (BSTR* pbstrKey, DWORD dw);
  57. HRESULT STDMETHODCALLTYPE GetDropTarget (IDropTarget* pDropTarget, IDropTarget** ppDropTarget);
  58. HRESULT STDMETHODCALLTYPE GetExternal (IDispatch** ppDisp);
  59. HRESULT STDMETHODCALLTYPE TranslateUrl (DWORD dwTranslate, OLECHAR* pchURLIn, OLECHAR** ppchURLOut);
  60. HRESULT STDMETHODCALLTYPE FilterDataObject (IDataObject* pDO, IDataObject** ppDORet);
  61. HRESULT STDMETHODCALLTYPE SetExternalInterface (IDispatch* pUnk);
  62. // DWebBrowserEvents2
  63. STDMETHOD (GetTypeInfoCount) (UINT* pcInfo);
  64. STDMETHOD (GetTypeInfo) (UINT, LCID, ITypeInfo**);
  65. STDMETHOD (GetIDsOfNames) (REFIID, OLECHAR**, UINT, LCID, DISPID* );
  66. STDMETHOD (Invoke) (DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pdispparams, VARIANT* pvarResult, EXCEPINFO* pexcepinfo, UINT* puArgErr);
  67. // IInternetSecurityManager
  68. HRESULT STDMETHODCALLTYPE SetSecuritySite(IInternetSecurityMgrSite __RPC_FAR *pSite);
  69. HRESULT STDMETHODCALLTYPE GetSecuritySite(IInternetSecurityMgrSite __RPC_FAR *__RPC_FAR *ppSite);
  70. HRESULT STDMETHODCALLTYPE MapUrlToZone(LPCWSTR pwszUrl, DWORD __RPC_FAR *pdwZone, DWORD dwFlags);
  71. HRESULT STDMETHODCALLTYPE GetSecurityId(LPCWSTR pwszUrl, BYTE __RPC_FAR *pbSecurityId, DWORD __RPC_FAR *pcbSecurityId, DWORD_PTR dwReserved);
  72. HRESULT STDMETHODCALLTYPE ProcessUrlAction(LPCWSTR pwszUrl, DWORD dwAction, BYTE __RPC_FAR *pPolicy, DWORD cbPolicy, BYTE __RPC_FAR *pContext, DWORD cbContext, DWORD dwFlags, DWORD dwReserved);
  73. HRESULT STDMETHODCALLTYPE QueryCustomPolicy(LPCWSTR pwszUrl, REFGUID guidKey, BYTE __RPC_FAR *__RPC_FAR *ppPolicy, DWORD __RPC_FAR *pcbPolicy, BYTE __RPC_FAR *pContext, DWORD cbContext, DWORD dwReserved);
  74. HRESULT STDMETHODCALLTYPE SetZoneMapping(DWORD dwZone, LPCWSTR lpszPattern, DWORD dwFlags);
  75. HRESULT STDMETHODCALLTYPE GetZoneMappings(DWORD dwZone, IEnumString __RPC_FAR *__RPC_FAR *ppenumString, DWORD dwFlags);
  76. };
  77. #endif