mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 14:07:51 +00:00
[SHELL32] -CMenuBand::SetSite: Don't fail if the site doesn't support the SID_STopLevelBrowser service.
svn path=/trunk/; revision=75090
This commit is contained in:
parent
635d21750f
commit
eda316218d
1 changed files with 11 additions and 3 deletions
|
@ -240,10 +240,18 @@ HRESULT STDMETHODCALLTYPE CMenuBand::SetSite(IUnknown *pUnkSite)
|
|||
|
||||
CComPtr<IOleWindow> pTopLevelWindow;
|
||||
hr = IUnknown_QueryService(m_site, SID_STopLevelBrowser, IID_PPV_ARG(IOleWindow, &pTopLevelWindow));
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
return hr;
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = pTopLevelWindow->GetWindow(&m_topLevelWindow);
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
return hr;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_topLevelWindow = hwndParent;
|
||||
}
|
||||
|
||||
return pTopLevelWindow->GetWindow(&m_topLevelWindow);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CMenuBand::GetSite(REFIID riid, PVOID *ppvSite)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue