Added SetClientSite implementation.
diff --git a/dlls/shdocvw/oleobject.c b/dlls/shdocvw/oleobject.c
index 3d3edc9..8fb4a48 100644
--- a/dlls/shdocvw/oleobject.c
+++ b/dlls/shdocvw/oleobject.c
@@ -56,15 +56,36 @@
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 @@
This->lpOleObjectVtbl = &OleObjectVtbl;
This->lpOleInPlaceObjectVtbl = &OleInPlaceObjectVtbl;
This->lpOleControlVtbl = &OleControlVtbl;
+
+ This->client = NULL;
}
diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h
index 71c8d4e..19d40fb 100644
--- a/dlls/shdocvw/shdocvw.h
+++ b/dlls/shdocvw/shdocvw.h
@@ -64,6 +64,8 @@
const IConnectionPointContainerVtbl *lpConnectionPointContainerVtbl;
LONG ref;
+
+ IOleClientSite *client;
} WebBrowser;
#define WEBBROWSER(x) ((IWebBrowser*) &(x)->lpWebBrowser2Vtbl)