SHDOCVW: Added SetClientSite implementation
Jacek Caban
jack at itma.pwr.wroc.pl
Thu Sep 15 15:32:48 CDT 2005
Changelog:
Added SetClientSite implementation
-------------- next part --------------
Index: dlls/shdocvw/oleobject.c
===================================================================
RCS file: /home/wine/wine/dlls/shdocvw/oleobject.c,v
retrieving revision 1.16
diff -u -p -r1.16 oleobject.c
--- dlls/shdocvw/oleobject.c 7 Sep 2005 09:23:47 -0000 1.16
+++ dlls/shdocvw/oleobject.c 15 Sep 2005 20:26:58 -0000
@@ -56,15 +56,36 @@ static ULONG WINAPI OleObject_Release(IO
static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, LPOLECLIENTSITE pClientSite)
{
WebBrowser *This = OLEOBJ_THIS(iface);
- FIXME("(%p)->(%p)\n", This, pClientSite);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%p)\n", This, pClientSite);
+
+ if(This->client == pClientSite)
+ return S_OK;
+
+ if(This->client)
+ IOleClientSite_Release(This->client);
+
+ if(pClientSite)
+ IOleClientSite_AddRef(pClientSite);
+
+ This->client = pClientSite;
+ return S_OK;
}
static HRESULT WINAPI OleObject_GetClientSite(IOleObject *iface, LPOLECLIENTSITE *ppClientSite)
{
WebBrowser *This = OLEOBJ_THIS(iface);
- FIXME("(%p)->(%p)\n", This, ppClientSite);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%p)\n", This, ppClientSite);
+
+ if(!ppClientSite)
+ return E_INVALIDARG;
+
+ if(This->client)
+ IOleClientSite_AddRef(This->client);
+ *ppClientSite = This->client;
+
+ return S_OK;
}
static HRESULT WINAPI OleObject_SetHostNames(IOleObject *iface, LPCOLESTR szContainerApp,
@@ -427,4 +448,6 @@ void WebBrowser_OleObject_Init(WebBrowse
This->lpOleObjectVtbl = &OleObjectVtbl;
This->lpOleInPlaceObjectVtbl = &OleInPlaceObjectVtbl;
This->lpOleControlVtbl = &OleControlVtbl;
+
+ This->client = NULL;
}
Index: dlls/shdocvw/shdocvw.h
===================================================================
RCS file: /home/wine/wine/dlls/shdocvw/shdocvw.h,v
retrieving revision 1.22
diff -u -p -r1.22 shdocvw.h
--- dlls/shdocvw/shdocvw.h 12 Sep 2005 21:17:57 -0000 1.22
+++ dlls/shdocvw/shdocvw.h 15 Sep 2005 20:26:58 -0000
@@ -64,6 +64,8 @@ typedef struct {
const IConnectionPointContainerVtbl *lpConnectionPointContainerVtbl;
LONG ref;
+
+ IOleClientSite *client;
} WebBrowser;
#define WEBBROWSER(x) ((IWebBrowser*) &(x)->lpWebBrowser2Vtbl)
More information about the wine-patches
mailing list