[PATCH] shell32/ebrowser: Added IOleWindow stub for IExplorerBrowser
Nikolay Sivov
nsivov at codeweavers.com
Mon Apr 24 00:50:09 CDT 2017
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/shell32/ebrowser.c | 56 +++++++++++++++++++++++++++++++++++++++++++
dlls/shell32/tests/ebrowser.c | 2 +-
2 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/dlls/shell32/ebrowser.c b/dlls/shell32/ebrowser.c
index bbccf88814..77c727a5ec 100644
--- a/dlls/shell32/ebrowser.c
+++ b/dlls/shell32/ebrowser.c
@@ -56,6 +56,7 @@ typedef struct _ExplorerBrowserImpl {
IShellBrowser IShellBrowser_iface;
ICommDlgBrowser3 ICommDlgBrowser3_iface;
IObjectWithSite IObjectWithSite_iface;
+ IOleWindow IOleWindow_iface;
INameSpaceTreeControlEvents INameSpaceTreeControlEvents_iface;
IInputObject IInputObject_iface;
LONG ref;
@@ -796,6 +797,10 @@ static HRESULT WINAPI IExplorerBrowser_fnQueryInterface(IExplorerBrowser *iface,
{
*ppvObject = &This->IObjectWithSite_iface;
}
+ else if(IsEqualIID(riid, &IID_IOleWindow))
+ {
+ *ppvObject = &This->IOleWindow_iface;
+ }
else if(IsEqualIID(riid, &IID_IInputObject))
{
*ppvObject = &This->IInputObject_iface;
@@ -1750,6 +1755,56 @@ static const IObjectWithSiteVtbl vt_IObjectWithSite = {
IObjectWithSite_fnGetSite
};
+static inline ExplorerBrowserImpl *impl_from_IOleWindow(IOleWindow *iface)
+{
+ return CONTAINING_RECORD(iface, ExplorerBrowserImpl, IOleWindow_iface);
+}
+
+static HRESULT WINAPI OleWindow_QueryInterface(IOleWindow *iface, REFIID riid, void **obj)
+{
+ ExplorerBrowserImpl *This = impl_from_IOleWindow(iface);
+ return IExplorerBrowser_QueryInterface(&This->IExplorerBrowser_iface, riid, obj);
+}
+
+static ULONG WINAPI OleWindow_AddRef(IOleWindow *iface)
+{
+ ExplorerBrowserImpl *This = impl_from_IOleWindow(iface);
+ return IExplorerBrowser_AddRef(&This->IExplorerBrowser_iface);
+}
+
+static ULONG WINAPI OleWindow_Release(IOleWindow *iface)
+{
+ ExplorerBrowserImpl *This = impl_from_IOleWindow(iface);
+ return IExplorerBrowser_Release(&This->IExplorerBrowser_iface);
+}
+
+static HRESULT WINAPI OleWindow_GetWindow(IOleWindow *iface, HWND *hwnd)
+{
+ ExplorerBrowserImpl *This = impl_from_IOleWindow(iface);
+
+ FIXME("(%p)->(%p): stub\n", This, hwnd);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI OleWindow_ContextSensitiveHelp(IOleWindow *iface, BOOL enter_mode)
+{
+ ExplorerBrowserImpl *This = impl_from_IOleWindow(iface);
+
+ FIXME("(%p)->(%d): stub\n", This, enter_mode);
+
+ return E_NOTIMPL;
+}
+
+static const IOleWindowVtbl olewindowvtbl =
+{
+ OleWindow_QueryInterface,
+ OleWindow_AddRef,
+ OleWindow_Release,
+ OleWindow_GetWindow,
+ OleWindow_ContextSensitiveHelp,
+};
+
/**************************************************************************
* INameSpaceTreeControlEvents Implementation
*/
@@ -2061,6 +2116,7 @@ HRESULT WINAPI ExplorerBrowser_Constructor(IUnknown *pUnkOuter, REFIID riid, voi
eb->IShellBrowser_iface.lpVtbl = &vt_IShellBrowser;
eb->ICommDlgBrowser3_iface.lpVtbl = &vt_ICommDlgBrowser3;
eb->IObjectWithSite_iface.lpVtbl = &vt_IObjectWithSite;
+ eb->IOleWindow_iface.lpVtbl = &olewindowvtbl;
eb->INameSpaceTreeControlEvents_iface.lpVtbl = &vt_INameSpaceTreeControlEvents;
eb->IInputObject_iface.lpVtbl = &vt_IInputObject;
diff --git a/dlls/shell32/tests/ebrowser.c b/dlls/shell32/tests/ebrowser.c
index c04a2b42ae..7db584225e 100644
--- a/dlls/shell32/tests/ebrowser.c
+++ b/dlls/shell32/tests/ebrowser.c
@@ -575,7 +575,7 @@ static void test_QueryInterface(void)
test_qinterface(IID_IUnknown, S_OK);
test_qinterface(IID_IExplorerBrowser, S_OK);
test_qinterface(IID_IShellBrowser, S_OK);
- todo_wine test_qinterface(IID_IOleWindow, S_OK);
+ test_qinterface(IID_IOleWindow, S_OK);
test_qinterface(IID_ICommDlgBrowser, S_OK);
test_qinterface(IID_ICommDlgBrowser2, S_OK);
test_qinterface(IID_ICommDlgBrowser3, S_OK);
--
2.11.0
More information about the wine-patches
mailing list