diff --git a/reactos/dll/win32/shell32/cpanelfolder.c b/reactos/dll/win32/shell32/cpanelfolder.c index aa09edf62c2..1bb91121032 100644 --- a/reactos/dll/win32/shell32/cpanelfolder.c +++ b/reactos/dll/win32/shell32/cpanelfolder.c @@ -611,8 +611,7 @@ ISF_ControlPanel_fnGetUIObjectOf(IShellFolder2 * iface, *ppvOut = NULL; if (IsEqualIID(riid, &IID_IContextMenu) &&(cidl >= 1)) { - pObj = (LPUNKNOWN) ISvItemCm_Constructor((IShellFolder *) iface, This->pidlRoot, apidl, cidl); - hr = S_OK; + hr = CDefFolderMenu_Create2(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj); } else if (IsEqualIID(riid, &IID_IDataObject) &&(cidl >= 1)) { pObj = (LPUNKNOWN) IDataObject_Constructor(hwndOwner, This->pidlRoot, apidl, cidl); hr = S_OK; diff --git a/reactos/dll/win32/shell32/shfldr_desktop.c b/reactos/dll/win32/shell32/shfldr_desktop.c index 4ccf0f61608..5a948d548b5 100644 --- a/reactos/dll/win32/shell32/shfldr_desktop.c +++ b/reactos/dll/win32/shell32/shfldr_desktop.c @@ -487,11 +487,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetUIObjectOf (IShellFolder2 * iface, if (IsEqualIID (riid, &IID_IContextMenu)) { - if (cidl > 0) - pObj = (LPUNKNOWN) ISvItemCm_Constructor( (IShellFolder *) iface, This->pidlRoot, apidl, cidl); - else - pObj = (LPUNKNOWN) ISvBgCm_Constructor( (IShellFolder *) iface, TRUE); - hr = S_OK; + hr = CDefFolderMenu_Create2(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj); } else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) { diff --git a/reactos/dll/win32/shell32/shfldr_fs.c b/reactos/dll/win32/shell32/shfldr_fs.c index 9b15cab0fd9..309344bbbc4 100644 --- a/reactos/dll/win32/shell32/shfldr_fs.c +++ b/reactos/dll/win32/shell32/shfldr_fs.c @@ -652,9 +652,7 @@ IShellFolder_fnGetUIObjectOf (IShellFolder2 * iface, *ppvOut = NULL; if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1)) { - pObj = (LPUNKNOWN) ISvItemCm_Constructor ((IShellFolder *) iface, - This->pidlRoot, apidl, cidl); - hr = S_OK; + hr = CDefFolderMenu_Create2(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj); } else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) { pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, This->pidlRoot, apidl, cidl); diff --git a/reactos/dll/win32/shell32/shfldr_mycomp.c b/reactos/dll/win32/shell32/shfldr_mycomp.c index 8b2679ea8b6..b2b10eb7955 100644 --- a/reactos/dll/win32/shell32/shfldr_mycomp.c +++ b/reactos/dll/win32/shell32/shfldr_mycomp.c @@ -519,9 +519,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetUIObjectOf (IShellFolder2 * iface, if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1)) { - pObj = (LPUNKNOWN) ISvItemCm_Constructor ((IShellFolder *) iface, - This->pidlRoot, apidl, cidl); - hr = S_OK; + hr = CDefFolderMenu_Create2(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj); } else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) {