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.

46 lines
1.5 KiB

  1. // wvcoord.h : Declaration of the CWebViewCoord
  2. #ifndef __EVTSINK_H_
  3. #define __EVTSINK_H_
  4. /////////////////////////////////////////////////////////////////////////////
  5. // CDispatchEventSink
  6. class CDispatchEventSink : public IDispatch {
  7. public:
  8. //
  9. // IUnknown methods
  10. //
  11. STDMETHOD(QueryInterface)(REFIID riid, void **ppvObject);
  12. STDMETHOD_(ULONG, AddRef)(void);
  13. STDMETHOD_(ULONG, Release)(void);
  14. //
  15. // IDispatch methods
  16. //
  17. STDMETHOD(GetTypeInfoCount)(UINT *pctinfo);
  18. STDMETHOD(GetTypeInfo)(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo);
  19. STDMETHOD(GetIDsOfNames)(REFIID riid, LPOLESTR __RPC_FAR *rgszNames,
  20. UINT cNames, LCID lcid, DISPID *rgDispId);
  21. STDMETHOD(Invoke)(DISPID dispIdMember, REFIID riid, LCID lcid,
  22. WORD wFlags, DISPPARAMS *pDispParams,
  23. VARIANT *pVarResult, EXCEPINFO *pExcepInfo,
  24. UINT *puArgErr) PURE;
  25. protected:
  26. virtual ~CDispatchEventSink();
  27. CDispatchEventSink();
  28. private:
  29. UINT m_cRef; // IUnknown reference count
  30. };
  31. /////////////////////////////////////////////////////////////////////////////
  32. // WindowEventSink Helpers
  33. HRESULT ConnectHtmlEvents(IDispatch *pdispSink, CComPtr<IOleClientSite> &spClientSite, IDispatch ** ppdispWindow, DWORD *pdwCookie);
  34. HRESULT DisconnectHtmlEvents(IDispatch *pdispWindow, DWORD dwCookie);
  35. #endif