00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __OLEINPLACEOBJECT_H__
00024 #define __OLEINPLACEOBJECT_H__
00025
00026 class VLCOleInPlaceObject : public IOleInPlaceObject
00027 {
00028
00029 public:
00030
00031 VLCOleInPlaceObject(VLCPlugin *p_instance) : _p_instance(p_instance) {};
00032 virtual ~VLCOleInPlaceObject() {};
00033
00034
00035 STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
00036 {
00037 if( (NULL != ppv)
00038 && (IID_IUnknown == riid)
00039 && (IID_IOleWindow == riid)
00040 && (IID_IOleInPlaceObject == riid) )
00041 {
00042 AddRef();
00043 *ppv = reinterpret_cast<LPVOID>(this);
00044 return NOERROR;
00045 }
00046 return _p_instance->pUnkOuter->QueryInterface(riid, ppv);
00047 };
00048
00049 STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); };
00050 STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); };
00051
00052
00053 STDMETHODIMP GetWindow(HWND *);
00054 STDMETHODIMP ContextSensitiveHelp(BOOL);
00055
00056
00057 STDMETHODIMP InPlaceDeactivate(void);
00058 STDMETHODIMP UIDeactivate(void);
00059 STDMETHODIMP SetObjectRects(LPCRECT, LPCRECT);
00060 STDMETHODIMP ReactivateAndUndo(void);
00061
00062 private:
00063
00064 VLCPlugin *_p_instance;
00065 };
00066
00067 #endif
00068