Author: tfaber
Date: Wed Aug 19 08:28:24 2015
New Revision: 68762
URL:
http://svn.reactos.org/svn/reactos?rev=68762&view=rev
Log:
[SHELL32]
- Fail CDefView::CreateViewWindow if a window already exists
- Don't return IOleWindow from CDefView::QueryInterface
Fixes reference leaks during shell32_winetest:shlview
CORE-9867
Modified:
trunk/reactos/dll/win32/shell32/CDefView.cpp
Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefView…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] Wed Aug 19 08:28:24 2015
@@ -320,7 +320,8 @@
END_MSG_MAP()
BEGIN_COM_MAP(CDefView)
- COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow)
+ // Windows returns E_NOINTERFACE for IOleWindow
+ // COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow)
COM_INTERFACE_ENTRY_IID(IID_IShellView, IShellView)
COM_INTERFACE_ENTRY_IID(IID_IFolderView, IFolderView)
COM_INTERFACE_ENTRY_IID(IID_IShellFolderView, IShellFolderView)
@@ -2193,7 +2194,7 @@
TRACE("-- left=%i top=%i right=%i bottom=%i\n", prcView->left,
prcView->top, prcView->right, prcView->bottom);
/* Validate the Shell Browser */
- if (psb == NULL)
+ if (psb == NULL || m_hWnd)
return E_UNEXPECTED;
/*set up the member variables*/