Back to index

lightning-sunbird  0.9+nobinonly
ControlEventSink.h
Go to the documentation of this file.
00001 // ControlEventSink.h : Declaration of the CBrowseEventSink
00002 
00003 #ifndef __CONTROLEVENTSINK_H_
00004 #define __CONTROLEVENTSINK_H_
00005 
00006 #include "CBrowseDlg.h"
00007 #include "resource.h"       // main symbols
00008 
00010 // CBrowseEventSink
00011 class ATL_NO_VTABLE CBrowseEventSink : 
00012        public CComObjectRootEx<CComSingleThreadModel>,
00013        public CComCoClass<CBrowseEventSink, &CLSID_ControlEventSink>,
00014        public IDispatch
00015 {
00016 public:
00017        CBrowseEventSink()
00018        {
00019               m_pBrowseDlg = NULL;
00020        }
00021 
00022        CBrowseDlg *m_pBrowseDlg;
00023 
00024 DECLARE_REGISTRY_RESOURCEID(IDR_CONTROLEVENTSINK)
00025 
00026 DECLARE_PROTECT_FINAL_CONSTRUCT()
00027 
00028 BEGIN_COM_MAP(CBrowseEventSink)
00029        COM_INTERFACE_ENTRY(IDispatch)
00030        COM_INTERFACE_ENTRY_IID(DIID_DWebBrowserEvents2, IDispatch)
00031 END_COM_MAP()
00032 
00033 // IDispatch
00034 public:
00035     virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount( 
00036         /* [out] */ UINT __RPC_FAR *pctinfo);
00037     virtual HRESULT STDMETHODCALLTYPE GetTypeInfo( 
00038         /* [in] */ UINT iTInfo,
00039         /* [in] */ LCID lcid,
00040         /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo);
00041     virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames( 
00042         /* [in] */ REFIID riid,
00043         /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames,
00044         /* [in] */ UINT cNames,
00045         /* [in] */ LCID lcid,
00046         /* [size_is][out] */ DISPID __RPC_FAR *rgDispId);
00047     virtual /* [local] */ HRESULT STDMETHODCALLTYPE Invoke( 
00048         /* [in] */ DISPID dispIdMember,
00049         /* [in] */ REFIID riid,
00050         /* [in] */ LCID lcid,
00051         /* [in] */ WORD wFlags,
00052         /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams,
00053         /* [out] */ VARIANT __RPC_FAR *pVarResult,
00054         /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo,
00055         /* [out] */ UINT __RPC_FAR *puArgErr);
00056 };
00057 
00058 typedef CComObject<CBrowseEventSink> CBrowseEventSinkInstance;
00059 
00060 #endif //__CONTROLEVENTSINK_H_