00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __OLEOBJECT_H__
00024 #define __OLEOBJECT_H__
00025
00026 class VLCOleObject : public IOleObject
00027 {
00028
00029 public:
00030
00031 VLCOleObject(VLCPlugin *p_instance);
00032 virtual ~VLCOleObject();
00033
00034
00035 STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
00036 {
00037 if( (NULL != ppv)
00038 && (IID_IUnknown == riid)
00039 && (IID_IOleObject == riid) )
00040 {
00041 AddRef();
00042 *ppv = reinterpret_cast<LPVOID>(this);
00043 return NOERROR;
00044 }
00045 return _p_instance->pUnkOuter->QueryInterface(riid, ppv);
00046 };
00047
00048 STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); };
00049 STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); };
00050
00051
00052 STDMETHODIMP Advise(IAdviseSink *, LPDWORD);
00053 STDMETHODIMP Close(DWORD);
00054 STDMETHODIMP DoVerb(LONG, LPMSG, LPOLECLIENTSITE, LONG, HWND, LPCRECT);
00055 STDMETHODIMP EnumAdvise(IEnumSTATDATA **);
00056 STDMETHODIMP EnumVerbs(IEnumOleVerb **);
00057 STDMETHODIMP GetClientSite(LPOLECLIENTSITE *);
00058 STDMETHODIMP GetClipboardData(DWORD, LPDATAOBJECT *);
00059 STDMETHODIMP GetExtent(DWORD, SIZEL *);
00060 STDMETHODIMP GetMiscStatus(DWORD, DWORD *);
00061 STDMETHODIMP GetMoniker(DWORD, DWORD, LPMONIKER *);
00062 STDMETHODIMP GetUserClassID(CLSID *);
00063 STDMETHODIMP GetUserType(DWORD, LPOLESTR *);
00064 STDMETHODIMP InitFromData(IDataObject *, BOOL, DWORD);
00065 STDMETHODIMP IsUpToDate(void);
00066 STDMETHODIMP SetClientSite(LPOLECLIENTSITE);
00067 STDMETHODIMP SetColorScheme(LOGPALETTE *);
00068 STDMETHODIMP SetExtent(DWORD, SIZEL *);
00069 STDMETHODIMP SetHostNames(LPCOLESTR, LPCOLESTR) ;
00070 STDMETHODIMP SetMoniker(DWORD, LPMONIKER);
00071 STDMETHODIMP Unadvise(DWORD);
00072 STDMETHODIMP Update(void);
00073
00074 private:
00075
00076 HRESULT doInPlaceActivate(LPMSG lpMsg, LPOLECLIENTSITE pActiveSite, HWND hwndParent, LPCRECT lprcPosRect);
00077 HRESULT doUIActivate(LPMSG lpMsg, LPOLECLIENTSITE pActiveSite, HWND hwndParent, LPCRECT lprcPosRect);
00078
00079 IOleAdviseHolder *_p_advise_holder;
00080 IOleClientSite *_p_clientsite;
00081
00082 VLCPlugin *_p_instance;
00083 };
00084
00085 #endif
00086