mirror of
https://github.com/reactos/reactos.git
synced 2026-06-03 01:41:13 +08:00
[EXPLORER][BROWSEUI][SHELL32][NETSHELL] Fix wrong usage of CComPtr
This commit is contained in:
@@ -242,8 +242,5 @@ public:
|
||||
|
||||
HRESULT CStartMenuBtnCtxMenu_CreateInstance(ITrayWindow * m_TrayWnd, IN HWND m_Owner, IContextMenu ** ppCtxMenu)
|
||||
{
|
||||
CStartMenuBtnCtxMenu * mnu = new CComObject<CStartMenuBtnCtxMenu>();
|
||||
mnu->Initialize(m_TrayWnd, m_Owner);
|
||||
*ppCtxMenu = mnu;
|
||||
return S_OK;
|
||||
return ShellObjectCreatorInit<CStartMenuBtnCtxMenu>(m_TrayWnd, m_Owner, IID_PPV_ARG(IContextMenu, ppCtxMenu));
|
||||
}
|
||||
|
||||
@@ -301,8 +301,8 @@ public:
|
||||
|
||||
if (ppcm != NULL)
|
||||
{
|
||||
m_ContextMenu->AddRef();
|
||||
*ppcm = m_ContextMenu;
|
||||
(*ppcm)->AddRef();
|
||||
}
|
||||
|
||||
/* Add the menu items */
|
||||
|
||||
@@ -2943,7 +2943,6 @@ ChangePos:
|
||||
{
|
||||
CComPtr<IContextMenu> ctxMenu;
|
||||
CStartMenuBtnCtxMenu_CreateInstance(this, m_hWnd, &ctxMenu);
|
||||
ctxMenu->AddRef();
|
||||
TrackCtxMenu(ctxMenu, ppt, hWndExclude, m_Position == ABE_BOTTOM, this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user